From 6132c325c67e488016bbc75ea0e1d965beea550e Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Wed, 23 Mar 2022 14:07:40 +1100 Subject: [PATCH 001/469] defining all types as enums for now --- .../skillapi/activators/Activator.java | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java index d178c996..6833abc2 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java @@ -1,4 +1,47 @@ package com.amuzil.omegasource.skillapi.activators; +/** + * Covers all the different ways to activate an ability. + * Gonna use an enum to describe for now. Will update that later; think of it as a placeholder. + */ public class Activator { + + /** + * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and + * consolidate for good code practice later. + */ + public enum ActivatorType { + RADIAL, + HOTKEY, + MULTIKEY, + GESTURE + } + + public enum RadialType { + MOUSE, + NUMBER + } + + /** + * These 2 types are generally used for multikey. Initialise is how to start listening for the hotkey or key combo, + * and the execution is when to stop. + */ + public enum InitialiseType { + TOGGLE, + HOLD + } + + public enum ExecuteType { + DESIGNATED, + SPECIAL + } + + /** + * Covers a range of VR gestures for those who aren't too flexible or athletically inclined, and those + * who are quite adept in their range of motion. + */ + public enum GestureType { + SIMPLE, + COMPLEX + } } From 020c125dca1dcd7d537d7cdd4dc0bb80e708632f Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Wed, 23 Mar 2022 15:13:35 +1100 Subject: [PATCH 002/469] still thinking through the setup; updated to 1.18 --- build.gradle | 137 +- changelog.txt | 14860 +++++++++++++--- gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 59536 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 257 +- .../skillapi/activators/KeyCombination.java | 14 + .../skillapi/activators/KeyCombo.java | 7 + .../listeners/DynamicStateListener.java | 9 + 8 files changed, 12613 insertions(+), 2673 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombo.java diff --git a/build.gradle b/build.gradle index ba28c489..0ad724ed 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ buildscript { repositories { + // These repositories are only for Gradle plugins, put any other repositories in the repository block further below maven { url = 'https://maven.minecraftforge.net' } mavenCentral() } @@ -7,34 +8,39 @@ buildscript { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true } } -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' +plugins { + id 'eclipse' + id 'maven-publish' +} +apply plugin: 'net.minecraftforge.gradle' + version = '1.0' group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'modid' -java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8. +// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. +java.toolchain.languageVersion = JavaLanguageVersion.of(17) -println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) +println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { - // The mappings can be changed at any time, and must be in the following format. + // The mappings can be changed at any time and must be in the following format. // Channel: Version: - // snapshot YYYYMMDD Snapshot are built nightly. - // stable # Stables are built at the discretion of the MCP team. - // official MCVersion Official field/method names from Mojang mapping files + // official MCVersion Official field/method names from Mojang mapping files + // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official // - // You must be aware of the Mojang license when using the 'official' mappings. + // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md // - // Use non-default mappings at your own risk. they may not always work. + // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge + // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started + // + // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. - mappings channel: 'official', version: '1.16.5' - // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. - - // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') + mappings channel: 'official', version: '1.18.2' + + // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. // Default run configurations. // These can be tweaked, removed, or duplicated as needed. @@ -43,7 +49,7 @@ minecraft { workingDirectory project.file('run') // Recommended logging data for a userdev environment - // The markers can be changed as needed. + // The markers can be added/remove as needed separated by commas. // "SCAN": For mods scan. // "REGISTRIES": For firing of registry events. // "REGISTRYDUMP": For getting the contents of all registries. @@ -54,6 +60,9 @@ minecraft { // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', 'examplemod' + mods { examplemod { source sourceSets.main @@ -64,8 +73,28 @@ minecraft { server { workingDirectory project.file('run') + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', 'examplemod' + + mods { + examplemod { + source sourceSets.main + } + } + } + + // This run config launches GameTestServer and runs all registered gametests, then exits. + // By default, the server will crash when no gametests are provided. + // The gametest system is also enabled by default for other run configs under the /test command. + gameTestServer { + workingDirectory project.file('run') + // Recommended logging data for a userdev environment - // The markers can be changed as needed. + // The markers can be added/remove as needed separated by commas. // "SCAN": For mods scan. // "REGISTRIES": For firing of registry events. // "REGISTRYDUMP": For getting the contents of all registries. @@ -76,6 +105,9 @@ minecraft { // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', 'examplemod' + mods { examplemod { source sourceSets.main @@ -86,16 +118,8 @@ minecraft { data { workingDirectory project.file('run') - // Recommended logging data for a userdev environment - // The markers can be changed as needed. - // "SCAN": For mods scan. - // "REGISTRIES": For firing of registry events. - // "REGISTRYDUMP": For getting the contents of all registries. property 'forge.logging.markers', 'REGISTRIES' - // Recommended logging level for the console - // You can set various levels here. - // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. @@ -113,52 +137,55 @@ minecraft { // Include resources generated by data generators. sourceSets.main.resources { srcDir 'src/generated/resources' } -dependencies { - // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed - // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. - // The userdev artifact is a special name and will get all sorts of transformations applied to it. - minecraft 'net.minecraftforge:forge:1.16.5-36.2.20' +repositories { + // Put repositories for dependencies here + // ForgeGradle automatically adds the Forge maven and Maven Central for you - // 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" + // If you have mod jar dependencies in ./libs, you can declare them as a repository like so: + // flatDir { + // dir 'libs' + // } +} - // 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 +dependencies { + // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed + // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied. + // The userdev artifact is a special name and will get all sorts of transformations applied to it. + minecraft 'net.minecraftforge:forge:1.18.2-40.0.24' - // 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' + // Real mod deobf dependency examples - these get remapped to your current mappings + // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency + // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency + // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency - // These dependencies get remapped to your current MCP mappings - // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' + // Examples using mod jars from ./libs + // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}") // For more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html - } -// Example for how to get properties into the manifest for reading by the runtime.. +// Example for how to get properties into the manifest for reading at runtime. jar { manifest { attributes([ - "Specification-Title": "examplemod", - "Specification-Vendor": "examplemodsareus", - "Specification-Version": "1", // We are version 1 of ourselves - "Implementation-Title": project.name, - "Implementation-Version": "${version}", - "Implementation-Vendor" :"examplemodsareus", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + "Specification-Title" : "examplemod", + "Specification-Vendor" : "examplemodsareus", + "Specification-Version" : "1", // We are version 1 of ourselves + "Implementation-Title" : project.name, + "Implementation-Version" : project.jar.archiveVersion, + "Implementation-Vendor" : "examplemodsareus", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } -// Example configuration to allow publishing using the maven-publish task +// Example configuration to allow publishing using the maven-publish plugin // This is the preferred method to reobfuscate your jar file -jar.finalizedBy('reobfJar') +jar.finalizedBy('reobfJar') // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing -//publish.dependsOn('reobfJar') +// publish.dependsOn('reobfJar') publishing { publications { @@ -168,7 +195,11 @@ publishing { } repositories { maven { - url "file:///${project.projectDir}/mcmodsrepo" + url "file://${project.projectDir}/mcmodsrepo" } } } + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation +} diff --git a/changelog.txt b/changelog.txt index 398f0b10..1fd6944a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,2515 +1,12345 @@ -Build: 1.16.5-36.2.20 - Fri Dec 10 10:00:01 GMT 2021 - oriondevelopment: - [CVE-2021-44228]: Update Log4J to fix the security issue inside it (#8270) - -========= -Build: 1.16.5-36.2.19 - Wed Nov 24 02:14:10 GMT 2021 - daemonumbra: - Fix potential issue with BackgroundScanHandler for users with slow disc IO (#8211) - -========= -Build: 1.16.5-36.2.18 - Mon Nov 22 21:19:17 GMT 2021 - pupnewfster: - Backport #8207 to 1.16 (#8209) - -========= -Build: 1.16.5-36.2.17 - Mon Nov 22 20:46:52 GMT 2021 - xfacthd: - [1.16.x] Add ForgeSpawnEggItem to lazily handle EntityTypes (#8150) - - * Add ForgeSpawnEggItem to lazily handle EntityTypes - - * Remove OnlyIn - - * Surround EntityType#spawn() call with try/catch - -========= -Build: 1.16.5-36.2.16 - Sat Nov 20 15:45:11 GMT 2021 - Unbekannt1998: - change the AdvancementProvider to make it possabible for mods to hook into it (#7488) - - * back Port changes from #8120 - -========= -Build: 1.16.5-36.2.15 - Sat Nov 20 15:33:16 GMT 2021 - oriondevelopment: - Implements Lazy ItemStack Capabilities (#7879) - -========= -Build: 1.16.5-36.2.14 - Sat Nov 20 14:52:41 GMT 2021 - xfacthd: - Pass IModelData through IForgeBakedModel#getModelData() before asking the IBakedModel for the particle texture (#8107) - -========= -Build: 1.16.5-36.2.13 - Sat Nov 20 14:30:21 GMT 2021 - xfacthd: - [1.16.x] Fix blocks with flammable material catching fire from lava when they are marked as non-flammable (#8161) - -========= -Build: 1.16.5-36.2.12 - Sat Nov 20 14:17:06 GMT 2021 - xfacthd: - [1.16] Add accessor to an unmodifiable view of the fullPots map in FlowerPotBlock (#8109) - - * Add accessor to an unmodifiable view of the fullPots map in FlowerPotBlock - - * Fix non-empty pot check - - * Remove exception from getter and add test mod - -========= -Build: 1.16.5-36.2.11 - Sat Nov 20 13:56:21 GMT 2021 - championash5357: - Ensure that all render targets in a PostChain use the same format (#8138) - - Fixes #6995 - -========= -Build: 1.16.5-36.2.10 - Sat Nov 20 13:42:51 GMT 2021 - championash5357: - Make Broken Blocks Display Associated FluidState (#8129) - - Fixes #7253 for 1.16.x - -========= -Build: 1.16.5-36.2.9 - Thu Nov 04 07:09:52 GMT 2021 - gigaherz: - Implement GUI Stacking feature. (#6927) - - * Implement GUI Stacking feature. - You can now use `mc.pushGuiLayer` and `mc.popGuiLayer` to manage the layers. - mc.displayGuiScreen behaves such that if called with a non-null screen it replaces the entire stack, and if called with null it closes the entire stack. - - * Apply review comment fixes from 1.17 counterpart. - - * Revert unintended changes. - - * Missed these reverts. - -========= -Build: 1.16.5-36.2.8 - Sun Oct 03 16:51:54 GMT 2021 - sciwhiz12: - Add workaround for pairs of `'` being stripped (#8074) - - Backport of #8050 - - ititus: - Fix typo in FluidBlockWrapper (#7880) - -========= -Build: 1.16.5-36.2.6 - Mon Sep 27 20:24:54 GMT 2021 - brandon4261: - Backport MC-209819 (#7923) - - Backport fix for mc bug https://bugs.mojang.com/browse/MC-209819 - -========= -Build: 1.16.5-36.2.5 - Sun Sep 19 23:50:14 GMT 2021 - zml: - [1.16.5] Bump Mixin to 0.8.4 (#8098) - -========= -Build: 1.16.5-36.2.4 - Tue Aug 31 16:32:40 GMT 2021 - djbake101: - [1.16.5] Backport OnDatapackSyncEvent from 1.17.1 (#7985) - -========= -Build: 1.16.5-36.2.3 - Tue Aug 31 15:35:00 GMT 2021 - sciwhiz12: - [1.16.x] Fix all layers of ItemLayerModel being fullbright (#8040) - - * Fix all layers of ItemLayerModel being fullbright - - Backport of #8039 - - * Remove duplicate test resources - - These resources have corresponding equivalents in the generated tests - resources folder. - -========= -Build: 1.16.5-36.2.2 - Mon Jul 26 21:37:03 GMT 2021 - onelemonyboi: - Fix rounding related errors with small entity pathfinding. Closes #7730 - -========= -Build: 1.16.5-36.2.1 - Sat Jul 24 17:39:23 GMT 2021 - supermartijn642: - Pass the 'includeName' flag to the ItemTossEvent (#7758) - -========= -Build: 1.16.5-36.2.0 - Thu Jul 22 01:45:10 GMT 2021 - lexmanos: - New 1.16.5 RB. - -========= -Build: 1.16.5-36.1.66 - Wed Jul 21 21:21:25 GMT 2021 - sizableshrimp: - ForgeGradle 5.1 and Gradle 7, which allows development on J16. Runtime still targets J8. (#7877) - -========= -Build: 1.16.5-36.1.65 - Tue Jul 20 05:01:10 GMT 2021 - lexmanos: - Work around javac scoping issue. - - lexmanos: - Fix LAN worlds where registry entries have been removed. - -========= -Build: 1.16.5-36.1.63 - Mon Jul 19 19:54:59 GMT 2021 - william: - Fix FakePlayers having null `connection` and add FakePlayer test mod (#7733) - -========= -Build: - Sat Jul 17 16:23:44 GMT 2021 - ateranimavis: - Use '{assets_root}' rather than task output path for userdev config (#7873) - - Signed-off-by: AterAnimAvis - -========= -Build: 1.16.5-36.1.61 - Sat Jul 17 11:14:53 GMT 2021 - thelnfamous1: - Patch several mob classes to let them use modded versions of their ranged weapons (#7845) - - baileyholl: - Adds a damage float in Lightning Entity and patches Entity to use it. (#7849) - - thesilkminer: - Fix missing userdev config for datagen runs (#7871) - - Signed-off-by: TheSilkMiner - -========= -Build: 1.16.5-36.1.58 - Sat Jul 17 02:45:36 GMT 2021 - awsomesauce239: - Add Fishing bobber projectile impact event (#7842) - - onelemonyboi: - Removes misleading Nullable annotation from canCreatureSpawn (#7840) - - onelemonyboi: - Removes misapplied patch in Entity (#7841) - - onelemonyboi: - Updates MouseHelper to allow for Horizontal Scroll to be recognized as Vertical Scroll (#7834) - - onelemonyboi: - Corrects the assigning of mob kills, Fixes MC-121048 (#7836) - -========= -Build: 1.16.5-36.1.53 - Sat Jul 17 02:30:47 GMT 2021 - diesieben07: - Fix entities losing their scoreboard data when they are unloaded (#7826) - -========= -Build: 1.16.5-36.1.52 - Sat Jul 17 02:23:52 GMT 2021 - diesieben07: - [1.16] Allow blocks other than beds or respawn anchors to act as respawn points (#7824) - -========= -Build: 1.16.5-36.1.51 - Sat Jul 17 02:13:02 GMT 2021 - queekusme: - Changed AbstractFurnaceTileEntity's canBurn and burn functions to use IRecipe's 'assemble' instead of 'getResultItem' (#7756) - - judge40: - [1.16.x] Remove redundant mobgriefing check in SmallFireaballEntity. (#7761) - - judge40: - Use MobGriefingEvent for PiglinEntity when determining whether Piglins want to pick up items. (#7762) - - diesieben07: - Add IRecipeType parameter to burn time hooks (#7771) - - mike.kok: - Fixes tryFluidTransfer_Internal to respect the FluidStack drainable when draining fluidSource. (#7782) - - personthecat: - Synchronize `ResourcePackList#addPackFinder` (#7799) - - github: - Fix vanilla rotation/mirroring issues (#7803) - - Patch minecraft to fix MC-227255 and MC-134110, which are block - rotation and mirroring issues. I noticed this from problems with - Structurize, but this probably affects any other mods that allow - rotating or mirroring structures (as well as vanilla structure blocks). - - sekwah41: - Fix mod menu URL click bounds (#7804) - - thelnfamous1: - Adds knockback attribute to players and updated knockback calculation to PlayerEntity#attack (#7806) - - kinglemming: - Convenience change for potion enumeration - does not change patch size in any meaningful way! (#7811) - - cech12: - New hook to allow Trapdoors be climbable for custom ladders (#7816) - - won-ton: - Add AT entries for DimensionSettings to make them easier for mods to work with (#7817) - - lexmanos: - Regen patches - - daemonumbra: - Removed sidedness from PacketBuffer methods. (#7236) - - Affected methods: - * readLongArray (x2) - * readSectionPos - * readString (no-arg variant) - - covers1624: - Bypass chunk future chain when processing loads and getChunk called. (#7697) - -========= -Build: 1.16.5-36.1.36 - Sat Jul 17 00:24:32 GMT 2021 - thesilkminer: - Add data generators for sounds.json (#6982) - -========= -Build: 1.16.5-36.1.35 - Thu Jul 15 23:56:00 GMT 2021 - diesieben07: - Add custom TextureAtlasSprite loaders (#7822) - - Adds a system for mods to specify custom texture loaders which can be requested by the resource pack through a metadata section in the .mcmeta file. Due to technical reasons, png file is still required for MC to identify a texture as existing, even if the loader doesn't use it. - -========= -Build: 1.16.5-36.1.34 - Thu Jul 15 23:40:24 GMT 2021 - commoble: - Fix PlayerGameModeEventTest and ForgeWorldTypeTest so they don't crash the dedicated server when running forge_test_server in forgedev (#7869) - -========= -Build: 1.16.5-36.1.33 - Wed Jul 14 01:16:19 GMT 2021 - lexmanos: - Add userdev to run config. - -========= -Build: 1.16.5-36.1.32 - Thu Jun 17 02:23:34 GMT 2021 - diesieben07: - Add truncation to FMLStatusPing to work around protocol limits (#7818) - -========= -Build: 1.16.5-36.1.31 - Wed Jun 09 16:35:21 GMT 2021 - sizableshrimp: - Remove ModelResourceLocation patch for SAS entry (#7813) - -========= -Build: 1.16.5-36.1.30 - Tue Jun 08 20:34:06 GMT 2021 - diesieben07: - Fix jar file path detection if the path contains a "!" (#7790) - -========= -Build: 1.16.5-36.1.29 - Tue Jun 08 19:54:50 GMT 2021 - mrp-v2: - Add method to get the number of elements in a model builder (#7792) - -========= -Build: 1.16.5-36.1.28 - Tue Jun 08 19:47:54 GMT 2021 - diesieben07: - Fix vanilla packet splitter remote detection and add advancement packet splitting (#7802) - -========= -Build: 1.16.5-36.1.27 - Tue Jun 08 19:33:44 GMT 2021 - 17338378+nightenom: - Add option for linear filtering of text texture (#7645) - -========= -Build: 1.16.5-36.1.26 - Tue Jun 08 19:07:49 GMT 2021 - mrp-v2: - Use empty model instead of missing model for non-existant layers in multilayer models (#7750) - - Fixes issues when using multi-layer models as part of composite models - -========= -Build: 1.16.5-36.1.25 - Thu Jun 03 17:30:10 GMT 2021 - lexmanos: - Add debug logging to packet compression encoder. - Should make figuring out who is sending large packets easier. - Disable with -Pforge.disablePacketCompressionDebug=true - -========= -Build: 1.16.5-36.1.24 - Sun May 23 18:09:00 GMT 2021 - lexmanos: - Removed signature line from mod list screen. #7500 - -========= -Build: 1.16.5-36.1.23 - Mon May 17 20:56:15 GMT 2021 - curle: - Reinstate the MinecartCollisionHandler field to AbstractMinecartEntity (#7748) Closes #7506. - -========= -Build: 1.16.5-36.1.22 - Mon May 17 20:50:05 GMT 2021 - curle: - Fix PlayerEvent.BreakSpeed's pos being nullable. (#7747) Closes #7615. - -========= -Build: 1.16.5-36.1.21 - Mon May 17 20:43:50 GMT 2021 - curle: - Fix OBJ Loader data gen string (#7746) Closes #7616 - -========= -Build: 1.16.5-36.1.20 - Mon May 17 20:17:14 GMT 2021 - noeppi-noeppi: - Add an event similar to PlayerEvent.NameFormat but for the name shown in the tab list. (#7740) - -========= -Build: 1.16.5-36.1.19 - Mon May 17 20:10:45 GMT 2021 - curle: - Fix filling buckets with fluids without bucket items consuming the fluid (#7745) Closes #7670 - -========= -Build: 1.16.5-36.1.18 - Thu May 13 22:12:02 GMT 2021 - gigaherz: - Work around crash while loading flatworld with modded structures. (#7764) - - * Work around crash while loading flatworld with modded structures. - - * Maybe fix issue with gradle daemon leaking memory and slowing down CI builds. - -========= -Build: 1.16.5-36.1.17 - Wed May 12 21:33:59 GMT 2021 - gigaherz: - Update Forge to Gradle 6.9 - -========= -Build: 1.16.5-36.1.16 - Fri Apr 30 17:59:06 GMT 2021 - trikzon: - Add barrels and barrels/wooden block and item tag (#7676) - -========= -Build: 1.16.5-36.1.15 - Fri Apr 30 17:52:19 GMT 2021 - knightminer: - Fix shears not properly breaking tripwire (MC-129055) (#7718) - -========= -Build: 1.16.5-36.1.14 - Fri Apr 30 17:42:34 GMT 2021 - cpw: - try gradleVersion - - cpw: - trim? - - cpw: - toString? - - cpw: - fiddle - - cpw: - split ? - - cpw: - try better? - - cpw: - with - - cpw: - debug - - cpw: - debug - - cpw: - debug - - cpw: - debug - - cpw: - tokenize - - cpw: - map - - cpw: - trims - - cpw: - tidy - - cpw: - try passing in env - - cpw: - try passing in env - - s8johost: - Fix Line endings in tooltips not handled properly in multiplayer screen Closes #7738 (#7739) - -========= -Build: 1.16.5-36.1.13 - Fri Apr 23 20:28:12 GMT 2021 - shroomdog27: - Fix cats, phantoms and pillagers saying they're at BlockPos.ZERO during LivingSpawnEvent.CheckSpawn (#7722) - -========= -Build: 1.16.5-36.1.12 - Fri Apr 23 05:59:08 GMT 2021 - xfacthd: - Pass BlockPos to BlockParticleData used for "fall impact" particle (#7705) - - mrp-v2: - [1.16] Add missing Multipart Blockstate Builder feature: Nested condition groups (#7677) - -========= -Build: 1.16.5-36.1.10 - Fri Apr 23 05:52:41 GMT 2021 - sciwhiz12: - Check version ranges of optional dependencies when present (#7710) - - If an optional dependency is present, but it does not conform to the version range, - it will now error out in the same fashion as missing required dependencies, instead - of a more cryptic error down the line due to a missing method/class/field/etc. - - Implements and closes #7696 - -========= -Build: 1.16.5-36.1.9 - Fri Apr 23 05:45:51 GMT 2021 - diesieben07: - Fix ClientVisualization crashing on systems without monitors (#7719) - -========= -Build: 1.16.5-36.1.8 - Fri Apr 23 05:34:56 GMT 2021 - atkarimarton: - Fix Furnace Minecarts going faster then vanilla (#7725) - -========= -Build: 1.16.5-36.1.7 - Fri Apr 23 05:28:36 GMT 2021 - ateranimavis: - Update for Forge's new maven (#7723) - -========= -Build: 1.16.5-36.1.6 - Sun Apr 18 15:47:08 GMT 2021 - cpw: - A bloody quote FFS - - Signed-off-by: cpw - - cpw: - Update for new maven - - Signed-off-by: cpw - -========= -Build: 1.16.5-36.1.4 - Fri Apr 02 18:31:07 GMT 2021 - cpw: - Fix broken java9hacks for j16 handling.. - - Signed-off-by: cpw - -========= -Build: 1.16.5-36.1.3 - Tue Mar 30 01:05:30 GMT 2021 - sizableshrimp: - Add generic EntityTeleportEvent (#7694) - -========= -Build: 1.16.5-36.1.2 - Mon Mar 22 06:24:40 GMT 2021 - covers1624: - Restore SS version, fixes findFieldInstanceChecks - -========= -Build: 1.16.5-36.1.1 - Wed Mar 17 17:04:46 GMT 2021 - diesieben07: - Fix sign textures being stitched onto every texture atlas (#7690) - -========= -Build: 1.16.5-36.1.0 - Mon Mar 15 22:11:58 GMT 2021 - lexmanos: - Fix AT order, missed exec line and bump for RB. - -========= -Build: 1.16.5-36.0.63 - Mon Mar 15 21:08:56 GMT 2021 - diesieben07: - Fix wrong eye height when entity size changes (esp. baby animals) (#7628) - -========= -Build: 1.16.5-36.0.62 - Mon Mar 15 21:02:36 GMT 2021 - diesieben07: - Allow ITeleporter to override the vanilla teleport sound (#7682) - -========= -Build: 1.16.5-36.0.61 - Mon Mar 15 20:20:21 GMT 2021 - sizableshrimp: - Fix datapack exception related to EnumArgument with siblings (#7686) - - Invalid enum constants are now properly thrown as a CommandSyntaxException - -========= -Build: 1.16.5-36.0.60 - Mon Mar 15 19:29:01 GMT 2021 - 42383791+kaydogz: - Add support for custom WoodTypes (#7623) - -========= -Build: 1.16.5-36.0.59 - Mon Mar 15 19:19:16 GMT 2021 - lexmanos: - Use JGit instead of GrGit now that jcenter is going away. - Update missed mapped name in MDK. - -========= -Build: 1.16.5-36.0.58 - Sat Mar 13 19:07:24 GMT 2021 - diesieben07: - Fix incorrectly replaced SRG names - - gigaherz: - Fix yet another copypasta. - - gigaherz: - Bump nashorn wrapper version. - -========= -Build: 1.16.5-36.0.55 - Fri Mar 12 18:51:48 GMT 2021 - ateranimavis: - Fix potential Deadlock when using custom Item entities. (#7532) - - Be careful when adding Entities during Chunk Load (#7519) - -========= -Build: 1.16.5-36.0.54 - Fri Mar 12 02:04:32 GMT 2021 - gigaherz: - Fix copypasta. - -========= -Build: 1.16.5-36.0.53 - Fri Mar 12 00:11:22 GMT 2021 - curle: - Automatically fix some issues with configurations deemed invalid for simple reasons (#7671) - -========= -Build: 1.16.5-36.0.52 - Thu Mar 11 20:59:54 GMT 2021 - gigaherz: - Introduce a new feature that lets mods know if optional mods and optional network channels are present in the remote. - Allow connections from forge versions that don't have the vanilla splitter. - - gigaherz: - Bulk update license year, and use replacement variable so that the current year is always used. - - gigaherz: - Bump SpecialSource - - gigaherz: - Add coremod that injects bouncer methods to work around name conflicts with official names. - Fixes a binary break. - -========= -Build: 1.16.5-36.0.48 - Tue Mar 09 22:22:20 GMT 2021 - lexmanos: - Update to FG4, and Gradle 6.8. - - lexmanos: - Regenerate patches with relative headers. This should lower conflicts in future PRs. - Convert Forge to use Official mappings. - Mojang released their obfuscation mappings but we have not used them up until now due to wanting to get their license to be more explicitly permissive. - It is clear that their intent is to allow us to use their names for developing mods like this. - See the full wording, and our interpretation here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md - -========= -Build: 1.16.5-36.0.46 - Thu Mar 04 20:15:10 GMT 2021 - diesieben07: - Support splitting vanilla packets that are too large on forge<->forge connections (#7485) - - Currently only for SUpdateRecipesPacket and STagsListPacket that blow up with huge datapacks - -========= -Build: 1.16.5-36.0.45 - Wed Mar 03 20:50:47 GMT 2021 - pupnewfster: - Fix a few places where the vanilla method was being called instead of the forge one (#7535) - - Cleanup javadocs references slightly, fix a couple spots not using the proper forge hooks, and remove a couple unneeded patches - Update deprecation comment on isAir - -========= -Build: 1.16.5-36.0.44 - Wed Mar 03 05:29:04 GMT 2021 - firecontroller1847: - Add Opacity to ForgeHooksClient#renderMainMenu (#7660) - -========= -Build: 1.16.5-36.0.43 - Thu Feb 25 02:37:09 GMT 2021 - oriondevelopment: - Add support for caching of configuration values. (#7608) - -========= -Build: 1.16.5-36.0.42 - Tue Feb 16 02:43:01 GMT 2021 - kovac1066: - Added entity attribute setup and creation events - -========= -Build: 1.16.5-36.0.41 - Tue Feb 16 01:28:51 GMT 2021 - knightminer: - Fix updateItemStackNBT not properly being called (#7646) - - Re-added ItemStack delegate redirect transformer - -========= -Build: 1.16.5-36.0.40 - Tue Feb 16 01:08:21 GMT 2021 - pupnewfster: - Fix a few FluidUtil issues that were causing DispenseFluidContainer to not function properly (#7422) - -========= -Build: 1.16.5-36.0.39 - Tue Feb 16 00:49:27 GMT 2021 - daemonumbra: - Fixed Configs not correcting when hot-loaded from changes on disk (#7427) - - ichttt: - Add a way to specify a custom background texture with namespaces in the Creative GUI. (#7404) - -========= -Build: 1.16.5-36.0.37 - Tue Feb 16 00:39:15 GMT 2021 - xzk0701: - Reduce default logging markers in the MDK. Modders can re-enable these for better debugging. (#7432) - - Modders PLEASE read your damn log, and fix the errors we point out. Spamming modpacks with stack traces is just lazy programming. - -========= -Build: 1.16.5-36.0.36 - Tue Feb 16 00:19:30 GMT 2021 - sciwhiz12: - Deprecate Forge's setdimension command, vanilla execute command can do this now. (#7459) - -========= -Build: 1.16.5-36.0.35 - Mon Feb 15 23:38:35 GMT 2021 - spb.max2: - Fix ItemTextureQuadConverter.convertTexture generating wrong quads, fixes #7620 (#7650) - -========= -Build: 1.16.5-36.0.34 - Mon Feb 15 23:22:40 GMT 2021 - florian: - Added MultipartBakedModel.getModelData(). (#7595) - - This allows custom IBakedModel implementations to use the IModelData provided by their IBakedModel.getModelData() when used in the context of a multipart model. - -========= -Build: 1.16.5-36.0.33 - Mon Feb 15 23:15:50 GMT 2021 - cyborgmas: - fix global cache not being a block render type (#7648) - -========= -Build: 1.16.5-36.0.32 - Mon Feb 15 22:52:15 GMT 2021 - 35673674+alcatrazescapee: - Allow mods to use additional custom LootParameter when querying existing loot tables (#7515) - -========= -Build: 1.16.5-36.0.31 - Mon Feb 15 21:40:16 GMT 2021 - shroomdog27: - Add ForgeHooks.canEntitySpawn to Cat, Phantom, and Patrol spawners. (#7569) - -========= -Build: 1.16.5-36.0.30 - Mon Feb 15 21:26:11 GMT 2021 - dev: - Fix/Replace player visibility event (#7573) - -========= -Build: 1.16.5-36.0.29 - Mon Feb 15 21:16:26 GMT 2021 - ateranimavis: - Fix: Clear the last error from glfwInit to prevent vanilla from throwing an exception later in the chain when glfw errors. (#7587) - -========= -Build: 1.16.5-36.0.28 - Mon Feb 15 20:56:51 GMT 2021 - 55965249+seymourimadeit: - Fix MC-181464 persisting for modded shields (#7602) - -========= -Build: 1.16.5-36.0.27 - Mon Feb 15 20:11:46 GMT 2021 - malte0811: - FIx race condition in LazyOptional (#7611) - -========= -Build: 1.16.5-36.0.26 - Mon Feb 15 03:16:02 GMT 2021 - xfacthd: - [1.16.5] Fix shaders breaking almost every overlay that uses textures, fixes #7575 (#7624) - -========= -Build: 1.16.5-36.0.25 - Mon Feb 15 03:10:24 GMT 2021 - telepathicgrunt: - Disable syncing of Feature and Biome registries (#7639) - -========= -Build: 1.16.5-36.0.24 - Mon Feb 15 03:04:46 GMT 2021 - drullkus: - Add IExtensibleEnum to GrassColorModifier (#7641) - -========= -Build: 1.16.5-36.0.23 - Mon Feb 15 02:36:26 GMT 2021 - shroomdog27: - Log stacktraces in NettyPacketEncoder. (#7654) - -========= -Build: 1.16.5-36.0.22 - Wed Feb 10 19:05:16 GMT 2021 - xfacthd: - Lower logging level for datafixer warning to debug (#7636) - -========= -Build: 1.16.5-36.0.21 - Tue Feb 09 22:19:29 GMT 2021 - pupnewfster: - Reintroduce forge's chunk manager to allow mods to force chunks with either a block position or entity (UUID) "owner" and have them properly persist between restarts (#7642) - -========= -Build: 1.16.5-36.0.20 - Tue Feb 09 21:28:24 GMT 2021 - pupnewfster: - Fix two places where querying an object for the new "valid" capability from a capability invalidation listener could cause the object to return the old invalid capability. (#7643) - -========= -Build: 1.16.5-36.0.19 - Tue Feb 09 21:21:44 GMT 2021 - cyborgmas: - Fix config spec in cases of enum class discrepancies (#7635) - -========= -Build: 1.16.5-36.0.18 - Tue Feb 09 21:06:36 GMT 2021 - diesieben07: - Fix onBlockAdded being called twice for ItemEntity placing non-TE blocks (#7607) - -========= -Build: 1.16.5-36.0.17 - Tue Feb 09 21:00:57 GMT 2021 - lachney: - Prevent NullPointerException when adding new loot pool. (#7605) - -========= -Build: 1.16.5-36.0.16 - Tue Feb 09 20:53:48 GMT 2021 - brandon4261: - Added generic multi part entity API (#7554) - -========= -Build: 1.16.5-36.0.15 - Sun Feb 07 03:41:41 GMT 2021 - cyborgmas: - Fix IAngerable entities crashing when reading nbt on client (#7618) - -========= -Build: 1.16.5-36.0.14 - Tue Feb 02 20:28:08 GMT 2021 - thesilkminer: - [1.16.x] Add loot table ID in Global Loot Modifiers (#7428) - - thesilkminer: - [1.16.x] Add loot table ID in Global Loot Modifiers (#7428) - -========= -Build: 1.16.5-36.0.13 - Sat Jan 30 02:07:17 GMT 2021 - pupnewfster: - Add a block tag to allow mods to blacklist blocks endermen should not be able to place blocks on top of, similar to how vanilla hardcodes against them being able to place things on bedrock (#7548) - -========= -Build: 1.16.5-36.0.12 - Sat Jan 30 02:01:35 GMT 2021 - 7419378+hellfirepvp: - Fix translucent model parts of MultiLayerModels rendering as missing models due to differing rendertypes when rendering block model (#7579) - - Signed-off-by: HellFirePvP <7419378+HellFirePvP@users.noreply.github.com> - -========= -Build: 1.16.5-36.0.11 - Sat Jan 30 01:35:10 GMT 2021 - pupnewfster: - Fix existing file tag provider support looking in the wrong folder for custom tag types (#7576) - -========= -Build: 1.16.5-36.0.10 - Thu Jan 28 21:07:30 GMT 2021 - cyborgmas: - Propery re-encode registries (#7629) - -========= -Build: 1.16.5-36.0.9 - Thu Jan 28 01:23:13 GMT 2021 - cyborgmas: - Properly encode registries. (#7626) - -========= -Build: 1.16.5-36.0.8 - Thu Jan 28 00:00:43 GMT 2021 - cyborgmas: - Inject vanilla dimensions inside worlds missing them (#7599) - -========= -Build: 1.16.5-36.0.7 - Wed Jan 27 00:32:53 GMT 2021 - lexmanos: - Update Coremods, ASM, and include standalone Nashorn to load on J15. - - lexmanos: - Introduce a new field_to_instanceof transformer to reduce some simple patches. - -========= -Build: 1.16.5-36.0.4 - Tue Jan 26 02:53:10 GMT 2021 - lexmanos: - Fix broken build. - - dev: - Add modded biomes to overworld biome list (#7360) - -========= -Build: 1.16.5-36.0.2 - Tue Jan 26 02:25:10 GMT 2021 - lexmanos: - Fix dynamic registries not getting ids assigned correctly from old worlds in specific unordered value insertions. Closes #7586 - -========= -Build: 1.16.5-36.0.1 - Sun Jan 17 21:05:36 GMT 2021 - knightminer: - Optionally add a milk fluid to the vanilla bucket (#7294) - - Fixes the previous broken code that was supposed to make mod registered milk returned by the vanilla bucket by allowing mods to enable a milk fluid. - -========= -Build: 1.16.5-36.0.0 - Fri Jan 15 19:42:24 GMT 2021 - lexmanos: - 1.16.5 Initial Update. - -========= -Build: 1.16.4-35.1.37 - Thu Jan 14 23:58:35 GMT 2021 - lexmanos: - Update Coremods, ASM, and include standalone Nashorn to load on J15. - -========= -Build: 1.16.4-35.1.36 - Thu Jan 07 20:24:49 GMT 2021 - rehwinkel: - Added IWeatherParticleRenderHandler to allow a mod to take control over weather particles and sounds. (#7522) - -========= -Build: 1.16.4-35.1.35 - Thu Jan 07 20:16:03 GMT 2021 - covers1624: - Allow Chunk loading Tickets to opt-into forcing chunk ticks. (#7525) - -========= -Build: 1.16.4-35.1.34 - Thu Jan 07 20:10:18 GMT 2021 - malte0811: - Fix crash when mods add goals to skeleton horses (MC-206338) (#7509) - -========= -Build: 1.16.4-35.1.33 - Thu Jan 07 20:03:59 GMT 2021 - diesieben07: - Set WM_CLASS and WM_INSTANCE_NAME for early progress window (#7534) - -========= -Build: 1.16.4-35.1.32 - Wed Jan 06 03:17:35 GMT 2021 - 35673674+alcatrazescapee: - Make UnboundedMapCodec more lenient in decoding dimensions. Fixes MC-197860 (#7527) - -========= -Build: 1.16.4-35.1.31 - Tue Jan 05 19:59:52 GMT 2021 - lexmanos: - Prevent NPE and deprecated MissingMappings.getMappings function. Closes #6252 - - lexmanos: - Fix FML's Config Sync packet not allowing same length filenames in encoder and decoder. Closes #7584 - -========= -Build: 1.16.4-35.1.29 - Sun Jan 03 11:02:59 GMT 2021 - lexmanos: - Fix entities not correctly being able to be ridden under water. - -========= -Build: 1.16.4-35.1.28 - Mon Dec 28 21:56:51 GMT 2020 - git: - Fix crash when beehive is broken by fake player (#7566) - -========= -Build: 1.16.4-35.1.27 - Mon Dec 28 21:46:04 GMT 2020 - 35673674+alcatrazescapee: - Add supplier variant to `AbstractBlock.Properties#lootFrom` (#7563) - -========= -Build: 1.16.4-35.1.26 - Mon Dec 28 21:40:18 GMT 2020 - diesieben07: - Fix missing serializers when deserializing global loot modifiers (#7561) - - diesieben07: - Fix ModFileResourcePack.getAllResourceLocations ignoring resourceNamespace. (#7562) - - Fixes #7405 - -========= -Build: 1.16.4-35.1.24 - Mon Dec 28 21:34:39 GMT 2020 - diesieben07: - Fix VanillaConnectionNetworkFilter sending out invalid entity properties packets without an entity ID (#7560) - -========= -Build: 1.16.4-35.1.23 - Mon Dec 28 21:17:01 GMT 2020 - richard: - Make shear interactions extend to subclasses (#7544) - -========= -Build: 1.16.4-35.1.22 - Mon Dec 28 21:09:38 GMT 2020 - sciwhiz12: - Add a SoundType subclass that uses suppliers (#7538) - -========= -Build: 1.16.4-35.1.21 - Mon Dec 28 21:03:56 GMT 2020 - sciwhiz12: - Fix compound ingredient in shapeless recipes (#7537) Fixes #7530 - -========= -Build: 1.16.4-35.1.20 - Mon Dec 28 20:19:04 GMT 2020 - mrp-v2: - Fix modded PointOfInterestType's not populating blockstate map when registered (#7503) - - 35673674+alcatrazescapee: - Fix potential NPE in ForgeHooks.onItemPlaceIntoWorld when passing in null player. (#7505) - -========= -Build: 1.16.4-35.1.18 - Mon Dec 28 20:13:15 GMT 2020 - 48399898+poopoodice: - Add new LivingConversionEvent to control mobs turning into other mobs. (#7386) - -========= -Build: 1.16.4-35.1.17 - Mon Dec 28 20:01:42 GMT 2020 - knightminer: - Add ItemAttributeModifierEvent (#7484) - -========= -Build: 1.16.4-35.1.16 - Mon Dec 28 19:54:38 GMT 2020 - bward7864: - Fix RightClickBlock ALLOW not being implemented (#7426) - -========= -Build: 1.16.4-35.1.15 - Sat Dec 26 19:39:35 GMT 2020 - lexmanos: - Make mod data packs able to be disabled. It'll break things, but that's on you. Closes #6776 - - lexmanos: - Quiet down errors related to modders not changing their update urls from the default. - -========= -Build: 1.16.4-35.1.13 - Sat Dec 12 17:34:07 GMT 2020 - tterrag: - Add generated resource tracking to ExistingFileHelper - -========= -Build: 1.16.4-35.1.12 - Fri Dec 11 02:39:41 GMT 2020 - tterrag: - Fix BlockStateProvider item models not knowing about block models - - Add tests for this case - -========= -Build: 1.16.4-35.1.11 - Tue Dec 08 19:54:40 GMT 2020 - richard: - Override invalidateCaps instead of remove for vanilla TE capability invalidation (#7536) - - Properly invalidate patched in vanilla TE caps in invalidateCaps instead of remove so that they get invalidated on chunk unload - -========= -Build: 1.16.4-35.1.10 - Sat Dec 05 20:07:14 GMT 2020 - richard: - Make TEs invalidate capabilities when the chunk they are in unloads (#7529) - - Fixed LazyOptional potentially notifying invalidation listeners multiple times. - -========= -Build: 1.16.4-35.1.9 - Sat Dec 05 20:01:00 GMT 2020 - cordonfreeman: - Fixed entity navigation to stop entities spinning - MC-94054 (#7520) - -========= -Build: 1.16.4-35.1.8 - Sat Dec 05 19:52:56 GMT 2020 - Unbekannt1998: - Fix wrong function call in BlockStateProvider::horizontalFaceBlock (#7514) - -========= -Build: 1.16.4-35.1.7 - Sun Nov 29 02:11:08 GMT 2020 - tterrag: - Fix datagen order of multipart conditions being unstable - -========= -Build: 1.16.4-35.1.6 - Sat Nov 28 02:56:55 GMT 2020 - 35673674+alcatrazescapee: - Fix forge config option for default world type not applying unless you change the default world type (#7521) - -========= -Build: 1.16.4-35.1.5 - Fri Nov 27 23:57:23 GMT 2020 - gigaherz: - Implement feature for mods to define new world types (#7448) - - * Mods can now register world types via a new forge registry, and optionally register a settings screen to tweak them. - * The default world type for dedicated servers and singleplayer world creation is configurable via forge's common config. - -========= -Build: 1.16.4-35.1.4 - Tue Nov 24 17:14:21 GMT 2020 - csh2001331: - Fix dimType not encode to registries (#7513) - -========= -Build: 1.16.4-35.1.3 - Mon Nov 23 03:45:21 GMT 2020 - richard: - Add support for referencing forge's resources and specifying existing mods to data generators (#7456) - -========= -Build: 1.16.4-35.1.2 - Sun Nov 22 22:01:29 GMT 2020 - cpw: - Fix #6692 - - Thanks @AterAnimAvis for help and suggestions - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.1.1 - Sat Nov 21 19:57:45 GMT 2020 - cyborgmas: - Fix translucent blocks not rendering properly when moved by pistons on fabulous (#7441) - -========= -Build: 1.16.4-35.1.0 - Fri Nov 20 20:54:30 GMT 2020 - lexmanos: - Bump version for RB. - -========= -Build: 1.16.4-35.0.22 - Fri Nov 20 18:24:46 GMT 2020 - 35673674+alcatrazescapee: - Fix MC-194811 - Removing structures causes chunk save errors. - - diesieben07: - Fix food bar not rendering when non-living entities are mounted (#7446) - -========= -Build: 1.16.4-35.0.20 - Fri Nov 20 18:18:37 GMT 2020 - diesieben07: - Fix concurrency issue in StartupMessageManager (#7483) - -========= -Build: 1.16.4-35.0.19 - Fri Nov 20 18:11:25 GMT 2020 - 35673674+alcatrazescapee: - Fix forge registry types that have private constructors (BlockStateProviderType, BlockPlacerType, FoliagePlacerType, TreeDecoratorType) (#7482) - -========= -Build: 1.16.4-35.0.18 - Sun Nov 15 16:08:55 GMT 2020 - cpw: - Fix problem where the absence of forge and MC in later loading triggered a weird crash. - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.0.17 - Sat Nov 14 01:41:38 GMT 2020 - cpw: - Fix NPE problem when modid is mismatched. - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.0.16 - Sat Nov 14 00:18:29 GMT 2020 - cpw: - Return the processed modlist data to the upstream system, not the raw unprocessed data. Should resolve the problem - that mixin complains about missing info when it's in a "crashed" situation. - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.0.15 - Wed Nov 11 09:09:45 GMT 2020 - cyborgmas: - Fix dims on servers not loading the first run (#7445) - -========= -Build: 1.16.4-35.0.14 - Tue Nov 10 20:24:33 GMT 2020 - diesieben07: - Allow for custom argument types by filtering them on vanilla connections (#7463) - -========= -Build: 1.16.4-35.0.13 - Tue Nov 10 20:13:34 GMT 2020 - bward7864: - Add Player context to AnvilUpdateEvent (#7442) - -========= -Build: 1.16.4-35.0.12 - Tue Nov 10 20:02:33 GMT 2020 - git: - Don't overwrite PlayerAdvancement's player with a fake one (#7454) - - If a FakePlayer is constructed with the same UUID/GameProfile as a - currently active player, the player object within PlayerAdvancement is - set to the fake player. - - As fake players cannot receive advancements (see grantCriterion), this - prevents the actual player from receiving any advancements until they - change dimension/relog. - -========= -Build: 1.16.4-35.0.11 - Tue Nov 10 19:46:01 GMT 2020 - curle: - Add BannerBlock.forColor to SAS to fix banner.toItem() on servers. - -========= -Build: 1.16.4-35.0.10 - Tue Nov 10 19:36:40 GMT 2020 - boy132: - Call Harvest check event even if the block doesn't require any tool (#7414) - -========= -Build: 1.16.4-35.0.9 - Tue Nov 10 19:25:26 GMT 2020 - lexmanos: - Use linked collections to stabilize order when adding new registry entries. - - xfacthd: - Render local player when the renderViewEntity is not the local player (#7216) - -========= -Build: 1.16.4-35.0.7 - Sun Nov 08 04:12:02 GMT 2020 - cpw: - Some help in ExtensionPoint regarding DISPLAYTEST. Let's improve those tick rates! - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.0.6 - Sun Nov 08 03:30:37 GMT 2020 - cpw: - Handle erroring during early mod construction phases, and actually report that into the error UI - by doing armslength exception handling and propagation. - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.0.5 - Sun Nov 08 01:48:22 GMT 2020 - cpw: - Support backwards loading 1.16.3 mods in 1.16.4, because we are able to do that. Tweak loading a bit to be smarter about dependency errors of various kinds. - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.0.4 - Sat Nov 07 20:10:44 GMT 2020 - gigaherz: - Add FluidStack codec, and a test mod that verifies its behaviour matches the existing write/read logic. - Add missing license headers. - -========= -Build: 1.16.4-35.0.3 - Sat Nov 07 02:11:47 GMT 2020 - cpw: - Update event bus version (should be 3.0.5) - - Tweak MDK to automatically populate recommended values for things like forge version, loader version and minecraft version. - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.0.2 - Wed Nov 04 00:07:58 GMT 2020 - diesieben07: - Workaround for modded attributes on vanilla entities logging warnings on vanilla clients - - Switch to a handler-based approach per packet class, simplify patch, add some docs - - Add license header and docs - - Switch to a network handler based approach - - Switch to a network handler based approach - - revert build gradle change - - Simplify Packet patch - - Add license header to IForgePacket - - Revert ForgeHooks changes - - Less hacky and more generic way to filter packets for vanilla connections - - _Actually_ Order SAS. - It's early - - Order SAS - - simplify vanilla connection check - - Remove unneeded import change - -========= -Build: 1.16.4-35.0.1 - Mon Nov 02 19:57:45 GMT 2020 - cpw: - Fix early sorting bug that meant the file deduping was causing an error, to, well, not cause it, so we can get to an error screen. - - Signed-off-by: cpw - -========= -Build: 1.16.4-35.0.0 - Mon Nov 02 19:15:50 GMT 2020 - lexmanos: - 1.16.4 Initial Update - -========= -Build: 1.16.3-34.1.42 - Mon Nov 02 04:30:53 GMT 2020 - lexmanos: - Fix Biomes not properly copying over ids loaded from the save to the new Dynamic Registry. - -========= -Build: 1.16.3-34.1.41 - Mon Nov 02 01:09:57 GMT 2020 - gigaherz: - Introduce custom loader additions to the model data generators. (#7450) - - Currently implemented loaders: - * OBJ - * Composite - * Multi-layer - * Item layers (vanilla item/generated but with fullbright texture support) - * Bucket - * Separate Perspective - -========= -Build: 1.16.3-34.1.40 - Mon Nov 02 00:52:12 GMT 2020 - cpw: - actually rollback on error in registry events. - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.39 - Sun Nov 01 22:09:32 GMT 2020 - cpw: - Update modlauncher. fixes #7452 - - Signed-off-by: cpw - - cpw: - Return client resources even if no data pack found on server. Closes #6225 (Pull request) - - Signed-off-by: cpw - - tobias.hotz: - Auto-detect ansi support for log4j2 - - move to fml.loading subpackage - - Add license header - - cpw: - Fix config parse failure causing crash in building exception message. fixes #7438 - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.35 - Thu Oct 29 17:09:31 GMT 2020 - malte0811: - Fix (NonNull)Lazy.Concurrent using a global lock (#7403) - - * Fix Lazy.Concurrent using a global lock, thus preventing multiple threads from resolving independent Lazy's at the same time - * Use Lazy with an added null check to implement NonNullLazy - -========= -Build: 1.16.3-34.1.34 - Thu Oct 29 00:12:09 GMT 2020 - gigaherz: - Update forge mappings to 20201028-1.16.3 (#7435) - -========= -Build: 1.16.3-34.1.33 - Tue Oct 27 16:01:02 GMT 2020 - 35673674+alcatrazescapee: - Fix breaking changes from the Biome rename PR #7434 (#7439) - -========= -Build: 1.16.3-34.1.32 - Mon Oct 26 23:52:47 GMT 2020 - sciwhiz12: - Reimplement nametag distance attribute, fix attribute translation keys (#7387) - -========= -Build: 1.16.3-34.1.31 - Mon Oct 26 22:07:02 GMT 2020 - 35673674+alcatrazescapee: - Fix data pack biomes failing to load in SingleBiomeProvider (#7434) - -========= -Build: 1.16.3-34.1.30 - Mon Oct 26 22:00:28 GMT 2020 - cpw: - Add in proper handling of equals and hashcode for modjar urls. Fixes very slow loading on windows. - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.29 - Mon Oct 26 12:51:24 GMT 2020 - cpw: - Force 8.0.5 ML - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.28 - Mon Oct 26 11:32:40 GMT 2020 - cpw: - Restore FingerprintViolationEvent with appropriate THIS IS F*CKING DEAD DELET WARNINGS. - Also, notify in UI if using legacy JDK without capability to read out security data from mod jars. - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.27 - Mon Oct 26 02:27:48 GMT 2020 - cpw: - Rollback registries to vanilla state if something happens during loading, so subsequent activities can still run and not generate false reports.. - - Signed-off-by: cpw - - cpw: - Add signature reporting for mods, using new signature capture from ModLauncher. Need to figure out - how to reflect Minecraft's JAR signatures into here. - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.25 - Tue Oct 20 19:32:40 GMT 2020 - lexmanos: - Fix mcp_snapshot mapping issue causing unneeded patches. Closes #7424 - -========= -Build: 1.16.3-34.1.24 - Tue Oct 20 11:26:03 GMT 2020 - gigaherz: - Fix resource leak in the OBJ loader. - -========= -Build: 1.16.3-34.1.23 - Fri Oct 16 19:10:02 GMT 2020 - djbake101: - Fix issue with ITeleporter allowing easier use of vanilla logic. (#7317) - -========= -Build: 1.16.3-34.1.22 - Thu Oct 15 19:49:26 GMT 2020 - richard: - Adds tag support for Enchantments, Potions, and TileEntityTypes (#7379) - -========= -Build: 1.16.3-34.1.21 - Thu Oct 15 19:43:33 GMT 2020 - lexmanos: - Resuscitate BiomeDictionary using RegistryKeys instead of biome references. - -========= -Build: 1.16.3-34.1.20 - Thu Oct 15 17:15:15 GMT 2020 - ocelot5836: - Add event for player changing game mode (#7355) - -========= -Build: 1.16.3-34.1.19 - Mon Oct 12 18:11:22 GMT 2020 - cpw: - Fix RCON multipacket responses not actually understanding UTF8. - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.18 - Mon Oct 12 01:49:09 GMT 2020 - cpw: - Fix RCON not sending newlines in output for multiline. Fixes https://bugs.mojang.com/browse/MC-7569, a very old bug that is really annoying if you use RCON. - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.17 - Sat Oct 10 16:45:26 GMT 2020 - championash5357: - Fix Texture Presence String (#7408) - -========= -Build: 1.16.3-34.1.16 - Fri Oct 09 19:57:26 GMT 2020 - lexmanos: - Fix typo causing potential error in vine growth. Closes #7406 - Sort missing registry dumps by name, making it easier to read. - -========= -Build: 1.16.3-34.1.15 - Fri Oct 09 13:58:36 GMT 2020 - gigaherz: - Fixed conditional advancement loading when using the "advancements" array. - Added automatic generation of conditional advancements from the criteria in the conditional recipe entries. - Added advancement name calculation from the recipe ID. - -========= -Build: 1.16.3-34.1.14 - Thu Oct 08 21:08:45 GMT 2020 - 32142731+flanks255: - Additions to the mdk build.gradle to accommodate datagens. (#7398) - -========= -Build: 1.16.3-34.1.13 - Thu Oct 08 21:02:59 GMT 2020 - daemonumbra: - Added Basic Class-Level SAS Capability to checkSAS, added Vector4f to SAS (#7385) - -========= -Build: 1.16.3-34.1.12 - Wed Oct 07 20:04:11 GMT 2020 - richard: - Add hooks to allow modification of structures spawn lists (#7344) - -========= -Build: 1.16.3-34.1.11 - Tue Oct 06 19:38:36 GMT 2020 - richard: - Add back patches to Screen allowing for item tooltips to be auto wrapped again (#7378) - - Only deals with the methods receiving an ItemStack or ITextComponent(s), the methods that take IReorderingProcessor(s) are left alone. - -========= -Build: 1.16.3-34.1.10 - Mon Oct 05 14:34:56 GMT 2020 - adam: - Bump mixin version to 0.8.2 - -========= -Build: 1.16.3-34.1.9 - Mon Oct 05 10:30:12 GMT 2020 - cpw: - Remove redundant call to CrashReport generator - Vanilla is doing a crashreport for itself at startup now. - - Add a UUID into crashreport that is also logged in all channels at crash report generation time. This will allow to associate crash reports and the logs. - - Signed-off-by: cpw - - cpw: - Add in extra debug logging - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.7 - Sun Oct 04 19:51:37 GMT 2020 - cpw: - Modify how ModLoadingStage handles dispatch to Registry Events. Stops the objectholder spam and generally improves performance on larger packs. - - Signed-off-by: cpw - - cpw: - Fix doc README and answer lex's question - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.1.5 - Fri Oct 02 23:40:14 GMT 2020 - daemonumbra: - Added "Bukkit Plugin" to InvalidModIdentifier (#7384) - -========= -Build: 1.16.3-34.1.4 - Fri Oct 02 23:34:26 GMT 2020 - richard: - Fix vanilla Campfire smoke bug. MC-201374 (#7381) - -========= -Build: 1.16.3-34.1.3 - Fri Oct 02 23:28:31 GMT 2020 - sciwhiz12: - Fix toggleable keybindings still being active while in GUI Fixes #7370 (#7373) - -========= -Build: 1.16.3-34.1.2 - Fri Oct 02 22:06:59 GMT 2020 - dev: - Fix modded EntityClassifications not being useable in the codec. (#7337) - -========= -Build: 1.16.3-34.1.1 - Mon Sep 28 18:02:11 GMT 2020 - cech12: - Support effective materials of vanilla AxeItem (#7351) - -========= -Build: 1.16.3-34.1.0 - Thu Sep 24 07:05:13 GMT 2020 - lexmanos: - Prep new RB. - -========= -Build: 1.16.3-34.0.21 - Thu Sep 24 06:46:57 GMT 2020 - ichttt: - Fix grass disappearing when alwaysSetupTerrainOffThread is true (#7291) - -========= -Build: 1.16.3-34.0.20 - Thu Sep 24 06:41:41 GMT 2020 - 35673674+alcatrazescapee: - Accessors for inspecting and removal of biome generation settings. Fixed carvers still being immutable. (#7339) - -========= -Build: 1.16.3-34.0.19 - Thu Sep 24 06:36:25 GMT 2020 - lexmanos: - Revive BiomeManager and BiomeLayer hooks. - -========= -Build: 1.16.3-34.0.18 - Thu Sep 24 03:12:19 GMT 2020 - richard: - Fix a few minor issues with custom tag types and fix OptionalNamedTags (#7316) - -========= -Build: 1.16.3-34.0.17 - Wed Sep 23 22:10:11 GMT 2020 - diesieben07: - Fix ToggleableKeyBinding differences to vanilla. (#7338) - -========= -Build: 1.16.3-34.0.16 - Wed Sep 23 21:34:47 GMT 2020 - yunus1903: - Updated build badge versions to 1.16.3 in readme (#7325) - - diesieben07: - Fix forge light pipeline applying block offsets twice (#7323) - -========= -Build: 1.16.3-34.0.14 - Wed Sep 23 21:16:46 GMT 2020 - ichttt: - Add a better license error screen (#7350) - -========= -Build: 1.16.3-34.0.13 - Tue Sep 22 19:14:17 GMT 2020 - darklime: - Fixed container item being consumed in brewing stand. #7307 (#7314) - -========= -Build: 1.16.3-34.0.12 - Tue Sep 22 19:06:10 GMT 2020 - sciwhiz12: - Fix parse results of CommandEvent being disregarded (#7303) - -========= -Build: 1.16.3-34.0.11 - Tue Sep 22 18:58:28 GMT 2020 - 17338378+nightenom: - [1.16] Fix possible crash when using rendering regionCache (#7207) - -========= -Build: 1.16.3-34.0.10 - Tue Sep 22 18:41:16 GMT 2020 - 35673674+alcatrazescapee: - [1.16] Reimplement ICloudRenderHandler, ISkyRenderHandler and IWeatherRenderHandler (#6994) - -========= -Build: 1.16.3-34.0.9 - Fri Sep 18 00:58:08 GMT 2020 - 35673674+alcatrazescapee: - Make Biome.Climate and BiomeAmbiance fields accessible (#7336) - -========= -Build: 1.16.3-34.0.8 - Thu Sep 17 20:42:53 GMT 2020 - cpw: - Use mixin 0.8.1. Should fix problems with mixin not working properly with latest modlauncher. - - Signed-off-by: cpw - -========= -Build: 1.16.3-34.0.7 - Tue Sep 15 20:07:25 GMT 2020 - sebastian: - Sets the empty/fill sounds for vanilla fluids. - Use Fluid's fillSound rather than emptySound when filling buckets. - -========= -Build: 1.16.3-34.0.6 - Tue Sep 15 19:47:08 GMT 2020 - cyborgmas: - Add MatrixStack-aware alternatives to the methods in GuiUtils (#7127) - -========= -Build: 1.16.3-34.0.5 - Tue Sep 15 16:51:58 GMT 2020 - thelonedevil: - Fix json biomes not setting registry name correctly for the BiomeLoadingEvent. (#7329) - -========= -Build: 1.16.3-34.0.4 - Tue Sep 15 14:18:16 GMT 2020 - gigaherz: - Fix inconsistencies in how the values from the model are passed into the baked model. - This puts them in line with vanilla, as intended. - -========= -Build: 1.16.3-34.0.3 - Tue Sep 15 13:23:05 GMT 2020 - yunus1903: - Reimplemented drawHoveringText (#7268) - -========= -Build: 1.16.3-34.0.2 - Tue Sep 15 00:43:19 GMT 2020 - lexmanos: - New BiomeLoadingEvent that allows modders to edit biomes as they are being deserialized. - -========= -Build: 1.16.3-34.0.1 - Fri Sep 11 15:55:28 GMT 2020 - lexmanos: - Bump MCP version for lambda issue. - -========= -Build: 1.16.3-34.0.0 - Thu Sep 10 19:10:33 GMT 2020 - lexmanos: - 1.16.3 Update - Also included a bunch of warning cleanups. - -========= -Build: 1.16.2-33.0.61 - Thu Sep 10 18:54:56 GMT 2020 - redstonedubstep: - Fix tile entities being replaced when not needed. (#7318) - -========= -Build: 1.16.2-33.0.60 - Thu Sep 10 18:02:15 GMT 2020 - malte0811: - Fix exception when getting rendering box for tile entities with no collision boxes. (#7301) - -========= -Build: 1.16.2-33.0.59 - Wed Sep 09 23:05:21 GMT 2020 - cpw: - More crash reporting tweaks. Don't crash when trying to show warnings. Also, put the exception name in the error screen on the second line! - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.58 - Wed Sep 09 17:09:09 GMT 2020 - diesieben07: - Fix Minecart speed cap on rail being initialized to 0 (#7315) - -========= -Build: 1.16.2-33.0.57 - Wed Sep 09 02:10:45 GMT 2020 - richard: - Add support for custom tag types (#7289) - -========= -Build: 1.16.2-33.0.56 - Wed Sep 09 00:06:22 GMT 2020 - cpw: - More crash report tweaks. Put a button to open the generated crash report on the error screen, tweak formatting of crash report, and add the enhanced stack trace data (transformers et al) - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.55 - Tue Sep 08 21:00:19 GMT 2020 - championash5357: - New hook for better custom scaffolding movement (#7261) - -========= -Build: 1.16.2-33.0.54 - Tue Sep 08 20:47:48 GMT 2020 - mrtschipp: - Add partialTicks to RenderNameplateEvent (#7277) - - cyborgmas: - Prevent duplicate wrapper tags from crashing (#7283) - - mrp-v2: - Fix custom teleporters NPE (#7296) - - cyborgmas: - Fixed crash with zip paths (#7300) - -========= -Build: 1.16.2-33.0.50 - Tue Sep 08 20:23:27 GMT 2020 - nrbeech: - Fixing logic in getCurrentRailPosition to correctly identify the rail… (#7276) - -========= -Build: 1.16.2-33.0.49 - Tue Sep 08 20:14:58 GMT 2020 - sciwhiz12: - Remove dead ForgeHooks.canToolHarvestBlock function. (#7262) - - sciwhiz12: - Bump resource pack version to 6 (#7299) - - edwin.mindcraft: - [1.16.x] Fixes for Bamboo, Enchantments and Conduits, small adjustments to bring some patches closer to the vanilla code. (#7239) - -========= -Build: 1.16.2-33.0.46 - Tue Sep 08 19:50:14 GMT 2020 - championash5357: - Re-implement DrawHighlightEvent$HighlightEntity Firing (#7233) - -========= -Build: 1.16.2-33.0.45 - Tue Sep 08 19:25:58 GMT 2020 - ichttt: - Reimplement FarmlandWaterManager (#7213) - -========= -Build: 1.16.2-33.0.44 - Tue Sep 08 19:11:16 GMT 2020 - cyborgmas: - Add dataprovider for Global Loot Modifiers (#6960) - -========= -Build: 1.16.2-33.0.43 - Tue Sep 08 19:01:09 GMT 2020 - ichttt: - Fix crash when dumping crash report for an exception that has a null cause (#7308) - -========= -Build: 1.16.2-33.0.42 - Mon Sep 07 01:29:40 GMT 2020 - cpw: - Tweak crash report dump to visit all the causes up to the top. - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.41 - Sun Sep 06 23:39:13 GMT 2020 - cpw: - Fix ExplodedDirectoryLocator visiting non-existent paths. Closes #7203 - - Also, bump modlauncher to 7.0.1 to fix resources. - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.40 - Sun Sep 06 22:08:22 GMT 2020 - cpw: - Use new enumeration mechanism in ModLauncher, to allow getResources to work. This enables serviceloader-in-mods, and other stuff that might need to visit multiple mod jars. Also, tweaked the visitor code slightly, may result in a trivial performance change. Closing #7302 as it's not really relevant any more. - - Signed-off-by: cpw - - cpw: - Park the polling thread for a bit, if we're not the one driving the task list forwards. This allows for the actual driver to work on low cpu count machines. - - Signed-off-by: cpw - - cpw: - Fix some potential issues in crash dumping during mod loading - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.37 - Thu Sep 03 16:37:38 GMT 2020 - cpw: - Fix compiler issue in eclipse properly - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.36 - Thu Sep 03 12:40:52 GMT 2020 - sciwhiz12: - Fix crash caused by previous commit (#7298) - -========= -Build: 1.16.2-33.0.35 - Thu Sep 03 04:15:27 GMT 2020 - lexmanos: - Dirty casting hacks to fix eclipse compiler inference issue. I'm sorry cpw. - -========= -Build: 1.16.2-33.0.34 - Thu Sep 03 03:38:16 GMT 2020 - tterrag: - Fix broken ExistingFileHelper import - - Add licenses to some new files - - tterrag: - Add validation via resources for tag providers (#7271) - - BREAKING CHANGE: Moved ExistingFileHelper to common package - Remove various workarounds from forge tag providers - -========= -Build: 1.16.2-33.0.32 - Tue Sep 01 18:36:21 GMT 2020 - cpw: - Move the "modloading" thread activity onto _our_ worker pool. It turns out that the vanilla worker pool can deadlock during stitching if it's insufficiently large, if modloader "waitForTransition" is also a worker member of that pool. - - Closes #7293 (to reproduce issue easily, modify Util.func_240979_a_ and change the values in the MathHelper.clamp call). I've verified that 3 and below for "max" cause the problem. (I didn't test a whole range of values, just sufficient to reproduce problem and verify fix). Note that setting it to zero (and using the "direct executor" that's inaccessible in normal operation) works as well with this fix. - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.31 - Tue Sep 01 02:27:07 GMT 2020 - cpw: - Fix missed debugging code. Read the config from the config. - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.30 - Tue Sep 01 01:31:57 GMT 2020 - cpw: - Revert "Shut down all other mod handlers if the loading cycle errors. This prevents other mods from throwing errors and being blamed for initial cause. This is a temporary hack until cpw re-writes the mod event dispatcher." - - This reverts commit 7592bbe8 - - Signed-off-by: cpw - - cpw: - Revert "Properly shutdown FMLModContainer's event bus when an error in a lifecycle event is detected." - - This reverts commit 30bad1e2 - - Signed-off-by: cpw - - cpw: - Redo event dispatch, removes a bunch of nonsense, and tries to integrate with the vanilla CF system where possible - - Signed-off-by: cpw - - cpw: - Fix up all the things. Removed SidedProvider because it served no real purpose anymore. - - Signed-off-by: cpw - - cpw: - Fix up slight registry change and other 1.16.2 stuffs. - - Signed-off-by: cpw - -========= -Build: 1.16.2-33.0.23 - Sun Aug 30 23:05:24 GMT 2020 - ichttt: - Add particle culling (#6981) - -========= -Build: 1.16.2-33.0.22 - Wed Aug 26 16:50:02 GMT 2020 - lexmanos: - Wrap vanilla's 'default' biome registry in ForgeRegistry. - This should allow registering mod dimensions like in 1.16.1, while the data driven system is fleshed out. - -========= -Build: 1.16.2-33.0.21 - Tue Aug 25 01:11:38 GMT 2020 - gigaherz: - Clarify in the LazyOptional which methods carry the lazyness over to the returned value and which don't. (#6750) - - For consistency, this meant making a few changes: - - Renamed the existing lazy mapping method to lazyMap, to indicate that it doesn't run the mapping immediately. - - Added a new implementation of map(), which returns Optional, and resolves the value in the process. - - Changed filter() to return Optional, since there's no way to filter lazily. - - Added a new method resolve(), which helps convert the custom LazyOptional class into a standard Optional, for use - with library methods that expect Optional. - - * Update License headers. - -========= -Build: 1.16.2-33.0.20 - Fri Aug 21 21:27:21 GMT 2020 - sciwhiz12: - Add user-friendly exceptions when config loading fails (#7214) - -========= -Build: 1.16.2-33.0.19 - Fri Aug 21 18:53:46 GMT 2020 - dev: - Replace EntityHeight event with EntitySize event (#6858) - -========= -Build: 1.16.2-33.0.18 - Fri Aug 21 18:38:31 GMT 2020 - davide2910: - [1.16] ForgeEventFactory#canCreateFluidSource reintroduced (#7181) - -========= -Build: - Fri Aug 21 18:31:19 GMT 2020 - cyborgmas: - Cleanup and expand Forge tags (#7004) - -========= -Build: 1.16.2-33.0.16 - Fri Aug 21 18:25:49 GMT 2020 - sciwhiz12: - Fix modproperties property in mods.toml causing exception (#7192) - -========= -Build: 1.16.2-33.0.15 - Fri Aug 21 18:15:53 GMT 2020 - me: - Log info about server list warning (#7209) - - Make it easier to figure out what mods are missing or have to be marked as client/server side only. - -========= -Build: 1.16.2-33.0.14 - Fri Aug 21 18:06:47 GMT 2020 - goto.minecraft: - Fix ItemStack#isDamageable is not calling Item#isDamagable (#7221) - -========= -Build: 1.16.2-33.0.13 - Fri Aug 21 17:48:58 GMT 2020 - diesieben07: - Improve performance and cleanup code for DelegatingResourcePack (#7228) - -========= -Build: 1.16.2-33.0.12 - Fri Aug 21 17:29:33 GMT 2020 - cyborgmas: - Fix small logging issues with loading pack.png for mods (#7265) - -========= -Build: 1.16.2-33.0.11 - Fri Aug 21 17:23:30 GMT 2020 - diesieben07: - Fix config iteration order (#7230) - -========= -Build: 1.16.2-33.0.10 - Fri Aug 21 09:47:23 GMT 2020 - lexmanos: - Cleanup Forge's build script, fix some unneeded patches. - Add checkExcscheckAll tasks. - -========= -Build: 1.16.2-33.0.9 - Fri Aug 21 04:35:17 GMT 2020 - championash5357: - Readding DifficultyChangeEvent hooks (#7240) - -========= -Build: 1.16.2-33.0.8 - Fri Aug 21 04:29:10 GMT 2020 - malte0811: - Improve startup time by caching the manifest data for mod jars (#7256) - -========= -Build: 1.16.2-33.0.7 - Wed Aug 19 05:47:46 GMT 2020 - yunus1903: - Removed HarvestDropsEvent (#7193) - -========= -Build: 1.16.2-33.0.6 - Wed Aug 19 05:22:45 GMT 2020 - cyborgmas: - Remove forge optional tags in favor of Vanilla's new system. (#7246) - -========= -Build: 1.16.2-33.0.5 - Fri Aug 14 19:05:15 GMT 2020 - lexmanos: - Fix creating nether portals. - - lexmanos: - New method for creating modded tag references, fix connecting to vanilla servers. - -========= -Build: 1.16.2-33.0.3 - Fri Aug 14 02:17:01 GMT 2020 - 43609023+spnda: - Print mod file name on InvalidModFileException (#7241) - -========= -Build: 1.16.2-33.0.2 - Thu Aug 13 19:26:22 GMT 2020 - cyborgmas: - Fix server connection, misapplied patch (#7245) - - yunus1903: - Updated MDK and README for 1.16.2 (#7243) - -========= -Build: 1.16.2-33.0.0 - Thu Aug 13 07:37:04 GMT 2020 - lexmanos: - Initial 1.16.2 Update - -========= -Build: 1.16.1-32.0.108 - Sun Aug 09 20:05:01 GMT 2020 - gigaherz: - Fix ModelRegistryEvent firing every time resources reload instead of just once. - -========= -Build: 1.16.1-32.0.107 - Sat Aug 08 01:00:42 GMT 2020 - gigaherz: - Move ModelRegistryEvent invocation to when the model loading is about to start. - Freeze the ModelLoaderRegistry right after this event happens, just before model loading actually begins. - This means ModelRegistryEvent is now the correct place to register loaders, as it was intended. - This is a slight breaking change, but any mod that used FMLClientSetupEvent before will need to be updated regardless due to the existing race condition. - -========= -Build: 1.16.1-32.0.106 - Tue Aug 04 00:19:22 GMT 2020 - diesieben07: - Fix wrong BlockState param passed into canSustainPlant from FarmlandBlock (#7212) - -========= -Build: 1.16.1-32.0.105 - Tue Aug 04 00:06:45 GMT 2020 - sciwhiz12: - Add harvest levels for hoes and new 1.16 blocks for pickaxes Fixes #7187 (#7189) - -========= -Build: 1.16.1-32.0.104 - Tue Aug 04 00:00:40 GMT 2020 - sciwhiz12: - Fix debug world not generating modded blocks (#6926) - - championash5357: - New IForgeBlock#getToolModifiedState hook allow better control over tools interacting with blocks. (#7176) - - email.squishling: - Added new hook to allow Biomes to control their Edge biomes (#7000) - -========= -Build: 1.16.1-32.0.101 - Mon Aug 03 22:55:18 GMT 2020 - diesieben07: - Re-introduce "outdated" notification on Mods button in main menu (#7123) - - brandon4261: - Add support for custom elytra (#7202) - -========= -Build: 1.16.1-32.0.99 - Mon Aug 03 18:53:31 GMT 2020 - sciwhiz12: - Fix RenderTickEvent using wrong partial ticks value when game is paused. Fixes #6991 (#7208) - -========= -Build: 1.16.1-32.0.98 - Thu Jul 30 03:18:00 GMT 2020 - tterrag: - Implement forge IBakedModel methods in vanilla wrapper models - -========= -Build: 1.16.1-32.0.97 - Tue Jul 28 23:44:41 GMT 2020 - lexmanos: - Fix another case of swallowed errors not shutting down mods. - -========= -Build: 1.16.1-32.0.96 - Tue Jul 28 21:40:06 GMT 2020 - lexmanos: - Shut down all other mod handlers if the loading cycle errors. - This prevents other mods from throwing errors and being blamed for initial cause. - This is a temporary hack until cpw re-writes the mod event dispatcher. - -========= -Build: - Tue Jul 28 19:01:27 GMT 2020 - lexmanos: - Properly shutdown FMLModContainer's event bus when an error in a lifecycle event is detected. - - lexmanos: - Enable EventBus type check during ForgeDev, and add IModBusEvent marker to ModelRegistryEvent. - -========= -Build: 1.16.1-32.0.93 - Tue Jul 28 07:16:31 GMT 2020 - lexmanos: - Make license toml entry optional during 1.16.1 - There are to many existing mods to make this required. - Yes, we are technically before a RB and can do breaking changes. However this is too large. - -========= -Build: 1.16.1-32.0.92 - Tue Jul 28 01:14:20 GMT 2020 - cpw: - Missed one event. NewRegistry needs the marker. - - Signed-off-by: cpw - -========= -Build: 1.16.1-32.0.91 - Tue Jul 28 01:07:03 GMT 2020 - cpw: - Update MDK license to default to All rights reserved, and offer a link to chooseyourlicense.com as a place to research appropriate licenses. - - Note: the license field _is_ backwards compatible and will simply be ignored on older forge versions. - Signed-off-by: cpw - -========= -Build: 1.16.1-32.0.90 - Tue Jul 28 00:47:35 GMT 2020 - cpw: - Update modlauncher, eventbus, accesstransformers and more to use a newer mechanism for generating ASM. - - Introduced IModBusEvent as a marker interface for events on the ModBus. Expect exceptions if you use - the modbus for events not listened there. - - Signed-off-by: cpw - - cpw: - Update coremods and spi, include mandatory license field in metadata. Added at top level of mods.toml file. - - Signed-off-by: cpw - -========= -Build: 1.16.1-32.0.88 - Mon Jul 27 23:35:24 GMT 2020 - ray.neiheiser: - Fix rail 180 rotations (#7177) - - jmansfield: - Fire AnimalTameEvent for cats (#7172) Closes #7171 - -========= -Build: 1.16.1-32.0.86 - Mon Jul 27 22:56:16 GMT 2020 - lexmanos: - Fix Biome generation error. - -========= -Build: 1.16.1-32.0.85 - Mon Jul 27 21:36:07 GMT 2020 - dev: - Fix SleepingTimeCheckEvent not being fired in initial sleep test. (#7005) - -========= -Build: 1.16.1-32.0.84 - Mon Jul 27 21:30:24 GMT 2020 - yunus1903: - Fix ClimberPathNavigator spinning when width is small. Closes #6993 (#6997) - -========= -Build: 1.16.1-32.0.83 - Mon Jul 27 21:19:50 GMT 2020 - mrtschipp: - Re-added PlayerEvent.NameFormat (#6992) - -========= -Build: 1.16.1-32.0.82 - Mon Jul 27 21:14:02 GMT 2020 - email.squishling: - Fixed modded overworld biomes not spawning [1.16.x] (#6990) - -========= -Build: 1.16.1-32.0.81 - Mon Jul 27 21:08:23 GMT 2020 - christ.klinge: - Added EntityLeaveWorldEvent (#6984) - -========= -Build: 1.16.1-32.0.80 - Mon Jul 27 21:02:53 GMT 2020 - aqscode: - Re-implement moddable flammabilities (#6983) - -========= -Build: 1.16.1-32.0.79 - Mon Jul 27 20:46:11 GMT 2020 - diesieben07: - Re-add patch for PlayerSetSpawnEvent (#6977) - - yunus1903: - Updated versions in README and removed flocker.tv mentions (#6978) - -========= -Build: 1.16.1-32.0.77 - Mon Jul 27 20:40:33 GMT 2020 - sciwhiz12: - Fix ChunkDataEvents using different data tags (#6961) Fixes #6957 - -========= -Build: - Mon Jul 27 20:27:00 GMT 2020 - sm0keysa1m0n: - Post SoundLoadEvent on mod bus instead of forge bus (#6955) - -========= -Build: 1.16.1-32.0.75 - Wed Jul 22 01:26:19 GMT 2020 - cpw: - Remove startupquery. Currently wasn't functional, and 1.16 has out of band state loading in all cases, so the complex functionality there is no longer needed. Going to research using the Lifecycle indicator from DFU as a proxy/replacement. Probably with some codec FUN. - - Signed-off-by: cpw - -========= -Build: 1.16.1-32.0.74 - Wed Jul 22 00:34:43 GMT 2020 - lexmanos: - Run Forge's data generators to sync 1.16 vanilla changes. - -========= -Build: 1.16.1-32.0.73 - Wed Jul 22 00:13:48 GMT 2020 - cpw: - Don't show the early launcher GUI when running data. It's not needed and prevents use on automated builds. - - Need to investigate why a bunch of tags seem to be being blown away by rerunning on forge. - - Signed-off-by: cpw - -========= -Build: 1.16.1-32.0.72 - Tue Jul 21 23:56:54 GMT 2020 - cpw: - Add mixin - - Signed-off-by: cpw - -========= -Build: 1.16.1-32.0.71 - Mon Jul 20 22:56:31 GMT 2020 - cyborgmas: - Load Modded Datapacks in DatapackScreen, before world creation (#6913) - -========= -Build: 1.16.1-32.0.70 - Sat Jul 18 22:35:53 GMT 2020 - tterrag: - Fix inconsistencies with model/blockstate datagen - -========= -Build: 1.16.1-32.0.69 - Fri Jul 17 17:35:47 GMT 2020 - dev: - Filter duplicate mod files from mod file scan data (#6855) - -========= -Build: 1.16.1-32.0.68 - Thu Jul 16 21:56:30 GMT 2020 - lexmanos: - Fixed Forge commands. Closes #6973 Closes #6974 Closes #6976 - -========= -Build: 1.16.1-32.0.67 - Wed Jul 15 19:30:53 GMT 2020 - jaredlll08: - Added an event for registering commands. closes #6968 (#6969) - -========= -Build: 1.16.1-32.0.66 - Tue Jul 14 00:15:41 GMT 2020 - darklime: - Make all functions in Style common. (#6931) - -========= -Build: 1.16.1-32.0.65 - Mon Jul 13 22:44:53 GMT 2020 - 55965249+seymourimadeit: - Mark Raid.WaveMembers as an extensible enum. (#6878) - -========= -Build: 1.16.1-32.0.64 - Mon Jul 13 22:17:58 GMT 2020 - lexmanos: - Fix checkPatches task. Closes #6956 - Fix patched in method using srg name. Closes #6965 - Fix capabilities not being collected for ClientWorld. Closes #6966 - Fix TagEmptyCondition using client side copy of tags instead of server. Closes #6949 - Fix ExtendedButton using narrator text. Closes #6958, Closes #6959 - Fix misaligned patch in RepairContainer. Closes #6950, Closes #6953 - Fix LivingJumpEvent not being fired for players jumping horses. Closes #6929 - Remove extra getToughness method in ArmorItem. Closes #6970 - Remove GetCollisionBoxesEvent. Closes #6921 - -========= -Build: 1.16.1-32.0.63 - Fri Jul 10 22:28:22 GMT 2020 - richard: - Fix race condition with DeferredRegister for custom registries (#6951) - -========= -Build: 1.16.1-32.0.62 - Fri Jul 10 17:49:51 GMT 2020 - sciwhiz12: - Remove hooks into beacon base/payments. Vanilla uses tags now for extensibility. (#6948) - -========= -Build: 1.16.1-32.0.61 - Wed Jul 08 21:33:38 GMT 2020 - jaredlll08: - Expose the DataPackRegistries instance to the AddReloadListenerEvent (#6933) - -========= -Build: 1.16.1-32.0.60 - Wed Jul 08 21:13:18 GMT 2020 - sciwhiz12: - Fix canRepair not being set true as default (#6936) - - Closes #6934 and #6935 - -========= -Build: 1.16.1-32.0.59 - Wed Jul 08 14:56:39 GMT 2020 - gigaherz: - Fix particles sometimes "losing" the lightmap and drawing fullbright. - - gigaherz: - Fix misaligned patch causing LivingEquipmentChangeEvent to never be posted. - -========= -Build: 1.16.1-32.0.57 - Mon Jul 06 21:32:33 GMT 2020 - jdlogic: - Add simple patch checker and cleanup patches (#6851) - - * Add simple patch checker and cleanup patches - - * Address comments - * move task implementation - * genPatches is now finalized by checkPatches - * the S2S artifacts are automatically removed - * added class and method access checking - -========= -Build: 1.16.1-32.0.56 - Mon Jul 06 21:27:02 GMT 2020 - richard: - Fix the modifier combined name for keybinds displaying two pluses outside of forgedev #6901 (#6902) - -========= -Build: 1.16.1-32.0.55 - Mon Jul 06 21:12:45 GMT 2020 - richard: - Fix harvest level and tool type not actually getting set #6906 (#6922) - -========= -Build: 1.16.1-32.0.54 - Mon Jul 06 20:46:01 GMT 2020 - richard: - Reimplement ITeleporter Patches (#6886) - -========= -Build: 1.16.1-32.0.53 - Mon Jul 06 20:39:37 GMT 2020 - Mysterious-Dev: - Add function to add items with the same behavior as the pumpkin for enderman (#6890) - -========= -Build: 1.16.1-32.0.52 - Mon Jul 06 20:33:17 GMT 2020 - richard: - Custom Item integration with Piglins (#6914) - -========= -Build: 1.16.1-32.0.51 - Mon Jul 06 20:20:02 GMT 2020 - ichttt: - Some dead code cleanup, and re-implement some bed hooks. (#6903) - -========= -Build: 1.16.1-32.0.50 - Mon Jul 06 20:06:39 GMT 2020 - diesieben07: - Fix missing null checks in ForgeIngameGui (#6907) - -========= -Build: 1.16.1-32.0.49 - Mon Jul 06 19:50:02 GMT 2020 - sciwhiz12: - Fix swap offhand keybind not working in GUIs (#6920) - -========= -Build: 1.16.1-32.0.48 - Mon Jul 06 19:42:07 GMT 2020 - cyborgmas: - New AddReloadListenerEvent that gathers server side data reload handlers. (#6849) - -========= -Build: 1.16.1-32.0.47 - Fri Jul 03 12:40:42 GMT 2020 - gigaherz: - Attempt to use a more compatible method to initialize stencil support. - In case the separate attachments don't work for everyone, there's a new setting to choose the combined attachment. - -========= -Build: 1.16.1-32.0.46 - Fri Jul 03 04:00:22 GMT 2020 - gigaherz: - Update copyright year to 2020. - - gigaherz: - Fix multi-layer item rendering. - -========= -Build: 1.16.1-32.0.44 - Thu Jul 02 17:17:45 GMT 2020 - gigaherz: - Model system improvements: - - Port some things I did in 1.14 which I couldn't do in 1.15 due to breaking changes. - - Fix multi-layer block models not working (1.16 RenderType doesn't override toString the same way anymore) - - Implement multi-layer item rendering. - - Improve CompositeModel submodel data passing. - -========= -Build: 1.16.1-32.0.43 - Thu Jul 02 12:54:03 GMT 2020 - supermartijn642: - Include model data in getQuads call (#6884) - - The model data wasn't included when getting quads from specific sides, but was when getting quads for side = null. - - cyborgmas: - Pass matrixstack in tooltip render events (#6885) - -========= -Build: 1.16.1-32.0.41 - Thu Jul 02 05:54:25 GMT 2020 - tterrag: - Fix improper handling of baked lighting in forge light pipeline - - Closes #6812 - -========= -Build: 1.16.1-32.0.40 - Thu Jul 02 01:59:30 GMT 2020 - pupnewfster: - Fix FMLServerAboutToStartEvent being fired too late on the integrated server https://github.com/MinecraftForge/MinecraftForge/issues/6859 - -========= -Build: 1.16.1-32.0.39 - Wed Jul 01 18:14:25 GMT 2020 - ichttt: - Fix miss-aligned patch ItemEntity (#6895) - -========= -Build: 1.16.1-32.0.38 - Tue Jun 30 20:19:32 GMT 2020 - melanx: - Add hoe tool type (#6872) - -========= -Build: 1.16.1-32.0.36 - Tue Jun 30 20:09:21 GMT 2020 - curle: - Allow any armor to have custom knockback resistance (#6877) - -========= -Build: 1.16.1-32.0.35 - Tue Jun 30 19:57:32 GMT 2020 - diesieben07: - Add senderUUID to ClientChatReceivedEvent (#6881) - -========= -Build: 1.16.1-32.0.34 - Tue Jun 30 02:33:58 GMT 2020 - lexmanos: - Re-write checkATs function and automate making Items/Blocks public. - -========= -Build: 1.16.1-32.0.33 - Tue Jun 30 02:10:14 GMT 2020 - cpw: - Reorganize modloading on the dediserver. This removes the DedicatedServer parameter from the FMLDedicatedServerSetupEvent. - Code for customizing the server instance should be moved to the ServerAboutToStartEvent or similar, where the server instance - is available. - - This reorganization means that mods will load fully before the server is even constructed, or the server properties loaded. We also move the EULA right to the front so we don't have to wait for bootstrap. - - This should fix the problems with mods which customize world data and other things. - - Signed-off-by: cpw - -========= -Build: 1.16.1-32.0.32 - Mon Jun 29 23:43:01 GMT 2020 - cyborgmas: - Fix datagen resolving tags and exploding. (#6865) - -========= -Build: 1.16.1-32.0.31 - Mon Jun 29 23:37:30 GMT 2020 - mattmess1221: - Fix Language.javaLocale parsing (#6862) - -========= -Build: 1.16.1-32.0.30 - Mon Jun 29 22:58:30 GMT 2020 - diesieben07: - Fix IItemHandler wrappers for chests not updating both chests (#6875) - -========= -Build: 1.16.1-32.0.29 - Mon Jun 29 21:08:55 GMT 2020 - lexmanos: - Fix missed patch in PlayerList and EntitySelectioonContext. Closes #6846 Closes #6850 - -========= -Build: 1.16.1-32.0.27 - Mon Jun 29 20:09:12 GMT 2020 - richard: - Fix access levels being hardcoded to private via patch overriding AT entry (#6848) - -========= -Build: 1.16.1-32.0.26 - Mon Jun 29 19:42:50 GMT 2020 - lexmanos: - Fix tag related issues when connecting to a vanilla server. - -========= -Build: 1.16.1-32.0.25 - Sun Jun 28 22:08:15 GMT 2020 - lexmanos: - Fix Forge's internal handler being registered in wrong place. - Fix double call to loader end. - -========= -Build: 1.16.1-32.0.24 - Sat Jun 27 22:50:54 GMT 2020 - gigaherz: - Add a model loader that lets mods specify different models for different perspectives. - Allow custom models to reference vanilla item models as child models. - -========= -Build: 1.16.1-32.0.23 - Fri Jun 26 23:55:23 GMT 2020 - cyborgmas: - fix misapplied patch - - also sneak in an import patch removal - -========= -Build: 1.16.1-32.0.21 - Fri Jun 26 22:40:19 GMT 2020 - lexmanos: - Fix blocks being harvested with incorrect tools. - -========= -Build: 1.16.1-32.0.20 - Fri Jun 26 19:53:02 GMT 2020 - lexmanos: - Make installer use MCPConfig version to identify MC assets. - -========= -Build: 1.16.1-32.0.19 - Fri Jun 26 18:27:49 GMT 2020 - cpw: - Tweak the server startup a bit, make sure methods that can't work because they run before a server exists explode saying so. - Also fix other launch profiles. - - Signed-off-by: cpw - -========= -Build: 1.16.1-32.0.18 - Fri Jun 26 16:56:37 GMT 2020 - lexmanos: - Fix dedicated server loading by constructing mods before data packs are created. - -========= -Build: 1.16.1-32.0.17 - Fri Jun 26 15:20:37 GMT 2020 - gigaherz: - Fix create method. - Fix test mods not loading correctly. - -========= -Build: 1.16.1-32.0.16 - Fri Jun 26 14:43:19 GMT 2020 - gigaherz: - Reintroduce missed patch in EntityClassification. - -========= -Build: 1.16.1-32.0.15 - Fri Jun 26 13:55:42 GMT 2020 - cyborgmas: - Include a getter for the matrix stack in OverlayEvent (#6834) - -========= -Build: 1.16.1-32.0.14 - Fri Jun 26 13:23:07 GMT 2020 - cyborgmas: - Fix block render types not being properly applied to item entities (#6832) - -========= -Build: 1.16.1-32.0.13 - Fri Jun 26 13:05:18 GMT 2020 - mods.itsmeow: - [1.16.x] Allow GlobalEntityTypeAttributes' EntityType -> AttributeModifierMap to be added to (#6822) - - * Make GlobalEntityTypeAttributes map able to be added to - - * Split get patch into two lines - - * Favor Forge's map over vanilla - -========= -Build: 1.16.1-32.0.12 - Fri Jun 26 12:59:19 GMT 2020 - cyborgmas: - Fixed creative screen arrows (#6827) - - yunus1903: - Added call to method for tooltip with FontRenderer (#6831) - -========= -Build: 1.16.1-32.0.10 - Fri Jun 26 12:36:59 GMT 2020 - curle: - Retarget Block.Properties patch to the new AbstractBlock, reintroduce harvestLevel and harvestTool fields (#6819) - - * Retarget Block.Properties patch to the new AbstractBlock, reintroduces the harvestLevel and harvestTool fields. - - * Slight adjustment to fix the lootTableSupplier. - -========= -Build: 1.16.1-32.0.9 - Fri Jun 26 12:31:37 GMT 2020 - yunus1903: - Fixed sneaking while swimming (#6817) - -========= -Build: - Fri Jun 26 12:25:07 GMT 2020 - cyborgmas: - Fixed tooltip rendering issues (#6815) - -========= -Build: 1.16.1-32.0.7 - Fri Jun 26 02:30:54 GMT 2020 - cyborgmas: - Fixed villager trades having non-applicable enchants - - Also added an AT at lex's request - -========= -Build: 1.16.1-32.0.6 - Fri Jun 26 01:52:19 GMT 2020 - cyborgmas: - Fix locate command (#6811) - - cyborgmas: - Fix block drops (#6810) - - contact: - Add missing patch to ScreenShotHelper (#6809) - - Adds the missed patch back - - yunus1903: - Updated MDK mods.toml versions (#6808) - - cyborgmas: - Fix locate command (#6811) - - cyborgmas: - Fix block drops (#6810) - - contact: - Add missing patch to ScreenShotHelper (#6809) - - Adds the missed patch back - - yunus1903: - Updated MDK mods.toml versions (#6808) - - cyborgmas: - Fix locate command (#6811) - - cyborgmas: - Fix block drops (#6810) - - contact: - Add missing patch to ScreenShotHelper (#6809) - - Adds the missed patch back - - yunus1903: - Updated MDK mods.toml versions (#6808) - -========= -Build: 1.16.1-32.0.2 - Fri Jun 26 01:41:51 GMT 2020 - lexmanos: - Rework BlockSnapshot and fix client notifications. Closes #6807 - -========= -Build: 1.16.1-32.0.1 - Thu Jun 25 23:24:48 GMT 2020 - lexmanos: - Bump MCPConfig version. +1.18.x Changelog +40.0 +==== + - 40.0.24 [1.18] Make it easier to register custom skull blocks models (#8351) + - 40.0.23 Rework fog events (#8492) + - 40.0.22 Update Forge Auto Renaming Tool to the latest version (#8515) + - 40.0.21 Add patches to enable MobEffects with IDs > 255 (#8380) + - 40.0.20 Allow sound instances to play custom audio streams (#8295) + - 40.0.19 Fix NPE caused by canceling onServerChatEvent (#8516) + - 40.0.18 [1.18.2] Fix tags for custom forge registries. (#8495) + Tag-enabled registries must now be registered to vanilla's root registry. See RegistryBuilder#hasTags. + Modded tag-enabled registries have to use the format `data//tags///.json` + This format is to prevent conflicts for registries with the same path but different namespaces + EX: Registry name `examplemod:shoe`, tag name `blue_shoes` would be `data//tags/examplemod/shoe/blue_shoes.json` + RegistryEvent.NewRegistry has been moved and renamed to NewRegistryEvent. + RegistryBuilder#create has been made private. See NewRegistryEvent#create + Created new ITagManager system for looking up Forge tags. See IForgeRegistry#tags. + Add lookup methods for Holders from forge registries. See IForgeRegistry#getHolder. + - 40.0.17 Lower custom item entity replacement from highest to high so mods can cancel it during a specific tick (#8417) + - 40.0.16 Fix MC-176559 related to the Mending enchantment (#7606) + - 40.0.15 [1.18.x] Allow blocks to hide faces on a neighboring block (#8300) + * Allow blocks to hide faces on a neighboring block + * Allow blocks to opt-out of external face hiding + - 40.0.14 [1.18.x] Fix FMLOnly in forgedev and userdev (#8512) + - 40.0.13 Clear local variable table on RuntimeEnumExtender transformation (#8502) + - 40.0.12 Pass server resources to reload listener event (#8493) + - 40.0.11 Use UTF-8 charset for Java compilation (#8486) + - 40.0.10 Use wither as griefing entity when it indirectly hurts an entity (#8431) + - 40.0.9 Provide access to the haveTime supplier in WorldTickEvent and ServerTickEvent (#8470) + - 40.0.8 Fix durability bar not respecting an item's custom max damage (#8482) + - 40.0.7 Add event for controlling potion indicators size (#8483) + This event allows forcing the rendering of the potion indicators in the + inventory screen to either compact mode (icons only) or classic mode + (full width with potion effect name). + - 40.0.6 Introduce system mods to mod loading (#8238) + Core game mods are mods which are required to exist in the environment + during mod loading. These may be specially provided mods (for example, + the `minecraft` mod), or mods which are vital to the framework which + FML is connected to (for example, Forge and the `forge` mod). + These core game mods are used as the only existing mods in the mod list + if mod sorting or dependency verification fails. This allows later + steps in the which use resources from these mod files to work correctly + (up to when the error screen is shown and the game exits). + - 40.0.5 Add missing module exports arg to server arguments list (#8500) + - 40.0.4 Fixed swim speed attribute (#8499) + - 40.0.3 Fix incorrect movement distance calculation (#8497) + - 40.0.2 Add support to Forge registry wrappers for new Holder system. Closes #8491 + Fix TagBasedToolTypesTest not generating needed data correctly. + - 40.0.1 Fix JNA not working at runtime and causing issues with natives. + - 40.0.0 Update to 1.18.2 + Co-authored-by: sciwhiz12 + Co-authored-by: Marc Hermans + Co-authored-by: LexManos + Co-authored-by: Curle + +39.1 +==== + - 39.1.2 1.18.x Omnibus (#8239) + - 39.1.1 Bump modlauncher and securejarhandler version (#8489) + - 39.1.0 Update license headers to compact SPDX format. + License has not changed, this is just more compact and doesn't include years. + Bump version for RB. + +39.0 +==== + - 39.0.91 Remove - from allowed characters in mod ids. + The Java Module System does not allow them in module ids. + Closes #8488 + - 39.0.90 Fix static initializer crash when loading BakedRenderable. + - 39.0.89 Fix regressions for onAddedTo/RemovedFromWorld and related events (#8434) + - 39.0.88 [1.18] Integrate the gametest framework with Forge (#8225) + - 39.0.87 Re-add missing Shulker patch for EntityTeleportEvent (#8481) + - 39.0.86 Fix entity type in conversion event to Drowned (#8479) + - 39.0.85 Add VanillaGameEvent to allow for globally listening to vanilla's GameEvents (#8472) + - 39.0.84 Provide damage source context to Item#onDestroyed(ItemEntity) (#8473) + - 39.0.83 Add missing shear and elytra game events (#8471) + - 39.0.82 Fix comment for permission handler config setting (#8466) + - 39.0.81 Apply nullable annotations to LootingLevelEvent (#8422) + - 39.0.80 Fix Mob Spawner logic with CustomSpawnRules. Closes #8398 + - 39.0.79 Fix LivingDropsEvent not having all drops for foxes (#8387) + - 39.0.78 Add missing Locale parameter to String.format calls, Fixes getArmorResource functionality on some locaales. (#8463) + - 39.0.77 Allow items to hide parts of their tooltips by default (#8358) + - 39.0.76 Prevent 1.x Branches being treated as Pull Requests. (#8443) + - 39.0.75 Fix RegistryObject not working if created after registry events (#8383) + - 39.0.74 Add support for tagging StructureFeatures (#8408) + - 39.0.73 Re-added the patch for LivingExperienceDropEvent and enable it for dragons (#8388) + - 39.0.72 Implement getPickupSound on ForgeFlowingFluid (#8374) + - 39.0.71 Add getCodec method in ForgeRegistry (#8333) + - 39.0.70 Fix #8298 (MobBucketItem) and add test mod (#8313) + - 39.0.69 Deprecate IForgeAbstractMinecart::getCartItem (#8283) + - 39.0.68 Fix HoeItem patch incorrectly applied during migration. (#8384) + - 39.0.67 Fix issues with client only commands in combination with server only commands not using MC's command system. (#8452) + - 39.0.66 Fix FoliagePlacerType and TreeDecoratorType registry (#8394) + - 39.0.65 Fix PlayerChangeGameModeEvent (#8441) + - 39.0.64 Fix comparison of custom ParticleRenderTypes leading to broken particle effects. (#8385) + - 39.0.63 Fix cases where null is potentially sent to Screen events. Closes #8432 + - 39.0.62 Ensure ScreenEvent doesn't accept null screens (#8296) + - 39.0.61 Update cobblestone tags (#8292) + - 39.0.60 Prevent release of custom payload packet buffer on the server side. (#8181) + - 39.0.59 Make `MinecraftLocator` respect non-`MOD` FML Mod Types Fixes #8344 (#8346) + - 39.0.58 Fix vanilla worlds being marked experimental (#8415) + - 39.0.57 Simplify usage of IItemRenderProperties::getArmorModel (#8349) + - 39.0.56 Hide mod update notification while screen is still fading in (#8386) + - 39.0.55 Revert "Hooks to allow registering and managing custom DFU schemes and types. (#8242)" + - 39.0.54 Provide NPE protection against out of order init of the TYPES and REF (#8410) + - 39.0.53 Add ShieldBlockEvent (#8261) + - 39.0.52 Add renderable API to allow easier rendering of OBJ and other custom models, from Entity and BlockEntity renderers. (#8259) + This is a redesign of a discarded section of my initial model system rewrite, back in 1.14. + In order to use it with the OBJ loader, you can use OBJLoader.INSTANCE.loadModel to get the OBJModel, and then call OBJModel#bakeRenderable() to get a SimpleRenderable object to render with. + The SimpleRenderable support animation, by providing different transformation matrices for each part in the MultipartTransforms. + Additionally, a BakedRenderable helper exists to turn an arbitrary BakedModel into a renderable. + After trying to get the B3D loader to work, I decided it wasn't worth the trouble and marked it for removal instead. + - 39.0.51 Merge values of defaulted optional tags, Fixes issue where multiple mods declare the same optional tag. (#8250) + - 39.0.50 Added new 1.18 biomes to the BiomeDictionary (#8246) + - 39.0.49 Hooks to allow registering and managing custom DFU schemes and types. (#8242) + - 39.0.48 Ping data compression (#8169) + - 39.0.47 Expand the LevelStem codec to allow dimension jsons to specify that the dimension's chunk generator should use the overworld/server's seed (#7955) + - 39.0.46 Add Client Commands (#7754) + - 39.0.45 Remove references to the now-broken `BlockEntity#save(CompoundTag)` method (#8235) + - 39.0.44 update McModLauncher libraries to newer versions... + - 39.0.43 add extra keystore properties + - 39.0.42 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.41 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.40 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.39 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.38 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.37 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.36 fix crowdin key + - 39.0.35 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.34 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.33 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.32 fix secondary branches builds + - 39.0.31 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated + - 39.0.30 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated + - 39.0.29 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated + - 39.0.28 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated + - 39.0.27 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated + - 39.0.26 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated + - 39.0.25 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated + - 39.0.24 Remove primary branches from building on secondary branch configuration and publish crowdin data. (#8397) + * Remove the normalized branch names also from the filter. + * Add the additional publishing arguments to get the crowdin information. + * TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + * Fix the configuration. + * Remove the required patch and use the base script. + * Make a note about the reference. + Co-authored-by: cpw + - 39.0.23 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.22 Correct the build configuration to support a setup. (#8395) + * Add a setup task and publish the correct versions. + * Reconfigure build task and disable the normal build and test cycle on everything but pull requests, run an assemble there. + * Fix the derp in the build configuration. + - 39.0.21 Enable the TeamCity CI pipeline (#8368) + * Setup the build.gradle + * Setup the teamcity toolchain. + * Revert the usage of the local build of GU. + * Automatically add it now, it will always exist and is added to maven automatically by GU. + * Implement the branch filter and move the constant for the minimal changelog tag to a constant in the extension. + * Adding the JDK and Gradle version to the build script. + - 39.0.20 Fix and improve Ingredient invalidation (#8361) + - 39.0.19 Rework world persistence hooks to fix the double registry injection when loading single player worlds. (#8234) + - 39.0.18 Update tags for new 1.17 and 1.18 content (#7891) + - 39.0.17 Fix TerrainParticle rendering black under certain conditions (#8378) + - 39.0.16 Allow modded tools to work on glow lichen (#8371) + - 39.0.15 Fix custom climbable blocks not sending a death message (#8372) + Fixes #8370 + - 39.0.14 Provide access to the blockstate in BucketPickup#getPickupSound for multiply-logged blocks (#8357) + - 39.0.13 Fix clients being unable to deserialize tags for custom registries (#8352) + - 39.0.12 Fix particles going fullbright for a few frames when first spawning (#8291) + - 39.0.11 Also create parent directories when creating config files (#8364) + - 39.0.10 Fix crash with PermissionsAPI (#8330) + Fixes a crash in singleplayer, when the internal server didn't shut down correctly between world loads. + - 39.0.9 Re-add missing default spawn lists in features (#8285) + Fixes #8265 + Fixes #8301 + - 39.0.8 Fixed incorrect generic in PermissionAPI (#8317) + - 39.0.7 Redo of the whole PermissionAPI (#7780) + Co-authored-by: LexManos + - 39.0.6 Fix misplaced patch in SpreadingSnowyDirtBlock. + Fixes #8308. + - 39.0.5 Add RenderArmEvent to make overriding just the arm rendering not require copying nearly as much vanilla code (#8254) + - 39.0.4 Add MobEffect tags (#8231) + - 39.0.3 Log missing or unsupported dependencies (#8218) + - 39.0.2 Fix datagen test for sounds definitions provider (#8249) + - 39.0.1 Fix wrong stage being declared in transition to common (#8267) + - 39.0.0 Update to 1.18.1 + Co-Authored by: + - Curle + _ Orion + +38.0 +==== + - 38.0.17 [CVE-2021-44228]: Update Log4J to fix the security issue inside it. (#8268) + - 38.0.16 Fix KeyMappings only checking if they conflict with themselves. (#8256) + - 38.0.15 Fix ChunkWatchEvent not being fired (#8253) + - 38.0.14 Call handleUpdateTag for BlockEntities again (#8237) + - 38.0.13 Fix test worldgen data (#8248) + - 38.0.12 Allow Forge Registries to return key information for overridden objects. Fixes #8230 + - 38.0.11 Save Chunk capabilities to the chunk, rather than recursively to the capabilities. + - 38.0.10 Fix LevelChunk capability attach crash. + Fix client chunks not having capability providers attached. + Add capability attach tests. + - 38.0.9 Make HandshakeConsumer public again. + Fixes #8241 + - 38.0.8 Complete TODO in ShapedRecipe patch causing logspam related to minecraft:air + - 38.0.7 Add missing biomes back to the BiomeDictionary + - 38.0.6 Readd Mixin 0.8.5 to fix modules issues. + - 38.0.5 Readd PoseStack field to RenderTooltipEvent. + - 38.0.4 Fix custom loot serializers using wrong registry names + - 38.0.3 Fix DungeonHooks not returning correct values. Fixes dungeons in world spawning pigs. + - 38.0.2 Fix dedicated server install. Closes #8226 + Fix example mod + Fix obf issue with records. Closes #8228 + Fix dependencies beingg out of sync from vanilla. Closes #8227 + Disable mixin due to module incompatibility. + - 38.0.1 Fix mod resources not loading. + Add BreakingItemParticle.java.patch which I forgot to commit during the porting. + - 38.0.0 Initial port to 1.18 + Co-authored-by: David Quintana + Co-authored-by: SizableShrimp + +37.1 +==== + - 37.1.0 Bump version for final RB of 1.17's lifecycle. Move on to 1.18! + +37.0 +==== + - 37.0.127 Fix LiquidBlock's fluid field not being redirected to the supplier getFluid. Closes #7922 + - 37.0.126 [1.17.x Omnibus] Fix typos and javadocs across code base (#8144) + - 37.0.125 Fix /forge setdimension command arguments not parsing/suggesting correctly. + - 37.0.124 Fix Spectating Part Entity (MC-46486) (#8206) + - 37.0.123 Use HttpClient for VersionChecker (#8148) + - 37.0.122 Changed control flow of post mouse events to allow listening to events handled by vanilla. (#8133) + - 37.0.121 Deprecate durability bar methods in Item extension (#8214) + To retain compatibility with existing mods, the vanilla methods redirect + to the extension methods for now. + Users should now use and override the vanilla methods as directed in + the javadocs of the now-deprecated methods, as the extension methods + will be removed in the future. + Fixes #8201 + - 37.0.120 Reorder image tooltip component to match vanilla (#8213) + Fixes #8212 + - 37.0.119 Fix render pipeline lighting issue with small cubes (#8158) + This will also allow other mods which need to calculate small normalised vectors to be able to use the default classes without needing to write their own, while not effecting any side effects created by how the base game uses this function. + - 37.0.118 Fixes infinite loop when dismounting in `EntityMountEvent` (#8114) + - 37.0.117 Fix onChunkUnloaded not gettting called correctly (#8103) + - 37.0.116 Fix death message for tamed animals not having proper cause of death. (#8196) + - 37.0.115 Fix potential issue with BackgroundScanHandler for users with slow disc IO (#8176) + - 37.0.114 Make WorldEvent.Load run for Overworld before chunk creation like other dimensions (#8167) + - 37.0.113 Deprecate net.minecraftforge.common.util.Constants and inner classes to encourage usage of vanilla constants (#8140) + - 37.0.112 [1.17.x] Change expected type of LootTable fields to arrays (#8194) + #8184 reverted some LootTable patches, including the types of fields `f_79023_` and `f_79024_`. However, `ForgeLootTableProvider` still expects a list, however the type of the fields is an array now. + This PR changes the expected type in `ForgeLootTableProvider` to an array as well. + - 37.0.111 Apply window resizing to all gui layers (#8207) + - 37.0.110 [1.17.x] make ScrollPanel better usable by modders (#8179) + - 37.0.109 Update installer to 2.1.+ so we don't have to bump it in the future. + - 37.0.108 Remove Old LootPool Patches (#8184) + - 37.0.107 Remove the remnants of the selective reload listener (#8072) + - 37.0.106 Fix the hopefully last issue with GAMELIBRARY loading (#8162) + - 37.0.105 Fix part entities not working at all (#8177) + - 37.0.104 Pass IModelData through IForgeBakedModel#getModelData() before asking the BakedModel for the particle texture (#8106) + - 37.0.103 Fix blocks with flammable material catching fire from lava when they are marked as non-flammable (#8160) + - 37.0.102 Add `BiomeDictionary#hasType(String)` (#8157) + - 37.0.101 Add "forge:enchanting_materials" tag in place of Lapis in the Enchanting Table (#8149) + - 37.0.100 Fix Breaking waterlogged blocks occasionally displays air for a frame Closes #7253 (#8128) + - 37.0.99 Add accessor to an unmodifiable view of the fullPots map in FlowerPotBlock (#8108) + - 37.0.98 Fix Behavior With Unknown Items in Recipes (#8105) + - 37.0.97 Disable jenkins cache system until a functional system is in place. + - 37.0.96 Fix another crash with new tooltip events (#8155) + * Fix another crash with new tooltip events + * Add ItemStack context to ghost recipe tooltip events + * Expand Tooltip Event test mod to add a screen to test all tooltip render methods + - 37.0.95 Add entity source to PotionAddedEvent (#8147) + - 37.0.94 Add helper methods to generate blockstate and models for button, pressure plate, sign to BlockStateProvider/ModelProvider (#8139) + - 37.0.93 Fix Entity#onAddedToWorld not being called for non-player entities server-side (#8134) + - 37.0.92 Add ATs for world generation extensibility, focusing on `NoiseBasedChunkGenerator`, `NoiseSampler`, `NoiseBasedAquifer`, and `Beardifier` (#8087) + - 37.0.91 Make AdvancementProvider extensible by modders (#8120) + - 37.0.90 Skip loading jars with neither a manifest, nore a mods.toml. + Deprecate helper functions related to ModFile/Metadata. + Mark ModFileFactory as to be removed from our usage. + It may be useful for other loaders, but introduces a weird level of indirection that makes things a pain. + If there are consumers of this API please leave feedback before the next major mc version so we can be sure to provide something useful. + - 37.0.89 Fix mods with both a manifest and a mods.toml have mismatched module names. + - 37.0.88 Fix missing toolTip methods in Screen (#8154) + - 37.0.87 Fix render tooltip render patch (#8153) + - 37.0.86 Attempt to fix non-mods.toml jar files. Closes #8136 #8146 #8152 + Make jenkins copy gradle cache to address concurrent build issues. + - 37.0.85 Tooltip event rewrite (#8038) + Redesigns the tooltip events, and adds a feature where mods can register factories for ClientTooltipComponents, which are used for custom rendering in tooltips. The old events are maintained for binary compatibility. + - 37.0.84 Add ForgeSpawnEggItem to lazily handle EntityTypes (#8044) + - 37.0.83 Reimplement IForgeBlockEntity#onLoad() hook (#7946) + - 37.0.82 Implement GUI Stacking feature. (#8130) + You can now use `mc.pushGuiLayer` and `mc.popGuiLayer` to manage the layers. + mc.setScreen behaves such that if called with a non-null screen it replaces the entire stack, and if called with null it closes the entire stack. + - 37.0.81 Add ability for people to add custom pack finders (RepositorySources) (#8121) + Added AddPackFindersEvent which lets you add additional resource/data pack sources to the game. + Added PathResourcePack as a utility to allow easy providing of a subfolder in a mod as a resource pack. + - 37.0.80 Added EntityEvent.EnteringSection event to replace EnteringChunk event. (#8078) + - 37.0.79 Prevent Block/Entity data side leak on integrated servers by copying custom data before writing. #8111 + - 37.0.78 Re-implement linear filtering text render types (#8052) + * Re-implement linear filtering text render types + Implements and closes #7996 + - 37.0.77 Fix breaking block particles not respecting IModelData (#8065) + The sprite used for the block particles needs updating after the constructor otherwise it defaults to the texture sprite returned from passing ModelData.INSTANCE to get IForgeBakedModel#getParticleIcon. Calling updateSprite fetches the real IModelData instance for that blockstate/pos and sets the texture to the desired one + - 37.0.76 Fix Signs breaking with custom `WoodType`s (#8132) + - 37.0.75 Bump SJH version. Closes #8127 + Attempt addressing loading libraries during dev time, and bump SPI version introducing GAMELIBRARY type. #7976 #7957 #8090 + - 37.0.74 Capability rework to get rid of @CapabilityInject and use CapabilityToken as the identifier, deprecated old system for removal in 1.18. (#8116) + - 37.0.73 Fix pet death message being sent when pet death event is canceled. (#8110) + - 37.0.72 [1.17.x] implements canConnectRedstone(), Redstone dust now defers to the blockstate for determining connectivity (#8014) + - 37.0.71 Prevent call to Item#initializeClient when in datagen (#8097) + When running under data-generation, the Minecraft singleton is unavailable + even though the operating env is under the CLIENT dist. Adding this check + prevents crashes from devs unaware of this, as most uses of + IItemRenderProperties (usually for a custom BEWLR) make use of the + Minecraft singleton and therefore will cause NPEs if not guarded against. + A similar thing happens in MobEffect and Block. + - 37.0.70 Move ItemStack#forgeInit call earlier to allow earlier capability queries (#8096) + - 37.0.69 Remove incorrect FallingBlock patch (#8092) + The patch accidentally replaces the minimum build height (set by the + dimension via e.g. datapacks) with 0, causing falling blocks placed + below Y level 0 to never fall. + Fixes #8091 + - 37.0.68 Fix inverted hooks for PermissionsChangedEvent (#8089) + Because IEventBus#post returns true on cancellation and the patched-in + hooks inverts the return of the ForgeHooks method, if the player + whose permission level is being changed is online and the event is not + cancelled, the permission change _is_ cancelled. + The fix is inverting the patched-in hooks and the default return value + of the ForgeHooks method, so that the permission change is cancelled + only if the player is online, the event is fired, and the event is cancelled. + Fixes #8088 + - 37.0.67 Add the missing patch for ItemStack for last build. (#8085) + - 37.0.66 Support Lazy capabilities on itemstacks, for better ItemStack copy performance. (#7945) + - 37.0.65 Fix EntityJoinWorldEvent not firing as expected: (#8033) + - Fix entities loaded from disk not getting the event. + - Fix vehicles with passengers getting the event twice. + - 37.0.64 Re-add patch to release buffer in custom payload packet (#8042) + - 37.0.63 Propagate all arguments passed to the server start scripts to the game (#8060) + - 37.0.62 Remove old Log4j thread cache invalidation (#8068) + - 37.0.61 Fix pick-block for items that map to multiple blocks. Closes #8080 + - 37.0.60 Update nashorn to 15.3, which fixes crashing when run on Java 17. + Please note that due to https://bugs.mojang.com/browse/MCL-18306, the vanilla launcher will not let you use Java 17 yet without workarounds. + - 37.0.59 Add mixin full release to install list. (#8076) + - 37.0.58 Add new tool action for shield blocking, replacing `IForgeItem#isShield` (#8055) + - 37.0.57 Add workaround for pairs of `'` being stripped (#8050) + Fixes #7396, where if a translated string with balanced pairs of single + quote characters passes through ForgeI18n, the quotes are stripped + because of ExtendedMessageFormat. This is most notable in languages + where `'` is used frequently, like Canadian French from the bug report. + Note that unbalanced pairs cause an IllegalArgumentException in + ExtendedMessageFormat, which means the message is not affected. + - 37.0.56 Re-add missing patch for IForgeItem#getEquipmentSlot (#8041) + - 37.0.55 Added PlayerPermissionChangedEvent(#8023) + - 37.0.54 Changed Monster Requirement to Mob in RangedBowAttackGoal (#7960) + - 37.0.53 Add shebang to run.sh in server files (#8058) + - 37.0.52 Fix incorrect parameter being sent to AbstractContainerScreen#getSlotColor. + - 37.0.51 Patch ModSorter to include forge mod in forgeAndMC list (#8043) + - 37.0.50 Fix GuiUtils#drawContinuousTexturedBox making assumptions about what shader is currently active, and fix buttons and header not showing on LoadingErrorScreen (#8022) + - 37.0.49 Fix ScrollPanel render calls and usage (#8012) + - 37.0.48 Fix all layers of ItemLayerModel being fullbright (#8039) + Fixes #8007 + - 37.0.47 Cleanup Tag Loading, this migrates thins to more of a vanilla style. (#7898) + - 37.0.46 Add Shears ToolActions (#7997) + Make shear interactions extend to subclasses + Add Shears actions for beehive harvesting, pumpkin carving and trip wire disarming + - 37.0.45 Fix broken fmlonly installer and promote it to page gen (#8029) + Update gradle wrapper to 7.2 + - 37.0.44 Minor resource pack related fixes (#7884) + - 37.0.43 Fix misaligned patch causing monsters to not spawn in nether fortresses correctly. + - 37.0.42 Add RegisterCapabilitiesEvent (#8021) + - 37.0.41 Move static ITEM_TIER_ORDERING_JSON resourcelocation declaration from anonymous class into outer class to work around eclipse compiler error. (#8018) + - 37.0.40 Fix entities not spawning in structures (#8020) + This affects swamp huts, pillager outposts, ocean monuments, and nether fortresses + - 37.0.39 Add support for forge's "remove" list to tag datagenerators (#7911) + - 37.0.38 Add hook to allow items to customize the attack sweep range. (#7981) + - 37.0.37 Track the active mod within DeferredWorkQueue (#7973) + - 37.0.36 Allow to check spawner block entity in events (#7941) + - 37.0.35 Remove neutral mob patches as the bug was fixed upstream. (#8001) + - 37.0.34 Ensure that all render targets in a PostChain use the same format (#7978) + closes #6995 + - 37.0.33 Fix update checker to use runtime minecraft version (#8000) + - 37.0.32 Correct incorrect arguments for render hand event (#7987) + - 37.0.31 Redesign the tool system to rely on the new vanilla tags. (#7970) + Changed: + - ToolType is replaced with ToolAction, which can selectively represent which actions are supported by an item. + - Added a canPerformAction method to query ToolActions. + - Renamed canHarvestBlock to isCorrectToolForDrops to match vanilla. + - Added TierSortingRegistry, which can be used to add custom tiers and supports sorting between vanilla or with other mods. + How to use: + For the breaking system there's 2 methods: + - getDestroySpeed decides if an item *can* mine the block fast. Override if you have multiple tags or your item isn't a DiggerItem. + - isCorrectToolForDrops decides if an item will get drops. Returning false will also slow down mining, regardless of getDestroySpeed. Override if you have type-dependant tiers or your item isn't a DiggerItem. + For the tier system mods can just call `TierSortingRegistry.registerTier(tier, "name", List.of(lesser tiers), List.of(better tiers));` to register their tiers. + There's helper methods to query tiers such as TierSortingRegsitry.isCorrectTierForDrops. + The ToolActions solve 2 problems: + 1. distinguishing which kind of digger an item can be + 2. querying if the item can perform specific secondary actions. + Any item can override `canPerformAction` to customize which actions it performs. + - 37.0.30 Fixed reference to registryAccess in dimension fix, and marked for removal in next MC version. Closes #7961 + - 37.0.29 Bump BootStrapLauncher, and make sure Capability providers call parent revive. + - 37.0.28 Fix custom ingredients not being read correctly over the network. (#7980) + - 37.0.27 Add a OnDatapackSyncEvent, useful as a notification for modders to send extra data to the client (#7912) + - 37.0.26 Add access transformer to make Features.Decorators class public (#7974) + - 37.0.25 Fix NullPointerException in DetercorRailBlock patch. + - 37.0.24 Remove entity.remove(keepData) functions because Mojang changed entity removal mechanics. + If a modder wishes to use the capabilities from a invalid entity. They must manually call reviveCaps/invalidateCaps themselves. + - 37.0.23 Add forceSystemNanoTime config option to the client. + Normally glfwGetTime is used, but in some cases it may have performance issues. + - 37.0.22 Rename potion registry fields to match the mojang names (#7939) + - 37.0.21 Fix patch issue that removed SimpleWaterloggedBlock from BaseRailBlock (#7937) + - 37.0.20 Fix EntityInteractSpecific Event not being fired in server (#7936) + - 37.0.19 Add BlockEntityRenderer registering to RegisterRenderers (#7975) + - 37.0.18 Fix installer issue with spaces in paths. (#7972) + - 37.0.17 Remove unused config entries. (#7954) + - 37.0.16 Re-add call to Ingredient#invalidateAll() (#7953) + - 37.0.15 Remove Generic from ProjectileImpactEvent (#7959) + Generification of this event was half-done and has been aborted, leaving the generic parameter in place just creates confusion and crashes + - 37.0.14 Introduce RegisterShadersEvent to register shaders with the proper timing (runs every client resource reload). + Fix ShaderInstance to allow resourcelocations with namespaces as input. + Fix shader parsing to respect resource domains. + Fix ForgeRenderTypes to use the right shader in each situation. + Add custom forge shader for unlit translucent entity rendering, equivalent to the vanilla entity translucent shader. + - 37.0.13 Fix userdev mod deps on the classpath (#7919) + - 37.0.12 Fix typo in FluidBlockWrapper (#7931) + - 37.0.11 Fix rounding related errors with small entity pathfinding. Closes #7730 + - 37.0.10 Add modder-friendly way to edit the boat model / texture in custom boats (#7897) + - 37.0.9 Fix EntityRendererEventsTest crashing dedicated server when running forge_test_server in forgedev (#7930) + - 37.0.8 Added RegisterClientReloadListenersEvent which lets you register reload listeners with appropriate timing. + Added new entity rendering events. + - EntityRenderersEvent.RegisterLayerDefinitions: Used to register layer definitions for entity models. + - EntityRenderersEvent.RegisterRenderers: Used to register entity renderers. + - EntityRenderersEvent.AddLayers: Called during resource reload after all renderers have been constructed and it's safe to add layers. + Removed RenderingRegistry, which is now not necessary. + Removed a few unused things. + Fixes #7920 + - 37.0.7 Pass the 'includeName' flag to the ItemTossEvent (#7894) + - 37.0.6 remove old direct GL call (#7907) + - 37.0.5 1.17 Fix InitGuiEvent (#7906) + - 37.0.4 Expose RenderStateShard inner classes (#7895) + In 1.17, all of the inner classes of `RenderStateShard` (`RenderStateShard.OverlayStateShard`, `RenderStateShard.WriteMaskStateShard`, etc.) have been changed to protected. These classes are needed however to create new `RenderType.CompositeRenderType`'s using `RenderType.CompositeState.CompositeStateBuilder`. + Since these are protected inner classes, their constructors also can't be directly be obtained using `ObfuscationReflectionHelper`. + Currently, any mod using custom `RenderType`'s will have to either: + - add their own access transformer for the inner classes, or + - extend `RenderStateShard` to access `RenderStateShard`'s inner classes, and extend `RenderType` to access `RenderType.CompositeRenderType` + This PR changes the visibility of `RenderStateShard`'s inner classes to public in Forge's `accesstransformer.cfg`. + - 37.0.3 added back attribute patches (#7886) + - 37.0.2 Bump SecureJarHandler, and fix life cycle event's deferred work being on the incorrect thread/boot classloader. + - 37.0.1 Bump SecureJarHandler to fix package meta issue. Closes #7881 + Fix version.json having duplicate libraries. + - 37.0.0 Update to 1.17 + Update to Official classnames + Patchwork + Make the game compile and run + Merge in the new HUD overlay API + Merge in the new render properties API + PEEL + Use Gradle 7.2 snapshot to fix eclipse integration bug in 7.1, Would use 7.0 but FG needs 7.1 for some reason. + New FML installer + Update to 1.17.1 + Co-authored-by: LexManos + Co-authored-by: SizableShrimp + Co-authored-by: cpw + Co-authored-by: Curle + Co-authored-by: Unnoen + Co-authored-by: covers1624 + Co-authored-by: DaemonUmbra + Co-authored-by: gigaherz + +36.2 +==== + - 36.2.0 New 1.16.5 RB. + +36.1 +==== + - 36.1.66 ForgeGradle 5.1 and Gradle 7, which allows development on J16. Runtime still targets J8. (#7877) + - 36.1.65 Work around javac scoping issue. + - 36.1.64 Fix LAN worlds where registry entries have been removed. + - 36.1.63 Fix FakePlayers having null `connection` and add FakePlayer test mod (#7733) + - 36.1.62 Use '{assets_root}' rather than task output path for userdev config (#7873) + - 36.1.61 Fix missing userdev config for datagen runs (#7871) + - 36.1.60 Adds a damage float in Lightning Entity and patches Entity to use it. (#7849) + - 36.1.59 Patch several mob classes to let them use modded versions of their ranged weapons (#7845) + - 36.1.58 Add Fishing bobber projectile impact event (#7842) + - 36.1.57 Removes misapplied patch in Entity (#7841) + - 36.1.56 Removes misleading Nullable annotation from canCreatureSpawn (#7840) + - 36.1.55 Corrects the assigning of mob kills, Fixes MC-121048 (#7836) + - 36.1.54 Updates MouseHelper to allow for Horizontal Scroll to be recognized as Vertical Scroll (#7834) + - 36.1.53 Fix entities losing their scoreboard data when they are unloaded (#7826) + - 36.1.52 [1.16] Allow blocks other than beds or respawn anchors to act as respawn points (#7824) + - 36.1.51 Regen patches + - 36.1.50 Add AT entries for DimensionSettings to make them easier for mods to work with (#7817) + - 36.1.49 New hook to allow Trapdoors be climbable for custom ladders (#7816) + - 36.1.48 Convenience change for potion enumeration - does not change patch size in any meaningful way! (#7811) + - 36.1.47 Adds knockback attribute to players and updated knockback calculation to PlayerEntity#attack (#7806) + - 36.1.46 Fix mod menu URL click bounds (#7804) + - 36.1.45 Fix vanilla rotation/mirroring issues (#7803) + Patch minecraft to fix MC-227255 and MC-134110, which are block + rotation and mirroring issues. I noticed this from problems with + Structurize, but this probably affects any other mods that allow + rotating or mirroring structures (as well as vanilla structure blocks). + - 36.1.44 Synchronize `ResourcePackList#addPackFinder` (#7799) + - 36.1.43 Fixes tryFluidTransfer_Internal to respect the FluidStack drainable when draining fluidSource. (#7782) + - 36.1.42 Add IRecipeType parameter to burn time hooks (#7771) + - 36.1.41 Use MobGriefingEvent for PiglinEntity when determining whether Piglins want to pick up items. (#7762) + - 36.1.40 [1.16.x] Remove redundant mobgriefing check in SmallFireaballEntity. (#7761) + - 36.1.39 Changed AbstractFurnaceTileEntity's canBurn and burn functions to use IRecipe's 'assemble' instead of 'getResultItem' (#7756) + - 36.1.38 Bypass chunk future chain when processing loads and getChunk called. (#7697) + - 36.1.37 Removed sidedness from PacketBuffer methods. (#7236) + Affected methods: + * readLongArray (x2) + * readSectionPos + * readString (no-arg variant) + - 36.1.36 Add data generators for sounds.json (#6982) + - 36.1.35 Add custom TextureAtlasSprite loaders (#7822) + Adds a system for mods to specify custom texture loaders which can be requested by the resource pack through a metadata section in the .mcmeta file. Due to technical reasons, png file is still required for MC to identify a texture as existing, even if the loader doesn't use it. + - 36.1.34 Fix PlayerGameModeEventTest and ForgeWorldTypeTest so they don't crash the dedicated server when running forge_test_server in forgedev (#7869) + - 36.1.33 Add userdev to run config. + - 36.1.32 Add truncation to FMLStatusPing to work around protocol limits (#7818) + - 36.1.31 Remove ModelResourceLocation patch for SAS entry (#7813) + - 36.1.30 Fix jar file path detection if the path contains a "!" (#7790) + - 36.1.29 Add method to get the number of elements in a model builder (#7792) + - 36.1.28 Fix vanilla packet splitter remote detection and add advancement packet splitting (#7802) + - 36.1.27 Add option for linear filtering of text texture (#7645) + - 36.1.26 Use empty model instead of missing model for non-existant layers in multilayer models (#7750) + Fixes issues when using multi-layer models as part of composite models + - 36.1.25 Add debug logging to packet compression encoder. + Should make figuring out who is sending large packets easier. + Disable with -Pforge.disablePacketCompressionDebug=true + - 36.1.24 Removed signature line from mod list screen. #7500 + - 36.1.23 Reinstate the MinecartCollisionHandler field to AbstractMinecartEntity (#7748) Closes #7506. + - 36.1.22 Fix PlayerEvent.BreakSpeed's pos being nullable. (#7747) Closes #7615. + - 36.1.21 Fix OBJ Loader data gen string (#7746) Closes #7616 + - 36.1.20 Add an event similar to PlayerEvent.NameFormat but for the name shown in the tab list. (#7740) + - 36.1.19 Fix filling buckets with fluids without bucket items consuming the fluid (#7745) Closes #7670 + - 36.1.18 Work around crash while loading flatworld with modded structures. (#7764) + * Work around crash while loading flatworld with modded structures. + * Maybe fix issue with gradle daemon leaking memory and slowing down CI builds. + - 36.1.17 Update Forge to Gradle 6.9 + - 36.1.16 Add barrels and barrels/wooden block and item tag (#7676) + - 36.1.15 Fix shears not properly breaking tripwire (MC-129055) (#7718) + - 36.1.14 Fix Line endings in tooltips not handled properly in multiplayer screen Closes #7738 (#7739) + - 36.1.13 Fix cats, phantoms and pillagers saying they're at BlockPos.ZERO during LivingSpawnEvent.CheckSpawn (#7722) + - 36.1.12 [1.16] Add missing Multipart Blockstate Builder feature: Nested condition groups (#7677) + - 36.1.11 Pass BlockPos to BlockParticleData used for "fall impact" particle (#7705) + - 36.1.10 Check version ranges of optional dependencies when present (#7710) + If an optional dependency is present, but it does not conform to the version range, + it will now error out in the same fashion as missing required dependencies, instead + of a more cryptic error down the line due to a missing method/class/field/etc. + Implements and closes #7696 + - 36.1.9 Fix ClientVisualization crashing on systems without monitors (#7719) + - 36.1.8 Fix Furnace Minecarts going faster then vanilla (#7725) + - 36.1.7 Update for Forge's new maven (#7723) + - 36.1.6 A bloody quote FFS + - 36.1.5 Update for new maven + - 36.1.4 Fix broken java9hacks for j16 handling.. + - 36.1.3 Add generic EntityTeleportEvent (#7694) + - 36.1.2 Restore SS version, fixes findFieldInstanceChecks + - 36.1.1 Fix sign textures being stitched onto every texture atlas (#7690) + - 36.1.0 Fix AT order, missed exec line and bump for RB. + +36.0 +==== + - 36.0.61 Fix wrong eye height when entity size changes (esp. baby animals) (#7628) + - 36.0.60 Allow ITeleporter to override the vanilla teleport sound (#7682) + - 36.0.59 Fix datapack exception related to EnumArgument with siblings (#7686) + Invalid enum constants are now properly thrown as a CommandSyntaxException + - 36.0.58 Add support for custom WoodTypes (#7623) + - 36.0.57 Use JGit instead of GrGit now that jcenter is going away. + Update missed mapped name in MDK. + - 36.0.56 Bump nashorn wrapper version. + - 36.0.55 Fix yet another copypasta. + - 36.0.54 Fix incorrectly replaced SRG names + - 36.0.53 Fix potential Deadlock when using custom Item entities. (#7532) + Be careful when adding Entities during Chunk Load (#7519) + - 36.0.52 Fix copypasta. + - 36.0.51 Automatically fix some issues with configurations deemed invalid for simple reasons (#7671) + - 36.0.50 Add coremod that injects bouncer methods to work around name conflicts with official names. + Fixes a binary break. + - 36.0.49 Bump SpecialSource + - 36.0.48 Bulk update license year, and use replacement variable so that the current year is always used. + - 36.0.47 Introduce a new feature that lets mods know if optional mods and optional network channels are present in the remote. + Allow connections from forge versions that don't have the vanilla splitter. + - 36.0.46 Regenerate patches with relative headers. This should lower conflicts in future PRs. + Convert Forge to use Official mappings. + Mojang released their obfuscation mappings but we have not used them up until now due to wanting to get their license to be more explicitly permissive. + It is clear that their intent is to allow us to use their names for developing mods like this. + See the full wording, and our interpretation here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md + - 36.0.45 Update to FG4, and Gradle 6.8. + - 36.0.44 Support splitting vanilla packets that are too large on forge<->forge connections (#7485) + Currently only for SUpdateRecipesPacket and STagsListPacket that blow up with huge datapacks + - 36.0.43 Fix a few places where the vanilla method was being called instead of the forge one (#7535) + Cleanup javadocs references slightly, fix a couple spots not using the proper forge hooks, and remove a couple unneeded patches + Update deprecation comment on isAir + - 36.0.42 Add Opacity to ForgeHooksClient#renderMainMenu (#7660) + - 36.0.41 Add support for caching of configuration values. (#7608) + - 36.0.40 Added entity attribute setup and creation events + - 36.0.39 Fix updateItemStackNBT not properly being called (#7646) + Re-added ItemStack delegate redirect transformer + - 36.0.38 Fix a few FluidUtil issues that were causing DispenseFluidContainer to not function properly (#7422) + - 36.0.37 Add a way to specify a custom background texture with namespaces in the Creative GUI. (#7404) + - 36.0.36 Fixed Configs not correcting when hot-loaded from changes on disk (#7427) + - 36.0.35 Reduce default logging markers in the MDK. Modders can re-enable these for better debugging. (#7432) + Modders PLEASE read your damn log, and fix the errors we point out. Spamming modpacks with stack traces is just lazy programming. + - 36.0.34 Deprecate Forge's setdimension command, vanilla execute command can do this now. (#7459) + - 36.0.33 Fix ItemTextureQuadConverter.convertTexture generating wrong quads, fixes #7620 (#7650) + - 36.0.32 Added MultipartBakedModel.getModelData(). (#7595) + This allows custom IBakedModel implementations to use the IModelData provided by their IBakedModel.getModelData() when used in the context of a multipart model. + - 36.0.31 fix global cache not being a block render type (#7648) + - 36.0.30 Allow mods to use additional custom LootParameter when querying existing loot tables (#7515) + - 36.0.29 Add ForgeHooks.canEntitySpawn to Cat, Phantom, and Patrol spawners. (#7569) + - 36.0.28 Fix/Replace player visibility event (#7573) + - 36.0.27 Fix: Clear the last error from glfwInit to prevent vanilla from throwing an exception later in the chain when glfw errors. (#7587) + - 36.0.26 Fix MC-181464 persisting for modded shields (#7602) + - 36.0.25 FIx race condition in LazyOptional (#7611) + - 36.0.24 [1.16.5] Fix shaders breaking almost every overlay that uses textures, fixes #7575 (#7624) + - 36.0.23 Disable syncing of Feature and Biome registries (#7639) + - 36.0.22 Add IExtensibleEnum to GrassColorModifier (#7641) + - 36.0.21 Log stacktraces in NettyPacketEncoder. (#7654) + - 36.0.20 Lower logging level for datafixer warning to debug (#7636) + - 36.0.19 Reintroduce forge's chunk manager to allow mods to force chunks with either a block position or entity (UUID) "owner" and have them properly persist between restarts (#7642) + - 36.0.18 Fix two places where querying an object for the new "valid" capability from a capability invalidation listener could cause the object to return the old invalid capability. (#7643) + - 36.0.17 Fix config spec in cases of enum class discrepancies (#7635) + - 36.0.16 Fix onBlockAdded being called twice for ItemEntity placing non-TE blocks (#7607) + - 36.0.15 Prevent NullPointerException when adding new loot pool. (#7605) + - 36.0.14 Added generic multi part entity API (#7554) + - 36.0.13 Fix IAngerable entities crashing when reading nbt on client (#7618) + - 36.0.12 [1.16.x] Add loot table ID in Global Loot Modifiers (#7428) + - 36.0.11 Add a block tag to allow mods to blacklist blocks endermen should not be able to place blocks on top of, similar to how vanilla hardcodes against them being able to place things on bedrock (#7548) + - 36.0.10 Fix translucent model parts of MultiLayerModels rendering as missing models due to differing rendertypes when rendering block model (#7579) + - 36.0.9 Fix existing file tag provider support looking in the wrong folder for custom tag types (#7576) + - 36.0.8 Propery re-encode registries (#7629) + - 36.0.7 Properly encode registries. (#7626) + - 36.0.6 Inject vanilla dimensions inside worlds missing them (#7599) + - 36.0.5 Introduce a new field_to_instanceof transformer to reduce some simple patches. + - 36.0.4 Fix broken build. + - 36.0.3 Add modded biomes to overworld biome list (#7360) + - 36.0.2 Fix dynamic registries not getting ids assigned correctly from old worlds in specific unordered value insertions. Closes #7586 + - 36.0.1 Optionally add a milk fluid to the vanilla bucket (#7294) + Fixes the previous broken code that was supposed to make mod registered milk returned by the vanilla bucket by allowing mods to enable a milk fluid. + - 36.0.0 1.16.5 Initial Update. + +35.1 +==== + - 35.1.39 Update Coremods, ASM, and include standalone Nashorn to load on J15. + - 35.1.38 Introduce a new field_to_instanceof transformer to reduce some simple patches. + - 35.1.37 Update Coremods, ASM, and include standalone Nashorn to load on J15. + - 35.1.36 Added IWeatherParticleRenderHandler to allow a mod to take control over weather particles and sounds. (#7522) + - 35.1.35 Allow Chunk loading Tickets to opt-into forcing chunk ticks. (#7525) + - 35.1.34 Fix crash when mods add goals to skeleton horses (MC-206338) (#7509) + - 35.1.33 Set WM_CLASS and WM_INSTANCE_NAME for early progress window (#7534) + - 35.1.32 Make UnboundedMapCodec more lenient in decoding dimensions. Fixes MC-197860 (#7527) + - 35.1.31 Fix FML's Config Sync packet not allowing same length filenames in encoder and decoder. Closes #7584 + - 35.1.30 Prevent NPE and deprecated MissingMappings.getMappings function. Closes #6252 + - 35.1.29 Fix entities not correctly being able to be ridden under water. + - 35.1.28 Fix crash when beehive is broken by fake player (#7566) + - 35.1.27 Add supplier variant to `AbstractBlock.Properties#lootFrom` (#7563) + - 35.1.26 Fix ModFileResourcePack.getAllResourceLocations ignoring resourceNamespace. (#7562) + Fixes #7405 + - 35.1.25 Fix missing serializers when deserializing global loot modifiers (#7561) + - 35.1.24 Fix VanillaConnectionNetworkFilter sending out invalid entity properties packets without an entity ID (#7560) + - 35.1.23 Make shear interactions extend to subclasses (#7544) + - 35.1.22 Add a SoundType subclass that uses suppliers (#7538) + - 35.1.21 Fix compound ingredient in shapeless recipes (#7537) Fixes #7530 + - 35.1.20 Fix potential NPE in ForgeHooks.onItemPlaceIntoWorld when passing in null player. (#7505) + - 35.1.19 Fix modded PointOfInterestType's not populating blockstate map when registered (#7503) + - 35.1.18 Add new LivingConversionEvent to control mobs turning into other mobs. (#7386) + - 35.1.17 Add ItemAttributeModifierEvent (#7484) + - 35.1.16 Fix RightClickBlock ALLOW not being implemented (#7426) + - 35.1.15 Quiet down errors related to modders not changing their update urls from the default. + - 35.1.14 Make mod data packs able to be disabled. It'll break things, but that's on you. Closes #6776 + - 35.1.13 Add generated resource tracking to ExistingFileHelper + - 35.1.12 Fix BlockStateProvider item models not knowing about block models + Add tests for this case + - 35.1.11 Override invalidateCaps instead of remove for vanilla TE capability invalidation (#7536) + Properly invalidate patched in vanilla TE caps in invalidateCaps instead of remove so that they get invalidated on chunk unload + - 35.1.10 Make TEs invalidate capabilities when the chunk they are in unloads (#7529) + Fixed LazyOptional potentially notifying invalidation listeners multiple times. + - 35.1.9 Fixed entity navigation to stop entities spinning - MC-94054 (#7520) + - 35.1.8 Fix wrong function call in BlockStateProvider::horizontalFaceBlock (#7514) + - 35.1.7 Fix datagen order of multipart conditions being unstable + - 35.1.6 Fix forge config option for default world type not applying unless you change the default world type (#7521) + - 35.1.5 Implement feature for mods to define new world types (#7448) + * Mods can now register world types via a new forge registry, and optionally register a settings screen to tweak them. + * The default world type for dedicated servers and singleplayer world creation is configurable via forge's common config. + - 35.1.4 Fix dimType not encode to registries (#7513) + - 35.1.3 Add support for referencing forge's resources and specifying existing mods to data generators (#7456) + - 35.1.2 Fix #6692 + Thanks @AterAnimAvis for help and suggestions + - 35.1.1 Fix translucent blocks not rendering properly when moved by pistons on fabulous (#7441) + - 35.1.0 Bump version for RB. + +35.0 +==== + - 35.0.22 Fix food bar not rendering when non-living entities are mounted (#7446) + - 35.0.21 Fix MC-194811 - Removing structures causes chunk save errors. + - 35.0.20 Fix concurrency issue in StartupMessageManager (#7483) + - 35.0.19 Fix forge registry types that have private constructors (BlockStateProviderType, BlockPlacerType, FoliagePlacerType, TreeDecoratorType) (#7482) + - 35.0.18 Fix problem where the absence of forge and MC in later loading triggered a weird crash. + - 35.0.17 Fix NPE problem when modid is mismatched. + - 35.0.16 Return the processed modlist data to the upstream system, not the raw unprocessed data. Should resolve the problem + that mixin complains about missing info when it's in a "crashed" situation. + - 35.0.15 Fix dims on servers not loading the first run (#7445) + - 35.0.14 Allow for custom argument types by filtering them on vanilla connections (#7463) + - 35.0.13 Add Player context to AnvilUpdateEvent (#7442) + - 35.0.12 Don't overwrite PlayerAdvancement's player with a fake one (#7454) + If a FakePlayer is constructed with the same UUID/GameProfile as a + currently active player, the player object within PlayerAdvancement is + set to the fake player. + As fake players cannot receive advancements (see grantCriterion), this + prevents the actual player from receiving any advancements until they + change dimension/relog. + - 35.0.11 Add BannerBlock.forColor to SAS to fix banner.toItem() on servers. + - 35.0.10 Call Harvest check event even if the block doesn't require any tool (#7414) + - 35.0.9 Use linked collections to stabilize order when adding new registry entries. + - 35.0.8 Render local player when the renderViewEntity is not the local player (#7216) + - 35.0.7 Some help in ExtensionPoint regarding DISPLAYTEST. Let's improve those tick rates! + - 35.0.6 Handle erroring during early mod construction phases, and actually report that into the error UI + by doing armslength exception handling and propagation. + - 35.0.5 Support backwards loading 1.16.3 mods in 1.16.4, because we are able to do that. Tweak loading a bit to be smarter about dependency errors of various kinds. + - 35.0.4 Add FluidStack codec, and a test mod that verifies its behaviour matches the existing write/read logic. + Add missing license headers. + - 35.0.3 Update event bus version (should be 3.0.5) + Tweak MDK to automatically populate recommended values for things like forge version, loader version and minecraft version. + - 35.0.2 Workaround for modded attributes on vanilla entities logging warnings on vanilla clients + Switch to a handler-based approach per packet class, simplify patch, add some docs + Add license header and docs + Switch to a network handler based approach + Switch to a network handler based approach + revert build gradle change + Simplify Packet patch + Add license header to IForgePacket + Revert ForgeHooks changes + Less hacky and more generic way to filter packets for vanilla connections + _Actually_ Order SAS. + It's early + Order SAS + simplify vanilla connection check + Remove unneeded import change + - 35.0.1 Fix early sorting bug that meant the file deduping was causing an error, to, well, not cause it, so we can get to an error screen. + - 35.0.0 1.16.4 Initial Update + +34.1 +==== + - 34.1.42 Fix Biomes not properly copying over ids loaded from the save to the new Dynamic Registry. + - 34.1.41 Introduce custom loader additions to the model data generators. (#7450) + Currently implemented loaders: + * OBJ + * Composite + * Multi-layer + * Item layers (vanilla item/generated but with fullbright texture support) + * Bucket + * Separate Perspective + - 34.1.40 actually rollback on error in registry events. + - 34.1.39 Fix config parse failure causing crash in building exception message. fixes #7438 + - 34.1.38 Auto-detect ansi support for log4j2 + move to fml.loading subpackage + Add license header + - 34.1.37 Return client resources even if no data pack found on server. Closes #6225 (Pull request) + - 34.1.36 Update modlauncher. fixes #7452 + - 34.1.35 Fix (NonNull)Lazy.Concurrent using a global lock (#7403) + * Fix Lazy.Concurrent using a global lock, thus preventing multiple threads from resolving independent Lazy's at the same time + * Use Lazy with an added null check to implement NonNullLazy + - 34.1.34 Update forge mappings to 20201028-1.16.3 (#7435) + - 34.1.33 Fix breaking changes from the Biome rename PR #7434 (#7439) + - 34.1.32 Reimplement nametag distance attribute, fix attribute translation keys (#7387) + - 34.1.31 Fix data pack biomes failing to load in SingleBiomeProvider (#7434) + - 34.1.30 Add in proper handling of equals and hashcode for modjar urls. Fixes very slow loading on windows. + - 34.1.29 Force 8.0.5 ML + - 34.1.28 Restore FingerprintViolationEvent with appropriate THIS IS F*CKING DEAD DELET WARNINGS. + Also, notify in UI if using legacy JDK without capability to read out security data from mod jars. + - 34.1.27 Add signature reporting for mods, using new signature capture from ModLauncher. Need to figure out + how to reflect Minecraft's JAR signatures into here. + - 34.1.26 Rollback registries to vanilla state if something happens during loading, so subsequent activities can still run and not generate false reports.. + - 34.1.25 Fix mcp_snapshot mapping issue causing unneeded patches. Closes #7424 + - 34.1.24 Fix resource leak in the OBJ loader. + - 34.1.23 Fix issue with ITeleporter allowing easier use of vanilla logic. (#7317) + - 34.1.22 Adds tag support for Enchantments, Potions, and TileEntityTypes (#7379) + - 34.1.21 Resuscitate BiomeDictionary using RegistryKeys instead of biome references. + - 34.1.20 Add event for player changing game mode (#7355) + - 34.1.19 Fix RCON multipacket responses not actually understanding UTF8. + - 34.1.18 Fix RCON not sending newlines in output for multiline. Fixes https://bugs.mojang.com/browse/MC-7569, a very old bug that is really annoying if you use RCON. + - 34.1.17 Fix Texture Presence String (#7408) + - 34.1.16 Fix typo causing potential error in vine growth. Closes #7406 + Sort missing registry dumps by name, making it easier to read. + - 34.1.15 Fixed conditional advancement loading when using the "advancements" array. + Added automatic generation of conditional advancements from the criteria in the conditional recipe entries. + Added advancement name calculation from the recipe ID. + - 34.1.14 Additions to the mdk build.gradle to accommodate datagens. (#7398) + - 34.1.13 Added Basic Class-Level SAS Capability to checkSAS, added Vector4f to SAS (#7385) + - 34.1.12 Add hooks to allow modification of structures spawn lists (#7344) + - 34.1.11 Add back patches to Screen allowing for item tooltips to be auto wrapped again (#7378) + Only deals with the methods receiving an ItemStack or ITextComponent(s), the methods that take IReorderingProcessor(s) are left alone. + - 34.1.10 Bump mixin version to 0.8.2 + - 34.1.9 Add in extra debug logging + - 34.1.8 Remove redundant call to CrashReport generator - Vanilla is doing a crashreport for itself at startup now. + Add a UUID into crashreport that is also logged in all channels at crash report generation time. This will allow to associate crash reports and the logs. + - 34.1.7 Fix doc README and answer lex's question + - 34.1.6 Modify how ModLoadingStage handles dispatch to Registry Events. Stops the objectholder spam and generally improves performance on larger packs. + - 34.1.5 Added "Bukkit Plugin" to InvalidModIdentifier (#7384) + - 34.1.4 Fix vanilla Campfire smoke bug. MC-201374 (#7381) + - 34.1.3 Fix toggleable keybindings still being active while in GUI Fixes #7370 (#7373) + - 34.1.2 Fix modded EntityClassifications not being useable in the codec. (#7337) + - 34.1.1 Support effective materials of vanilla AxeItem (#7351) + - 34.1.0 Prep new RB. + +34.0 +==== + - 34.0.21 Fix grass disappearing when alwaysSetupTerrainOffThread is true (#7291) + - 34.0.20 Accessors for inspecting and removal of biome generation settings. Fixed carvers still being immutable. (#7339) + - 34.0.19 Revive BiomeManager and BiomeLayer hooks. + - 34.0.18 Fix a few minor issues with custom tag types and fix OptionalNamedTags (#7316) + - 34.0.17 Fix ToggleableKeyBinding differences to vanilla. (#7338) + - 34.0.16 Fix forge light pipeline applying block offsets twice (#7323) + - 34.0.15 Updated build badge versions to 1.16.3 in readme (#7325) + - 34.0.14 Add a better license error screen (#7350) + - 34.0.13 Fixed container item being consumed in brewing stand. #7307 (#7314) + - 34.0.12 Fix parse results of CommandEvent being disregarded (#7303) + - 34.0.11 [1.16] Fix possible crash when using rendering regionCache (#7207) + - 34.0.10 [1.16] Reimplement ICloudRenderHandler, ISkyRenderHandler and IWeatherRenderHandler (#6994) + - 34.0.9 Make Biome.Climate and BiomeAmbiance fields accessible (#7336) + - 34.0.8 Use mixin 0.8.1. Should fix problems with mixin not working properly with latest modlauncher. + - 34.0.7 Sets the empty/fill sounds for vanilla fluids. + Use Fluid's fillSound rather than emptySound when filling buckets. + - 34.0.6 Add MatrixStack-aware alternatives to the methods in GuiUtils (#7127) + - 34.0.5 Fix json biomes not setting registry name correctly for the BiomeLoadingEvent. (#7329) + - 34.0.4 Fix inconsistencies in how the values from the model are passed into the baked model. + This puts them in line with vanilla, as intended. + - 34.0.3 Reimplemented drawHoveringText (#7268) + - 34.0.2 New BiomeLoadingEvent that allows modders to edit biomes as they are being deserialized. + - 34.0.1 Bump MCP version for lambda issue. + - 34.0.0 1.16.3 Update + Also included a bunch of warning cleanups. + +33.0 +==== + - 33.0.59 Fix tile entities being replaced when not needed. (#7318) + - 33.0.58 Fix exception when getting rendering box for tile entities with no collision boxes. (#7301) + - 33.0.57 More crash reporting tweaks. Don't crash when trying to show warnings. Also, put the exception name in the error screen on the second line! + - 33.0.56 Fix Minecart speed cap on rail being initialized to 0 (#7315) + - 33.0.55 Add support for custom tag types (#7289) + - 33.0.54 More crash report tweaks. Put a button to open the generated crash report on the error screen, tweak formatting of crash report, and add the enhanced stack trace data (transformers et al) + - 33.0.53 New hook for better custom scaffolding movement (#7261) + - 33.0.52 Fixed crash with zip paths (#7300) + - 33.0.51 Fix custom teleporters NPE (#7296) + - 33.0.50 Prevent duplicate wrapper tags from crashing (#7283) + - 33.0.49 Add partialTicks to RenderNameplateEvent (#7277) + - 33.0.48 Fixing logic in getCurrentRailPosition to correctly identify the rail… (#7276) + - 33.0.47 [1.16.x] Fixes for Bamboo, Enchantments and Conduits, small adjustments to bring some patches closer to the vanilla code. (#7239) + - 33.0.46 Bump resource pack version to 6 (#7299) + - 33.0.45 Remove dead ForgeHooks.canToolHarvestBlock function. (#7262) + - 33.0.44 Re-implement DrawHighlightEvent$HighlightEntity Firing (#7233) + - 33.0.43 Reimplement FarmlandWaterManager (#7213) + - 33.0.42 Add dataprovider for Global Loot Modifiers (#6960) + - 33.0.41 Fix crash when dumping crash report for an exception that has a null cause (#7308) + - 33.0.40 Tweak crash report dump to visit all the causes up to the top. + - 33.0.39 Fix ExplodedDirectoryLocator visiting non-existent paths. Closes #7203 + Also, bump modlauncher to 7.0.1 to fix resources. + - 33.0.38 Fix some potential issues in crash dumping during mod loading + - 33.0.37 Park the polling thread for a bit, if we're not the one driving the task list forwards. This allows for the actual driver to work on low cpu count machines. + - 33.0.36 Use new enumeration mechanism in ModLauncher, to allow getResources to work. This enables serviceloader-in-mods, and other stuff that might need to visit multiple mod jars. Also, tweaked the visitor code slightly, may result in a trivial performance change. Closing #7302 as it's not really relevant any more. + - 33.0.35 Fix compiler issue in eclipse properly + - 33.0.34 Fix crash caused by previous commit (#7298) + - 33.0.33 Dirty casting hacks to fix eclipse compiler inference issue. I'm sorry cpw. + - 33.0.32 Fix broken ExistingFileHelper import + Add licenses to some new files + - 33.0.31 Add validation via resources for tag providers (#7271) + BREAKING CHANGE: Moved ExistingFileHelper to common package + Remove various workarounds from forge tag providers + - 33.0.30 Move the "modloading" thread activity onto _our_ worker pool. It turns out that the vanilla worker pool can deadlock during stitching if it's insufficiently large, if modloader "waitForTransition" is also a worker member of that pool. + Closes #7293 (to reproduce issue easily, modify Util.func_240979_a_ and change the values in the MathHelper.clamp call). I've verified that 3 and below for "max" cause the problem. (I didn't test a whole range of values, just sufficient to reproduce problem and verify fix). Note that setting it to zero (and using the "direct executor" that's inaccessible in normal operation) works as well with this fix. + - 33.0.29 Fix missed debugging code. Read the config from the config. + - 33.0.28 Fix up slight registry change and other 1.16.2 stuffs. + - 33.0.27 Merge branch '1.16.1' into 1.16.x + # Conflicts: + # patches/minecraft/net/minecraft/client/Minecraft.java.patch + # patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch + # src/main/java/net/minecraftforge/fml/client/ClientModLoader.java + # src/main/java/net/minecraftforge/registries/GameData.java + - 33.0.26 Fix up all the things. Removed SidedProvider because it served no real purpose anymore. + - 33.0.25 Merge branch '1.16.x' into 1.16.1 + # Conflicts: + # src/main/java/net/minecraftforge/fml/ModList.java + # src/main/java/net/minecraftforge/fml/client/ClientModLoader.java + - 33.0.24 Redo event dispatch, removes a bunch of nonsense, and tries to integrate with the vanilla CF system where possible + - 33.0.23 Add particle culling (#6981) + - 33.0.22 Wrap vanilla's 'default' biome registry in ForgeRegistry. + This should allow registering mod dimensions like in 1.16.1, while the data driven system is fleshed out. + - 33.0.21 Clarify in the LazyOptional which methods carry the lazyness over to the returned value and which don't. (#6750) + For consistency, this meant making a few changes: + - Renamed the existing lazy mapping method to lazyMap, to indicate that it doesn't run the mapping immediately. + - Added a new implementation of map(), which returns Optional, and resolves the value in the process. + - Changed filter() to return Optional, since there's no way to filter lazily. + - Added a new method resolve(), which helps convert the custom LazyOptional class into a standard Optional, for use + with library methods that expect Optional. + * Update License headers. + - 33.0.20 Add user-friendly exceptions when config loading fails (#7214) + - 33.0.19 Replace EntityHeight event with EntitySize event (#6858) + - 33.0.18 [1.16] ForgeEventFactory#canCreateFluidSource reintroduced (#7181) + - 33.0.17 Cleanup and expand Forge tags (#7004) + - 33.0.16 Fix modproperties property in mods.toml causing exception (#7192) + - 33.0.15 Log info about server list warning (#7209) + Make it easier to figure out what mods are missing or have to be marked as client/server side only. + - 33.0.14 Fix ItemStack#isDamageable is not calling Item#isDamagable (#7221) + - 33.0.13 Improve performance and cleanup code for DelegatingResourcePack (#7228) + - 33.0.12 Fix small logging issues with loading pack.png for mods (#7265) + - 33.0.11 Fix config iteration order (#7230) + - 33.0.10 Cleanup Forge's build script, fix some unneeded patches. + Add checkExcscheckAll tasks. + - 33.0.9 Readding DifficultyChangeEvent hooks (#7240) + - 33.0.8 Improve startup time by caching the manifest data for mod jars (#7256) + - 33.0.7 Removed HarvestDropsEvent (#7193) + - 33.0.6 Remove forge optional tags in favor of Vanilla's new system. (#7246) + - 33.0.5 New method for creating modded tag references, fix connecting to vanilla servers. + - 33.0.4 Fix creating nether portals. + - 33.0.3 Print mod file name on InvalidModFileException (#7241) + - 33.0.2 Updated MDK and README for 1.16.2 (#7243) + - 33.0.1 Fix server connection, misapplied patch (#7245) + - 33.0.0 Initial 1.16.2 Update + +32.0 +==== + - 32.0.110 Fix ModelRegistryEvent firing every time resources reload instead of just once. + - 32.0.109 Move ModelRegistryEvent invocation to when the model loading is about to start. + Freeze the ModelLoaderRegistry right after this event happens, just before model loading actually begins. + This means ModelRegistryEvent is now the correct place to register loaders, as it was intended. + This is a slight breaking change, but any mod that used FMLClientSetupEvent before will need to be updated regardless due to the existing race condition. + - 32.0.108 Fix wrong BlockState param passed into canSustainPlant from FarmlandBlock (#7212) + - 32.0.107 Add harvest levels for hoes and new 1.16 blocks for pickaxes Fixes #7187 (#7189) + - 32.0.106 Fix debug world not generating modded blocks (#6926) + - 32.0.105 New IForgeBlock#getToolModifiedState hook allow better control over tools interacting with blocks. (#7176) + - 32.0.104 Added new hook to allow Biomes to control their Edge biomes (#7000) + - 32.0.103 Add support for custom elytra (#7202) + - 32.0.102 Re-introduce "outdated" notification on Mods button in main menu (#7123) + - 32.0.101 Fix RenderTickEvent using wrong partial ticks value when game is paused. Fixes #6991 (#7208) + - 32.0.100 Implement forge IBakedModel methods in vanilla wrapper models + - 32.0.99 Fix another case of swallowed errors not shutting down mods. + - 32.0.98 Revert "Properly shutdown FMLModContainer's event bus when an error in a lifecycle event is detected." + This reverts commit 30bad1e2 + - 32.0.97 Revert "Shut down all other mod handlers if the loading cycle errors. This prevents other mods from throwing errors and being blamed for initial cause. This is a temporary hack until cpw re-writes the mod event dispatcher." + This reverts commit 7592bbe8 + - 32.0.96 Shut down all other mod handlers if the loading cycle errors. + This prevents other mods from throwing errors and being blamed for initial cause. + This is a temporary hack until cpw re-writes the mod event dispatcher. + - 32.0.95 Properly shutdown FMLModContainer's event bus when an error in a lifecycle event is detected. + - 32.0.94 Enable EventBus type check during ForgeDev, and add IModBusEvent marker to ModelRegistryEvent. + - 32.0.93 Make license toml entry optional during 1.16.1 + There are to many existing mods to make this required. + Yes, we are technically before a RB and can do breaking changes. However this is too large. + - 32.0.92 Missed one event. NewRegistry needs the marker. + - 32.0.91 Update MDK license to default to All rights reserved, and offer a link to chooseyourlicense.com as a place to research appropriate licenses. + Note: the license field _is_ backwards compatible and will simply be ignored on older forge versions. + - 32.0.90 Update coremods and spi, include mandatory license field in metadata. Added at top level of mods.toml file. + - 32.0.89 Update modlauncher, eventbus, accesstransformers and more to use a newer mechanism for generating ASM. + Introduced IModBusEvent as a marker interface for events on the ModBus. Expect exceptions if you use + the modbus for events not listened there. + - 32.0.88 Fix rail 180 rotations (#7177) + - 32.0.87 Fire AnimalTameEvent for cats (#7172) Closes #7171 + - 32.0.86 Fix Biome generation error. + - 32.0.85 Fix SleepingTimeCheckEvent not being fired in initial sleep test. (#7005) + - 32.0.84 Fix ClimberPathNavigator spinning when width is small. Closes #6993 (#6997) + - 32.0.83 Re-added PlayerEvent.NameFormat (#6992) + - 32.0.82 Fixed modded overworld biomes not spawning [1.16.x] (#6990) + - 32.0.81 Added EntityLeaveWorldEvent (#6984) + - 32.0.80 Re-implement moddable flammabilities (#6983) + - 32.0.79 Updated versions in README and removed flocker.tv mentions (#6978) + - 32.0.78 Re-add patch for PlayerSetSpawnEvent (#6977) + - 32.0.77 Fix ChunkDataEvents using different data tags (#6961) Fixes #6957 + - 32.0.76 Post SoundLoadEvent on mod bus instead of forge bus (#6955) + - 32.0.75 Remove startupquery. Currently wasn't functional, and 1.16 has out of band state loading in all cases, so the complex functionality there is no longer needed. Going to research using the Lifecycle indicator from DFU as a proxy/replacement. Probably with some codec FUN. + - 32.0.74 Run Forge's data generators to sync 1.16 vanilla changes. + - 32.0.73 Don't show the early launcher GUI when running data. It's not needed and prevents use on automated builds. + Need to investigate why a bunch of tags seem to be being blown away by rerunning on forge. + - 32.0.72 Add mixin + - 32.0.71 Load Modded Datapacks in DatapackScreen, before world creation (#6913) + - 32.0.70 Fix inconsistencies with model/blockstate datagen + - 32.0.69 Filter duplicate mod files from mod file scan data (#6855) + - 32.0.68 Fixed Forge commands. Closes #6973 Closes #6974 Closes #6976 + - 32.0.67 Added an event for registering commands. closes #6968 (#6969) + - 32.0.66 Make all functions in Style common. (#6931) + - 32.0.65 Mark Raid.WaveMembers as an extensible enum. (#6878) + - 32.0.64 Fix checkPatches task. Closes #6956 + Fix patched in method using srg name. Closes #6965 + Fix capabilities not being collected for ClientWorld. Closes #6966 + Fix TagEmptyCondition using client side copy of tags instead of server. Closes #6949 + Fix ExtendedButton using narrator text. Closes #6958, Closes #6959 + Fix misaligned patch in RepairContainer. Closes #6950, Closes #6953 + Fix LivingJumpEvent not being fired for players jumping horses. Closes #6929 + Remove extra getToughness method in ArmorItem. Closes #6970 + Remove GetCollisionBoxesEvent. Closes #6921 + - 32.0.63 Fix race condition with DeferredRegister for custom registries (#6951) + - 32.0.62 Remove hooks into beacon base/payments. Vanilla uses tags now for extensibility. (#6948) + - 32.0.61 Expose the DataPackRegistries instance to the AddReloadListenerEvent (#6933) + - 32.0.60 Fix canRepair not being set true as default (#6936) + Closes #6934 and #6935 + - 32.0.59 Fix misaligned patch causing LivingEquipmentChangeEvent to never be posted. + - 32.0.58 Fix particles sometimes "losing" the lightmap and drawing fullbright. + - 32.0.57 Add simple patch checker and cleanup patches (#6851) + * Add simple patch checker and cleanup patches + * Address comments + * move task implementation + * genPatches is now finalized by checkPatches + * the S2S artifacts are automatically removed + * added class and method access checking + - 32.0.56 Fix the modifier combined name for keybinds displaying two pluses outside of forgedev #6901 (#6902) + - 32.0.55 Fix harvest level and tool type not actually getting set #6906 (#6922) + - 32.0.54 Reimplement ITeleporter Patches (#6886) + - 32.0.53 Add function to add items with the same behavior as the pumpkin for enderman (#6890) + - 32.0.52 Custom Item integration with Piglins (#6914) + - 32.0.51 Some dead code cleanup, and re-implement some bed hooks. (#6903) + - 32.0.50 Fix missing null checks in ForgeIngameGui (#6907) + - 32.0.49 Fix swap offhand keybind not working in GUIs (#6920) + - 32.0.48 New AddReloadListenerEvent that gathers server side data reload handlers. (#6849) + - 32.0.47 Attempt to use a more compatible method to initialize stencil support. + In case the separate attachments don't work for everyone, there's a new setting to choose the combined attachment. + - 32.0.46 Fix multi-layer item rendering. + - 32.0.45 Update copyright year to 2020. + - 32.0.44 Model system improvements: + - Port some things I did in 1.14 which I couldn't do in 1.15 due to breaking changes. + - Fix multi-layer block models not working (1.16 RenderType doesn't override toString the same way anymore) + - Implement multi-layer item rendering. + - Improve CompositeModel submodel data passing. + - 32.0.43 Pass matrixstack in tooltip render events (#6885) + - 32.0.42 Include model data in getQuads call (#6884) + The model data wasn't included when getting quads from specific sides, but was when getting quads for side = null. + - 32.0.41 Fix improper handling of baked lighting in forge light pipeline + Closes #6812 + - 32.0.40 Fix FMLServerAboutToStartEvent being fired too late on the integrated server https://github.com/MinecraftForge/MinecraftForge/issues/6859 + - 32.0.39 Fix miss-aligned patch ItemEntity (#6895) + - 32.0.38 Add hoe tool type (#6872) + - 32.0.37 Fix loading screen color and text (#6824) + - 32.0.36 Allow any armor to have custom knockback resistance (#6877) + - 32.0.35 Add senderUUID to ClientChatReceivedEvent (#6881) + - 32.0.34 Re-write checkATs function and automate making Items/Blocks public. + - 32.0.33 Reorganize modloading on the dediserver. This removes the DedicatedServer parameter from the FMLDedicatedServerSetupEvent. + Code for customizing the server instance should be moved to the ServerAboutToStartEvent or similar, where the server instance + is available. + This reorganization means that mods will load fully before the server is even constructed, or the server properties loaded. We also move the EULA right to the front so we don't have to wait for bootstrap. + This should fix the problems with mods which customize world data and other things. + - 32.0.32 Fix datagen resolving tags and exploding. (#6865) + - 32.0.31 Fix Language.javaLocale parsing (#6862) + - 32.0.30 Fix IItemHandler wrappers for chests not updating both chests (#6875) + - 32.0.29 Fix missed patch in PlayerList and EntitySelectioonContext. Closes #6846 Closes #6850 + - 32.0.28 Make Type classes safe to use in concurrent loading (#6825) + - 32.0.27 Fix access levels being hardcoded to private via patch overriding AT entry (#6848) + - 32.0.26 Fix tag related issues when connecting to a vanilla server. + - 32.0.25 Fix Forge's internal handler being registered in wrong place. + Fix double call to loader end. + - 32.0.24 Add a model loader that lets mods specify different models for different perspectives. + Allow custom models to reference vanilla item models as child models. + - 32.0.23 Fix swim speed being incorrect. Closes #6845 + Fix BreakSpeedEvent having null position. Closes #6844 + Add MatrixStack to BackgroundDrawnEvent. Closes #6843 + Fix some patches that should of been ATs. Closes #6839 + Add getter to ServerPlayer to access client's language calue if sent. Closes #6829 + Some patch cleanup. + - 32.0.22 Fix blocks being harvested with incorrect tools. + - 32.0.21 fix misapplied patch + also sneak in an import patch removal + - 32.0.20 Make installer use MCPConfig version to identify MC assets. + - 32.0.19 Tweak the server startup a bit, make sure methods that can't work because they run before a server exists explode saying so. + Also fix other launch profiles. + - 32.0.18 Fix dedicated server loading by constructing mods before data packs are created. + - 32.0.17 Fix create method. + Fix test mods not loading correctly. + - 32.0.16 Reintroduce missed patch in EntityClassification. + - 32.0.15 Include a getter for the matrix stack in OverlayEvent (#6834) + - 32.0.14 Fix block render types not being properly applied to item entities (#6832) + - 32.0.13 [1.16.x] Allow GlobalEntityTypeAttributes' EntityType -> AttributeModifierMap to be added to (#6822) + * Make GlobalEntityTypeAttributes map able to be added to + * Split get patch into two lines + * Favor Forge's map over vanilla + - 32.0.12 Fixed creative screen arrows (#6827) + - 32.0.11 Added call to method for tooltip with FontRenderer (#6831) + - 32.0.10 Retarget Block.Properties patch to the new AbstractBlock, reintroduce harvestLevel and harvestTool fields (#6819) + * Retarget Block.Properties patch to the new AbstractBlock, reintroduces the harvestLevel and harvestTool fields. + * Slight adjustment to fix the lootTableSupplier. + - 32.0.9 Fixed sneaking while swimming (#6817) + - 32.0.8 Fixed tooltip rendering issues (#6815) + - 32.0.7 Fixed villager trades having non-applicable enchants + Also added an AT at lex's request + - 32.0.6 Updated MDK mods.toml versions (#6808) + - 32.0.5 Add missing patch to ScreenShotHelper (#6809) + Adds the missed patch back + - 32.0.4 Fix block drops (#6810) + - 32.0.3 Fix locate command (#6811) + - 32.0.2 Rework BlockSnapshot and fix client notifications. Closes #6807 + - 32.0.1 Bump MCPConfig version. + - 32.0.0 Update to 1.16.1 and fix a couple more patch problems + +31.2 +==== + - 31.2.33 Fix some patching derps from 1.15 merge + - 31.2.32 Clean up legacy cruft + - 31.2.31 Final patching + - 31.2.30 Compiling fixes - IN GAME! + - 31.2.29 Patching and updates + - 31.2.28 Setup and import of 1.16 YEET + - 31.2.27 Allow RayTraceContext to be constructed with a null entity. (#6708) + - 31.2.26 Replace explicit shears reference in vanilla loot tables with tag for modded shears. (#6765) + - 31.2.25 Fix cache file sorting issue on linux (#6793) + - 31.2.24 Fire jump event for horses when ridden (#6802) + - 31.2.23 Modify how modfiles load slightly, for better decoupling. + - 31.2.22 Throw an exception from DeferredRegister when trying to register entries after registry event has fired (#6789) + - 31.2.21 Potential userProperties Fix (#6740) + - 31.2.20 Add system for dimensions to be marked for deletion (#6515) + - 31.2.19 Fix dedicated server issue in some implementations of Block.getPickBlock. Closes #6566 + - 31.2.18 Fire SpecialSpawn event for mobs spawners. Closes #6700 + - 31.2.17 Remove the yellow coloring on hover in ExtendedButton to match vanilla behavior. Closes #6714 Closes #6713 + - 31.2.16 Fix entity pathing not matching vanilla. Closes #6755 + - 31.2.15 Fixed --server argument crashing the client (#6754) + Closes #6753 + Moving the fadeOutStart setter above the callback invocation prevents re-entry into the block (which would result in an infinite loop and a StackOverflowException) if the callback causes a render tick (which creating a new ConnectionScreen does). + - 31.2.14 Fixed ItemStack comparison ignoring capabilities when stack nbt is null. (#6764) + - 31.2.13 Supply matrixstack to IRenderHandler where possible. Closes #6439 (#6537) + - 31.2.12 Fix StartupQuery not working more than once on the client (#6699) + - 31.2.11 Added ProjectileImpactEvent.FireworkRocket (#6758) + - 31.2.10 Add custom registry type support to DeferredRegister. (#6742) + It's still a hard dependency because it requires a class reference. + But there is not a sane way to test registry types without a class reference. + - 31.2.9 Fix "overlayMessage" rendering in ForgeIngameGui being different than vanilla (#6748) + - 31.2.8 Implement loader for ItemLayerModel. + Add support for specifying which layers are fullbright. + Fix improper generation of model edge. - Thanks to iChun and KnightMiner for the fix suggestions. + - 31.2.7 Remove dead test classes. + - 31.2.6 Add --flat argument to data generators to not create data in mod specific directores. + Useful For Forge's test mods mainly. + Standardized data gen cache file's folder separators. + Added ItemModelProvider to BlockStateProvider for cleaner datagen code. + Added .gitattributes to fix datagen json's line endings correct on windows. + - 31.2.5 Improve the DistExecutor API and introduce some "almost completely" safe mechanisms to handle sided lambdas. + In general, use sided lambdas safely by embedding them in a separately loaded class. There's a whole twitch stream + dedicated to investigating this problem. See link in DistExecutor if you're interested. + - 31.2.4 Fix typo in new registry fields' names + Note: this is technically a breaking change. If you for some reason added code referencing these two fields in the last few hours, sorry. + - 31.2.3 Fix server startup query info not including new text + - 31.2.2 Improve look of notification GUI, improve StartupQuery API + - 31.2.1 Add forge registries for applicable new registry types + Expose constructors for all forge registry entries + Also, remove deprecation on ItemCameraTransforms/TransformType + - 31.2.0 Bump version for new RB. + +31.1 +==== + - 31.1.99 Update MCP Mappings. + - 31.1.98 fix test mod and add warning comment to framebuffer (#6698) + - 31.1.97 Fix FireBlock using flammability instead of spread speed when looking for places to spread. Closes #6646 + - 31.1.96 Fix incorrect argument passed in RenderPipeline potentially causing crash. #6677 + - 31.1.95 Re-added patch to enable stencil buffer in net.minecraft.client.shader.Framebuffer + Add test for the stencil buffer feature. Only tests that it doesn't crash when enabling, for now. - giga + - 31.1.94 Allow Music Discs to be created with SoundEvent delegates. (#6523) + - 31.1.93 Use IProperty#getName when generating blockstate jsons (#6582) + Close #6520 + - 31.1.92 Model system fixes: + - Add "origin" key to determine what origin to use. This will default to the existing (broken) behaviour to avoid breaking changes. + - Fix interaction of transforms with variant transforms (transformation ordering). + - Fix OBJ loader ignoring "diffuseLighting" attribute from the json. + This attribute will continue not being used if "ambientToFullbright" is on (default) to avoid breaking changes. + - 31.1.91 Fixed typo in registry alias writing causing infinite loop. Closes #6689 + - 31.1.90 Fixed Partivle.onGround not updating correctly due to decompile error. Closes #6595 + - 31.1.89 Remove duplicate post of ChunkEvent.Load. (#6697) + - 31.1.88 Fix LevelChange event not firing after enchanting (#6693) + - 31.1.87 Fix server config directory remaining locked when integrated server is shut down. (#6644) + - 31.1.86 Fix exclusion of coremods not filtering correctly when the mods directory is a symbolic link. (#6600) + - 31.1.85 Allow Bees to use custom hives. (#6656) + - 31.1.84 Fixed tile entities persisting when switching between states that don't have TEs without changing the block. (#6674) + - 31.1.83 Fixed CropGrowEvents not firing for Bamboo (#6680) + - 31.1.82 Fix vanilla screens escape key not matching done button behavior (#6682) + - 31.1.81 Fixed FluidTank.drain calling onContentsChanged when simulating (#6684) + - 31.1.80 Fix infinite loading screen when resources error. Closes #6592 & #6593 + - 31.1.79 Fix IForgeBlock.removedByPlayer not firing on the client. (#6638) + - 31.1.78 Update to newer eventbus, with typetools compatibility with jvms up to j14. No guarantees on actual game compatibility however. + - 31.1.77 Fixed informational /forge commands being repeated to all ops when logging is enabled. Closes #6330 + - 31.1.76 Fix ModListScreen escape key not matching done button behavior. Closes #6672 + - 31.1.75 Patch the bucket logic to not hardcode some checks to WATER. Fixes not being able to place custom fluids into modded fluid-loggable blocks that accept fluids other than water. + - 31.1.74 Avoid discarding the bottom 4 bits of the lightmap coords. It turns out vanilla relies on those bits. Fixes some blocks being darker than they should be in certain circumstances. + - 31.1.73 Fix issue with providing a null ItemStack to onPlayerDestroyItem (#6633) + - 31.1.72 Allow overriding of tool level requirements when harvesting a block, via the HarvestCheck event. (#6632) + - 31.1.71 Fixed Hoppers not inserting fully into custom contains with slots that can hold more then max stack (#6631) + - 31.1.70 Fixed ChunkDataEvent.Save being fired with a null world if chunk isn't fully generated when unloaded. (#6628) + - 31.1.69 Fix vanilla loot table resource leak. (#6622) + - 31.1.68 Change recipe condition log level to debug. (#6621) + - 31.1.67 Fix milk buckets removing potion effects without filters. (#6609) + - 31.1.66 Added missing localization for swim speed, and reach distance attributes (#6585) + - 31.1.65 Allow colors of tooltip to be specified in GuiUtils.drawHoveringText tooltip methods (#6579) + - 31.1.64 Fix config comments referencing disallowed enum values. (#6542) + - 31.1.63 Remove redundant call to modifyLoot. Closes #6657 + - 31.1.62 Fix various issues with the loading screen and datagen + Fix NPE on datagen startup + Fix early loading GUI hanging and never terminating after datagen + Add loading GUI messages for datagen + - 31.1.61 Fix BackgroundScanHandler crashing on servers (#6660) + - 31.1.60 Remove silly icon override. Squirrels are fun y'all.. + - 31.1.59 Rename window icon image to avoid conflict, fix not using vanilla icon + - 31.1.58 Fix VariantList calling deprecated bake method + - 31.1.57 Fix resource packs not being sorted properly. Closes #6287 + - 31.1.56 Fix Automatic Event Subscriber not detecting mod id defaults, and fix test mods. + - 31.1.55 Use forge logo as short term window Icon, fix Buffer cast problems for new JDK stupid. + - 31.1.54 Handle message display a bit better, try to make the UI tick a bit better.. Still a problem with + a modelbake right at the end, happening on the window flip. + - 31.1.53 Move ClientVisualization to secondary thread + - 31.1.52 move handOffWindow down near start() + - 31.1.51 merge early startup into main window if used. It seems to work well.. Also ticks window on main thread, so mac compatible now. + - 31.1.50 Update jenkinsfile and gradle for new versions of things.. + - 31.1.49 Fix potential NPEs in RegistryObject.orElseThrow/isPresent/ifPresent Closes #6647 + - 31.1.48 Add tickRate setter to the ForgeFlowingFluid Properties builder. + - 31.1.47 Fix recursion mess in PlayerAdvancement loading, by using an alternative based on a toposorted list of all advancements. + It seems to be fully equivalent in testing, but there may be corner cases, so there is a config to disable, though disabling + may break servers, especially those chunkloading fake players. + - 31.1.46 Revert defualt jvm args. + - 31.1.45 Fixed dev time compilation using J9+ producing incorrect bytecode. + - 31.1.44 Add "type" field to global loot modifier jsons. (#6554) + * Add "type" field to global loot modifier jsons and fix tests. + To avoid binary breaking, "type" defaults to be the same as the filename. + * Fix license headers. + - 31.1.43 Fix child annotations not inheriting member name, cleanup + - 31.1.42 Fix element type of scanned child annotations + - 31.1.41 Fixed PlantType not extending IExtensibleEnum, Closes #6286 + - 31.1.40 Added hook to allow modded Hill Biomes (#6571) + - 31.1.39 Improve performance of VertexBufferConsumer by inlining element locs + - 31.1.38 Revive forge lighting pipeline, disabled by default for now + Remove a lot of light value convolution by using 0..1 for nearly everything + Fix a lot of TODOs that are needed for the lighting pipeline to function + Potential fix for #6425 + - 31.1.37 Fix Tag serializing empty optionals, improve RegistryObject error msg + - 31.1.36 Remove SideOnly from WoodType methods + - 31.1.35 Cleanup IForgeTagBuilder code style. + - 31.1.34 Move global loot test data files out of generated folder + - 31.1.33 Add support for optional tag values to Tag.Builder + Add optional tag values to data gen test + Fix data gen test not running by correcting gui_light value + - 31.1.32 Fix a few issues with BufferBuilder + Fix vanilla bug that caused the byte order of the buffer from getNextBuffer to be incorrect + Fix missing modification to nextElementBytes in putBulkData + - 31.1.31 Deprecate ModelBuilder#gui3d, add ModelBuilder#guiLight + - 31.1.30 Add renderer to RenderNameplateEvent (#6562) + - 31.1.29 Defer writing the server.properties file until after mods have loaded to prevent config loss (#6545) + - 31.1.28 Fix ownership leak in ItemStackHandler (#6580) + - Triggered by invoking ItemStackHandler#extractItem with `simulate=true` + - 31.1.27 Fix cycle happening in noteblock even though we're setting the new value as well.. + - 31.1.26 Add a progress message for atlas textures. Fills a big time gap on bigger packs. + - 31.1.25 Remove ArrowEntity patch, vanilla fixed MC-107941 + - 31.1.24 Fix Forge's tps and gen commands. + - 31.1.23 Update gradle wrapper + Update MCPConfig to version that bypasses javac compiler bugs + Fix Global loot test compile errors. + - 31.1.22 Fix loading text not rendering after mojang logo appears + - 31.1.21 Fix loading GUI corrupting matrix state + - 31.1.20 Somewhat restore the loading screen overlay. It seems that once the mojang logo and progress bar + start running, I can no longer write to the window, even though I am obviously trying to.. + - 31.1.19 Add projection matrix to RenderWorldLastEvent (#6536) + - 31.1.18 Global Loot Functions (#6401) + - 31.1.17 Updated ForgeDev MCP Mapping Version (#6532) + - 31.1.16 Fix up alarming security crisis with network handling that allowed for wrong code execution on the server, resulting in CRASHED SERVERS. AWFUL stuff. + Also fixed a silly log message from the login handler. + This change introduces a mechanism to direct certain packets to only process on one side or another. Invalid sidedness will result in the connection being terminated. + - 31.1.15 Make TransformationHelper.slerp for quaternions public (#6528) + - 31.1.14 Fixed Conduit and Beacon Activation on Vanilla Servers (#6438) + - 31.1.13 Fix ITeleporter being ignored when teleporting from the end to the overworld (#6505) + * Fix custom teleporters triggering end credits when returning from the end + * Fix setdimension command ignoring position + - 31.1.12 Fix missing call to itemstack TER (#6445) + - 31.1.11 Fix missed modeldata passing in BlockModelRenderer (#6442) + - 31.1.10 Fix NPE when players rejoin the server in a dimension that was deleted (#6511) + - 31.1.9 Fix a wrong RenderState name MC-167447 (#6501) + - 31.1.8 Fix client not informing server when it attempts to interact with things, and is canceled by a client side handler. + - 31.1.7 Fix wrong arguments passed to ForgeHooksClient.renderSpecificFirstPersonHand() (#6496) + - 31.1.6 Fixed ChunkWatchEvent.(Un)Watch not firing correctly (#6453) + - 31.1.5 Update version and support data on README. (#6429) + - 31.1.4 Fixed Food not using effect suppliers, to better support delayed initialization and registry replacements. (#6411) + - 31.1.3 Fixed displaying item names when only more sensitive version changes (#6402) + - 31.1.2 Fix gui_light for forge's item parent models. + - 31.1.1 Allows custom blocks to define if they should use the fluid overlay instead of the flowing texture when in a fluid (#6493) + - 31.1.0 Fix a small patch misalignment. + +31.0 +==== + - 31.0.19 Add FluidStack support to the Forge packet buffer. (#6353) (#6485) + - 31.0.18 Make Minecarts work with modded powered/activator rails. (#6486) + Re-adds functionality for rails to have different maximum speeds. + - 31.0.17 Revert game data to frozen on disconnect from a remote server or when terminating a local server. Closes #6487 (#6497) + - 31.0.16 Remove unintended changes. + - 31.0.15 Implement fluid overlay texture rendering for custom fluids. + - 31.0.14 Fixed Attacks/Punches not Registering (#6481) + Replaced incorrect magic number with constant + - 31.0.13 Clean up a bunch of render events (#6444) + * Delete RenderHandEvent as RenderSpecificHandEvent can do everything it does and more. Rename RenderSpecificHandEvent to RenderHandEvent as it's now the only hand rendering event. + * Pass MatrixStack and IRenderTypeBuffer into the event whenever they are available. If they're available, that means we're in a batching environment and the modder should not be using the tessellator or other buffers on their own, or they risk "Already building" crashes. + - 31.0.12 Fix NullPointerException on java 8u242 in dev environment. (#6473) + Java 8u242 no longer re-initializes internal sys_paths and usr_paths fields in loadLibrary when they are null, so the value can't be set to null. + - 31.0.11 Fix incorrectly ported patch for restoreBlurMipmap (#6450) + - 31.0.10 Fix RightClickBlock code differences between client and server implementation (#6451) + - 31.0.9 Defer material getting for ChestTileEntityRenderer into seperate function (#6465) + - 31.0.8 Small Forge config fixes (#6466) + - 31.0.7 Fix ChunkDataEvent.Load not firing, it now fires in the aync thread. Be careful. Closes #6471 + - 31.0.6 Fix incorrect keybinding modifiers patch. Closes #6478 + - 31.0.5 Fix PlayerChangedDimensionEvent using incorrect from dimension argument in ServerPlayerEntity.teleport. Closes #6457 + - 31.0.4 Fix default mod resources loosing it's sort order. + - 31.0.3 Fix WakeupEvent patch misalign. Closes #6474 + - 31.0.2 [1.15] Reimplemented the ITeleporter interface (#6404) + - 31.0.1 Hook "gui_light" value from the model into the IBakedModel implementations. + Apply some of the suggestions from the 1.14 models PR. + - 31.0.0 1.15.2 Initial Update + +30.0 +==== + - 30.0.51 Cleanup fml packages removing old deprecated classes related to GUIs/Configs and fix HoverChecker (#6437) + Fixed ModListWidget name to avoid confusion and collision. + Delete CheckBox, as vanilla has it's own CheckBox now which looks much better + Rename ModConfigEvent.ConfigReloading to ModConfigEvent.Reloading + - 30.0.50 Fixed parameter name issue in ISTER rename. #6461 (#6468) + - 30.0.49 Fix default widget foreground color. + - 30.0.48 Updated method names referencing ItemStackTileEntityRenderer (#6461) + - 30.0.47 Fix Widget Foreground Color not allowing pure black (#6460) + - 30.0.46 Fixed rounding issue with entity navigation fix (#6455) (#6456) + - 30.0.45 Fixed RenderTypeLookup loosing mappings for registry replacements. (#6452) + - 30.0.44 Use extended version of getLightValue in all places (#6433) + - 30.0.43 [1.15.x] Added entity nameplate rendering event hook (#6416) + - 30.0.42 Remove emissive items hook, add small utility for bakedquad lighting + - 30.0.41 Fix breaking overlay weirdness. applyBakedNormals was not transforming the baked normals when applying them. Fixes #6432 + - 30.0.40 [1.15] Add new InputEvent.ClickInputEvent, addresses #5802 (#6047) + - 30.0.39 Fix dark spots in fullbright quad rendering. + Fix multi-layer model not declaring dependency on the particle texture. + Fix mistake in 2c054fca which I didn't intend to push when I did. + - 30.0.38 Fix multi-layer model loader to actually work in a sane way. No more "base" model involved, and now transforms and overrides work as expected. + - 30.0.37 Attempt to fix fullbright lighting. + Fix lightmap value calculation. + - 30.0.36 Add constructor for FishBucketItem that accepts suppliers + - 30.0.35 Fix QuadTransformer normal processing. + - 30.0.34 Fix validation in RotationBuilder#angle (fixes #6323) (#6408) + - 30.0.33 Add support for custom nether portal frame blocks (#6389) + - 30.0.32 InputEvent.RawMouseEvent fix (#6395) + - 30.0.31 Fixed Big Mushrooms not generating (#6390) + Removed vanilla negation from Forge logic that negated the vanilla logic it was replacing + also ran datagen to update the dirt tag to reflect changes that were previously made in the datagen code + - 30.0.30 Fix dyes tag containing dye items instead of tags + Update generated data + - 30.0.29 [1.15.x] Remove unused parameter from ElementBuilder#rotation (fixes #6321) (#6407) + - 30.0.28 Refactor BlockStateProvider to encapsulate a BlockModelProvider + Make most protected methods of data generators public + - 30.0.27 Fix crash when building BakedQuadBuilder + Add javadocs and move sprite to constructor where possible + - 30.0.26 Fix incorrect check for missing texture in DynamicBucketModel + - 30.0.25 Remove custom vertex format from BakedQuad + - 30.0.24 A few more binary-breaking changes, before it's too late: + - Move CompositeModel out of its package. + - Move a few inner classes from the OBJ loader. + - Rename the bucket model and fluid model classes to match the naming convention. + - Remove BiomeEvent.* and WorldTypeEvent.InitBiomeGens as they are not currently implemented and they haven't been in the previous version either. + - 30.0.23 Cherry-pick ca819e09 from the 1.14.x branch. Removes a patch from NativeImage which was invalid. + - 30.0.22 Fix the particle renderer not setting GL state between each type. MC-168672 + - 30.0.21 Fix CompositeModel not respecting "display" transforms. + Remove leftovers from discarded feature. + - 30.0.20 Allow model jsons to override the material library used by OBJ models. + Fix model loader test mod resources. + Update licenses. + - 30.0.19 Apply baked-in lightmap data to rendering + - Fix ForgeHooksClient.fillNormal injecting data to lightmap + - Fix OBJModel not filling lightmap data + - Fix NewModelLoaderTest blockitem not linking with block + - 30.0.18 Fix LightUtil.unpack to set the 4th component to 1 when expanding an xyz position into a 4-component vector. + Add TRSRTransformer test mod. + Fix signature of the bindTileEntityRenderer method, to account for covariance. + - 30.0.17 More model/rendering fixes: + - Breaking change: Change ClientRegistry.bindTileEntityRenderer to a factory, so mods don't have to manually specify the dispatcher. + - Breaking change: Delete obsolete SimpleModelState (the class was duplicated by mistake, see SimpleModelTransform) and ICustomModelState (part of the old loader API). + - Breaking change: Rename getTextureDependencies to getTextures, for consistency. + - Reinstate the getRenderLayer method, fixed appropriately to return the new RenderType value. + - Fix OBJ loader applying the model transform in the wrong reference frame. + - Fix vanilla bug in TransformationMatrix#func_227986_a_ + - Fix QuadTransformer logic. + - Added new method to IModelConfiguration to retrieve the owner IUnbakedModel, needed in order to construct ItemOverrideLists when baking custom models. + - Reintroduce multi-layer model through the new model loader system. + - 30.0.16 New batch of Model/rendering fixes: + - PerspectiveMapWrapper did not pass IModelData through to the wrapped model. + - CompositeModel did not store the returned textures from getTextureDependencies. + - VertexFormat used COLOR instead of UV to detect UV presence. + - QuadTransformer would crash due to index out of bounds. + - Small cleanup of TransformationHelper + - 30.0.15 Fix obj models having all faces in the same mesh, breaking material assignments and visibility in the process. + Reintroduce lost patch from the model loader, which would cause the custom values to be missing from generated models. + - 30.0.14 Fix diffuse lighting being baked into models, fixes dark items + - 30.0.13 Fix item quads not using the existing vertex color when applying tint colors. + - 30.0.12 Fix bucket model. Some mask textures were not added to the repository, and the bucket override generation was broken. + Fix OBJ loading crash due to a float value being parsed as int. + Fixes 6377 + - 30.0.11 Fix game crashing when modded entities are present (#6364) + - 30.0.10 Fix warning screen about missing minecraft registry entries (#6363) + - 30.0.9 Fix capabilities becoming inaccessible on returning from end (#6368) + - 30.0.8 Some code cleanup for 1.15 (#6362) + - 30.0.7 Fix MainMenuScreen patch + - 30.0.6 Mod list GUI detail pass + - Make padding consistent on all elements + - Properly horizontally center the "Search" text + - Update and resize forge/mcp logos + - Enable linear filtering on logo rendering by default + - Can be disabled with the "logoBlur" mods.toml property + - 30.0.5 Fix mod list screen (#6367) + - 30.0.4 Fix items in ground being too small, we were applying perspectives twice. + Restore forge patch and fix a tiny mistake in it. + - 30.0.3 Fix keybinds not loading/saving correctly + - 30.0.2 Remove uvlock hook, fixes broken stair/fence/etc models + - 30.0.1 Update fallback spec version + - 30.0.0 Update to 1.15.1 + +29.0 +==== + - 29.0.4 Finish converting the code from javax.vecmath to the vanilla vector classes. Forge is now vecmath-free! + - 29.0.3 Remove deprecations + - 29.0.2 Fix incorrect item lighting + - 29.0.1 Revert fluid change to use Material, fixes server crash + - 29.0.0 Update to 1.15 + Due to the massive rendering changes, certain features, such as emissive item rendering and the forge block rendering/lighting pipeline are currently disabled. + Co-authored-by: David Quintana + Co-authored-by: tterrag + Co-authored-by: Unnoen + +28.1 +==== + - 28.1.107 Added a couple of raytraceresult.getType() != MISS checks in places where they were absent. This corrects a couple of vanilla oversights and also greatly reduces Forge bus event spam for arrows and llama spit. (#6355) + - 28.1.106 Restored canRiderInteract boolean in IForgeEntity (#6347) + - 28.1.105 Split DrawBlockHighlightEvent into subevents to make usage clearer, addresses #2190 (#6269) + - 28.1.104 Allow classpath locator to discover jars via FMLModType attribute + - 28.1.103 Tidy up some output and also add libraries from the modfile detection into the transforming classloader. + - 28.1.102 Fix swapped yaw/pitch in camera setup event + - 28.1.101 Restore camera setup render event (#6335) + - 28.1.100 Fixed invocation of Vanilla spawn logic (#6334) + Forge's replacement of the Vanilla logic gets inverted, so the Vanilla logic inside that replacement must be inverted to correct for this. + (Fixes #6332) + - 28.1.99 Add item tag 'beacon_payment' for items that can activate a beacon (#6328) + - 28.1.98 Added FENCES_WOODEN and FENCE_GATES_WOODEN tags as fuels in AbstractFurnaceTileEntity (#6327) + - 28.1.97 New SleepFinishedTimeEvent allowing control of world time when waking up. (#6043) + - 28.1.96 Fix EntityLootTables not calling addTables + - 28.1.95 Make EntityLootTables reusable for modders + - 28.1.94 Fix emissive items not working + - 28.1.93 Fix the hang on startup problem when windows' broken device enumeration + causes a huge glfwInit slowdown. Log a message too when this is detected. + See https://github.com/glfw/glfw/issues/1284, https://stackoverflow.com/questions/10967795/directinput8-enumdevices-sometimes-painfully-slow, + https://discourse.libsdl.org/t/win-10-initing-joystick-causes-45s-hang-in-sdl-dinput-joystickdetect/23293 + - 28.1.92 Add hooks to make it easier to add custom TNT blocks (#6290) + - 28.1.91 Add tags supports_beacon and supports_conduit and modify Beacon and Conduit to use these tags (#6266) + - 28.1.90 Fix RawMouseEvent not being cancelable (#6310) + - 28.1.89 Fix DyeColor referencing incorrect Tag path. Fixes #6301 (#6303) + - 28.1.88 Modify StonecutterContainer to allow shift-click insertion of any block with a valid recipe rather than limiting to blocks in an Immutable List (#6268) + - 28.1.87 Fix #6305 lighting optimization using the wrong method + - 28.1.86 Add support for modded warm ocean biomes in bonemeal code + - 28.1.85 Optimize SectionLightStorage#cancelSectionUpdates loop + - 28.1.84 Add LeftClickEvent trigger to onPlayerDamageBlock (#6046) + - 28.1.83 Fixed an NPE caused by missing registries. (#6292) + Missing registries in this case being registries renamed without proper remapping or created by mods that were removed. + - 28.1.82 Made the slash optional in fml confirm/cancel. (#6282) + - 28.1.81 Fix registry snapshots not reading aliases correctly. Closes #6298 + - 28.1.80 A few tweaks to things. Make the mods command a bit better, make the + IndexedMessageCodec actually log which network channel it got back packets + on. Also, improve the custom directorymodlocator with actual custom names, + finally, allow up to 99 log rollovers, up from 7 default (this means a + repeatedly crashing server is less likely to roll out the log of the first + crash). + - 28.1.79 Fix BlockStateProvider#horizontalBlock emitting rotations >=360 + - 28.1.78 Added some more biome types to BiomeDictionary (#6250) + - 28.1.77 Replaced getTypes invocation in ensureHasTypes with a direct reference to types, preventing infinite recursion (#6284) + The direct reference is checked via ternary and reports if the set is empty, this is likely to result in log spam if modders don't assign types to their biomes + - 28.1.76 Fix lang generator escaping newlines, add lang generator test + - 28.1.75 Escape control chars and unicode when writing out lang datagen + - 28.1.74 Allow LanguageProvider helpers to accept suppliers of subtypes + - 28.1.73 Expose private helper methods in BlockLootTables to subclasses + - 28.1.72 Fixed vanilla bug in entity navigation to stop entities spinning (MC-94054) (#6091) + - 28.1.71 Reimplement usage of Item#doesSneakBypassUse() (#6114) + - 28.1.70 Handle logging during shutdown better on the server, by not + closing the logfile before the server itself has shutdown. + - 28.1.69 Fix NPE in modlauncher when there is no mods dir yet. + - 28.1.68 Fixed NPEs caused by uninitialized lists in ModDirTransformerDiscoverer (#6277) + - 28.1.67 Make Loot Table data generators more reusable for modders. + - 28.1.66 Add Blockstate and Model data providers (#6241) + - 28.1.65 Allow pack locators to load from the mods folder. + Regular mods are now automatically de-duped based on the version number - + the highest version file of a "root mod id" is now selected automatically. + - 28.1.64 Exclude Cobblestone slabs and wall recipes (#6230) + - 28.1.63 Fixed forge rendering pipeline and shape based light occulsion. (#6178) + - 28.1.62 Fix shouldCauseReequipAnimation not affecting anything (#6256) + - 28.1.61 Expose the registrationchange event to simple channel (not that anyone should care, but who knows?) + Also, Context.getNetworkManager should have been public. Derp. + - 28.1.60 Fix clientside chunk load event spam. Was an offset patch.. Also fire unload on the client side too. + - 28.1.59 Add in an event to expose the standard MC channel stuff to network + event channels that care about such things. Mods using simplechannel + don't need to care. + Also, put a sync wrapper around crashreportextender, so it doesn't + die sometimes randomly during startup. + - 28.1.58 Fix #6244 RightClickBlock#getUseBlock and #getUseItem being ignored (#6246) + - 28.1.57 Fix vanilla models with parents not loading properly from forge blockstates. + - 28.1.56 Include a profile icon for the launcher json (#6222) + - 28.1.55 Fixed loading error/warning screen not showing (#6218) + - 28.1.54 Fixed MC-162953 bounds checks in `NativeImage` (#6216) + - 28.1.53 Allow mods actually to have their own usable config gui (#6208) + - 28.1.52 Fix error logging in FMLUserdevLaunchProvider.setup (#6206) + - 28.1.51 Fix shear sound not playing (#6202) + - 28.1.50 Fix some config checks still using the old fields (#6193) + - 28.1.49 Add onCropsGrow event to KelpTopBlock (#6171) + - 28.1.48 Fix mod info panel rendering incorrectly on some systems with HiDPI displays (pesky macs) (#6170) + - 28.1.47 Re-add PlayerGiveXpEvent & PlayerChangeLevelEvent (#6165) + - 28.1.46 Skip background for hidden effect instances (#6197) + - 28.1.45 Bump modlauncher version to 4.1 + - 28.1.44 Fixed IModelData not being cleared when tile entity is removed (#6115) + - 28.1.43 Allow modded IParticleRenderTypes to be rendered (#6221) + - 28.1.42 Better sanity checks in ModelDataManager + - 28.1.41 Make customClientFactory optional again (#6191) + - 28.1.40 Fix forge blockstates and custom model loading (#6154) + * Reimplement forge blockstates variant through the use of a pseudo-model that handles the model loading, retexturing, custom data, etc. on behalf of the blockstates loader. This model gets injected into the model registry with an autogenerated unique name, to not collide with other model locations. + * Fix model loaders not being properly initialized by calling the reload method from the loader register function. In 1.12, registering a reload listener caused the listener to be called right away from the register method. This is not true anymore. + - 28.1.39 Add a super early GUI for showing pre-game launch messages from FML. NOTE: this cannot show on MAC because MAC can't handle + off-thread GUIs in any way shape or form, and we need the main thread to do real work. + Fix forge fading in wrongly. + - 28.1.38 New round of fluid system fixes: (#6175) + - Fix race condition lazy-initializing flowing fluid block data. + - Fix typo in ItemTextureQuadConverter that prevents certain animated textures from being used in the fluid bucket. + - Fix calls to onContentsChanged in FluidTank. + - Fix FluidUtil.tryEmptyContainer logic when simulating. + - Fix EmptyFluidHandler.fill returning the wrong number. + - 28.1.37 Combine all hidden mod resource packs into a single sortable pack + Fix mod datapacks sorting under vanilla + - 28.1.36 Split server and client side pack locators apart and move them to their + respective behavioural components. This should facilitate fixing the + server pack data pack ordering, as well as other new features of mod + resource packs. + - 28.1.35 Fix dimension types being incorrect when connecting to a non-Forge server. Closes #6203 + - 28.1.34 Fix the stupid derp that broke singleplayer dims. Don't send the dim packet + to the local client - it is not needed because obviously not. Seems to have + fixed the problem. Probably infinity new bugs by this. + - 28.1.33 Move OnlyIn patches on DyeColor to SAS file + Also fix broken cobblestone stairs recipe + - 28.1.32 Expose DyeColor#colorValue, remove OnlyIn from all DyeColor methods + - 28.1.31 Properly propagate the DimensionType information from server to client + at client connection time. This means the client now knows about the + dimensiontype properly and can access the ModDimension information on + the client. + - 28.1.30 Fix FluidTank with empty contents throwing error if drained (#6196) + - 28.1.29 Move opening initial screen to after startup and events are enabled (#6139) + This allows events to be fired for the initial opening of the main menu + Also fixes MC-145102 + - 28.1.28 Changed all calls of `BlockState#getSoundType` to use the sensitive version. (#6120) + - 28.1.27 Patch Sweet Berry Bush to have Crop Growth Event Hook (#6094) + - 28.1.26 Allow structure processors to process entities + - 28.1.25 Remove forced ANSI terminal - it breaks the Eclipse terminal output. + As a result, we can now support coloured log output again, by default. + Regen run configs to get the change (you should do this every update, you + know :D) + - 28.1.24 Make patched-in StairsBlock constructor public + Also fix supplier generic being too narrow in DeferredRegister#register + - 28.1.23 Integrate modlauncher changes for mixin. + - 28.1.22 Fix new flower pot ctor not being usable with deferred register + - 28.1.21 Usability improvements to RegistryObject/DeferredRegister + - 28.1.20 Add constructor to StairsBlock that accepts a state supplier + - 28.1.19 Fix server jar manifest path. + - 28.1.18 Fix sea level not being available on client, move hook to Dimension + - 28.1.17 Add template arg to StructureProcessor#process + - 28.1.16 Fix timezone issue with the installer. + - 28.1.15 Bump binpatcher and jarsplitter versions to address Java differences on older JDKs. + - 28.1.14 Allow modded dimensions to customise World#getSeaLevel + - 28.1.13 Fix jigsaw blocks not mirroring properly + - 28.1.12 Fix type bound on GameRegistry.findRegistry being too narrow + - 28.1.11 Add IExtensibleEnum#init, extend FillerBlockType/PlacementBehaviour + - 28.1.10 Tag the deprecation of DeferredWorkQueue. I think this is causing confusion + as to scope. Its functionality will be tied to the events in future - + so mods can request the deferred work through methods on the Mod Lifecycle + events directly. The API will be coming soon. + - 28.1.9 Fixed the problem where an error would cause the main thread to continue + even though there were still parallel threads running. Also, handle exceptions + in the AutomaticEventSubscriber rather than leaking them to the Parallel processor. + Actually closes #6148 + - 28.1.8 Make FlowerPotBlock extensible and reusable for mods + - Change static lookup map to an instance variable + - Add an instance variable for the "empty pot" for the current block + - Keep one instance of the lookup map between the empty pot and all its full versions + - Convert everything to use delegates + - 28.1.7 Post tag event directly from reloader thread (#6164) + - 28.1.6 Some tweaks around the code base. A functional consumer for networking - return a bool from your consumer function, rather than setPacketHandled. + Tweak the server modloading behaviour to try and be a bit clearer that a mod errored. + - 28.1.5 Update furnace fuels to not recreate it's list every query, and update when tags are reloaded. Add Tag update events. (#6140) + - 28.1.4 Maintain default behavior for Item#canPlayerBreakBlockWhileHolding() (#6128) + - 28.1.3 Update README badges to fix wrong version. (#6141) + - 28.1.2 Reimplemented "MouseEvent" as RawMouseEvent for 1.14.X (#6144) + - 28.1.1 Fix patch for vanilla spawning in WorldEntitySpawner (#6130) + - 28.1.0 Fix Entity.getPersistentData function name. Closes #6131 + Bump spec version for first 1.14.4 RB. + +28.0 +==== + - 28.0.106 Fix ParticleFactoryRegisterEvent not firing (#6126) + - 28.0.105 Minor fixes to the fluids (#6150) + * Fixed vanilla rendering of fluids to take into account the alpha bits of the color, and fix usages accordingly. + * Fixed missing texture derp. + - 28.0.104 Some (sadly breaking) improvements to the Fluid API (#6110) + * Some (sadly breaking) improvements to the API, after feedback and concerns provided by users: + - Moved calculation of the translation key to the FluidAttributes constructor, so that builders can be shared between still & flowing sub-fluids. + - Moved biome-based coloring to a dedicated FluidAttributes.Water variant, which is not used by default. + - Added logic to automatically gather fluid textures into the list of textures to bake. + - Patched BucketItem and FlowingFluidBlock to avoid eager access to the fluid objects. + - Added a ForgeFlowingFluid class, as a more user-friendly way to construct a new FlowingFluid. + - 28.0.103 Add new DeferredRegistry helper, and change RegistryObject to update when overrides are registered. + - 28.0.102 Delay Block loot table name generation until needed, as calling early will result in an empty name as the block is not registered yet. + - 28.0.101 Fix slimes splitting more times then they should. Closes #6138 + - 28.0.100 Fix a couple places not calling forge getLightValue + - 28.0.99 Properly fix missing attribute issue, add vanilla bug ID + - 28.0.98 Fix vanilla typo causing errors when client is missing entity attributes + - 28.0.97 Remove StructureArgument to work around vanilla issue, clean up custom arguments + - 28.0.96 Fix SCommandListPacket underflowing buffer when encountering a missing argument type + - 28.0.95 Fix problem with network connections timing out frequently. Turns out + there's a race condition - and the extra work forge does causes it to + happen much more frequently than vanilla (though I'm sure it's a vanilla + issue). Closes #6124, #5767 and probably lots more. + - 28.0.94 Make /locate command support modded structures + - 28.0.93 Make STRUCTURE_FEATURE registry a slave map of the FEATURE registry + Also convert Feature.STRUCTURES to a slave map + - 28.0.92 Fix REGISTER packet encode/decode issues. + Changed ForgeConfig values to return the default value if the config is not loaded, and exposed the value objects as a internal config. + - 28.0.91 Fix naming conflicts with official names. + - 28.0.90 Fix item used stat not triggering properly on last item in the stack. + - 28.0.89 Add a bunch of tags from the omnibus. + Fix test imports. And update patches for line numbers. + - 28.0.88 Add spawn reason to spawn events (#6096) + - 28.0.87 Add collisionExtendsVertically hook to allow modded blocks that extend collision into the block above similar to fences. (#6092) + - 28.0.86 Fixed PlayerInteractEvent.LeftClickBlock useItem/useBlock (#6045) + - 28.0.85 Readded IForgeItem#getHighlightTip hook. (#6036) + - 28.0.84 Added gravity as attribute to Entities (#5630) + - 28.0.83 Fix CME on chunk unload in FarmlandTicketManager (#5998) + - 28.0.82 Add a modfolderfactory. Fix up login payload exposure. + - 28.0.81 Peel IModLocator into the SPI package and extract a small IModFile + interface as well. This allows building external IModLocator + implementations. + - 28.0.80 Add in some client only player connectivity events. Closes #5536 + - 28.0.79 Add in MC REGISTER nonsense. Shut up #5730 + Tweak network a bit to fix initialization order stupidity. (Constants don't + load classes!) + - 28.0.78 move default log level for debug file to debug instead of trace, and remove millis from console and GUI. Also remove unused config xmls + - 28.0.77 Added getters for FMLPlayMessages.SpawnEntity + - 28.0.76 Move indexFor and biConsumer into FMLHandshakeHandler and expose them publicly, so mods can add additional + login messages. Closes #6087 + - 28.0.75 Hookup BlockEvent.FluidPlaceBlockEvent (#6103) + - 28.0.74 Update libs to 1.0 versions, bump grgit, and fix tag search behaviour that resulted. + - 28.0.73 Fluid rework derp fixes. (#6098) + * Fix nulls returning from non-null methods, and null-check of non-nullable values. + * Fix missed computation of the isEmpty flag in FluidStack + * Cleanup getAmount/isEmpty calls. + * Remove redundant suppliers. That info is readily available from the vanilla Fluid / FluidState. + - 28.0.72 Minor model system cleanup/documentation (#6089) + - 28.0.71 Fix Digging particle sometimes using the wrong block pos to get additional model data (#6077) + - 28.0.70 Change fml.modloading.brokenfile.optifine to not imply that Forge is responsible for Forge-Optifine compatibility. (#6080) + - 28.0.69 Add a config comment that lists the available constants of enums (#6079) + - 28.0.68 Restore PotionShiftEvent (#6042) + - 28.0.67 Added new InputEvent.MouseScrollEvent, fixes #5811 (#6037) + - 28.0.66 Add Villager Trading Events (#6016) + - 28.0.65 Strip side annotations from CropsBlock.getSeedsItem (#6013) + - 28.0.64 Updated constants to 1.14 (#6012) + - 28.0.63 Added hook to allow biomes to specify custom river variants. (#5969) + - 28.0.62 Add particle factory registration event (#6018) + - 28.0.61 Make FluidStacks non-nullable, and implement some TODOs. + - 28.0.60 Fix license headers so `gradlew build` is happy. + - 28.0.59 Fluid API rework (#5983) + - Moved forge fluids into FluidAttributes companion object to the vanilla Fluid. By gigaherz + - Redesigned the Fluid API to be closer to the Items API. By King Lemming + Co-authored-by: King Lemming + - 28.0.58 Recipe system cleanup. (#6014) + - 28.0.57 Fix regular arrows giving off particles after a world reload (MC-107941) (#6061) + - 28.0.56 Fix coremod not redirecting to the correct method (#6078) + - 28.0.55 Fix blocks being placed in adventure mode. Closes #6085 + Add early error for setting invalid world directory. Closes #6084 + Fix PlayerTickEvent not firing when dead, even if player isn't removed from world yet. Closes #6074 + Fix PlayerDestroyItemEvent not firing for some cases. Closes #6067 + - 28.0.54 Fix Javac generics breakage. + - 28.0.53 Prevent worlds from unloading while players are in out-of-world states by tracking all worlds references by every player in the server's player list. + - 28.0.52 Add Argument serializer for ModIdArgument. EnumArgument can't as vanilla doesn't support extra data. + - 28.0.51 Sort server.properties while writing. + - 28.0.50 Fix chunk load failure when entering End portal Closes #6068 + - 28.0.49 Fix Configs not generating correctly on first load Closes #6069 + - 28.0.48 Add hook to load custom mrls/rls not attached to a block or item. (#6010) + - 28.0.47 Cover more cases for RightClickBlock event and restore onItemUseFirst (#6009) + - 28.0.46 Make DimensionManager.SavedEntry save sky light consistently (#6019) + - 28.0.45 Fix extract inheritance not using proper classpath and update buildscript for FG asm changes. + - 28.0.44 Grrr. Stupid error. Sorry lex: I fixed it. + - 28.0.43 Actually reload config when it changes on disk. Closes #5541 and #5959 + - 28.0.42 Move fml's PlayerEvent and TickEvent to forge. Update + `import net.minecraftforge.fml.common.gameevent.PlayerEvent;` + to + `import net.minecraftforge.event.entity.player.PlayerEvent;` + and + `import net.minecraftforge.fml.common.gameevent.TickEvent;` + to + `import net.minecraftforge.event.TickEvent;` + - 28.0.41 Bump modlauncher to 3.2.x. Add a sender modid and document IMC. Closes #5746 + - 28.0.40 Turned minecraft into a proper Mod, with a "dummy" language provider. + Also fixed the "translations" not being available early if an exception occurs + by force loading the forge and MC ones. Closes #5984 + - 28.0.39 Fix a crash I caused by misunderstanding formatToString (#6007) + - 28.0.38 Fix userdev setup by moving SAS concept to FG. + - 28.0.37 Add piston events (#5798) + - 28.0.36 Fix AT for EntitySpawnPlacementRegistry.register + - 28.0.35 Make ParticleManager.IParticleMetaFactory public (#5926) + - 28.0.34 Add button to open mods folder (#5986) + - 28.0.33 Change ModLoadingException to display ModID instead of ModInfo instance identifier. (#5999) + - 28.0.32 Fixed PlayerInteractEvents not working (#5976) + - 28.0.31 Fixed Buttons in the error screen are incorrectly rendered if they are extremely long Closes #5687 (#5924) + - 28.0.30 Fix LazyOptional throwing NPE to consumers when owners null. (#5772) + - 28.0.29 Make Villager profession unlocalized name use modids when not 'minecraft' Closes #5977 + Fixed trees able to be generated through water. Closes #6000 + Change Block#toString to use getRegistryName instead of getNameForObject Closes #5937 + Allow Cooking Recipes to deserialize results with stack sizes. Closes #5960 + - 28.0.28 Fixed DimensionType.getRegistryName() returning null Closes #5992 + Fixed RegisterDimensionEvent not firing for new worlds. Closes #5987 + - 28.0.27 Introduce new Side Annotation Stripper system to semi-automate the shipment of Sided methods and cleanup patches. + New forge:checkSAS task to validate this config file. Closes #5995 + - 28.0.26 Move world unload patch to tick function to prevent duplicate unloading, fix log message in dim manager, fix javadoc for unload method (#5964) + - 28.0.25 fix melon and pumpkin seeds being peaceable on more than just farmland (#5980) + - 28.0.24 Fixed possible ClassCastException with dye-able armor. (#5985) + - 28.0.23 Fix naming for dev launch providers - they're in MCP.. + - 28.0.22 Register a config command. Currently one subcommand: showfile, which + when passed a modid and a type (CLIENT, COMMON or SERVER) will display + a link in the caller's chat to open that file in the OS file viewer of choice. + - 28.0.21 Load default configs from the defaultconfig directory by default. (Can + be overridden in the fml.toml config file if desired). + Will load any type of config tracked file from there - client, common, server + or custom tracked file. This means you can ship defaults for your pack + in a defaultconfig directory. I am thinking about ways to force a specific + config override for an existing config. + - 28.0.20 Fix vanilla bug that hardcore death doesn't clean up properly, leaving + a running server and a broken GUI. Vanilla bug MC-148865 + - 28.0.19 Fixed network ticking player entity while it is dead. And explicitly prevent overworld from unloading. Closes #5978 + - 28.0.18 Crash report extended to show ModLauncher FML and Forge data. + - 28.0.17 Fix potion transformer to look up the right name depending on context. + - 28.0.16 Added a coremod, shush, don't tell Lex. + Seriously, this is how to do targeted changes to specific classes. + In this case, adding a fieldtomethod redirect for EffectInstance.potion + to allow substitution. + - 28.0.15 Fix Slimes not splitting on death Closes #5973 + - 28.0.14 Fix @ObjectHolderRegistry not properly detecting vanilla class level references. Closes #5958 + - 28.0.13 Fixed missed patch causing blocks to not dropping EXP and BreakEvent to not fire. + - 28.0.12 Fix & Improve state comparison when checking vanilla block replacements (#5922) + - 28.0.11 Keep player cap data until they have revived. Closes #5956 + - 28.0.10 Fix objloader registering at wrong time. Closes #5847. Added test + class as suggested in the issue. + Note: most tests are commented out at the present time, pending + rework. Tests that work, work. + - 28.0.9 Fix datafixer exception catch: Closes #5951 + - 28.0.8 Fix error when ModsDiscoverer visits a non existent mods dir. + Closes cpw/modlauncher#30 + - 28.0.7 Merge branch 'pull/5948' into 1.14.x + - 28.0.6 Realms' removal has removed the need for additional jar transformation. + - 28.0.5 Make I18N format errors less spammy, also remove single apostrophes from + current translations in en_us.json. Other langs may still have problems. + Closes #5952 + - 28.0.4 Fix spam during startup (#5957) + - 28.0.3 Fix forge 1.14.4 startup in obfed enviroment (#5955) + - 28.0.2 Updated Example Version Range for 1.14.4 (#5950) + * Updated Example Version Range for 1.14.4 + * Also changed loader version and version range + - 28.0.1 Fix javac compile issues. + - 28.0.0 Provisional update to 1.14.4. Missing a lot of playerinteractionmanager patches because everything moved and I'm tired. + Fix up immediate problems. + bump to 28. + +27.0 +==== + - 27.0.61 Update mappings to 20190719 in prep for 1.14.4.. + - 27.0.60 Fix RegistryObject when used with generic registry entry classes + - 27.0.59 Remove OnlyIn Client Distribution from Effect and EffectType methods. (#5925) + - 27.0.58 Change default BrewingRecipe to use an Ingredient for the input instead of ItemStack. Closes #5944 + Add AT for GameRules.register Closes #5946 + Fix Forge Blockstate loader model path is inconsistent with vanilla blockstates Closes #5892 + Fix client crashing when opting not to load a world when there's missing blocks Closes #5886 + - 27.0.57 Fix CheckSpawn event logic for natural spawns. + - 27.0.56 Fixed item breaking particles not capturing current state of the ItemStack. Closes #5934 + - 27.0.55 Fix RenderSpecificHandEvent firing with wrong hand stack (#5927) + - 27.0.54 [1.14.x] Fix text positioning issues caused by scaling loading screen (#5932) + - 27.0.53 Fixed PlayerSleepInBedEvent pos is always null Closes #5936 + Fixed decompile error causing Endless Loop in ModelBackery if model errors exist. + Fixed NPEs related to teleporting players without portals. + - 27.0.52 Add simple concurrency protection to Server world list. Closes #5938 and #5739 + - 27.0.51 Update modlauncher to the 3.x series. + - 27.0.50 Rework GuiModList mod info to use custom scrolling panel impl + - 27.0.49 Cleanup Forge's Access Transformer, and add ATs for Block.Properties#noDrop, and AxeItem/PickaxeItem. Closes #5866 and Closes #5921 + - 27.0.48 Fix race condition in client mouse handler. Closes #5888 + - 27.0.47 Added LootPool.Builder#bonusRolls setter. Closes #5887 + - 27.0.46 Implemented Item.get/setDamage hooks. Closes #5899 + - 27.0.45 Implement Item.isRepairable in Crafting and Grindstone. Closes #5917 + - 27.0.44 Re-implement state.onBlockExploded() Closes #5914 + - 27.0.43 Add general damage hook for items. Closes #5502 (#5670) + - 27.0.42 Fix syntax error in IRenderHandler. + - 27.0.41 Pass tick counter to custom render handlers (#5744) + - 27.0.40 Fire Loading event (#5795) + - 27.0.39 Fix logoFile not working properly (#5775) + - 27.0.38 Adds some explanatory javadocs and check world in ModelDataManager (#5762) + - 27.0.37 Add InputEvent documentation (#5698) + - 27.0.36 Add IModelData to getParticleTexture (#5756) + - 27.0.35 Fixed BakedModelWrapper not delegating new methods (#5761) + - 27.0.34 Throw exception when a mod returns null from a dispatched capability provider (#5646) + - 27.0.33 Add isServer and isClient methods to LogicalSide (#5606) + * Add helper methods to LogicalSide. + * Fix backwards docs. + - 27.0.32 Added documentation to ObfuscationReflectionHelper adn deprecated index based functions. (#5893) + - 27.0.31 Fixed EntityJoinWorldEvent not being fired when player is added to ServerWorld. #5827 + Fixed wrong example path for the access transformer in the MDK build.gradle. #5891 + Added getters for mouse x/y velocity and if the middle-mouse button is being held down. #5776 + Modify issue template for better clarity. #5874 + Fixed grindstone not using ItemStack-sensitive getMaxDamage. #5831 + Added ParticleManager.registerFactory to Forge's AT. #5896 + Fixed NPE in SidedInvWrapper when side was null. #5787 + Moved EndermanEntity.setAttackTarget super call to allow LivingSetAttackTargetEvent the ability to override default behavior. #5778 + Added field to make "Looking at" debug info maximum distance configurable #5714 + - 27.0.30 Disable Config Button when no mods are selected (#5905) + Closes #5889 + - 27.0.29 Fix MC-258 on mod list screen, enable sorting, minor tweaks. (#5846) + - 27.0.28 Fixed #5895: Shearing via Displenser drops Shears (#5906) + - 27.0.27 Fix link applying to whole component in chat if component starts with link (#5909) + - 27.0.26 Added harvestLevel and harvestTool setter to the Block.Properties. (#5916) + - 27.0.25 Fix installer realms issue on server. + Uptake EventBus changes to fix some potential dead locks. + - 27.0.24 Fix old entity not being removed on dimension change (#5833) + - 27.0.23 Update TextureStitchEvent.Pre to give access to the list of ResourceLocations that will be loaded as textures. (#5870) + - 27.0.22 Add installer processor to deobfuscate Mincraft's Realms library. + This task will processes the current realms library from the json, so the installer must be re-ran every time they update it. + - 27.0.21 Redirect a method to the recipe book container, to allow modded screens to have a recipe book. (#5873) + - 27.0.20 Fix WorldEvent.Unload not firing on the client (fixes #5880) (#5884) + - 27.0.19 Fix TickEvent.PlayerTickEvent firing twice for tick end (fixes #5878) (#5885) + - 27.0.18 Fix type cast issues in ForgeConfig values. Closes #5894 + Added config value set and save functions. + By default mod configs are auto-saved, so you do not need to call save unless you create your own Config object. + - 27.0.17 Remove legacy StartupProgress. + Implement properly scalable progress thanks to @gigaherz. Closes #5863. + Implement API for pushing messages to the startup screen from mods. + Add memory display. + - 27.0.16 Update coremods to newer version, with support for new targets. + - 27.0.15 Fix duplicate WorldEvent.Unload call in client key handler. + Add recipe generator to replace vanilla recipes with Forge tags. + - 27.0.14 Fix dimension save data invalid cache being to aggressive. + - 27.0.13 Fix garbled "µs" (#5818) + - 27.0.12 Fix fmluserdevdata not being a valid launch target. + - 27.0.11 Split userdev data entry point into it's own provider to fix duplicate mod issue. + - 27.0.10 Fix configs correcting numeric values when the primitive type differs + Fix configs with range not clamping the corrected value, and instead + just replacing with the default + Closes #5855 + - 27.0.9 Fix item placement losing NBT data in creative mode (#5757) + - 27.0.8 Add extension to write entry id's to PacketBuffer's (#5812) + - 27.0.7 Add isItemValid check for ItemStackHandler (#5850) + - 27.0.6 Fix leather armor dye recipe (#5836) + - 27.0.5 [1.14.x] Replace dye items in Forge tags. (#5843) + - 27.0.4 Update readme and issue template. (#5773) + - 27.0.3 implement Ingredient.getSerializer for custom ingredients (#5813) + - 27.0.2 Fix vines and scaffolding not being climbable. + Fix powered rails not spreading power correctly. Closes: #5854 + - 27.0.1 Fix misaligned ServerWorld initCapabilities patch. + - 27.0.0 Initial 1.14.3 update. + +26.0 +==== + - 26.0.63 Fix too many registries being sent from server to client + - 26.0.62 Remove OnlyIn on TagCollection#getOwningTags + Fixes Block#getTags crashing on servers + - 26.0.61 Reorganize sided event dispatch slightly. Dispatch model and entityrenderer + functions at more appropriate times. + - 26.0.60 Tweak for lowercase handling. + - 26.0.59 Merge branch 'pull/5793' into 1.14.x + - 26.0.58 Fix crash when crashing during modloading. Fix GuiModList being weird. + - 26.0.57 Process the main modloading work on the async thread, but still + do deferred work on the main thread by passing in the executor. + - 26.0.56 Clean up config comments, make comment array nonnull + - 26.0.55 Fix forge event bus never starting up + - 26.0.54 Automatically add range to config comments + - 26.0.53 First pass of adding text to the loading progress UI. It deliberately uses the very primitive STB + generated font, so can only render basic ASCII text, and also only renders pre-defined strings, + as translations aren't available either. + - 26.0.52 Add mod failure identification + - 26.0.51 Moved some events to the Mod's event bus. You'll need to update which bus + you're listening to for these. (The Mod event bus is the only one actively + dispatching events during model loading). + ModelRegistryEvent, ModelBakeEvent, TextureStitchEvent.Pre, TextureStitchEvent.Post, ColourHandlerEvent.Block, ColourHandlerEvent.Item + - 26.0.50 Fix StartupQuery, and put tests back. + - 26.0.49 Fix stupid bug introduced with the refactor.. + - 26.0.48 Tidy up mod loading a bit more, and also crash if the [[mods]] list isn't + a list. + - 26.0.47 Merge remote-tracking branch 'origin/1.14.x' into 1.14.x + - 26.0.46 Fix server side loading, tweak mods command. + - 26.0.45 Fix ModelDataTest + - 26.0.44 Merge remote-tracking branch 'origin/1.14.x' into 1.14.x + - 26.0.43 Update mappings, move mod initialization to the async loader. + - 26.0.42 Fix #5612 add entity to ISelectionContext + - 26.0.41 Fix #5768 add access to MainWindow object in RenderGameOverlayEvent + - 26.0.40 Fix #5810 incorrect cullface on some models + - 26.0.39 Fix #5686 ArmorLayer still calls deprecated getArmorResource + - 26.0.38 Fix bad patch breaking armor dyeing + - 26.0.37 Make sure test mods load, fix BlockstateRetextureTest + - 26.0.36 Fix #5805 ModelBakeEvent does not fire + - 26.0.35 Fix lighting not being sent to client when large amounts of blocks change at once. Closes #5839 + Remove RecipeType/VanillaRecipeTypes, as 1.14 has a vanilla system for this. + - 26.0.34 Fix some compile errors in test classes. + - 26.0.33 Fix Vanilla resources loading from classpath, instead of the extra jar. Causing issues in dev time, and Forge replacements. Closes #5824 + - 26.0.32 Add temporary hard crash when mods error until we can load our error screen. + - 26.0.31 Make ReverseTagWrapper unmodifiable, fix error in log when mods folder doesn't exist initial scan. + - 26.0.30 Skip running the datagenerator on unrequested mods. + Add a run config for the data task for modders to use + - 26.0.29 Remove paulscode hack. It is not needed in 1.14, since paulscode is + no longer used. + - 26.0.28 Modify lex's data handler to use proper mod lifecycle event mechanisms + instead. New Lifecycle Event for requesting data harvesting. Mods will + be constructed, the registry will fire, and then a new Data event will + fire. Submit new data tag files to the data gatherer if you wish. + The game will shutdown after this. No other mod elements will happen. + - 26.0.27 Add params for the exception message + tweak logging + - 26.0.26 Expose the data entry point and generate Forge's Tags using it. + - 26.0.25 Add reverse tag cache, to make looking up tags for items/blocks/etc.. less costly. + - 26.0.24 Update Example Mod (#5781) + - 26.0.23 Fix AT for EntitySpawnPlacementRegistry.register (#5799) + - 26.0.22 Implement getValue in ClearableRegistry fixing DimensionArgument. (#5809) + Fix DimensionArgument + - 26.0.21 Fix RenderSpecificHandEvent firing with wrong hand (#5789) + - 26.0.20 Use dragon_immune block tag instead of manually checking blocks (#5792) + - 26.0.19 Fix #5806 sheep drop shears instead of wool + lol + - 26.0.18 Fix incorrect method used in ShrubFeature patch + - 26.0.17 Rework AbstractTreeFeature patches to reduce impact and avoid name conflicts + - 26.0.16 Add IContainerFactory for reading custom container data on the client + - 26.0.15 Fix Fishing and Mineshaft Minecarts loot tables erroring. #5785 + Fix Client block breaking speed not matching the server. #5790 + Fix Village Siege event location, and MC-154328 preventing Sieges starting. #5800 + Fix EntityJoinWorldEvent not firing on client, or some server code paths. #5786 + - 26.0.14 Adjust NetworkEvent#enqueueWork to match vanilla logic + In singleplayer our packet work could get delayed until the next tick, + breaking the expectation of packet read order. Fixes that using + NetworkHooks.openGui would result in missing inventory data on the client + - 26.0.13 Fix gameDir argument error on dedicated server. + - 26.0.12 Add forge registries for most vanilla registries + Made all registry names consistent with their vanilla counterparts + Also added a system for legacy registry names, so no data will be lost + Cleaned up formatting in GameData and ForgeRegistries + - 26.0.11 Add registry flag for syncing + - 26.0.10 Fix issues preventing test mods loading + - 26.0.9 Add forge registry for container types, expose ScreenManager.registerFactory + - 26.0.8 Don't NPE during construction of ModLoadingException.. + - 26.0.7 Fix misobfed methods due to mapping conflict. + - 26.0.6 Update mappings + - 26.0.5 Fix block activation not occurring serverside + Missing block of code from the old patch caused it to be skipped + - 26.0.4 Rework model patches/classes for new bake signature + - 26.0.3 Fix NamespacedWrapper not delegating a new getter. Fixing data loading spam at world start. + Update red/yellow/green tags with new vanilla item names. + Reenabled test source directory in project and made ModelDataTest compile. + - 26.0.2 and userdev + - 26.0.1 Fix realms class name + - 26.0.0 Fix travis build + +25.0 +==== + - 25.0.220 Update to 1.14.2 + - 25.0.219 Include new library in installer json. + Change order of versions on main menu, to prevent overlap with default window size. + Fix Forge update not displaying version info. + - 25.0.218 Fix vanilla structures loosing valid flags, And fix error placement for unsaveable structures. + - 25.0.217 Fix tall grass not dropping seeds. Closes #5675 + - 25.0.216 Enhance crash reports and logging to capture transformers on stack trace elements. + Moved log4j2.xml file to the launcher source set, so it loads first in the client. + - 25.0.215 Remove cache eviction for model data, optimize + - 25.0.214 dimesnion -> dimension typos (#5684) + - 25.0.213 FENCES_NETHER_BRRICK => FENCES_NETHER_BRICK (#5681) + - 25.0.212 GEMS_QUARRTZ -> GEMS_QUARTZ (#5635) + - 25.0.211 Small comment typo fixes for ObfuscationReflectionHelper (#5583) + - 25.0.210 Fix MC-146650 GuiContainer#keyPressed to return the correct key handled boolean (#5367) + - 25.0.209 Fix build script producing duplicated eclipse source folders. + Fix not including userdev source in sources jar. + Update license header of files that need it. + Delete patches_old folders. Most are unneeded in 1.13+ as the systems they effected were changed significantly. Any that need to be readdressed can be done as PRs. + - 25.0.208 Fix caps not being visible on old player during clone event (#5728) + - 25.0.207 Fix vanilla bug in writing structure templates with multiple palettes. + - 25.0.206 Add support for vanilla recipes having nbt on result (#5710) Fix #5663 + - 25.0.205 Fix modded TEs not being removed on block change + - 25.0.204 Fix #5735 by pushing new build. Shutdown Forge eventbus when errors occur. Closes #5711 + Also, improve logging so warnings, errors and fatals are always shown, regardless of marker. + - 25.0.203 Update 'build.gradle' to fix run configs for launching forge + - 25.0.202 Remove patch causing TEs to be removed on state change + - 25.0.201 Fix default IUnbakedModel bake method using wrong format + - 25.0.200 Add ModelDataTest to test mods.toml + - 25.0.199 Updated a couple of libraries. Fixed bug where modid could be in toml but + not found during loading, yet game continued to load. + - 25.0.198 Add test mods run configs + - 25.0.197 Better handle errors from eclipse compiled (non-compiling) bytecode + - 25.0.196 Finish model loader debug mod + - 25.0.195 Comment out test Mod/EventBusSubscriber annotations, fix up ModelLoaderRegistryTest + - 25.0.194 Fix BakedQuadRetextured calling old BakedQuad ctor + - 25.0.193 Add new system for model data, replacing extended states (#5564) + - 25.0.192 Bump ForgeSPI version, and add support for DistCleaner stripping interfaces from classes. + Add more detail to VersionChecker log info. + - 25.0.191 Add explicit return type checks for extensible enums, fix exc + - 25.0.190 Fix EnumRarity, make sure extensible enums have at least one factory candidate + - 25.0.189 Make EnumRarity extensible + - 25.0.188 Allow loading json constants outside of _constants + - 25.0.187 Update skipped_commits.md + - 25.0.186 Fix some vertex format changes not being handled correctly (#5368) + - 25.0.185 Transform vertex normals as well as positions when generating quads (#5242) + - 25.0.184 Fix for SidedInvWrapper isItemValid using wrong slot (#5642) + - 25.0.183 Add comment to vanilla bugfix, update skipped_commits.md + - 25.0.182 Change default username to 'Dev', add ability to replace '#' with randomized numbers + - 25.0.181 Fix MC-128441: cross-dimensional teleporting does not work + - 25.0.180 Add Forge dimension-changing hooks to spectator handling code (#5212) + - 25.0.179 Minor performace improvement when building chunks and rendering blocks (#5286) + - 25.0.178 Catch json parsing errors from constants/factories files (#5258) + - 25.0.177 Allow custom DataSerializers to be registered safely (#5245) + - 25.0.176 Further clean up Constants, and add two new BlockFlags + - 25.0.175 Remove unnecessary patch + - 25.0.174 Update skipped_commits.md + - 25.0.173 Fail fast when null is used with setTag instead of crashing in writeEntry (#5257) + - 25.0.172 Update Constants for 1.13 + - 25.0.171 Added more Constants (#5323) + - 25.0.170 Add a few events pertaining to villages (#5302) + - 25.0.169 Sync up canPlaceTorchOnTop logic with BlockTorch#isValidPosition + - 25.0.168 Update skipped_commits.md + - 25.0.167 Fix special spawn event not firing in many cases. (#5389) + Co-authored-by: tterrag + - 25.0.166 Only prompt for missing registries on local worlds (#5348) + - 25.0.165 Reimplement ForgeHooks#onPlaceItemIntoWorld and remove old place events + - 25.0.164 Add EntityPlaceEvent (#5057) + Co-authored-by: tterrag + - 25.0.163 Fix small logic error in ItemTextureQuadConverter (#5463) + - 25.0.162 Better support for custom bows (#5209) + - 25.0.161 Fix up torch placement logic to handle more vanilla special-casing (#5426) + - 25.0.160 Update skipped_commits.md + - 25.0.159 Written size does not include int bytes. + - 25.0.158 Extend Region files to support >1MB per chunk. + If the 'sector count' is 255, ask the compressed data header for the proper length. + - 25.0.157 Simplify custom item rendering by removing GL emissivity hacks + - 25.0.156 Support diffuse lighting flag in item rendering + - 25.0.155 Add a hook to allow continuously using items through stack changes (#4834) + - 25.0.154 Update skipped_commits.md + - 25.0.153 Add redirects to PotionEffect to respect registry replacement (#5213) + - 25.0.152 Add FieldRedirectTransformer updated to new modlauncher API + - 25.0.151 Fix small logic error in emissive item rendering code (#5320) + - 25.0.150 Ensure slave maps are cleaned up when handling registry overrides (#5250) + - 25.0.149 Remove hack to force enum configs to strings + - 25.0.148 Fix #5688 config values are unordered, update Night-Config + - 25.0.147 Cleanup/Implement some todos (#5660) + - 25.0.146 Readd redirecting of stdout and stderr (#5678) + - 25.0.145 Fix some typos in spawn dimension patches (#5669) + - 25.0.144 Remove Vanilla Logging Config (#5618) + This will re-enable Forge's logging configuration in "production" + - 25.0.143 Add GuiContainerEvent.DrawBackground event. (#5595) + - 25.0.142 [1.13.x] Fire InputEvents (#5533) + - 25.0.141 Fix compile error in FakePlayer from cherry pick + - 25.0.140 Update skipped_commits.md + - 25.0.139 Fix potential issues with the Minecraft FakePlayer lingering around after world unloads. + - 25.0.138 Fix potion remove event not always firing, add expiry event + - 25.0.137 added PotionHooks, closes #3867, #4375 (#4614) + - 25.0.136 Fix EntityDataManager logging level + - 25.0.135 Fix some typos in cherry-picked commits + - 25.0.134 Update skipped_commits.md + - 25.0.133 Add a hook for farmland watering (#4891) + - 25.0.132 Add logging for data manager key registration errors (#5129) + - 25.0.131 Fix #5659 setdimension command entity filtering, avoid inverting logic + - 25.0.130 Improve support for custom block path types (#5203) + Co-authored-by: tterrag + - 25.0.129 Allow items to control the rate of repair from mending (#5102) + - 25.0.128 Update skipped_commits.md + - 25.0.127 Improve exception handling from server starting events (#5226) + - 25.0.126 Improve context provided by potion icon rendering hooks (#5111) + - 25.0.125 Fix an ObjectHolderRef internal error message (#5214) + - 25.0.124 Implement rendering for item models with emissive quads (#5047) + - 25.0.123 Fix inaccurate main thread name shown in client log (#5078) + - 25.0.122 Fix Baked Item models with transformations (#5241) + - 25.0.121 Update skipped_commits.md + - 25.0.120 Stop firing LivingSetAttackTargetEvent for setRevengeTarget (#5217) + - 25.0.119 Fix missing string parameters in some log messages (#5210) + - 25.0.118 Re-add some missing villager profession patches (#5200) + * Fix zombie villagers only spawning with vanilla professions + * Fix spawning modded villagers that do not have their own building + - 25.0.117 Fix the bed position given to the SleepingTimeCheck event (#5107) + - 25.0.116 Fix some null returns from defaulted registries (#5235) + - 25.0.115 Only remove synthetic lambda methods referenced in body of SideOnly methods (#5127) + - 25.0.114 Update skipped_commits.md + - 25.0.113 fixed visual bug with guislider + - 25.0.112 Make Forge blockstate variants correctly inherit AO setting from vanilla models (#5190) + - 25.0.111 Make Forge-provided default transforms accessible to custom models + - 25.0.110 Actually parse the i18n exception message into the super constructor, + so the exception has a useful text message, even in crash logs and + on the server. + - 25.0.109 Refactor to use naming service, and provide an MCP naming service when + in userdev. Step 1 to supporting loading SRG mods in userdev. + - 25.0.108 Fix respawnevent being fired with old player instead of new. Fixes #5658 (#5668) + - 25.0.107 Implement API for mods to control their server status response.. + - 25.0.106 Merge branch 'pull/5636' into 1.13.x + - 25.0.105 Fix StartupQuery to run properly on dedicated server.. Closes #5649 + - 25.0.104 Remove remaining deprecations, improve a few patch comments + - 25.0.103 Fix BrandingControl caching text through resource reload + - 25.0.102 Add back EntityPlayer patch to return main inventory in IItemHandler + Fixes #5638 + - 25.0.101 Fire the ModIdRemappingEvent on the Forge Event bus. Closes #5632 + - 25.0.100 Remove redundant method call in Minecraft patch. Also fix a translation + string error (closes #5643) + - 25.0.99 Add method to IResourcePack to hide it entirely from the UI (#5525) + - 25.0.98 Remove game registry comparsion from list ping + - 25.0.97 Defer configuration of channel until it is actually available during + connection. Closes #5626 + - 25.0.96 Add class to wrap IItemHandler as IInventory for easier recipe interaction. (#5522) + - 25.0.95 Remove uses of java.awt (#5591) + `java.awt` will statically load itself when `java.awt.Color`, `java.awt.Dimension`, etc are loaded. + This conflicts with lwjgl3 and must be avoided (except for in mojang's server gui). + - 25.0.94 Fix PlayerInteractEvent using Dist when it should be using LogicalSide (#5611) + - 25.0.93 Re-Add the list ping compatibility checker + - 25.0.92 Update Night-Config to 3.5.0, improve defineEnum methods + Closes #5537 + - 25.0.91 Fix loading errors GUI crashing when errors occur during construction + - 25.0.90 Revive CapabilityProvider on entity revive. Madders should NOT need this, as caps are copied via NBT. + - 25.0.89 Do not invalidate caps when entity is being moved across worlds. Should fix #5500 + - 25.0.88 Fix NPE in TileEntityPistonRender when class is created to early. + - 25.0.87 Fix getDefaultCreatorModId for enchanted books (#5534) + - 25.0.86 Handle null return from ResourcePackInfo.createResourcePack + - 25.0.85 Allow login packets to only generate on server based connections + Run injectSnapshot on the client thread, wait for result and + disconnect when injectSnapshot fails. + Fix DevServer to load MOD_CLASSES + Fix LaunchTesting to properly load log4j2 markers (don't use a + static variable in that class!) + - 25.0.84 Exclude PR builds from discord and changelog + - 25.0.83 Exclude noci branches from travis + - 25.0.82 Fix being unable to plant nether wart (#5572) + - 25.0.81 Fix silk touch not working on Ender Chests. + - 25.0.80 Fix entity spawn packet pitch (reversed yaw/pitch) (#5603) + - 25.0.79 Fix invalid inventory being sent to ItemCraftedEvent Closes #5580 + Fixed custom ingredient network serialization by removing unneeded mark. Closes #5577 + Changed HorseArmorType constructor to not prefix vanilla paths to custom armors. Closes #5574 + Fix removeBlock being called with invalid canHarvest value. Closes #5570 + - 25.0.78 Add UI for warnings that occurred during loading (#5530) + - 25.0.77 Fix max entity radius not being settable by making it a instance method on world. Closes #5601 + Fix VoidFluidHandler.INSTANCE not being a instance of VoidFluidHandler. Closes #5602 + Remove backwards compat code and make IItemHandler.isItemValid non-default. Closes #5598 + - 25.0.76 Add way to publish the reobf Jar with the maven-publish + task. The standard way does not publish reobfuscated + artifacts. + - 25.0.75 Add in the ability to load modlists from a file. + This is simple: .list is a newline separated list + of maven-like coordinates for mods to load into the game. + They are searched for in all known maven roots. + - 25.0.74 Fix rails not being able to be placed on hoppers. + - 25.0.73 DimensionManager.registerDimension now returns the DimensionType instance for convienance. + You can still access others in DimensionType.getByName() + Fixed ForgeRegistry rappers not forwarding isEmpty. + - 25.0.72 Refactor Userdev and Forgedev launching. + Locating mods on the classpath in dev should solve linked MC sources when debugging. + As well as loading deobfed mods. + Rewrote how arguments are handled in dev, so users can overwrite any defaults we provide. + Added basic Yggdrasil auth support. Passing in --username and --password arguments. + ONLY USE IF NECESSARY. Forge is NOT responsible for your login information. + - 25.0.71 Make userdev parse out the classifier for the Forge jar that is on the classpath. + Should fix debugging Minecraft at dev time. + - 25.0.70 Tidy up network initialization, and force it to classload early in + modloading lifecycle. Closes #5576 + - 25.0.69 Tweak log4j2 config and allow access to classdump functionality from + modlauncher. + - 25.0.68 Fix #5584 by copying the zipped resource to a temporary directory if + paulscode is requesting it. This is so icky. + - 25.0.67 Log a message as well, when we crash. + - 25.0.66 Try writing a temporary file to disk when a paulscode thread requests + a resource, because even zipfilesystems return interruptible file channels. + - 25.0.65 Enforce specversion number for forgeSPI so we don't crash with weird errors later. + - 25.0.64 Put both LogicalSides on NetworkDirection: + Origination (where it came from) and Reception (where it arrived at). + - 25.0.63 Rewrite the FML Handshake packet formats to include actually syncing the registry data and introduce the concept of caching it locally. + Snapshots are not injected yet due top threading issues. + - 25.0.62 Handle differing network versions for FML gracefully? + - 25.0.61 Fix problem with duplicate mods caused by duplicate classes found during scan. + File Scan results are now sets. + - 25.0.60 Try to fix #5573 by peeling the worldclient fetch into a separate handler. + - 25.0.59 Tidy up server launch. The JAR will resolve it's libraries from a relative + path. We just need to verify what we need is on the classpath, and + try and handle when it's not, cleanly (by recommending running the + installer). + The manifest now embeds the correct launch arguments to allow FML to + resolve - these were _never_ editable, and belong somewhere out of + the way. + - 25.0.58 Add missing constructors in KeyBinding to match existing vanilla constructors. (#5480) + - 25.0.57 Update MDK Readme to describe new FG3 procedures. (#5553) + - 25.0.56 Fix Custom Entity Data not persisting between world loads. Closes #5562 + Fix BlockRailState inverting flexibility flag. Closes #5550 + Disable Forge's hooks on dispensing Buckets until Fluid system re-write. Closes #5545 + Fix modifier only keybinds. Closes #5544 + - 25.0.55 Fix entity shearing logic (#5566) + - 25.0.54 Fix droppers not spawning items in world (#5559) + - 25.0.53 Allow vanilla connections properly, and allow mods to decide. + - 25.0.52 Patch DimensionSavedDataManager to not spam FS mkdirs requests for + empty files that don't exist yet, and don't contain data. Should + result in a significant performance improvement for those with slower disks. + - 25.0.51 Fix GUI packet dispatch, add additional blockpos helper for common usecase. + - 25.0.50 Fix startup Query to actually display (fixed commit). + - 25.0.49 Update to 0.10 modlauncher API with performance improvements.. + - 25.0.48 Hide the webhook address so people don't spam it. + - 25.0.47 Remove debug leftovers from Jenkinsfile. + - 25.0.46 Delete old OreDictionary file, fix type in NUGGETS_IRON field name, and ping discord from jenkins. + - 25.0.45 Merge extra and data jars. As Log4j has issues with it's config being in a different jar then the custom logger. + - 25.0.44 Add GuiUtils.drawInscribedRect, use in mod list GUI to fix logo rendering + - 25.0.43 Fix reference to UnsafeHacks in RuntimeEnumExtender + - 25.0.42 Fix double tall plants not being shearable, add IShearable to seagrass + Closes #5524 + - 25.0.41 Add back missing ItemColors patch (#5474) + - 25.0.40 Fix entities being killed in one hit. Closes #5511 + Fix unloc pattern for tps output + - 25.0.39 Fix MinecraftForge.initialize not being called. + Fixes UsernameCache and harvest tools + Closes #5529 + - 25.0.38 Make BannerPattern extensible (#5464) + - 25.0.37 Remove EnumFacing internal ID maps from AT file (#5526) + - 25.0.36 Fix GuiEnchantment using wrong value to index enchantClue array (#5452) + - 25.0.35 Fix some minor patch regressions (#5490) + - 25.0.34 Altered EntityType registry to use a Forge based registry (#5493) + - 25.0.33 Fix bug with ObfuscationReflectionHelper (#5509) + - 25.0.32 Move unsafehacks to separate JAR built separately.. + - 25.0.31 Clean up Entity patches, remove extra method. Closes #5494 + - 25.0.30 Remove now defunct eclipse files from MDK + - 25.0.29 Add a simple network API.. + - 25.0.28 Refactor forge and example run configs based on MinecraftForge/ForgeGradle#546 + - Updated run config formats based on the refactored setup + - Removed old 'runclient' and 'runserver' JavaExec tasks, replacing them by creating the run configs using the refactored setup. + - Set 'assetIndex' environment variable from FG + - Updated MDK for new run config setup + - 25.0.27 Make SpawnPlacementType extensible, remove from ArmorMaterial + - 25.0.26 Fix connection to vanilla servers. Generate a default mod server config + for mods connecting to servers. + - 25.0.25 Fix TPS string + - 25.0.24 Change openGui to take a Consumer + - 25.0.23 Fix author and other strings in the mdk mods toml file, update coremods to 0.3.+ + - 25.0.22 Fix World crashing on load Fixes #5499 (#5503) + - 25.0.21 Actually dispatch handleWorldDataSave. Closes #5492 + - 25.0.20 Merge branch 'pull/5483' into 1.13.x + - 25.0.19 Fix assetIndexes for 1.13.1 + - 25.0.18 Fix travis build for 1.13.x branch + - 25.0.17 Merge branch 'pull/5484' into 1.13.x + - 25.0.16 Fix lazy ModContainer evaluation skipping thrown loadingExceptions + Fix formatting + - 25.0.15 Fixes #5446 Listening for the same registry event in two different mods fails + Tell the mod event bus not to track phasing for events. + - 25.0.14 Add back missing patch for Item.BLOCK_TO_ITEM + - 25.0.13 Fix the MDK.. + - 25.0.12 Fix network syncing of SERVER config. Enable COMMON Config. Fix network + login handling. + - 25.0.11 Fix serverlang loading issue, by frontloading MC and Forge langs, + so error messaging works. + - 25.0.10 Use MC VERSION in the dependencies string for the extra jar + - 25.0.9 Publish to mainline + - 25.0.8 Remove Forge ChunkLoader - vanilla has a new system. API will follow. + - 25.0.7 Fix Block$Properties AT for new class name + - 25.0.6 Fix VillagerRegistry + - 25.0.5 Add the language providers to the main classloader as well, so + their resources are available to other classes.. + - 25.0.4 Fix RegistryManager#getRegistry not working for generic registry entries + - 25.0.3 Fix license headers + - 25.0.2 Fix GlowstoneFeature patch name + - 25.0.1 Fix javac compile issues. + - 25.0.0 Initial 1.13.2 update. Major thing to note is that Dimensions have been completely revamped. + DimensionType is not unique per Dimension. See DimensionManager for more details. + Vanilla now has a chunk loading system, so Forge's will need to be deprecated/adapted. + +24.0 +==== + - 24.0.192 Actually fix byte array behaviour for openGui. + - 24.0.191 Fix byte array behaviour for OpenContainer packet + - 24.0.190 Clean up the mod loading context objects. There is only one ThreadLocal now. + **BREAKING CHANGE** FMLModLoadingContext is renamed to FMLJavaModLoadingContext. + LanguageProviders can setup additional contextual data. + - 24.0.189 Implement a GUI packet and GUIFACTORY for triggering from the server. + - 24.0.188 Merge branch 'pull/5451' into 1.13-pre + # Conflicts: + # patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch + - 24.0.187 Handle bad formats with an exception. Translators MAKE SURE you watch for this error! + - 24.0.186 Handle invalid JAR files more gracefully. Don't crash. + - 24.0.185 Fix JKS to be stored as binary + - 24.0.184 Enable https to Let's Encrypt endpoints by using an SSL factory with + the two extra Let's Encrypt root certs installed into an auxiliary + keystore. + The keystore was generated using standard commands, documented in the + FixSSL class. + The Let's Encrypt certificates are not provided by default in Java 8 + prior to update 101. + - 24.0.183 Its 2019. Update licence headers to match. + - 24.0.182 Fix Terminal Handler and GUI logging on dediserver, hopefully.. + - 24.0.181 Fix config to use new system properly, without exploding the server. + Separates server specific config into the server config file. + - 24.0.180 Fix up accidental newline removal that broke the console... + - 24.0.179 Fix #5429 properly, without breaking symlinks on linux.. + - 24.0.178 Move to using Minecrell's terminal logger directly, for better ANSI control and JLine support. + - 24.0.177 Make a second logger with colour highlighting and control it with a sysproperty: + forge.logging.colourconsole.level (defaults to off).. + - 24.0.176 Tidy up modcontainer building and discovery.. + - 24.0.175 Use a configuration value for the thread count, make it default to + availableProcessors when set to <=0 (default value is -1) + - 24.0.174 Revert "Make sure to create entire path for directory, fixes #5429" + This reverts commit 77dd9eb8 + This will completely break symlinks on linux. + - 24.0.173 Port CommandEvent and custom entity selectors to 1.13 (#5411) + - 24.0.172 Finish off most old patches, fix issue for mounted entities. + - 24.0.171 Patch direct accesses to Entity.type to use getter instead (#5308) + - 24.0.170 Tentatively reintroduce a container-opening system + - 24.0.169 Add synchronized modifier to runtime enhanced enum methods + - 24.0.168 Add IExtensibleEnum, fix DimensionType create method + - 24.0.167 Change IRenderHandler to an interface Closes #4640 + - 24.0.166 Made functional interface IChunkGeneratorFactory public (#5395) + - 24.0.165 Fix leaking unclosed InputStream in Scanner.fileVisitor (#5432) + - 24.0.164 Invalidate capabilities that we attach to vanilla entities and TileEntities. Closes #5307 + - 24.0.163 'Fix' Specific y-levels in water behaving like you're in air. Closes #5341 + - 24.0.162 Reintroduce ObfuscationReflestionHelper closes #5373 + - 24.0.161 Fixed Crosshair attack indicator texture issue Closes #5442 + Add friendlier error message for @Mod annotations with missing mods.toml entry. Closes #5440 + Remove Log4J console highlighting. As it doesn't work on many consoles, and prints invalid characters. Closes #5420 + - 24.0.160 Let ItemGroup provide it's own tabs image resource location (#5330) + - 24.0.159 Allow GuiContainer and ItemGroup to specify slot hover colors (#5332) + - 24.0.158 Port Minecraft client patch for 'ClientTickEvent' (#5397) + - 24.0.157 Fix statistics gui crashing when handling input events (#5435) + - 24.0.156 Properly set context classloader in mod loading threads. + - 24.0.155 Rework server launching at runtime to include needed default arguments and validate libraries exist. + Move Forge config loading to manual while config system is in development. + - 24.0.154 Added 'create'-method for EnumCreatureType (#5400) + - 24.0.153 Fix redstone power calculation (#5433) + - 24.0.152 Fix wrong grass block being used for comparisons (#5434) + - 24.0.151 Make sure to create entire path for directory, fixes #5429 + - 24.0.150 Put the FMLModContainer back in it's cage. Delete the ClasspathLocator. + - 24.0.149 Use the resource pack directly in the GuiModList, skip the resourcepackinfo. + Closes #5418 + - 24.0.148 Fix inventory items not properly being synced to client. Closes ##5421 & #5417 + - 24.0.147 Expose the ModFile in the scan data, so languages can read it and make + mod construction decisions. + - 24.0.146 Fix RuntimeEnumExtender creating new enums with incorrect ordinal value (#5402) + - 24.0.145 Config watching and config events now actually work! + Also fixed small bug with MOD_CLASSES not defaulting to empty string. + - 24.0.144 ConfigEvents - the beginning. + - 24.0.143 Merge branch 'pull/5405' into 1.13-pre + - 24.0.142 Fix 5408 by making Paths from the default provider (not inside jars) + offer a FileInputStream rather than Files.newInputStream. Fun. Stupid + ancient paulscode. + - 24.0.141 More old patch work, cleaned up static methods added to ItemStack, and various networking functions. + - 24.0.140 Config option implemented + - 24.0.139 Reimplement update checker + - 24.0.138 Update for ForgeSPI change, revert back to VersionStatus checking + - 24.0.137 Bring back the forge beta warning. Use a check to see if the forge minor version is zero, as ForgeVersion.getStatus() is not implemented + - 24.0.136 Merge branch 'pull/5404' into 1.13-pre + - 24.0.135 Use recommended approach to applying version data to mdk. + - 24.0.134 Fix mdk properties - now the mdk offers default console debug logging + with various useful channels for development enabled. + - 24.0.133 Fixed missed OptionalCapabilityInstance to LazyOptional refactors in patches + - 24.0.132 Refactor OptionalCapabilityInstance to LazyOptional; clean up + - Move to util package, rename to LazyOptional + - Clean up existing javadocs, add javadocs to everything missing them + - Add more NonNull functional interfaces, and use them everywhere + - Move orEmpty() to Capability, works better here anyways + - 24.0.131 More logging tweaks, including some aimed at userdev. + `forge.logging.markers=` will enable markers. + - 24.0.130 Big cleanup of logging. Might do some tweaks of the userdev logging, but this should be good for vanilla.. + - 24.0.129 Cherry pick mezz's logging improvements.. + - 24.0.128 Update to 0.9.0 of modlauncher.. + - 24.0.127 Merge branch 'ichttt-fixDuplicateNamespace' into 1.13-pre + - 24.0.126 Fix some of minecraft's resources loading twice, as minecraft is on the list of namespaces as minecraft and as an empty string + - 24.0.125 Fix modsorter to not crash on soft dependencies that don't exist. + - 24.0.124 Fix resource pack info generator - use the first modid as part of the + pack prefix. + - 24.0.123 Make MOD_CLASSES available to the forge development environment as well. + - 24.0.122 Change MOD_CLASSES to support %% separated paths, that are grouped into + %% sets. Allows for multiple mods to be located in UserDev. + - 24.0.121 Fix handing the "minecraft" dependency properly by adding it to the list + of mods. + - 24.0.120 Send head yaw, use setPositionAndRotation + - 24.0.119 Add license header + - 24.0.118 Clean up patch a bit, check for net.minecraft. + - 24.0.117 Readd modded entity spawning/tracking support + - 24.0.116 Fix first call to ToolType.get always returning null (#5396) + - 24.0.115 Fix NPE in ItemGroup concurrency patch + - 24.0.114 A couple of minor improvements and fixes to ForgeConfigSpec (#5394) + - Use the config file's path instead of the config object in error messages. + - Print the dotted path of each config key instead of the array version (group.item instead of [group item]). + - Fix comments causing a config file to be considered incorrect. + - Pass each list element to the element validator, rather than the whole list. + - 24.0.113 Add RecipesUpdatedEvent, fired when recipes are downloaded from the server. (#5303) + - 24.0.112 [1.13] A sweep through deprecations (#5345) + - 24.0.111 Add a RayTraceResult method to Block that can be can be overridden (#5354) + - 24.0.110 [1.13] Make Caps, TESR, Entity renderers, and keybinds thread safe to call during parallel init (#5359) + - 24.0.109 [1.13] Check canSustainPlant for valid ground in BlockBush (#5362) + - 24.0.108 Repatch missed hasTileEntity redirects. And cleanup related patches. Closes #5369 + - 24.0.107 Fixed fence and iron bars block placement (#5372) + - 24.0.106 Make ChunkGeneratorType.Settings accessible for modders (#5376) + - 24.0.105 Make ItemGroup constructor threadsafe (#5384) + - 24.0.104 Fix item interaction in creative mode. (#5385) + - 24.0.103 Fix #5365: Some chat messages lose their formatting (#5386) + - 24.0.102 Fix vanilla trying to load the constants json as an recipe. Closes #5388 + Force constant names to use namespace of their json file. To prevent conflicts. + - 24.0.101 Add recipe types for faster runtime iteration. (#5312) + - 24.0.100 Fix capability attach event not firing with base type + - 24.0.99 Port Minecraft client patch for 'RenderTickEvent' (#5329) + - 24.0.98 Add back several missing patches for FML events (#5390) + - 24.0.97 Fix dependents not being loaded into mod sorter + - 24.0.96 Improves topological sort + This can be used for mod sorting, dependencies between registries, etc. + e.g. https://github.com/MinecraftForge/MinecraftForge/pull/4694#issuecomment-412520302 + New features: + Now accepts guava graph + Performance improvement: no longer reverse the graph; changed dfs to bfs + Accepets a comparator for secondary order, e.g. natural order, index by map + Now properly reports all cycles in a graph with Tarjan's strongly connected component algorithm + Adds a test to prove the validity of the sort and cycle detection + Modified build.gradle for test source directory and dependencies + Mod loading changes: + Sort mod file info instead of suppliers (we don't have suppliers instances) + Moves cycle error reporting out of topological sort and into mod sorter + Prevent mod file dependencies between mods that share the same file + - 24.0.95 Expose a couple of mods.toml properties properly. Half-implemented + override namespace - still needs to be reviewed and determined how this + might work in detail. + - 24.0.94 Use the reply logical side when enqueing work + When receiving a packet, NetworkDirection.getLogicalSide details where + the packet was the packet was sent from. Therefore, on a client it'll + be SERVER (and vice virsa), and so the work is queued on the sever + thread, instead of using Minecraft. + - 24.0.93 Use minecraft's util class to open files + - 24.0.92 Validate mod ids + - 24.0.91 Fix classcast in autoeventsubscriber, also actually make progression + work properly. This whole thing is a bit of a gross hack. + - 24.0.90 Fix recipe constants being overridden by a blank map. Closes #5380 + - 24.0.89 Fix case error in AutomaticEventSubscriber + - 24.0.88 Tell travis to skip 1.13 builds - they don't work there. + - 24.0.87 Move Registry Events to the mod event bus. + Add infrastructure to allow parallel or synchronous dispatch of + mod events, and pass-through of events to the dispatch system. + - 24.0.86 Greatly improve DeferredWorkQueue API (#5357) + - 24.0.85 Add utilities that RuntimeEnumExtender expects to exist + - 24.0.84 Re-introduce patch for injecting registry mappings during world loading. + And re-introduce registry freezing to ONLY the Register events. + Filter ObjectHolders by registry type and fire between every Register event. + - 24.0.83 Implement ConfigValue as a wrapper around ForgeConfigSpec results (#5361) + - 24.0.82 Fix exploded directory locator to actually scan all paths for a file. + - 24.0.81 Update MDK for new naming scheme + - 24.0.80 Fix up event naming, move them to sensible packages and document everything a bit. + - 24.0.79 [1.13] Expand tag deserializer to add optional values and remove values without overwriting everything. (#5350) + - 24.0.78 Fix mod lifecycle event names + - 24.0.77 Update a bunch of libs, rename some of the mod events to more + meaningful names. + - 24.0.76 Add list support to ForgeConfigSpec. + Fix incorrect Supplier used in ForgeConfigSpec. + Port ForgeChunkManager config to new system. + Delete old Configuration classes. It's finally gone! + - 24.0.75 Add list of so-far skipped 1.12 commits + - 24.0.74 Add CreativeTabs#getLabelColor + Patch skipped, was already applied in https://github.com/MinecraftForge/MinecraftForge/commit/47a11b9a7e35c2a2273b6828bd802f2cb06f5cd7#diff-0ea0358443c2ecf3b8682228736149b3R71 + - 24.0.73 Allow providing a BufferedImage for banner render generation (#5041) + Ported to 1.13 using NativeImage + Co-authored-by: tterrag + - 24.0.72 Fix Mesa biome entry tags in the BiomeDictionary (#5177) + - 24.0.71 Patch PotionHelper to use registry delegates (#5142) + - 24.0.70 Update github stale so issues can be Assigned + - 24.0.69 Fix MC-136995 - Chunk loading and unloading issue with entities placed in exact positions. (#5160) + This includes three commits from 1.12.x: + https://github.com/MinecraftForge/MinecraftForge/commit/c20a5e8805f64097430cf0722011f20862a8df9c + https://github.com/MinecraftForge/MinecraftForge/commit/93b704b459c6f537d3b1651008c49ce1db2e0ca1 + https://github.com/MinecraftForge/MinecraftForge/commit/ee0d43bbde37e258c36de1003436dbe3fcf88077 + Scatter gun patches to improve entity tracking and position tracking. + Provided by Aikar through the Paper project, this commit of patches combines the following patches: + https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0306-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch + https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0315-Always-process-chunk-registration-after-moving.patch + https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0335-Ensure-chunks-are-always-loaded-on-hard-position-set.patch + https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0378-Sync-Player-Position-to-Vehicles.patch + Co-authored-by: Gabriel Harris-Rouquette + - 24.0.68 Fix blockstate id map calculation. (#5279) + - 24.0.67 Move @EventBusSubscriber application to just after construction instead of pre-init. + - 24.0.66 Make Block.Builder methods accessible. Closes #5310 (#5313) + - 24.0.65 Fix exception mismatch for entity types (#5344) + - 24.0.64 Fix datapack walking not working for mod datapacks. Closes #5334 (#5335) + - 24.0.63 Add missing setSeed calls to ForgeBlockModelRenderer (#5338) + - 24.0.62 Reimplement @ObjectHolder scanning, and expose system for others to add handlers. + Fix forgedev and userdev run configs. + Fix issue in log functions assuming String arguments. + - 24.0.61 Fix reference to IForgeDimension.SleepResult being through Dimension, thus causing a Srg2Source issue. + And improper getWorld patch. + - 24.0.60 Update userdev and runconfigs for ForgeGradle changes. + - 24.0.59 Fix some translation strings. Will pull a big string update from crowdin too. + - 24.0.58 Fire registry events before preinit and after construct. + - 24.0.57 Update to 0.4.0 of modlauncher + - 24.0.56 Fix classloading properly. ModLoadingClassLoader doesn't work + with the proper delegation model. Abandoned it, in favour of injecting + locators into the Transformer classloader directly. + - 24.0.55 Fix up some stuff with resource packs, so the guilist works properly. + - 24.0.54 Update mdk with some tweaks for building + - 24.0.53 Finish up classloading system. Use ModJARURL to locate resources + and enable ModLauncher to use those instead. This allows all mods to load + within the scope of the game classloader, removing weird conflicts and + class discovery problems. + - 24.0.52 client and server work standalone and in forge dev. Next up userdev. + Moved some launchplugin code to the launcher. Moved servermain to + the launcher. + server currently needs cmdline arguments --fml.forgeVersion=24.0.51-1.13-pre --fml.mcVersion=1.13 --fml.mcpVersion=2018.09.12.04.11.00 --fml.forgeGroup=net.minecraftforge.test + - 24.0.51 fix up some discovery code, and make regular runtime _mostly_ work. + Still WIP and doesn't quite get to main screen yet. + - 24.0.50 Fix new launcher jar packaging. + Run license checker over new code. + - 24.0.49 separated fmllauncher code from main forge mod code. This enables much + stronger classloader separation between the two sides. Forge now + loads as a regular mod. + Still needs a bunch of debugging, but structure looks good and game loads + in forge dev. + - 24.0.48 ResourceLocation Utils for doing things.. + - 24.0.47 Better documentation for IForgeWorldType, TERFast, TERAnimation + Also rename AnimationTESR to TileEntityRendererAnimation + - 24.0.46 Fix patch mistake in IForgeWorldType: CUSTOMIZED -> BUFFET + - 24.0.45 Clean progress bar code and fix TextureMap patch (#5304) + - 24.0.44 Implement GuiScreen events for mouse and keyboard (#5297) + - 24.0.43 Add the sender to NetworkEvent.Context for server-side event handlers (#5295) + - 24.0.42 Port most of the world patches (#5294) + - 24.0.41 Change how Forge itself is located to be loaded similar to a real mod. + Fixes Minecraft/Forge annotation data missing. + Fix Capability injection. + - 24.0.40 FastTESR -> TileEntityRendererFast + - 24.0.39 Rendering patches (#5262) + - 24.0.38 Added JVM argument so lwjgl dll extraction works with unicode os usernames, closes #5282 (#5283) + - 24.0.37 Change getWorld function name to prevent inheritance change in Chunk + - 24.0.36 Fix the path handling for mod jar resource packs. (#5228) + - 24.0.35 Add raytrace logic to the GuiOverlayDebugForge, so that the debug overlay can show the currently targetted block and liquid. (#5278) + - 24.0.34 Fix typo in patch, that was preventing the key assigned to the chat keybind from working while in a searchable tab in the creative GUI. (#5276) + - 24.0.33 Fix classloading issues in userdev (and possibly also for things like tests within forgedev) (#5275) + - 24.0.32 World and TileEntity patch work. + TerrtainGen events are removed, 1.13's world gen re-write invalidates them all. + - 24.0.31 Create a userdev-specific main, and include it as an injected file in the userdev jar. (#5231) + - 24.0.30 More entity patch work. ISpecialArmor deleted. + - 24.0.29 Port some patches to 1.13 (#5267) + - 24.0.28 Fix vanilla exception mismatch: DataFixerUpper throws IllegalArgumentException but Minecraft tries to catch IllegalStateException instead, causing a hard crash instead of a soft one. (#5229) + - 24.0.27 Use getRawSchemeSpecificPart to preserve escape characters in uri, fix #5236 (#5237) + - 24.0.26 world.gen.feature patches, worldgen should be stable with vanilla. In all places I looked. + - 24.0.25 More patch work, our async chunk loading doesn't appear to be viable for 1.13. + - 24.0.24 Entity patches progress. + - 24.0.23 Fix race condition causing the FML handshake to hang (#5222) + - 24.0.22 Include project group in ForgeVersion and determine path to patched jar. + While testing we install to net.minecraftforge.test. So don't hardcode it. + - 24.0.21 Item and NBT patches, IShearable blocks are responsible for setting themselves to air, to allow for setting other states. + - 24.0.20 Most client patches done except the render pipeline. + Someone who has more in depth knowledge of that rendering system will need to do it. + - 24.0.19 Add my 'patches_old' directory, so that people can see my "progress". + Once the old folder is done, then patches are done. + Want to know whats still to do? Look in that folder. + Now stop asking. + - 24.0.18 GUI Patches + - 24.0.17 More patchwork. + - 24.0.16 Fix imports, remember to re-run gen patches! + - 24.0.15 Patch work, most of block classes, and fix eclipse run configs. + - 24.0.14 Add a a test publish stage to jenkins file for PRs. Should allow for full publish cycle test without actually publishing. + - 24.0.13 Fix crash when placing furnaces or brewing stands in 1.13 (#5225) + - 24.0.12 Fix changelog classifier, and prevent jenkins from running concurrent builds. + And remove caching from setup, as it doesn't use the rangemap. + - 24.0.11 Make Forge group/name dynamic in MDK as well. + - 24.0.10 Include changelog in published artifacts. + - 24.0.9 Fix jenkinsfile version detection and attempt caching rangemap again. + - 24.0.8 Fix version number not having MC prefix, and build artifacts. + - 24.0.7 Workaround for gradle issue with jar signing. + - 24.0.6 Setup instead of build. + - 24.0.5 Change checkout process. + - 24.0.4 Disable tests until we re-make them. + - 24.0.3 Move cache again, documentation is vague. + - 24.0.2 Potentially fix cache in Jenkinsfile. + - 24.0.1 Fix missing quote. + - 24.0.0 Create jenkins file for new jenkins. + Change version scheme to tag based versions. + +v8.99 +===== + - v8.99.2104 Add missing license headers. (#5192) + - v8.99.2103 MDK progress. + - v8.99.2102 Widen scope of gitignored eclipse files + - v8.99.2101 AdvancementRewards 1.13 patch + - v8.99.2100 Fix mod asset loading + - v8.99.2099 Fix diffuse lighting being broken on vanilla pipeline (#5185) + - v8.99.2098 run textcomponenttranslations through the ForgeI18N message format translator as well. + - v8.99.2097 load languages on the server as well as the client, and fix up a bunch of data packs. + - v8.99.2096 Server run profile, also setup logging for client profile. + - v8.99.2095 Tweak library locating code. Works well on vanilla and dev now. + - v8.99.2094 Fix the forge version presented to the game (remove MC prefix) + - v8.99.2093 Move the version packages somewhere that is now filtered so it doesn't + load twice. + - v8.99.2092 Fall colours + 🎃🎃🎃🎃🎃🎃🎃🎃🎃🎃 + - v8.99.2091 Missing language now presents to the UI. + - v8.99.2090 Better error passing from early to game client launch. + - v8.99.2089 Use the maven artifact code rather than our very outdated copy + - v8.99.2088 Add SHAs for post processors to allow the installer to skip if matching. + SpecialSource needs a update to stabilize output before it can be cached. + - v8.99.2087 Launch in the vanilla launcher now. + - v8.99.2086 More installer related tweaks. + - v8.99.2085 Specify version information using Java 8's Package Version system. + - v8.99.2084 Fix builds without crowdin key, and installer work. + Started moving version out of code. + Include expected vanilla class hashes in universal so we can validate them at runtime. + - v8.99.2083 fix up the examplemod for new FML and add a couple of extra bits. + - v8.99.2082 Use latest paulscode (removes need for soundfix transformer) and fix gitignore. + - v8.99.2081 Branding fixup. + - v8.99.2080 Config GUI tweaks, and MCP is now part of the "minecraft" entry. + - v8.99.2079 Installer work, universal obfed to srg names, and binpatches against SRG named clients. + - v8.99.2078 Fixup the config GUI and get things working again. + - v8.99.2077 Work on installer json generation. + - v8.99.2076 Basic error display GUI. + - v8.99.2075 Work on publishing tasks. + Userdev/universal/mdk done. + mdk needs updating once FG3 user side is finished. + Installer waiting on Interaller project re-write to do install time deobf/patching. + - v8.99.2074 Some tweaks to get the launcher working. + - v8.99.2073 Update mappings to 09/21 snapshots. + Conflict with getMatrix in ITransformation, so renamed to getMatrixVec. + - v8.99.2072 Disable eclipse compiler and switch to SRG patches. + - v8.99.2071 Fix remaining issues preventing compilation, launching, and loading worlds (#5156) + Fix duplicate ID for ingredient serializers + Fix KeyBinding compile errors. No GuiKeyBindingList patches yet. + Implement controls GUI and WorldServer patches + - v8.99.2070 Fixed all compile errors except the 4 in KeyBinding. + - v8.99.2069 More because git likes to split to many + - v8.99.2068 Ran License checker to fix the headers of files missing them. + - v8.99.2067 More work on compile errors, New system for ToolClasses, using a ToolType class instead to de-stringify things. + - v8.99.2066 Block patches and event work (#5138) + - v8.99.2065 Add concept of pushing/poping levels to ForgeConfigSpec as well as comments on those levels. + - v8.99.2064 Fix borked Item patch + - v8.99.2063 Fix the rest of the "easy" compile errors (#5151) + * Add Entity.changeDimension patch and transitively required patches + * Fix throws declaration on CommandSetDimension#execute + * Fix rest of errors in fluid package + * Add PLAYER_REACH attribute + * Fix compile errors in fml.client.config and add GuiButton patch + * Delete unnecessary client.config classes, fix all config errors + * Comment some fluid errors in models + * Fix all errors in common package root, except ForgeHooks + * Mass comment network package + * Experimental conversion of extended states to generic base class + * Fix errors in common.util + * Remove config annotation stuff cuz lex said so + * Make extended state stuff compile fully + - v8.99.2062 Beginning work on redesigning Config API. + - v8.99.2061 More work on recipes, custom ingredients, recipes, and constants should work now. + - v8.99.2060 Tweak to remove javac compile errors related to generics on registries. + Also remove the recipes registry call - they're gone from registries completely. + - v8.99.2059 Net handling pass 2. Tidied up login packet sourcing, generate registry packets. + - v8.99.2058 Net Handshake phase 1. Validates pairings on client and server. + - v8.99.2057 Migrate most of the OreDictionary to tags. + - v8.99.2056 Enforce bounds on min/max registry IDs + - v8.99.2055 Recipe work. No longer a registry. OreDictionary related code removed in favor of Tags. Started moving some OreDict items to tags. + Added code to RuntimeEnumExtender to return existing enum values with the same name if they exist instead of creating more. + - v8.99.2054 Fix errors in commands and getDimension->getId + - v8.99.2053 Revert unintentional change to FG version + - v8.99.2052 Command work, and Added TileEntityType as a Forge Registry. + - v8.99.2051 More compile cleanups. (#5139) + - v8.99.2050 Update MCPConfig to use new ForgeFlower to fix AccessTransformer issues on inner classes. + - v8.99.2049 Fix most of the compile errors in the client package (#5137) + * Add KeyBinding#getKey and clean up errors in KeyModifier + * Add dimension IRenderHandler patches + * Fix most of the compile errors in client package. + The rest are missing Block/KeyBinding patches + * Disable selective reloads until configs are finished + * Add OnlyIn on IForgeDimension to match those of Dimension + - v8.99.2048 Pin MCPConfig version + Cleanup and implement BrewingRecipes + Delete client command related things + Cleanup some biome stuff. + - v8.99.2047 Fix vanilla bug with GLFW init error display - actually the error, not the memory address containing the message + Load natives from the environment var, not hardcoding. + - v8.99.2046 Fix launching in dev + - v8.99.2045 Fix AnvilChunkLoader not having access to chunk cap dispatcher + - v8.99.2044 Add I18n accessor, fix up some mod log messages, make the EnumExtender work. + - v8.99.2043 Port capability patches to 1.13 and refactor to new system (#5134) + * resource package and misc leftover rendering stuff + * Port Item and ItemStack patches + * Extract most item patches to interface + * Refactor Item#setNoRepair to be part of Item.Builder + * Adapt AnimationItemOverrideList to new cap system + * Improve null contract of OptionalCapabilityInstance + * Remove Capability.cast + * Update CapabilityAnimation to new cap system + * Remove OptionalCapabilityInstance#flatMap and add NonNullConsumer + * Add capability patch to Entity, not everything yet + * Fix Entity patch and add missing methods to IForgeEntity + * Fix null contract of CapabilityDispatcher + * Add TileEntity caps + * Adapt FluidUtil to new cap system + * Add world caps + * Add chunk caps + * Clean up cap patches + * Replace all tabs with spaces + * Move builder methods on Item to Item.Builder + Whitepsace fix + * Sided stuff take 2 + * Prevent OptionalCapabilityInstance creating additional empty instances + * Cache getCapability result in AnimationTESR + * Fix imports in TileEntity patch + * Pull out cap code to base class, add village caps + - v8.99.2042 Initial blind port of the mod error screens + - v8.99.2041 Porting Forge rendering code to 1.13 (#5132) + - v8.99.2040 Introduce rework of Capability provider. And reduce errors to <2000 + - v8.99.2039 Remove old paulscode libraries. + Re-work EnumHelper and ObjectHolder systems to bypass JITer of final fields. + Other cleanups. + - v8.99.2038 More error cleanup, reinstanted IForgeReigstryEntry. + The abstract class will be used as the default, and to enable delegates but we should keep it api simple by keeping the interface. + Removed some patches that didnt get removed in the rebase. + - v8.99.2037 Add some missing libraries and work on GuiIngameForge. Down 700 errors. + - v8.99.2036 Tweak + - v8.99.2035 Network init + - v8.99.2034 Server starts + - v8.99.2033 Patches deleted + - v8.99.2032 Zeroth pass on 1.13 + - v8.99.2031 Moving some stuff around, network and server events. + - v8.99.2030 Dediserver runs and talks to clients. + - v8.99.2029 A much more straightforward networking system. + - v8.99.2028 Some beginnings of a network again. + - v8.99.2027 Well, it works, for a game, now. + - v8.99.2026 Some more stuffs. ObjectHolder's replacement? + - v8.99.2025 Things. they work. Obviously still WAY more to do. + - v8.99.2024 more things. Moving ModContainer around. + - v8.99.2023 metadata is dead + - v8.99.2022 Fidgeting while the world burns 🔥🔥🔥🔥🔥🔥 + - v8.99.2021 WOW 😲 such broken. Many brokes. + - v8.99.2020 Holy Moly, it's a big fat commit of broken code! + - v8.99.2019 Starting to put the launch itself together + - v8.99.2018 Access Transformer. Starting to try and launch things. + - v8.99.2017 Early signs of modloading + - v8.99.2016 Coremod + - v8.99.2015 Update NewFML.md + - v8.99.2014 Add documentation explaining changes. + - v8.99.2013 Goodbye @Mod, it was lovely knowing you! + - v8.99.2012 Goodbye @Mod, it was lovely knowing you! + - v8.99.2011 Delete MarkerTransformer. I don't think this has been used in years. + - v8.99.2010 Fix --mods and --modListFile arguments not making it past LaunchWrapper. + - v8.99.2009 Remove BlamingTransformer (#5115) + - v8.99.2008 Fix more apache exclusions. + - v8.99.2007 Change org.apache to org.apache.maven. class loader exclusion. + - v8.99.2006 Increase time it takes for Github Pull Requests to go stale + - v8.99.2005 Add variant alias for item models not loaded via blockstate (#5025) + - v8.99.2004 Added getter for children of CompoundIngredient (#5082) + - v8.99.2003 Allow network leak detection level to be specified (#5067) + - v8.99.2002 Fix saved toolbars not working with non-vanilla items (#5063) + - v8.99.2001 Fix server watchdog thread occasionally crashing on first run (#5019) + - v8.99.2000 New SleepingTimeCheckEvent to add yet another way to control sleeping. (#5013) + - v8.99.1999 Allow sending packets to client from ServerConnectionFromClientEvent (#4991) + - v8.99.1998 Fixed overworld spawn point reset when respawning in another dimension (#4982) + - v8.99.1997 Fix ModList cache never being updated (#5081) + - v8.99.1996 Fix loading languages with no underscore in the name (#5105) + - v8.99.1995 Fixed Redstone and RedstoneDiodes placement on modded blocks that use BlockFaceShape.SOLID for Top. (#5100) + - v8.99.1994 Fix blank Server GUI console log (#5089) + - v8.99.1993 Fix SlotItemHandler.isItemValid check + - v8.99.1992 Improve performance of FluidRegistry.getBucketFluids + - v8.99.1991 Fix received data for last vertex format element not being recorded (#5074) + - v8.99.1990 Fix missing lang entry for Swim Speed attribute (#5064) + - v8.99.1989 Added Swim Speed Attribute to EntityLivingBase (#4990) + - v8.99.1988 Add function to lookup model location for an ItemStack (#5017) + - v8.99.1987 Allow custom SpawnPlacementType registration (#4973) + - v8.99.1986 Resource type sensitive ResourceManager reloading, Disabled by default, but may increase performance. (#4658) + - v8.99.1985 Improve crash report details (#5011) + - v8.99.1984 Fire colour events for mesa and swamp biomes (#5029) + - v8.99.1983 Add functionality in IItemHandler to test if a slot can accept an item (#5033) + - v8.99.1982 Added CreativeTabs#getBackgroundImage (#5034) + - v8.99.1981 Add wooden doors to the OreDictionary. (#5036) + - v8.99.1980 Update and clean up Forge fluid render model (#4763) + - v8.99.1979 Allow configuring log levels using system properties. (#5024) + Defaults are: + -Dforge.logging.mojang.level=info (note that setting this to debug or trace will enable extra debug behavior which may slow things down or detect issues and crash) + -Dforge.logging.console.level=info + -Dforge.logging.file.level=info + -Dforge.logging.debugFile.level=trace + - v8.99.1978 Update README on github to fix the CLA section + - v8.99.1977 Add support for FluidStack-dependant colouring to Forge bucket (#4952) + - v8.99.1976 Use itemstack in LivingEntityUseItemEvent.Finish before it was used (#5015) + - v8.99.1975 Check use item result before calling onItemUseFirst. (#5016) + - v8.99.1974 Clean up and improve ICapabilityProvider javadocs (#4978) + - v8.99.1973 Update license header on ChunkIOThreadPoolExecutor + - v8.99.1972 Fix potential deadlock when chunkload raises non-IO exception (#4861) + - v8.99.1971 Fix MDK not having license texts. + - v8.99.1970 Change some client hooks to use GlStateManager functions (#5010) + - v8.99.1969 Move some test mods into appropriate packages (#5006) + - v8.99.1968 Write full class name in undefined packet error messages. (#4970) + - v8.99.1967 Fix ItemHandlerHelper.giveItemToPlayer creating item entities with incorrect contents (#5007) + - v8.99.1966 Run licenseFormat to apply license header to all files. + - v8.99.1965 Restore original license headers in Maven versioning package + - v8.99.1964 Restore original license headers of delta package + - v8.99.1963 Setup configuration for licenser Gradle plugin + - v8.99.1962 Fix player movement status not syncing across dimension change (MC-10657) (#4974) + - v8.99.1961 Fix some ClassCastExceptions incorrectly being logged in FML handshake. (#4972) + - v8.99.1960 Fix ISpecialArmor to allow for "Unblockable" damage to be handled if the armor opts in. (#4964) + - v8.99.1959 Fix FML entity network spawning not using EntityBuilder's facctory. Closes #4845 and #4846 + - v8.99.1958 Fix NPE when sleeping in some custom beds. Closes #4956 + - v8.99.1957 Added Fluid Place Block Event for when fluid changes blocks in world. (#4627) + - v8.99.1956 Cleanup licenses + - v8.99.1955 Add Farmland Trample Event (#4895) + - v8.99.1954 Switch from trove to fastutil collections (#4933) + - v8.99.1953 Added Item#readNBTShareTag(ItemStack, NBTTagCompound) (#4932) + - v8.99.1952 Fix MC-234: Z-fighting when viewing break animation side-on (#4928) + - v8.99.1951 Clean up some dimension manager code and add a command to list dimensions (#4902) + - v8.99.1950 Change item model loading priority to fix model conflicts (#4898) + - v8.99.1949 Improve server console implementation (#4821) + - v8.99.1948 Add validation to recipe registry (#4957) + - v8.99.1947 Fix flickering leaves when mods break the blurMipmap settings (#4997) + - v8.99.1946 Clear out stored errors after model loading finishes (#4938) + - v8.99.1945 Fix AutomaticEventSubscriber error message (#4986) + - v8.99.1944 Always wrap mod creation errors in LoaderException + to make error message more clear + - v8.99.1943 Fix vertex lighter using stale normal data (#4917) + - v8.99.1942 Fix structure template processors causing cascading world generation (#4979) + - v8.99.1941 Fix scala mods crashing with the json annotation cache. + - v8.99.1940 Fix black flickering on animated models by clamping max diffuse lighting multiplier to 1.0 (#4962) + - v8.99.1939 Fix crash from search tree processing invalid recipes (#4942) + - v8.99.1938 Fix names in JSON annotation data not matching expected format. Closes #4953 + - v8.99.1937 Bump version in prep for new RB. + - v8.99.1936 Add potential support for models defining 'vanilla like' rotations in Forge's Modified Blockstate format. + - v8.99.1935 Copy the Dedicated server's EULA checking to main() function so it can exit earlier. Closes #3659, #3661 + - v8.99.1934 Fix Forge bucket not declaring all texture dependencies (#4930) + - v8.99.1933 Reuse multipart model instances across variants (#4791) + - v8.99.1932 Fix language parsing for creating the java locale + - v8.99.1931 Fixes parameter inconsistency in IFieldWrapper (Fixes #4325) (#4766) + - v8.99.1930 Added formatting support for status messages (#4925) + - v8.99.1929 Fix server-side data not being released (#4882) + - v8.99.1928 Fix memory leaks in EnchantmentHelper (MC-128547) (#4880) + - v8.99.1927 Change composite models to fetch quads from submodels using full context (#4809) + - v8.99.1926 Expand Villager Farmer AI to generic crops. (#4745) + - v8.99.1925 Check name prefix used for tile entity registrations (#4681) + - v8.99.1924 Add an event to control nether portal formation (#4735) + - v8.99.1923 Allow custom models to have per-state lighting (#4732) + - v8.99.1922 Fix some light-emitting blocks letting light through (MC-119932) (#4642) + - v8.99.1921 Preserve original ChunkPos for decoration events. (#4767) + - v8.99.1920 Fix library folder detection on various JVMs. + - v8.99.1919 Add supports for redirects when doing mod version checks (#4826) + - v8.99.1918 Fix imports + - v8.99.1917 Give immediate and complete error messages when there is a crash during startup (#4869) + - v8.99.1916 Revert "Give immediate and complete error messages when there is a crash during startup (#4869)" + This reverts commit a38f5fd6a24297490671cd300b5e4a9020189f63. + - v8.99.1915 Remove invalid optimization in ItemStackHandler#setStackInSlot #3465 + - v8.99.1914 Give immediate and complete error messages when there is a crash during startup (#4869) + - v8.99.1913 Clean up mod dependency checking code (#4922) + - v8.99.1912 Fix version range check for required mods #4918 + - v8.99.1911 Add javadoc note about minimum required Forge versions for old Forge. Close #4918 + - v8.99.1910 Fix possible NPE when calling Loader.getIndexedModList #4919 + - v8.99.1909 Fix MC-12269 Various Particles glitchy movement (#4914) + - v8.99.1908 Fix deobfuscator not regenerating super maps (#4856) + - v8.99.1907 Clean up broken aliases caused by registry bug #4894. (#4909) + - v8.99.1906 Move registry snapshot read/write code to Snapshot class. Cleaner code. + - v8.99.1905 Only revert to frozen data on server shutdown on client. Should fix race condition exposed by #4904 + - v8.99.1904 Potentially fix issue with BungeeCord or other servers resetting the registry mappings on the client while the game is running. + Errors may still occure if the client knows about world data beyond vanilla. Servers should NEVER send world/registry invocations before they have sent registry mappings. + Closes #4901 + - v8.99.1903 Reduce range requirement for World.checkLightFor from 17 to 16 (#4729) + - v8.99.1902 Fix typo in validation of vanilla registry wrappers (#4899) + - v8.99.1901 Fix #4772: add an "isActivator" boolean to powered rails (#4774) + - v8.99.1900 Add checks for undefined packet discriminators when sending messages (#4890) + - v8.99.1899 Fix some code holding client world references longer than needed (#4881) + - v8.99.1898 Don't try to render removed tile entities. Fixes MC-123363 (#4811) + - v8.99.1897 Fix overrides typo in saving registry data. Closes #4894 + - v8.99.1896 Fix library path and soft fail when repository root is not found. + - v8.99.1895 Fix libraries not being added to the modlist when using external metadata. Closes #4879 + - v8.99.1894 Fix dragon fight not initialising correctly under some circumstances (#4868) + - v8.99.1893 Cleanup some issues with the mod extraction to the memory modlist. Closes #4874 #4875 + - v8.99.1892 Improve missing mod dependency error screen (#4762) + - v8.99.1891 Fix biome dictionary's biome type detection (#4878) + - v8.99.1890 Clean up Reader/Writer handling to use a specified charset (#4872) + - v8.99.1889 Suppress firing events at load time if an error has already occurred (#4801) + - v8.99.1888 Fix FluidUtil.getFluidHandler skipping some fluid tile entities (#4854) + - v8.99.1887 Parse contained dependency Timestamp as long instead of int (#4866) + - v8.99.1886 Fix Forge's metadata not being loaded. Closes #4865 + - v8.99.1885 Fix mods without ModSide meta value. + - v8.99.1884 Rewrite dependency extraction to use mod list system (#4841) + - v8.99.1883 Bump Forge version for new dev chunk. + - v8.99.1882 Fix vanilla duplication bug. + - v8.99.1881 Slow down Forge chunk gen worker when save queue is to high. + Prevents task from completing while tons of chunks are pending save. + And add minimum notification every 60 seconds. + - v8.99.1880 Add support for World Workers skipping ticks without being removed from the worker list. + - v8.99.1879 Fix MC-88179 in a better way that avoids and closes #4824 (#4830) + - v8.99.1878 Improve the warning logged for cascading world generation (#4725) + - v8.99.1877 New ITeleporter interface making dimensional teleportation easier. (#4602) + - v8.99.1876 Add a FML outbound target for all players tracking a point or entity in the world. Closes #3677 (#4631) + - v8.99.1875 Prevent EntityPlayer.attackEntityFrom from firing LivingAttackEvent twice (#4661) + - v8.99.1874 Add a way to get a list of registered biome types (#4685) + - v8.99.1873 Improve performance of some ExtendedBlockState methods (#4698) + - v8.99.1872 Optimise adding normal element to vertex formats (#4699) + - v8.99.1871 Check for empty dimensions outside of chunk unloading loop, culling worlds without needing chunk unloads to trigger it. (#4704) + - v8.99.1870 Create event for overriding mob griefing flag based on entity. (#4710) + - v8.99.1869 Add description to Error raised by the server hang watchdog. (#4714) + - v8.99.1868 Update ItemHandlerHelper.giveItemToPlayer to allow player who picked up the item to hear the sound as well (#4720) + - v8.99.1867 Fixed Spectator mode particles and sounds computed from where you have been before (MC-46445) (#4728) + - v8.99.1866 Add a WorldProvider#canSleepHere() method to allow providers to control sleeping in beds separately from re-spawning. (#4741) + - v8.99.1865 Fix FMLCommonHandler#exitJava printing useless/wrong calling info (#4742) + - v8.99.1864 Reduce memory usage of model transforms (#4753) + - v8.99.1863 Fix some block connection logic not matching vanilla (#4781) + - v8.99.1862 Fix for the player inadvertently being removed from the Entity Tracker when the chunk they were in unloads after they teleport out of it. (#4784) + - v8.99.1861 Small performance improvement to ItemStack, by using Items.AIR directly instead of getting it from the Block map. (#4786) + - v8.99.1860 Added chunk instance to ChunkWatchEvent (#4805) + - v8.99.1859 Add fences and fence gates to ore dictionary (#4807) + - v8.99.1858 Fix entities sometimes not rendering when out-of-world (#4823) + - v8.99.1857 Fix issues with the test mods + - v8.99.1856 Reorganise test mods into packages (#4706) + - v8.99.1855 Fix servers crashing due to initializer on @SideOnly field (#4825) + - v8.99.1854 Cleaner TileEntityItemStackRenderers, now stored on the Item. Modders should be careful and cache their renderers. (#4700) + - v8.99.1853 Add support for creator mod ID for modded enchanted books, potions, arrows, and spawn eggs (#4810) + - v8.99.1852 Remove Mercurius from optional mods. + - v8.99.1851 Fixed sound engine crash when stopping streaming sounds (#4765) + - v8.99.1850 Merge vanilla pre-decompile annotations with Forge's post-patching. Fixes #4769 Crash detail classes causing class not found errors. + - v8.99.1849 Fix NBT data loss when shift-clicking stacked items in the enchantment table (MC-17431) (#4817) + - v8.99.1848 Update docs for ItemTooltipEvent + - v8.99.1847 Fix some IResources being leaked (#4806) + - v8.99.1846 Fix server console logging issues + Closes #4808 + - v8.99.1845 Fix up logging and log4j configuration (#4802) + - v8.99.1844 Make lookupFluidForBlock work for flowing water and lava (#4675) + - v8.99.1843 Patched BlockInfo#updateLightMatrix to use IBlockState#doesSideBlockRendering instead of Block#doesSideBlockRendering (#4798) + - v8.99.1842 Fix integrated server crash not stopping client (#4796) + - v8.99.1841 Fix #4792 TextComponentHelper handling for FakePlayers + - v8.99.1840 Fix serverside startup failure when checking for vanilla acceptance (#4783) + - v8.99.1839 Improve how smooth lighting code handles translucency (#4711) + - v8.99.1838 Prevent various vanilla blocks from loading unloaded chunks (#4689) + - v8.99.1837 Improve the "Mod rejections" error message when connecting to a server (#4761) + - v8.99.1836 Fix the ForgeChunkManager to use the writebehind FileIO thread for writing (#4777) + the chunk file. Closes #4775 + This is a performance tweak - doing File IO on the server thread during + world saves causes significant lag spikes. This is one of many. + - v8.99.1835 Fix vanilla crash classes not being preloaded. Closes #4769 + Fix classes not being aggregated for mods using the new annotation cache. + - v8.99.1834 Fix incorrect dimension ID being used for maps (#4690) + - v8.99.1833 Don't cull generated item models with non-default transforms (#4749) + - v8.99.1832 Maintain deterministic order in deserialised Forge blockstates (#4748) + - v8.99.1831 Add function to BufferBuilder to directly insert byte data. Closes #4722 + - v8.99.1830 Clean up some GUI code and change magic numbers to GL constants (#4734) + - v8.99.1829 Minor cleanup for TestAnnotationParser + - v8.99.1828 Initial implementation of JSON based annotation scanning. + Disabled by default for now, until proven to be fully function. + Enable using -Dfml.enableJsonAnnotations=true + - v8.99.1827 Remove Mercurius from release JSON, Sadly it's dead we may address it at a later date. + - v8.99.1826 Update Github Stale bot message to better explain how to un-stale issues + - v8.99.1825 Bump version for RB. + - v8.99.1824 Change chunk gen command to only keep the target dimension loaded (#4705) + - v8.99.1823 Fix inconsistency between vanilla and modded glass. Closes #4679 (#4680) + - v8.99.1822 New hook in WorldProvider to control client lighting re-checks (#4645) + - v8.99.1821 New hook to delegate some liquid related physics to the blocks themselves. (#4604) + - v8.99.1820 Remove texture loads from SimpleModelFontRenderer (#4721) + - v8.99.1819 Fix some shapeless recipes using damageable items not working (#4713) + - v8.99.1818 Use relative time offset, rather than absolute value, for animations (#4635) + - v8.99.1817 Fixed UV contraction for the texture in the top-left corner of the texture map (0, 0), see sp614x/optifine#1024 (#4703) + - v8.99.1816 Fix some test mods preventing Forge server-Vanilla client connections (#4616) + - v8.99.1815 Fix errors in preInit being lost when followed by a crash in fireRegistryEvents or objectHolder + - v8.99.1814 Added @Ignore to the annotation based Config system. (#4696) + - v8.99.1813 Improve error message on server when a vanilla client connects (#4691) + - v8.99.1812 Fixed pumpkins passing the wrong position to isSideSolid on placement (#4686) + - v8.99.1811 Fix MusicType enumhelper not working (#4682) + - v8.99.1810 Make FluidUtil sounds server-side, add simulate option for tryFill/EmptyContainerAndStow (#4623) + - v8.99.1809 Expose CriteriaTriggers.register, closes #4109 (#4634) + - v8.99.1808 Catch and log exceptions during model baking (#4609) + - v8.99.1807 Fix forge fluids being treated as solid blocks (#4606) + - v8.99.1806 Add MobSpawnerBaseLogic reference to SpecialSpawn and CheckSpawn events (#4600) + - v8.99.1805 Fix default GUIConfig displaying child categories twice (#4599) + - v8.99.1804 Added a tooltip color event. (#4595) + - v8.99.1803 Moved firing the MinecartInteractEvent from individual subclasses up to EntityMinecart, which as a result automatically supports EntityMinecartMobSpawner and EntityMinecartTNT. (#4583) + - v8.99.1802 Add missing check for allowed values to recolorBlock() (#4579) + - v8.99.1801 Avoid copying Forge Registry keys, values, and entries (#4545) + - v8.99.1800 Make async chunk loading a config option (#4544) + - v8.99.1799 Allow WorldProviders to specify in-game music (#4539) + - v8.99.1798 Block::addRunningEffects (#4248) + - v8.99.1797 [1.12.x] Implement hooks allowing mods to add horse armor. Partially addresses #3975. (#3994) + - v8.99.1796 Fix debug flags for ClassPatchManager not working. Closes #3674 + - v8.99.1795 Fix FML error logging for mods that crash during FMLLoadCompleteEvent + - v8.99.1794 Minor code and documentation cleanup. (#4664) + - v8.99.1793 Fix dormant chunk cache allowing entity data to be overwritten (#4528) + - v8.99.1792 Fix dimension data not being saved (#4667) + - v8.99.1791 Don't copy state from variant to multi-part model (#4629) + - v8.99.1790 Fix vanilla giant jungle trees causing cascading generation (#4652) + - v8.99.1789 Fix Beetroot crops don't break/drop when trampled (#4644) + - v8.99.1788 Enhance crash message when custom models return null default state (#4615) + - v8.99.1787 Update Github StaleBot config to run on old Issues as well as PRs + - v8.99.1786 Downgrade RegistryEntry's dangerous alternative prefix message to info instead of BigWarning. + This is still most likely a broken mod, but nobody ever actually fixes themselves, and i'm tired of being blamed for 'spamming' the logs. + - v8.99.1785 Fix missing call to release() in the event channel handler (#4513) + (reverted from commit cd99957627625f7baeff8761c6382b05db9699d3) + - v8.99.1784 Added Custom Slime Block hook for Piston. (#4520) + - v8.99.1783 Add some extra context to Advancements/Minecart/Fishing/TileEntity loot handlers.(#4443) + - v8.99.1782 Adjust light matrix calculations to use per-face logic (#4339) + - v8.99.1781 Fix applyUVLock not preserving input order (#4336) + - v8.99.1780 Adjust diffuse light calculation to match vanilla facing values (#4305) + - v8.99.1779 Fix invalid rendering of single-frame B3D models (Fix #3815) + - v8.99.1778 Fix animation of rotated block parts (#4156) + - v8.99.1777 Fix BakedQuadRetextured not overriding getSprite (#4137) + - v8.99.1776 Added LivingKnockBackEvent event to allow better control over knock back effects. (#4503) + - v8.99.1775 Delay egg creation to avoid null statistics (#4508) + - v8.99.1774 Fix missing call to release() in the event channel handler (#4513) + - v8.99.1773 Reimplemented TileEntity and Entity Update Profiling in the /forge track command (#4521) + - v8.99.1772 [macOS] Fix missing text on loading error screens (#4532) + - v8.99.1771 Don't enforce IPv4 for clients connecting to IPv6-only servers (#4563) + - v8.99.1770 Add an event for registering block/item colour handlers (#4565) + - v8.99.1769 Fix: Anvil Bug with Custom Damage Items. (#4570) + - v8.99.1768 BlockFlowerPot now checks solid top side instead of old method. (#4571) + - v8.99.1767 Fix startIndex for /forge generate position parsing (#4572) + - v8.99.1766 Make vanilla powered rails receive power from mods' custom powered rail subclasses (#4573) + - v8.99.1765 Deprecate passing a class to CapabilityManager::register (#4574) + - v8.99.1764 Add missing nullability annotations to some Forge-added methods (#4578) + - v8.99.1763 Change how chests check if they're blocked. (#4584) + Readd Vanilla Bug: https://bugs.mojang.com/browse/MC-378 + - v8.99.1762 Allow EntityFishHook to spawn water particles in all liquids that use Material.WATER (#4585) + - v8.99.1761 Add Sound loading progress bar (#4593) + - v8.99.1760 Clean up capability checking for entities (#4591) + - v8.99.1759 Fix sometimes being unable to extract items from double chests (#4590) + - v8.99.1758 Fix item handler documentation that says returning ItemStack.EMPTY is required (#4587) + - v8.99.1757 Added color as field with setter to Fluid class. (#4460) + - v8.99.1756 Prevent tooltips from going off the top of the screen. + - v8.99.1755 [1.12] Add Advancement Event (#4467) + - v8.99.1754 Update java docs for IItemHandler. Fix #4553 + - v8.99.1753 Restore binary compatibility in EntityItemPickupEvent + - v8.99.1752 Re-enable Vanilla's Shapeless recipe matching. + - v8.99.1751 Fix for the EntityItemPickupEvent having 0 count item when event is fired. (#4549) + - v8.99.1750 Don't force IPv4 network stack if IPv6 is specifically requested (#4547) + - v8.99.1749 Fix more bad shapeless recipe matching. Closes #4557 + - v8.99.1748 Version bump for Recommended Build. + - v8.99.1747 Add TAG_LONG_ARRAY to Constants.NBT (#4552) + - v8.99.1746 Create custom shapeless recipe matching system. Should solve #4516 damageable items in shapeless recipes. + - v8.99.1745 Clean up old code for detecting BaseMods. Close #4530 (#4540) + - v8.99.1744 Fix BufferBuilder not expanding under some conditions. (#4538) + - v8.99.1743 Add support.yml for support bot on github. + - v8.99.1742 Fix errors caused by multi-target messages sent from LAN host (#4536) + - v8.99.1741 Fix server icon response leaking buffer (MC-122085) (#4534) + - v8.99.1740 Fix CompoundIngredents not working properly in shapeless recipes. + - v8.99.1739 [1.12.x] Added BucketUse event to ForgeUniversal Bucket (#4454) + - v8.99.1738 Non-player entities now respect WorldProvider.getMovementFactor, closes #4470 (#4471) + - v8.99.1737 Fix entity spawn messages not handling buffer correctly (#4524) + - v8.99.1736 Make Ingredient explode wildcard values like OreIngredient. + Fixes some issues related to Grums order fix for Shapeless recipes. + Other more advanced usages need to be documented and tested. + - v8.99.1735 Fix server incorrectly marked as stopped before forge's handleServerStopped() (#4517) + - v8.99.1734 Fix network buffer leak with multi-part messages (#4511) + - v8.99.1733 Fix buffer leak in vanilla custom payload packet handling (#4512) + - v8.99.1732 Fix network buffers not being released in some places (#4510) + - v8.99.1731 Fix resource loading on some mac systems when SplashProgress is enabled (#4082) + - v8.99.1730 Fix MC-51150 (#4495) + - v8.99.1729 Fix incorrect lighting of item models (#4493) + - v8.99.1728 Change item model alpha tests to match values used for rendering (#4490) + - v8.99.1727 Fix NPE when player tries to sleep without bed (#4487) + - v8.99.1726 Added tint index of 0 to fluid models (#3938) + - v8.99.1725 Fix FastTESR quad sort (#4298) + - v8.99.1724 Fix the incorrect matching algorithm in ShapelessRecipes and ShapelessOreRecipe (#4472) + - v8.99.1723 Fix BlockDynamicLiquid using mismatched state/position pair (#4501) + - v8.99.1722 Fix more test mod warnings (#4477) + - v8.99.1721 Add LivingDamageEvent (#4349) + - v8.99.1720 Create IRecipeContainer interface and implementation to allow RecipeBook to work on custom GUIs (#4480) + - v8.99.1719 Add InputUpdateEvent (#4356) + - v8.99.1718 Added a cloud renderer that uploads geometry to the GPU. (#4143) + - v8.99.1717 [1.12] Replace ThrowableImpactEvent with a more generic version (#4040) + - v8.99.1716 Clean up BlockSnapshot code (#3737) + - v8.99.1715 Fixed property losing state after rename. (#4123) + - v8.99.1714 Fix GameData#revert ignoring RegistryManager parameter (#4232) + - v8.99.1713 Allow custom selector types to be defined (#4259) + - v8.99.1712 Clean up more deprecated library functions (#4283) + - v8.99.1711 Improve performance of World.collidesWithAnyBlock (#4286) + - v8.99.1710 Move reach distance to an attribute (#4331) + - v8.99.1709 Resolve a crash relating to plantFlower when biome has no flowers (#4381) + - v8.99.1708 Improve the Forge Bucket (#4435) + - v8.99.1707 Prevent fake players from making advancements (#4438) + - v8.99.1706 Further reduce quad count of generated item models (#4448) + - v8.99.1705 Fix killing blow causing combat tracker to lose data (MC-121048) (#4452) + - v8.99.1704 Recalculate chunk height map minimum on load (#4453) + - v8.99.1703 Changed BlockFluidBase "fog" color use color from Fluid getColor() method (#4462) + - v8.99.1702 Improve performance of inserting into inventory wrappers (#4468) + - v8.99.1701 Fix some locations where State Sensitive Materials were not used. Closes #4474 + - v8.99.1700 Add caching of data for flat lighting (#4358) + - v8.99.1699 Fix spider/chicken jockeys being unable to spawn naturally (MC-103516) (#4429) + - v8.99.1698 Clean up Forge commands. Add HelpCommand. Fix #4444 (#4451) + - v8.99.1697 Fix some more test mod warnings (#4469) + - v8.99.1696 [1.12.x] [Animation API] Add rotation origin variable (#4466) + - v8.99.1695 Fix some warnings produced by test mods (#4456) + - v8.99.1694 Fix performance regression in FastTESR rendering + - v8.99.1693 Fix outdated VersionParser javadoc link + - v8.99.1692 Add configuration for probot-stale for github + - v8.99.1691 Update mcp mappings to 20171003 + - v8.99.1690 [1.12] Add support for client & server dependencies for mods (#4403) + - v8.99.1689 Add Item.getModId to show which mod is associated with a subitem (#4330) + - v8.99.1688 Add Chunk capabilities (#4228) + - v8.99.1687 Fix some chunk data packets being created unnecessarily (#4414) + - v8.99.1686 Improve performance of vertex format mapping by caching hashcodes (#4370) + - v8.99.1685 Reduce the number of quads generated by ItemLayerModel (#4332) + - v8.99.1684 [1.12] Check both hands for sneak interaction bypass (#4256) + - v8.99.1683 Allow item models to use formats other than ITEM (#4273) + - v8.99.1682 Fix being unable to see with night vision under some conditions (#4383) + - v8.99.1681 Fix block and torch placement logic not matching vanilla (#4210) + - v8.99.1680 Add hook to configure EntityEquipmentSlot for item. + - v8.99.1679 Store entity data for dormant chunks using NBT (#4162) + - v8.99.1678 Allow for MapDecoration to use alternate rendering, for example a custom spritesheet (#4027) + - v8.99.1677 Remove limitation of Shaped crafting recipes not being used on grids larger than 3x3 + - v8.99.1676 Fix not being able to write in a blank, renamed Book and Quill (#4433) + https://bugs.mojang.com/browse/MC-1685 + - v8.99.1675 Add new /forge entity list command for displaying a list of all entities in world. + As well as tracking down chunks with large amounts of entities. + - v8.99.1674 Fix test mod shield JSON incorrect bottom face UV's (#4295) + - v8.99.1673 Prevent a mutable BlockPos leak in World#setBlockState (#4388) + - v8.99.1672 Fix IngredientNBT comparing stackSize when checking if ingredient is valid (#4418) + - v8.99.1671 Auto-detect registry namespace when using a legacy string id in EntityEntryBuilder fixes #4410 (#4411) + - v8.99.1670 Introduce entity entry builder, useful in the Register event replacing needed calls to EntityRegistry. (#4408) + - v8.99.1669 MC 1.12.2 update. + - v8.99.1668 Fix lightmap calculation vertex clamping (#4387) + - v8.99.1667 Fix chunk gen mobs not firing the CheckSpawn event. Closes #4394 (#4396) + - v8.99.1666 Add an extra error check for OBJ model materials (#4402) + - v8.99.1665 Fix up test mods (#4399) + - v8.99.1664 Add new /forge gen command to generate large amounts of chunks. + Usage: /forge gen [dimension] [notifications] + Position is in Block Coords, and can be relative to the player. These will be converted to chunk coords for you. + Count is the number of chunks to load. This is not a radius, actual total number of chunks. + Dimension is optional, you can use this to pregen other worlds. + Notifications is the chunk interval to inform you of the generating progress. This is optional and will be 5% or 100 whichever is higher. + Added new config option to modify vanilla world gen to fix various cascading issues. MC-117810 MC-114332 and more. + This WILL change block placement from vanilla world gen. So this is a opt-in value. Do not report differences in worlds with this flag enabled. + - v8.99.1663 Fixed ShapedOre recipes not laying out correctly with the guidebook. + - v8.99.1662 Fixed search tabs using wrong contents. (#4393) + - v8.99.1661 Bump version for RB. + - v8.99.1660 Fix #4386 Race condition when unloading chunks causes dead tile entities + - v8.99.1659 Patch block model renderer to use location-aware light value (#4303) + - v8.99.1658 Improve generation of normals for vanilla models (#4313) + - v8.99.1657 Fire RenderGameOverlayEvent for vignette (#4360) + - v8.99.1656 Fix light sources rendering wrongly with night vision (MC-58177) (#4365) + - v8.99.1655 Fix CustomModLoadingErrorDisplayScreen not being handled during init or preinit. (#4320) + - v8.99.1654 Insert FML handler before Vanilla connection handshake completes (#4380) + - v8.99.1653 Add missing bounds checks to ItemTextureQuadConverter (#4343) + - v8.99.1652 Allow custom GuiEditArrayEntries without having to recreate the object in several places (#4329) + - v8.99.1651 Add support instructions to be displayed when creating an issue on Github (#4323) + - v8.99.1650 Adjust float (un)packing functions to be slightly more accurate (#4316) + - v8.99.1649 Fix vanilla map pixel data being used in various places (#4068) + - v8.99.1648 [1.12] Remove patches adding chunkExists() function, switch to vanilla code (#4054) + - v8.99.1647 Added missing MapGen types to the InitMapGenEvent (#4322) + - v8.99.1646 Fix nether wart, pumpkins, and melons passing the new state as the original state to CropGrowEvent.Post (#4377) + - v8.99.1645 Fix FieldWrapper.MapWrapper initialising wrong category (#4335) + - v8.99.1644 Don't parse category names as regular expressions in FieldWrapper.MapWrapper (#4334) + - v8.99.1643 Fix issue saving observers using different metadata then vanilla. + - v8.99.1642 Fix netty warning spam when sending >1MB packets (#4363) + - v8.99.1641 Fix FML handshake crash, fixes #4285 and #3974 (#4304) + - v8.99.1640 Fix recipe book auto-fill not working for OreDictionary ingredients. + - v8.99.1639 Fix KeyBindings reset buttons being inverted. + - v8.99.1638 Fix for dummied server side registry entries while client has read entries. + - v8.99.1637 Tabulate crash report mod list and add signature information (#4251) + - v8.99.1636 [1.12] Fix wood plank ore dictionary recipes (#4310) + - v8.99.1635 Fix UnknownFormatConversionException during erroring TE/Entity removal (#4312) + - v8.99.1634 Add support for server side only recipes, as well as detection of vanilla client recipe book filter to prevent errors. + - v8.99.1633 Fix typo in CapabiltyFluidHandler (#4306) + - v8.99.1632 Fix splitting big packets skipping one byte per additional part (#4301) + - v8.99.1631 Fix tests + - v8.99.1630 Add PlayerSPPushOutOfBlocksEvent. (#4091) + - v8.99.1629 Add Ability to Override PotionEffect Default Sort Order (#4172) + - v8.99.1628 Add support for oredict item predicates in advancements, and add a registry for item predicates (#4188) + - v8.99.1627 Add support for running IModel.retexture() on models from blockstates (#4200) + - v8.99.1626 Fix invalid FastTESR quad ordering (#4267) + - v8.99.1625 Continue loading mod recipes and advancements after encountering an error (#4277) + - v8.99.1624 Add a hook to allow world providers to change the lightmap colours (#4279) + - v8.99.1623 Fix MC-117075 lag spike when unloading many tile entities (#4281) + - v8.99.1622 Better descriptions on dependency version range error screen (#4284) + - v8.99.1621 Filter out scala libraries in forge dev workspace. + - v8.99.1620 Fix IOUtils import error caused by server/client libraries desync. + - v8.99.1619 Fix odd NPE with list files for empty directories. + - v8.99.1618 Fixed missing line in logger. + - v8.99.1617 Cleanup some output and move the Jar-In-Jar extractor to before any coremods/mods are loaded so. + The intention is to rework this entire thing to use maven style storage, IF we can get Mojang to pass in the Libraries folder. + - v8.99.1616 Lex doesn't like this. + Revert "Fix up MC version compatibility checking to be a little less verbose." + This reverts commit 1927fd76e20a1b3075cb841b09c2caeb57ebd242. + - v8.99.1615 Fix up MC version compatibility checking to be a little less verbose. + If people use properly formatted version compatibility strings, or the + default compiled in one, this will work exactly as before, but has + less dependence on specific formats for the mcversion string. So a mod + declaring [1.11, 1.12] will now be 1.12.1 compatible by default, for + example. + - v8.99.1614 1.12.1 Update, Not much modder facing changes, 1.12 mods should load and run fine on this version. + - v8.99.1613 Add smarter getter for block slipperiness (#4116) + Fixed MC-119811, Boats rubber banding when dismounted. + - v8.99.1612 Add GuiContainer Foreground render event. (#4127) + - v8.99.1611 Use ClassValue to store tileentity names for profiler in lazy cache. (#4021) + - v8.99.1610 Move client-only config options to client config (#4084) + - v8.99.1609 Added CriticalHitEvent to allow more control over whether a attack is a critical or not, and what damage it does. + - v8.99.1608 Fix stacked entity item rendering using the wrong transform for the extra items. (#4158) + - v8.99.1607 Fix lopsided 'V' in FML icons. (#4179) + - v8.99.1606 Added pages to the advancements GUI to allow for unlimited root advancements. (#4183) + - v8.99.1605 Ignore neighbor changes for comparators on the client (Vanilla behavior) (#4186) + - v8.99.1604 Fixed bug where config categories errored if they contained regex special characters. (#4187) + - v8.99.1603 Allow sneaking to bypass villager interaction GUI. (#4193) + - v8.99.1602 Clean up Block.getLightValue(IBlockState, IBlockAccess, BlockPos) (#4203) + - v8.99.1601 Make LivingEntityUseItemEvent not abstract (#4208) + - v8.99.1600 Replace hardcoded block check with isTopSolid method call for placing button/lever (#4212) + - v8.99.1599 Added support for oredict dyes to Fireworks, Armors, and Shulker recipes. (#4223) + - v8.99.1598 Limit some server to client update packets for Item Capabilities (#4252) + - v8.99.1597 Fixed Armor bar disappear after changing dimension. MC-88179 (#4265) + - v8.99.1596 Fix the firing location of InputEvent.MouseInputEvent (#4270) + - v8.99.1595 Fix some broken test mods (#4245) + - v8.99.1594 Fixed swapping of finite fluids with negative densities. (#4237) + - v8.99.1593 Fix overrides not being read from the server registry snapshot (#4224) + - v8.99.1592 Fix some test mods crashing server caused by model loading (#4225) + - v8.99.1591 Fix FML handshake race condition, fixes #4219 (#4220) + - v8.99.1590 Prevent player from dying infinitely due to zero max health (MC-119183) + - v8.99.1589 [1.12] Allow the server to handle item-block interaction if onItemUse doesn not return PASS (#3967) + - v8.99.1588 Allow support for custom Shields and Shield disabling weapons. + - v8.99.1587 Make Optional.Interface repeatable (#4138) + - v8.99.1586 Log a warning if a coremod does not follow best practices (#4146) + - v8.99.1585 Ignore fortune for anything but seeds in crops (#4160) + - v8.99.1584 Added support for vanilla "nbt strings" in json recipes (#4113) + - v8.99.1583 Fix tripwire statemap not being complete when mappings change. Closes #3924 + - v8.99.1582 Fixed invalid erroring case during loading Advancements form mods that don't have advancements. + - v8.99.1581 Fixed issue where rendered held items wouldn't properly update when the reequip animations isnt shown. Closes #4175 + - v8.99.1580 Send remap event when data is frozen to notify modders to bake things. + Fixes search not working when connecting to vanilla servers. + - v8.99.1579 Fire recipe registry event after json recipes are loaded. + - v8.99.1578 Clean up uses of deprecated library functions (#4130) + Avoid catching and rethrowing runtime exceptions + Append error messages to exceptions instead of the log + - v8.99.1577 Remove unneeded block patches (#4167) + - v8.99.1576 Improve javadocs for Mod dependencies (#4168) + - v8.99.1575 Stop "Binary patch set is missing" error log in dev environment + - v8.99.1574 Add basic Github issue template + - v8.99.1573 Fix errors in test mods + - v8.99.1572 Remove unnecessary maxStackSize restrictions on brewing potions. (#4155) + - v8.99.1571 Fix game freeze when resizing the window too small on the mods gui (#4148) + - v8.99.1570 Adjust EnumHelper#addCreatureType to EnumType (#4089) + - v8.99.1569 Allow advancement icons to have nbt (#4114) + - v8.99.1568 Attempt fix, or at least better debugging for RecipeBook accessing unknown recipes. + - v8.99.1567 Fix MC-68754, Screen is not resizeable after exiting fullscreen due to LWJGL bug + - v8.99.1566 Use Item's custom FontRenderer for tooltips in the Creative Gui (#4101) + - v8.99.1565 Fix Recipe Toast crash when granted more than 5000 recipes (#4124) + - v8.99.1564 Throw packet encoding exceptions instead of suppressing them, to prevent corrupt packets (#4144) + - v8.99.1563 Quiet down warning for missing translation files. + - v8.99.1562 Update JOpt version on the dedicated server to match client. + - v8.99.1561 Fix getting missing models for overridden Item registry entires + - v8.99.1560 Fix override duplication caused by bad comparison. + - v8.99.1559 Fix log spam when creating dummy blocks. + - v8.99.1558 Include location of the call when a mod uses System.out or System.err (Fix #4135) + - v8.99.1557 Fix unblockable damage being blocked by armor. (#3933) (#4106) + - v8.99.1556 Improve furnace fuel handling (#4083) + - v8.99.1555 Add isSpawner parameter to the CheckSpawn event (#4075) + - v8.99.1554 RenderLivingEvent now stores partialTick + 2 + - v8.99.1553 Fix missing messages of missing models (#4120) + - v8.99.1552 Correct the default resource location of potion registry (#4117) + - v8.99.1551 Version bump for RB + - v8.99.1550 Added Block::getFogColor to allow custom blocks to control fog colors while inside them. (#4090) + - v8.99.1549 Optimize ExtendedBlockState.getClean, cache the return value instead of calculating it. Closes #3936 + - v8.99.1548 Squelch spam in EventBus register, Closes #4102 + - v8.99.1547 Add @ObjectHolder scanning to vanilla MobEffects, Biomes, Enchantments, SoundEvents, and PotionTypes constants. Closes #4104 + - v8.99.1546 Use java 8 collection functions + - v8.99.1545 Use lambdas for short anonymous methods + - v8.99.1544 Use multiple catch, try-with-resources, replace system.out and e.printStackTrace + - v8.99.1543 Fix the creative menu search function. Closes #4100 + - v8.99.1542 Fix MissingMapping REMAP action. Closes #4069 + - v8.99.1541 Repopulate client SearchTreeManager when registries are refreshed. Closes #4094 + - v8.99.1540 Fix Biome unit test + - v8.99.1539 Add support for loading mod advancements from the mod jar files. + - v8.99.1538 Fix error when using RegistryBuilder and not specifying a max id number. + - v8.99.1537 Allow the recipe registry to be modified. + - v8.99.1536 Fix BiomeDictionary not collecting correctly. + - v8.99.1535 Remove incorrect call to .toString() when instantiating custom config array entries. (#4078) + - v8.99.1534 Remove outdated patch to BlockDoublePlant + - v8.99.1533 Fix substitution tests + - v8.99.1532 Remove some deprecated methods and clean up + - v8.99.1531 Remove the call to client.refreshResources during loading (#4032) + - v8.99.1530 Added dependencies and dependency ordering for textures. (#4070) + - v8.99.1529 More work on registry override ability. Closes #4079 + - v8.99.1528 Fix ItemStack/Block/BlockSpecial not applying at runtime. + - v8.99.1527 Add a FluidUtil method to interact with an arbitrary IFluidHandler (#4080) + - v8.99.1526 Further Java 8 cleanup (#4077) + - v8.99.1525 Fix missed side only on BlockFlower + - v8.99.1524 Fix ModelBlockAnimation expsing a private class. + - v8.99.1523 Make Block.getSubBlocks not client side only. + - v8.99.1522 Cleanup of model system, taking advantage of java 8; + replaced guava Optional and Function with java 8 versions. + - v8.99.1521 Reload client recipe book after loading modded recipes. + - v8.99.1520 Make Dummy block an Air block. + - v8.99.1519 Fix NPE in MissingMappings event. Closes #4067 + - v8.99.1518 Make getSubItems non-client only. Use it for Ingredient iteration. + - v8.99.1517 Fix Emerald generation causing chunk loading. + - v8.99.1516 Fix minecraft:item_nbt ingredient type. + - v8.99.1515 Add Block.getDrops that uses NonNullList, deprecate the old method. Fix #3567 (#3778) + - v8.99.1514 Remove arrival/departure message methods from WorldProvider (#2733) + - v8.99.1513 Clean up logging + - v8.99.1512 Use instanceof ItemFishingRod instead of item equality (#4060) + - v8.99.1511 [1.12] Cleanup of files with old licence headers, Add missing LGPL 2.1 licence headers (#4051) + - v8.99.1510 Fix uncaught ClassCastException from invalid recipe file (#4043) + A JsonSyntaxException will now be thrown, caught and logged when the conditions property of a recipe isn't an array + - v8.99.1509 Fix onBlockClicked handler firing twice and Item.onArmorTick in the wrong place (#4037) + - v8.99.1508 Update MCP to 20170624 + - v8.99.1507 Remove Java 8 warnings now that Minecraft requires it + - v8.99.1506 Fire AnimalTameEvent for parrots (#4003) + - v8.99.1505 Make ForgeRegistry iterator sorted. Closes #4058 (#4059) + - v8.99.1504 Loosen up registry locks until data freeze. + - v8.99.1503 Fix conflicts + - v8.99.1502 Implement override tracking and syncing. + Overrides MUST be registered within a tracked event so we know what mod it came from. + This will allow servers/saves to select which mod 'wins' and becomes to active entry. + This should also mean that when connecting to a vanilla server things will revert. + - v8.99.1501 Disable substitution test, substitutions are not managed the way they used to be. + We do not care about substitutions, People who replace entries should make them compatible with the existing item. + - v8.99.1500 Fixup some registry tests, dummies are now persisted across syncing. + - v8.99.1499 More work, game loads and runs now. + Moved Registry events to directly AFTER PreInit instead of before. + This allows modders to register handlers for it without @EventBusSubscriber. + It also allows you to register custom things needed before the construction of blocks or items such as Fluids. + TODO: Move Fluids to a real registry. + @ObjectHolder can now be used on private fields. + Reworked FMLModIdMappingEvent to include data for all registries. + Tile Entities are now registrable. + - v8.99.1498 First pass of registry rewrite. + Tests do not run yet. + Things of note: + Removed the idea of substitutions, just register multiple items with the same name they will override each other like a normal map. + Decoupled Forge registries from vanilla classes. They now use bouncer classes. MODDERS SHOULD NEVER USE THESE + Introduced more stringent registry locking. As it sits things are only allowed to be registered during the RegistryEvent.Registry phases! + This is to force modders to split up their registrations, and pave the way for calling these functions multiple times during a single MC lifecycle. + ObjectHolder, Missing Mappings, etc... *should* now work for all registry types, nothing should be special cased to Blocks/Items anymore. + Added optional generic dummy factory to registries, to allow registry creators the ability to dummy more then just Blocks. + Re-worked the ItemStack transformer and applied it to ItemBlock and ItemBlockSpecial. Allowing us to cleanup reflective hacks in Block callbacks. + Registry onAdd callback is now only fired on the ACTIVE registry, fixing any issues of temp registries overriding active objects. + - v8.99.1497 Fix Universal bucket handling for Fluids with NBT (Fix #3757) + - v8.99.1496 Clean up Logging (#3953) + # Conflicts: + # patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch + # patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch + # patches/minecraft/net/minecraft/entity/EntityList.java.patch + # patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch + # src/main/java/net/minecraftforge/oredict/OreDictionary.java + - v8.99.1495 Fix ShapedOreRecipe matching. #4038 + - v8.99.1494 Fix recipe names in packaged jars. Closes #4039 + - v8.99.1493 Update NoteBlockEvent with new instruments. Resolves #4018. (#4019) + - v8.99.1492 Fix Chunk patch (#4036) + - v8.99.1491 IRecipeConditions forge:and and forge:false (#4017) + - v8.99.1490 Fix patches in Chunk and Explosion (#4036) + - v8.99.1489 Fix itemstack comparison with null + - v8.99.1488 Fix loading recipe jsons from jar files. + - v8.99.1487 Fix shapeless recipes not being able to use NBT on output, and fixed issue with null groups. + - v8.99.1486 [1.12] Fixes Exception when getting modlist for a vanilla client (#4028) + - v8.99.1485 Remove unused patch to ItemRecord. Closes #2686. (#4035) + - v8.99.1484 Log info on Travis tests + - v8.99.1483 Disable TestNetworkHandshake to make Travis work again + - v8.99.1482 Add timeout to TestNetworkHandshake setup + - v8.99.1481 Add missing Override annotations + - v8.99.1480 Update MCP mappings to 20170617 + - v8.99.1479 Update mcp mappings to 20170611 + - v8.99.1478 Clean up ShapedOreRecipe and ShapelessOreRecipe + - v8.99.1477 Allow condition factories to be registered from JSON (#4015) + - v8.99.1476 Patch a small bug in SPacketLoginSuccess that lets us emulate the network + handshake. This will be very useful as I rebuild the networking. + - v8.99.1475 Filter any recipe starting with _, Such names are reserved for metadata. + Actually implement conditions for recipes. + - v8.99.1474 Fix NBT ItemStack support in json loader. Closes #4002 + - v8.99.1473 Fix OreIngredient comparing items in reverse. Closes #3999 + - v8.99.1472 Make registries persist by default, fixes #3989 (#3998) + - v8.99.1471 Fix exception in ShapedOreRecipe.checkMatch for recipes that don't fill entire crafting grid (#3995) + - v8.99.1470 Fix parseShaped missing Empty slot item. Closes #3990 + - v8.99.1469 Fix CraftingHelper.parseShapred error. Closes #3979 + - v8.99.1468 Fix NPE in config menu with custom keybinds. Closes #3985 + - v8.99.1467 In-progress Registry system enhancement. + Needs cpw to take a look at enabling removing/overriding in the registry stuff. + But in theory it loads json recipes for mods now. + - v8.99.1466 Update ASM for 5.2, and host it on Forge's maven now. + - v8.99.1465 Update VanillaRegistryTests + - v8.99.1464 Try a different way of doing the callback, it removes the derpitude, but at + one point, I thought the way it was was necessary. Is this a race condition? + Dunno, but it's a lot simpler and doesn't rely on a netty hack. + - v8.99.1463 Fix the netty bug introduced by netty commit https://github.com/netty/netty/commit/29fdb160f33776c76f0b46aada48a9c9f3babcbf + that means we don't get activated until after handlerAdded is complete. + In effect, our handler can't handle anything until handlerAdded has + completed. + - v8.99.1462 Initial patch update to 1.12. + Some things to note: + Netty is screwy so currently can't join single player. @cpw + Crafting has been MAJORY reworked. The current GameRegistry functions are nooped, this is IN THE WORKS. + Just need to move the recipe list to a full class registry, and then re implement the in-code recipe registration. + Also, it IS advised that modders move to JSON, because ideally we'll see a S->C recipe syncing system in 1.13 + which would allow servers to have custom recipes. + OreDictionary currently 1/2 works, need to write a better algorithm for replacing ingredients. + Please be patient + Rendering: + A lot of functions got a new float parameter, this is similar to partial ticks, needs more research + - v8.99.1461 Fix getShareTag replacing data on the server (#3776) Closes #3682 + - v8.99.1460 Fix crashed caused by bad mods reflectively breaking the grass drop list. Closes #3943 + - v8.99.1459 Fix shaders not loading from mod domains Closes #3921 + - v8.99.1458 Clean up MapData patch (#3905) + - v8.99.1457 NBTTagList implements Iterable (#3884) + - v8.99.1456 Fix canRiderInteract being called on the wrong entity (#3934) + - v8.99.1455 Changed Event.setCanceled To throw UnsupportedOperationException instead of IllegalArgumetnException when called on a non-cancelable object (#3926) + - v8.99.1454 Make Teleporter fields accessible to subclasses (#3930) + - v8.99.1453 Deprecate vanilla getExplosionResistance and properly annotate the forge replacement (#3929) + - v8.99.1452 Make World.isValid and World.isOutsideBuildHeight public (#3919) + - v8.99.1451 Clean up formatting of Forge Test mods and disable noisy ones (#3908) + - v8.99.1450 Fix broken milk bucket model (#3925) + - v8.99.1449 Fix patches of GuiScreen(#3704) and ItemDye(#3736) (#3878) + - v8.99.1448 Make hopper update accessible to subclasses. Closes #3849 + - v8.99.1447 Update EntityPlayer armor calculations and ISpecialArmor (#3838) + - v8.99.1446 Tweak vertex lighter to avoid causing excess array initialisations (#3771) + - v8.99.1445 Fixes for PlayerDestroyItemEvent being called with empty itemstacks. (#3728) + - v8.99.1444 [1.11.2] Added support for Village capabilities (#3648) + - v8.99.1443 Fixes BlockLiquidWrapper placing a Static fluid where it should place a Flowing one (#3893) + - v8.99.1442 Disable frost walker enchantment on anything but vanilla water (#3906) + - v8.99.1441 Fix head being angled badly when riding mobs. Fixes MC-1207 (#3901) + - v8.99.1440 Print system details on startup without printing a full crash report (#3909) + - v8.99.1439 Reduce memory pressure from new objects during loading screen (#3907) + - v8.99.1438 Add methods to write IForgeRegistryEntry to ByteBuf (#3806) + - v8.99.1437 Fix normals not being generated for formats without normals (#3896) + Fix normals not being generated for formats without normals + - v8.99.1436 Fix MC-117087, prevent calling Class.getSimpleName on TEs unnecessarily (#3873) + - v8.99.1435 Add a configurable delay when unloading dimensions, fixes #3455 (#3679) + - v8.99.1434 Changed custom entity selectors from event based to factory based. (#3579) + - v8.99.1433 Create ItemFishedEvent, the event is cancelable, but items are not mutable. Use LootTables to control that. (#3705) + - v8.99.1432 Fix forge pipeline block shifts (#3789) + - v8.99.1431 Add pack.mcmeta to examplemod (#3813) + - v8.99.1430 Relocate TileEntity#onLoad call to after it's added to the world instead of the chunk so as to have a valid world reference (#3836) + - v8.99.1429 Improvements to FluidUtil (#3839) + - v8.99.1428 Allow client commands to control whether they can be invoked without prefix. (#3847) + - v8.99.1427 When the window is closed during loading, exit the game quickly (#3858) + - v8.99.1426 Remove splash.properties option for Mojang logo (has been disabled) (#3859) + Fix backgound color being applied to the Forge logo + - v8.99.1425 Fix GuiMultipleModsErrored ignoring scrolling with mouse wheel. (#3861) + - v8.99.1424 [1.11.2] Fixed Zombie Villagers not setting and getting professions correctly (#3678) + - v8.99.1423 Prevent NPE in ConfigManager and fix config gui being enabled for all mods. Fixes #3856. (#3860) + - v8.99.1422 Fix return value of ItemHandlerHelper.insertItem being incorrect when destination was null. Closes #3840 + - v8.99.1421 Fix vanilla inventory wrappers not properly calling markDirty. Closes #3854 and #3810 + Also updated IItemHandler javadocs to reflect returning EMPTY instead of NULL. + - v8.99.1420 Add in a check to the splash screen. If the Display.update call takes + too long on average (over first 200 frames) we'll use a sleep based + timer to allow mods doing splash screen work some time on the + LWJGL global lock. + (cherry picked from commit 03d7eaa) + - v8.99.1419 Cleanup AccessTransformer debug output + - v8.99.1418 Fix NumberFormatException being thrown for empty ItemStack deserialization + Thanks @gabizou, 1.11.2 version of #3830 + - v8.99.1417 Fix Fluid models rendering with gaps (#3747) Closes #2993 + - v8.99.1416 Fix mutable blockpos leak MC-114281 (#3742) + - v8.99.1415 Fix typo in LootEntry.Serialiser causing incorrect serialisation. Closes #2757, Fixes MC-115407 (#3823) + - v8.99.1414 Fix invulnerable items becoming invisible client side MC-53850 (#3807) + - v8.99.1413 Add Item.canDestroyBlocksInCreative() allowing more items to not break blocks in creative (#3805) + - v8.99.1412 Ignore calls to sendMessage for fake players. Fixes #3796. (#3798) + - v8.99.1411 Fixed HarvestDropsEvent issue by fixed-length lists on getDrops (#3778) + - v8.99.1410 Add GenerateMinable event for mesa gold (#3774) Closes #3738 + - v8.99.1409 Skip loading models if there is a fatal mod dependency error (#3772) Close #3768 + - v8.99.1408 Add AnimalTameEvent for handling animal taming (#3763) + - v8.99.1407 Added missing bounds check to ChunkCache.getBiome (#3752) + - v8.99.1406 Allow result of PlayerInteractEvent to be changed when it's cancelled (#3744) + - v8.99.1405 Add EnumHand and ItemStack to BonemealEvent (#3736) + - v8.99.1404 Added a boolean flag for disabling Entity onUpdate (#3731) + The flag is false by default, and if true the Entity will not update. It is saved and loaded from NBT, and is called updateBlocked. Modders are responsible for managing this flag for entities they with to 'freeze' or 'unfreeze'. + - v8.99.1403 Revert block snapshots in reverse order. Fixes #3608. + - v8.99.1402 Add LootTableManager to the LootTableLoadEvent (#3717) + - v8.99.1401 Fix EntityFallingBlock check for ITileEntityProvider (#3711) + - v8.99.1400 Added ClientChatEvent. Closes #1442 (#3704) + - v8.99.1399 Fix custom array entry class for config GUI being ignored when adding new entries (#3697) + - v8.99.1398 Use thread groups to detect the effective side (#3644) + - v8.99.1397 New LivingDestroyBlockEvent for controlling if some entities can destroy blocks (#3628) + - v8.99.1396 Fix breaking particles on dedicated server. Closes #3825 + - v8.99.1395 Fix arrays in map values for config system + - v8.99.1394 [MC-2518] Fixed missing break sound and particles. Closes #3821 + - v8.99.1393 Fix java 6/7 compatibility in GuiConfig (#3824) + - v8.99.1392 [1.11.x] Fix blank tab in creative inventory when additional tabs evenly divisible by 10 (#3817) + - v8.99.1391 Adding config GUIs to the @Config based configuration System (#3735) + Lots of internal API that modders should not touch. See test mods for example usages. + - v8.99.1390 Fix vanilla bug where player reputations villages were reset on read. + Deprecated Username based API in favor of UUID based API. + - v8.99.1389 Add setter for default key in RegistryBuilder. Closes #3804 + - v8.99.1388 Fix error when reading world info for old saves with missing dimensions. Closes #3786 #3331 + - v8.99.1387 Detect and log cascading chunk generation issues during terrain population (#3756) + - v8.99.1386 Fix duplicate achievements getting added to the achievement list (#3770) (#3779) + - v8.99.1385 Fix #3733 Splash Screen memory bar background matches screen background (#3775) + - v8.99.1384 Add additional constructors to EnergyStorage to set values at load time. + - v8.99.1383 Fix parameter-names for WorldProvider.shouldMapSpin (#3767) + - v8.99.1382 Fix MC-112730 TE global renderer duplicate render (#3651) + * Fix TE global renderer duplicate render + - v8.99.1381 Fix entity write catch block (#3726) + - v8.99.1380 Fixed TESR items not rendering correctly before entering world (MC-112292) (#3666) + Fixed crash when rendering text in TESR items before entering world + - v8.99.1379 Fixed 'reset to defaults' button not working on some Forge config fields. + - v8.99.1378 Add DifficultyChangeEvent (#3525) + - v8.99.1377 Allow mods to set other default "home dimensions" for respawning. (#3528) + - v8.99.1376 Persist PotionEffect curative items and initialize defaults from Potion (#3573) + - v8.99.1375 Added Forge slot methods to creative container (#3581) + - v8.99.1374 Restore missing Biome GetWaterColor event. Closes #3164. (#3625) + - v8.99.1373 Fixed Missing Furnace Fuels (#3627) + - v8.99.1372 Fix @Config.Comment not working on subcategory Objects. Closes #3593 + - v8.99.1371 Prevent concurrent modification of ClassInheritanceMultiMap (#3632) + - v8.99.1370 Improve exception messages during initialization. + - v8.99.1369 Fixed ChunkCache.getTileEntity creating tile entities off world thread. + - v8.99.1368 Start firing AttachCapabilitiesEvent (#3645) + - v8.99.1367 Add @Name annotation to config system allowing you to use custom key for value. + Also added category option to root config to allow customization. See examples/docs for information. + - v8.99.1366 Fixed Flower Forests not having proper flowers. Closes #3652 + - v8.99.1365 Fix Poppy to Dandelion ratio + - v8.99.1364 Fix forge:default-item missing case for FIXED transform (#3663) + - v8.99.1363 Add implementation for Living Attack event on client-side for players (#3667) + * Fixed unused import + - v8.99.1362 Fix bug caused by ItemMinecart patch (#3672) + - v8.99.1361 Make getRGBDurabilityForDisplay use getDurailityForDisplay by default. Closes #3670 (#3673) + - v8.99.1360 Add a null check for the throwable message in NetWorkDispatcher#exceptionCaught (#3688) + (cherry picked from commit 1be1bb59c5c4c7432c515ef07beb6bf7e1f6ef27) + - v8.99.1359 Use Forge setting to determine baby zombie chance. Fixes #3690. + - v8.99.1358 Properly fix IShearable implementation. Fixes shears taking damage twice, mooshroom particles, and blocks dropping incorrect loot. + - v8.99.1357 Fix English injection for some mods on dedicated server. + - v8.99.1356 Fix hoppers being able to insert shulker boxes into shulker boxes. + - v8.99.1355 Override Mojang's new logging config to re-enable our logging to text file. + The new launcher's GUI for logs WILL NOT WORK until they add support on their end. + - v8.99.1354 Fix for bad decompile process on Particle.java that causes onGround flag to not get set properly as well as motionX and motionZ not being set to 0 when their axis has collision happening (#3716) + - v8.99.1353 Fix ClientTickEvent Post firing inside another profiler section (#3715) + - v8.99.1352 Fix Item.doesSneakBypassUse being applied incorrectly. + - v8.99.1351 Added check for quad builder to always have the particle texture set, and fixed where that wasn't true. Fixes #3653 + - v8.99.1350 Stop rotation of extended pistons, beds, and double chests Fixes #3634 + Fix rotation of repeaters and comparators + - v8.99.1349 Fixed TileEntity#getRenderBoundingBox not offsetting correctly causing more TEs to render then needed (#3709) + - v8.99.1348 [1.11.2] Make AbstractSkeleton implementable by fixing limited access on getStepSound (#3702) + - v8.99.1347 Fix extracted mods crash report file name for Windows (#3701) + - v8.99.1346 Remove dynamic lambda methods when inside of SideOnly methods + Clean signatures of ReflectionHelper methods. + - v8.99.1345 Fix spawn-fuzz formula (#3695) + - v8.99.1344 Fix world spawn fuzz. (reverted from commit 450c3a80c10c1dc27ef68a3f5e5f58af6a827fde) + Protip Don't code while groggy. + - v8.99.1343 Fix world spawn fuzz. + - v8.99.1342 Fix some cases where world time is not passed through the WorldProvider. (#3685) + - v8.99.1341 Fix addTypes not adding in the base types. (#3681) + - v8.99.1340 Replace listSubtypes with listSupertypes to match the intended behavior. (#3564) + - v8.99.1339 this finaly fixes #2866 (#3656) + - v8.99.1338 Fix MC-111753 (#3655) + - v8.99.1337 Fix default missing model zoom text not being set to false on all places. + - v8.99.1336 Small bugfix in lighting logic. + - v8.99.1335 Added the variant name to the missing model. (#3328) + - v8.99.1334 Fix #3635 MC-103403 fix ingredient count for ingot block recipes (#3640) + - v8.99.1333 New client config option to force all chunk rendering off the main thread. + This may help FPS issues, but may also result in world holes/rendering issues. + Also fix Forge configs not saving properly. + - v8.99.1332 Cache entity constructors for a small performance optimization + - v8.99.1331 Bypass forge chunk cache if it's configuratively disabled + (cherry picked from commit 9fe6385) + - v8.99.1330 Fix category comments not working. Closes #3593 + - v8.99.1329 Fix Biome#getSpawnableList returning an empty list for non-vanilla EnumCreatureTypes (#3611) + - v8.99.1328 Skip first baking in ModelLoader (#3621) + - v8.99.1327 Allow block to specify their type for AI pathfinding (#3546) + - v8.99.1326 Fix vanilla bug MC-98707 (#3565) + - v8.99.1325 Improve performance of inserting into inventory wrappers (#3622) + - v8.99.1324 Add missing patch to ItemStack isItemStackEqual (#3577) + - v8.99.1323 Add Iron Nugget to OreDictionary (#3571) + - v8.99.1322 Fix ContainerRepair patch to prevent NPE (#3553) + - v8.99.1321 Fix DungeonHooks method to use correct type (#3587) + - v8.99.1320 Removed an unsafe usage of `EntityMinecart.getType()` (#3592) + - v8.99.1319 Fix #3576 Unnecessary warning about totem being renamed (#3614) + - v8.99.1318 Fix milk not working on anything at all (#3574) + - v8.99.1317 Fix #3596 Close jar sources safely in Java 6 (#3597) + - v8.99.1316 Clean up null issues, add more annotations (#3590) + - v8.99.1315 Small cleanup for PlayerInteractEvent (#3563) + - v8.99.1314 Fix and clean up ItemBow.onPlayerStoppedUsing() patch (#3555) + - v8.99.1313 Fix IItemHandler's IStorage using nulls (#3580) + - v8.99.1312 Fix null check in BrewingRecipeRegistry (#3584) + - v8.99.1311 Fix a couple more ItemStack null checks (#3586) + - v8.99.1310 Use travis_wait to extend the timeout on gradlew build (#3610) + - v8.99.1309 Fix super call to ItemOverrideList constructor inside AnimationItemOverrideList, fixes #3264. + - v8.99.1308 Added caching for baked vanilla models, fixes #3594. + - v8.99.1307 Fix horse cap patch being reapplied in the wrong place (#3609) + - v8.99.1306 Add .travis.yml (#3598) + * Add .travis.yml + * fix --refresh-dependencies + * try java 8 + * add build with stracktrace + * Fix running test + * try building with java 6 + * try using simplified init.gradle + * Revert "try using simplified init.gradle" + This reverts commit e56041e794e3b8c13453245eb2605118e4ac68ce. + * Revert "try building with java 6" + This reverts commit 51795385f453fdd8a0e77c632b5463d8754b1ba4. + * Fix running tests + * skip createExe task + * Test with broken debug mod + * Revert "Test with broken debug mod" + This reverts commit 3b26700582ba4f4f5477f5927b0006ef0fe85bb0. + - v8.99.1305 Fix tests... + - v8.99.1304 Inital 1.11 update. + - v8.99.1303 Fix #3561 import io.IOUtils instead of compress.utils.IOUtils (#3562) + - v8.99.1302 Update MCP mappings to snapshot_nodoc_20161220 (#3551) + - v8.99.1301 Properly deobfuscate lambda expressions (#3552) + - v8.99.1300 Add nullable annotations to IGuiHandler (#3550) + - v8.99.1299 Add hook to allow any block to respond to filtered block updates like the Observer block (#3547) + - v8.99.1298 Fix some resources that are never closed, close in a finally block (#3544) + - v8.99.1297 [1.11] Fixes for Chunk.getBlockLightOpacity implementation (#3537) + - v8.99.1296 [1.11] Fix ItemHandlerHelper canStack and ItemStack areTagsEqual methods not checking capabilities (#3500) + - v8.99.1295 Make NBSP character display as a space. MC-2595 (#3522) + Add easy getter for the Locale: MinecraftForgeClient.getLocale() + - v8.99.1294 Added Oak door to Ore Dictionary Exclusion list to fix able to craft it with any wood type (#3519) + - v8.99.1293 Fix setting the world in TileEntity.addTileEntity (#2863) (#3517) + - v8.99.1292 [1.11] Made WalkNodeProcessor consider burning blocks (#3515) + - v8.99.1291 Fix uses of uppercase "Forge" where it fails Loader.isModLoaded(modID) (#3513) + - v8.99.1290 Patch EntityPlayerSP to use location-aware version of isNormalCube (#3494) + - v8.99.1289 [1.11] Add memory display to loading screen (#3447) + - v8.99.1288 reset repo to upstream and reapplied patches (#3434) + - v8.99.1287 [1.11] Added EnchantmentLevelSetEvent (#3433) + - v8.99.1286 Register Minecraft mod container in FML loader (#3414) + - v8.99.1285 Small memory optimization in Registries. + - v8.99.1284 Fix modid field name for ProjectInjector. + - v8.99.1283 Enable Enforcement of modid formatting. Must be lowercase and <= 64 characters + - v8.99.1282 Bump version for RB. + - v8.99.1281 [1.11.x] Refine fluid placement utilities (#3509) + - v8.99.1280 Properly filter out annotations that are for multiple mods in the same mod source. + This prevents disabled mods from getting their proxies injected. + Also prevents mods from getting their proxies injected multiple times. + Effects the @EventBusSubscriber, @Instance, @Metadata, @SidedProxy annotations. + If the target modid is not in the annotation data, and there are multiple mods in the source, it will attempt to find it by matching the annotations's class names. + This is a potentially breaking change. Review your logs for "skipping" messages. + - v8.99.1279 Prevent a crash when scheduling block updates for non-existing blocks #3485 + - v8.99.1278 Fix issue reading chunks from the network when client and server do not agree on block count. Closes #34925 + - v8.99.1277 Restore missed patch in World.updateComparatorOutputLevel. Closes #3495 + - v8.99.1276 Make SlotItemHandler override Slot.getSlotStackLimit. Closes #3497 + Make Container.mergeItemStack respect target slot's max size when slot is non-empty. Closes #3498 + Fix Shift clicking in Beacons with stacked items when fuel slot is empty. + - v8.99.1275 Added gradle.properties to MDK (#3361) + The file sets the default max heap size to 3 GiB so that the decompilation doesn't fail as often. + (cherry picked from commit 49ec3d1b9322ee2b7a1312059118173b0b3fe6d0) + - v8.99.1274 Add ItemBlockSpecial#getBlock (#3343) + (cherry picked from commit cf26f4acbe48ee8790edc03d0b5c16c1167278ab) + - v8.99.1273 Add null check and informative error message when client receives an invalid update packet (#3266) + (cherry picked from commit 882e0e3bf22784d693e3816b0efeba5fbedb1a22) + - v8.99.1272 Fix for showing config default values twice in tooltip (#2257) (#3338) + (cherry picked from commit be73ec3d5ebd972cfacb0f255f71112a0430bc43) + - v8.99.1271 Added isItemValidForSlot check to hopper extraction (#3444) + (cherry picked from commit 0348760a774ca7ed9639376baadae38e272f5bf8) + - v8.99.1270 Fix NPE when rendering missing mod screen with version bound requirements. #3501 + - v8.99.1269 Make sure to log kick messages in NetworkDispatcher. Closes #3507 + - v8.99.1268 [1.11] Fix null checks in shouldCauseReequipAnimation (#3482) + - v8.99.1267 [1.11] Add biome dictionary types for newer biomes (#3475) + - v8.99.1266 [1.11] Add canApplyAtEnchantmentTable to Item (#3463) + Allowing increased control of which enchantments can be put on an item over Vanilla's hard-coded item type checks. + Render enchantment buttons disabled when the item is enchantable but the enchantability requirement is not met on lower levels. + - v8.99.1265 Add a way for modded GuiScreens to cancel mouse and keyboard events (#3438) + - v8.99.1264 Add missing pooled BlockPos retain in World patch (#3486) + - v8.99.1263 Moved TextureStitchEvent.Pre to allow custom sprites for blocks (#3436) + - v8.99.1262 Fix sky colour blending not working for render distances >16 (#3476) + - v8.99.1261 Allow connectable blocks to choose what they can connect to (#3437) + - v8.99.1260 Changed Armor Material to use an ItemStack aware version (#3469) + - v8.99.1259 Fix Redstone Torch memory leak (#3474) + - v8.99.1258 BiomeDictionary code cleanup (#3466) + - v8.99.1257 Added EquipmentChangeEvent (#3411) + - v8.99.1256 Update assets to new Forge brand (#3464) + - v8.99.1255 First pass at exposing data fixers to modders. + Each mod gets its own version number, mods SHOULD NOT rely on other + mod's fixers, just care about yourself. + Walkers can use IDataFixerData to retrieve their version. + - v8.99.1254 Add getSlotLimit(slot) to IItemHandler (#3445) + - v8.99.1253 Pass along if the respawn event was the result of the end being conquered or not (end respawning is really FUNKY code and uses death instead of 'change dimension') + - v8.99.1252 Add method to check if an Entity can trample a Block. Fixes #2510 (#2730) + - v8.99.1251 Provide access to GuiContainer location and dimensions (#3440) + - v8.99.1250 Clean up handling of changes to IVertexConsumer (#3458) + - v8.99.1249 Provide access to ShapedOreRecipe width and height (#3439) + - v8.99.1248 Quick fix for another ItemStack null check (#3426) + - v8.99.1247 Fix problem with the server hanging around after forcing the client to exit, leaving behind stale processes. + - v8.99.1246 Fix using the wrong Pair implementation (#3449) + - v8.99.1245 Fix #3432 Hopper and Dropper item moving does not exactly match vanilla (#3442) + - v8.99.1244 Fix #3424 ItemCraftedEvent returns air when shift-clicking (#3441) + - v8.99.1243 Cleanup some null checks and remove deprecated methods in Item and Block (#3429) + - v8.99.1242 Fix max CustomPayload size, 1MB not 16MB. + - v8.99.1241 Insert FML packet handler into Vanilla pipelines in case modders send FMLPacket to vanilla. Fixes #3422 + - v8.99.1240 Make all tests one side only, so we can test vanilla clients in dev env. + - v8.99.1239 Fix AbstractMethodException in FML Registries. Closes #3427 + - v8.99.1238 Fix ItemStack null check in PlayerInteractionManager + - v8.99.1237 Move EntityHorse capability patches to AbstractHorse (#3417) + Fixes #3409 + - v8.99.1236 Fix Item transfers related to Hoppers. + - v8.99.1235 Remove Block.addInformation exists in vanilla (#3413) + - v8.99.1234 Initial annotations/nullability changes (#3392) + - v8.99.1233 Add GetCollisionBoxesEvent. Allows manipulation of the collision boxes of blocks for entities. MC1.11 edition. (#3405) + - v8.99.1232 First draft of Entity Registry re-write. + - v8.99.1231 Make Wither Skulls respect Block.canEntityDestroy. Closes #3404 + (cherry picked from commit 6b52023a5c341420d976cb50359e2a2a4a6a9192) + - v8.99.1230 Added EnumHand parameter to Block.getStateForPlacement (#3402) + - v8.99.1229 Fix client side placement issue on blocks with GUIs. Closes #3399 + - v8.99.1228 Fix issues with ZombieVillagers Closes #3398 + 1.11 doesn't intertwine zombie types anymore so our edits to split them out for custom professions are not needed. + - v8.99.1227 Fix Villagers for 1.11 (#3401) + - Add cartographer registry entry + - Fix textures for the nitwit + - v8.99.1226 [1.11] Fix nullability issues around ForgeHooks and Capabilities (#3395) + - v8.99.1225 Change OreDictionary over from "null" to the new ItemStack system. (#3400) + - v8.99.1224 Do not install mod_list.json for optional mods. + Classpath scanning is in so they will still be detected + - v8.99.1223 Include Mercurius in installer. See Forge Forums for more info. + - v8.99.1222 Restore the ability to register modded TileEntities. + - v8.99.1221 Implement fluid item capabilities without item swapping + - v8.99.1220 Remove deprecated Fluid stuff + - v8.99.1219 Fix crafting causing crash (#3388) Closes #3387 + - v8.99.1218 Fix ItemStackHandler's constructor ignoring size. Closes #3386 + - v8.99.1217 Fixed damage bar color. Closes #3389 + - v8.99.1216 Make EntityShulker fire EnderTeleportEvent. Closes #3383 + (cherry picked from commit d48985fafaed6de6f09136b999ca8aa44184a7b9) + - v8.99.1215 Added event to allow modification of player visibility to mobs/AI (#3382) + (cherry picked from commit 0a5ef64d6ea96fe85d7c62107081ced649e6a3e9) + - v8.99.1214 Restore another missing patch in WorldProvider. + - v8.99.1213 Disable capabilities for empty ItemStacks. + - v8.99.1212 [1.11] Fix initCapabilities for ItemStacks (#3379) + - v8.99.1211 Apply missed patch to WorldProvider. + - v8.99.1210 Fix build.gradle problems: + Installer missing url.png + UploadArchives erroring on local systems due to missing changelog + Adding branch name improperly. + - v8.99.1209 Fix localizations not loading correctly in legacy resource packs. + - v8.99.1208 Fix FurnaceRecipy registration. + - v8.99.1207 Fixed test cases for 1.11 changes. + - v8.99.1206 Initial 1.11 release update. + - v8.99.1205 Initial 1.11-pre1 update + - v8.99.1204 regenerate entitylivingbase patch + - v8.99.1203 Update to 20161111 mcp names + - v8.99.1202 Improve error message from crashes during loading (#3362) + - v8.99.1201 Added events for crop growth (#3320) + - v8.99.1200 Add support for custom entity selectors in commands (#3356) + - v8.99.1199 Added PermissionAPI (#3155) + - v8.99.1198 Add hand argument to BlockEvent.PlaceEvent (#3221) (#3270) + - v8.99.1197 Fixes #3237 and #2752. (#3347) + * Fix #3237 by correctly utilising the keepLooking argument. + * Explain within SimpleNetworkWrapper's javadoc that the execute of the handler isn't on the main Minecraft thread. + - v8.99.1196 Made default slot implementation respect inventory stack size limit. + - v8.99.1195 Fixed Block.setBedOccupied ignoring 'occupied' parameter + - v8.99.1194 Add Item#getNBTShareTag (#3342) + * Add Item#getNBTShareTag + * Update comment + - v8.99.1193 Call Looting Event on player death and loot table drops (#3275) + * Call Looting Event on player death and loot table drops + * Simplify patches + * More code cleanup: Replace old usage with compact forgehooks implementation + - v8.99.1192 Fix POTENTIAL issue with Texture Stitcher exceeding max size. + - v8.99.1191 Fixed Ore Dictionary replacing the oak boat recipe (#3329) + Fixes the oak boat recipe being able to be crafted with any wood + - v8.99.1190 Improve the default isItemValid() and getItemStackLimit() implementations in SlotItemHandler. You can now properly swap the player's held itemstack with the slot's itemstack. (#3273) + - v8.99.1189 Fixed texture stitcher not using full texture height before expanding width. + - v8.99.1188 Update readme to be a little more clear. + - v8.99.1187 Special case not drooping snowballs for water and snow layers. Closes #3326 + - v8.99.1186 Fix MC-105406 (OpenGL leak in View Frustum) (#3308) + - v8.99.1185 Fix very laggy mipmap slider MC-64581 (#3305) + - v8.99.1184 Add Block#getStateForPlacement (#3129) + - v8.99.1183 Add better key modifier behavior for GUI contexts (#3307) + - v8.99.1182 Make item repair recipe respect itemstack's getMaxDamage (#3295) + - v8.99.1181 Fix infinite loop in dragon fight when the dragon is over the void. + - v8.99.1180 Fix Tabbing issues with config classes. + - v8.99.1179 Initial pass a re-working the configuration system. + Work in progress. + - v8.99.1178 Add in missing test runner for a test. Fixes failing tests on jenkins, hopefully. + - v8.99.1177 Fix substitutions being broken after freezing - actually store the original state in registry copies, not the computed state, which is wrong because it only sees the sub, not the original. + - v8.99.1176 Revert "Another fix for registry substitutions. Closes #3212" + This reverts commit ec2977afc919c0f676f59977e6065148ea635f9e. + - v8.99.1175 @ObjectHolder will now inject null for dummied objects. Closes #3301 + - v8.99.1174 Allow all Forge Registries to work with ObjectHolder (#3220) + - v8.99.1173 Revert commits related to filtering proxy and Automatic Subscriber annotations. + Broke some existing setups, will require a annotation definition change in 1.11. + - v8.99.1172 Fix proxy injector filtering. (#3300) + - v8.99.1171 Bump version for new Recommended Build. + - v8.99.1170 Introduce IContextSetter for events. + This will set the active mod container for events using the normal EventBus. + Fixes improper warnings from initializing mods using the new Registry events. + Modders, you should not use this as it has many performance implementations + and if abused will slow down the event bus A LOT. ActiveModContainer is not + thread safe. + - v8.99.1169 Filter out proxy injectors for incorrect mods. + Prevents mod classes being initialized early when multiple mods are in the same source. + - v8.99.1168 Small Cleanup in example build.gradle. + - v8.99.1167 Fix unbound keybindings are activated by unknown keyboard keys (#3288) + - v8.99.1166 caseSensitiveCustomCategories must be set before loading the configuration file. (#3269) + Otherwise one set with categories in lowercase letters and on case sensitive + set is generated. + - v8.99.1165 Fix typo in sky rendering causing tons of BlockPos allocations (#3267) + - v8.99.1164 Add in registry registration events, new subscription events you can use to make sure you're registering things at the "best" time. + - v8.99.1163 Add support for generic filtering of events. + Please DO NOT use this in performance sensitive environments where you will have tons of things added to the listener list. + If that's the case define sub-classes as they have completely separate lists and will thus be more efficient when firing the event. + - v8.99.1162 Fix roofed forests posting decoration events for small mushrooms rather than big (#3259) + - v8.99.1161 Add support for offhand bow aiming animation (#3085) + Vanilla allows you to use a bow in your offhand, but it's not visible to others or in third person. + Fixes MC-88356 + - v8.99.1160 Remove oredict for Bone Block recipe, stop white dye to bonemeal exploit (#3255) + - v8.99.1159 Fixed Biome.platFlower not being called when bonemealing grass. Closes #3254 + - v8.99.1158 Added getCommandMap() & getSortedCommandList() in CommandTreeBase (#3251) + - v8.99.1157 New event to allow mutating a baby entity based on it's parents (#3227) + - v8.99.1156 Added CommandTreeBase (#3193) + - v8.99.1155 Fix debug command creating empty file (MC-103399) (#3218) + - v8.99.1154 Fix universal bucket not being returned in crafting recipes (#3234) + - v8.99.1153 Create EnergySystems.md + - v8.99.1152 Fix potential shading issue in GuiEditArrayEntries. Closes #3247 + - v8.99.1151 Introducing a new standardized energy capability system. + Heavily inspired by the old RedstoneFlux API developed by King Lemming and Team CoFH. + - v8.99.1150 Fixed ItemStacks having ForgeCaps tag when no caps are serialized. + - v8.99.1149 Fix Cactus being able top be planted on incorrect soil. + - v8.99.1148 Fix wrong var being used during getMaxSpawnPackSize check. (#3240) + - v8.99.1147 Move dismount version of EntityMountEvent to Entity class. Should fix canceling dismounting. Closes #3226 + - v8.99.1146 Yet another fix for stupid stairs. Closes #3224 + - v8.99.1145 Make StructureBlock TESRs always render. Closes #3222 + - v8.99.1144 Fix item use stats (#3216) + - v8.99.1143 Fixed decorate event being called with SHROOM type for both convered trees and large mushrooms. Closes #3215 + - v8.99.1142 Another fix for registry substitutions. Closes #3212 + - v8.99.1141 Update gradle wrapper to 2.14, reference MC json, and add java6 compat lines to default MDK build.gradle. + - v8.99.1140 Add legacy support for signature change of AddCallback. + - v8.99.1139 Revert changes to ItemTool for binary compatibility (#3211) + - v8.99.1138 Expand getHarvestLevel to include player and blockstate (#3192) + - v8.99.1137 Make enchantment tables spawn particles for any custom energy provider. Closes #3208 + - v8.99.1136 Allow blocks to affect the beacon color (#3205) + - v8.99.1135 Fix armors rendering badly. Closes #3196 + - v8.99.1134 Fixed NPE from missing Capabilities (#3191) + - v8.99.1133 Fix World Capabilities NPE when there are no attached capabilities. + - v8.99.1132 Introduced Capabilities for World (#3069) + - v8.99.1131 Fix vanilla bug in BlockFalling that caused blocks to loose state info during world gen. Closes #3183 + - v8.99.1130 Added PlayerBrewedPotionEvent (#3187) + - v8.99.1129 Don't crash if you select a fake player + - v8.99.1128 Skip searching for mods in the JAVA_HOME directory. Closes #2249 and #2250 + - v8.99.1127 Fix leather armor overlay not rendering when armor is pure white. Closes #3184 + - v8.99.1126 Fix test mod IDs, names, and versions (#3122) + Most of our test mods have bad IDs (uppercase) and are missing names or + versions. Forge produces a bunch of warnings in the console about this, which + makes it more likely that an important message will be missed. + - v8.99.1125 Make InventoryHelper#spawnItemStack use ItemStack#splitStack to avoid losing capability data. (#3163) + - v8.99.1124 Unlike BakedQuad, UnpackedBakedQuad does not propagate the diffuse lighting flag to Vertex Consumers. Made UnpackedBakedQuad conform to BakedQuad's behavior. (#3181) + - v8.99.1123 Add RenderTooltipEvent (#3034) + - v8.99.1122 Set ModelLoader.WHITE's texture size iniatlly instead of defaulting to zero and being set later. + - v8.99.1121 Fix #3165 Dispensers with buckets can destroy fluid handler blocks (#3180) + - v8.99.1120 Fix Fire not using getFireSpreadSpeed. Closes #3175 + - v8.99.1119 Fix issue with stairs. + - v8.99.1118 Removed unintentional functionality when using the Splash Screen. + - v8.99.1117 Disable DecorateEventDebug by default. + Prevents me thinking that decoration is broken >.< + - v8.99.1116 Compleetly skip FML handshake for Vanilla connections. Should fix race condition. Closes #3084 + - v8.99.1115 Fix name in legacy support in registry changes. + - v8.99.1114 Make stair culling use actual state, and be more robust. Closes #3170 + - v8.99.1113 Fix Vertex Transformer for breaking models (#3132) + * Add setTexture to IVertexConsumer and propagate it. + - v8.99.1112 Fix Forge fluids not serializing properly. Closes #3152 + - v8.99.1111 Restone binary compatibility with registry substitution rework. + Modders please switch to using the provided RegistryBuilder to ensure more forward compatbility. Closes #3144 + - v8.99.1110 Second pass at fixing 'Dissapearing Doors' This now more robustly fixes ALL uses of get and has slight performance improvements for itterable states. Closes #3139 + - v8.99.1109 Added config option to disable Forge's fix of Stair/Slab face culling. + Some vanilla resource packs exploit this issue in their custom models causing unintended rendering issues. + - v8.99.1108 Fixed 'Dissapearing Doors', An issue where the world would try to save blockstates that are not serializeable. + - v8.99.1107 Allow CommandEvent to change the parameter set. Closes #1762 + - v8.99.1106 Another pass at substitutions - now capable of fixing up ItemBlock to point at the right block when a block is substituted, should also handle substituting itemblocks. There's some hackery in the way we have to change the value of ItemBlock.block, but it's not too egregious in my opinion. + - v8.99.1105 Clean up AT file + - v8.99.1104 Merge remote-tracking branch 'origin/pr/3120' into 1.10.x + - v8.99.1103 Fix anvil output slots being wrong by adding new ones. Closes #3121 without breaking existing mod workarounds for the badly ordered slots. + - v8.99.1102 Expose vanilla brewing recipe registration + (cherry picked from commit 24bf163) + - v8.99.1101 Clean up some legacy settings, making sure there's translation strings. Closes #2965 Thanks for the prompt Zaggy! + - v8.99.1100 Refresh patch after cherry pick (cherry picked from commit 71f75bf) + - v8.99.1099 Fix MC-91728 + (cherry picked from commit 71f75bf) + - v8.99.1098 Remove sideonly on all other SoundType methods + (cherry picked from commit 46c7cac) + - v8.99.1097 Fixed NeighborNotifyEvent not containing the piston facing direction. + (cherry picked from commit 5637c41) + - v8.99.1096 Use extended state for breaking models (#3086) + - v8.99.1095 Clean up block patch. Also push json update. + - v8.99.1094 Merge remote-tracking branch 'origin/pr/3116' into 1.10.x + - v8.99.1093 Merge remote-tracking branch 'origin/pr/3089' into 1.10.x + - v8.99.1092 Merge remote-tracking branch 'origin/pr/3125' into 1.10.x + - v8.99.1091 Fix #3126 - duplicate stat id error - don't use the "universal iterators" in statbuilding, use the one without the duplicate entries. (The duplicate entry one is for rendering setup) + - v8.99.1090 FIX : IndexOutOfBoundException + - v8.99.1089 Tidy up some more todos + - v8.99.1088 Mark it for actual removal in 1.11 + - v8.99.1087 Fix a vanilla bug with the blockstate ID map not being properly symmetric with respect to block.getStateFromMeta - closes #3012 properly but probably has a random MCJIRA ticket somewhere too. + - v8.99.1086 Update decorate for biomes to support Decorate event + - v8.99.1085 No-nonsense getSoundType + - v8.99.1084 Merge remote-tracking branch 'origin/pr/3072' into 1.10.x + - v8.99.1083 Merge remote-tracking branch 'origin/pr/3087' into 1.10.x + - v8.99.1082 Rename the event to RenderSpecificHandEvent + - v8.99.1081 Merge remote-tracking branch 'origin/pr/3115' into 1.10.x + - v8.99.1080 Merge remote-tracking branch 'origin/pr/3110' into 1.10.x + - v8.99.1079 Merge remote-tracking branch 'origin/pr/3112' into 1.10.x + - v8.99.1078 Add shouldCauseBlockBreakReset callback to Item. This allows to keep breaking blocks if the NBT or similar changes. + - v8.99.1077 Use CreateFluidSourceEvent for mod fluids as well + - v8.99.1076 Add a test for CreateFluidSourceEvent + - v8.99.1075 Add CreateFluidSourceEvent to control infinite fluid sources + - v8.99.1074 Merge remote-tracking branch 'origin/pr/3055' into 1.10.x - closes #3055 and #3043 hopefully. Complex solution, but it seems legit. Needs testing. + - v8.99.1073 Something that needs to happen: warn people about bad modids- if they're not lowercased, or if they're too long. + - v8.99.1072 Add missing cancelable + - v8.99.1071 Add hand-specific render event + - v8.99.1070 Fix hotkey with default modifier loading wrong when modifier set to NONE + - v8.99.1069 Fix async race condition on new chunks (closes #3020) (#3090) + This patch fixes a race condition that sometimes caused a just generated chunk + to be generated a second time. In some this caused generated structures to + appear incomplete such as in Issue #3020 when the second generated version + effectively overwrote the original version of the chunk. + This patch ensures when ProvideChunk calls LoadChunk synchronously we always + attempt to load the chunk (if not cached) thus avoid the race condition without + changing the logic for async loading for chunks already saved to disk. + Thus this should retain the async functionality from PR #2946 while preventing + generation issues caused by the race condition. + - v8.99.1068 Some tweaks to ContainedDeps - it should extract to a file in versionedMods directly, even if the tag in the jar has a subpath element. It'll also skip if there is a matching filename in the main mods dir. + - v8.99.1067 Add the new tests into the suite + - v8.99.1066 Some dummy block replacement tests - it seems they work correctly. + - v8.99.1065 Some more substitution tests. It seems like it's working as it should. + - v8.99.1064 More tests. Substitutions now work, and a fix is included. *sigh* Closes too many bugs to count. + - v8.99.1063 Some test harness stuffs. Time to get the registry manager properly tested. + - v8.99.1062 Add TextureDump forge test mod + - v8.99.1061 Added support for using static methods as event listeners, Register the .class instead of an instance. + And added an improvement to calltime listener rebuilding. + - v8.99.1060 Fixed sound paused/resume issue + - v8.99.1059 Force mipmap even if textures are the wrong size + - v8.99.1058 Lets make a half-decent readme. Thanks to Rorax for the install video! + - v8.99.1057 Merge remote-tracking branch 'origin/pr/3036' into 1.10.x Closes #3036 Thanks Mezz! + - v8.99.1056 Bump version for a RB + - v8.99.1055 Merge #3060 into 1.10.x + - v8.99.1054 Remove event stuff + - v8.99.1053 Move to a hook in EntityMinecart + - v8.99.1052 Add throwable impact event (#3071) + - v8.99.1051 Add ability for custom detector rail output + - v8.99.1050 Update build.gradle to not append the branch name if it matches the minecraft version. + - v8.99.1049 Fix hopper extract behavior being broken on edge cases due to IItemHandler capability. Closes #3062 + - v8.99.1048 Add an event that allows to modify the looting level based on damage source + - v8.99.1047 Fixed FPS graph and new debug lines not being rendered in Debug screen. Closes #3054 + - v8.99.1046 Restore (buggy?) behavior of vanilla BlockPistonMoving and ignore drop chance (#3052) + - v8.99.1045 Fix villages generating to high when using a cusom sea level. Closes #3050 + - v8.99.1044 Update build.gradle to have single line for specifying minecraft version, and will update ForgeVersion.java as needed. + - v8.99.1043 Forge will now load extra mods from mods/mod_list.json and mods/mc_version/mod_list.json. + As defined by the same json spec as --modListFile. + And now if repositoryRoot is prefixed with absolute: the path will NOT be relative to the MC directory. + - v8.99.1042 Store member field mappings in the mapping table, possible fix for #3043 + - v8.99.1041 Fixed MC version number... + I could of SWORN we removed this in favor of a automated system... + - v8.99.1040 1.10.2 Update + - v8.99.1039 Fix mob-spawners crashing for non-living entities and simply the patch in the process (#3042) + - v8.99.1038 Fix milk bucket is fillable with water or lava when milk is unregistered (#3039) + - v8.99.1037 Fix legacy handling for ItemBucket subclasses and non-universal buckets (#3038) + - v8.99.1036 Fix FluidContainerRegistry handling potions as water bottles (#3037) + - v8.99.1035 Remove duplicated universal buckets from the creative list (#3035) + - v8.99.1034 Big warning for recipe types found without being registered, it turns out this is pretty severe, modders need to fix it. + - v8.99.1033 Add Forge fluid handler test + - v8.99.1032 Fix comparison stability of the Recipe Sorter with unknown recipes #2962 (#3030) + - v8.99.1031 Fixed Husks rendering as standard zombies. Closes #3028 + - v8.99.1030 Fixed chests being replaced when trees grew. + - v8.99.1029 Simple implementation of a Open/Close container event (#3017) + - v8.99.1028 Provide 'cleaner' version of TextureMap.setTextureEntry. Closes #1385 + - v8.99.1027 Fix incorrect logic in ChunkCache.isSideSolid. Closes #3026 + - v8.99.1026 Fixed incorrect variable being sent to doSpecialSpawn. Closes #2986 + - v8.99.1025 Fixed shifted patch in GameSettings causing settings to not load properly. Closes #3025 #3022 + - v8.99.1024 Fix doors popping off solid sides. + - v8.99.1023 Fix that the Missing blocks/items/registries prompt often got stuck. + - v8.99.1022 Fix Realms button text to be shorter again. Closes #3019 + - v8.99.1021 Fix item pickup dupe bugs. Closes #3015 + - v8.99.1020 [1.10] Fix keys with KeyModifier failing to load (#3018) + Fix key options with KeyModifier failing to load due to NumberFormatException + - v8.99.1019 Accept more 1.9.4 version strings. Fix NPE for custom villager types and their associated zombie spawns. Still needs review. + - v8.99.1018 Fix all guis closing as soon as they are opened (#3013) + - v8.99.1017 Fix version number. + - v8.99.1016 Update to 1.10 + - v8.99.1015 Fix the MDK - it gets the license too! + - v8.99.1014 Update the build.gradle script to ship the new license and stop shipping the old licenses. + - v8.99.1013 In accordance with our stated goal of relicensing Forge to LGPL v2.1, this commit enacts that change. Although it is using the 1.9.4 codebase, it is intended that this branch become public with the 1.10 changes, as such the license will take effect at that time. The three commits from persons who have failed to accept the new license, as documented in #2789, have had their commits reverted. This should complete the license transition. Commits after the commit date of this commit should be considered licensed by LGPLv2.1, as indicated in LICENSE-new.txt. All patches are now considered owned by the Forge project and Forge Development LLC in particular (note that they will not get the license boilerplate, as they are machine generated files). + - v8.99.1012 Revert "Added PlayerOpenContainerEvent and added ForgeHooks.canInteractWith" + This reverts commit 8d0b58ee6fe1dca88f5874a9dd08368b0f5859e6. + # Conflicts: + # common/net/minecraftforge/common/ForgeHooks.java + # patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch + # patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch + - v8.99.1011 Revert "Added tab completion" + This reverts commit fe327fbd7662e0a1e71b89125f0a94ae48239bd0. + # Conflicts: + # src/main/java/net/minecraftforge/server/command/ForgeCommand.java + - v8.99.1010 Revert "Changed forge command tab completion to use getListOfStringsMatchingLastWord()" + This reverts commit 6a299a483a4865e13cd61e5d900a9e0c004a9226. + # Conflicts: + # src/main/java/net/minecraftforge/server/command/ForgeCommand.java + - v8.99.1009 Made forge-type spawn eggs spawn childs, when right clicking EntityAgeable again. (#2982) + - v8.99.1008 Merge remote-tracking branch 'origin/pr/2994' + # Conflicts: + # patches/minecraft/net/minecraft/item/ItemStack.java.patch + - v8.99.1007 Make ASMDataTable more useful: (#2911) + - EnumHolder now has getters for it's data + - enum arrays work now + - nested annotations work now outside of being in arrays + (cherry picked from commit f10f750) + - v8.99.1006 Fix incorrect FluidUtil doc (#2996) + - v8.99.1005 Improve the "missing mods" on-screen error message (#2997) + - v8.99.1004 Fix ItemStack deserialization can't clear nbt (#3005) + - v8.99.1003 Update CONTRIBUTING.md + - v8.99.1002 Update CONTRIBUTING.md + - v8.99.1001 Fix #2918 Make dispensers with buckets work with modded fluids (#2947) + - v8.99.1000 Fixed brewing stand returning incorrect solts for side inventories. + - v8.99.999 Fixed villager career display names being off by one. + - v8.99.998 Fix broken EntityItem merging for Items with capabilities + - v8.99.997 Fix DataParameter mixup when vanilla clients are connected causing CCE in zombie renderer (#2992) + - v8.99.996 Fix AnimationItemOverrideList not falling back to super (#2990) + - v8.99.995 Fix #2961 Capability data is not preserved by fluid handler interactions (#2976) + - v8.99.994 Slight tweak to early loading, to accommodate FMP + - v8.99.993 Fixed Fernflower decompile issue in AnvilChunkLoader.saveExtraData() Closes #2985 + - v8.99.992 Mute the connection reset by peer exception - it's spamilicious for the most part. + - v8.99.991 Fix missing IMC message query. + - v8.99.990 Read a Update JSON in UTF-8 (#2978) + - v8.99.989 Add getter for the world to LootContext (#2954) + - v8.99.988 Fixed arrows not showing in non default AchievementPages (#2968) + - v8.99.987 Add methods to Fluid to allow custom vaporization overrides (#2959) + - v8.99.986 Fixes #1984. + - v8.99.985 Modified SimpleModelState to ignore the parts it doesn't know about. Fixes model part hiding always applying to some models when transformations are specified in the blockstate json. + - v8.99.984 Pass the GL context back from the splash screen during the EntityRenderer init. + - v8.99.983 Fire ChunkWatchEvent.Watch event, closes #2767. Based on @sfPlayer1 patch suggestion. It looks like this logic has shifted relative to 1.8, so there may be differences in event behaviour now. + - v8.99.982 Fix asynchronous chunk loading (#2946) + Since the update to Minecraft 1.9.4 chunks were actually never loaded + asynchronously because a sync request was always made from the + PlayerChunkMap shortly after the chunk had been queued. + - PlayerChunkMapEntry now only loads chunks synchronously *after* the + chunk failed to load asynchronously. + - Fixed some minor bugs that caused "Attempted to dequeue chunk" messages + - Simplified ChunkProviderServer patch. loadChunk no longer generates chunks, + so there is no need to handle that. + - Moved loader and provider to ChunkIOProvider so there is no need for + "hashCode abuse" + - v8.99.981 Make it easier to use FluidTanks that have input/output restrictions (#2945) + These internal function should NOT be used by anything except the owner of the tank. + - v8.99.980 Fixed BiomeProvider.getModdedBiomeGenerators method name. Closes #2937 + - v8.99.979 Several bugfixes for PlayerInteractEvent (#2943) + * Don't change Result if setCanceled(false) called + * Fix RightClickEmpty firing even when targeting a block or entity + * Add a left click empty event + * Move hook point for EntityInteractSpecific to the right place + * Fix LeftClickBlock not firing clientside in creative, and clarify docs about creative + - v8.99.978 Add new IFluidHandler for capabilities. (#2942) + Old fluid system is deprecated and slated for removal in the next cleanup cycle. + - v8.99.977 Add a Slot#isSameInventory() method (#2884) + This fixes shift + double clicking items in Containers that use + SlotItemHandler slots. + - v8.99.976 Fixed POTENTIAL issue where mods would query world infrom from TEs before they are set. Closes #2863 + - v8.99.975 Expanded custom villagers to Zombies and world gen. + Fixed edge cases where custom professiosn wernt being used correctly. Closes #2862 + - v8.99.974 Fixed client side ticking TileEntites after they are unloaded. Closes #2852 + - v8.99.973 Fixed position sent to sanSustainPlant from cactus. Closes #2941 + - v8.99.972 Forge will now warn the user and ask permission to load a world with unknown registries. Closes #2934 + - v8.99.971 Fix BlockFluidBase having collision. Closes #2932 + - v8.99.970 Merge branch '1.9.4' + - v8.99.969 Initial support for model visibility system. Implemented it for OBJ, B3D and normal vanilla models; fixed NPE accessing parent state in B3DModel. Fixes #2801. + - v8.99.968 Improve JavaDoc links, fix some broken JavaDocs (#2833) + Improve JavaDoc links, fix broken JavaDocs + - v8.99.967 Reordered transformations during LayerHeldItem rendering, fixes #2827. + - v8.99.966 Fixed new ICrashReportDetail loader working with packaged mods by delaying it until the ModContainer's construct event. Closes #2924 + - v8.99.965 Fixed issue with @ObjectHolder and the new registry system. Closes #2640 + Only run static initalizers for classes we need to get the names from values. + - v8.99.964 Fixed village wells not having their biomes set. Closes #2499 + - v8.99.963 Fixed TileEntityBeacon not using position-aware getLightOpacity. Closes #2530 and #2910 + - v8.99.962 Fixed potential issue with Chunk.getLightOpacity being called before the chunk is added to the world map. Closes #2529 + - v8.99.961 Fixed FluidUtil.tryEmptyFluidContainerItem not checking if the tank can accept fluids first. Closes #2527 + - v8.99.960 Make sure tool-classes for vanilla tools are initialized early. Closes #2909 and #2525 + - v8.99.959 Fix tooltip for survival tab in the creative menu not drawing on any but the first page. Closes #2908 and #2504 + - v8.99.958 Fix Thorns enchantment bypassing ISpecialArmor.damageArmor function. Closes #2463 + - v8.99.957 Reinitalize statistics information on Mapping changes. + Fixes mismatched stats to item/block ids. And auto registers stats for modded items. + Closes #2454 + - v8.99.956 Fixed NBTTagString.toString not properly escaping \'s. Closes #2393 + - v8.99.955 Add ServerHangWatchdog to TerminalTransformer whitelist. Closes #2203 + - v8.99.954 Fix setTileEntity causing the world to remove the new and old tile entities. Closes #2164 + - v8.99.953 Fixed EntityRegistry.addSpawn adding duplicate spawn entries. Closes #2112 + - v8.99.952 Fix javadocs for BiomeColor events. Closes #2093 + - v8.99.951 Fire LivingSpawnEvents for MobSpawners. Closes #2079 + - v8.99.950 Fire PopulateChunkEvent Pre and Post in ChunkProviderFlat. Closes #2050 + - v8.99.949 Move getArmorModel hook up two lines so that the attributes and animation information is set. Closes #1939 + - v8.99.948 Close player's inventory to prevent potential dupe issues on some modded items. Closes #1431 + - v8.99.947 More uniformly apply Configuration.caseSensitiveCustomCategories. Closes #1353 + - v8.99.946 Set Enchantment table's harvest level. Closes #1349 + - v8.99.945 Capture interfaces when scanning classes and preload implementations of ICrashReportDetail. + - v8.99.944 Fix installer downloading vanilla jar when not needed. And filter some more known libraries. + - v8.99.943 Strip Optional from the class signature as well, since that's loaded by the TypeToken registry code and might cause a crash. + - v8.99.942 Pass the correct position into isSideSolid in BlockRailBase#canPlaceBlockAt (#2919) + - v8.99.941 Add hook for TE data sync on client (#2893) + - v8.99.940 Switch new constructor to use floats (#2904) + - v8.99.939 Make unit test for EnumHelper more robust and less spammy. Now detects missing accessors as well. + - v8.99.938 Fix paramters for addArmorMaterial, addOption and addGameType. + - v8.99.937 Add Unit Test to detect mismatches between EnumHelper and Enum ctor + - v8.99.936 Add alternative ItemAxe Constructor + - v8.99.935 Fix villagers having farmer skin on vanilla servers. Closes #2894 + - v8.99.934 Fire playerDestroyItem event's in some cases where we were not. + - v8.99.933 Fix Container.compouteStackSize not respecting stack version of maxStackSize. Closes #2756 + - v8.99.932 Set max enchantment ID to Short.MAX_VALUE. Closes #2799 + - v8.99.931 Tipped arrows are now not affected by infinite enchantment but are still effected by creative mode. + - v8.99.930 Take capabilities into account when comparing ItemStack NBT's. Closes #2726 + - v8.99.929 Fix screenshot link paths on Windows (#2886) + - v8.99.928 Tweak build file slightly - allow passing buildNumber using gradle parameters (-PbuildNumber=...) and provide a "resetBuildNumber" function to reset the buildNumber to zero in the ForgeVersion file. Means builds can be reproducible in-IDE. + - v8.99.927 Add Unit Test to detect mismatches between EnumHelper and Enum ctor + - v8.99.926 Update example mod for new mappings. + - v8.99.925 Bump version information for 1.9.4. + - v8.99.924 Fix schizophrenia in version numbers. + - v8.99.923 Update mappoings snapshot to 20160518 + - v8.99.922 1.9.4 Update. + Major things to note: + Class renames: https://gist.github.com/LexManos/44dd211f90f498ad4015279b103dff86 + Tile Entities are now packed in the ChunkData packet. + Forge intends to work around this to better support large moded worlds, but for the time being modders should implement the new function carefully and only send what data they need to! + Minecraft's codebase now has annotations, these are directly from Mojang and should be adheared to! + Added support for package-info.java's containing @Nullable information for all MC code base. + - v8.99.921 Fix Bucket rendering and add sound (#2865) + * Adjust generated quads from texture to take texture size into account #2858 + * Fix universal bucket not passing through when rightclicking on a non-block + Add proper sound events when picking up modded fluids #2821 + * Have FluidUtil execute properly on both sides and sync as expected. Add default sounds to interacting with tanks + * Save sound for filling/emptying in the fluid + - v8.99.920 Lets just simply this. Fixes last commit. + - v8.99.919 Add modder facing API for Villager Career level trades. Ref: #2854 + - v8.99.918 Extended Animation State Machine format to allow multiple transitions from one state. + - v8.99.917 Fix up release jsons to clean up extraneous netty references + - v8.99.916 Make LootPool constructor public again. Closes #2847 + - v8.99.915 Fix type in LootEntry json name. And rename LootTable.finalize to freeze to avoid overriding Object function. Closes #2846 and #2847 + - v8.99.914 Fixed joint animation application correctly. + - v8.99.913 Add ScreenshotEvent (#2828) + Add ScreenshotEvent + - v8.99.912 New LootTable interaction system and event. + Modders can now modify and reference internal elements of a loot table by name. + Editing can ONLY be done in the event and any external editing will cause a exception to be thrown. + See this gist for more information: https://gist.github.com/LexManos/77c983d67b9ad27010428478b66d50fd + - v8.99.911 Fixed joint hierarchy not being used fully in the animation system. + - v8.99.910 Fixed issue in ChunkIO that would potentially cause NPEs on chunks. Closes #2837 + - v8.99.909 Fixed map extension recipie. + - v8.99.908 Fix the rand given to PopulateChunkEvent (#2834) + - v8.99.907 Fix areas where dimension types are used as dimension IDs. + - v8.99.906 Add NPE protection to in-hand item rendering. + - v8.99.905 Fix url regex (#2815) + Fixed url detection in chat messages. Stops false positives such as `um.....no` + - v8.99.904 Bump version for new RB. + - v8.99.903 Slightly better practice because wait can be randomly interupted. + - v8.99.902 Merge in a fix from 1.8.9 for rails + - v8.99.901 Merge branch '1.9' + - v8.99.900 Remove usage of AsynchronousExecutor library in favor or a simpler implementation. + - v8.99.899 Add a java version detection and nag system for users on Java 7 or below. + Added detection of mods that rely on Java 8 and a graceful error screen. + The nag screen will be shown once a day. It can be disabled by editing the forge.cfg. + However it is HIGHLY recomended that user update to Java 8. + - v8.99.898 Fix withers breaking bedrock. Closes #2813 + - v8.99.897 Fixed villager profession not being set correctly on the client, and fixed custom village texture rendering. Closes #2766. + - v8.99.896 Fixed cooldown overlay sometimes rendering opaque. Closes #2772. + - v8.99.895 Make ChunkRenderDispatcher.countRenderBuilders configurable. Closes #2775. + - v8.99.894 Fixed custom fluid sufraces not rendering from the bottom. Closes #2800. + - v8.99.893 Fix TextureMap failing when registering a sprite's resource location twice (#2785) + - v8.99.892 Call markDirty when restoring blocks with TileEntities. (#2809) + This change makes sure the updated tileentity is saved properly within the + chunk. + - v8.99.891 Call markDirty when restoring blocks with TileEntities. (#2808) + This change makes sure the updated tileentity is saved properly within the + chunk. + - v8.99.890 Call markDirty when restoring blocks with TileEntities. (#2807) + This change makes sure the updated tileentity is saved properly within the + chunk. + - v8.99.889 Add Potion.renderHUDEffect (#2798) + - v8.99.888 Fix wrong blockstate being passed to notifyNeighborsRespectDebug. (#2806) + - v8.99.887 Only run block physics for TileEntities while capturing block placement. (#2805) + Currently, all blocks placed by players that are not TE's run physics + twice. Blocks that contain a TileEntity are not affected due to a check in + 'ForgeHooks.onPlaceItemIntoWorld'. + In order to fix the problem, 'Chunk.setBlockState' will now verify if + blocks are being captured before running onBlockAdded and if so, only run + physics if the block has a tileentity. This check also prevents blocks + such as TNT's from running its physics (explosion) when placement event is + cancelled. + - v8.99.886 Only run block physics for TileEntities while capturing block placement. (#2803) + Currently, all blocks placed by players that are not TE's run physics + twice. Blocks that contain a TileEntity are not affected due to a check in + 'ForgeHooks.onPlaceItemIntoWorld'. + In order to fix the problem, 'Chunk.setBlockState' will now verify if + blocks are being captured before running onBlockAdded and if so, only run + physics if the block has a tileentity. This check also prevents blocks such + as TNT's from running its physics (explosion) when event is cancelled. + - v8.99.885 Fix sluggish scrolling on GuiScrollList's and fix small rendering issue with scroll bar on certian screen sizes. + - v8.99.884 Fix SidedInvWrapper accessing wrong slots for setStackInSlot. (#2797) + Fix DoubleChestItemHandler not implementing IItemHandlerModifiable + - v8.99.883 Close #2780 add CMD localization for Mac key bindings (#2792) + - v8.99.882 Update LICENSE-new.txt + Better words + - v8.99.881 Update LICENSE-new.txt + Words + - v8.99.880 Update LICENSE-new.txt + Clarification on infectivity + - v8.99.879 Add the new license text. Not yet applicable to forge. + - v8.99.878 Fix NPE on shield break. Closes #2786 + - v8.99.877 Boss bar render event (#2701) + Allow control over increment height + - v8.99.876 Fix forge:default-block transformation. (#2760) + The first-person left-hand rotation was a little bit of. + - v8.99.875 Expose a central place to access all of Vanilla and Forge's registries using the new registry API. + - v8.99.874 Fix log spam from invalid key modifiers (#2746) + - v8.99.873 make WorldSavedData implement NBTSerializable (#2745) + - v8.99.872 Don't use import static with net.minecraft classes. Using the latest MCP snapshots this causes an import conflict. (#2742) + - v8.99.871 Add cancelable event for Potions shifting the gui position (#2667) + Add cancelable event for Potions shifting the gui position + - v8.99.870 Fix ForgeChunkManager world unloading check (#2736) + - v8.99.869 Fix being kicked from server when climbing ladders. + - v8.99.868 Fix potential desync between Forge's Villager profession and vanilla's int based system. + - v8.99.867 Update ore dictionary (#2721) + Updated the Ore Dictionary with more vanilla items: + -Prismarine Shard ( "gemPrismarine" ) + -Prismarine Crystals ( "dustPrismarine" ) + -Prismarine Block ( "blockPrismarine" ) + -Prismarine Brick ( "blockPrismarineBrick" ) + -Dark Prismarine ( "blockDarkPrismarine" ) + -Nether Wart ( "cropNetherWart" ) + -Sugarcane ( "sugarcane" ) + -Paper ( "paper" ) + -Ender Pearl ( "enderpearl" ) + -Bone ( "bone) + -Gunpowder ( "gunpowder) + -String ( "string" ) + -Nether Star ( "netherStar" ) + -Leather ( "leather" ) + -Feather ( "feather" ) + -Egg ( "egg" ) + -End Stone ( "endstone" ) + -Torch ( "torch" ) + -Vine ( "vine" ) + -Cactus ( "blockCactus" ) + -Grass ( "grass") + -Obsidian ( "obsidian" ) + -Red Sandstone ( added to "sandstone" ) + -Crafting Table ( "workbench" ) + -Slime Block ( "blockSlime" ) + -Granite ( "stoneGranite" ) + -Polished Granite ( "stoneGranitePolished" ) + -Diorite ( "stoneDiorite" ) + -Polished Diorite ( "stoneDioritePolished" ) + -Andesite ( "stoneAndesite" ) + -Polished Andesite ( "stoneAndesitePolished" ) + - v8.99.866 Merge pull request #2729 from kashike/feature/bossinfo + Remove @SideOnly(Side.CLIENT) from BossInfo/BossInfoServer methods + - v8.99.865 Remove @SideOnly(Side.CLIENT) from BossInfo/BossInfoServer methods + These methods can also be used by the server (see BossInfoServer, it sends packets to the client but the methods are @SideOnly(Side.CLIENT)) + - v8.99.864 Made forge fluids use smooth lighting. + - v8.99.863 Fixed NPE in dedicated server languages. And fixed logger for main FML event bus. + - v8.99.862 Cleanup OBJLoader parse function and fix issues related to JVM differences. + Also fix support for sopme of the spec that was partially respected. + - v8.99.861 Enhance some error logging related to OBJLoader issues, and RegistryEntries. + - v8.99.860 Merge pull request #2723 from mezz/pick-fix + Fix some plain keybinds not working when a modifier is active + - v8.99.859 Fix some plain keybinds not working when a modifier is active + - v8.99.858 Merge pull request #2719 from mezz/pick-fix + Fix #2717 Pick block hotkey not working in inventories + - v8.99.857 Fix #2717 Pick block hotkey not working in inventories + - v8.99.856 Merge pull request #2718 from nekosune/patch-1 + Corrected CapabilityItemHandler.readNBT ignoring anything in slot 0 in 1.9 + - v8.99.855 Corrected CapabilityItemHandler.readNBT ignoring anything in slot 0 in 1.9 + - v8.99.854 Merge pull request #2714 from nekosune/patch-1 + Corrected CapabilityItemHandler.readNBT ignoring anything in slot 0 + - v8.99.853 Corrected readNBT ignoring anything in slot 0 + - v8.99.852 Fixed forge fluid having a collision box. + - v8.99.851 Fixed zip being closed too early in the server language loading. + - v8.99.850 Merge pull request #2709 from iTitus/bucketModel + Fix dynbucket item transformation. + - v8.99.849 Fix dynbucket item transformation. + - v8.99.848 Fixed some test mods not being marked as client-only. + - v8.99.847 Fixed mod languages not being loaded on the server. + - v8.99.846 Merge pull request #2708 from Zaggy1024/1.9 + Fix PlaySoundEvent replacing a sound with PositionedSound causing an NPE. + - v8.99.845 Fixed using PlaySoundEvent to replace a sound with a PositionedSound causing an NPE due to the Sound field not being set by a call to ISound.createAccessor(SoundHandler). + - v8.99.844 Merge pull request #2707 from mezz/keyBinding19-4 + Add modifier support to vanilla keybindings. + - v8.99.843 Merge pull request #2604 from williewillus/pie + New PlayerInteractEvent for 1.9 + - v8.99.842 Player Interact Event + - v8.99.841 Add modifier support to vanilla keybindings. + Add Orange conflict color for modifier/key conflicts + (like Ctrl and Ctrl-Z conflicting) + Related to #2692 + - v8.99.840 Merge pull request #2704 from AEnterprise/1.9 + onBlockHarvested is no longer called twice + - v8.99.839 Fix improper logic in ItemHandlerHelper.giveItemToPlayer causing some items to not be added. Closes #2705 + - v8.99.838 Fixed EntityJoinWorldEvent not being fired for some entitites on Server Worlds. Closes #2685 + - v8.99.837 Fix issue caused by setting spawnRadius to 0. Closes #2624 + - v8.99.836 Made both exceptions occuring during item model loading print in the log; closes #2696. + - v8.99.835 Added the ability to change the printed model error count; Added printing of actual exceptions causing missing variants related to blockstate loading, closes #2689. + - v8.99.834 onBlockHarvested is no longer called twice + - v8.99.833 Merge pull request #2702 from McJty/1.9 + Added DimensionManager.createProviderFor() to WorldClient constructor… + - v8.99.832 Added DimensionManager.createProviderFor() to WorldClient constructor similar to what is done + in WorldServer to make sure the correct provider is created client-side too. + - v8.99.831 Merge pull request #2616 from iTitus/updateNotificationIcon + Add update notification icon made by @gigaherz, closes #2582 + - v8.99.830 Merge pull request #2697 from mezz/keyBinding19-3 + Fix inability to attack while holding modifier keys + - v8.99.829 Fix inability to attack while holding modifier keys + - v8.99.828 Merge pull request #2695 from mezz/keyBinding19-2 + Re-Add key binding modifiers and contexts. + - v8.99.827 Re-Add key binding modifiers and contexts. + - v8.99.826 Revert "Add key binding modifiers and contexts.", until it's fixed. + This reverts commit 34c3af7e853d578c8e17e1f0cdf886251fad74ae. + - v8.99.825 Changed generic signature of GameRegistry.register methods to work around the type inference bug; updated all example mods to the new block/item registration method. + - v8.99.824 Merge pull request #2693 from Adubbz/1.9 + Fixed mismatched registry names and mod ids + - v8.99.823 Merge pull request #2692 from mezz/keyBinding19 + [1.9] Add key binding modifiers and contexts. + - v8.99.822 Properly deprecate and link the replacement methods in GameRegistry. Add helper method for registering a block with default ItemBlock because people keep complaining -.- + - v8.99.821 Fixed mismatch registry names and mod ids + - v8.99.820 Add key binding modifiers and contexts. + Same as #2674, but for Minecraft 1.9 + - v8.99.819 Fixed compile error in registry code with Eclipse. + - v8.99.818 Capture a vanilla freeze - will be used when FML connects to vanilla servers, soon + - v8.99.817 Support ResLocations for IMC + - v8.99.816 Improved UV offset hackery - should fix most visible custom model seams. + - v8.99.815 MinecraftForge-2684 [1.9] New Registry ignores keys + - v8.99.814 MinecraftForge-2683 InvocationTargetException for Forge 1820 for 1.9 + - v8.99.813 Add registries for soundevents, enchantments and potiontypes + MinecraftForge-2576 [1.9] SoundEvents (and Enchantments and PotionTypes) need a FML registry + - v8.99.812 Reconcile Block.patch + - v8.99.811 Squashed commit of the following: + commit b3b290aec9d3010a134859da6001ea28a96c2fdc + Merge: c6ce6a0 d803f7d + Author: cpw + Date: Fri Mar 25 13:28:04 2016 -0400 + Merge branch 'RegistryRework' of https://github.com/LexManos/MinecraftForge into LexManos-RegistryRework + Implement proper registry slaves. Should help with rollback related issues. + Missing patch + commit d803f7db76f65db9d27302c9804a643bc853dc22 + Author: LexManos + Date: Tue Mar 22 03:36:14 2016 -0700 + Update VillagerRegistry and use it. Should in theory make custom villagers work now. Using string version instead of int id for networking. + commit eb5e5b4b42fdca26d2a104e4dc1e6a3ea3051a7b + Author: LexManos + Date: Tue Mar 22 02:14:16 2016 -0700 + More cleanup. + commit edbc56b2ff314629d0e402709f3cf29fc79c4a3d + Author: LexManos + Date: Tue Mar 22 02:05:23 2016 -0700 + More cleanups, removed deprecated UniqueIdentifier {ResourceLocation now} + commit e2df8d1be3c97601508f83dc97b0e8853fa1e271 + Author: LexManos + Date: Tue Mar 22 01:29:19 2016 -0700 + Stupid generics.... + commit 46d57dc4677fa5ff3923e64eaccfb33d7e5aad8d + Author: LexManos + Date: Tue Mar 22 01:00:25 2016 -0700 + Some registry tweaking to provde a non-complicated API modders can use. + - v8.99.810 Fix remapped blocks being overriden with dummy air blocks. Closes #2491 + - v8.99.809 Merge pull request #2679 from tterrag1098/render_in_layer_state + Add state param to Block.canRenderInLayer + - v8.99.808 Add state param to canRenderInLayer + - v8.99.807 Merge pull request #2678 from shadowfacts/BlockAddInfo-19 + Forward ItemBlock#addInformation to Block#addInformation + - v8.99.806 Forward ItemBlock#addInformation to Block#addInformation + - v8.99.805 Merge pull request #2659 from kashike/feature/immutable-blockpos + Replace Forge's getImmutable method with the vanilla method + - v8.99.804 Merge pull request #2664 from gigaherz/capability-storage + Make access to the Capability IStorage less annoying + - v8.99.803 Fix landing particles not showing up. Cloes #2661 + - v8.99.802 Make NoteBlockEvent raw constructor protected to allow subclasses. Closes #2153 + - v8.99.801 Fix bows not animating properly when picking up ammo while using. Closes #2672 + - v8.99.800 Fix shrubs not generating correctly. Closes #2663 + - v8.99.799 Fix EntityPlayer still running old armor logic. Closes #2670 + - v8.99.798 Merge pull request #2634 from mezz/null-pick + Fix Block.getPickBlock returning an ItemStack with a null Item + - v8.99.797 Fixed StackOverflow caused by the previous commit, closes #2669. + - v8.99.796 Prevent missing model from loading multiple times. + - v8.99.795 Fix Block.getPickBlock returning an ItemStack with a null Item + - v8.99.794 Add wrapper methods for IStorage#readNBT/writeNBT. + - v8.99.793 Replace Forge's `BlockPos#getImmutable` method with the included `BlockPos#toImmutable` (func_185334_h), while keeping the override in PooledMutableBlockPos to prevent mutable leaks. + Also prevent a mutable blockpos leak in World#setTileEntity + - v8.99.792 Fixed crosshair always being white, closes #2653. + - v8.99.791 Enabled diffuse lighting by default in UnpackedBakedQuad.Builder. + - v8.99.790 Fixed diffuse lighting not being applied if forge lighting pipeline is disabled, closes #2651 + - v8.99.789 Merge pull request #2650 from mezz/1.9 + Make tooltips layout in the right direction, wrap if there is no room + - v8.99.788 Make tooltips layout in the right direction, wrap if there is no room + Same as #2649, but for Minecraft 1.9 + - v8.99.787 Merge pull request #2649 from mezz/tooltips + Make tooltips layout in the right direction, wrap if there is no room + - v8.99.786 Make tooltips layout in the right direction, wrap if there is no room + Fixes #2255 + - v8.99.785 Disabled erroring block, fixed DynBucketTest.TestItem model. + - v8.99.784 Merge pull request #2645 from diesieben07/populate_event + Fix PopulateChunkEvent.Post not firing. + - v8.99.783 Made some more public fields either private or final. + - v8.99.782 Removed RenderWorldEvent, encapsulated all public event fields. + - v8.99.781 Removed LanguageRegistry and CollectionWrapperFactory. + - v8.99.780 Fixed isSideSolid causing infinite loops due to the call to getActualState. + - v8.99.779 Cleanup: removed IEEP, removed redundant casts, fixed imports, fixed typos. + - v8.99.778 New Builder class in BlockStateContainer. Makes building containers with both listed and unlisted properties cleaner. + Make all methods of BiomeGenBase$BiomeProperties public so that modders can use that class outside subclasses. + - v8.99.777 Fix PopulateChunkEvent.Post not firing + - v8.99.776 Merge pull request #2643 from diesieben07/beetroots + Fix BlockCrops.getDrops not respecting new age methods (for beetroots) + - v8.99.775 Fix BlockCrops.getDrops not respecting new age methods (for beetroots) + - v8.99.774 Add flashing update notification icon made by @gigaherz, closes #2582 + It is added to the "Mods" button in the main menu and to out-of-date mods in the mod list (there it replaces the "U"). + Also fixes a little typo. + - v8.99.773 Register the animation Capability. No idea how it worked before at some point. + - v8.99.772 Show meaningful error if ModelLoaderRegistry is used before the missing model is initialized. + - v8.99.771 Fix typo causing biomes to be generated in wrong chunks. Closes #2632 + - v8.99.770 Fixed custom entities unique ids. + - v8.99.769 Update FML Entity Spawn packet for 1.9's location change. Closes #2567 + - v8.99.768 Merge pull request #2622 from williewillus/dupedropfix2 + Actually fix dupe drop + - v8.99.767 Added Capability.cast, to allow avoiding unchecked casts in ICapabilityProvider.getCapability + - v8.99.766 Fix swap animations for sure this time. + - v8.99.765 Actually fix dupe drop + - v8.99.764 Make OreDictionary.initVanillaEntries() private so that dumb modders will stop calling it. + - v8.99.763 Allow finite fluids to be drained correctly + - v8.99.762 Merge pull request #2531 from Choonster/finite-fluid-drain-fix + Allow finite fluids to be drained correctly + - v8.99.761 Merge pull request #2587 from diesieben07/spawn_egg_fix + Fix mod spawn eggs and EntityList.func_188429_b + - v8.99.760 Merge pull request #2592 from matthewprenger/patch-1 + Pass exceptions thrown in mod event buses back to FML to handle appropriately + - v8.99.759 Merge pull request #2593 from williewillus/dupedropfix + [1.9] Fix double dropping of items. Closes #2549 + - v8.99.758 Merge pull request #2621 from Thutmose/patch-1 + Fix pushing players inside blocks. + - v8.99.757 Fix pushing players inside blocks. + same changes made to the 1.9 branch + - v8.99.756 Merge pull request #2614 from williewillus/entitycaps + Expose IItemHandler on vanilla entities + - v8.99.755 Added support for custom dyes with Banners. Closes #2596 + - v8.99.754 Make RenderLivingBase.add/remvoeLayer, Closes #2573 + - v8.99.753 Fix pushing players inside blocks. + - v8.99.752 Update according to suggestions + - v8.99.751 Exclude jna from termal tansformer. + - v8.99.750 Add ShieldDecoration and Tipped arrows to recipe sorter. Closes #2613 + - v8.99.749 Fixed Item.shouldCauseReequipAnimation hook. + - v8.99.748 Fix Chests not opening correctly with semi-solid blocks on top. + - v8.99.747 Merge pull request #2618 from Thutmose/patch-1 + Allow players sized smaller than 1 block to walk into small spaces + - v8.99.746 Merge pull request #2605 from Thutmose/playersize + Fixed players smaller than 1 block not being able to walk under overhang + - v8.99.745 Rework DimensionManager for new DimensionType enum, replaces the old provider registry. Also fixed save folder issues with dimensions. Closes #2570 + - v8.99.744 Allow players sized smaller than 1 block to walk into small spaces + Same as #2605 but for 1.9 branch + - v8.99.743 Allow players sized smaller than 1 block to walk into small spaces + - v8.99.742 Merge pull request #2612 from CovertJaguar/master + Add missing Minecart/Track hook. + - v8.99.741 Added default left hand transforms for forge transform strings. Closes #2615. + - v8.99.740 Made VertexBuffer.sortVertexData cleanup pointers after it's done. Closes #2528. + - v8.99.739 Ignore blocks/items with null registry name during model loading. Fixes NPE during resource reloading in worlds with removed blocks/items. + - v8.99.738 Removed blockCenterToCorner from TRSRTransformation constructor. Closes #2461. + - v8.99.737 Implemented slightly more generic version of UVLock, re-enabled it for json models. Closes #2607. + - v8.99.736 Expose IItemHandler on vanilla entities + - v8.99.735 Add missing Minecart/Track hook. + - v8.99.734 instance -> INSTANCE + - v8.99.733 Separated model classes to client and common packages. + - v8.99.732 Switched animation system to capabilities, added animated item example, fixed state passing in MultiModel. + - v8.99.731 Merge pull request #2610 from gigaherz/1.9-enchantment + Fix for enchantment table rolling invalid enchants + - v8.99.730 Merge pull request #2590 from blay09/patch-1 + [1.9] Fix KeyInputEvent only being fired if Keyboard.getEventKeyState() is false + - v8.99.729 Merge pull request #2606 from CovertJaguar/1.9 + Fix #2601 Minecart infinite acceleration + - v8.99.728 Fix a condition that caused the enchantment table to roll invalid enchantments. + - v8.99.727 Fix #2601 Minecart infinite acceleration + - v8.99.726 Fix EntityList.func_188429_b not supporting mod-entities, fixes spawn eggs, fixes #2581 + - v8.99.725 Merge pull request #2594 from Corosauce/master + Fix for patch targetting the wrong field to change for failed pathfinding penalty + - v8.99.724 Fix for patch targetting the wrong field to change for failed pathfinding penalty + - v8.99.723 Merge pull request #2589 from diesieben07/player_riding_fix + Fix broken patch in EntityPlayer.updateRidden + - v8.99.722 Merge pull request #2586 from williewillus/fixcrops + [1.9] Fix BlockCrops looking for wrong AGE property for subclasses. Fix #2555 + - v8.99.721 Merge pull request #2585 from iTitus/patch-1 + Fix the EntityPlayer patch + - v8.99.720 Merge pull request #2584 from Corosauce/1.9 + Fix for patch targetting the wrong field to change for failed pathfinding penalty + - v8.99.719 Fix bucket test + - v8.99.718 Merge branch 'master' into 1.9 + - v8.99.717 Ignore classes directory + - v8.99.716 Fix double dropping of items. Closes #2549 + - v8.99.715 Pass exceptions thrown in mod event buses back to FML to handle apropriately + - v8.99.714 Fix KeyInputEvent only being fired if Keyboard.getEventKeyState() is false. + It used to be called for both key-up and key-down states prior to 1.9, so I assume Vanilla's changes to F3 behavior broke the patch. + - v8.99.713 Fix broken patch in EntityPlayer.updateRidden + - v8.99.712 Fix #2555 + - v8.99.711 Fix the EntityPlayer patch + In 1.8.9 the call goes to getDisplayNameString() so that any changes from the PlayerEvent.NameFormat event are being take into account. + In this patch the call goes to func_70005_c_() which is the getter for the GameProfile name. + I changed it back. + Sorry if you do not want to accept it because it is a one-liner. + - v8.99.710 Fix for patch targetting the wrong field to change for failed pathfinding penalty + - v8.99.709 Fixed sprite not being passed to the quad builder for custom models. + - v8.99.708 Fixed outline shader rendering, closes #2560. + - v8.99.707 Fixed Block.doesSideBlockRendering, closes #2564. + - v8.99.706 Fixed invalid index calculation in BakedQuadRetextured. + - v8.99.705 Fix AT lines. + - v8.99.704 Fixed quads that don't need diffuse lighting getting it anyway. + - v8.99.703 Merge pull request #2559 from Adubbz/master + BlockColors and ItemColors no longer assume non-Vanilla id constancy. Added a getter for ItemColors. + - v8.99.702 Fixed MultiLayerModel not getting correct submodels; Unified the gui lighting of normal and custom models - diffuse lighting is now done in the pipeline, no need for IColoredBakedQuad anymore. + - v8.99.701 BlockColors and ItemColors no longer assume non-Vanilla id constancy. Added a getter for ItemColors. + - v8.99.700 Fixed NPE when sneak using a item. + - v8.99.699 Fixed Sand not falling. + - v8.99.698 Fixed onUseStop being called twice {Bows firing twice} + - v8.99.697 Fix vanilla bug where bows consumed tipped arrows in creative. + - v8.99.696 Remove our entity position fixer. Vanilla fixed the bug in 1.9. + - v8.99.695 Javadocs, small cleanup. + - v8.99.694 Fixed progress reporting for model loading. + - v8.99.693 Removed imports in patches. + - v8.99.692 Fixed EffectRenderer patch, closes #2547. + - v8.99.691 Fixed incorrect culling of mod TESRs. + - v8.99.690 Fixed incorrect rotations for items in the left hand. Closes #2548. + - v8.99.689 Fixed model error reporting, fixed model errors in test mods that shouldn't happen, fixed custom texture loading, made more things private/final. + - v8.99.688 Merge pull request #2544 from Vazkii/patch-1 + 1.9: Fixed registering armor materials through EnumHelper exploding + - v8.99.687 1.9: Fixed registering armor materials through EnumHelper exploding + 1.9 ArmorMaterial now requires a SoundEvent for the equip sound. + - v8.99.686 Fixed breaking of tall grass. It now uses fortune. Expanded grass seed hooks to allow Fortune. Potentially removing in future in favor of LootTables. + - v8.99.685 Fix digging blocks in survival. + - v8.99.684 PlayerManager updated. + - v8.99.683 Delete mcp patches. + - v8.99.682 We are based on 1.9 not 1.8.9 :D + - v8.99.681 Update patches for fixed inner class suffeling in srg files. + - v8.99.680 Big model loader refactoring: simplified a lot of things, broke some error reporting. Still generally works. + - v8.99.679 First version of updated of ModelLoader, mostly works. + - v8.99.678 Fixed some errors in forge.exc + - v8.99.677 Updated to latest mappings. Exc is broken, some anonymous classes didn't map to srg names. + - v8.99.676 Merge pull request #2539 from bonii-xx/bugfix + Fix CombinedInvWrapper accessing incorrect slots + - v8.99.675 Fix CombinedInvWrapper accessing incorrect slots + Closes #2533 + - v8.99.674 Switch to srg patches + - v8.99.673 Fixed armor rendering + - v8.99.672 Fixed incorrect rendering state caused by transparent rendering pass for entities. + - v8.99.671 Fixed emply hand not rendering in first person. + - v8.99.670 Capture Biome Registry within FML + - v8.99.669 Fixed (hopefully) perspective transformations for custom models too. + - v8.99.668 Fix items rendering too low in first person. + - v8.99.667 Move the patch into the fml override handler, for less patch + - v8.99.666 Fix race condition between server ticks and the netlogin code handshaking for FML + - v8.99.665 Fix perspective transformations for left-handed items, disable ModelAnimationDebug until model loading is fixed. + - v8.99.664 Fixed position being shifted before being sent to shouldSideBeRendered. + - v8.99.663 Bump version info. Rather important. + - v8.99.662 Added bypass functions to Defaulted registry, DO NOT USE THIS MODDERS FORGE INTERNAL ONLY. + And some other fixups for running. + - v8.99.661 Interaction hooks need to be re-added but compiles {Doesn't run} + - v8.99.660 Fix up PlayerSP for the AT + - v8.99.659 Another AT, for the player + - v8.99.658 Finish world, chunkloading should work again? + - v8.99.657 Potion cleanup. Moar fixes! + - v8.99.656 Remove more chestgenhooks stuff. Clean up some more ATs + - v8.99.655 More fixups, removing chestgenstuff aggressively. Use loot tables. Any missing ones WILL be added by Mojang. + - v8.99.654 Another compilation fix + More patch tweaks for compilation errors. onItemUseTick takes an entity now, cos skellies use stuff too + - v8.99.653 Some more forge code fixes + - v8.99.652 Most of ItemInWorldManager reject, various small error fixes. + - v8.99.651 World + - v8.99.650 10 more rejects down. + 98 errors 6 rejects left. + - v8.99.649 More patch work, client patches. + - v8.99.648 Allow finite fluids to be drained correctly + - v8.99.647 Few more compile fixups + - v8.99.646 Command fixups + - v8.99.645 Remove two patches that aren't needed anymore + - v8.99.644 Some client handler cleanup + - v8.99.643 Fix up import in Potion + - v8.99.642 Some more FML related fixups + - v8.99.641 Some fixups for FML, and use the FML registry for potions + - v8.99.640 NetworkDispatcher/FMLProxyPacket 41 more errors cleaned. + - v8.99.639 Temporary hack to fix MCP mappings for param names we are using that is causing compile errors. + - v8.99.638 Fishing is now a loot table no more need for FishingHooks. {LootTables still need to be evaludated if they need extra hooks, but thats later} Goodbye 44 compile errors! + - v8.99.637 Fixed errrors in Fluids package. TODO: Make BlockLiquid implement IFluidBlock and REMOVE FluidContainerRegsitry. Everything *should* be able to use IFluidContainer directly. + - v8.99.636 Made OBJModel.java compile. + - v8.99.635 Model UV lock handling from the state to the model, fixed most compile errors in ModelLoader, disabled it (and ModelBakeEvent) until it's functional, fixed some errors in ForgeHooksClient. + - v8.99.634 Removed generics from IModel subinterfaces, add ed ModelProcessingHelper instead. + - v8.99.633 WorldServer: NOTE - ChestGenHooks has NOT been updated in accordance with plans for removing it + GuiStats + Fixup deletion of egg handling in entity registry? + - v8.99.632 ServerPinger + PlayerList + - v8.99.631 ModelBox, PositionTextureVertex, TexturedQuad. Does anyone really use those on the server? + - v8.99.630 LanguageManager + NetHandlerPlayClient + - v8.99.629 Fixed B3D loader, fixed some obvious errors in ModelLoader. + - v8.99.628 Fix various errors in text mods. + - v8.99.627 World Patches work. + - v8.99.626 More work on misc things. + - v8.99.625 Delete reject files i missed + - v8.99.624 Merge pull request #2521 from Adubbz/master + Updated BiomeManager to 1.9 + - v8.99.623 Updated BiomeManager to 1.9 + - v8.99.622 Merge pull request #2520 from Adubbz/master + Updated the biome dictionary to support 1.9 + - v8.99.621 Enchantments, some world, Biomes, bucks, world/gen/features. + - v8.99.620 Updated the biome dictionary + Squashed commits: + [4064de6] Updated the biome dictionary + - v8.99.619 DedicatedServer + IntegratedServer + - v8.99.618 Chunk + - v8.99.617 Updated raw types in ExtendedBlockState, fixed some ATs, updated some things that needed updating in model classes. + - v8.99.616 removed Item.getModel, functionality is now achieveable via ItemOverrides. + - v8.99.615 GuiOverlayDebug, ItemModelMesher, RenderManager, Stitcher fixed + minor fixes in forge gui classes. + - v8.99.614 GuiCreateWorld, GuiSlot, GuiUtilRenderComponents, GuiContainerCreative + - v8.99.613 Small renames before bed. + - v8.99.612 Merge pull request #2514 from CovertJaguar/1.9 + Fix broken patches for EntityMinecart + - v8.99.611 Items done, <1000 errors whoot! + - v8.99.610 Fix broken patches for EntityMinecart + - v8.99.609 Some entity patches. + - v8.99.608 Fixed most errors in the model stuff, except for ModelLoader and b3d and obj getQuads/handleBlockState methods. + - v8.99.607 FontRenderer + - v8.99.606 tabs -> spaces. + - v8.99.605 EntityRenderer, most of RenderGlobal, minor fix to LayerBipedArmor. + - v8.99.604 RendererLivingEntity, RenderEntityItem, RenderItem, RenderManager, LayerArmorBase; Item.getModel + ISmartItemModel are now inside ItemOverrideList; fix class rename in TESR patch. + - v8.99.603 A bunch of rendering rejects updated. + - v8.99.602 Updated various block model patches. + - v8.99.601 Some import renames and compile error fixes, killed ~800. + - v8.99.600 util, tileentity, stats, realms. Potions got an overhaul and out registry will need to be adapted. + - v8.99.599 net.minecraft.block.* patches + - v8.99.598 First few patches applied + - v8.99.597 Add rejects with mcp names for application to main codebase. Let's roll? + - v8.99.596 Add in mcp named patches and use them. Initial 1.9 setup. + - v8.99.595 Don't ignore rejects + - v8.99.594 Merge pull request #2476 from Abastro/fovfixes + Added Event: EntityViewRenderEvent#FOVModifier + - v8.99.593 Merge pull request #2500 from me4502/master + Added local click position to PlayerInteractEvent. Fixes #2482 + - v8.99.592 Added local click position to PlayerInteractEvent. + - v8.99.591 Added EntityViewRenderEvent#FOVModifier + Enables mods to modify raw FOV directly. + Avoids modifier limit from FOVUpdateEvent. + Aware of blocks which are needed for fov change related with materials. + - v8.99.590 Fixed dummy blocks not being removed from registry on dedicated server correctly. Closes #2487 + Also added some more debug logs! + - v8.99.589 Merge pull request #2497 from bonii-xx/universal_bucket + Fix WordServer.canCreatureTypeSpawnHere not using Forge Events. + - v8.99.588 Fix WordServer.canCreatureTypeSpawnHere not using Forge Events. + Followup of #2496 + - v8.99.587 Merge pull request #2495 from elix-x/master + Increased actual maximum fuel burn time + - v8.99.586 Merge pull request #2496 from bonii-xx/universal_bucket + Fix WorldEvent.PotentialSpawns Event passing the list instance of the… + - v8.99.585 Fix WorldEvent.PotentialSpawns Event passing the list instance of the ChunkProvider to users + - v8.99.584 Increased actual maximum fuel burn time + Increased actual maximum fuel burn time from 32767 to 2147483647. + Backwards compatible. + - v8.99.583 ModelLoader: added verbose error logging showing items/blockstates associated with model locations; removed redundant cast leftover from ungenerified code; fixed up a couple of warnings. + - v8.99.582 Fix race condition when using indexed codec in a LAN server. Fixes spurious crash when LAN server is running. + - v8.99.581 Log when it's likely the indexedcodec is gonna fail, because of LAN server derps likely. Try and give some context for debuggers. + - v8.99.580 Merge pull request #2488 from bonii-xx/universal_bucket + Fix universal bucket logging an exception + - v8.99.579 Fix universal bucket logging an exception + - v8.99.578 Merge pull request #2485 from AlgorithmX2/world_getLightOpacity + Test getLightOpacity(world,pos) in World as well as the chunk. + - v8.99.577 Test getLightOpacity(world,pos) in World as well as the chunk. + - v8.99.576 Merge pull request #2443 from AlgorithmX2/cap_pickup_entityitem + Preserve ItemStack Caps when picking Items up. + - v8.99.575 Preserve ItemStack Caps when picking Items up. + - v8.99.574 Merge pull request #2429 from AlgorithmX2/in_material_hooks + In Material Hooks - For Swimming, Overlays, Boats, and Fishing. + - v8.99.573 In material Liquid Hooks. + - v8.99.572 Merge pull request #2481 from diesieben07/potion-draw-fix + Fix Potion.shouldRenderInvText + - v8.99.571 Fix Potion.shouldRenderInvText + - v8.99.570 Merge pull request #2478 from AlgorithmX2/pre_getLightOpacity + Fix bug with getLightOpacity based on TileEntities, + - v8.99.569 Fix bug with getLightOpacity based on TileEntities, + Capture getLightOpacity prior to removing the tile entity. + - v8.99.568 Fix loading of world ID maps for worlds without dummy data. Closes #2477 + - v8.99.567 Merge pull request #2474 from bonii-xx/universal_bucket + Fix customized bucket names not getting translated correctly + - v8.99.566 Added default levels for fluid extended properties in fluid model. + - v8.99.565 Fix customized bucket names not getting translated correctly + - v8.99.564 Merge pull request #2333 from bonii-xx/universal_bucket + Add an universal bucket. + - v8.99.563 Add universal bucket + - v8.99.562 Fix chat formatting not surviving line wraps in chat messages. + - v8.99.561 Merge pull request #2470 from diesieben07/shader-fix + Fix the entity shader hook + - v8.99.560 Fix the entity shader hook + - v8.99.559 Merge pull request #2467 from iLexiconn/master + Added hook to add entity spectator shader + - v8.99.558 Merge pull request #2468 from nallar/master + Workaround JDK-8087309: Constant folding "static final boolean" is incomplete + - v8.99.557 Workaround JDK-8087309: Constant folding "static final boolean" in boolean expressions is incomplete + - v8.99.556 Added hook to add entity spectator shader + - v8.99.555 Protect BlockSnapshot and Chunk.getTileEntity from mutible BlockPos instances. Closes #2438 + - v8.99.554 Fixed Block.onNeighborChange not being called for all axises. Closes #2428 + - v8.99.553 Add missing classes to CrashReport preloading. Closes #2421 + - v8.99.552 Fixed invalid item being passed to gatherCapabilities when itemstacks changed item. Closes #2445 + - v8.99.551 Fixed implementation of RenderEntityItem.shouldSpreadItems. Closes #2448 + - v8.99.550 Fixed vanilla bug where network clients would see incorrect break progress on blocks. Closes #2462 + - v8.99.549 Fixed Block/Item.setRegistryName printing a incorrect warning when used. Closes #2398 + - v8.99.548 Fixed Entity.shouldRiderSit modifying game logic and not just rendering. Closes #2402 + - v8.99.547 Fixed invalid parameters being sent to LivingSpawnEvent.CheckSpawn. Closes #2453 + - v8.99.546 Potential fix for NPE when using an item to open a slotless inventory. Closes #1354 + - v8.99.545 Fix custom model loader reload hook not firing during registration. + - v8.99.544 Fix incorrectly updated patch to ChunkCache. Related to #2451. + - v8.99.543 Fix multiple registrations of reloading hooks in custom model loaders. + - v8.99.542 Remove Mojang logger spam in EntityItem. + - v8.99.541 Fix jar signer not applying to universal packed in the installer. + - v8.99.540 Fix TRSRTransformation.toItemTransform. Closes #2425. + - v8.99.539 Merge pull request #2437 from pau101/master + Fix #2321 + - v8.99.538 Fix #2321 + - v8.99.537 Merge pull request #2423 from Mumfrey/fix/jdt + Fix ASM SignatureReader choking on invalid lambda local var signatures emitted by JDT + - v8.99.536 Revert binary-incompatible changes in models. + - v8.99.535 Fix droppers not dropping. + - v8.99.534 One day I will learn to include all required classes in the commit. + - v8.99.533 Added "gui3d" and "smooth_lighting" options to the forge blockstate. Implemented them for vanilla and B3D models. Added generic types to IModel subinterfaces, to simplify chaining. + - v8.99.532 Merge pull request #2434 from matthewprenger/logcommandexceptions + Log unknown exceptions in commands. Resolves #2433 + - v8.99.531 Log unknown exceptions in commands. Resolves #2433 + - v8.99.530 Fix ASM SignatureReader choking on lambda signatures generated by JDT + - v8.99.529 Fixed incorrect patch to GenLayer, causing large vanilla biomes to not work properly. + - v8.99.528 Provide original armor model in the custom armor model hook. + - v8.99.527 Fixed small bug in item extraction code. + - v8.99.526 Fix NoSuchElementException in ModelBlockAnimation caused by empty event list. + - v8.99.525 Bump version in prep for new Recomended Build. + - v8.99.524 Loosen TileEntity's default hasCapability implementation. Modders should specifically opt in. + - v8.99.523 Merge pull request #2336 from VikeStep/master + [1.8.9] Add EntityTravelToDimensionEvent + - v8.99.522 Fixed minor race condition between mouse clicks and TESR in the animation example. + - v8.99.521 Add EntityTravelToDimensionEvent + Resolve Merge Conflict + Move event call inside conditional + - v8.99.520 Sometimes I forget how much trivial things are missing from Java 6. + - v8.99.519 Merge pull request #2331 from RainWarrior/model-animation + Model animation system + - v8.99.518 Model animation system. + Main things of interest: + * IAnimationStateMachine - state machine for animations; can load + from json. + * AnimationTESR - automatic TESR for animated models. + * AnimationModelBase - same for entities. + * ITimeValue - time-varying value, used to control animation + parameters from code. + * TESRs can now be batched - look at TESR.renderTileEntityFast + + TE.hasFastRenderer. + * RegionRenderCache is not accessible to TESRs and other client-side + logic - MinecraftForgeClient.getRegionRenderCache. + - v8.99.517 Fix J6 compile error in IItemHandler PR. + - v8.99.516 Merge pull request #2401 from ShetiPhian/Fix-isBeaconBase-BlockPos + Fixed: the BlockPos passed to isBeaconBase + - v8.99.515 Merge pull request #2385 from rwtema/master + Add IItemHandler capability + - v8.99.514 Add IItemHandler capability + Add the actual patches that I forgot. + Add simple implementations of IStorage and the factory methods. + Add ItemStackHandler. A simple IItemHandler implementaton. + return nulls, not throw nulls. + Move the vanilla wrappers to a separate class for now. + Minor clean ups of VanillaWrapper code. + Inline static methods. + Add comments. + Minor cleanup of code. + Remove redundant size field and add a validate slot index method. + Minor formatting issues. + Break early If stacksize to insert is 0. + Remove setByte() methods. + Throw exception if IItemHandler can't be modifyed in NBT loading. + Replace event handler with patches + Add capability to mine cart inventory entities. + Change formatting and registration of capability. + Make InventoryPlayer implements IItemHandler because why not. Also added a field to allow mods that add additional player inventory space to publicly expose them. + Reduce patch sizes + Lazy initialization of the item handler for vanilla tiles. + Minor formatting changes. + Create a single vanilla chest item handler that will merge with adjacent chests when detected. Added hooks to reset the cached adjacent value when a block update is detected and when a chunk loads. + Revert "Make InventoryPlayer implements IItemHandler because why not. Also added a field to allow mods that add additional player inventory space to publicly expose them." + This reverts commit 306d4a37fd0e8c8a0754411c013b750dfe8e2c87. + Fix furnace derp + Replace double chest code with a simpler method. + Vanilla wrappers implement IItemHandlerModifiable (since they are modifiable) + Minor code cleanups + Add an onContentsChanged() and onLoad() callback methods.to the default implementation. + Add slot as a parameter in the callback method. + Change IItemHandlerModifiable.setStackInSlot() to void, and added a note about not being intended for cross-mod use. + Improve ItemStackHandler handling of errored NBT. + Make the stacks array protected. + Fix a lot of derps in SlotItemHandler. + Fix derp in ItemStackHandler + Clarify comments on IItemHandler + ItemStackHandler no longer caches the stack array in local variable. + Clean up the Chests code to make intentions clearer + Vanilla hoppers have their cooldown activated when an item is inserted. Made this behavior part of an item handler (rather than the insertion code) + Fix mistake in ItemStackHandler + More documentation of potential edge cases in getStackInSlot() + Make limit checking more resiliant. + - v8.99.513 Fixed: BlockPos passed to isBeaconBase + - v8.99.512 Merge pull request #2378 from blay09/bugfix/slotdrop + Fix items being dropped through slots outside GUI boundaries + - v8.99.511 Merge pull request #2399 from asiekierka/fix-2388 + Fixed ItemStack.splitStack not preserving capabilities, Closes #2388 + - v8.99.510 Restore OreDictionary.getOres(String, boolean) and doeOreNameExist(String) functions that went MIA in git merge issue. + Original Commit: https://github.com/MinecraftForge/MinecraftForge/commit/cd3bbfb02c9fcd4ce4bbf00f460dfdd6a386d107 + - v8.99.509 Fix invalid ServerHangWatchdog patch causing it to not apply. + - v8.99.508 Fix #2388 + - v8.99.507 Merge pull request #2396 from Minecrell/patch-3 + Strip console formatting codes for Vanilla log file + - v8.99.506 Merge pull request #2394 from iLexiconn/master + Fixed makeItemStack ignoring stackSize + - v8.99.505 Strip console formatting codes for Vanilla log file + - v8.99.504 Fixed makeItemStack ignoring stackSize + Fixes #2376 + - v8.99.503 Fixed error detection login in ModelLoader, reduced the maximum number of printed stack traces to 5 per domain. + - v8.99.502 Fix forge logging not working correctly in ForgeDev. + - v8.99.501 Fix Deobfusication transformer throwing verification errores in Eclipse development environments. + - v8.99.500 Correctly handle error caused by missing/malformed bucket model definition file. + - v8.99.499 Call deserialze on capabilities in ItemStack.setItem. Closes #2384 + - v8.99.498 Fix ItemStacks not getting the parent capability provider from items. Closes #2383 + - v8.99.497 Merge pull request #2367 from kashike/feature/quiet-watchdog + Skip hang detection on first run of the server hang watchdog + - v8.99.496 Merge pull request #2358 from boq/bedless + Allow sleeping without bed block under player + - v8.99.495 Allow sleeping without bed + - v8.99.494 Fixed missing model error reporting, made block and item variants sort before loading, to make the splash screen info more useful. + - v8.99.493 Fix spruce not growing properly + - v8.99.492 Fixed problem with LAN connections seeing the original ProxyPacket and consuming the first byte. Closes #2373 + - v8.99.491 Fix shouldRefresh not to be so over-eager about modded TEs. Should fix Packet21 causing a TE reset. + - v8.99.490 Fix items being dropped out of a GuiContainer when dealing with a slot outside of the xSize/ySize boundaries. + - v8.99.489 Clone FML packet indexes if channel is not open. Fixes potential threading issue. + - v8.99.488 Merge pull request #2375 from bonii-xx/dynbucket + Default bucket model is empty, allow bucket model without fluid. + - v8.99.487 Default bucket model is empty, allow bucket model without fluid. + This allows capsules, cans, bottles,... to use the same item model for their item variant. Also it's makes much more sense. + - v8.99.486 Merge pull request #2370 from mezz/screenBackground + Add DrawScreenBackgroundEvent + - v8.99.485 Add GuiScreenEvent.BackgroundDrawnEvent + - v8.99.484 Fix problem which meant runtime deobf to MCP names wasn't working. SRG named mods located in the mods dir of a dev + environment will now load normally. + - v8.99.483 Skip hang detection on first run of the server hang watchdog + - v8.99.482 New Capability system allowing for more manageable world object features. + When combined with @Optional this should address all issues of soft dependancy on mods/apis. + This also addresses the issue of dynamic functionality in TileEntities/Entities. + Current capability providers: TileEntity, Entity, ItemStack + Also added INBTSerializeable, a generic interface for game objects that can be written to/from NBT tags. + Vanilla capabilities will be coming soon, mostly on request and review. + So start requesting capabiliteis on vanilla/Forge features. + - v8.99.481 Fixed banners not droping the correct item when harvested using modded mechanics. Closes #2258 + - v8.99.480 Fix jline server console not showing colored text. Closes #2334 + - v8.99.479 Fixed GuiWrongMinecraft having wrong Log file name. Closes #2348 + - v8.99.478 Made WrongMinecraftVersionException and ModSortingException a bit easier to read in log files. Closes: #2345 + - v8.99.477 Remove dead code in JarDiscoverer. Closes #2346 + - v8.99.476 Catch GROUND item transform type with the forge hook too. + - v8.99.475 Implemented face culling for item models, improves performance slightly. Closes #2326 + - v8.99.474 Merge pull request #2355 from williewillus/fixentityitemdupe + Fix bug with /give command and items with larger than default lifespans + - v8.99.473 Fix visual effect entity persisting longer than it should + Fix derp + - v8.99.472 Fixed issue with WorldServer.getTileEntities when being called with ranges that overlap chunks oddly. Closes #2350 + - v8.99.471 Made block model loading bar more robust, and fixed the count. + - v8.99.470 Added progress bar for the ModelLoader. + - v8.99.469 Derp. + - v8.99.468 Model loader improvements: adding custom data/textures to models that don't need them doesn't cause a error now, since it's common to put those in the defaults section of the blockstate json; you can get IModel associated with the variant now - using ModelLoaderRegistry.getModel; MultiLayerModel should now respect transformations applied to it, and respect part transformations. + - v8.99.467 STFU I know how to code. *shouts* get off my lawn! + - v8.99.466 Make the parent dir tree for the dep extractor + - v8.99.465 Changed default implementation of Block.getExtendedState. Closes #2309. + - v8.99.464 Java6 + Eclipse + Gradle strike again. + - v8.99.463 Fixed implementation if IRetexturableModel in ItemLayerModel. Closes #2244. + - v8.99.462 Don't crash on exception during loading of item variants from blockstate jsons. + - v8.99.461 Fixed perspective transformation handling for fluid models, changed inventory fluid model to use unrotated still texture. + - v8.99.460 Fixed invalid flow vector caching of still fluids. + - v8.99.459 Fixed random offset not working properly for flatly-lit models. + - v8.99.458 Explicitly close the file. + - v8.99.457 Add a simple ContainedDep mechanic- mods can contain other mods or libs, and can specify them using a manifest tag: "ContainedDeps". + This is a space separated (manifest standard) list of jar files that are to be extracted into the version specific directory. + There's also a special system property "fml.skipContainedDeps" that will allow for runtime skipping of extraction of contained deps (a comma separated list, based on the file name). + - v8.99.456 Added new get/setRegistryName functions to Item and Block. + And helper functions in GameRegistry to allow for registering using those names automatically. + This is to simplify registration and get rid of the horrible hacks users are doing now with 'unlocalised names'. + - v8.99.455 Move substitution activation after id loading. This should fix the problem of null for existing object. + - v8.99.454 SidedProxy now has sensible default values - nested ClientProxy and ServerProxy classes. + - v8.99.453 Merge pull request #2332 from killjoy1221/master + Add links for messages and other commands + - v8.99.452 Add links for messages and other commands + - v8.99.451 Reverted Render registration changes due to them working. + - v8.99.450 Nobody is left behind. + - v8.99.449 Fixed RenderingRegistry not working. Closes #2312. + - v8.99.448 Fix that the dummy registry entries don't allow clients connecting to servers. Also fix that it repeatedly nags about missing stuff in the world. + - v8.99.447 Fix boss health bar rendering when debug overlay is enabled. Closes #2328 + - v8.99.446 Swap Mod and Realms button to fix new realms 'notification' icon. + - v8.99.445 Fix J6 compile issue with ModelFluid. + - v8.99.444 Allow for default 1.8.8 mods to be loaded. Should be SRG compatible. + - v8.99.443 Restored transparency to the Forge logo. + - v8.99.442 Updated the forge logo to a higher-quality GIF file. Closes #2276. + - v8.99.441 Fixed wrong import. + - v8.99.440 Fixed broken leaky caching of OBJ models. + - v8.99.439 Caching of fluid models. Fixes #2145. + - v8.99.438 TESRs registering in preinit don't break pistons anymore. Fixes #2298. + - v8.99.437 Fixed color disabling not working for forge pipeline. Closes #2286. + - v8.99.436 1.8.9 update + - v8.99.435 Merge remote-tracking branch 'origin/1.8.8' + - v8.99.434 Merge pull request #2322 from bonii-xx/dynbucket + Fix bucket replacement not loading the bucket model by itself if repl… + - v8.99.433 Fix bucket replacement not loading the bucket model by itself if replacing buckets. + This happens when no other mod that uses the bucket model is present. + Also added a simple method for registering the bucket model, should give + modders an idea on how to use the general model. + - v8.99.432 Merge pull request #2320 from bonii-xx/slime + Add a hook for custom particle spawning for slimes + - v8.99.431 Add a hook for custom particle spawning for slimes + - v8.99.430 Merge pull request #2318 from diesieben07/entity-egg + Allow forge-type spawn-eggs to spawn child entities when clicking EntityAgeable + - v8.99.429 Allow forge-type spawn-eggs to spawn child entities when clicking EntityAgeable + - v8.99.428 Fix Button/Torch/Lever placement on stairs and slabs. Closes #2291 + - v8.99.427 Fixed random block position offset not applying correctly. + - v8.99.426 Added an ability to register custom item variants, not ending with "#inventory". Should allow grouping multiple item models into 1 blockstate json. + - v8.99.425 Try and make sure active substitutions are immediately available in the block to item map. + - v8.99.424 Actually use the delegate for the itemblock + - v8.99.423 Capture ItemBlock remaps. + - v8.99.422 Try and fix registry NPE when substitution is active. + - v8.99.421 Blocks are no longer erased from the registry if the mod isn't present. This means that modded blocks can potentially retain their IDs + even if they are temporarily not present in the game. Currently TileEntity data associated with the block is erased. + - v8.99.420 Fix up persistent substitution. Should close #2259 + - v8.99.419 Fix the channel handler naming. It now uses the standard netty namer for it, by careful use of cunning reflection. + - v8.99.418 Fixed vanilla bug related to spawning entities on top of fences. Closes #2303 + - v8.99.417 Fixed registry issues that prevented connecting to 1.8 Forge servers. + More precisely: Servers with missing registries default back to frozen version. + Throw descriptive error if we do not have any information. + - v8.99.416 Merge pull request #2282 from bonii-xx/dynbucket + Add a dynamic bucket model that displays the animated liquid contained + - v8.99.415 Add a dynamic bucket model that displays the animated liquid contained + Has a config option (default off) that replaces the vanilla buckets with the forge bucket model + New original bucket textures from mr_hazard + - v8.99.414 Fixed NPE caused by accessing undefined layer in MultiLayerModel. + - v8.99.413 Merge pull request #2293 from Lunatrius/fix/client-command-autocomplete + Fix client side command auto-complete not working correctly. + - v8.99.412 Fix client side commands adding parts of the color codes on autocomplete (prefix "7" and suffix "r"). + - v8.99.411 Fix dependency resolution for models with custom data/textures. + - v8.99.410 LightUtil.pack and .unpack now work correctly with unpacked arrays of size <4. + - v8.99.409 Delayed quad list resolution in MultiModel, fixes NPE in MultiLayerModel. + - v8.99.408 Forge pipeline will now take original model lightmap into account, if present. + - v8.99.407 Fixed java6 errors in previous commit. + - v8.99.406 IModel can now depend on a variant definition (ModelResourceLocation); added MultiLayerModel - simple model that'll render correctly in multiple layers + example of using it. + - v8.99.405 Preparations for the Animation system. + Changes to the Model API - IModelState now works with Optional. Handling of parts of the model is not optional, and coordinate space/result interpretation is up to the caller. IModel doesn't extend IModelPart by default anymore; MapModelState uses composition to achieve previous functionality, IModelPart implementations are disjoint now. Updated perspective handing to the new API, removed IPerspectiveState (MapModelState is now the same thing). Perspective transforms for the default fluid model. + - v8.99.404 Fix enchanting applying the same enchantment multiple times. Closes #2273 + - v8.99.403 Merge pull request #2272 from AlgorithmX2/addLandingEffects + Added addLandingEffects allowing mods to override landing particles + - v8.99.402 Merge pull request #2270 from AlgorithmX2/getHighlightTip + Add getHighlightTip allowing a item to override its displayed renderToolHightlight + - v8.99.401 Added addLandingEffects allowing mods to override landing particles, for blocks that require world information to determine textures. + - v8.99.400 A test for issue #1848. Please try this with any mods you can @ 1.8.8, and see if you still get log spam of any kind (not just the + log message from the issue either). + - v8.99.399 Add getHighlightTip allowing a item to override its displayed renderToolHightlight. + - v8.99.398 Merge pull request #2268 from minzmann/master + [1.8.8] Minor Fixes to PotionEffect.java.patch + - v8.99.397 Fix derpage when loading a 1.8 world, with persistent state being entirely ignored in that case. + - v8.99.396 Update PotionEffect.java.patch + - v8.99.395 Merge pull request #2239 from bonii-xx/potionhiding + Add shouldRender() to Potions that allows to hide them completely in … + - v8.99.394 Merge pull request #2228 from Minecrell/patch-2 + Fix some issues with the console command completion + - v8.99.393 Use ItemStack.hasEffect. closes #2230 + - v8.99.392 Merge pull request #2233 from liachmodded/mcl-typo + Fix a typo in jar detection + - v8.99.391 Merge pull request #2248 from AlgorithmX2/isOpaqueFace + Added doesSideBlockRendering to provide finer grain face culling. + - v8.99.390 Added doesSideBlockRendering to provide finer grain face culling. + Implemented for BlockStairs and BlockSlab. + - v8.99.389 Fix wrong EventType passed for Emerald ore-gen. + - v8.99.388 Deprecate int IDs in FluidRegistry. Modders should only ever use the String name. Also add a 'friendly' exception when attempting to get an ID for a unregistered fluid. Closes #1374 + - v8.99.387 Add EMERALD and SILVERFISH to GenerateMinable event. Closes #1158 + - v8.99.386 Fixed ModList GUI rendering incorrectly. Closes #2254 + - v8.99.385 Merge pull request #2253 from simon-i1-h/patch-1 + [1.8.8] Fixed edge case where position dependent light would not update. + - v8.99.384 Fixed that oldLight is not being used. + - v8.99.383 Workaround for https://github.com/google/guava/issues/738 + - v8.99.382 Fixed orientations of generated item faces. Fixes #2215. + - v8.99.381 Fixed colored leather armor, and custom armor textures. + - v8.99.380 Remove MCP reference patches. + - v8.99.379 Add shouldRender() to Potions that allows to hide them completely in the inventory + - v8.99.378 Improve the console command completer + - Fix space after command getting removed when completing a + subcommand together with the command prefix + - Add support for completing without input (shows command list) + - Sort command completion results + - Fix console spamming command prefixes after closing the input stream + - v8.99.377 Add a flag to the modidremapping event. If the remapevent is because the registry is refreezing, it'll be true. + - v8.99.376 Fix typo in `guava` + - v8.99.375 Clean up chunk patch. + - v8.99.374 Merge pull request #2231 from techbrew-mc/patch-1 + Initialize sources list + - v8.99.373 Initialize sources list + Fixes crash NPE thrown by addFile() + - v8.99.372 Most requested feature of all time? TileEntity init method called after it's ready to roll. remove all the if (firstTicks) + - v8.99.371 Merge branch 'Emberwalker-lang-adapter-fix' into 1.8.8 + Closes #1898 + - v8.99.370 Fix language adapter loading. + The language adapter is now properly picked up after the mod is loaded + on the classpath, fixing the ClassNotFoundException occurring before. + Also fixed some minor formatting and made it throw a full + RuntimeException on failure. + Fix up some formatting + - v8.99.369 Be noisy when API is in a coremod. It'll never work and modders should realize that fact. + - v8.99.368 Merge branch 'mezz-potionIsBadEffect2' into 1.8.8 + - v8.99.367 Merge branch 'potionIsBadEffect2' of https://github.com/mezz/MinecraftForge into mezz-potionIsBadEffect2 + - v8.99.366 Merge branch 'kashike-fix/secman' into 1.8.8 + - v8.99.365 Merge branch 'fix/secman' of https://github.com/kashike/MinecraftForge into kashike-fix/secman + - v8.99.364 Allow entity selectors to select "." in entity names. Closes #2125 + - v8.99.363 Merge branch 'Minecrell-jline' into 1.8.8 + - v8.99.362 A few fixes + - v8.99.361 Fixup Jline integration + - v8.99.360 Merge branch 'jline' of https://github.com/Minecrell/MinecraftForge into Minecrell-jline + - v8.99.359 Some tweaks - GameRegistry is modder facing API, so avoid having MC methods there. Fix a couple of registry bugs. + - v8.99.358 Merge branch 'PotionRegistry2' of https://github.com/bonii-xx/MinecraftForge into bonii-xx-PotionRegistry2 + - v8.99.357 Fix problem with spam from registry on loading a second world. Empty the staging. + - v8.99.356 Add a PotionRegistry to handle dynamic distribution and remapping of Potion IDs + - v8.99.355 Merge pull request #2209 from lumien231/MemoryWorldLeak1.8.8 + Fixed: Server not being stopped, causing Worlds to stay loaded + - v8.99.354 Fix up blockstate rebuild. Closes #2221. Also fix formatting. IDEA has differences. Solved now. + - v8.99.353 Add chunk loading protection to WorldSever.getTileEntitiesIn, may prevent orphanced chunks and a CME in EntityPlayerMP. Note: The 'max' parameters are NON-inclusive. + - v8.99.352 Giant registry fixup + - v8.99.351 Compiler warnings pass, undeprecated SplashProgress related stuff. + - v8.99.350 Removed IItemRenderer class, all functionality is possible with new rendering system. + - v8.99.349 Fixed Large mushrooms generating incorrectly. + - v8.99.348 Fixed placing blocks on snow layers with more then one layer. + - v8.99.347 Bump version for new Minecraft version. + - v8.99.346 Propogate AbortException. Closes #2206. Also fix tracing printstream when printStackTrace is called. + - v8.99.345 Fixed: The Integrated Server not being stopped when exiting a singleplayer world to the main menu + - v8.99.344 Add .exc for StatList patch + More tweaking + - v8.99.343 Fix up a couple of patches, affected by the recent update + - v8.99.342 Fix button and lever placement problem. Closes #2204 + - v8.99.341 Merge pull request #2205 from Illyohs/bugfix/mdk + [1.8.8] Remove trailing */ causing errors in the mdk build script + - v8.99.340 Remove trailing */ in the build.gradle + - v8.99.339 More cleanups, some documentation, a bunch of deprecations. + - v8.99.338 Cleaning up some derpy names + - v8.99.337 Clean up some very long dead code. Bukkit hasn't existed in a very long time now. IASM never worked, and I'm not about to implement it. + - v8.99.336 Deprecate it as well, because hey, it's redundant now. + - v8.99.335 ONE EVENT BUS TO RULE THEM ALL AND IN THE DARKNESS FIRE THEM! + - v8.99.334 Yeah, amount is NOT deprecated. + - v8.99.333 Fix MDK for 1.8.8 using FG2.1 snapshot + - v8.99.332 OMG! Documentation? WUT? I haz lost my mind. + Also, Functional interface for IMC. Senders can send a classname implementing Guava's function, and receivers + will be able to get that function, and do, well, whatever, really. Probably best for those callback type + scenarios, connecting up APIs and stuffs. + - v8.99.331 Cleanup Fluid deprecations stuff. + - v8.99.330 Update universal manifest for 1.8.8's json. + - v8.99.329 Update mappings to 20151122. + - v8.99.328 Merge branch 'master' into 1.8.8 + - v8.99.327 Merge remote-tracking branch 'origin/noci-1.8.8' into 1.8.8 + - v8.99.326 Fixed NPE is B3D loader caused by the missing vertex normal; updated the example chest model - it's now has 2 meshes; Updated ModelAnimationDebug - it now uses the new chest model, renders the base with the static world renderer, and only the lid with the TESR. + - v8.99.325 Fixed forge lighting working incorrectly outside 0x1000000 coordinates. + - v8.99.324 Removed face doubles from item models. + - v8.99.323 Fix holes in generated item models. + - v8.99.322 B3D loader: removed 2 redundand null checks, changed constructor args to final to fix (java6?) inner arg error. + - v8.99.321 Implemented interpolation of TRSR transformations; B3D: added interpolation capabilities to B3DState, animated TESR example in ModelAnimationTest (pure TESR right now, no separation inside the example model between the static and dynamic parts right now). + - v8.99.320 Fix derpy fir trees in the taiga. So many patches. See if we can find any more mistakes?! + - v8.99.319 Fix weird patch issue where the this FG commit: https://github.com/MinecraftForge/ForgeGradle/commit/2f0ca9921b961133689d29b807333241010a802d + breaks if the exact end of a line is a srgname. Not ideal, but should work. + - v8.99.318 Small tweak to the OUT/ERR logger - should skip the Throwable stuffs now. + - v8.99.317 Back to srgnames for patches. We should be starting to look OK now. + - v8.99.316 Fixed forge lighting working incorrectly outside 0x1000000 coordinates. + - v8.99.315 Use the 2.1 snapshot for FG + - v8.99.314 Re-add trove and vecmath. Mojang no longer ship them. + - v8.99.313 Fix a typesig that was broken + - v8.99.312 Add jline-based console with colors and tab-completion + - v8.99.311 Removed face doubles from item models. + - v8.99.310 Fix holes in generated item models. + - v8.99.309 Fix invalid position passed to isAir/getLight in World.playAmbientSound + - v8.99.308 Merge pull request #2196 from Choonster/master + BiomeManager: Fix off-by-one errors + - v8.99.307 Fix bold font rendering, Unicode is 2x pixel density of normal. + - v8.99.306 BiomeManager: Fix off-by-one errors + - v8.99.305 B3D loader: removed 2 redundand null checks, changed constructor args to final to fix (java6?) inner arg error. + - v8.99.304 Use the FMLSecurityManager checkPermission(Permission) method for context-based permission checks. Fixes #2067 + - v8.99.303 Enable the normal ModList GUI in game. Use GL_SCISSOR to support the transparent in-game GUI. + - v8.99.302 Moved client side Block.onBlockDestroyed to after Item.onBlockDestroyed to match server order. + - v8.99.301 Fix incorrect position passes to Block.getExplosionResistance from entities. + - v8.99.300 Implemented interpolation of TRSR transformations; B3D: added interpolation capabilities to B3DState, animated TESR example in ModelAnimationTest (pure TESR right now, no separation inside the example model between the static and dynamic parts right now). + - v8.99.299 This should be everything needed to separate blocks and items completely. + - v8.99.298 Merge branch 'master' into noci-1.8.8 + - v8.99.297 Merge pull request #2117 from lumien231/master + Fixes Client Login Issue when logging into a non existent dimension + - v8.99.296 Fix Client Login Issue when logging into a non existent dimension + - v8.99.295 Remove a suppression + - v8.99.294 ExtendedBlockState, Properties generic updates. + - v8.99.293 Some generic and other warning cleanups + - v8.99.292 Merge branch 'master' into noci-1.8.8 + - v8.99.291 Model stuff: updated to generics, fixed various warnings, added handling of new perspective types. + - v8.99.290 A few tweaks, things are starting to work now.. + - v8.99.289 All the patches done? Some code fixups.. It begins. + - v8.99.288 Fix a newly missing AT. Remove all CL_ references. OBFID is gone. + - v8.99.287 WorldGen rejects, lots of them. Couple of small fixes elsewhere. + - v8.99.286 Enchantment,EnchantmentHelper,EntityEnderman,EntityZombie,EntityVillager,FurnaceRecipes,RecipeFireworks,RecipeRepairItem,NetworkSystem,S00PacketServerInfo + PotionEffect,StatList,Session,WeightedRandomChestContent,Explosion,ExtendedBlockStorage,SaveHandler. + All NBT patches seem to have been merged upstream, so removing. The IntegratedServer and MinecraftServer pending queue changes also removed, as fixed upstream. + - v8.99.285 Bump version for Recomended Build. + - v8.99.284 Overlay patch fix: use the correct block position. + - v8.99.283 EntityRenderer, StringTranslate rejects fixed. + - v8.99.282 TextureMap, TextureManager and Stitcher rejects fixed. + - v8.99.281 Manually updated WorldChunkManager, Chunk and BiomeDecorator patches, removed imports. + - v8.99.280 ItemBlock, ItemBow, ItemMonsterPlacer, ItemReed, ItemSign rejects fixed. + - v8.99.279 PlayerManager, PlayerProfileCache, ServerConfigurationManager, NetHandlerHandshakeTCP rejects fixed; ItemInWorldManager patch error fixed. + - v8.99.278 TileEntity and TileEntityHopper rejects fixed, GuiOverlayDebug patch fixed. + - v8.99.277 ItemRenderer, RenderGlobal, StateMap, RenderItem rejects updated. + - v8.99.276 RenderEntityItem, RenderPlayer, RendererLivingEntity, LayerArmorBase, ItemStack rejects fixed; changed Armor Layer hook to catch LayerBipedArmor only. + - v8.99.275 GuiButton, GuiChat, GuiCreateWorld, GuiIngameMenu, ServerListEntryNormal, GuiStats rejects updated. + - v8.99.274 EntityPlayer patch updated. + - v8.99.273 Updated FML Gui methods to WorldRenderer API changes. + - v8.99.272 LoadingScreenRenderer,Minecraft,GuiContainerCreative,PlayerControllerMP,LanguageManager,Locale,SimpleReloadableResourceManager,EntityList,EntityLivingBase,EntityWither,EntityMinecart,EntityPlayerMP + NethanlderPlayClient patch is now in vanilla. The FMLCommonHandler future exception catcher is not needed anymore, it's in Util. The caching of player profiles is now in vanilla (SkinManager). + - v8.99.271 Delete rejects that I initially processed. + - v8.99.270 BlockOre, BlockRotatedPillar, SoundManager, EntityPlayerSP, GuiScreen, GuiAchievements, GuiContainer, BlockModelRenderer, ContainerEnchantment, Slot updated manually and imports removed; GitSlot patch updated. + - v8.99.269 Merge pull request #2179 from arideus101/patch-1 + Fixed issue where custom colored armor wouldn't be colored. (reverted from commit dee0b2084b519419bbf97d8ad177204830ea2b07) + - v8.99.268 Merge pull request #2179 from arideus101/patch-1 + Fixed issue where custom colored armor wouldn't be colored. + - v8.99.267 Merge pull request #2177 from gabizou/master + Fix a possible NPE when checking supertypes of interfaces. + - v8.99.266 Allows Custom Armor Coloring to be done easily + - v8.99.265 Merge branch '1.7.10' - fix up some oredictionary and substitution related issues + - v8.99.264 Fix firing the remap event. It always fires now, and additionally fires when the registry reverts to frozen. + Most mods refer to the gameregistry for ids they care about, so this shouldn't affect anything significantly, + but if your mod was dependent on their being content in the remap event, and only acting on that content, + empty content means it's "reverted to frozen" state - the state at the start of the game. + - v8.99.263 Fix a possible NPE when checking supertypes of interfaces. Closes #2176. + - v8.99.262 EntityAIAttackOnCollide, ServerStatusResponse, MinecraftServer, NetHandlerLoginServer, Vec3, BiomeGenBase, AnvilChunkLoader, ChunkProviderServer, MapGenRavine, MinecraftServer updated; fix in Block, GuiIngameForge; can load the world and play with ~20 more manual error fixes. + - v8.99.261 WorldProvider, WorldType, WorldServer, WorldServerMulti + - v8.99.260 IntegratedServer, World, EnumChatFormatting and EnumFacing + - v8.99.259 FontRenderer + Item patch update; WorldVertexBufferUploader patch derp fix. + - v8.99.258 Fix generics and error in the BlockState patch. + - v8.99.257 Updated various rendering-related patches and classes to 1.8.8; forge still uses vecmath. + - v8.99.256 Two more corner cases in the oredictionary. Should work for all cases now. + - v8.99.255 Patches and rejected patches. Note: some which had imports are not listed here because they need + to be refactored not to have imports. + Progress: https://gist.github.com/cpw/29695e426e2b122cf8ff + - v8.99.254 Test of mcp patching + - v8.99.253 Fixed Stronghold Library not having anything in it's chests. + - v8.99.252 Fixed Open url confirm screen not showing URL. + - v8.99.251 regenerate reference patchset at patches.mcp. These will be used to generate a new patchtree under patches. + - v8.99.250 1.8.8 initial work + - v8.99.249 Merge pull request #2174 from diesieben07/findBlockFix + Fix GameData.findBlock + - v8.99.248 Fix GameData.findBlock + - v8.99.247 Fixed anaglyph transformation not being applied in the forge lighting fully. + - v8.99.246 Provide ItemCameraTransforms for vanilla models when possible. + - v8.99.245 OBJ loader: reworked texture resolution: keys now have to start with #, like every other model loader; models without explicit library now work, remapping is possible by using the key "#OBJModel.Default.Texture.Name"; in addition to remapping by material name, remapping by texture name works too, like in other model formats. + - v8.99.244 Performace fix for item rendering. + - v8.99.243 Merge pull request #2167 from Choonster/master + Fix texture error message for broken textures + - v8.99.242 Fix texture error message for broken textures + -- Fixes #2100 + -- Iterates over badTextureDomains instead of missingTextures.keySet() + as a domain can have broken textures without any missing textures + - v8.99.241 Introduce a new centralized version checking system. + Using the @Mod annotation mods can opt-in to a centrally controlled update system. + This is PURELY a notification system and will NOT automatically download any updates. + The End User can control which mods check for updates and disabel the system entirely using the Forge Config and GUI. + Format for the json the URL must point to is described here: https://gist.github.com/LexManos/7aacb9aa991330523884 + - v8.99.240 Redesign the ModList GUI to use a scrolling list for the main body content. + Allowing for larger information to be displayed. + URLs are auto-detected and now clickable. + Mod Logos are now centered, it looks better. + - v8.99.239 Merge FML and Forge lang file, and update crowdin project. + - v8.99.238 Fixed block color multiplier not being cached properly in the forge renderer, performance improvement. + - v8.99.237 OBJ model: use original vertex material when defining face. + - v8.99.236 Merge pull request #2161 from The-Fireplace/master + Fixed a bug with GuiConfigEntries.SelectValueEntry + - v8.99.235 Fixed a bug that caused the config option name to overlap with the selectable values when using GuiConfigEntries.SelectValueEntry, fixes #2114 + - v8.99.234 Obj loader: fix vertices shared between faces having the same attributed (uvs/normals). + - v8.99.233 OBJ loader: fixed another whitespace-related issue; removed unused "modifyUVs" property for now; added the "flip-v" property to switch between OpenGL-style and DirextX-style model UVs; fixed normals - they are now correct in-world, still a bit strange for the items; fixed normals a little bit for B3D models too. + - v8.99.232 Fix color multiplier applied incorrectly for items. + - v8.99.231 OreDictionary will warn if there's an invalid ore being registered now, rather than just + using -1 and doing weird things with the list as a result. + - v8.99.230 Fix substitutions for recipes and oredict recipes. Should mean that substitutions start working properly. + - v8.99.229 Merge pull request #2154 from shadekiller666/OBJ_Loader + OBJLoader Update: Fix for normal generation, whitespace handling, and UVs outside 0-1 range + - v8.99.228 Fix for the previous commit - transparent blocks were handled improperly. + - v8.99.227 Changed how the forge lighting system handles holey models for opaque blocks; it now mimics vanilla behaviour, which allows light to pass through them. + - v8.99.226 OBJLoader: Quick bandages to support/fix the new way that face/vertex normals are calculated, a very quick bandage to patch TextureCoordinates for the time being, and the Parser now uses a Pattern to split strings on whitespace instead of only splitting on " ". + - v8.99.225 Merge pull request #2151 from AbrarSyed/patch-1 + Update FG version to 2.0.2 + - v8.99.224 Merge pull request #2146 from bonii-xx/potionidfix + Fix Potion IDs above 127 + - v8.99.223 Update FG version to 2.0.2 + - v8.99.222 Merge pull request #2126 from diesieben07/join-world-fix + Fix CME when entities are spawned from EntityJoinWorldEvent + - v8.99.221 More lighting fixes, flat lighting now works correctly for grass and torches. + - v8.99.220 Fixed normal calculation for vanilla models, fixed the grass darkening and simular issues. + - v8.99.219 Fixed piston rendering (WorldRenderer offset wasn't applied); fixed TESR being registered too early in one of the debug mods. + - v8.99.218 Fixed another generic issue in MultiModel. + - v8.99.217 Provide a IModel for "builtin/generated", fixes #2147 + - v8.99.216 Fixed AO being applied to OBJ model transparency, and OBJ loader trying to force the loading of the builtin white texture. + - v8.99.215 Fixed generic bug in MultiModel + - v8.99.214 Perspective awareness for vanilla and multi models, fixes #2148. + Improved error handling in MultiModel. + - v8.99.213 Merge pull request #2091 from shadekiller666/ItemModelLoadingFix + Fixed a bug with item model loading + - v8.99.212 Small fix for reworked classic lighting + - v8.99.211 Fixed a bug with item model loading that would occur if ModelBakery.addVariantName() was called with the same string location parameter for 2 different items, and the string pointed to a location that didn't exist, where ModelLoader.loadAnyModel() would substitute the blockdefinition in for the item model, but wouldn't remove the original input location from the loadingModels list, which would cause the location from the second call to throw an IllegalStateException even though that location now has a model. + - v8.99.210 Added OBJ loader for the ModelLoaderRegistry system. + - v8.99.209 Added back in the lost class + - v8.99.208 Model pipeline system. + Should replace all ad-hoc quad generation methods in forge, and make IBakedModel -> WorldRenderer data transfer faster. Added IVertexConsumer + helper classes; lighting that works correctly for non-axis-aligned faces using the new infrastructure. Changed smooth lighting algorithm, now it should work correctly for everything. + New block lighter can be disabled in the forge config options. + - v8.99.207 Fix Potion IDs above 127 + - v8.99.206 Allow server to access Potion isBadEffect() + - v8.99.205 Merge pull request #2022 from simon816/guava-apache-lcl-exclusion + Add Guava and Apache to LaunchClassLoader exclusion list on server + - v8.99.204 Merge pull request #2129 from darkevilmac/master + Add PlayerSetSpawnEvent + - v8.99.203 Add PlayerSetSpawnEvent + - v8.99.202 Fix CME when entities are spawned from EntityJoinWorldEvent + - v8.99.201 '#' is now added automatically to the beginning of the texture names in B3D models, and the remapping is expected via the blockstate JSON, since it's more reasonable than adding it to the file name in the modelling program or matching the resource location with the filename. + - v8.99.200 Fixes Attributes.transform affecting only 1 vertex. + - v8.99.199 Merge pull request #2103 from olee/patch-1 + Fix possible crash in EventBus + - v8.99.198 Merge pull request #2120 from luacs1998/eventbus_fix + Fix a possible crash in EventBus + - v8.99.197 Fix a possible crash in EventBus + - v8.99.196 Merge pull request #2118 from rubensworks/itemmonsterplacer-dispenser + Fix dispenser action for modded spawn eggs + - v8.99.195 Fix dispenser action for modded spawn eggs + - v8.99.194 Fix entity count being incorrect for spawning logic. Now filter out 'persistant' entities. + - v8.99.193 Update Gradle wrapper to 2.7 + - v8.99.192 Merge pull request #2002 from ganymedes01/master + Disallow conflicting furnace recipes + - v8.99.191 Workaround for MinecraftForge/ForgeGradle#256 + - v8.99.190 Disallow conflicting furnace recipes + - v8.99.189 FMLNetworkHandler.openGui should not try and open a GUI on a FakePlayer. + Fixes #2082 and probably dozens of mod errors. Also, side benefit of the + merged codebase! FML code can ref Forge code! + - v8.99.188 Merge branch 'laci200270-patch-1' + - v8.99.187 Format a bit better + - v8.99.186 Merge branch 'patch-1' of https://github.com/laci200270/MinecraftForge into laci200270-patch-1 + - v8.99.185 Much requested temporary hack for items and TESRs. Context: #1582, #1597, #1713, #2058 and others. + - v8.99.184 Merge pull request #2086 from Vorquel/master + Fix faulty channel name checking + - v8.99.183 Merge pull request #2069 from simon816/profile-request-fix + Use already provided profile for the player's own skin + - v8.99.182 Use already provided profile for the player's own skin + - v8.99.181 Add Guava and Apache to LaunchClassLoader exclusion list on server + Move exclusions to common place. Less likely to get out of sync + - v8.99.180 Fix possible crash in EventBus + There is currently no way to check if an event handler has been registered or not. + But when trying to unregister a not-registered event handler, Minecraft crashes with a NullPointerException. + This is a simple fix to prevent such crashes. + - v8.99.179 More cleanup of the default eclipse workspace. The project is now called "MDKExample" not "Minecraft". + The project tree is now contemporary, instead of a copy from 1.5.x era MC. The launches are cleaned up, and refer to + a better default "runDir" of "run" rather than "eclipse".. Updating to FG2.0.1 which will contain relevant binary fixes. + - v8.99.178 Fix eclipse workspace inside the mdk - don't run it through the tokenconverter. Also add in CREDITS-fml.txt to the MDK - it's still required. + - v8.99.177 Fixed issue where config folder would not be created before SplashProgress tried to read from it. + Default macs to disable the new loading screen due to to many macs having issues. + Users can enable it again by editing their config. + Catch and gracefully handle more errors when starting up the Splash Screen. + - v8.99.176 Update gradle wrapper and fix changelog task. + - v8.99.175 Fix faulty Channel name + - v8.99.174 Fix crowdin again. Run, jenkins, for god's sake, run! + - v8.99.173 Fix crowdin task. Good luck jenkins, lets roll! + - v8.99.172 Fix ciWriteBuildNumber task. Ugly, but it works. + - v8.99.171 Merge branch 'fg2' + - v8.99.170 Remove patches + - v8.99.169 Update FMLSecurityManager.java + - v8.99.168 Fix packaging the gradle wrapper properly. There is still a problem with + the MDK- it fails to run setupDecompWorkspace. + Filed an issue at ForgeGradle, since this seems to be something FG2 shouldn't + be doing, but is? + https://github.com/MinecraftForge/ForgeGradle/issues/235 + - v8.99.167 Trying to fix the MDK to include gradle wrapper, but the gradle-wrapper.jar is + corrupted. @AbrarSyed can you take a look? + - v8.99.166 The final nail in the coffin. BYE! + - v8.99.165 Fix MDK task - it now runs. + - v8.99.164 Merge pull request #2072 from AbrarSyed/fg2 + Added MDK package + - v8.99.163 added MDK package + - v8.99.162 Merge pull request #1969 from diesieben07/blockhighlight + Re-introduce RenderBlockOverlayEvent + - v8.99.161 FML's metabolic processes are now history. FML's off the twig. FML's kicked the bucket, FML's shuffled off this mortal coil, + run down the curtain and joined the bleedin' choir invisible!! THIS IS AN EX-PROJECT! + - v8.99.160 Vestigal fml-ectomy. + - v8.99.159 FML is no more. FML has ceased to be. FML's expired and gone to meet its maker. FML's a stiff! Bereft of life, FML rests in peace. + - v8.99.158 Merge branch 'master' of https://github.com/AbrarSyed/MinecraftForge into fg2 + - v8.99.157 Merge branch '1.7.10' + - v8.99.156 fixed deployment credentials + - v8.99.155 Fix placing skulls on fence posts. Closes #2055 + - v8.99.154 Merge pull request #1968 from modwizcode/master + Fix harvest logic running in addition to shearable logic + - v8.99.153 Merge pull request #2048 from shadekiller666/UnlistedPropertyValue + Fix for ExtendedBlockStates containing at least one IProperty and one IUnlistedProperty preventing block placement. + - v8.99.152 Fixed a bug with ExtendedBlockStates containing at least one IProperty and one IUnlistedProperty not allowing blocks to be placed. + - v8.99.151 Merge pull request #2017 from liach/add-enum + Add hook for adding EnumPlantType and fixed npe in BiomeType + - v8.99.150 Merge pull request #2004 from simon816/sign-nbt-fix + Fix placing signs with NBT prompting for text + - v8.99.149 Merge pull request #2047 from Zaggy1024/forgeblockstatesv1fixes + Fixed two bugs with the Forge blockstates v1 loader. + - v8.99.148 Fixed a Forge blockstates json removing models causing an NPE in the loader. + Fixed the deep clone of a V1 Variant not cloning the submodels properly. + - v8.99.147 Merge pull request #1983 from clienthax/patch-1 + Make layer methods public + - v8.99.146 Merge pull request #2044 from rubensworks/enumfacing-server + Remove SideOnly's from EnumFacing allowing full class to be used on both sides. + - v8.99.145 Make EnumFacing events available server-side + - v8.99.144 Merge pull request #2035 from rubensworks/master + Fix source block check for BlockFluidClassic + - v8.99.143 Fix source block check for BlockFluidClassic + - v8.99.142 Cherry pick some changes from 1.8 for inner class discovery, also fix the negativecache. Closes #1872 + - v8.99.141 Merge pull request #2023 from diesieben07/entity-pick + Allow the new entity eggs to be created via middle-click on an Entity while in creative mode. + - v8.99.140 Allow the new entity eggs to be created via middle-click + - v8.99.139 Add an EnumHelper hook and fixed an issue + - v8.99.138 Be a little bit more helpful when the ObjectHolder misses. Should help figure out what is going in in #2006 + - v8.99.137 Wake up the FluidRegistry before any mods start loading. Should stop mods claiming to own water or lava (depending on who accessed + FluidRegistry first) + - v8.99.136 Actually rebuild the fluidNames each rebuild, don't just try and force changes in. Should fix #1973 + - v8.99.135 Fix placing signs with NBT prompting for text + - v8.99.134 + - v8.99.133 Merge pull request #1978 from RainWarrior/model-rotation + Custom transformations in forge blockstate json. + - v8.99.132 Custom transformations in forge blockstate json. + - v8.99.131 updated installed gradle. not finished + - v8.99.130 fixed local-building fail with changelog + - v8.99.129 added jenkins compat tasks + - v8.99.128 Added FG2 buildscript + updated for Gradle 2.4 + - v8.99.127 removed old unnecessary stuff + - v8.99.126 DeobfuscationData no longer required at dev time + - v8.99.125 added hardcoded fml version file + - v8.99.124 removed broken and duplicate AT lines + - v8.99.123 Fixed ItemMonsterPlacer.getEggInfo missing return. Closes #1975 + - v8.99.122 Merge pull request #1974 from Lunatrius/white-screen-fix + Fixed error GUIs showing a white screen + - v8.99.121 Fixed error GUIs showing a white screen and replaced a rogue direct GL call. + - v8.99.120 Fix particle texture of the generated item models. + - v8.99.119 Merge pull request #1972 from bonii-xx/StateMapDomainFix + Fix StateMap always mapping properties to the "minecraft" domain + - v8.99.118 Add debug for max texture size and output when Texture Atlas can not stitch all textures. + - v8.99.117 Fix StateMap always mapping properties to the "minecraft" domain instead of the mods, causing it to not find BlockState definitions. + - v8.99.116 ObjectHolder works great, but it should be a lot less spammy about failed lookups. They're usually mod options. + - v8.99.115 Re-introduce RenderBlockOverlayEvent, seems to have been missed during 1.8 update + - v8.99.114 Fix harvest logic running in addition to shearable logic + - v8.99.113 More descripotive error if Patcher is passed invalid data for vanilla classes. + - v8.99.112 There's no Map.getOrDefault in java6. + - v8.99.111 Vanilla models can now use custom textures. Fixes #1962 + - v8.99.110 Fixed perspective transformations for item models. + - v8.99.109 Fix AT for Block constructor. + - v8.99.108 Added ItemLayerModel - less awkward, simpler and faster version of ItemModelGenerator. + - v8.99.107 Merge remote-tracking branch 'origin/master' + - v8.99.106 Merge branch '1.7.10' + Conflicts: + fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch + fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch + fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch + fml/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java + patches/minecraft/net/minecraft/client/Minecraft.java.patch + patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch + patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch + src/main/java/net/minecraftforge/client/model/obj/WavefrontObject.java + - v8.99.105 Merge pull request #1858 from FlansMods/master + Hook for Camera Angles, Including Roll + - v8.99.104 Mods that are extracted to the mods dir by unzipping or whatever will now cause the game to crash. Too much info is in the META-INF now, + and more will be being added. Extracting to the mods dir just completely breaks that. + - v8.99.103 Merge pull request #1956 from lawremi/mesadictfix + fix logic for guessing mesa tag in biome dict + - v8.99.102 fix logic for guessing mesa tag in biome dict + - v8.99.101 Time each bar in the loading screen and print it to the log, useful information to see where most time is spent in loading. + - v8.99.100 Add TextureManager to loading screen. + - v8.99.99 Make TextureMap for items and blocks skip the first pass of loading/stitching textures. + Should decrease loading times for large packs. + May cause issues with some mods so use -Dfml.skipFirstTextureLoad=false to disable. + - v8.99.98 Add the stitching allocation stage to loading screen. + - v8.99.97 Create config folder in SplashProgress if it does not exist. + - v8.99.96 New system in EntityRegistry to allow modders to register spawn eggs. + For entites that do not use the global ID system. + {Which no mod entity should} + Vanilla spawn eggs will now detect a 'entity_name' entry in it's NBT data and use that for spawning/rendering. + - v8.99.95 Patch line number update. Ignore this. + - v8.99.94 Merge pull request #1952 from ganymedes01/master + Change permission levels on ore recipes parameters + - v8.99.93 Merge pull request #1953 from ganymedes01/patch-1 + Fixed NPE when calling canBrew + - v8.99.92 Use Guava instead of Nio for J6 compatibility. + - v8.99.91 Fixed NPE when calling canBrew + Oversight on my part, + If the ingredient doesn't return true in Item.isPotionIngredient, Items.potionitem.getEffects(stack) returns null, causing an NPE to be thrown later on. + This invalidates #1947. + - v8.99.90 Change permission levels on ore recipes parameters + - v8.99.89 Merge pull request #1922 from RainWarrior/model-fluid2 + 1.8 model fluid renderer + - v8.99.88 Added fluid renderer. + - v8.99.87 Make Item.shouldCauseReequipAnimation is bit more precise and copy over the new item for rendering even if the animation is diabled. + - v8.99.86 Add vanilla block rotation support back in for certain blocks that were missed in 1.8 update. Closes #1903 + - v8.99.85 Merge pull request #1941 from xxmicloxx/xxmicloxx-patch-b3dloader + Bugfix for B3DLoader + - v8.99.84 Merge pull request #1932 from cheeserolls/patch-1 + Fix incorrect block position in BlockReed canPlaceBlockAt + - v8.99.83 Merge pull request #1506 from mezz/GuiScreenInputEvents + Add GuiScreenEvents for keyboard and mouse input + - v8.99.82 Merge pull request #1781 from ShetiPhian/Block.getPickBlock + Player sensitive version of Block.getPickBlock + - v8.99.81 Add Item.shouldCauseReequipAnimation to allow modders more control over the 'Reequip' animation. + - v8.99.80 Fixed compile issues with irtimaled's PR. + - v8.99.79 Fixed Wavefront Object Importer reading files with integer values. Closes #1651, #1654 + - v8.99.78 Make FML Gui classes use GlStateManager. Closes FML#615 + - v8.99.77 Merge pull request #1749 from irtimaled/master + Copy fortress.dat from the overworld to the Nether. Fixes #1747 + - v8.99.76 Bugfix for B3DLoader + - v8.99.75 Fixup model loading errors not being printed by making ICustomModelLoader.loadModel propogate IOExceptions as needed. + - v8.99.74 Cleanup code format in LayerBreakingTest. + - v8.99.73 Include the thread state in the potential error handleing for SplashProgress. + - v8.99.72 Throw more descriptive errors when mods attempt to register invalid global entity IDs. + - v8.99.71 Merge branch '1.7.10' + Conflicts: + fml/src/main/java/net/minecraftforge/fml/common/MinecraftDummyContainer.java + fml/src/main/java/net/minecraftforge/fml/common/registry/FMLControlledNamespacedRegistry.java + fml/src/main/java/net/minecraftforge/fml/common/registry/LanguageRegistry.java + - v8.99.70 Merge pull request #1935 from superckl/master + Fixed two exceptions in BiomeDictionary related to adding new Biome Types. + - v8.99.69 Fixing two IndexOutBoundsExceptions from the BiomeDictionary + - v8.99.68 Fix incorrect block position in BlockReed canPlaceBlockAt + block.canSustainPlant is called on the wrong block position. It should be called on the block below (the 'soil' block). + - v8.99.67 Cleanup mod state dump to be easier to read by displaying the states in abreviation and placing them before the mod info. + - v8.99.66 Cleanup mod signature data table. Easily seperating those mods with signatures vs those with none. + - v8.99.65 Quiet CrashReport class pre-loading debug, no flag to re-enable. + - v8.99.64 Quiet FMLControlledNamespacedRegistry debug spam by default. Reenable using -Dfml.debugRegistryEntries=true. + - v8.99.63 Quiet ClassPatchManager debug spam by default. Reenable using -Dfml.debugClassPatchManager=true. + - v8.99.62 Cleanup some spammy output. + - v8.99.61 Bump version for new RB + - v8.99.60 Copy over parent's modelSet value in variants as well. + - v8.99.59 Bump version for new RB. + - v8.99.58 Merge branch '1.7.10' + - v8.99.57 Merge pull request #1795 from lumien231/ExperienceEvent + Added LivingExperienceDropsEvent to change how much experience an entity drops + - v8.99.56 Merge pull request #1907 from johnjohn/master + Added ItemMap type check to item frames and ItemRenderer, enabling vanilla style rendering for custom ItemMaps + - v8.99.55 Redefine removal value in IRetextureableModel from null to empty string {""} due to ImmutibleMap not allowing null Values. Closes #1927 + - v8.99.54 Merge pull request #1881 from ganymedes01/master + Added a brewing recipe registry system + - v8.99.53 Added ItemMap type check to item frames and ItemRenderer, enabling vanilla style rendering for custom maps + - v8.99.52 Added a brewing registry system + - v8.99.51 Missed patch for sign fix. + - v8.99.50 Remove worlds from WorldBorder when unloaded tol prevent memory leak, Closes #1923 + - v8.99.49 Limit Sign text to 384 json characters and strip control codes. This is 1.8.7's Sign fix. Thanks Searge. + - v8.99.48 Attempt to synchronize the state for vanilla client completions and quit the handler if the vanilla + thread has already setup the connection. Should fix #1924 + - v8.99.47 Change custom payload lock to be buffer itself incase multiple packets use the same backend buffer. Closes #1908 + - v8.99.46 Merge pull request #1868 from fuami/ISmartBlockModel_Damage + Add Block Breaking Animation for ISmartBlockModels + - v8.99.45 Added Breaking Animation for Smart Models, Checking each layer. + Added Layered Smart Render Test. + - v8.99.44 Update README.txt + - v8.99.43 B3D Improvements + - fixed keyframe transformation application + - textures are now resolved the same way as in vanilla models + - added the ability to use forge blockstate texture information + - removed unused code from the B3D example + - v8.99.42 fixed AT missing for getModelBlockDefinition + - v8.99.41 Fixed missing variant logging; added the possibility to specify the item variant in the blockstate json. + - v8.99.40 Fixed partial variant detection in the forge blockstate loader. + - v8.99.39 Mitigate potential issue with users requesting lots of server status information by caching ServerStatus json. + - v8.99.38 Merge pull request #1912 from clienthax/master + Add missing forge patch from 1.8 port + - v8.99.37 Add missing forge patch from 1.8 port + https://github.com/MinecraftForge/MinecraftForge/blob/1.7.10/patches/minecraft/net/minecraft/client/Minecraft.java.patch#L88 + - v8.99.36 Fix up the client/server fluid race condition that could cause the game to bail when an SSP game connects. + There's still a teeny gap, but it's MUCH less prominent than it was before. + - v8.99.35 Merge pull request #1885 from LexManos/EnhanvedBlockStateJson + Hook BlockState's Json loading to add support for simplified Forge format. + - v8.99.34 Hook BlockState's Json loading to add support for simplified Forge format. + See https://github.com/MinecraftForge/MinecraftForge/pull/1885 for more details. + - v8.99.33 Fixed missing import in last merge. + - v8.99.32 Merge branch '1.7.10' + Conflicts: + fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch + fml/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java + fml/src/main/java/net/minecraftforge/fml/client/SplashProgress.java + - v8.99.31 So we can't print a lot of unicode in the splash screen, so restrict to a hard subset we know we CAN print, closes #1910 + - v8.99.30 Merge pull request #1911 from AlgorithmX2/ItemFramesOnSolidSurfaces + Allow placing item frames on Solid Block Faces (isSideSolid) + - v8.99.29 Allow placing item frames on Solid Block Faces (isSideSolid) + - v8.99.28 Finish loading screen before going fullscreen. Closes MinecraftForge/FML#662 + (cherry picked from commit 19d7e16fa6a28c5665de1ed6e50d8699e865bff2) + Conflicts: + fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch + - v8.99.27 Attempt to disable the new splash screen if there are errors detected finishing up. Print a slightly more helpful error message. + (cherry picked from commit e3211eec0469dc6717943010d584207b7abdb1e0) + Conflicts: + fml/src/main/java/cpw/mods/fml/client/SplashProgress.java + - v8.99.26 Bump minor version # to 2 because of the fluid changes (mirroring what happening in 1.7.10) + - v8.99.25 Merge branch '1.7.10' - imports all the fluid fixups and other stuff from 1.7 into 1.8 + Conflicts: + fml/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java + fml/src/main/java/net/minecraftforge/fml/common/Loader.java + patches/minecraft/net/minecraft/client/Minecraft.java.patch + patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch + patches/minecraft/net/minecraft/item/ItemArmor.java.patch + patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch + patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch + patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch + patches/minecraft/net/minecraft/world/World.java.patch + patches/minecraft/net/minecraft/world/WorldProvider.java.patch + src/main/java/net/minecraftforge/common/ForgeVersion.java + src/main/java/net/minecraftforge/common/network/ForgeMessage.java + src/main/java/net/minecraftforge/fluids/BlockFluidBase.java + src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java + src/main/java/net/minecraftforge/fluids/FluidRegistry.java + src/main/java/net/minecraftforge/oredict/OreDictionary.java + - v8.99.24 Add in an ItemStackHolder - a way to inject ItemStacks without having to have complex lookup code everywhere. + Example: https://gist.github.com/cpw/9af398451a20459ac263 + - v8.99.23 Fixed damage reduction rate of vanilla armor incorrectly scaling with armor's current durability. + - v8.99.22 Merge pull request #1892 from AlgorithmX2/vanilla_lighting_bug + Fix Vanilla Lighting Bug - Fixes Top/Bottom Faces interpolation. + - v8.99.21 Force netty downgrade on dedicated server to match client. Netty bug: https://github.com/netty/netty/issues/2302 Closes #1848 + - v8.99.20 Fix Partial Face Lighting on Top/Bottom Faces ; Vanilla MC-80148 + - v8.99.19 Fixed command exploit with C12 + - v8.99.18 Fixes MC-75630 - Exploit with signs and command blocks + - v8.99.17 Finish loading screen before going fullscreen. Closes MinecraftForge/FML#662 + - v8.99.16 Attempt to disable the new splash screen if there are errors detected finishing up. Print a slightly more helpful error message. + - v8.99.15 Cleanup a lot of spammy output. Everything hidden behind environment flags now. Scale anvil image down 50% + - v8.99.14 Loosen up ServerChatEvent to support IChatComponent Closes #1893 + - v8.99.13 Merge pull request #1804 from Prototik/font + Add true support for unicode fonts + - v8.99.12 Add true support for unicode fonts + - v8.99.11 Merge pull request #1886 from diesieben07/texture-load-crash + Fix crash when texture loading throws RuntimeException without message + - v8.99.10 Fix crash when texture loading throws RuntimeException without message + - v8.99.9 Added CameraSetup sub-event for camera angles + Allows players to alter yaw and pitch of renderViewEntity, but more importantly, adds the ability to roll the view. + Added camera roll hook + - v8.99.8 Merge pull request #1882 from t1g3l/master + Changed forge command tab completion to use getListOfStringsMatchingL… + - v8.99.7 Changed forge command tab completion to use getListOfStringsMatchingLastWord() + - v8.99.6 Merge pull request #1878 from t1g3l/master + Added tab completion to /forge command. + - v8.99.5 Clean up transformers a bit. Can't use COMPUTE_FRAMES even though it's required - the game refuses to even + run if I do. Note for j8: when we force Java8 classes, all coremods will need a thorough overhaul - the + current way we do things is not sustainable when Java8 becomes the universal norm. + - v8.99.4 Strip control codes in progress bar messages. They cause crashes sometimes. + - v8.99.3 Added tab completion + - v8.99.2 Hardcode the FML version in-game as a specific value. + - v8.99.1 Attempt to fix the slow loading problem. Instead of forcing the main thread to wait around + on every call to processWindowMessages, we will simply skip it, if the mutex is already + claimed by the display thread. This should fix slow loading issues seen by some with + the new loading screen. + - v8.99.0 Fix patches after last fml merge. + +v7.99 +===== + - v7.99.0 Merged FML @ 1.7.10 + +v99.99 +====== + - v99.99.0 Merged FML + +v99.99-pre +========== + - v99.99-pre-4302 Merge branch '1.7.10' + Conflicts: + patches/minecraft/net/minecraft/client/Minecraft.java.patch + src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java + src/main/java/net/minecraftforge/fml/client/FMLFileResourcePack.java + src/main/java/net/minecraftforge/fml/client/FMLFolderResourcePack.java + src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java + src/main/java/net/minecraftforge/fml/common/IFMLSidedHandler.java + src/main/java/net/minecraftforge/fml/common/LoadController.java + src/main/java/net/minecraftforge/fml/common/Loader.java + src/main/java/net/minecraftforge/fml/common/asm/transformers/EventSubscriptionTransformer.java + src/main/java/net/minecraftforge/fml/server/FMLServerHandler.java + src/main/resources/fml_at.cfg + - v99.99-pre-4301 Merge pull request #1863 from Tmtravlr/master + Initialized the Nether Fortress chest loot + - v99.99-pre-4300 Initialized the Nether Fortress chest loot + Forced the nether fortress chest loot to initialize in ChestGenHooks + like the other types. + Changed tabs to spaces. Silly Eclipse. + - v99.99-pre-4299 Update current json + - v99.99-pre-4298 MinecraftForge/FML@0b84b6aa297bdf6ab9f010e340f286442cb242dc Expose the state of the loader + - v99.99-pre-4297 Merge branch '1710ls' into 1.7.10 + - v99.99-pre-4296 Expose the state of the loader + - v99.99-pre-4295 Merge pull request #1853 from Silfadur/master + Added hook for IPerspectiveAwareModel in RenderItem.renderItemIntoGUI f... + - v99.99-pre-4294 Added hook for IPerspectiveAwareModel in RenderItem.renderItemIntoGUI for ItemCameraTransforms.TransformType.GUI + - v99.99-pre-4293 Updated FML: + MinecraftForge/FML@2ed00c4da0ee76eb15e28eb8ee2c07a3096155c2 Splash progress screen will not load in the presence of optifine anymore. + MinecraftForge/FML@adcf2247c69f68415033a3c0b2c527053733514c Loading screen: moved config file to the standard config directory; added the option to load textures from the custom resource pack + MinecraftForge/FML@91338433fa74e782e237643632de2cc5e17ee280 Add classloader exclusion for ASM + MinecraftForge/FML@7c10b93a2ded2799d41b73b67a2766c31e992d8a Synchronize the available libraries. Turns out we've been forcing a newer apache commons-lang(3.2.1) for a long time, also sync the dev guava - we've been forcing 17 for a long time too. Bumping commons-lang to 3.3.2 since that's what Mojang are shipping with 1.8. It has no observable ill effects Closes MinecraftForge/FML#651 + MinecraftForge/FML@8ccfa24764a3f4854f5334c0da1224286175e13b Merge pull request MinecraftForge/FML#650 from luacs1998/1.7.10 + MinecraftForge/FML@b2650a0bdb7d69010a55de518e76591a6c417e87 Optifine can tell us when they're ready for the new splash screen. + MinecraftForge/FML@02a5a58a1cbb25cd3baecf1535950e4780b7810f Fix the ordering of the messages, so they make sense now. + MinecraftForge/FML@dda431353953457608c38aacb060ef82ddc88883 Revert "Merge pull request MinecraftForge/FML#650 from luacs1998/1.7.10" This undoes the seriously broken change from Sponge to support Mixins, that breaks a wide variety of coremods. Given the widespread incompatibility it introduces, it won't be re-added at 1.7.10. + MinecraftForge/FML@5dbb481732bf4bcf8b0c5c02806051a933e6587e Eliminated texture name allocation race condition + MinecraftForge/FML@450b82ca0e13cf889a42eeb198b67115a4851031 Updated default forge logo to animated gif; reverted config folder resolution to Minecraft class due to Loader not being initialized at the point it's needed + - v99.99-pre-4292 Updated default forge logo to animated gif; reverted config folder resolution to Minecraft class due to Loader not being initialized at the point it's needed + - v99.99-pre-4291 Eliminated texture name allocation race condition + - v99.99-pre-4290 MinecraftForge/FML@dda431353953457608c38aacb060ef82ddc88883 Revert "Merge pull request #650 from luacs1998/1.7.10" This undoes the seriously broken change from Sponge to support Mixins, that breaks a wide variety of coremods. Given the widespread incompatibility it introduces, it won't be re-added at 1.7.10. + - v99.99-pre-4289 Revert "Merge pull request #650 from luacs1998/1.7.10" + This undoes the seriously broken change from Sponge to support Mixins, that breaks + a wide variety of coremods. Given the widespread incompatibility it introduces, it + won't be re-added at 1.7.10. + This reverts commit 8ccfa24764a3f4854f5334c0da1224286175e13b, reversing + changes made to 7c10b93a2ded2799d41b73b67a2766c31e992d8a. + - v99.99-pre-4288 MinecraftForge/FML@adcf2247c69f68415033a3c0b2c527053733514c Loading screen: moved config file to the standard config directory; added the option to load textures from the custom resource pack + MinecraftForge/FML@91338433fa74e782e237643632de2cc5e17ee280 Add classloader exclusion for ASM + MinecraftForge/FML@7c10b93a2ded2799d41b73b67a2766c31e992d8a Synchronize the available libraries. Turns out we've been forcing a newer apache commons-lang(3.2.1) for a long time, also sync the dev guava - we've been forcing 17 for a long time too. Bumping commons-lang to 3.3.2 since that's what Mojang are shipping with 1.8. It has no observable ill effects Closes #651 + MinecraftForge/FML@8ccfa24764a3f4854f5334c0da1224286175e13b Merge pull request #650 from luacs1998/1.7.10 + MinecraftForge/FML@b2650a0bdb7d69010a55de518e76591a6c417e87 Optifine can tell us when they're ready for the new splash screen. + MinecraftForge/FML@02a5a58a1cbb25cd3baecf1535950e4780b7810f Fix the ordering of the messages, so they make sense now. + - v99.99-pre-4287 Fix the ordering of the messages, so they make sense now. + - v99.99-pre-4286 Merge pull request #1843 from Zaggy1024/getlightvaluefix + Make World.setBlockState check whether the light value from getLightValue(IBlockAccess, BlockPos) has changed. + - v99.99-pre-4285 Fixed a bug which caused the light level not to update when a block implements Block.getLightValue(IBlockAccess, BlockPos) to change the light value for different block states. + - v99.99-pre-4284 Merge pull request #652 from AbrarSyed/patch-2 + remapped parameters and added ending newlines + - v99.99-pre-4283 remapped parameters and added ending newlines + - v99.99-pre-4282 Optifine can tell us when they're ready for the new splash screen. + - v99.99-pre-4281 Merge pull request #650 from luacs1998/1.7.10 + Add classloader exclusion for ASM + - v99.99-pre-4280 Merge pull request #649 from luacs1998/master + Add classloader exclusion for ASM + - v99.99-pre-4279 Synchronize the available libraries. Turns out we've been forcing a newer apache commons-lang(3.2.1) + for a long time, also sync the dev guava - we've been forcing 17 for a long time too. Bumping + commons-lang to 3.3.2 since that's what Mojang are shipping with 1.8. It has no observable ill effects + Closes #651 + - v99.99-pre-4278 Add classloader exclusion for ASM + - v99.99-pre-4277 Add classloader exclusion for ASM + - v99.99-pre-4276 Merge pull request #1832 from Parker8283/lhsf-1.8 + [1.8] Fixes MC-52974: Host's skin doesn't load in LAN + - v99.99-pre-4275 Merge pull request #1831 from Zaggy1024/clientonlyrenderinlayer + Removed @SideOnly(Side.CLIENT) from EnumWorldBlockLayer. + - v99.99-pre-4274 Fixes MC-52974: Host's skin doesn't load in LAN + - v99.99-pre-4273 Removed @SideOnly(Side.CLIENT) from EnumWorldBlockLayer. + - v99.99-pre-4272 Loading screen: moved config file to the standard config directory; added the option to load textures from the custom resource pack + - v99.99-pre-4271 MinecraftForge/FML@2ed00c4da0ee76eb15e28eb8ee2c07a3096155c2 Splash progress screen will not load in the presence of optifine anymore. + - v99.99-pre-4270 Splash progress screen will not load in the presence of optifine anymore. + - v99.99-pre-4269 MinecraftForge/FML@94821fac98e64d9b8ad7434ed23a621850a8e11c Add a config file that lets you add additional soft dependencies at runtime - injectedDependencies.json + - v99.99-pre-4268 Add a config file that lets you add additional soft dependencies at runtime - injectedDependencies.json + Example here: https://gist.github.com/cpw/d3edc292631708f2d454 + - v99.99-pre-4267 MinecraftForge/FML@4fe7b469b5ba156d4a786cd9e105b18cca7c271a Loading screen: logo rotation is now optional; initial support for animated textures - animation rate is fixed for now. + MinecraftForge/FML@31ae43590a2ba771d69b6c6513bcd5fe87ae8f8f Fix trying to close the screen during error. + - v99.99-pre-4266 Fix trying to close the screen during error. + - v99.99-pre-4265 Loading screen: logo rotation is now optional; initial support for animated textures - animation rate is fixed for now. + - v99.99-pre-4264 MinecraftForge/FML@36688e781aae67fb1e4e7047acf689edeeac7ddb Add in resource reloading to the bar. Tidy up some of the labels a bit. + MinecraftForge/FML@a1dc465a55612ecdd44e6cde3adc0f1d53c6d97b More progress bar action! + MinecraftForge/FML@bfcbf4ef4366fd3d8bfd20adafb63a857bb0dd53 More progress bar hooks + MinecraftForge/FML@a6670c415ee97e771020921e00773c4c15e7512e Thread errors should be correctly displayed in the crash report now + MinecraftForge/FML@9a16d26186d27029cae32a19c09ddf48f7cba22e fixed bar text positioning + MinecraftForge/FML@0059c630281b7105c0532d2dba1bec27cf0323b2 Track mipmaps and texture upload + MinecraftForge/FML@ef5f809752e87e369235e98a63027e9347185cd9 Fix broken log message in vanilla. + - v99.99-pre-4263 Fix broken log message in vanilla. + - v99.99-pre-4262 Track mipmaps and texture upload + - v99.99-pre-4261 fixed bar text positioning + - v99.99-pre-4260 Thread errors should be correctly displayed in the crash report now + - v99.99-pre-4259 More progress bar hooks + - v99.99-pre-4258 More progress bar action! + - v99.99-pre-4257 Add in resource reloading to the bar. Tidy up some of the labels a bit. + - v99.99-pre-4256 Cleanup RenderEntityItem patch, fixes Z-fighting issue in EntityItems. Closes #1824 + - v99.99-pre-4255 MinecraftForge/FML@5785a9c9e8d76b91a03ed1f9791aeee1cb7ea00b Fix up multiple injections of cmdline files via versionspecificmoddir. Closes #645 + MinecraftForge/FML@bd117be9c3e3919f3c29538cde80e3eb8fa48368 Correctly track exceptions thrown in the loading screen rendering thread + - v99.99-pre-4254 Correctly track exceptions thrown in the loading screen rendering thread + - v99.99-pre-4253 Merge pull request #647 from AbrarSyed/patch-1 + Fixed scala module libs in dev json + - v99.99-pre-4252 fixed scala module libs in jsons + - v99.99-pre-4251 Merge pull request #1814 from Lunatrius/block-dispatcher + Extracted the creation of RegionRenderCache into a method for extendability + - v99.99-pre-4250 Extracted the creation of RegionRenderCache into a method. + Classes extending RegionRenderCache can change the behavior of the cache, allowing to visually change blocks (schematics etc). + - v99.99-pre-4249 Fix up multiple injections of cmdline files via versionspecificmoddir. + Closes #645 + - v99.99-pre-4248 MinecraftForge/FML@a39482c4b7ac2883f821619b47ff31e0b6e74b29 Splash screen implementation + MinecraftForge/FML@01fea095cdcd80c2ae9f0ebfd1c72242b3f2dbf8 Merge branch '1.7.10-load-progress' of github.com:RainWarrior/FML into 1.7.10 + MinecraftForge/FML@364b4bbbb0d4d168f9a63fa62a09e4e2fa213039 Call some loader stuffs + MinecraftForge/FML@61a891280d15f9f17e28bf86a427f32de5a8983e Make sure to close the splash screen if there's gonna be an error display + - v99.99-pre-4247 Make sure to close the splash screen if there's gonna be an error display + - v99.99-pre-4246 Call some loader stuffs + - v99.99-pre-4245 Merge branch '1.7.10-load-progress' of github.com:RainWarrior/FML into 1.7.10 + - v99.99-pre-4244 Splash screen implementation + - v99.99-pre-4243 MinecraftForge/FML@d14d1a8fea4c9242c944079ab8e4cdd516dfce4c Update to use the inherited jar format. Simplifies a lot.. + - v99.99-pre-4242 Update to use the inherited jar format. Simplifies a lot.. + - v99.99-pre-4241 Expose the fluid that a block was constructed with, useful for 'non-default' + configuration of fluidblocks. Shouldn't be used outside of this purpose. + - v99.99-pre-4240 Replace the OLD fluid in the fluidID map, not the new one.. + - v99.99-pre-4239 Fix static initializer derp. + - v99.99-pre-4238 Make FluidStack hold a delegate for the fluid. This can then float based on what is "live" at present. + - v99.99-pre-4237 Reformat ItemArmor$ArmorMaterial.getBaseItem to use an if/then/else structure. The switch + causes the generation of an internal class which may derp custom armor addition. + Closes #1799 + - v99.99-pre-4236 Actually use the override constraint in ticket requests. Closes #1802 + - v99.99-pre-4235 Change logging to avoid the String.format bug. Closes #1809 + - v99.99-pre-4234 MinecraftForge/FML@8f9e3a7e30c8cc436dcb8d94b18b4634e0376339 Exceptions during construction phase should not propogate and cause an immediate crash. Closes #638 + - v99.99-pre-4233 Exceptions during construction phase should not propogate and cause an immediate crash. Closes #638 + - v99.99-pre-4232 Verify that the fluid registry doesn't contain "junk" fluids thru reflection. + - v99.99-pre-4231 Fixed NBTSizeTracker missing a lot of data being read. Also made new NBT object allocation claim 32-bits in the size tracker. + (cherry picked from commit de066a86da281d381b0e3ab9e83682720327049c) + Conflicts: + patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch + patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch + - v99.99-pre-4230 Fixed NBTSizeTracker missing a lot of data being read. Also made new NBT object allocation claim 32-bits in the size tracker. + - v99.99-pre-4229 Merge pull request #1805 from KingLemming/1.7.10 + OreDict functionality updates. + - v99.99-pre-4228 Adds some new Ore querying functionality. + Also attempts to size initial Hashmaps in a logical manner. + - v99.99-pre-4227 Added LivingExperienceDropsEvent to change the amount of experience an entity drops + - v99.99-pre-4226 Dissallow color codes in mod names displayed in Mod gui list. And code formatting. + - v99.99-pre-4225 Revert KL's change, requesting a ore WILL register it. + Registering like this and returning a new empty list allows for modders to register their recipes and such without requiring to be executed after someone actually adds an item. If handled properly this allows for more flexible load orders, and more responsive code. + - v99.99-pre-4224 Merge pull request #1796 from KingLemming/1.7.10 + Adjusts OreDictionary to prevent invalid registrations. + - v99.99-pre-4223 Adjusts OreDictionary to prevent invalid registrations. + Getting Ore Names for a non-existent ore will no longer automatically add that Name to the list nor generate an ID. + Tweaks a warning message in the FluidContainerRegistry. No functionality change. + - v99.99-pre-4222 Merge pull request #636 from tterrag1098/betterModList + Fix control codes being used for mod list sort. Clean up sorting code. + - v99.99-pre-4221 Fix control codes being used for mod list sort. Clean up sorting code and fix a bug with right click clearing. + - v99.99-pre-4220 MinecraftForge/FML@888e489394e52abdfb349fbfbd7f8e153b5af124 Allow registering custom language adapters. + MinecraftForge/FML@906f94ca143f756f40404fde38af32b2481d0673 Some tidyup of the PR + MinecraftForge/FML@1c025f18433df868859022eea8e6d198444736de Patch TracingPrintStream to handle Kotlin IO. + - v99.99-pre-4219 MinecraftForge/FML@dfce4cd8d023a546c4c21405db182b8ddcd38633 Allow registering custom language adapters. + MinecraftForge/FML@9fecd72cf0bd483ae7bc2ce821ae6b2f5e5b9c65 Some tidyup of the PR + MinecraftForge/FML@10ac2a4fd972e923a60d23d10e8f297b8584f565 Fix itemCtorArgs javadoc in registerBlock + MinecraftForge/FML@86f70d37a40bbeaf7c389a14adcd8311ba5584df Patch TracingPrintStream to handle Kotlin IO. + - v99.99-pre-4218 Patch TracingPrintStream to handle Kotlin IO. + Kotlins internal IO suite wraps the old System.out style, so descend + deeper in the stack when kotlin.io is detected. + - v99.99-pre-4217 Patch TracingPrintStream to handle Kotlin IO. + Kotlins internal IO suite wraps the old System.out style, so descend + deeper in the stack when kotlin.io is detected. + - v99.99-pre-4216 Fix itemCtorArgs javadoc in registerBlock + - v99.99-pre-4215 Some tidyup of the PR + - v99.99-pre-4214 Allow registering custom language adapters. + Allows external mods/library jars to provide language adapters for + languages not supported in native Forge. + - v99.99-pre-4213 Some tidyup of the PR + - v99.99-pre-4212 And handle the null case in the constructor itself. Closes #1794 (again) + - v99.99-pre-4211 Fix NPE - Closes #1794 + - v99.99-pre-4210 Fluids are now tracked internally by mod. This allows for the server and the world to specify a "default" + in the case of a possible alternative fluid implementation. If you always called registerFluid, things + should work pretty seamlessly, but if you didn't (gating with an isFluidRegistered check for example) + you should change to register anyway. This way, even if you're not default in the overall instance, you may + become default if you're the only mod present on a server, for example, or in a world save. + This should radically decrease the mixups caused by mod load ordering problems, and other issues around fluid + tracking. + - v99.99-pre-4209 Allow registering custom language adapters. + Allows external mods/library jars to provide language adapters for + languages not supported in native Forge. + - v99.99-pre-4208 MinecraftForge/FML@0da1263ff9ede99267c03728a1c823b8056d5e44 Enhance error output for bad textures a bit more and try and capture more types of error.. + - v99.99-pre-4207 Enhance error output for bad textures a bit more and try and capture more types of error.. + - v99.99-pre-4206 MinecraftForge/FML@be5ec06e3144d55a03d125f3ce364eade3771f4f Cleaning up the missing resource stack spam, and condensing the information into a usefully understandable format. + - v99.99-pre-4205 Cleaning up the missing resource stack spam, and condensing the information into a usefully understandable + format. + - v99.99-pre-4204 MinecraftForge/FML@ce791cb1f2cf983ef77b1e5c4028ddefab394062 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. + MinecraftForge/FML@852710962a9b6d7c8e2ca188c715eebb2da44c2a Clean up some dead code + - v99.99-pre-4203 Clean up some dead code + - v99.99-pre-4202 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. + - v99.99-pre-4201 Merge pull request #1791 from KingLemming/1.7.10-fluid + FCR Warning + Denial + - v99.99-pre-4200 Adds a warning to the FluidContainerRegistry when a mod does something stupid! Also denies the registration. + - v99.99-pre-4199 Merge pull request #1789 from KingLemming/1.7.10-fluid + 1.7.10 fluid + - v99.99-pre-4198 Fixes FluidContainerRegistry properly - no more corner case where client/server mods disagree. + Also clarifies the 2x Fluid registration error message somewhat. + - v99.99-pre-4197 Merge pull request #4 from MinecraftForge/1.7.10 + 1.7.10 + - v99.99-pre-4196 MinecraftForge/FML@4a753227adb805d29f3bf245c3f8427193c35544 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. + - v99.99-pre-4195 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. + - v99.99-pre-4194 Merge pull request #1784 from KingLemming/1.7.10-fluid + Change to FluidContainerRegistry + - v99.99-pre-4193 Fixes #1782 + - v99.99-pre-4192 Merge pull request #2 from MinecraftForge/1.7.10 + 1.7.10 + - v99.99-pre-4191 Merge pull request #1752 from AbrarSyed/patch1 + changed run configs to GradleStarts + - v99.99-pre-4190 Player sensitive version of Block.getPickBlock + Block.getPickBlock was patched in 1.7 but was overlooked in 1.8. + Closes: https://github.com/MinecraftForge/MinecraftForge/issues/1709 + - v99.99-pre-4189 Merge pull request #1775 from Prototik/patch-1 + [1.7.10] Fix FluidRegsitry.registerFluid + - v99.99-pre-4188 Fix FluidRegsitry.registerFluid + FluidRegistry: + ```java + static BiMap fluids = HashBiMap.create(); + static BiMap fluidIDs = HashBiMap.create(); + ... + public static boolean registerFluid(Fluid fluid) + { + if (fluidIDs.containsKey(fluid.getName())) + ^^^^^^^ + ``` + There is definitely should be fluids instead fluidIDs. This mistake broke many mods. + - v99.99-pre-4187 Updated FML: + MinecraftForge/FML@c8160311d580f2dfccdf796a5243e16844787cb6 Stop IllegalFormatConversionException thrown if @Mod has flagged client-only or server-only + MinecraftForge/FML@9a894952afb526436649f608f7af5992b97f044c Merge pull request #627 from GotoLink/patch-1 + MinecraftForge/FML@40faac64520d1a197f08eaa9a0f850e7df43359a Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. + - v99.99-pre-4186 Restore binary compatibility issues in FluidRegistry caused by recent changes. + - v99.99-pre-4185 MinecraftForge/FML@31cf2a9cab6d1977d31436220d9612eaa13d4e0f Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. + - v99.99-pre-4184 Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. + - v99.99-pre-4183 Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. + - v99.99-pre-4182 Copy fortress.dat from vanilla location + Fixes #1747 + If the dat file isn't in the dimension specific folder but is present in the vanilla data folder then copy it over. + - v99.99-pre-4181 You shouldn't be creating FluidStacks from unregistered Fluids. Warn clearly on failed registrations, and make a useful log message for failed fluidstack + creations. Should help a lot with tracking down broken mods that are doing this wrongly. + - v99.99-pre-4180 Allow for duplicate Fluid Blocks. It's annoying to be sure but just as with the OreDictionary, we'll have to handle it. + - v99.99-pre-4179 Fix formatting + - v99.99-pre-4178 Add in a fluidid transformer + - v99.99-pre-4177 Removed fluidID from ItemStack. + This fixes a rather huge issue where FluidStacks on the client could be desynced if a modder was unaware of it. + This is a breaking change but can be mitigated with a transformer to the getter getFluidID(). + - v99.99-pre-4176 Merge pull request #1771 from iChun/master + Readded but deprecated the old RenderPlayerEvent that were deleted. Sorry, Lex. + - v99.99-pre-4175 Readded but deprecated the old RenderPlayerEvent that were deleted. Sorry, Lex. + - v99.99-pre-4174 Merge pull request #1770 from iChun/master + Reimplement RenderPlayerEvent that was removed in the port to 1.8 from 1.7.10. + - v99.99-pre-4173 Reimplement RenderPlayerEvent that was removed in the port to 1.8 from 1.7.10. + RenderPlayerEvent.Specials was removed because the special effects are done in the LayerRenderer now. + - v99.99-pre-4172 Forge really should have always supported the concept of an "exact spawn". Individual world providers can still + change this behaviour of course, but for default maps it makes sense to support it as a config option. + - v99.99-pre-4171 MinecraftForge/FML@12ccf9cf49b76140841cdc5a459422ae4781de1a Rather than try to fall back to the backup level.dat in case of weirdness in the ID map, just fail hard. There is probably a serious modder derp in this case and there's nothing FML can do to recover the situation except avoid making it worse. + MinecraftForge/FML@e8cd368da30661ed2898fff232e2db787edcbdcc It's an IllegalState not an IllegalArgument *sigh* + MinecraftForge/FML@2be9c743424c92f8799a6af1d59d60edd65e6bf0 And fix itemblocks being removed, leaving behind a residual block. This is a legitimate action - use the missing mapping event to let the mod tell us about it + MinecraftForge/FML@7d8804cf656081d1570068f52e9bfc7140b21a65 You can't setAction to BLOCKONLY + MinecraftForge/FML@c73861efe67594ee9995bc93744cab06bd6647d1 Cherry-pick 01aaa7dc97480b381ca0d192ec65016d7baeb747 Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 + MinecraftForge/FML@94c45b48c1265e7c4f60f591d413fa545787d354 Fix json cache crash, handle the file much more cleanly. Probably an MC JIRA since it's a vanilla bug. Closes #619 + - v99.99-pre-4170 Merge pull request #627 from GotoLink/patch-1 + Stop IllegalFormatConversionException thrown + - v99.99-pre-4169 Fix json cache crash, handle the file much more cleanly. Probably an MC JIRA since + it's a vanilla bug. Closes #619 + - v99.99-pre-4168 Stop IllegalFormatConversionException thrown if @Mod has flagged client-only or server-only + %d is not a valid format for getModId(), which returns String. + - v99.99-pre-4167 Cherry-pick 01aaa7dc97480b381ca0d192ec65016d7baeb747 + Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 + - v99.99-pre-4166 Update FML - merge the 1.7.10 changes in to forge @ 1.8. Wow git is (sorta) AWESOME! + MinecraftForge/FML@6b0ae369eb9b8cf89eb9d53fe997a6e5ef222093 Try and improve performance of the registry by avoiding superType.cast. + MinecraftForge/FML@dfebcafd49550b8c3f90c6c028ef0d7f3a13e607 Something I meant to add a long time ago, but it got overlooked. My apologies. Presend the (int) dimension ID in the serverhello packet. This should be 100% backward compatible with existing servers but bumping a server to this version will allow clients with this version as well to now login in dimensions outside the byte range. Probably fixes a bunch of mods that add dimensions. + MinecraftForge/FML@6011419fa055c1375d05189f9bf0d86705c9c0ec Clean up my patch. Terrible person I am.. + MinecraftForge/FML@c6bbd0e82de3d8f7993d70aa7be3f883b3afbc47 Forgot that I need a noarg ctor. I'm so rusty. + MinecraftForge/FML@6edc1635de163c41b6b5dfe02bee13d6a9c5aa4d Need to load the dimension from disk - do it without filling out the player so that the normal player loading (including events) works properly + MinecraftForge/FML@4ca6f6e19f3c3147fcf48c58669f55478a9a1345 What a dumb oversight. One needs to copy the active substitution set to the active gamedata. Doesn't work well otherwise. + MinecraftForge/FML@6f6cec96be73b4c94999cf60dc00741f3f3c2cc2 Substitutions need to be activated when they're registered, otherwise they won't appear in world, ever. + MinecraftForge/FML@13ac015f0c36b8e2091ae332c556be315429f4c8 Change iterator behaviour for the registry - include substitutions in the standard iterator, so that vanilla MC methods visit them (so they can get textures etc). The fml special one only visits the absolute set, used mostly for sanity checking and serialization. + MinecraftForge/FML@24cb4a42c4e4bddde95c0e49d1f8b8bcc20c626d Enhance output of common FML errors in crash reports and server GUI. + MinecraftForge/FML@12ccf9cf49b76140841cdc5a459422ae4781de1a Rather than try to fall back to the backup level.dat in case of weirdness in the ID map, just fail hard. There is probably a serious modder derp in this case and there's nothing FML can do to recover the situation except avoid making it worse. + MinecraftForge/FML@e8cd368da30661ed2898fff232e2db787edcbdcc It's an IllegalState not an IllegalArgument *sigh* + MinecraftForge/FML@2be9c743424c92f8799a6af1d59d60edd65e6bf0 And fix itemblocks being removed, leaving behind a residual block. This is a legitimate action - use the missing mapping event to let the mod tell us about it + MinecraftForge/FML@7d8804cf656081d1570068f52e9bfc7140b21a65 You can't setAction to BLOCKONLY + MinecraftForge/FML@13df640d9d4516219b07778edd76efd2643019f6 Pull in a lot of the FML tweaks from 1.7 to 1.8 + MinecraftForge/FML@447beaa99ec828fb83796185d07c72ea28b056c9 Merge remote-tracking branch 'origin/1.7.10' + - v99.99-pre-4165 Merge remote-tracking branch 'origin/1.7.10' + Conflicts: + fml + - v99.99-pre-4164 Merge remote-tracking branch 'origin/1.7.10' + - v99.99-pre-4163 Pull in a lot of the FML tweaks from 1.7 to 1.8 + Merge remote-tracking branch 'origin/1.7.10' + Conflicts: + src/main/java/cpw/mods/fml/common/MissingModsException.java + - v99.99-pre-4162 MinecraftForge/FML@2afd55ab825fad3b07073c474cdb96b348701084 Fix scala mods, Closes #621 + MinecraftForge/FML@c541b08ef68161f437eeb7b22eabe27b20eebf55 Merge pull request #622 from diesieben07/scala-fix + MinecraftForge/FML@d5021417dd10f36dc3d1b68e4975eb91f7f46e68 Forgot the register handling bit. Registration should work now.. + MinecraftForge/FML@5a65c6568699acaade8243040d8552b1f2e2e28f OK, this is finally actually working, I think... + - v99.99-pre-4161 OK, this is finally actually working, I think... + - v99.99-pre-4160 Fixed mipmapping not being enabled by expanding 1x1 texture + - v99.99-pre-4159 Comment on previous commit fix - it worked. Thanks to skyboy and tterrag for investigating and verifying. + A chest as an acheivement icon will recreate the original problem, for note. + - v99.99-pre-4158 Experimental "fix" for the weird rendering in the Acheivements screen. Thanks skyboy for spotting this. + - v99.99-pre-4157 You can't setAction to BLOCKONLY + - v99.99-pre-4156 And fix itemblocks being removed, leaving behind a residual block. This + is a legitimate action - use the missing mapping event to let the mod + tell us about it + - v99.99-pre-4155 It's an IllegalState not an IllegalArgument *sigh* + - v99.99-pre-4154 Rather than try to fall back to the backup level.dat in case of weirdness + in the ID map, just fail hard. There is probably a serious modder derp in this + case and there's nothing FML can do to recover the situation except avoid + making it worse. + - v99.99-pre-4153 Forgot the register handling bit. Registration should work now.. + - v99.99-pre-4152 Merge pull request #622 from diesieben07/scala-fix + Fix scala mods, Closes #621 + - v99.99-pre-4151 Fix scala mods, Closes #621 + - v99.99-pre-4150 Updated FML: + MinecraftForge/FML@2a268cd5664b6562a4bf2a953a6a93fd8e111bd2 Improve mod list GUI, add sort and search + MinecraftForge/FML@951fc2d9fd7e7970c86accb1be095a24f7bfaf18 First attempt at making FMLControlledRegistry something a bit more generic than just blocks/items. + MinecraftForge/FML@410582222d9ba15d42dc47db0d3d6a84aeac2d22 Merge pull request #614 from tterrag1098/betterModList + MinecraftForge/FML@ba0b176430cdbc3573643a6e21d47013cfd1f0e0 Fix ModDiscoverer ignoring inner classes. + MinecraftForge/FML@9cc313eab9939724786f833f511a87c9957dbc72 Merge pull request #617 from diesieben07/innerclass-disc + MinecraftForge/FML@01aaa7dc97480b381ca0d192ec65016d7baeb747 Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 + MinecraftForge/FML@8cecc47b85db68e8e69f45641b1d843509dbe71d Merge pull request #620 from killjoy1221/extra-coremod-fix + MinecraftForge/FML@38d9a5f444815810dec3607f5b3b7ff1ac513d4c Enhance output of common FML errors in crash reports and server + Force load anonymous minecraft classes used in crash reports. This prevents some crashes being hiddedn behind class definiton exceptions.GUI. + - v99.99-pre-4149 MinecraftForge/FML@24cb4a42c4e4bddde95c0e49d1f8b8bcc20c626d Enhance output of common FML errors in crash reports and server GUI. + Force load anonymous minecraft classes used in crash reports. This prevents some crashes being hiddedn behind class definiton exceptions. + - v99.99-pre-4148 Enhance output of common FML errors in crash reports and server GUI. + - v99.99-pre-4147 Enhance output of common FML errors in crash reports and server GUI. + - v99.99-pre-4146 Merge pull request #620 from killjoy1221/extra-coremod-fix + Fixed typo causing coremods to be missed in certain situations. + - v99.99-pre-4145 Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 + - v99.99-pre-4144 MinecraftForge/FML@4ca6f6e19f3c3147fcf48c58669f55478a9a1345 What a dumb oversight. One needs to copy the active substitution set to the active gamedata. Doesn't work well otherwise. + MinecraftForge/FML@6f6cec96be73b4c94999cf60dc00741f3f3c2cc2 Substitutions need to be activated when they're registered, otherwise they won't appear in world, ever. + MinecraftForge/FML@13ac015f0c36b8e2091ae332c556be315429f4c8 Change iterator behaviour for the registry - include substitutions in the standard iterator, so that vanilla MC methods visit them (so they can get textures etc). The fml special one only visits the absolute set, used mostly for sanity checking and serialization. + - v99.99-pre-4143 Change iterator behaviour for the registry - include substitutions in the standard iterator, so that + vanilla MC methods visit them (so they can get textures etc). The fml special one only visits the + absolute set, used mostly for sanity checking and serialization. + Closes #618 + - v99.99-pre-4142 Substitutions need to be activated when they're registered, otherwise they won't appear in world, ever. + - v99.99-pre-4141 What a dumb oversight. One needs to copy the active substitution set to the active gamedata. Doesn't work well otherwise. + Closes #616 + - v99.99-pre-4140 Merge pull request #617 from diesieben07/innerclass-disc + Fix ModDiscoverer ignoring inner classes. + - v99.99-pre-4139 Merge pull request #1755 from simon816/custom-tileentity-data + Add getTileData() to TileEntity + - v99.99-pre-4138 Fix ModDiscoverer ignoring inner classes. + - v99.99-pre-4137 Add getTileData() to TileEntity + - The same idea as Entity.getEntityData() + - v99.99-pre-4136 MinecraftForge/FML@6b0ae369eb9b8cf89eb9d53fe997a6e5ef222093 Try and improve performance of the registry by avoiding superType.cast. + MinecraftForge/FML@dfebcafd49550b8c3f90c6c028ef0d7f3a13e607 Something I meant to add a long time ago, but it got overlooked. My apologies. Presend the (int) dimension ID in the serverhello packet. This should be 100% backward compatible with existing servers but bumping a server to this version will allow clients with this version as well to now login in dimensions outside the byte range. Probably fixes a bunch of mods that add dimensions. + MinecraftForge/FML@6011419fa055c1375d05189f9bf0d86705c9c0ec Clean up my patch. Terrible person I am.. + MinecraftForge/FML@c6bbd0e82de3d8f7993d70aa7be3f883b3afbc47 Forgot that I need a noarg ctor. I'm so rusty. + MinecraftForge/FML@6edc1635de163c41b6b5dfe02bee13d6a9c5aa4d Need to load the dimension from disk - do it without filling out the player so that the normal player loading (including events) works properly + - v99.99-pre-4135 Need to load the dimension from disk - do it without filling out the player so that the normal player loading (including events) + works properly + - v99.99-pre-4134 Forgot that I need a noarg ctor. I'm so rusty. + - v99.99-pre-4133 Clean up my patch. Terrible person I am.. + - v99.99-pre-4132 Something I meant to add a long time ago, but it got overlooked. My apologies. Presend the (int) + dimension ID in the serverhello packet. This should be 100% backward compatible with existing servers + but bumping a server to this version will allow clients with this version as well to now login in + dimensions outside the byte range. Probably fixes a bunch of mods that add dimensions. + - v99.99-pre-4131 Merge pull request #1754 from JamiesWhiteShirt/master + Added newVolume and newPitch to PlaySoundAtEntityEvent. + - v99.99-pre-4130 Added newVolume and newPitch to PlaySoundAtEntityEvent. Deprecated ForgeEventFactory.onPlaySoundAt, added replacement ForgeEventFactory.onPlaySoundAtEntity. + - v99.99-pre-4129 changed run configs to GradleStarts + - v99.99-pre-4128 Merge pull request #1723 from Geforce132/master + Add an EntityMountEvent. + - v99.99-pre-4127 Merge pull request #614 from tterrag1098/betterModList + Improve mod list GUI, adds sort buttons and a search bar + - v99.99-pre-4126 First attempt at making FMLControlledRegistry something a bit more generic than just blocks/items. + It probably doesn't work yet though. + - v99.99-pre-4125 Try and improve performance of the registry by avoiding superType.cast. + - v99.99-pre-4124 -Added EntityMountEvent. + - v99.99-pre-4123 Improve mod list GUI, add sort and search + - v99.99-pre-4122 Merge pull request #1745 from diesieben07/ingamegui-fix + Fix jukebox message being too low + - v99.99-pre-4121 Fix jukebox message being too low with forge + - v99.99-pre-4120 Updated FML: + MinecraftForge/FML@3e7ae47f8f5d642b256adbe8b3395bb40daf85da Fix Event Bus Access Issues + MinecraftForge/FML@c8e2a5f377ddf8a35cceda6a14697dbe8cad4ca8 Fixed WorldInfo properties not loaded + MinecraftForge/FML@7f96b2c69ab8a2ed07b5b786b3d679ea4c509121 Fix Debug packet logger on local memory connections. + - v99.99-pre-4119 Fix Debug packet logger on local memory connections. + - v99.99-pre-4118 Merge pull request #1739 from robin4002/master + Remove translation and add a note for contributors + - v99.99-pre-4117 remove translation and add a note for contributors + - v99.99-pre-4116 Merge pull request #610 from Zot201/1.8 + Fixed WorldInfo properties not loaded + - v99.99-pre-4115 Fixed WorldInfo properties not loaded + - v99.99-pre-4114 Merge pull request #609 from Zot201/1.8 + Add transformer to allow protected/private classes to use the event bus. + - v99.99-pre-4113 Merge pull request #1733 from Zot201/enchantment-fix + Fixed enchanting table applying secondary enchs. Closes #1428 + - v99.99-pre-4112 Fixed enchanting table applying secondary enchs. + - v99.99-pre-4111 Merge pull request #1721 from me4502/update-event + Added NeighborNotifyEvent fired on server side only, allows for monitoring and disabling world 'physics' updates. + - v99.99-pre-4110 Add NeighborNotiftyEvent. + - v99.99-pre-4109 Fix Event Bus Access Issues + 1) Allow overriding methods in subclass without extra SubscribeEvent annotations + 2) Transform event subscribers to have public method/class + - v99.99-pre-4108 Fix compile error in ClientHax's PR. + - v99.99-pre-4107 Merge pull request #1729 from clienthax/master + Add method to set entity placement type. + - v99.99-pre-4106 Current spawner implementation checks the EntitySpawnPlacementRegistry hashmap to check where a entity should spawn + as there is no way to modify this without the use of reflection or a AT, you can not specify where you want your entity to spawn + adding this helper method will allow developers to specify where they want their entity to spawn. + Update EntitySpawnPlacementRegistry.java.patch + - v99.99-pre-4105 Merge pull request #1730 from Tmtravlr/master + Added Nether Fortress chest to the ChestGenHooks + - v99.99-pre-4104 Added Nether Fortress chest to the ChestGenHooks + I tried to follow the directions on + https://github.com/MinecraftForge/MinecraftForge/wiki/If-you-want-to-contribute-to-Forge + as best as I could. =) + If anything is wrong, let me know and I'll change it! + - v99.99-pre-4103 Hopefully fix NPE during baking of empty vanilla item models + - v99.99-pre-4102 Fire WorldEvent.Load for Client worlds. Closes #1719 + - v99.99-pre-4101 Make Container.mergeItemStack respect Slot.isValidItem Closes #1630 + - v99.99-pre-4100 Fix JukeBoxes not storing the inserted record. All TE's in minecraft are in net.minecraft.tileentity EXCEPT JukeBoxes. Closes #1633 Closes #1714 + - v99.99-pre-4099 Fix NPEs in last commit. + - v99.99-pre-4098 Fix NPEs in mlast commit. + - v99.99-pre-4097 Updated FML: + MinecraftForge/FML@c9cf3136c265b2e8e46eab102b2310a9312b8cfb New @Mod properties to define which environment to load the mod on. + clientSideOnly will only be loaded in the Client environment. + serverSideOnly will only be loaded in the Dedicated server environment. + Combine with acceptedMinecraftVersions to prevent users from loading the mod in the incorrect environment. + - v99.99-pre-4096 New @Mod properties to define which environment to load the mod on. + clientSideOnly will only be loaded in the Client environment. + serverSideOnly will only be loaded in the Dedicated server environment. + Combine with acceptedMinecraftVersions to prevent users from loading the mod in the incorrect environment. + - v99.99-pre-4095 Updated FML: + MinecraftForge/FML@5eff40897545c9e6f597a202bc9e86c3b07761ad Filter more known libraries from potential mod canidates. + MinecraftForge/FML@feb4c436db27a249dd5190023edd38cb5884e90b Quiet ClassPatchManager debug spam by default. Reenable using -Dfml.debugClassPatchManager=true. + MinecraftForge/FML@41e806fa950839bf901ebf9c18d0c632a7c5538c Fix double decoding of UTF8 characters in lang files. + - v99.99-pre-4094 Fix double decoding of UTF8 characters in lang files. + - v99.99-pre-4093 Fixed using items on the wrong block client side caused by iChuns eyeheight update. + - v99.99-pre-4092 Merge pull request #1718 from iChun/master + Reimplement variable eyeHeight for players which was removed in the 1.7 to 1.8 port. + - v99.99-pre-4091 Reimplement variable eyeHeight for players which was removed in the 1.7 to 1.8 port. + - v99.99-pre-4090 Removed event bus call from the ModelLoader + - v99.99-pre-4089 Merge pull request #1708 from matthewprenger/PR-1 + Ability to add prefixes and suffixes to the player's display name + - v99.99-pre-4088 Add safty to URL detection in chat. Closes #1712 + - v99.99-pre-4087 RenderItem can now use baked quad color + - v99.99-pre-4086 Added a default white texture; Fixed B3DLoader crashing when the brush has empty texture specified + - v99.99-pre-4085 Merge pull request #1711 from Parker8283/patch-1 + Added ATs for EnumFacing + - v99.99-pre-4084 Added ATs for EnumFacing + This publics the VALUES array and HORIZONTALS array in EnumFacing, thus giving modders access to these arrays, much like ForgeDirection had. + - v99.99-pre-4083 Quiet ClassPatchManager debug spam by default. Reenable using -Dfml.debugClassPatchManager=true. + - v99.99-pre-4082 Filter more known libraries from potential mod canidates. + - v99.99-pre-4081 Attributes.put (de)normalization now works as intended + - v99.99-pre-4080 Add the ability to add prefixes and suffixes to the player's display name. + - v99.99-pre-4079 Hold a weak reference to the Minecraft fake player object. Closes #1705 + - v99.99-pre-4078 Merge pull request #1689 from matthewprenger/master + Minor tweak to UsernameCache to also cache usernames of offline players + - v99.99-pre-4077 Updated FML + - v99.99-pre-4076 Moved transformer wrappers to a separate package (should fix signing errors), fixed debug mods not loading in forgedev (string comparison). + - v99.99-pre-4075 ModelRotation.getMatrix() now returns the correct matrix; fixed the application of custom transformations to vanilla models; fixed application of transformations to B3D models; fixed the culling of rotated vanilla models + - v99.99-pre-4074 Merge pull request #599 from diesieben07/master + Handle empty lines in language files gracefully + - v99.99-pre-4073 Alternative models work once again + - v99.99-pre-4072 Handle empty lines in language files gracefully + - v99.99-pre-4071 Updated FML + - v99.99-pre-4070 Merge pull request #597 from RainWarrior/blame + Added blaming of coremods and mods not targetting Java 6 + - v99.99-pre-4069 Added blaming of coremods and mods not targetting Java 6 + - v99.99-pre-4068 fix ModelLoader.setCustomModelResourceLocation not storing same item with different metadata values + - v99.99-pre-4067 Try a maven mirrior to fix build issues. + - v99.99-pre-4066 made renderLayer ThreadLocal, now it should hold correct value for use inside custom baked models + - v99.99-pre-4065 Reworked vanilla texture resolution, hopefully fixes NPE bug in FaceBakery + - v99.99-pre-4064 fixed NPE during loading of B3D models without textures/brushes. + changed default B3D color to have full opacity. + - v99.99-pre-4063 Minor tweak to UsernameCache to also cache usernames of offline players. + - v99.99-pre-4062 Fixed being kicked from the server while swimming. + - v99.99-pre-4061 Fixed debugging Dedicated server in Forge Dev workspace. + - v99.99-pre-4060 Fixed potential NPEs in Structure code caused by componenets not being able to load. + - v99.99-pre-4059 Fixed potential NPEs in Structure code caused by componenets not being able to load. Closes #1686 + - v99.99-pre-4058 Added ability for language files to opt-in to loading using normal Java properties format. + This allows for escape characters, as well as keeping %d and %f replacements in tact. + To opt-in, the lang file must have this comment line: + # PARSE_ESCAPES + As this is opt-in, any errors resulting from misused format strings is on the modder/end user. + - v99.99-pre-4057 Fixed BlockBush and BlockCrops not respecting custom soils. Closes #1683 + - v99.99-pre-4056 Fixed InitMapGenEvent's fire order so values are used. And added OCEAN_MONUMENT type. Closes #1681 + - v99.99-pre-4055 Restore binary backwards compatibility + - v99.99-pre-4054 ModelBakeEvent now has ModelLoader as an argument instead of ModelBakery; Added various static hooks to ModelLoader to allow registering model-related information before it's needed (prevents file-not-found errors on first baking pass); ModelLoader waits until ModelBakeEvent is done before showing any missing model exceptions; It's now possible to define models completely in-code (as illustrated by ModelBakeEventDebug). + - v99.99-pre-4053 Bump version to 11.14.1 for next development cycle. + - v99.99-pre-4052 Updated FML: + MinecraftForge/FML@1de3bf733aef754f15de55006b1750376871feb0 Fix FML's package for net.miencraftforge on maven. Fixes uploading of new builds. Note: 1.7.10 builds are bug fixes only while FML/Forge for 1.8 stabelizes. + MinecraftForge/FML@05ecefb53857ecc1dc52d4a577ed593c26da9659 Update to ASM5 for Java 8 support + MinecraftForge/FML@1112c455b9758c38eab385f48578bad17c0180f9 Merge pull request #595 from Grinch/master + - v99.99-pre-4051 Fixed tracking of UV locking state. Closes #1679 + - v99.99-pre-4050 Updated FML: MinecraftForge/FML@22c9656196dbbea8ed983663d536c3ca272d7282 Reset S->C CustomPayload data after Write, allowing the same packet to be written multiple times. + - v99.99-pre-4049 Fixed ItemFrames not having a model. Closes #1678 + - v99.99-pre-4048 Reset S->C CustomPayload data after Write, allowing the same packet to be written multiple times. Closes #588 + - v99.99-pre-4047 Fixed Buttons not dropping anything when broken. Closes #1676 + - v99.99-pre-4046 Fixed domain support in ArmorMaterial texture name. Closes #1675 + - v99.99-pre-4045 Updated FML: + MinecraftForge/FML@d00feb58c762b0bbc506d79faf1ce40bc96732e9 Remove debug code that was causing console spam in Forge. + MinecraftForge/FML@1de3bf733aef754f15de55006b1750376871feb0 Fix FML's package for net.miencraftforge on maven. Fixes uploading of new builds. Note: 1.7.10 builds are bug fixes only while FML/Forge for 1.8 stabelizes. + MinecraftForge/FML@05ecefb53857ecc1dc52d4a577ed593c26da9659 Update to ASM5 for Java 8 support + MinecraftForge/FML@1112c455b9758c38eab385f48578bad17c0180f9 Merge pull request #595 from Grinch/master + MinecraftForge/FML@9c3013e02af1bd2f724d34a30e0b880b6e131645 Merge remote-tracking branch 'origin/1.8' + - v99.99-pre-4044 Merge remote-tracking branch 'origin/1.8' + - v99.99-pre-4043 Merge remote-tracking branch 'origin/1.8' + - v99.99-pre-4042 Merge pull request #595 from Grinch/master + Update to ASM5 for Java 8 support, IF ANYONE MAKES A MOD THAT REQUIRES JAVA8 BEFORE MINECRAFT FORCES IT ALL USERS REQUESTING SUPPORT WILL BE BANNED FROM ALL FORGE RELATED SERVICES. + - v99.99-pre-4041 Removed leftover debug messages + - v99.99-pre-4040 Merge pull request #1666 from TechStack/1.8 + Fixes issue #1552 Where the flowIntoBlock method was not setting the Block to the fluid and causing crashes + - v99.99-pre-4039 Merge pull request #1664 from Lunatrius/fix-debug + Fixed debug text rendering one line to low. + - v99.99-pre-4038 Closes #1552 + Set the destination block the to the fluid. + In the previous code the destination block was still Air and would would + cause a crash because air doesn't have a property for LEVEL + - v99.99-pre-4037 Merge pull request #1521 from RainWarrior/model-system + Model loader registry + - v99.99-pre-4036 Added model loader registry + Entry point: ModelLoaderRegistry + loader interface: ICustomModelLoader + custom model: IModel + ModelLoader is responsible for splicing into vanilla model system. + (you probably don't need to use it directly) + Interop with vanilla models isn't great yet + (vanilla models can't refer to custom ones as parents), will improve in + the future. + Includes loader for B3D models, with animation support + (net.minecraftforge.client.model.b3d). + Blender export plugin with compatible coordinate system: + https://github.com/RainWarrior/B3DExport + OBJ loader is being written, will be included at some point in the + future. For now you can convert OBJ to B3D via blender, or wait. + - v99.99-pre-4035 Update to ASM5 for Java 8 support + SpecialSource updated ASM5 and ForgeGradle supports ASM5 as well but + neither FML or Forge were actually updated to support ASM5 opcodes. This + commit resolves this. + - v99.99-pre-4034 Don't skip the first line when rendering (debug) text. + - v99.99-pre-4033 Merge pull request #1646 from Ivorforce/patch-1 + Fix fluid tanks incorrectly reading NBT when empty + - v99.99-pre-4032 Updated FML: + MinecraftForge/FML@a55e4124531119f1c9c023cff74cfa09b49ef0e0 Save the mod list of players in their NetworkDispatcher (Make it accessable for mods) + MinecraftForge/FML@69d479d46ae658c5a5c2c00081be3df38e38c748 Fixed getEffectiveSide() for Netty Server threads + MinecraftForge/FML@0f9a33cf14165ddd424a7d82c2178cf5854bf32f Exclude only log4j2 queue from class loader + - v99.99-pre-4031 Merge pull request #591 from Minecrell/patch-1 + Exclude only log4j2 queue from class loader + - v99.99-pre-4030 Fix fluid tanks incorrectly reading NBT when empty + If the Empty flag was set, the tank would not correctly read the data, keeping the outdated FluidStack instead. This is especially relevant with updatable TileFluidHandler TEs. + - v99.99-pre-4029 Merge pull request #1647 from Parker8283/fluid-icons + Re-enabled Icon setting for Fluids + - v99.99-pre-4028 Merge pull request #1645 from Lunatrius/chat-npe-fix + Fixed NPE when canceling ClientChatRecievedEvent. Fixes #1644 + - v99.99-pre-4027 Merge pull request #575 from lumien231/1.8 + Save the mod list of players in their NetworkDispatcher + - v99.99-pre-4026 Re-enabled Icon setting for Fluids + - v99.99-pre-4025 Exclude only log4j2 queue from class loader + Right now the complete com.mojang package is excluded from the LaunchClassLoader on the server. This means mods can't transform authlib for example which doesn't need to be excluded for the UI to work. By excluding only the specific log4j2 QueueLogAppender, mods can also transform the classes in the com.mojang.authlib package. + - v99.99-pre-4024 Fixed NPE when canceling ClientChatRecievedEvent. Fixes #1644 + - v99.99-pre-4023 Silently eat exceptions when getting a TE's rendering bounding box, this 'fixes' Bukkit servers screwing up world data and causing clients to crash. + - v99.99-pre-4022 Merge pull request #1635 from asiekierka/master + Fix shouldRefresh being too broad in tile entity update + - v99.99-pre-4021 fix shouldRefresh being too broad in tile entity update + - v99.99-pre-4020 Merge pull request #1602 from Chicken-Bones/1.8 + Allow blocks to render in multiple layers + - v99.99-pre-4019 Merge pull request #1615 from lumien231/master + Fix versionCheck config option + - v99.99-pre-4018 Merge pull request #1627 from CovertJaguar/tile-refresh + Bulk Chunk Data packets should also check TileEntity.shouldRefresh(). + - v99.99-pre-4017 Fix value passed for Item.getModel useRemaining argument. Closes #1623 + - v99.99-pre-4016 Made Chunk.fillBlock respect TileEntity.shouldRefresh. + - v99.99-pre-4015 Call World.init from DimensionManager.initDimension Closes #1551 + - v99.99-pre-4014 Fix potential NPE when loading a single player world where you were saved in a unloaded dimension. Closes #1575 + - v99.99-pre-4013 Bulk Chunk Data packets should also check TileEntity.shouldRefresh(). + - v99.99-pre-4012 Fix versionCheck config option + - v99.99-pre-4011 Merge pull request #1609 from lumien231/1.8 + Fixes #1603: Moving the start of the update thread to the pre init of the forge mod container + - v99.99-pre-4010 Fixes #1603: Moving the start of the update thread to the pre init of the forge mod container + - v99.99-pre-4009 Allow blocks to render in multiple layers + - v99.99-pre-4008 Fix recipies for stone variants. + - v99.99-pre-4007 Merge pull request #1592 from palechip/1.8 + Fix Scoreboard rendering for the sidebar. + - v99.99-pre-4006 Fix MC-30864 (sending web links in chat) + - v99.99-pre-4005 Merge pull request #1491 from killjoy1221/master + Fix MC-30864 (sending web links in chat) + - v99.99-pre-4004 Merge pull request #578 from HEmile/1.8 + Fixed getEffectiveSide() for Netty Server threads + - v99.99-pre-4003 Fix crafting of non-oak fences/gates. + - v99.99-pre-4002 Merge pull request #1338 from MinestrapTeam/renderpane + Fix Stained Glass pane rendering issues + - v99.99-pre-4001 Added chests to the ore dictionary. + - v99.99-pre-4000 Removed exclusion of white stained glass recipes in ore dictionary. + - v99.99-pre-3999 Merge pull request #1503 from Kittychanley/master + Removed exclusion of white stained glass recipes in ore dictionary. + - v99.99-pre-3998 Fixed getEffectiveSide() for Netty Server threads + - v99.99-pre-3997 Fix Scoreboard rendering for the sidebar. + - v99.99-pre-3996 Fix BlockSnapshots not firing correctly due to patch mixup in 1.8 update. Closes #1591 + - v99.99-pre-3995 Merge pull request #1586 from Lunatrius/fix-chat-1.8 + [1.8] Fixed messages not being added to the chat history + - v99.99-pre-3994 Fixed messages not being added to the chat history and ClientCommandHandler not being called when sleeping. + - v99.99-pre-3993 Merge pull request #1581 from Lunatrius/fix-chat + Fixed messages not being added to the chat history + - v99.99-pre-3992 MinecraftForge/FML@5a4d362293fe70e1421d1f22c4a195944731d6ba Finish removing marker in mapping entry names. FMLMissingMappingsEvent/FMLModIdMappingEvent should fire with correct names now. + - v99.99-pre-3991 Fix incorrect logic in world change clumping. + - v99.99-pre-3990 Fix incorrect logic in world change clumping. + - v99.99-pre-3989 Remove our changes to Stitcher slot allocation. + - v99.99-pre-3988 Fixed messages not being added to the chat history and ClientCommandHandler not being called when sleeping. + - v99.99-pre-3987 Finish removing marker in mapping entry names. FMLMissingMappingsEvent/FMLModIdMappingEvent should fire with correct names now. + - v99.99-pre-3986 Remove our changes to Stitcher slot allocation. + - v99.99-pre-3985 MinecraftForge/FML@e3785c28930a218cf9374458c67c34e7fba17922 Ensure that EntitySpawn and OpenGUI packets are handled in the world thread. Also log all errors that are thrown in FutureTasks. + - v99.99-pre-3984 Ensure that EntitySpawn and OpenGUI packets are handled in the world thread. + Also log all errors that are thrown in FutureTasks. + - v99.99-pre-3983 Fix userdev for new BlockState change. + - v99.99-pre-3982 Merge pull request #1518 from RainWarrior/model-event + Added model bake event, ISmartBlock/itemModel, Block.getExtendedState, IExtendedState and IUnlistedProperty + - v99.99-pre-3981 Untie ItemModelMesher from using Item Ids internally by implementing our own simple mechanics using Trove. + - v99.99-pre-3980 Fix EnumHelper for new ArmorTexture argument. + - v99.99-pre-3979 Fix texture stitcher not using all avalible spaces. + - v99.99-pre-3978 Fix texture stitcher not using all avalible spaces. Closes #1557 + - v99.99-pre-3977 Fixed NPE thrown when brewing event is fired and not all slots are filled. + - v99.99-pre-3976 Fixed log spam when breaking DoublePlants. Closes #1555 + - v99.99-pre-3975 Fix missed patch causing Dispensed Armor to go into the wrong slot. Closes #1560 + - v99.99-pre-3974 Make daylight sensor recipe use ore dictionary wooden slabs Closes #1565 + - v99.99-pre-3973 Fixed NPE thrown when brewing event is fired and not all slots are filled. Closes #1564 + - v99.99-pre-3972 Unbind Shaped/Shapeless Ore Recipies from Array list to normal List. + - v99.99-pre-3971 Expand PlayerWakupEvent to expose the three parameters passed into EntityPlayer.wakeUp. + - v99.99-pre-3970 Expand PlayerWakupEvent to expose the three parameters passed into EntityPlayer.wakeUp. Closes #1486 + - v99.99-pre-3969 Improved Control of Enchantment.canApplyTogether() in Mod Enchantments, allowing both enchantments to determine if they can apply together. Closes #1434 + - v99.99-pre-3968 Improved Control of Enchantment.canApplyTogether() in Mod Enchantments, allowing both enchantments to determine if they can apply together. + - v99.99-pre-3967 Changed ToolMaterial's repair material to ItemStack version to allow metadata sensitive versions. + - v99.99-pre-3966 Changed ToolMaterial's repair material to ItemStack version to allow metadata sensitive versions. Closes #1355 + - v99.99-pre-3965 Fix invalid argument being passed to Block.isNormalCube from World.updateNeighbors. Closes #1339 and Closes #1346 + - v99.99-pre-3964 Add quartz_ore tool init, more mojang special casing -.- Closes #1333 and Closes #1335 + - v99.99-pre-3963 Add quartz_ore tool init, more mojang special casing -.- + - v99.99-pre-3962 Added PotionBrewEvent.Pre/Post. To allow for modification and cancelation of Brewing. Closes #1248 + - v99.99-pre-3961 Added PotionBrewEvent.Pre/Post. To allow for modification and cancelation of Brewing. + - v99.99-pre-3960 Add LivingHealEvent called from EntityLivingBase.heal() Closes #1282 + - v99.99-pre-3959 Add LivingHealEvent called from EntityLivingBase.heal() + - v99.99-pre-3958 Added CreateSpawnPosition event. + - v99.99-pre-3957 Added CreateSpawnPosition event Closes #1053 + - v99.99-pre-3956 Cleanup deprecated code, and TODOs in OreDictionary. Down-typed things from ArrayList to List. Asking for the ores with a null stack will now throw an Exception. + - v99.99-pre-3955 Add "sand" to the OreDictionary + - v99.99-pre-3954 Add "sand" to the OreDictionary Closes #1487 + - v99.99-pre-3953 Fixed bug in ServerConfigurationManager.transferPlayerToDimension where it would send the old dimension's information. Closes #1548 + - v99.99-pre-3952 Fixed bug in ServerConfigurationManager.transferPlayerToDimension where it would send the old dimension's information. + - v99.99-pre-3951 Added Explosion Start and Detonate events to control explosion. + - v99.99-pre-3950 Added Explosion Start and Detonate events to control explosion. Closes #1469 + - v99.99-pre-3949 Merge pull request #1547 from Draco18s/patch-1 + Added tessellator calls to render the block's back faces, so that the liquid properly renders when the player is immersed in the fluid. + - v99.99-pre-3948 Add GuiScreenEvents for keyboard and mouse input + - v99.99-pre-3947 Save the mod list of players in their NetworkDispatcher (Make it accessable for mods) + - v99.99-pre-3946 Update RenderBlockFluid.java + Added tessellator calls to render the block's back faces, so that the liquid properly renders when the player is immersed in the fluid. + - v99.99-pre-3945 Added model bake event (allows mods to insert custom baked models, much like TextureStitchEvent allows to load custom textures), ISmartBlock/ItemModel (ability form models to react to block/item states), Block.getExtendedState, support for unlisted properties in block states. Includes example implementation of http://imgur.com/a/FyyJX + - v99.99-pre-3944 Only call blockBreak when block itself changes, not just meta. Fixes bottles poping out of brewing stands. + - v99.99-pre-3943 Fix finding of spawn location for mobs. Closes #1546 + - v99.99-pre-3942 Remove debug patch I left in. + - v99.99-pre-3941 Updated FML: + MinecraftForge/FML@9c8ca4a4e3c4acc4980535e5c60da169b75a7810 Unlink banner block and item id. Mojang should of matched these up but they didn't -.- + MinecraftForge/FML@84a101f344b8fc21de1201fde717fbcbcba2aa79 Update Dev mcp mappings to 11-30 snapshot. + - v99.99-pre-3940 Update Dev mcp mappings to 11-30 snapshot. + - v99.99-pre-3939 Unlink banner block and item id. Mojang should of matched these up but they didn't -.- + - v99.99-pre-3938 Fix stickey pistons not retracting properly. + - v99.99-pre-3937 Fixed blocks not breaking properly when instantly destroied. + - v99.99-pre-3936 Fixed vanilla issue where exceptions in World tasks would not be logged. + - v99.99-pre-3935 Fix NPE with BlockSnapshots that caused items with TileEntities to be used up in creative mode. + - v99.99-pre-3934 Fixed vanilla bug where top part of double plants would flicker a tifferent texture before dissapearing. + - v99.99-pre-3933 Fix BlockPane's connection detection. + - v99.99-pre-3932 Fixed snow layers not being able to stack more then twice. Closes #1534 + - v99.99-pre-3931 Fixed Entities not being able to climb ladders, Closes #1535 + - v99.99-pre-3930 Fixed Entity extended properties init order. Closes #1532 + - v99.99-pre-3929 Fix interacting with entities. + - v99.99-pre-3928 Updated FML: + MinecraftForge/FML@36644e97714b46dbbb24416febdde1332a3e753c Finalize modded handshakes in the World tick thread. Prevents potential CMEs when login event takes to long to fire. + - v99.99-pre-3927 Fix not being able to place blocks in liquids, and related issues. + - v99.99-pre-3926 Fix debug screen not showing grey background. Closes #1529 + - v99.99-pre-3925 Finalize modded handshakes in the World tick thread. Prevents potential CMEs when login event takes to long to fire. + - v99.99-pre-3924 Fix destroy particles not being added. Closes #1528 + - v99.99-pre-3923 Update RecipeSorter for new 1.8 recipies. + - v99.99-pre-3922 Fix potential NPE in Block.isToolEffective + - v99.99-pre-3921 Fix wrong state being passed to Block.getDrops + - v99.99-pre-3920 Fix Entityies not taking damage correctly. Closes #1511 + - v99.99-pre-3919 Fix inverted logic preventing blocks from breaking. + - v99.99-pre-3918 Fixed crash with caomparators due to wrong position. Closes #1512 + - v99.99-pre-3917 Fix creative picking a CommandBlock minecart returning wrong item. Closes #1523 + - v99.99-pre-3916 Fix creative picking a CommandBlock minecart returning wrong item. Closes #1523 + - v99.99-pre-3915 Fix acedential inversion causing some tress to not have leaves. Closes #1522 + - v99.99-pre-3914 Fix fog colors, Closes #1524 + - v99.99-pre-3913 Fix local variable conflict in Forge patch and latest MCP mappings. + - v99.99-pre-3912 Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8. + Some notes: + Almost all int x, int y, int z parameters have been changed to BlockPos class + ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing. + All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml + Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it. + Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated. + As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format. + Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata. + Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits. + - v99.99-pre-3911 Removed exclusion of white stained glass recipes in ore dictionary. Closes #1502 & #1481 + - v99.99-pre-3910 Merge pull request #1492 from XCompWiz/clientrain + Fixes client-side fake rain + - v99.99-pre-3909 Fixes client-side fake rain + Changes the updateWeather function in WorldServer to only send the + weather info to players in the correct dimension, rather than all + players on the server. This is what causes the client-side rain, as the + client believes that it has started raining locally, rather than in + another dimension. + - v99.99-pre-3908 Fix MC-30864 (sending web links in chat) + - v99.99-pre-3907 Add details message to MissingModsException and WrongMinecraftVersionException to make the Crash logs more useful. + - v99.99-pre-3906 Add duplicate protection to ModDiscoverer, do not process files in the mods directory if we already found them in the classpath. {Such as if LiteLoader is installed and added it} Closes #557 + - v99.99-pre-3905 Merge pull request #1376 from founderio/patch-1 + Modify WavefrontObject to allow '.' in group object names + - v99.99-pre-3904 Player sensitive version of Block.getPickBlock Closes #1348 + - v99.99-pre-3903 Fix slots being black due to vanilla blending leakage Forge fixes. Closes #1325 & #1242 + - v99.99-pre-3902 Merge pull request #1005 from luacs1998/patch-1 + Create CONTRIBUTING.md + - v99.99-pre-3901 Merge pull request #547 from Parker8283/1.8 + Re-enabled Entity-Render registration + - v99.99-pre-3900 Re-enabled Entity-Render registration + - v99.99-pre-3899 Merge pull request #1450 from Adubbz/master + Fixed desert list initialization. Fixes #1447 + - v99.99-pre-3898 Bump version for new RB. + - v99.99-pre-3897 Fix logic error in Blodd's Snapshot capture that caused blocks to not be updated to the client. Closes #1451 + - v99.99-pre-3896 Merge pull request #1461 from Azanor/master + Fix for biome weights under 10 + - v99.99-pre-3895 Fix for biome weights under 10 + This solves the problem where custom mod biomes with weights under 10 + not being generated in the world. + Cleaned up the code and made the patch smaller + - v99.99-pre-3894 Merge pull request #1368 from matthewprenger/patch-1 + Added username cache + - v99.99-pre-3893 Add username cache for determining a player's last known username + - v99.99-pre-3892 Merge pull request #1457 from AbrarSyed/master + implemented crowdin support + - v99.99-pre-3891 Merge pull request #545 from bspkrs/1.8 + changed pass-thru method name to fix MCP name conflict + - v99.99-pre-3890 changed pass-thru method name to fix MCP name conflict + fixed a few old javadoc object name mistakes + - v99.99-pre-3889 implemented crowdin support + - v99.99-pre-3888 Add the ability to register custom variant names in ModelBakery. + - v99.99-pre-3887 Compleetly disable stencil bits unless told not to by using the -Dforge.forceDisplayStencil=true flag. Should solve the 'menu in bottom corner' issue with Intel Integrated graphics cards. + - v99.99-pre-3886 Merge pull request #1418 from Parker8283/wakeupevent + Added PlayerWakeUpEvent + - v99.99-pre-3885 Added PlayerWakeUpEvent + - v99.99-pre-3884 Fixed desert list initialization. Fixes #1447 + - v99.99-pre-3883 Removed unneeded rebuild, was toying with where to put it. + - v99.99-pre-3882 Automatically register BlockStates when block is initally registered, and clear the list when new snapshots are injected. Modders DO NOT touch the registry in Block directly. Closes #537 + - v99.99-pre-3881 Merge pull request #1364 from Adubbz/master + Fixed biome weights not working with non multiples of 10 + - v99.99-pre-3880 Fix vanilla lighting issue and blending issues in achievements gui. Closes #1445 + - v99.99-pre-3879 Fix FML's package for net.miencraftforge on maven. Fixes uploading of new builds. + Note: 1.7.10 builds are bug fixes only while FML/Forge for 1.8 stabelizes. + - v99.99-pre-3878 MinecraftForge/FML@d00feb58c762b0bbc506d79faf1ce40bc96732e9 Remove debug code that was causing console spam in Forge. + - v99.99-pre-3877 Remove debug code that was causing console spam in Forge. + - v99.99-pre-3876 Disable by default the Display Stencil bits. Keep FBO bits. Acording to Mumfery and ChickenBones, it should not be nessasary and should solve the 1/4 main menu issue. Use -Dforge.forceDisplayStencil=true to enable old behavior. + - v99.99-pre-3875 Merge pull request #1219 from Lunatrius/master + Prevent client only commands from bleeding through to the server. + - v99.99-pre-3874 Update TerminalTransformer for new FML package. Closes #535 + - v99.99-pre-3873 General class name cleanup, spelling mistakes and FF decompile issues. + - v99.99-pre-3872 Take control over Item.BLOCK_TO_ITEM map and register Block's to this map from GameRegistry. + - v99.99-pre-3871 Renamed TileEntityRendererChestHelper -> TileEntityItemStackRenderer + This class is used to render any tile entities in a non-location specific major + Such as EntityItems, In minecarts, Held by entities, anyhting that isn't in world. + Switched the class names for BiomeGenForest $1 and $2 as Fernflower decompiled + them in oposite order. + - v99.99-pre-3870 Merge pull request #533 from AbrarSyed/patch-2 + Added mappings to default build.gradle + - v99.99-pre-3869 added mappings to default build.gradle + - v99.99-pre-3868 Merge pull request #1367 from bloodmc/blockplace + Added PlaceEvent and MultiPlaceEvent which fires before placing a block. + - v99.99-pre-3867 Added PlaceEvent and MultiPlaceEvent which fires before placing a block. + Before calling "ItemStack.tryPlaceItemInWorld", a recording flag is turned on for + setBlock to capture a blocksnapshot for each block that attempts to be placed. + If 1 block is captured, a "BlockEvent.PlaceEvent" is fired to notify mods. + If 2 or more blocks are captured, a "BlockEvent.PlaceEvent" is fired first with the first block + captured followed by a "BlockEvent.MultiPlaceEvent" with all captured blocks. This extra event + is required for items that have the ability to place 2 or more blocks such as a BlockBed. + If either event is cancelled, the recorded block snapshot(s), item stacksize, and item meta will + revert back to the captured snapshot(s). + If the events are not cancelled, a notification will be sent to clients and block physics will be updated. + What this means for mods is Forge will be able to capture all player block placement automatically and fire + a PlaceEvent and/or MultiPlaceEvent. + If for whatever reason your mod does not use the standard placement methods then you will need to fire the + appropriate placement events in order to notify mods/servers. + This commit also includes a new utility class called BlockSnapshot which is serializable. This new class is used in conjunction with + both PlaceEvent and MultiPlaceEvent in order to record a snapshot of block space before it is altered. This + allows us to restore the block(s) if an event is cancelled. The class also provides the ability to restore a snapshot + to any location using the restoreToLocation method. This should be helpful to many mods that are looking to be able + to capture block data then restore it to back to any location required. + - v99.99-pre-3866 Add joptsimple as a server required library. Closes #531 + - v99.99-pre-3865 Restructure block and item mapping data in world save and network to potentially expand to custom mod ID registry syncing. Tip: ONLY use those functions in GameData that are marked as public API as internal API may change in 1.8. + - v99.99-pre-3864 Merge pull request #527 from bspkrs/1.8 + Update Config Gui stuff for 1.8 + - v99.99-pre-3863 Update Config Gui stuff for 1.8 + updated mappings to snapshot 20140930 + got rid of derpy generics code + - v99.99-pre-3862 Move FML to net.minecraft.fml package. + - v99.99-pre-3861 Move vanilla trades to inner class to prevent initilizer order issues. + - v99.99-pre-3860 Preliminary network protocol re-work. vanilla clients can now connect. Further cleanup needed. + - v99.99-pre-3859 Inital 1.8 patch update. 'It compiles!' + - v99.99-pre-3858 1.8 Conf update. Uses MCPData Snapshots now. + - v99.99-pre-3857 Prevent client only commands from bleeding through to the server. + - v99.99-pre-3856 Merge branch 'new' + - v99.99-pre-3855 MinecraftForge/FML@63b64482e6dd4c3e2226ec002ceee549045c35ed Add jsr305 dev-time dependancy for Nullable/Nonnull annotations. Unneeded at runtime. + MinecraftForge/FML@5365f5ea3e90ec85552bdb7f1f1237c51b4ea493 Add IEventExceptionHandler for EventBus to allow special handeling exceptions that are fired while running an event. Events now track what 'phase' they are in during the execution process. Each EventPriority is a 'phase'. An exception is thrown if the event attempts to set its phase to a previous one. + - v99.99-pre-3854 Merge pull request #1402 from nekosune/new + Fixed Clientside GameProfile UUID being null on offline mode + - v99.99-pre-3853 Fixed Clientside GameProfile UUID being null on offline mode + - v99.99-pre-3852 Merge pull request #1395 from lawremi/rendergasfix + Fix rendering height of non-liquid fluids + - v99.99-pre-3851 Add IEventExceptionHandler for EventBus to allow special handeling exceptions that are fired while running an event. + Events now track what 'phase' they are in during the execution process. Each EventPriority is a 'phase'. + An exception is thrown if the event attempts to set its phase to a previous one. + - v99.99-pre-3850 Add jsr305 dev-time dependancy for Nullable/Nonnull annotations. Unneeded at runtime. + - v99.99-pre-3849 check for IFluidBlock (in addition to Material.liquid) when + determining render height so that non-liquids (gases) render correctly + - v99.99-pre-3848 MinecraftForge/FML@7ab69aff2e19b349e457c1b5fcab8b3b01d22af2 Clean up import + MinecraftForge/FML@c5a90bd456230b201522c268dd9bc5e80a0b57be Is vanilla possible with this mod load, side tests. + MinecraftForge/FML@cad11f3165505e6d725411a9fc2c2ee8362f5827 Allow injecting alternative container types. This is the core support code for allowing sponge plugins! + - v99.99-pre-3847 Allow injecting alternative container types. This is the core support code for allowing sponge plugins! + - v99.99-pre-3846 Is vanilla possible with this mod load, side tests. + - v99.99-pre-3845 Clean up import + - v99.99-pre-3844 Merge pull request #1390 from diesieben07/beacon-items + Added Item#isBeaconpayment + - v99.99-pre-3843 Added Item#isBeaconpayment + - v99.99-pre-3842 Modify WavefrontObject to allow '.' in group object names + Blender names objects with .001 ir .002 when separating vertices or duplicating objects and the importer would crash on them. This fixes the regex to allow dots in the name. + - v99.99-pre-3841 MinecraftForge/FML@dc02d56195606d3ba2f1c5036fc8c0ddb67c843f Fix derp with ModType annotation. mods should load again now.. + - v99.99-pre-3840 Fix derp with ModType annotation. mods should load again now.. + - v99.99-pre-3839 MinecraftForge/FML@4ce3e73bfe36c02b10f504f93eff1bc94d640e32 Add overloaded version of SimpleNetworkWrapper#registerMessage that takes the MessageHandler instance directly, allowing to specify the same handler for multiple messages. + MinecraftForge/FML@cbe2ccbda461ec0ecf4d776fcd19ab31930cc3f1 Add in ModType to the jar manifest. If it's present, and doesn't have value "FML" it will be skipped from the modloading cycle. This should let liteloader mods have a .jar extension. + MinecraftForge/FML@37cf0174fc62a842d132b2c2cc31e477acfba205 OK, lets make that a csv list. It'll let you be liteloader and fml in one jar file! + MinecraftForge/FML@0475b15eb1a7c35bf4959f1af40606e6ee8a9d03 Change the mods and modListFile argument handling a bit. Other tweakers will get a chance at looking at them now - they're only removed right before launch. + MinecraftForge/FML@abeac06a2e9bf8825b058fa35291165b4d1f1fb3 Two new features. ModLists can have a "parent" mod list. Circularity will result in a crash, so be careful. Mods specified in a child will override ones from a parent (using the maven group:name:classifier triple to identify - ignoring the version component) + MinecraftForge/FML@7fcfedcfef9b5fd85cd1c17aa2013fca1bacd871 Canonicalized file paths in modListFile handling with the minecraftDirectory. + MinecraftForge/FML@633fce19d4b367aed56d79e916f17296842f675c Make Keyevent also fire for key releases + MinecraftForge/FML@57ba2339b630afa22c0fdf060bf28edbf7b34d0f Merge branch 'keyup-event' of github.com:diesieben07/FML + MinecraftForge/FML@1ff048062c7f122731619258a9e5a68a6111d5dd Merge branch 'simple-netw-improve' of github.com:diesieben07/FML + - v99.99-pre-3838 Merge branch 'simple-netw-improve' of github.com:diesieben07/FML + - v99.99-pre-3837 Merge branch 'keyup-event' of github.com:diesieben07/FML + - v99.99-pre-3836 Make Keyevent also fire for key releases + - v99.99-pre-3835 Canonicalized file paths in modListFile handling with the minecraftDirectory. + - v99.99-pre-3834 Two new features. ModLists can have a "parent" mod list. Circularity will + result in a crash, so be careful. Mods specified in a child will override + ones from a parent (using the maven group:name:classifier triple to identify - + ignoring the version component) + Finally, ModSide is now doable in MANIFEST.MF. If you have this, it can tell + a mod to only load on a client, or on a dedicated server (though I'd watch out + before using the dediserver one, you'll never load in integrated servers then). + The default value is BOTH, which means you'll load both sides, other values are + CLIENT and SERVER, obviously. Perhaps, also, CAULDRON might be possible? + - v99.99-pre-3833 Change the mods and modListFile argument handling a bit. Other tweakers will get a chance at looking + at them now - they're only removed right before launch. + - v99.99-pre-3832 OK, lets make that a csv list. It'll let you be liteloader and fml in one jar file! + - v99.99-pre-3831 Add in ModType to the jar manifest. If it's present, and doesn't have value "FML" + it will be skipped from the modloading cycle. This should let liteloader mods have a .jar extension. + - v99.99-pre-3830 GIANT FML UPDATE! Bump forge revision number, and fix patches for ItemStack changes. More to come on this branch I expect. + MinecraftForge/FML@7c5cf219042581545b6073de4e947448ffa10879 Implement STDOUT/STDERR redirection. + MinecraftForge/FML@bc78e31cb7ad4eda6e5faa173cd6b21e70a2c444 added support for \n in tooltip strings added \n test tooltip localization fixed int/double conversion error in slider entry added test slider scenario that highlighted conversion error + MinecraftForge/FML@a2908e5c596bb5502bf455d468d2b1ead0520f55 Clean up a bunch of compiler warnings. + MinecraftForge/FML@7f67523d870ae150071c67b002597542eb206725 Update realms to 1.3.2 + MinecraftForge/FML@73f23c24b85240458f352f248e885684aaff4743 Merge branch 'std-redir' of github.com:Emberwalker/FML + MinecraftForge/FML@1c6b25df740a64c94d9ba05dd7e4412515abf5bb If an IO exception comes from the datawatcher, spew it all over the console don't discard it silently. Should stop pixelmon blaming forge for their mistakes. + MinecraftForge/FML@e77da9eb2f5c58a494ed100dd4c1dd1a0c341dbf And fix the read side too, incase someone is trying to bitbang and failing. + MinecraftForge/FML@305d8950c9332c7a7f290db05e6f18ef328016e2 Make LogContext optional. This can be useful for debugging mod issues, but Apache's implementation in log4j2 is responsible for a very significant % of the overall runtime. Quite frankly this is shockingly bad performance from what is supposed to be a high performance logging framework. Anyway, until we can figure out if we can fix it, we're turning it off by default. + MinecraftForge/FML@bdfca1c8ed463a6053526c7a46a990007711e3d0 Make more noise when people screw up mod downloading and put .jar.zip in their mod folders. + MinecraftForge/FML@21084941127fc882d9968316a8f0669531e484df Add a custom version range factory method. Should hush skyboy's complaints. Closes #486 + MinecraftForge/FML@7c1e6aaa40704001231e602ceaedfa21a5df1edf Add a delegate to every item and block. this should help with renaming fun stuffs. Also, fix all the tabs from my previous commits. *sigh* + MinecraftForge/FML@61fcb4df06dc968fcc31d3e4e524e574acfdbb3b Tweak Itemstack patch to always delegate to the method call. Set the field, so it's in sync. + MinecraftForge/FML@eb8c5ab146f2eb3ad3833d40607da97831278ffb Fix nested directory for language resources. Closes MinecraftForge#1264 + MinecraftForge/FML@7c05e5f70d5387512d0bee33ef99510ee5aac739 Default collections, so that we don't crash if useDependencyInfo is true. Closes #485 + MinecraftForge/FML@9729fe23326a3d4f6b03e60b5cdaf78a484b3657 Kill net.minecraft.src warning. It hasn't served a purpose in a long time now. Closes #313 + MinecraftForge/FML@21e875ef22eef6068ccd6df1bd71cf58cba48eed AllowPlayerLogins only after the server has completed the core init tasks. Closes #372 + MinecraftForge/FML@46cfeade80ae60ad2d8cdb40c5fdfdaeeaf16d00 Add a constructor to CustomModLoadingDisplayException. Closes #387 + MinecraftForge/FML@a6eab2683a15a0cceca7a0ded6095b746cdd017b Update README.txt + MinecraftForge/FML@f75838461cf6d9c5010cbfd2d9ef5ceec03268d7 Last part is the itemstack transformer. Itemstacks should now only be loosely coupled with the items within. + MinecraftForge/FML@51f24e9e6d1bee371cf23cdfd0071de7c5175417 First draft of add alias. It is probably not properly persistent atm. + MinecraftForge/FML@2a4c6424709b20ce1e9bda0d85ce7fac47d157c2 Finally fix stupid NPE error caused by FML trying to parse the super of Object in IDEA envs. + MinecraftForge/FML@c1b1417ee168523154a0edae68c3180814eab1c7 FML now supports passing a json formatted modlist as an argument, as well as a comma separated argument list. These facilitate modpacks mostly, by meaning you don't need to duplicate mods. The modlist is arranged in the maven style, with mods referenced maven-like. + MinecraftForge/FML@3d42cda2a2cf5b24e7a25537d883260857b2107a Build.Gradle Patch + MinecraftForge/FML@20c7add8455cd16a4551ed13336a9ad4f9770cd1 Merge pull request #484 from bspkrs/master + MinecraftForge/FML@26ed4b992eb6341d52d12fb6735415ab8e3c501d Clear button list on FML fatal error screens. The hidden cancel button should not be there. Closes #497 + MinecraftForge/FML@ebe4f5c5e297d5d59ce57138810627a9c7a1b412 Merge pull request #494 from AntonBoch1244/patch-1 + MinecraftForge/FML@ad0da05f5c78d7f3c35a331e993dd6e679fc7ac9 Fix the ItemStack transformer to find the method and field so it works with srg and mcp naming. + MinecraftForge/FML@65d380181a84d35a78791e1bc3c7712cd90506f6 Extend timeout for client to 5 seconds. Should fix Forge #1322 + MinecraftForge/FML@45486a0b6dfca65c4d1dd23176d4c9d13d46b6f5 Fix almost invisible NPE in TerminalTransformer when loading a non-existant class + MinecraftForge/FML@13da3efce07653732971837709ccf4de7e4c5c8e Allow a clean way to exit the game without big ugly warnings, but with logging information available if needed. Closes #496 + MinecraftForge/FML@fda305edfea15ba2015cede72327703f273f74e3 Some more tidying up of the exit handling + MinecraftForge/FML@b087f60c3379d0767247e51cbc3f7c631fe97a08 More cleanup of exit handling, also add a couple more noise classes to the list of things ignored. + MinecraftForge/FML@d6358a466b4614cfc35b403d756fe3ef550ebf50 Cleanup override warnings + MinecraftForge/FML@af7a58b9e50dbacf63cf4b5009abc52301609e1f Update to legacylauncher 1.10 and asm 5.0.3 + MinecraftForge/FML@e6d00440a612c235013f3f92f1756811139a6de0 ItemStack swapping + MinecraftForge/FML@8597e45a0e417948db483006aa54e899f28b05ac Fix NPE from a boolean + MinecraftForge/FML@b9b9daa8a9d1cac8550561f31f118589abc0c30a Fix ups from feedback. + MinecraftForge/FML@d89165021f33fbffb4563d86b30bd261506c6ea6 Mark the promise a success in the outbound handler. + MinecraftForge/FML@2e5ccf7988385d38b964c615776f23a1718f5c27 Update for launchwrapper 1.11. Fixes java 6 compatibility. + MinecraftForge/FML@641250d8536bad3af5a036b70dae94097176b420 Fix java 8u20. Closes #501 and a bunch of other bugs too. + MinecraftForge/FML@292be72639feded03ced26d9a06a98159f7a95b7 Allow client handshake to be reset by server to support BungeeCord. + MinecraftForge/FML@092873fbe5baaee53bee67d26d2fc6d3d003f095 Merge branch 'bungeecord' of github.com:bloodmc/FML + MinecraftForge/FML@134f2f8e8865a91292386a3738bb45bad0477a4b Fix bug with entityspawn - if the entity doesn't extend livingbase, it fails to write a headyaw byte, and everything will be derped for that packet. + MinecraftForge/FML@4852de81e02e2b6c6d006abe20d8497499fdf51f Wrap the server description box a little bit shorter. Stops the overlapping. Closes #489 + - v99.99-pre-3829 Wrap the server description box a little bit shorter. Stops the overlapping. Closes #489 + - v99.99-pre-3828 Fix bug with entityspawn - if the entity doesn't extend livingbase, it fails + to write a headyaw byte, and everything will be derped for that packet. + Fixes #499, but probably a bunch of others. + - v99.99-pre-3827 Merge branch 'bungeecord' of github.com:bloodmc/FML + - v99.99-pre-3826 Fixed biome weights not working with non multiples of 10 + - v99.99-pre-3825 Allow client handshake to be reset by server to support BungeeCord. + - v99.99-pre-3824 Fix java 8u20. Closes #501 and a bunch of other bugs too. + - v99.99-pre-3823 Update for launchwrapper 1.11. Fixes java 6 compatibility. + - v99.99-pre-3822 Mark the promise a success in the outbound handler. + - v99.99-pre-3821 Fix ups from feedback. + - v99.99-pre-3820 Merge pull request #1300 from zlyfire/patch-1 + Update README.txt + - v99.99-pre-3819 Fix NPE from a boolean + - v99.99-pre-3818 ItemStack swapping + - v99.99-pre-3817 Fix Stained Glass pane rendering issues + - v99.99-pre-3816 Update to legacylauncher 1.10 and asm 5.0.3 + - v99.99-pre-3815 Cleanup override warnings + - v99.99-pre-3814 More cleanup of exit handling, also add a couple more noise classes to the list of things ignored. + - v99.99-pre-3813 Some more tidying up of the exit handling + - v99.99-pre-3812 Merge pull request #1330 from bonii-xx/master + Write the correct default value for StringList comments in the config + - v99.99-pre-3811 Allow a clean way to exit the game without big ugly warnings, but with logging information available if needed. Closes #496 + - v99.99-pre-3810 Fix almost invisible NPE in TerminalTransformer when loading a non-existant class + - v99.99-pre-3809 Write the correct default value for StringList comments in the config + - v99.99-pre-3808 Fix AIOOB in BiomeDictionary. Closes #1326 + - v99.99-pre-3807 Extend timeout for client to 5 seconds. Should fix Forge #1322 + - v99.99-pre-3806 Attempt to properly resolve this daft metadata and TE nonsense. This might be mod impacting, if you maintain a reference to a TE via neighbour update calls - you + might see two TEs for a single setblock where previously you saw one. This is a phantom TE being created by badly written neighbour triggers - I'm looking at you + redstone. + Anyway, with luck, this'll close a slew of bugs across Forge, IC2, MFR, TE, RC. Yeah, fun times. Thanks to LexManos, skyboy and KingLemming for helping figure this + issue out. Quite frankly, from now on, issues with phantom TEs will be mods behaving badly. Modders will need to adapt. + - v99.99-pre-3805 Fix the ItemStack transformer to find the method and field so it works with srg and mcp naming. + - v99.99-pre-3804 Fix invalid math in GuiContainerCreative. + - v99.99-pre-3803 Merge pull request #494 from AntonBoch1244/patch-1 + Build.Gradle Patch + - v99.99-pre-3802 Merge pull request #1316 from GUIpsp/master + Add ItemStack sensitive version of getItemEnchantability + - v99.99-pre-3801 Add ItemStack sensitive version of getItemEnchantability + - v99.99-pre-3800 Clear button list on FML fatal error screens. The hidden cancel button should not be + there. + Closes #497 + - v99.99-pre-3799 Add ability for creative tabs that have search bars to customize the text box's width, and prevent the default set of enchanted books from being displayed in those tabs. Closes #1303 Closes #1301 + - v99.99-pre-3798 Merge pull request #1187 from Abastro/skylight + Skylight Hooks for Minecraft Forge + - v99.99-pre-3797 Skylight Hooks for Minecraft Forge + Mainly for solar/lunar eclipse. + - v99.99-pre-3796 Merge pull request #1217 from Glassmaker/patch-1 + Adds getLocalizedName and getUnlocalizedName to FluidStack + - v99.99-pre-3795 Merge pull request #484 from bspkrs/master + Added support for \n in GuiConfig tooltip strings + a slider fix + - v99.99-pre-3794 Update README.txt + Add in reference to running setupDecompWorkspace to get decompiled classes + - v99.99-pre-3793 Merge pull request #1297 from ShetiPhian/patch-1 + Legacy Liquid Load Fix + - v99.99-pre-3792 Legacy Liquid Load Fix + nbt.getString("FluidName") no longer returns null, it returns an empty string. + This patch allows legacy liquids to be resolved once again. + - v99.99-pre-3791 Fix metadata for every permutation -.- Closes #1294 + - v99.99-pre-3790 Fix patch screwup in Skyboy's Fishing PR -.- + - v99.99-pre-3789 Merge pull request #1296 from Vazkii/patch-3 + Fixed items with more than 2 render passes rendering wrong in first person + - v99.99-pre-3788 Fixed items with more than 2 render passes rendering weird in first person + - v99.99-pre-3787 Build.Gradle Patch + Changing assetDir to runDir and set runDir to "eclipse" + - v99.99-pre-3786 Merge pull request #1292 from DemoXinMC/master + New PlayerRepairEvent and AnvilUpdateEvent + - v99.99-pre-3785 * Added AT for ContainerRepair.stackSizeToBeUsedInRepair (Now public) + * Added ability to AnvilUpdateEvent to alter stackSizeToBeUsedInRepair (vanilla behavior is now reproducable) + * Added AnvilRepairEvent, fired when the player removes an ItemStack from the output slot of ContainerRepair, and allows the chance to damage the anvil to be altered. + - v99.99-pre-3784 Merge pull request #1288 from skyboy/master + Add EntityFishHook AT + - v99.99-pre-3783 Add EntityFishHook AT + - v99.99-pre-3782 Merge pull request #1128 from skyboy/patch-fishingapi + Add API for fishing results, I'm tired of this, If shit breaks, Blame Skyboy and King_Lemming. + - v99.99-pre-3781 Merge pull request #1272 from rwtema/master + Fixed ItemFluidContainer always draining the maximum amount, regardless ... + - v99.99-pre-3780 Closes #1280 + - v99.99-pre-3779 Fixed bug that allowed duplication of Fluids with redstone dust. Closes #1279 + - v99.99-pre-3778 FML now supports passing a json formatted modlist as an argument, as well as a comma separated argument list. + These facilitate modpacks mostly, by meaning you don't need to duplicate mods. The modlist is arranged in the + maven style, with mods referenced maven-like. + - v99.99-pre-3777 Finally fix stupid NPE error caused by FML trying to parse the super of Object in IDEA envs. + - v99.99-pre-3776 First draft of add alias. It is probably not properly persistent atm. + - v99.99-pre-3775 Last part is the itemstack transformer. Itemstacks should now only be loosely coupled with the items within. + - v99.99-pre-3774 Fixed ItemFluidContainer always draining the maximum amount, regardless of the amount remaining. + - v99.99-pre-3773 Update README.txt + - v99.99-pre-3772 Add a constructor to CustomModLoadingDisplayException. Closes #387 + - v99.99-pre-3771 AllowPlayerLogins only after the server has completed the core init tasks. Closes #372 + - v99.99-pre-3770 Kill net.minecraft.src warning. It hasn't served a purpose in a long time now. Closes #313 + - v99.99-pre-3769 Default collections, so that we don't crash if useDependencyInfo is true. Closes #485 + - v99.99-pre-3768 Fix nested directory for language resources. Closes MinecraftForge#1264 + - v99.99-pre-3767 Tweak Itemstack patch to always delegate to the method call. Set the field, so it's in sync. + - v99.99-pre-3766 Add a delegate to every item and block. this should help with renaming fun stuffs. Also, fix all the tabs from my previous commits. *sigh* + - v99.99-pre-3765 Merge pull request #1263 from Zarathul/master + Added drainFluidContainer() and getContainerCapacity() helper methods to FluidContainerRegistry. + - v99.99-pre-3764 Add a custom version range factory method. Should hush skyboy's complaints. Closes #486 + - v99.99-pre-3763 Make more noise when people screw up mod downloading and put .jar.zip in their mod folders. + - v99.99-pre-3762 - Added drainFluidContainer() and getContainerCapacity() helper methods. + - v99.99-pre-3761 Make LogContext optional. This can be useful for debugging mod issues, but + Apache's implementation in log4j2 is responsible for a very significant % of + the overall runtime. Quite frankly this is shockingly bad performance from + what is supposed to be a high performance logging framework. Anyway, until we + can figure out if we can fix it, we're turning it off by default. + - v99.99-pre-3760 And fix the read side too, incase someone is trying to bitbang and failing. + - v99.99-pre-3759 If an IO exception comes from the datawatcher, spew it all over the console + don't discard it silently. Should stop pixelmon blaming forge for their mistakes. + - v99.99-pre-3758 Merge branch 'std-redir' of github.com:Emberwalker/FML + - v99.99-pre-3757 Update realms to 1.3.2 + - v99.99-pre-3756 Clean up a bunch of compiler warnings. + - v99.99-pre-3755 Merge pull request #1254 from Adubbz/master + Added a RenderFogEvent + - v99.99-pre-3754 Added an event for fog rendering + - v99.99-pre-3753 Update FishingHooks + - v99.99-pre-3752 MinecraftForge/FML@3231db9376766d619f942b6a526718daa3c68038 Sorta revert 908491d5e7ac26becdac938f38cc90d6b9d73ce1 but merge assets into the map, rather than force overwriting. Fixes skyboy's comment. + - v99.99-pre-3751 Revert old light amortization patch. It seems to be breaking chunk sending pretty badly when more + than a couple of people are online. Tests indicate it is not useful anymore. + - v99.99-pre-3750 added support for \n in tooltip strings + added \n test tooltip localization + fixed int/double conversion error in slider entry + added test slider scenario that highlighted conversion error + - v99.99-pre-3749 Add FishingHooks + - v99.99-pre-3748 Sorta revert 908491d5e7ac26becdac938f38cc90d6b9d73ce1 but merge assets + into the map, rather than force overwriting. Fixes skyboy's comment. + - v99.99-pre-3747 Updated FML: + MinecraftForge/FML@53887ac59cec8f747e21fd251f94d5a438a69114 Hacky interm solution to #1207 to buy me time to re-write FML's network protocol. + - v99.99-pre-3746 Hacky interm solution to #475 to buy me time to re-write FML's network protocol. + - v99.99-pre-3745 Made skulls respect Block.isReplaceable when placing, also prevented them from deleting blocks when placed at certain angels. Closes #1233 + - v99.99-pre-3744 Fixed NPE that happens sometimes when exiting the game witout fully loading a world {main a dev-time thing} + - v99.99-pre-3743 Updated FML: + MinecraftForge/FML@9d40b761974f10ec2b5868a992260792f8a98e5d Don't scan ObjectHolders if there was an error already, derpitude will ensure. + MinecraftForge/FML@76538c1781d6d6a1e4134fb317af99e6f13b46cc Add a terminal transformer and tweaker. + MinecraftForge/FML@aec9228845e50107112bd1f8693f9b4729694c8b Add ExitVisitor to the TerminalTransformer that finds and intercepts any calls to Runtime.exit or System.exit. + MinecraftForge/FML@908491d5e7ac26becdac938f38cc90d6b9d73ce1 Move LaunguageRegistry call above normal asset loading to allow resource packs to override mod's language systems. + MinecraftForge/FML@d13295e28113a1c310d5bbb90ebfe241fefabe02 Fix FMLAT manifest AccessTransformers, class loader fun! + - v99.99-pre-3742 Merge pull request #1235 from darkhax/master + Changed exception message for duplicate enchantment ids + - v99.99-pre-3741 Changed exception message for duplicate enchantment ids to contain the + class path for both enchantments along with the enchantmnet id that has + been duplicated. + - v99.99-pre-3740 Fix FMLAT manifest AccessTransformers, class loader fun! Closes #477 + - v99.99-pre-3739 Merge pull request #1232 from bspkrs/patch-3 + Fixed missing assignment of constructor arg (thanks @Lunatrius) + - v99.99-pre-3738 Fixed missing assignment of constructor arg (thanks @Lunatrius) + I must have edited this out when I was cleaning up my formatting commit spam. + - v99.99-pre-3737 Merge pull request #1226 from williewillus/xporb + Fix experience orbs spawning at 32x coordinates clientside + - v99.99-pre-3736 Fix comment derp (+1 squashed commits) + Squashed commits: + [52c40bc] Fix experience orbs spawning at 32x coordinates clientside + Add // FORGE comment + Add // FORGE comment to clarify the purpose of the change + - v99.99-pre-3735 Move LaunguageRegistry call above normal asset loading to allow resource packs to override mod's language systems. + - v99.99-pre-3734 Merge pull request #1225 from williewillus/master + Fix chat opacity + - v99.99-pre-3733 Fix chat opacity + Add // FORGE comment + As per convention, add // FORGE comment to clarify the purpose of the change + - v99.99-pre-3732 Add ExitVisitor to the TerminalTransformer that finds and intercepts any calls to Runtime.exit or System.exit. + - v99.99-pre-3731 Add a terminal transformer and tweaker. + - v99.99-pre-3730 Don't scan ObjectHolders if there was an error already, derpitude will ensure. + - v99.99-pre-3729 Updated FML: + MinecraftForge/FML@ab52901b8b47a525e2719cf280327e97bad7f91e Force preferIPv4Stack to true early in the load chain to combat netty loopback issues. + MinecraftForge/FML@11893fbbb76569417a415ae794494b8c1150a716 Add system property to skip doing world backups when game registry changes. This is SEVERLY ill-advised, if you do this DO NOT ask for any support. + MinecraftForge/FML@fdb6b34b8fc3f1e0c6beb7bfb940a01a309f1603 Update authlib and realms to latest json data. + MinecraftForge/FML@b3a74882b4d0d704d7061b9d896febb59ab0c269 added slider controls for numerics. default control is textbox, but slider can be used as a custom list entry class. fixed constructor javadocs in GuiConfig + MinecraftForge/FML@7c6d1f7568885ff677e34692ff87b1f0826dfd48 Merge pull request #468 from bspkrs/master + MinecraftForge/FML@692d955c1a5b6d0b8601ae88632ef42136d37393 Update tweaker login to use authlib. + MinecraftForge/FML@c2119eb1c1246ba37304d9e565b4430ed7056db1 Update realms library to 1.3.1, and implement network latch when connecting to Realms. Tested and working. + - v99.99-pre-3728 Update realms library to 1.3.1, and implement network latch when connecting to Realms. Tested and working. + - v99.99-pre-3727 Update tweaker login to use authlib. + - v99.99-pre-3726 Adds getLocalizedName and getUnlocalizedName to FluidStack + - v99.99-pre-3725 Add a system property for the stencil, in case config is not available.. + - v99.99-pre-3724 Merge pull request #1213 from TheCountryGamer/master + RenderBlockOverlayEvent patch + - v99.99-pre-3723 RenderBlockOverlayEvent patch + Fixes skewed XYZ parameters + - v99.99-pre-3722 Fixed Enchantment.addToBookList Closes #1160 + - v99.99-pre-3721 Add ability for modders to designate custom biome types. And remove note about automatically registering. Closes #1167 + - v99.99-pre-3720 Merge pull request #468 from bspkrs/master + Added slider controls for numerics. Default control is textbox, but slider can be used as a custom list entry class. + - v99.99-pre-3719 added slider controls for numerics. default control is textbox, but slider can be used as a custom list entry class. + fixed constructor javadocs in GuiConfig + - v99.99-pre-3718 Merge pull request #1194 from diesieben07/potion-icon + Added hook for potion inventory icons + - v99.99-pre-3717 Merge pull request #1199 from Adubbz/master + Enhanced the Biome Dictionary + - v99.99-pre-3716 Merge pull request #1163 from TheCountryGamer/master + Added RenderBlockOverlayEvent + - v99.99-pre-3715 Added World to ChunkProviderEvent.ReplaceBiomeBlocks, and exposed metadata to End and Nether generation events. Close #1201 + - v99.99-pre-3714 Enhanced the Biome Dictionary with tags based on temperature, vegetation, moisture, trees and others + - v99.99-pre-3713 Made EmeraldOre respect isReplaceableOreGen. Closes #1157 + - v99.99-pre-3712 Added RenderBlockOverlayEvent.java + Adds a Forge event which controls whether an overlay is rendered. + Overlays include: First-person fire, Block (when inside a block) + and water when a player is inside a water block. + Patched for easier manipulation of event + Fixed for Lex + To be squashed + Removed Contructor + Added block XYZ parameters + TODO, the second block overlay event’s XYZ might not be correct + - v99.99-pre-3711 Merge pull request #1200 from tterrag1098/master + Add AchievementEvent + - v99.99-pre-3710 Update authlib and realms to latest json data. + - v99.99-pre-3709 Add system property to skip doing world backups when game registry changes. This is SEVERLY ill-advised, if you do this DO NOT ask for any support. + - v99.99-pre-3708 Force preferIPv4Stack to true early in the load chain to combat netty loopback issues. + - v99.99-pre-3707 STENCIL buffer and DEPTH buffer, attempt a fix for GL errors. + - v99.99-pre-3706 Merge pull request #1210 from Ghosrec35/master + Added Javadoc comments for Forge Event documentation. + - v99.99-pre-3705 MinecraftForge/FML@ac994e178a3533aa3c2ad8359aef9e5852c27a72 Scala people test your shit. + - v99.99-pre-3704 Scala people test your shit. + - v99.99-pre-3703 Remove the BLEND enable in rendering damage bars. And exclicitly fix blend states in some GUI elements. + - v99.99-pre-3702 Added Javadoc comments for Forge Event documentation. + - v99.99-pre-3701 MinecraftForge/FML@3ee86d0f3e47249030ba2309386f9120025e95c1 updated gradle wrapper to gradle 2.0 + MinecraftForge/FML@627ae73ea655277617912df48b03288ecc79ffea Merge pull request #464 from AbrarSyed/upgradle + MinecraftForge/FML@ee38c1b3f4642c567612f88070d7f9d651994aab Fix unneeded cast causing crash in new Config GUI system. + MinecraftForge/FML@eb92c35a2fa49a0fbe35a33e31cfb58e0674f78e updated run configs for GradleStart/Server classes + MinecraftForge/FML@70dcf80410a6d12c00300c00522582ee49ac4cc8 Merge pull request #465 from AbrarSyed/upgradle + MinecraftForge/FML@0ebdbe77a2b3503db43d36aec50c98ffb8366e20 Updated Scala to latest stable + MinecraftForge/FML@ddba18e6e33a9d9c5b113b1bfc0bfc82803b2607 Merge branch 'patch-1' of github.com:Soaryn/FML into scalaupdate + MinecraftForge/FML@220a37660b2656136c634b435afee6a915fc88fe Update realms to 1.2.9 + MinecraftForge/FML@abd7d0969bed5ce3d766f52b921c2b44e8ba87d2 Merge branch 'scalaupdate' + - v99.99-pre-3700 Merge pull request #1159 from ganymedes01/master + Added FluidStack sensitive version for Fluid's localised name + - v99.99-pre-3699 Merge branch 'scalaupdate' + - v99.99-pre-3698 Update realms to 1.2.9 + - v99.99-pre-3697 Merge branch 'patch-1' of github.com:Soaryn/FML into scalaupdate + - v99.99-pre-3696 Updated Scala to latest stable + Updates the -dev portion of the json files for 1.7.10 for scala 2.11.1 + Updates the -rel portion of the json files for 1.7.10 for scala 2.11.1 + - v99.99-pre-3695 Merge pull request #465 from AbrarSyed/upgradle + fix run configs to use new GradleStart class + - v99.99-pre-3694 updated run configs for GradleStart/Server classes + - v99.99-pre-3693 Fix unneeded cast causing crash in new Config GUI system. + - v99.99-pre-3692 Add AchievementEvent + Allows modders to react to players receiving achievements, and cancel + them. + Fix indentation + More shortening + Down to one line... + Remove newline + - v99.99-pre-3691 Merge pull request #464 from AbrarSyed/upgradle + updated gradle wrapper to gradle 2.0 + - v99.99-pre-3690 updated gradle wrapper to gradle 2.0 + - v99.99-pre-3689 Merge pull request #1197 from MrIbby/patch-1 + Add RenderItemInFrameEvent + - v99.99-pre-3688 Add RenderItemInFrameEvent + - v99.99-pre-3687 Fixed issue where Fire's 'fizz' would not play for the person who extinguished the fire. + - v99.99-pre-3686 Merge pull request #1195 from iChun/patch-1 + Fixed inverted params in FogDensity use + - v99.99-pre-3685 Fixed inverted params in FogDensity use + - v99.99-pre-3684 Add config option to specify the default spawn fuzz factor for the overworld. Closes #1190 + - v99.99-pre-3683 Add config option to disable attempting to creat screen with Stencil Bits. + - v99.99-pre-3682 Added hook for custom PotionEffect rendering in the inventory + - v99.99-pre-3681 Fix creative inventory tabs not blending base don items rendered. Closes #1179 + - v99.99-pre-3680 Add overloaded version of SimpleNetworkWrapper#registerMessage that takes the MessageHandler instance directly, allowing to specify the same handler for multiple messages. + - v99.99-pre-3679 Merge pull request #1191 from bloodmc/chunkasync + Fixed wrong method call in ChunkIOProvider. + - v99.99-pre-3678 Fixed wrong method call in ChunkIOProvider. + When a chunk fails to load async, we fallback to the original sync method. + In this case, it was calling the async method twice which ended up causing + a stackoverflow. + - v99.99-pre-3677 MinecraftForge/FML@db219fb287b14fea5148ecdbf07d8ff08704c66a API is now able to "provide" and "own" itself. Useful for libraries without a Mod in them. To go along with this, you can now require an API, with a version, in your mod dependency string + - v99.99-pre-3676 API is now able to "provide" and "own" itself. Useful for libraries without a Mod in them. + To go along with this, you can now require an API, with a version, in your mod dependency string + - v99.99-pre-3675 Merge pull request #1183 from bspkrs/master + fixed dupe quotes issue with category names that require quotes when save is called more than once + - v99.99-pre-3674 fixed compounding quotes issue with category names that require quotes when save is called more than once + - v99.99-pre-3673 Update to MC 1.7.10, bump to 10.13.0 + MinecraftForge/FML@bc420dcb0b086899e2aaa218a6f5bd7e91091a90 Fix Eclipse launching attribute + MinecraftForge/FML@1e0134a1ca97a1107ebbe604e5318e6f350fe9c4 Merge pull request #455 from rumickon/feature + MinecraftForge/FML@1c5db211afc9962fedb7fd8450abc45d07807634 Update for release 1.7.10 + MinecraftForge/FML@79a0c5e55905f0f08471d026b744a563ea421236 Merge branch 'mc179' + - v99.99-pre-3672 Merge branch 'prerelease' + - v99.99-pre-3671 Merge branch 'mc179' + - v99.99-pre-3670 Update for release 1.7.10 + - v99.99-pre-3669 Fix API incompatibilities. Should mean mods will work with new config changes. + - v99.99-pre-3668 Merge pull request #455 from rumickon/feature + Fix Eclipse launching attribute + - v99.99-pre-3667 Merge pull request #1180 from luacs1998/patch-2 + Update mc version string + - v99.99-pre-3666 Update mc version string + Or was I not supposed to? + - v99.99-pre-3665 Fix API incompatibilities. Should mean mods will work with new config changes. + - v99.99-pre-3664 Fix mcp release number + - v99.99-pre-3663 Merge branch 'master' into prerelease + - v99.99-pre-3662 Merge branch 'bspkrsgui' + - v99.99-pre-3661 MinecraftForge/FML@701d98eafa4d55144b166d26030818baa9b2f680 Added config GUI system + MinecraftForge/FML@50164db5c13c85636c7fda0e13bae1fc0aedc745 Merge branch 'master' of github.com:bspkrs/FML into bspkrsgui + MinecraftForge/FML@7eb36a1481aea9f68fa46bc199195769b27d904b Merge branch 'bspkrsgui' + - v99.99-pre-3660 Merge branch 'master' of github.com:bspkrs/MinecraftForge into bspkrsgui + Conflicts: + src/main/resources/assets/forge/lang/en_US.lang + - v99.99-pre-3659 Clean patch cruft. + - v99.99-pre-3658 Fix new method with Side.CLIENT when it shouldn't have it. Closes a bunch of reports of problems. + - v99.99-pre-3657 MinecraftForge/FML@701d98eafa4d55144b166d26030818baa9b2f680 Added config GUI system + MinecraftForge/FML@50164db5c13c85636c7fda0e13bae1fc0aedc745 Merge branch 'master' of github.com:bspkrs/FML into bspkrsgui + MinecraftForge/FML@7eb36a1481aea9f68fa46bc199195769b27d904b Merge branch 'bspkrsgui' + MinecraftForge/FML@96a7e14a45404449fb72af6d2d5e1efd30003318 Merge branch 'master' into mc179 + MinecraftForge/FML@f45f18b1d71e1c1d12582faa337a19e73ed5fb18 Fix accessing guava from transformers + MinecraftForge/FML@8f7adced471951c798cfa6844b0abc176c93d19b Fix library issue. mojang auth requests newer libs, so we get them at dev time. But the mojang json doesn't refer them at runtime. So there's a lib mismatch. Fortunately all are available at mojang, so we can update the json. + - v99.99-pre-3656 Fix library issue. mojang auth requests newer libs, so we get them at dev time. But the + mojang json doesn't refer them at runtime. So there's a lib mismatch. Fortunately all are + available at mojang, so we can update the json. + - v99.99-pre-3655 Fix accessing guava from transformers + - v99.99-pre-3654 Merge branch 'master' into mc179 + - v99.99-pre-3653 Merge branch 'bspkrsgui' + - v99.99-pre-3652 Fix Eclipse launching attribute + - v99.99-pre-3651 Merge branch 'master' of github.com:bspkrs/FML into bspkrsgui + - v99.99-pre-3650 MinecraftForge/FML@5d6dc5dce37e488188d6fc468c16e8a6183a3610 Fix up other exit points. Should stop process hangs for clean exits. + MinecraftForge/FML@8a240ec3c7e4cf4c57beabdfe9bd408e57de1bdc Merge branch 'master' into mc179 + MinecraftForge/FML@0cd5ef6bb71cda1ef6add892d1247148bf1ecc15 Fix NPE when no FMLAT is defined + - v99.99-pre-3649 Fix NPE when no FMLAT is defined + - v99.99-pre-3648 Merge branch 'master' into mc179 + Conflicts: + src/main/java/cpw/mods/fml/relauncher/FMLSecurityManager.java + - v99.99-pre-3647 MinecraftForge/FML@5d6dc5dce37e488188d6fc468c16e8a6183a3610 Fix up other exit points. Should stop process hangs for clean exits. + - v99.99-pre-3646 Fix up other exit points. Should stop process hangs for clean exits. + - v99.99-pre-3645 MinecraftForge/FML@e1529845384f4935b7c11d4d36d25db51c0b9a31 Add support for mod access transformers without a coremod requirement. Use the "FMLAT" manifest attribute, with a space separate list of files that live in the 'META-INF' directory. They should conform to standard AT formatting. + - v99.99-pre-3644 Add support for mod access transformers without a coremod requirement. + Use the "FMLAT" manifest attribute, with a space separate list of files + that live in the 'META-INF' directory. They should conform to standard AT + formatting. + - v99.99-pre-3643 MinecraftForge/FML@06ab104c9ab798af6d2726e02a238211ff8124e1 Force the descriptors to the right type for the field they're referencing. Fixes the sand issue + - v99.99-pre-3642 Force the descriptors to the right type for the field they're referencing. Fixes + the sand issue + - v99.99-pre-3641 Fix flower pots not droping the items that are inside them. + - v99.99-pre-3640 Update to 1.7.10-pre4. + - v99.99-pre-3639 Null check the Item in the supplied stack as well as the stack itself. + - v99.99-pre-3638 And fix firing for single player loading. + - v99.99-pre-3637 Fix derpity derp. + - v99.99-pre-3636 Harden the security manager and make it less spammy. Clean up a bunch of deprecation warnings from guava. + - v99.99-pre-3635 remove the deprecation patches. The methods are gone now + - v99.99-pre-3634 Merge branch 'master' into mc179 + - v99.99-pre-3633 Fix server side to write properly + - v99.99-pre-3632 Pre4 update + - v99.99-pre-3631 Fire an event when a player loads or saves from disk. Mods that want to load an additional + player related file from the players dir can now do so in that event. + - v99.99-pre-3630 Some patch offsets + MinecraftForge/FML@7219061b05db73d245405ef777b412d0787398b6 Also patch in warnings for Vec3Pool - similarly removed. + MinecraftForge/FML@dff22045587b37282adeb2167486a572f51f1f16 FML now sets a security manager (FINALLY!). It's primary purpose at this point is to catch rogue calls to System.exit so that they can cause a proper crash report, rather than silently abandoning the game. + - v99.99-pre-3629 Fix up some patching bugs. Fully functional @ pre3 + - v99.99-pre-3628 Merge pull request #1164 from lumien231/Fix-DimensionCrash + Fixes a server crash caused by a player joining that is in a non existen... + - v99.99-pre-3627 Fixes a server crash caused by a player joining that is in a non existent dimension + - v99.99-pre-3626 Merge pull request #1162 from Thog92/1.7-biome + Add missing 1.7 biomes to BiomeDictionary + - v99.99-pre-3625 Add missing 1.7 biomes to BiomeDictionary + - v99.99-pre-3624 Added FluidStack sensitive version for Fluid's localised name + Would be helpful for determining names for more complex FluidStacks (with tag compounds for example) + - v99.99-pre-3623 Merge pull request #1155 from Zarathul/master + Added soft return for modders passing invalid negative ids to OreDictionary.getOreName. Warning: WILL Error in 1.8+ + - v99.99-pre-3622 Fixed ArrayIndexOutOfBoundsException in getOreName + Added sanity check to prevent ArrayIndexOutOfBoundsException in getOreName for negative ids. + - v99.99-pre-3621 FML now sets a security manager (FINALLY!). It's primary purpose at this point is to catch + rogue calls to System.exit so that they can cause a proper crash report, rather than + silently abandoning the game. + - v99.99-pre-3620 Fixed vines generation for hanging off of trees. + - v99.99-pre-3619 Also patch in warnings for Vec3Pool - similarly removed. + - v99.99-pre-3618 Merge pull request #1147 from bloodmc/chunkasync + Don't call ChunkDataEvent.Load async + - v99.99-pre-3617 Don't call ChunkDataEvent.Load async + ChunkDataEvent.Load must be called after TE's are loaded since this is + what mods expect. The event is handled by ChunkIOProvider during + callStage2. + - v99.99-pre-3616 Checking in pre3 work + - v99.99-pre-3615 Merge pull request #938 from bloodmc/chunkasync + Load chunks asynchronously for players. + - v99.99-pre-3614 Merge pull request #1125 from alucas/addmissingjumpevent + Add missing onLivingJump calls + - v99.99-pre-3613 Pop version for new Recomended build. + - v99.99-pre-3612 Load chunks asynchronously for players. + When a player triggers a chunk load via walking around or teleporting + there is no need to stop everything and get this chunk on the main thread. + The client is used to having to wait some time for this chunk and the + server doesn't immediately do anything with it except send it to the + player. At the same time chunk loading is the last major source of file IO + that still runs on the main thread. + These two facts make it possible to offload chunks loaded for this reason + to another thread. However, not all parts of chunk loading can happen off + the main thread. For this we use the new AsynchronousExecutor system to + split chunk loading in to three pieces. The first is loading data from + disk, decompressing it, and parsing it in to an NBT structure. The second + piece is creating entities and tile entities in the chunk and adding them + to the world, this is still done on the main thread. The third piece is + informing everyone who requested a chunk load that the load is finished. + For this we register callbacks and then run them on the main thread once + the previous two stages are finished. + There are still cases where a chunk is needed immediately and these will + still trigger chunk loading entirely on the main thread. The most obvious + case is plugins using the API to request a chunk load. We also must load + the chunk immediately when something in the world tries to access it. In + these cases we ignore any possibly pending or in progress chunk loading + that is happening asynchronously as we will have the chunk loaded by the + time they are finished. + The hope is that overall this system will result in less CPU time and + pauses due to blocking file IO on the main thread thus giving more + consistent performance. Testing so far has shown that this also speeds up + chunk loading client side although some of this is likely to be because + we are sending less chunks at once for the client to process. + Thanks for ammaraskar for help with the implementation of this feature. + This commit is based off the following : + Bukkit/CraftBukkit@b8fc6ab2c12e9b4c8d7b5370e44f23cc838014b2 + Bukkit/CraftBukkit@85f5776df2a9c827565e799f150ae8a197086a98 + Bukkit/CraftBukkit@0714971ca2a31bc729bdd78ded8c69ffb2284813 + Bukkit/CraftBukkit@7f49722f457dcc31f8cac8e011871ff1b7fd3306 + Bukkit/CraftBukkit@53ad0cf1abe9c060ef411a86e9a16352f3e5197e + - v99.99-pre-3611 Implement STDOUT/STDERR redirection. + These streams now redirect to log4j2, with form '[class:method:line]: Original message'. + - v99.99-pre-3610 MinecraftForge/FML@1a99ec7db612f258983c6ac685da906bf7cde0a6 Deprecate getAABBPool so people can stop using it in mods. Failure to do so will result in 1.7.10 upgrade incompatibility. Use getBoundingBox instead. + - v99.99-pre-3609 Warn when chunks are being self-recursively loaded. This can cause serious issues. Modders should watch out. + - v99.99-pre-3608 Changed dustLapis to gemLapis to make OM SHUT THE HELL UP. + - v99.99-pre-3607 Fixed missed metadata offset, and now cache return values of getOres for speed. + - v99.99-pre-3606 Add missing onLivingJump calls + - v99.99-pre-3605 Merge pull request #1126 from Cojomax99/fog_customization + World fog color and density can now be controlled through an event + - v99.99-pre-3604 World fog color and density can now be controlled through an event + - v99.99-pre-3603 Merge pull request #1134 from diesieben07/ender-teleport + Fix EnderTeleportEvent for Ender Pearls. + - v99.99-pre-3602 Fixed inverted player parameters in PlayerEvent.Clone, Closes #1142 Closes #1140 + - v99.99-pre-3601 Changed EntityWolf to EntityTameable in EntityLivingBase.attackEntityFrom, to allow for more custom pets. Closes #1141 + - v99.99-pre-3600 Rework OreDictionary's internals to be a bit more speedy to help combat modders using it inapropriatly. Closes #1022 Closes #1131 + - v99.99-pre-3599 Deprecate getAABBPool so people can stop using it in mods. Failure to do so will result in 1.7.10 upgrade incompatibility. Use getBoundingBox instead. + - v99.99-pre-3598 Tweak bad packet warning some. Makes it a bit more log friendly. + - v99.99-pre-3597 Fix not being able to change target & attackDamage for EnderTeleportEvent. + - v99.99-pre-3596 MinecraftForge/FML@e3ce211cc798f4d86ca6f974d9ba8b4e389b4dc9 Nullcheck the dispatchers on players. Should stop some crashes when spamming connectivity. + MinecraftForge/FML@480bf2c1d078038bb59c4254a01a5af685c7cb22 Fix REPLY handling in SimpleNetworkWrapper. Closes #440 + - v99.99-pre-3595 Fix REPLY handling in SimpleNetworkWrapper. Closes #440 + - v99.99-pre-3594 Fix inverted parameters in OreDictionary.getOreID Closes #1123 + -.- Closes #1120 + - v99.99-pre-3593 Added support for new FML config GUI classes + refactored lots of stuff based on comments + added Configuration.load() exception handling and logging + - v99.99-pre-3592 Added config GUI system + - v99.99-pre-3591 Merge branch 'master' into mc179 + - v99.99-pre-3590 Nullcheck the dispatchers on players. Should stop some crashes when spamming connectivity. + - v99.99-pre-3589 Merge pull request #1034 from Adubbz/master + Greatly simplified the addition of new biomes to the default world. If this breaks things blame Adubbz. + - v99.99-pre-3588 Added Noteblock change and play events. Closes #1027 #1025 + - v99.99-pre-3587 Add target world to PlayerInteractEvent for potential 'cross dimension' interaction such as LittleBlocks. Closes #1071 + - v99.99-pre-3586 Add a couple of localizations to Forge added strings. Closes #1068 + - v99.99-pre-3585 Merge pull request #1095 from rwtema/master + Fixed setBlock not using the location version of getLightOpacity() + - v99.99-pre-3584 Filter all vanilla blocks that we missed through Forge's getDrops and BlockDrops events. As well as implemented IShearable for DoublePlants and DeadBushes. Mojang really should generic out some of this stuff instead of repeating logic all over the place! + - v99.99-pre-3583 Add comment to RotationHelper telling modders where to actually look, closes #1115 + - v99.99-pre-3582 Fixed GuiContainer calling button.mouseReleased. Closes #1116 + - v99.99-pre-3581 Fix patch fuzz + - v99.99-pre-3580 MinecraftForge/FML@585d3a91e15213da20fb1669b81cc6563ab4e780 If a packet is not handled by the channel, log it, and clear it. Could be spammy, but this is a serious bug and could cause a memory leak otherwise. + MinecraftForge/FML@cd715efca14604cd8c7b1bdb54c0796202d55e69 Log the queue as well + - v99.99-pre-3579 Merge pull request #1112 from diesieben07/entity-tracking + Add PlayerEvent.StartTracking and .StopTracking + - v99.99-pre-3578 Add PlayerEvent.StartTracking and .StopTracking & make trackedEntityIDs visible + & Update, as discussed on IRC (squash) + - v99.99-pre-3577 Merge pull request #1109 from Open-Code-Developers/finite-patch + Make finite fluid blocks drainable + - v99.99-pre-3576 Fix enum helpers for EnumRarity {moved to Commn and changed paramter} and EnumCreatureType {new parameter} and added junit test for them. Closes #1009 + - v99.99-pre-3575 Log the queue as well + - v99.99-pre-3574 If a packet is not handled by the channel, log it, and clear it. + Could be spammy, but this is a serious bug and could cause a memory leak + otherwise. + - v99.99-pre-3573 MinecraftForge/FML@1d41aa978d41267e4040ec449e10f49a20edd4fa Fix the side for the compatibility check. Should result in green ticks finally! + - v99.99-pre-3572 Fix the side for the compatibility check. Should result in green ticks finally! + - v99.99-pre-3571 Change IShearable JavaDoc by one line so Anti would shut up. Closes #1054 + - v99.99-pre-3570 MinecraftForge/FML@4512f8e5e316ddaf6a4fe35470f1f88dcdddae1a Warn when the objectholder finds nothing in the registry. Helps debug mismatched names. Also, actually make the scoping thing work with objectholder + - v99.99-pre-3569 Warn when the objectholder finds nothing in the registry. Helps debug mismatched names. + Also, actually make the scoping thing work with objectholder + Also handle Blocks.air as a special case. It should never be a valid block in the block registry. + Nothing can ever replace the default block registry block. It is disabled for replacement. + Air is properly skipped + - v99.99-pre-3568 Merge pull request #1089 from RainWarrior/render-events + Added world display list render events + - v99.99-pre-3567 Added world display list render events + - v99.99-pre-3566 Merge pull request #1103 from ganymedes01/patch-1 + Fix getOreIDs not using the wildcard value correctly + - v99.99-pre-3565 Fix getOreIDs not using the wildcard value correctly + You can see it's not working by requesting the ore IDs from lapis, and you'll see the name "dye" is missing (and that's the one registered using the wildcard). + Fixed it by inverting the order of the item stack parameters. + - v99.99-pre-3564 Prevent duplciates in registered Ores in the OreDictionary and clean up some of the code, add new function to return all ores the specified ItemStack satisfies. Closes #1102 + - v99.99-pre-3563 Merge pull request #1101 from Open-Code-Developers/master + Fix fluid blocks + - v99.99-pre-3562 Make finite fluid blocks drainable + - v99.99-pre-3561 Fix fluid blocks + For https://github.com/BuildCraft/BuildCraft/issues/1843 . + - v99.99-pre-3560 Updated FML: + MinecraftForge/FML@3aba56440aa7a95f6431efcdcb5c127ebafc8891 lastIndexOf, Note Don't code while sick. + - v99.99-pre-3559 lastIndexOf, Note Don't code while sick. + - v99.99-pre-3558 Updated FML: + MinecraftForge/FML@3a687f48b9606b4f9179d63ef0b831a25821ff8f -.- Save File First. My Bad. + - v99.99-pre-3557 -.- Save File First. My Bad. + - v99.99-pre-3556 Updated FML: + MinecraftForge/FML@c828bb63c57cb10c23d9b1c3a6934e9f9ddba37b Make AccessTransformer change INVOKESPECIAL to INVOKEVIRTUAL when making methods visible + MinecraftForge/FML@a9aa468457a1eeed3366505b93e36da654610f05 Merge pull request #431 from diesieben07/at-invokevirtual + MinecraftForge/FML@31d726abad0dec6d1b853e9adf6a01580aee2af4 Fix the null networkHandler in the MessageContext + MinecraftForge/FML@725d988e36a7b104b9f5d8ae2daf993ac12af5bd Add in the objectholder, autopopulated by FML based on simple rules. Allows for reference driven substitution of mod blocks and items based on their server running state. + MinecraftForge/FML@f07bf5cb30a20ca9f62337512e936cfefcfbf0c4 Fixed deobfusication of nested inner classes. And removed legacy ModLoader remaps. + - v99.99-pre-3555 Fixed deobfusication of nested inner classes. And removed legacy ModLoader remaps. + - v99.99-pre-3554 Add in the objectholder, autopopulated by FML based on simple rules. Allows + for reference driven substitution of mod blocks and items based on their + server running state. + - v99.99-pre-3553 Fix the null networkHandler in the MessageContext + - v99.99-pre-3552 Add Glass, Colored glass, ore storage blocks, alines, and a few others to ore dicitonary. Closes #1011 + - v99.99-pre-3551 Made WorldGenShrub respect Block.canSustainPlant, Closes #1096 + - v99.99-pre-3550 Add new PlayerEvent.Clone called when an EntityPlayer is cloned via dimension travil or respawn. + - v99.99-pre-3549 Fixed setBlock not using the location-specific version of getLightOpacity() + - v99.99-pre-3548 Merge pull request #431 from diesieben07/at-invokevirtual + Make ATs replace INVOKESPECIAL when needed + - v99.99-pre-3547 Merge pull request #1091 from Clashsoft/master + Don't render ItemStack tooltip twice + - v99.99-pre-3546 Update GuiScreen.java.patch + - v99.99-pre-3545 Make AccessTransformer change INVOKESPECIAL to INVOKEVIRTUAL when making methods visible + - v99.99-pre-3544 Merge pull request #1086 from WaDelma/master + Added amount that is being filled/drained to the FluidEvent + - v99.99-pre-3543 Fluid events now know how much fluid is moved + Added amount that is being filled/drained to the FluidEvent + Added constructors without amount to ensure backwards compability + Added deprecation to amountless constructors + - v99.99-pre-3542 Fixed Stems not droping a random number of seeds based on metadata, Closes #1087 + - v99.99-pre-3541 Merge pull request #1081 from XCompWiz/master + Bug Fixes to Biome Decoration and Chunk + - v99.99-pre-3540 Bug Fixes to Biome Decoration and Chunk + Fixes issue with biome decoration crashing on worlds with exposed void + Fixes same issue in JungleBiome decoration + Fixes forge bug in getting lighting from a block in chunk + - v99.99-pre-3539 First draft 1.7.9 support. + This is not modding minecraft. It's performing an update. Go away! + - v99.99-pre-3538 Added accessible instance to RenderBlocks and RenderItem for modders to use who don't wish to create there own instance. Warning: Other modders may influance the transient state of the instance, BE WEARY MODDERS. + - v99.99-pre-3537 Added Farmland to PLAINS type plants as that has changed in 1.7. Also made BlockTallGrass call it's super.canBlockStay to better support custom soils. Closes #1077 + - v99.99-pre-3536 In Flower Forest biome a Poppy should spawn instead of Blue Orchid Closes #1078 + - v99.99-pre-3535 MinecraftForge/FML@43e3ee1af1cab54db238dab4994076fdbe68bc6a Swap Listenerlist constructor around. Should fix parent resizing issue? + - v99.99-pre-3534 Swap Listenerlist constructor around. Should fix parent resizing issue? + - v99.99-pre-3533 MinecraftForge/FML@70570a863ffa6a3ba7e2dd30b471bb47615b8bf8 Fix up possible CME + - v99.99-pre-3532 Fix up possible CME + - v99.99-pre-3531 MinecraftForge/FML@503da3a2577a069b7847c158a27e8316c85ed852 Don't consider null NetworkDispatchers. This should fix a bunch of fakeplayer issues. + - v99.99-pre-3530 Don't consider null NetworkDispatchers. This should fix a bunch of fakeplayer issues. + Nothing to see here. No modding being done. + - v99.99-pre-3529 Fixed No Blue Orchids spawn in swamp when using bone meal Closes #1072 + - v99.99-pre-3528 Fully clear DimensionManager's DimensionID bitset when world is loaded. Closes #1074 + - v99.99-pre-3527 Fix forge validating strict versions on remote connections. + - v99.99-pre-3526 MinecraftForge/FML@a8cbef2321a8e1bdfac56476bdfb5b306f71d38b Finally hopefully fully kills the race condition causing a classcast on slow machines. + MinecraftForge/FML@8dbd1ae0a177a556d03630a059242a2ee7f45e55 Fix ObjectIntIdentityMap sporadically matching non-identical objects. + MinecraftForge/FML@42713c66e565a26e963099baa838800f250089c3 Merge pull request #426 from sfPlayer1/master + - v99.99-pre-3525 Merge pull request #426 from sfPlayer1/master + Fix ObjectIntIdentityMap sporadically matching non-identical objects. + - v99.99-pre-3524 Fix ObjectIntIdentityMap sporadically matching non-identical objects. + - v99.99-pre-3523 Finally hopefully fully kills the race condition causing a classcast + on slow machines. + This is me bugfixing. NOT MODDING! No! Stop it! I'm not! + - v99.99-pre-3522 Greatly simplified the addition of new biomes to the default world + - v99.99-pre-3521 MinecraftForge/FML@d8b6adb2598ce144568a0aaf26fa8b988c028b7c Add a helper for casting some common collection types into generic form + MinecraftForge/FML@5275cea844a6afacc0deb41d153f01c1c25bb924 Try and see if there is anything to the identityHashCode collision hypothesis. If you see this in your error messages, kindly let us know! + - v99.99-pre-3520 Try and see if there is anything to the identityHashCode collision hypothesis. If you see this in your error messages, kindly let us know! + - v99.99-pre-3519 Add a helper for casting some common collection types into generic form + - v99.99-pre-3518 Updated FML: + MinecraftForge/FML@a70308ef41f1e24074ea718f64caf75b8d6acba7 Update mcmod.info + MinecraftForge/FML@8555344eb33e4f0cc676defdb7391a24ebd5677d updated wrapper to gradle 1.12 + MinecraftForge/FML@1d5fc60f82e911c1abfbebbe781316126c02c987 Merge pull request #411 from matthewprenger/master + MinecraftForge/FML@3612ad0c25d103ba9bc81b32e8ecfef2dfc1cadc Attempt to fix another race condition related to reading NetClientHandler. + MinecraftForge/FML@c73a2076e3dd5d1f60c2fe2f589109cefa2dc6ce Fix potential rance condition in connecting to vanilla servers as well. And move latch into client side only. + MinecraftForge/FML@1436ac2f14fbdb48777c90b1b93378108c9cbf36 Fine use FMLCommonHandler. + MinecraftForge/FML@542e9acec1016c950c6f80af0c9da3190691359b documented dependencies + MinecraftForge/FML@ddc2cfbe864bd377232dbd1aa65df6e710d4639d Merge pull request #402 from AbrarSyed/patch-1 + MinecraftForge/FML@362ec8dee7ed2c291a8ed287c52eacdd80582eff Merge pull request #419 from Thog92/master + MinecraftForge/FML@b9de9ebc960bbf26e7aee570701aa4c226252fee Revert "Fix refreshResources not happening if an error occurs." + MinecraftForge/FML@738ce1d7cd5575269375066586d0a37881c536e2 Re-add removed genericiterable to clean a warning + MinecraftForge/FML@b0eb1ef7c6f4a63689898bf28f28e84d2dbae6e7 Split loadmods into loadmods and preinitmods, to allow resource loading to occur *always* between the two phases. This should fix mods not being able to access resources during preinit. + MinecraftForge/FML@de546bdf6cbeadb612cd6385bac8d54480073496 Clean up some missing generic info + MinecraftForge/FML@cd43eacbb25bc9cc0e81138844fa3aa7fd133037 Ensure that the loadcontroller is ready to preinit. + MinecraftForge/FML@f2fe80dc36972fe9db57e700380b6869abbc1832 Fixed default network mod checking to allow client side mods without the server side. Mods wishing to REQUIRE server side components must specify a custom check handler using @NetworkCheckHandler + MinecraftForge/FML@0c36868f92a3516c83ae363e13e5cb1db81236d1 Fix network disconnect with message on the client side in NetworkDispatcher. + - v99.99-pre-3517 Fix network disconnect with message on the client side in NetworkDispatcher. + - v99.99-pre-3516 Fixed default network mod checking to allow client side mods without the server side. Mods wishing to REQUIRE server side components must specify a custom check handler using @NetworkCheckHandler + - v99.99-pre-3515 Merge pull request #1064 from bspkrs/patch-2 + Fixed unforeseen NPE + - v99.99-pre-3514 Ensure that the loadcontroller is ready to preinit. + - v99.99-pre-3513 Clean up some missing generic info + PS: NOPE: still not modding. + - v99.99-pre-3512 Split loadmods into loadmods and preinitmods, to allow resource loading to occur *always* between the two phases. This should fix + mods not being able to access resources during preinit. + PS: I'm still not modding. + - v99.99-pre-3511 Fixed unforeseen NPE + - v99.99-pre-3510 Re-add removed genericiterable to clean a warning + - v99.99-pre-3509 Revert "Fix refreshResources not happening if an error occurs." + This reverts commit fff86ee9d35874bdf77a1eaabe77615441644064. + - v99.99-pre-3508 Revert "Implemented hashCode and equals in ItemStack, Closes #986" + This reverts commit 0b01545a03942abca7b7ea28030be81e2ebeaa59. + - v99.99-pre-3507 Merge pull request #419 from Thog92/master + updated wrapper to gradle 1.12 + - v99.99-pre-3506 Merge pull request #402 from AbrarSyed/patch-1 + Added dependency examples to the shipped example mod's build.gradle. + - v99.99-pre-3505 documented dependencies + - v99.99-pre-3504 Implemented hashCode and equals in ItemStack, Closes #986 + - v99.99-pre-3503 Fix extended entity properties being lost when leaving the end, This introduces the concept of calling IExtendedEntityProperties.init when entites/worlds change. Lets see if mods explode. + - v99.99-pre-3502 Fine use FMLCommonHandler. + - v99.99-pre-3501 Merge pull request #1062 from bspkrs/master + New GuiScreen events and a new ElementType DEBUG for RenderGameOverlayEvent + - v99.99-pre-3500 Fix potential rance condition in connecting to vanilla servers as well. And move latch into client side only. + - v99.99-pre-3499 New GuiScreen events and a new ElementType DEBUG for RenderGameOverlayEvent + - v99.99-pre-3498 Attempt to fix another race condition related to reading NetClientHandler. + - v99.99-pre-3497 Added new hook to WeightedRandom.getItem that allows for use of custom rnadom generators, prevents redundant code in mods. + - v99.99-pre-3496 Merge pull request #411 from matthewprenger/master + Update ExampleMod mcmod.info + - v99.99-pre-3495 Fixed hard references in WorldGenBigTree and ForgeCommand that caused worlds to leak in the client. + - v99.99-pre-3494 Updated FML: + MinecraftForge/FML@2c56c32c5aa8842cfadaf8c237396cdb75673909 Fix saving backups with the raw name. Fix air block not being assigned as the default. + MinecraftForge/FML@d0f8073fa51db7426d5ded373f3404fa60d722f0 Merge pull request #413 from sfPlayer1/master + MinecraftForge/FML@810b1f3075e6061ab189e1f6975bd77b20040d71 Clean some generic warnings up. Make a generic list handler. Helpful for others I think too. + MinecraftForge/FML@fff86ee9d35874bdf77a1eaabe77615441644064 Fix refreshResources not happening if an error occurs. + MinecraftForge/FML@76d8d0e870a4e389167634283984dc10abb08e84 Fix mod version checking + MinecraftForge/FML@b84d0760ae47832e5b1e4d50237b582b2d50d520 Fix display of mod status at the server + MinecraftForge/FML@251af1d09dfbf636e2fb3f323a5345c81cc07aea Fixed memory leak on the client caused by Netty holding references to the World. + - v99.99-pre-3493 Merge pull request #1060 from Azanor/master + Fix for Block.getExplosionResistance getting passed the wrong parameters + - v99.99-pre-3492 Fix for Block.getExplosionResistance getting passed the wrong parameters + It is being sent the x, x, y coordinates instead of x, y, z + - v99.99-pre-3491 updated wrapper to gradle 1.12 + - v99.99-pre-3490 Fixed memory leak on the client caused by Netty holding references to the World. Closes #415 #417 + - v99.99-pre-3489 Fix display of mod status at the server + - v99.99-pre-3488 Fix mod version checking + - v99.99-pre-3487 Fix refreshResources not happening if an error occurs. + - v99.99-pre-3486 Clean some generic warnings up. Make a generic list handler. Helpful for others I think too. + - v99.99-pre-3485 Merge pull request #413 from sfPlayer1/master + backup+default block use fix + - v99.99-pre-3484 Fix saving backups with the raw name. + Fix air block not being assigned as the default. + - v99.99-pre-3483 Merge pull request #1051 from Deadrik/ChunkProviderFixes + ReplaceBiomeBlocks Event changes + - v99.99-pre-3482 Adds a new ReplaceBiomeBlocks Event constructor that supplies the metadata array if applicable and updates the ChunkProviderGenerate class to pass in the metadata array. + - v99.99-pre-3481 Merge pull request #1050 from CovertJaguar/master + Flexible Rail return value was inverted between 1.6 and 1.7 + - v99.99-pre-3480 Fix issue with flexible rail return value + Between 1.6 and 1.7 the return value to BlockRailBase.isFlexibleRail() + was inverted. While this is not a huge deal and could be worked around + by simply inverting your return value, it does mean its no longer + consistent with the function name and javadocs. + - v99.99-pre-3479 Update mcmod.info + - v99.99-pre-3478 No, this is not me modding either. I'm doing this as a favour for Lex, who's a bit computerless at the minute. + MinecraftForge/FML@77c254a6d9658a38768d53425291e93557fddc85 I am not modding, I am fixing an annoyance. The MCP version has long since been 9.03. Also, the JSON from MC updated.. + MinecraftForge/FML@7f01cf549b88f8d5f4dfae7bc17d08f8c5e525c8 I'm still not modding. Player has contributed greatly to the 1.7 release of FML. He needs authorship credit. + MinecraftForge/FML@2b8d0f6680de6257583912f3159cce38ce2bf08c Fix SimpleNetworkWrapper - this is not me modding, I didn't realize it was broken until Pahimar told me. + MinecraftForge/FML@ddee7eb117a50d190d6e987d94076f53b3b6807b Fix vanilla bug causing integrated server saving from 2 threads concurrently after a crash + MinecraftForge/FML@59a5adfdb3ffdffe0df206109dd59a3d4d023afe Registry: Fix Block-before-ItemBlock allocation when loading 1.6 world saves, more validation + MinecraftForge/FML@d88b2aa0c5401c9b2b48cb451f1ab9bbee52bec1 prevent the world from getting saved twice at shutdown + MinecraftForge/FML@9b1cbab03b75fc15905c8ce02f401f48b174782c Registry: Crash earlier with conflicting name/object registrations. + MinecraftForge/FML@7ba167c500cbccc05ce5104e9b26eb6a799aaaa8 Registry: Misc tweaks + MinecraftForge/FML@78248da399c04a438586d1a5d7f36d6d752dd5c3 Registry: Treat all 1.6 entries as items. + - v99.99-pre-3477 Registry: Treat all 1.6 entries as items. + - v99.99-pre-3476 Registry: Misc tweaks + - v99.99-pre-3475 Registry: Crash earlier with conflicting name/object registrations. + - v99.99-pre-3474 prevent the world from getting saved twice at shutdown + - v99.99-pre-3473 Registry: Fix Block-before-ItemBlock allocation when loading 1.6 world saves, more validation + - v99.99-pre-3472 Fix vanilla bug causing integrated server saving from 2 threads concurrently after a crash + - v99.99-pre-3471 Fix SimpleNetworkWrapper - this is not me modding, + I didn't realize it was broken until Pahimar told me. + Put an example in the docs. + - v99.99-pre-3470 Merge pull request #1044 from bspkrs/patch-1 + Fixed typo in update checker + - v99.99-pre-3469 I'm still not modding. Player has contributed greatly to the 1.7 release of FML. He needs authorship credit. + - v99.99-pre-3468 I am not modding, I am fixing an annoyance. The MCP version has long since been 9.03. Also, the JSON from MC updated.. + - v99.99-pre-3467 get a spelling checker :P + - v99.99-pre-3466 Bump Forge version in prep for release. + - v99.99-pre-3465 Try and fix invalid framebuffer depth/stencil setup, Thanks Ivoforce. Closes #1032 + - v99.99-pre-3464 Merge pull request #1038 from planetguy32/master + Fix infinite loop in RecipeSorter + - v99.99-pre-3463 Fix infinite loop in RecipeSorter + If recipe is multiple levels of inheritance from Object and not categorized, cls=cls.getSuperclass(); needs to be repeated more than once. It must therefore be moved to inside the while loop. + - v99.99-pre-3462 Merge pull request #1029 from iChun/patch-1 + Fixes stencil buffers on platforms not supporting OpenGL 3.0 or higher. + - v99.99-pre-3461 Fixes stencil buffers on platforms not supporting OpenGL 3.0 or higher. + - v99.99-pre-3460 Small wording change in license to allow for specifc differnet licnense contributions. + Updated FML: + MinecraftForge/FML@e58562d3edfd1cd37fdc0a9e54181aed7433fdff Fix remaining issue with autoassigned Block and Item IDs overlapping. + MinecraftForge/FML@a82195772e539437911c25508168cb607659bc71 Registry: Block IDs after failing to find a mapping for them + MinecraftForge/FML@fd9389015fd5c6150155531bf1fffb38cfe9d551 Fix FMLMissingMappingsEvent.get + MinecraftForge/FML@5eebd4df718d65ac8426deba61e1ebb6ae2fde18 Registry: Implement support for remapping blocks/items to a new name. + MinecraftForge/FML@7325aa5033e7a5b5db79340777dd7a1c763315a0 Registry: cleanup, fix missing id error GUI formatting + MinecraftForge/FML@eb29d651ebda7086fe6d1f716295b087e2c17e6f Fix old 1.7 worlds with broken ID mappings + MinecraftForge/FML@6fd3c12a4a15a5cf38c421a94576a5cacd3fb7c1 Registry: allow handling missing blocks/items regardless of the mod id + MinecraftForge/FML@038fa17ad33aeba276db84ab170504fce884c1e7 Merge branch 'master' of https://github.com/MinecraftForge/FML + MinecraftForge/FML@49c623f59c440ba177adf2d76332ecee25e12236 initial attempt at a better way to ask the user in case of startup issues + MinecraftForge/FML@9be92dcfcb1c737025397c92b18ed027a6c7f4fa Registry: Complain about bogus registrations + MinecraftForge/FML@fd6d55afcc4f4c650c143ad43e09fbdc2cb9d850 Registry: Allow ignoring missing mods from the GUI, with confirm+backup + Registry: Add confirm+backup for automated corrupted id table fixup Require the user to confirm loading from a backup level.dat + MinecraftForge/FML@c47fc3b382434d435050b4ee02a02550b81f5717 Enable custom gui rendering only as required + MinecraftForge/FML@f77632df35dbf53fb31420fa86e6792f13257020 Remove unneeded entity spawn debug logging. + MinecraftForge/FML@c7adb42199a0684d8748451d39deb8326c0a2194 Registry: Repair mismatched ItemBlocks as well Fix a few misc issues + MinecraftForge/FML@c8a245a985779fd2545ee4b58a93270973aeb435 Registry: Fix debug info + MinecraftForge/FML@c8a0b72eba9265be608670424e1bd835a9d2f1e2 Registry: Complain about missing mods when repairing broken worlds Registry: Reduce console spam + MinecraftForge/FML@8e44006f432f1b36b826ff0469d99986a6051e4b Registry: Protect against putObject misuse, handle duplicate registrations better + MinecraftForge/FML@294c93212cd9f30c50b9d1a3b048a6141c45cdea Registry: Add support for registering ItemBlocks before their Blocks + MinecraftForge/FML@3b42b33b6ec4020b5032cae06760053ed135fae8 Merge pull request #400 from sfPlayer1/master + - v99.99-pre-3459 Merge pull request #400 from sfPlayer1/master + Fix various registry issues + - v99.99-pre-3458 Registry: Add support for registering ItemBlocks before their Blocks + - v99.99-pre-3457 Merge pull request #1028 from alexbegt/patch-1 + Small Fix: Held Items & Multiple Render Passes + - v99.99-pre-3456 Small Fix: Held Items & Multiple Render Passes + Passes beyond 1 now have the correct icon. + - v99.99-pre-3455 Registry: Protect against putObject misuse, handle duplicate registrations better + - v99.99-pre-3454 Registry: Complain about missing mods when repairing broken worlds + Registry: Reduce console spam + - v99.99-pre-3453 Registry: Fix debug info + - v99.99-pre-3452 Registry: Repair mismatched ItemBlocks as well + Fix a few misc issues + - v99.99-pre-3451 Fix line offset in Minecraft patch, and mix RenderPlayer looping once to many on multi-pass items. + - v99.99-pre-3450 Merge pull request #1024 from ShetiPhian/patch-1 + Add a variable for SoundCategory in PlaySoundEvent17 + - v99.99-pre-3449 Update PlaySoundEvent17.java + - v99.99-pre-3448 Remove unneeded entity spawn debug logging. + - v99.99-pre-3447 Enable custom gui rendering only as required + - v99.99-pre-3446 Finally do SoundSystem workup for 1.7, Closes #982 + - v99.99-pre-3445 Add NPE protection to GuiingameMenu.actionPerformed, Closes #961 + - v99.99-pre-3444 Update access transformer, Closes #951 and #1021 + - v99.99-pre-3443 Fix potential threading issue if FluidRegistry.loopupFluidForBlock is called from two threads at the same time before being setup. Closes #936 + - v99.99-pre-3442 Use BiomeGenBase's array size instead of hardcoding it in BiomeDictionary. Closes #871 + - v99.99-pre-3441 Add AnvilUpdateEvent which is fired when a user places a item in both input slots of a Anvil and allows modders to control the output. Closes #838 + - v99.99-pre-3440 Add ANIMALS tpe to PopulateChunkEvent.Populate Custom providers should call this function if they spawn animals curing population. Closes #790 + - v99.99-pre-3439 ItemStack sensitive version of Item.getAttributeModifiers, Closes #816 + - v99.99-pre-3438 New hook to truely seperate the display of the 'durability' bar from the current / max durability. Allowing modders to control that display easier. + - v99.99-pre-3437 Advanced Model Loader available server-side for data driven models. To be cleanuped and re-evaluated in 1.8. Closes #773 + - v99.99-pre-3436 Add position to BreakSpeed event. Closes #621 + - v99.99-pre-3435 Registry: Allow ignoring missing mods from the GUI, with confirm+backup + Registry: Add confirm+backup for automated corrupted id table fixup + Require the user to confirm loading from a backup level.dat + - v99.99-pre-3434 Registry: Complain about bogus registrations + - v99.99-pre-3433 initial attempt at a better way to ask the user in case of startup issues + - v99.99-pre-3432 Merge branch 'master' of https://github.com/MinecraftForge/FML + Conflicts: + src/main/java/cpw/mods/fml/client/FMLClientHandler.java + src/main/java/cpw/mods/fml/client/GuiModItemsMissing.java + src/main/java/cpw/mods/fml/common/FMLContainer.java + src/main/java/cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry.java + src/main/java/cpw/mods/fml/common/registry/GameData.java + - v99.99-pre-3431 Update patches for new Fixed FernFlower used in FG 1.2. + - v99.99-pre-3430 Merge pull request #1012 from AbrarSyed/master + Updated for ForgeGradle 1.2 + - v99.99-pre-3429 Update patches for Fixed FF in FG 1.2. + - v99.99-pre-3428 Registry: allow handling missing blocks/items regardless of the mod id + - v99.99-pre-3427 Fix old 1.7 worlds with broken ID mappings + - v99.99-pre-3426 fixed remaining noop patches and exc derp + - v99.99-pre-3425 updated FML to latest master + - v99.99-pre-3424 added .exe file.. fixed a bunch of patches + - v99.99-pre-3423 Registry: cleanup, fix missing id error GUI formatting + - v99.99-pre-3422 Merge pull request #392 from AbrarSyed/master + Updated to ForgeGradle 1.2 + - v99.99-pre-3421 updated wrapper to gradle 1.11 + - v99.99-pre-3420 updated example a little + - v99.99-pre-3419 updated for ForgeGradle 1.2 + - v99.99-pre-3418 COnverted patches to SRG names + - v99.99-pre-3417 Registry: Implement support for remapping blocks/items to a new name. + - v99.99-pre-3416 Fix FMLMissingMappingsEvent.get + - v99.99-pre-3415 Registry: Block IDs after failing to find a mapping for them + - v99.99-pre-3414 Fix remaining issue with autoassigned Block and Item IDs overlapping. + - v99.99-pre-3413 Update CONTRIBUTING.md + Add link to wiki page on contributing + - v99.99-pre-3412 Create CONTRIBUTING.md + Simple file (which github will show for those making PRs) containing guidelines for making PRs. + Feel free to comment if you want/need anything added. I can pull the same thing to FML too if you'd like, Lex. + - v99.99-pre-3411 updated for ForgeGradle 1.2 + - v99.99-pre-3410 Update README.txt + - v99.99-pre-3409 Fix network close events never getting called. Closes #381 #382 + - v99.99-pre-3408 Merge pull request #998 from Eurymachus/master + This correctly uses the world height less one block for placement of a door + - v99.99-pre-3407 This correctly uses the world height less one block for placement of a + Door. + Required for placing doors inside a littleblocks area. + - v99.99-pre-3406 Fix long standing deobf issue that caused announce-player-achievements property to have no effect on dedicated servers. + - v99.99-pre-3405 MinecraftForge/FML@ef07de4f65ea16e1db1467845e316cb4c7d01a1f Fix hard link to DedicatedSerever when opening a LAN connection causing stalls on connecting. + - v99.99-pre-3404 Fix hard link to DedicatedSerever when opening a LAN connection causing stalls on connecting. + - v99.99-pre-3403 -.- Both null combinations. + - v99.99-pre-3402 properly implement equals, sod off Player. + - v99.99-pre-3401 Implement simple hash based equals in Fluid ContainerKey. + - v99.99-pre-3400 Make StructureVillagePieces.Village public. + - v99.99-pre-3399 Merge pull request #995 from iChun/master + Fixes stencil bits not existing in Minecraft's framebuffer causing stencil test to not work. + - v99.99-pre-3398 Fixes stencil bits not existing in Minecraft's framebuffer causing stencil test to not work. + - v99.99-pre-3397 Updated FML: + MinecraftForge/FML@e8b60441ccca8cccdc130560b4c8bf400aebc605 Reload game settings after mod loading is finished to capture mod keybindings. Closes #378 + MinecraftForge/FML@399770e572c9177babfb65a27280253023db2d9e Kill the modEventTypes list, register anything that extends FMLEvent, Fixes MissingMappingEvent handler, and any futureevents added. + MinecraftForge/FML@b7ad532ab5eb3e00d77ffde946d25675c9f69cf7 Re-enable post initalize texture pack reloading to allow Icons to be registerd through any init phase. + - v99.99-pre-3396 Re-enable post initalize texture pack reloading to allow Icons to be registerd through any init phase. + - v99.99-pre-3395 Merge pull request #983 from DemoXinMC/master + Added Ore Dictionary entries and recipe replacements for Diamond, Emerald, Crops, Redstone, and Glowstone + - v99.99-pre-3394 Merge pull request #984 from ShetiPhian/item-renderer-fix + Small Fix: Held Items & Multiple Render Passes + - v99.99-pre-3393 * Fixed Items.glowstone to Items.glowstone_dust + - v99.99-pre-3392 Small Fix: Held Items & Multiple Render Passes + Passes beyond 1 now have the correct icon. + - v99.99-pre-3391 * Added Ore Dictionary entries and recipe replacements for Diamond, Emerald, Crops, Redstone, and Glowstone + - v99.99-pre-3390 Kill the modEventTypes list, register anything that extends FMLEvent, Fixes MissingMappingEvent handler, and any future events added. + - v99.99-pre-3389 Fixed hashcode in FluidContainerRegistry, still needs a redesign. Closes #967 + - v99.99-pre-3388 Reload game settings after mod loading is finished to capture mod keybindings. Closes #378 + - v99.99-pre-3387 Merge pull request #978 from iChun/master + Add cancelable RenderHandEvent. + - v99.99-pre-3386 Add cancelable RenderHandEvent. + - v99.99-pre-3385 Fix a typo in our tile entity fix causing it to be ineffective. + - v99.99-pre-3384 Fix items with color rendering incorrectly. + - v99.99-pre-3383 Update Forge for patch changes + MinecraftForge/FML@064b66af3d6c92b19821b88ec26cbb59577d68b4 Prevent players from logging in until server has finished starting. + MinecraftForge/FML@2aa73afa15908dadb0a033c49deb0ffefad2f265 Fix ExampleMod.java for build #1024+ + MinecraftForge/FML@c890206268da3c594d97198f5426b52ff6b8460c Try and handle removal of mods a bit better. Currently no way to allow a world which has missing blocks to load - but i have the code in place to allow it i think. + MinecraftForge/FML@995c204338cd601e118396d4b4ef8feb6e759037 Fix failing to load a world with missing mod blocks and items. There will be a way to force worlds to load when stuff is missing, but for right now, it will fail as this is "world safe". + MinecraftForge/FML@fa5f4c884272f415933329a9e914e0b7d052e31a Some argumentation + MinecraftForge/FML@45409bfa0c136078823a1aef1358396d92a269ee Prevent player dat files getting reset during disconnects. + MinecraftForge/FML@33100d6bab654a4bd59701b1ec2bf91caa3399da Merge pull request #371 from bl4ckscor3/patch-1 + MinecraftForge/FML@572d32358ab11e5916d91c4c7b9c04a70cfed2f6 Merge pull request #373 from bloodmc/master + MinecraftForge/FML@d0dd05a15c2eca9eabd308319c2ed85cb632922b FML expands S3F to support payloads up to 2 megs in size. Should be transparent + - v99.99-pre-3382 FML expands S3F to support payloads up to 2 megs in size. Should be transparent + - v99.99-pre-3381 Merge pull request #373 from bloodmc/master + Prevent player data getting reset during disconnects. + - v99.99-pre-3380 Merge pull request #371 from bl4ckscor3/patch-1 + Fix ExampleMod.java for build #1024+ + - v99.99-pre-3379 Prevent player dat files getting reset during disconnects. + Since FML nulls out the player's playerNetServerHandler during login, we need to + make sure that writePlayerData does not attempt to overwrite the player's dat file + if the player disconnects during the "Logging In" process. + - v99.99-pre-3378 Fixeed a missed -1 in SpawnerAnimals patch. Thanks Blood. + - v99.99-pre-3377 Cull FakePlayers when worlds are unloaded. + - v99.99-pre-3376 Use correct tag types when reading Forced Chunk data. Fixes ticket loading. Closes #964 + - v99.99-pre-3375 Fixed FluidContainerRegisry.contansFluid closes #845 + - v99.99-pre-3374 Some argumentation + - v99.99-pre-3373 Fix failing to load a world with missing mod blocks and items. There will be a way to force worlds to load + when stuff is missing, but for right now, it will fail as this is "world safe". + - v99.99-pre-3372 Try and handle removal of mods a bit better. Currently no way to allow a world which has missing + blocks to load - but i have the code in place to allow it i think. + - v99.99-pre-3371 Fix ExampleMod.java for build #1024+ + - v99.99-pre-3370 Fix AIOOB error with Endermen and blocks >256. Also better support for ID remapping. More to come later. + - v99.99-pre-3369 Prevent players from logging in until server has finished starting. + This improves server security as it guarantees no players will be + allowed to connect until the server has fully initialized. + - v99.99-pre-3368 Add the beginnings of a Constants class, to document/clean some of the magic numbers that are in the MC code base. + - v99.99-pre-3367 Updated FML: + MinecraftForge/FML@03fb1879d72fbd347badc140fed6c2c3191d2990 Fix obf error when right clicking a Empty Map. + MinecraftForge/FML@6bb9b8b9532b276450d03a3419e0da016aecead8 Clean up FMLEventChannel. Closes #367. + MinecraftForge/FML@b7b3450dcd123ab5df6b3693c9c2123bc3846b88 Update MCP mapping snapshot to latest crowdsourced names. + MinecraftForge/FML@8c9e8b52708bd0630303f8b5dc184ab60e2553a1 Fix isRemote, this is integral to so many parts of the code, everyone knows it by this name, People should not change it. + - v99.99-pre-3366 Fix isRemote, this is integral to so many parts of the code, everyone knows it by this name, People should not change it. + - v99.99-pre-3365 Update MCP mapping snapshot to latest crowdsourced names. + - v99.99-pre-3364 Clean up FMLEventChannel. Closes #367. + - v99.99-pre-3363 Fix obf error when right clicking a Empty Map. + - v99.99-pre-3362 Fix up the event handler so it knows it's owned by forge + - v99.99-pre-3361 Add a discriminator for fluididspacket. remove extraneous channel handler. + - v99.99-pre-3360 MinecraftForge/FML@d87822ad8519da1c808e48bcc0a1bf8eb15c0095 Bump gradle wrapper to 1.10 + MinecraftForge/FML@359ac3ca2a941d70709168fbbbc0725c861668dd Ensure we check both item and block registries when finding valid IDs. Should fix #365 + MinecraftForge/FML@cee0f0b81179d307059843f08401f8700fb3ddb2 Tweak so that writing to the context will automatically send a message back to the originator in handshakeestablished. + - v99.99-pre-3359 Tweak so that writing to the context will automatically send a message back to + the originator in handshakeestablished. + - v99.99-pre-3358 Ensure we check both item and block registries when finding valid IDs. Should fix #365 + - v99.99-pre-3357 Fixed missed parens causing trapdoors to fall off incorrectly. + - v99.99-pre-3356 Fixed issue where enchantment effects caused slight rendeirng issue. + - v99.99-pre-3355 Bump gradle wrapper to 1.10 + - v99.99-pre-3354 Uncomment aa few FluidRegistry entries. + - v99.99-pre-3353 Inital Fluid system update, untested. Still in progress. + - v99.99-pre-3352 Attempt a AIOOB error fix in tesselator when there are alot of transparent blocks in the rendering range. + - v99.99-pre-3351 Fix NPE when breaking ice. + - v99.99-pre-3350 MinecraftForge/FML@544320b8d239df4a5ee2b3a7ec331ce2ec0a2c09 Beginning of a saveinspectionhandler. + MinecraftForge/FML@ab199c5811fe2d831592601d4f77691fbf82d1b8 Try harder to find a mod container. + MinecraftForge/FML@8633d780c925ebb719c37ac52e2f3db5f9957895 And make a loud message if there isn't a modcontainer found, substitute Minecraft. In general, this can only happen for coremods not properly registering their code. Closes #363 + - v99.99-pre-3349 And make a loud message if there isn't a modcontainer found, substitute Minecraft. In general, this can only happen + for coremods not properly registering their code. Closes #363 + - v99.99-pre-3348 Try harder to find a mod container. + - v99.99-pre-3347 Fix imporerly efficient tools breaking blocks to fast. + - v99.99-pre-3346 Adds a WeatherRender in the style of SkyRender, Closes #844 + - v99.99-pre-3345 Fixed potential NPE in SlotCrafting, and added ItemStack sensitive version fo hasContainerItem. Closes #854 + - v99.99-pre-3344 Move change of metadata to immediatly after change of Block, should prevent any 'invalid' tile entities from breaking created. Reference: #897 + - v99.99-pre-3343 New PlayerUseItemEvents, Start, Stop, Tick and Finish. See PlayerUseItemEvent.java for more details. Closes #924 + - v99.99-pre-3342 Don't short circuit item icons for multiple render passes while being used. Closes #929 + - v99.99-pre-3341 Add the ability for custom records to have finer control over there sound resource location. Closes #933 + - v99.99-pre-3340 Exclude cobblestone slab recipe from ore dictification, closes #940 + - v99.99-pre-3339 Implement PlayerPickupXpEvent, fired when a player aquires XP from a EntityXPOrb. Closes #942 + - v99.99-pre-3338 Missing EntityAITasks.tasks and MapgGenStructreIO register ATs, Closes #949 + - v99.99-pre-3337 Make ItemBlock.field_150939_a public, closes #945 + - v99.99-pre-3336 Fix Furnace stopping on 63rd Item, Closes #947 + - v99.99-pre-3335 Beginning of a saveinspectionhandler. + - v99.99-pre-3334 MinecraftForge/FML@b6d95d704b65dd8232ec8ddd333de378db8fe161 Name the log files properly. fml-junk is an early startup annoyance I can't kill because log4j2. + MinecraftForge/FML@8692ca17d13eda036b5ef996ec8e8706e7707d80 Log4j2 logging context for things. This should help add context when things go wrong in mods. + MinecraftForge/FML@a7ca131a337b5f0d4fc6f438626ac2d5b7771b3c And don't spam NONE everywhere + MinecraftForge/FML@741e172ffe163f0dd3018e1474af46ef0696396a Log4j2 doesn't need debug level logging for itself anymore + - v99.99-pre-3333 Log4j2 doesn't need debug level logging for itself anymore + - v99.99-pre-3332 And don't spam NONE everywhere + - v99.99-pre-3331 Log4j2 logging context for things. This should help add context when things go wrong in mods. + - v99.99-pre-3330 Name the log files properly. fml-junk is an early startup annoyance I can't kill because log4j2. + - v99.99-pre-3329 MinecraftForge/FML@458b0620b43116c943549a0f060c7e8830c2d77a Log the bad packet in a prettier way. Also, don't show the authlib debug data in the log file. + - v99.99-pre-3328 Log the bad packet in a prettier way. Also, don't show the authlib debug data in the log file. + - v99.99-pre-3327 Add BookCloning to the recipe sorter. + - v99.99-pre-3326 MinecraftForge/FML@9a8d16b66e67691a4c83a9e1e236304e9f6d5139 Fix log4j2 config. Fix server gui to *show* logging. Fix log spamminess in the console. Fix bug in servergui that can cause deadlock. + MinecraftForge/FML@a355eecb2c14123964c6ae2402a0933d57ae9736 Add in error logging for outbound messages. Fix bug with indexedcodec NPE + MinecraftForge/FML@1c793abe0eef6846f681c9673019b0ebc49caaaf Fix derp with networkcheck + MinecraftForge/FML@675b5a07788ada17bc26a9c4f26598e77d2098cf And turn down some more logging, now we have useful logging back again.. + - v99.99-pre-3325 And turn down some more logging, now we have useful logging back again.. + - v99.99-pre-3324 Fix derp with networkcheck + - v99.99-pre-3323 Add in error logging for outbound messages. Fix bug with indexedcodec NPE + - v99.99-pre-3322 Fix log4j2 config. Fix server gui to *show* logging. Fix log spamminess in the console. Fix bug in servergui that can cause deadlock. + - v99.99-pre-3321 MinecraftForge/FML@4aa2416ce5dcd8e77761703c018d1e7d08464025 Propagate Optional method removal to trait implementation classes + MinecraftForge/FML@fc025a7b73d9b3f46ecf2257227657592f5506b5 Logging Changes + MinecraftForge/FML@f0132a6f3b47e746a1a7df3ef84f4be989f140dd changed fml log level to all + MinecraftForge/FML@f23eba4352c38fd21e04e81f3db72c6cafe65a36 put max number of FML log files to 3 + MinecraftForge/FML@449ac98b77025eba38a75d0242113fffe26a8cf9 SSP Worlds updating from 1.6 will now pop a warning message before loading, and will capture a timestamped zip file in the minecraft dir before starting to load. Allows for people to test updates. + MinecraftForge/FML@3557fe31c92ea8d76c90052f9b8b6da963300c4f Throw an exception when discriminator is not found + MinecraftForge/FML@25240457283ba40c32022c97fc982c2ff4408e46 Make NetworkEventFiringHandler sharable + MinecraftForge/FML@dfc0899ec66f87502b5727939ac2f0ad0fabf89f Merge pull request #357 from jk-5/sharable + MinecraftForge/FML@79d42fca8d6b9d73204890ef0edb9d73cf075d87 Merge pull request #355 from jk-5/errorhandling + MinecraftForge/FML@7907e16e96de21e8ba536906ae71adcf02bfa535 Add a type adapter for artifact version. Should fix #354 + MinecraftForge/FML@7ac5bddbc3c227e0ed9385904a2bd9621078e2de Allow indexed messages to validate themselves. Also, catch exceptions from an embedded channel, and cause them to close the connection. It's ugly, but it means that the client doesn't crash if it connects to a screwy bungycord that's trying a 1.6 handshake for some reason. + MinecraftForge/FML@5adacc3b336bacbe30aa06175ef80c3aac08a62a Check the mod, not it's container, in the check handler. Closes #358 + MinecraftForge/FML@3d26f28bcf3e79e1f5fe20fcf056c604487dc35b Allow connection when server is apparently offline. Might allow :NOFML circumvention though. Hmmm. Closes #359 + MinecraftForge/FML@a62374d4aceac1c4ab39b3c0bae624ccbca65b6b findBlock should now return null, not the default block, if the thing being looked for is not found. Closes #352 + MinecraftForge/FML@6a695c4348d062af50b8cf5208530fc5036eba17 Try and stop the epic channel closed spam at close time. Closes #353 + MinecraftForge/FML@35a38d7840a5d0cd842005822c4ec6a9d3b65b6a Make sidedproxy support non-public fields. Closes #344 + MinecraftForge/FML@9d2e089df692655df04315a3822f43140015f3af Merge branch 'logging' of github.com:AbrarSyed/FML into abrar-borked + MinecraftForge/FML@79b04898d43d354714e09ce7e66efb5357ebcf61 And restore suppressions. ABRAR, DON'T TIDY CODE!!!! + MinecraftForge/FML@3dfb54e066ab91e44405706233f2dfffee9add72 Merge branch 'trait-optional' of github.com:RainWarrior/FML + MinecraftForge/FML@32bb7315cc6beff84f186a33e73219cc5280821a Add in example assets dir. Closes #308 + MinecraftForge/FML@16d33d298953b41dbbe3e3b504e800f4f46a3e1b Clean up and document outbound handler a bit better. Add in dispatcher target. Closes #361 + MinecraftForge/FML@5719b9ec533b3e43213dbafcb448221884efd9e8 Fix reply handling. Make the proxy message available for subclasses of indexedcodec. Fire user events into the network event firing. + - v99.99-pre-3320 Fix reply handling. Make the proxy message available for subclasses of indexedcodec. Fire user events into the network + event firing. + - v99.99-pre-3319 Clean up and document outbound handler a bit better. Add in dispatcher target. Closes #361 + - v99.99-pre-3318 Add in example assets dir. Closes #308 + - v99.99-pre-3317 Merge branch 'trait-optional' of github.com:RainWarrior/FML + - v99.99-pre-3316 And restore suppressions. ABRAR, DON'T TIDY CODE!!!! + - v99.99-pre-3315 Merge branch 'logging' of github.com:AbrarSyed/FML into abrar-borked + - v99.99-pre-3314 Make sidedproxy support non-public fields. Closes #344 + - v99.99-pre-3313 Try and stop the epic channel closed spam at close time. Closes #353 + - v99.99-pre-3312 findBlock should now return null, not the default block, if the thing being looked for is not found. Closes #352 + - v99.99-pre-3311 Allow connection when server is apparently offline. Might allow :NOFML circumvention though. Hmmm. Closes #359 + - v99.99-pre-3310 Check the mod, not it's container, in the check handler. Closes #358 + - v99.99-pre-3309 Allow indexed messages to validate themselves. Also, catch exceptions from + an embedded channel, and cause them to close the connection. It's ugly, but + it means that the client doesn't crash if it connects to a screwy bungycord that's trying a 1.6 handshake for some reason. + - v99.99-pre-3308 Add a type adapter for artifact version. Should fix #354 + - v99.99-pre-3307 Merge pull request #355 from jk-5/errorhandling + Throw an exception when discriminator is not found + - v99.99-pre-3306 Merge pull request #357 from jk-5/sharable + Make NetworkEventFiringHandler sharable + - v99.99-pre-3305 Make NetworkEventFiringHandler sharable + Fixes #356 + - v99.99-pre-3304 Throw an exception when discriminator is not found + - v99.99-pre-3303 SSP Worlds updating from 1.6 will now pop a warning message before loading, and will capture a timestamped + zip file in the minecraft dir before starting to load. Allows for people to test updates. + - v99.99-pre-3302 put max number of FML log files to 3 + - v99.99-pre-3301 changed fml log level to all + - v99.99-pre-3300 Add support in Techne models for the TextureSize tag. Closes #856 + - v99.99-pre-3299 Fixed RenderWorldLastEvent never being called, was missed in 1.7 update. Closes #932 + - v99.99-pre-3298 Updated FML: MinecraftForge/FML@444a7d7fa1cf7fad7dda67f581fa0e3be36069b7 Move placement of single player world load hook to fix NPEs. + - v99.99-pre-3297 Move placement of single player world load hook to fix NPEs. + - v99.99-pre-3296 Fix flexible rails, Closes #944 + - v99.99-pre-3295 Updated FML: + MinecraftForge/FML@7c5d62704ac1d3e586f3bfe26265a534e5362c73 Make UniqueIdentifier final and add a hashCode. Closes #348 + MinecraftForge/FML@ff7b5845e7f6b300d413b917f57adc472a4ebcff Clean up some warnings about @Override + MinecraftForge/FML@275ccac6f14bc66b88c76b1040aa7167f995967c Fix NPE at startup + MinecraftForge/FML@2a5a8d0cd062d3feac9c4de234e3dab1ff4462e5 Fix memory leak?! + - v99.99-pre-3294 Fix warnings in Forge codebase. + - v99.99-pre-3293 Fix memory leak?! + - v99.99-pre-3292 Fix NPE at startup + - v99.99-pre-3291 Clean up some warnings about @Override + - v99.99-pre-3290 Make UniqueIdentifier final and add a hashCode. Closes #348 + Clean up language registry. It can be used to access all translations of mods on client or server. + Auto loads from assets files. + - v99.99-pre-3289 Add exception logging to forge channel handlers as well + MinecraftForge/FML@53557dcd0582e09f7f35eb3bc2fd130fba3be4a0 Put logging exception handlers on all channel inbounds. Fix problem with failure to login. Closes #350 + - v99.99-pre-3288 Put logging exception handlers on all channel inbounds. Fix problem with failure to login. Closes #350 + - v99.99-pre-3287 MinecraftForge/FML@9c96ca4402e4c231285f170281dd543bfffa191a Fire a custom packet channel registration/deregistration event, for any mods that care about that kind of thing + - v99.99-pre-3286 Fire a custom packet channel registration/deregistration event, for any mods that care about that + kind of thing + - v99.99-pre-3285 MinecraftForge/FML@e14efe786f6255a18e148c4137f560f5e2d2a38f Some fixes and tweaks + MinecraftForge/FML@c013870b1df5e63bd84d92545ebdd434db74b5d1 Merge branch 'simplenet' + MinecraftForge/FML@30882b0c1d2743afebbebc288d73f25696e0815c Clean up some warnings. Add in simple network impl + MinecraftForge/FML@9cab2ab36e7981c847e3e9ae8c3fbbb36531ba6d Add in some tests and examples for the "simple" network stuff + MinecraftForge/FML@a429e106dd00b34302ec5893e0a8fc97c8fc8019 Fix bug with SSP, and hook so we can do confirmation of world loading, as well as other things + - v99.99-pre-3284 Fix bug with SSP, and hook so we can do confirmation of world loading, as well as other things + - v99.99-pre-3283 Add in some tests and examples for the "simple" network stuff + - v99.99-pre-3282 Clean up some warnings. Add in simple network impl + - v99.99-pre-3281 MinecraftForge/FML@b362e8a2733eb3082975edfdf83c996f048b65d3 At the request of AbrarSyed. + MinecraftForge/FML@e344303ec7a5ed27c4378ff072a036df7a350902 Merge pull request #346 from Jezzadabomb338/master + MinecraftForge/FML@a4686b1261a9bad523b4efa8a36a4433a58897cc Added basic Mojang account authentication support for development time login. + MinecraftForge/FML@dd17979a2f6f02ac4a9dda09b52c96365cc5fec9 Fix bukkit connectivity issue. + - v99.99-pre-3280 Merge branch 'simplenet' + - v99.99-pre-3279 Fix bukkit connectivity issue. + - v99.99-pre-3278 Some fixes and tweaks + - v99.99-pre-3277 Updated FML: + MinecraftForge/FML@1db3daa0e82e67fc27ca3d535a09c806c1a54d67 added override toString method for getting full name. + MinecraftForge/FML@acf74a34032224a73c4c03280cafa0042c35cf5a changed the readme to reflect new setup task. + MinecraftForge/FML@96c19b35807fa078cb18b4ae50567d0360bcdb03 undid readme change + MinecraftForge/FML@a89939e57e9ff061df3d53cf1cb075b31de5de1b Merge pull request #336 from jadar/master + MinecraftForge/FML@717a8d694532bd9438eed8d9cf4b57318b2b4cfd Fix csv string vs list of strings. Thanks immibis. Closes #334 + MinecraftForge/FML@584c0f368bca1d5b0223b5b3611b366b9a00f7d7 Fix potential ordering issue, clean up some imports + MinecraftForge/FML@28293b29ea65c30fe80c49e85e2ae15a4db68933 Add in a simple(ish) event driven network handling system. Register using newEventDrivenChannel and you'll get a simple network handler that will fire events at the subscriber(s) of your choice, whenever a packet is received. You'll also get some convenience methods for sending to things. + MinecraftForge/FML@80b00dc7966d96111e2ce8643db8e0f544c2bc89 Fix openGui. Closes #342 + MinecraftForge/FML@fc69bcf2807dc2b85eb52681ba9531cb3e2f1945 Fix up privacy derp in TickEvent. Closes #343 + MinecraftForge/FML@10d056a494aac22137b644cff341a5958e8168fc Fix possible NPE derp + MinecraftForge/FML@5da6dcc7e3607e5f107f6a7d39a4b4e1eb7fb306 Divert connection through FML, so we can deny connections to servers that don't want us + - v99.99-pre-3276 Added basic Mojang account authentication support for development time login. + - v99.99-pre-3275 Merge pull request #346 from Jezzadabomb338/master + At the request of AbrarSyed. + - v99.99-pre-3274 At the request of AbrarSyed. + - v99.99-pre-3273 Divert connection through FML, so we can deny connections to servers that don't want us + - v99.99-pre-3272 Fix possible NPE derp + - v99.99-pre-3271 Fix up privacy derp in TickEvent. Closes #343 + - v99.99-pre-3270 Fix openGui. Closes #342 + - v99.99-pre-3269 Add in a simple(ish) event driven network handling system. Register using newEventDrivenChannel + and you'll get a simple network handler that will fire events at the subscriber(s) of your + choice, whenever a packet is received. You'll also get some convenience methods for sending + to things. + - v99.99-pre-3268 Fix potential ordering issue, clean up some imports + - v99.99-pre-3267 Merge pull request #926 from iChun/master + Fix erroneous position when getting player position with changed eye height. + - v99.99-pre-3266 Squash commits so Lex would stop whining. Fix erroneous position when getting player position with changed eye height. + - v99.99-pre-3265 Logging Changes + - v99.99-pre-3264 Propagate Optional method removal to trait implementation classes + - v99.99-pre-3263 Fix csv string vs list of strings. Thanks immibis. Closes #334 + - v99.99-pre-3262 Merge pull request #336 from jadar/master + added override toString method for getting full name. + - v99.99-pre-3261 Updated FML: + MinecraftForge/FML@d5bfd69e35b21f701390a8c4c4c58d7ec1fff1fc Fix problem with connecting to vanilla. SHOW what's modded and what's vanilla in the list. Hooks that make the blocking work to come + MinecraftForge/FML@dd098854b0b65b8509b8788422e02d989a991b87 Fix the keybinding array to the right one + MinecraftForge/FML@43068eb9862f280611f26f4107ff5ac2b42b08e4 Fix TargetPoint to be static + - v99.99-pre-3260 Fix TargetPoint to be static + - v99.99-pre-3259 Fix the keybinding array to the right one + - v99.99-pre-3258 Fix problem with connecting to vanilla. + SHOW what's modded and what's vanilla in the list. Hooks that make the blocking work to come + - v99.99-pre-3257 Attempt to prevent a NPE when MC renders a lot of things at once. + - v99.99-pre-3256 undid readme change + - v99.99-pre-3255 changed the readme to reflect new setup task. + - v99.99-pre-3254 added override toString method for getting full name. + - v99.99-pre-3253 Merge pull request #928 from Minalien/master + Fixed issue with forward-slashes in texture names when registering icons, fixed custom item renderer retrieval. + - v99.99-pre-3252 Fixed MinecraftForgeClient for custom Item Renderer implementations. Removed check for forward-slashes (/) in texture asset locations (but left check for backslash in place). + - v99.99-pre-3251 MinecraftForge/FML@0d810c01fab99ac491c2277097a4198518fe6c75 Mark jopt needed on the server, herp derp, blame Abrar! + - v99.99-pre-3250 Mark jopt needed on the server, herp derp, blame Abrar! + - v99.99-pre-3249 Fix DoublePlant placement, closes #921 + - v99.99-pre-3248 Deprecate BlockFire.func_149842_a, and throw exception if someone tries to set the burn properties for air. Should prevent 'The Air is on fire!' reports. + - v99.99-pre-3247 Merge pull request #919 from VeryBigBro/patch-2 + Create ru_RU.lang + - v99.99-pre-3246 Create ru_RU.lang + - v99.99-pre-3245 Updated FML: + MinecraftForge/FML@5317672631f30e1c9655f0bb28dd8b158deea2fb Add a utility method for finding the channel handler name based on type. Should fix naming weirdnesses. + MinecraftForge/FML@9de9a1553086ebeeb5d5fc0f6d96da8680e52df0 Fix stupid hardcoding derp + - v99.99-pre-3244 Fix stupid hardcoding derp + - v99.99-pre-3243 Add a utility method for finding the channel handler name based on type. Should fix naming weirdnesses. + - v99.99-pre-3242 Fixed pipeline naming issue in the ForgeNetworkHandler. + - v99.99-pre-3241 Merge pull request #882 from Vexatos/patch-2 + Create de_DE.lang + - v99.99-pre-3240 Fixed the run config for dev time server, Cloases #913 + - v99.99-pre-3239 Fix panes/iron bars not connecting correctly. Closes #904 + - v99.99-pre-3238 Models now load from resource packs + Models must now be loaded from resource packs using the standard resource pack reference. For example, to load a model named "assets/mymod/models/mymodel.obj", you would call AdvancedModelLoader.loadModel("mymod:models/mymodel.obj"); + Closes #670 + - v99.99-pre-3237 Fixing an infinite recursion case, Closes #916 + - v99.99-pre-3236 Merge pull request #915 from Adubbz/master + Made canBeReplacedByLeaves default to whether a block isn't opaque rathe... + - v99.99-pre-3235 Made canBeReplacedByLeaves default to whether a block isn't opaque rather than if it is, also uninverted the checks for canBeReplacedByLeaves in WorldGenBigMushroom, WorldGenSwamp, WorldGenTaiga1 and WorldGenTaiga2 + - v99.99-pre-3234 Fix inversion + - v99.99-pre-3233 Updated FML: + MinecraftForge/FML@6f1da6550e10164bd6c678829f111bb5de9383b6 Fix up mcpname derp in GuiScrollingList. + - v99.99-pre-3232 Fix up mcpname derp in GuiScrollingList. + - v99.99-pre-3231 Updated FML: + MinecraftForge/FML@21b13d63512ce399c82cbb6b9042eefa6dcdaacd Lots of network cleanup. Gui packets now work too! + MinecraftForge/FML@b3f98d1ee0416aa452f8611d458968afdf50775a Fix derpiness with Mods button when Realms is available + MinecraftForge/FML@cdd9d92a4f8cd199e2d8a34bb398ef32e5f1e275 Starting work on the actual GUI. Still work to do. Needs an API. + MinecraftForge/FML@ab5eb3ccfff7f9ccfd8720b23fcef3131e54d57d Fix button size for GuiModList + MinecraftForge/FML@3113138bd1377d71afe3b8290e18511bfb6e5e97 Tweak button positions. + MinecraftForge/FML@c5e29b574a315d48668ebc9189bcc497a0eae13e Avoiding redundant calls to LogManager + MinecraftForge/FML@fbc1f8f6f9effa4a538880f9fec0ce5010226d09 Config GUIs in the modlist now work. + MinecraftForge/FML@fa4f3015a0d7147cbde3edec7664e78e5bcacbb9 Added transparent background for GuiIngameModOptions as per cpw's request. May not compile due to manual de-mcp-fication. + MinecraftForge/FML@7bf119e1e54cadff690ec31a4bab93c0d1d0aad1 Fix up readmes and credits. We no longer support modloader. + MinecraftForge/FML@779cd05aa1ced720a63cc508b82e68cc6fc8daa9 Tweaks + MinecraftForge/FML@b51fb913551a5116cc3b9bb7583b1666f280c650 Merge branch 'patch-1' of github.com:airbreather/FML + - v99.99-pre-3230 Merge branch 'patch-1' of github.com:airbreather/FML + - v99.99-pre-3229 Tweaks + - v99.99-pre-3228 Fix up readmes and credits. We no longer support modloader. + - v99.99-pre-3227 Added transparent background for GuiIngameModOptions as per cpw's request. May not compile due to manual de-mcp-fication. + - v99.99-pre-3226 Config GUIs in the modlist now work. + - v99.99-pre-3225 Avoiding redundant calls to LogManager + - v99.99-pre-3224 Update de_DE.lang + - v99.99-pre-3223 Merge pull request #912 from Adubbz/master + Fixed sky colour transitions on a render distance of 16, fixed the World... + - v99.99-pre-3222 Fixed sky colour transitions on a render distance of 16, fixed the WorldGen of various things + - v99.99-pre-3221 Tweak button positions. + - v99.99-pre-3220 Fix button size for GuiModList + - v99.99-pre-3219 Starting work on the actual GUI. Still work to do. Needs an API. + - v99.99-pre-3218 Fix derpiness with Mods button when Realms is available + - v99.99-pre-3217 Lots of network cleanup. Gui packets now work too! + - v99.99-pre-3216 Merge pull request #908 from jk-5/patch-1 + Add constructors to DimensionRegisterMessage + - v99.99-pre-3215 Fix inverted login in BlockPistonBase causing blocks to break incorrectly. Closes #910 #909 + - v99.99-pre-3214 Update patches for AT changes. + - v99.99-pre-3213 Update for the FMLEmbeddedChannel change. + - v99.99-pre-3212 Updated FML: + MinecraftForge/FML@22ba6fda5ee2dbf29dc03ba93ff9c7707edeaeee Expose the nethandler in a few places, and pull out FMLEmbeddedChannel, exposing a utility method on it. More to come. + - v99.99-pre-3211 Expose the nethandler in a few places, and pull out FMLEmbeddedChannel, exposing a utility method on it. + More to come. + - v99.99-pre-3210 Added default constructor for reflection + - v99.99-pre-3209 Added a constructor and made the fields package-private + - v99.99-pre-3208 Update ForgeMessage.java + - v99.99-pre-3207 Fix build.gradle for tweakClass property + Updated FML: + MinecraftForge/FML@f36152398d1d287e7a55a31c77a2614cfb63e1b6 Add in the tweakclass, fix the json for lzma @ the server. + - v99.99-pre-3206 Add in the tweakclass, fix the json for lzma @ the server. + - v99.99-pre-3205 Updated FML: + MinecraftForge/FML@5d069629cf47cd04f2002b3b9a2c32b0ea73c26e Allow itemstacks for furnace recipe inputs. Allow passing extra arguments through registerblock into the itemblock constructor. + - v99.99-pre-3204 Allow itemstacks for furnace recipe inputs. Allow passing extra arguments through registerblock into the itemblock constructor. + - v99.99-pre-3203 Updated FML: + MinecraftForge/FML@061288909de0f0452adf51a5a9935fd09992c801 Fire simple network connect/disconnect gameevents. + - v99.99-pre-3202 Fire simple network connect/disconnect gameevents. + - v99.99-pre-3201 Merge branch 'master' of github.com:Adubbz/MinecraftForge + - v99.99-pre-3200 Fix the network handler for forge + - v99.99-pre-3199 Updated FML: + MinecraftForge/FML@34819c9303870f560232464a2d16eb46d152515c Make gradlew executable on linux + MinecraftForge/FML@53a1f9841421b41d543d7d1d51319b44c86a527e Attempt to load old pre-1.7 worlds. ENSURE YOU HAVE A BACKUP! + MinecraftForge/FML@6a5f9e135f88b662e4e01e8882f861448910ca90 Fix example mod code for 1.7 + - v99.99-pre-3198 Fix example mod code for 1.7 + - v99.99-pre-3197 Made BlockCrops.getDrops call its super method + - v99.99-pre-3196 Allow tools to override their material harvest levels. + - v99.99-pre-3195 Tidier implementation of previous commit. Should fix for subclasses of individual tools too + - v99.99-pre-3194 Add in harvesting abilities of the items, should fix effectiveness + - v99.99-pre-3193 Attempt to load old pre-1.7 worlds. ENSURE YOU HAVE A BACKUP! + - v99.99-pre-3192 Make gradlew executable on linux + - v99.99-pre-3191 Updated FML: + MinecraftForge/FML@f8d6213829d570501166d64d7c8bb4977567131f Update render registry + MinecraftForge/FML@ec316f113fefef12f6defed9eb68de368d7f4420 AT for renderblocks + - v99.99-pre-3190 AT for renderblocks + - v99.99-pre-3189 Update render registry + - v99.99-pre-3188 Updated FML: + MinecraftForge/FML@268bbabee6ae3fa1d596bd18e172298e26dc9ce4 Fix handling world reloads when new stuffs are added + - v99.99-pre-3187 Fix handling world reloads when new stuffs are added + - v99.99-pre-3186 Merge pull request #893 from iChun/master + Add render offset to event. + - v99.99-pre-3185 Add render offset to event. + - v99.99-pre-3184 Fix dig speed on redstone ore and obsidian. + - v99.99-pre-3183 Add a version check mechanic to startup, it is done in a seperate thread and has a config option to compleetly disable it. This allows us to notify users of new recomended builds. Hopefully stemming the flow of outdated help request. Also adds a warning to the main screen if you are running a 'Beta' Forge. Which means a Forge for a new version of Minecraft that we have not promoted a recomended build for yet. + - v99.99-pre-3182 Resize pending tile updates when it goes over the curent length. Fixed AIOOB error. + - v99.99-pre-3181 Forgot to regen patches... + - v99.99-pre-3180 Added constructor to WorldType, and delegated the BiomeLayer management to it. Also updated the access transformer for Item/Block classes. + - v99.99-pre-3179 MinecraftForge/FML@c180d9b15735ce89a38c497acd65fa3fab595f77 Add 1.7.2 base json, Gradle will automatically download updated versions of this. Keeping it in the repo allows us to se + e what base json we have built our jsons off of. And if it changes update accordingly. + - v99.99-pre-3178 Updated FML: + MinecraftForge/FML@156a9ae03a3c80bd1499a8e692c44a322ad9df62 Fix build script + MinecraftForge/FML@7d3b1250e8368886bed0e0da350a94abaa4b6247 Fix handshaking properly. Also, fix ID syncup. It now will completely freeze the idmap after preinit. This frozen map is used to inject "new" stuff into existing serverside worlds. Interesting sideeffect: remote servers lacking things will change the client, to also LACK ids for those things. watch for -1 ids in your remap events. Note: idmaps should be considered temporary per server instance. SERVERSTOPPED will restore "startup" state, as will client logout. + - v99.99-pre-3177 Add 1.7.2 base json, Gradle will automatically download updated versions of this. Keeping it in the repo allows us to see what base json we have built our jsons off of. And if it changes update accordingly. + - v99.99-pre-3176 Fix handshaking properly. Also, fix ID syncup. It now will completely freeze the idmap after preinit. + This frozen map is used to inject "new" stuff into existing serverside worlds. Interesting sideeffect: remote + servers lacking things will change the client, to also LACK ids for those things. watch for -1 ids in your remap + events. Note: idmaps should be considered temporary per server instance. SERVERSTOPPED will restore "startup" state, + as will client logout. + - v99.99-pre-3175 Fix items rendering on the GUI with invalid state due to glint rendering changing it. Thanks iChun. + - v99.99-pre-3174 Fixed accedential inverted logic that caused Potions to render incorrectly. Thanks iChun. + - v99.99-pre-3173 Move Grass {Flower} registry to BiomeGenBase as 1.7 made flowers Biome specifc, this means modders who wish to add global base flowers need to add them to all the biomes indavidually. + - v99.99-pre-3172 Temporary fix for items rendering with effects on one layer. Restores default vanilla rendering, which is considered a bug in modded community. + - v99.99-pre-3171 Fix debug HUD rendering semi-transparently. + - v99.99-pre-3170 Fix build script + - v99.99-pre-3169 Bump version to 10.12.0 to mark 1.7. + - v99.99-pre-3168 Updated FML: + MinecraftForge/FML@58132ccda3a575f10fc209c421fd5d80e01164cc Add new required --accessToken to launch specs. + - v99.99-pre-3167 Add new required --accessToken to launch specs. + - v99.99-pre-3166 Fix: + Block placement/interaction + Tesselator crash due to wrong mapping + Missing isreplaceable check in world.canPlaceAt + Small foratting/logging cleanup + Temporarly commented out efficancy changes till I implement it. + - v99.99-pre-3165 Fix MethodNotFound crash when shutting down internal server. + - v99.99-pre-3164 Forge uses the FORGE channel for packets. + - v99.99-pre-3163 Get object based on identity not name. + - v99.99-pre-3162 Merge pull request #890 from bloodmc/master + Refactored BiomeManager stronghold add/remove methods to support new MapGenStronghold dynamic biome changes. + - v99.99-pre-3161 Refactored BiomeManager stronghold add/remove methods to support new + MapGenStronghold dynamic biome changes. + Changed InitNoiseGensEvent to pass a NoiseGenerator array instead of + NoiseGeneratorOctaves due to new NoiseGeneratorPerlin in + ChunkProviderGenerate. + Fixed worldgen crash caused by wrong metadata in Chunk patch. + - v99.99-pre-3160 Updated FML: + MinecraftForge/FML@a17489172cd54ca955548b15fa0669c9f95d7f45 Code to disable mods at runtime, or other times. + MinecraftForge/FML@85516d9588ebfadbba25f21b2f973e4e81abbaa6 ICraftingHandler, IPickupHandler are now both events. + MinecraftForge/FML@e4b63a1801b453797f5e820eb3f5bd42e6d43948 IWorldGenerator now has an ordering at registration time. This means the order of worldgen should be much more stable. + MinecraftForge/FML@ef3856f9a34e82a05cb2b7715e3611f8fb1a9a6b Update patches for Gradle's rename rewrite: MinecraftForge/ForgeGradle@19e7acf2a27a6c6ae60f6e8ab38337defddc16d3 + MinecraftForge/FML@31ea100b29dfdb4fc907e212c3d49a5240ca72a9 Working on id missing handling + MinecraftForge/FML@3e76dfba34aaba4397fc3fb2bd28e0d1f0abe3e4 More tweaking on id stuffs at worldload + MinecraftForge/FML@f860c8ad3bc7537f885b27c7f045b5b1140c05f4 bump to legacy launcher 1.9 with logging unification stuffs. + - v99.99-pre-3159 Inital patch update for 1.7.2, Doesn't compile, not done yet. + - v99.99-pre-3158 bump to legacy launcher 1.9 with logging unification stuffs. + - v99.99-pre-3157 More tweaking on id stuffs at worldload + - v99.99-pre-3156 Working on id missing handling + - v99.99-pre-3155 Update patches for Gradle's rename rewrite: MinecraftForge/ForgeGradle@19e7acf2a27a6c6ae60f6e8ab38337defddc16d3 + - v99.99-pre-3154 IWorldGenerator now has an ordering at registration time. This means the order of worldgen should be much more stable. + - v99.99-pre-3153 ICraftingHandler, IPickupHandler are now both events. + - v99.99-pre-3152 Code to disable mods at runtime, or other times. + - v99.99-pre-3151 Updated FML: + MinecraftForge/FML@32561265fc935cd6639d5b2e086e879f375676fa Ticks, Player events, keybindings, all migrated to the new event driven system. + - v99.99-pre-3150 Ticks, Player events, keybindings, all migrated to the new event driven system. + - v99.99-pre-3149 Moved the core event handler parts to FML. Implemented the Forge network handler based on the new + netty strategy. + Updated FML: + MinecraftForge/FML@3b2994a3def35a2d3058960b71dc59dc48b802f9 Some patching touchups + MinecraftForge/FML@557357fe179529e0b44aab2f3fcef0c5adf981d5 Update for log4j2 + MinecraftForge/FML@a2b324beb2ef6ec73000678c9305fd70d4ec1643 Copy eventhandler from Forge into FML. It is going to replace a lot of the runtime event systems. + MinecraftForge/FML@4071ff38afe15fddf5db0be882f5627f503a37c6 Patch some GUIs. We're gonna add some basic mod gui config support. + MinecraftForge/FML@0b419ac79c307579f162d47e0388a9d75bcd0a6e Fire a user event down the channels when a handshake has occured. + - v99.99-pre-3148 Fire a user event down the channels when a handshake has occured. + - v99.99-pre-3147 Patch some GUIs. We're gonna add some basic mod gui config support. + - v99.99-pre-3146 Copy eventhandler from Forge into FML. It is going to replace a lot of the runtime event systems. + - v99.99-pre-3145 Update for log4j2 + - v99.99-pre-3144 Killed a few hundred compile errors. + - v99.99-pre-3143 Comment out fluids until King gets his hands on it + - v99.99-pre-3142 Updated FML: + MinecraftForge/FML@1d71c017f45aa7ed9d7d7c5ed5250a8d22477980 ID syncing. + MinecraftForge/FML@fd36f50d8210342f65cb0272bac56a3bcc42dd18 Cleanups + MinecraftForge/FML@89e4e483c204c11b6fdfed34893fc223a7d6a899 Add in a remapping event for mods to consume. + MinecraftForge/FML@cd417c6786256fa23f181ff0b76696bc6dfb0291 Fixed remote and local connections work with mods now. + MinecraftForge/FML@ef492407ef812bb6bbc7f0bd8efbd16d07efcafb Entity spawning works. + MinecraftForge/FML@d0d31d9575403eb2ec058898b86ffd99a9220f75 SpawnAdjustment packet. Clean up stuffs. No more compile errors. + MinecraftForge/FML@3e278acb71e4e3d0406e80f0fad5071c9215ed33 Fix stupid possible compiler error. + MinecraftForge/FML@009d4dee2328cc8d97b74177a2c5a3c359e6564a Fix the exc file. Fix the deobfremapper for handling inner classes. + MinecraftForge/FML@49cb893d12bd4f82b5d1b50d1e6517a256525d32 Fix exc this time *sigh* + MinecraftForge/FML@31efcfc3b2085f5d4e070ddab34a0be1481b4c6f Clean up patches for latest exc. + MinecraftForge/FML@7a4ceebf5efe5b3650080cf912e371d92fc70a55 Kill old patches and add rejects to ignore file. + MinecraftForge/FML@7ea571f593464ad4226ba845da27ff66161621b1 Fix AT, Fix exc. Almost works now! + MinecraftForge/FML@b852e302851cfaf77e1db6f86408e8d049703656 First functional release under reobfuscation. + MinecraftForge/FML@df870c1a3341d8e2e88d7fc3e2f3d9ed2507989f Update shiped ForgeGradle for 1.7 + MinecraftForge/FML@55aa337f952bc72c5a001a6ed661978b11822c63 Rename synthetic bridge methods, these methods are not decompiled, but need to reobf correctly cross the recompile boundary. + MinecraftForge/FML@0098c57f94808751062ee45f2ee267324bb42089 Merge pull request #316 from AbrarSyed/patch-4 + - v99.99-pre-3141 Some patching touchups + - v99.99-pre-3140 Merge pull request #316 from AbrarSyed/patch-4 + Update shiped ForgeGradle for 1.7 + - v99.99-pre-3139 Rename synthetic bridge methods, these methods are not decompiled, but need to reobf correctly cross the recompile boundary. + - v99.99-pre-3138 Update shiped ForgeGradle for 1.7 + - v99.99-pre-3137 First functional release under reobfuscation. + - v99.99-pre-3136 Fix AT, Fix exc. Almost works now! + - v99.99-pre-3135 Kill old patches and add rejects to ignore file. + - v99.99-pre-3134 Clean up patches for latest exc. + - v99.99-pre-3133 Fix exc this time *sigh* + - v99.99-pre-3132 Fix the exc file. Fix the deobfremapper for handling inner classes. + - v99.99-pre-3131 Fix stupid possible compiler error. + - v99.99-pre-3130 SpawnAdjustment packet. Clean up stuffs. No more compile errors. + - v99.99-pre-3129 Entity spawning works. + - v99.99-pre-3128 Fixed remote and local connections work with mods now. + - v99.99-pre-3127 Create de_DE.lang + - v99.99-pre-3126 Add in a remapping event for mods to consume. + - v99.99-pre-3125 Cleanups + - v99.99-pre-3124 ID syncing. + - v99.99-pre-3123 Updated FML: + MinecraftForge/FML@a30f17362764f3e4e594386e193f9e4368e6836e Add sonatype snapshots repo for SpecialSource snapshots. + MinecraftForge/FML@b2550b8a693315ccc205f5315eac67c5283d7af9 Add mappings for Items/Blocks fields. + MinecraftForge/FML@57f7f1d7abd304d3e9f42567f1d66c10122e4ec6 Update for fixed Enum cleaning and names. + MinecraftForge/FML@99c681ad8736e4976053718c3d453b2fb30eefe0 Did it manually, forgot it needed the end comma + - v99.99-pre-3122 Some work on 1.7, waiting for Abrar to fix a few things. + - v99.99-pre-3121 Did it manually, forgot it needed the end comma + - v99.99-pre-3120 Update for fixed Enum cleaning and names. + - v99.99-pre-3119 Add mappings for Items/Blocks fields. + - v99.99-pre-3118 Add sonatype snapshots repo for SpecialSource snapshots. + - v99.99-pre-3117 Bump data for 1.7 start. + - v99.99-pre-3116 Kill liquids finally. + - v99.99-pre-3115 MinecraftForge/FML@3714426e19f8f0edaaeda8c787993f8f3615a44d fix derp in example builscript + MinecraftForge/FML@01fb451b6918599de5e732d7ff30c761438ab930 Merge pull request #311 from AbrarSyed/patch-3 + MinecraftForge/FML@30d532f4fc6fc65ea7e79707a75ff4d6ea0ea031 Pass 1: Most patches are restored. + MinecraftForge/FML@53127eec308d3929d68d3d9fafabcfef37e95c37 Merge branch 'master' of github.com:MinecraftForge/FML + MinecraftForge/FML@7ab3c3a37ceb8ab945208206aec86739a2138329 Update gitignore + MinecraftForge/FML@38cec7a11fae7cf12bda3a8d16a50bb6136d8886 The basic network handshaking for FML is done. All scenarios seem to work. + MinecraftForge/FML@9f928963f20bc9bbfbe1391fb16c6f5ca5fd4344 A network design I like. It uses the netty embedded channel to allow mods to build channel pipelines on top of custom payload packets. + MinecraftForge/FML@58f7487cfaf4a25a8349021b9cca5ef4ba0b541c Check in patches. Add in some network timeout tweaking values so you can debug the network. + MinecraftForge/FML@e544adba5c7e9286f917342af2669e5888fa0a17 More cleanup. Bidirectional server <-> client network works for mods as well as FML|HS now. + MinecraftForge/FML@f5c38e2359c2e6eca13cd6606465ee36086a7113 OK, network channels appear to be working well for both dedi and integrated servers. The beginnings of the new mod structure too. + MinecraftForge/FML@9c96a0a10a5cbe34786be8fd41f9818b5ac929bc More network stuff, partially done id syncing. + MinecraftForge/FML@2aaaeba15eabdec189daa8662e9ffdf0b5a09dbe ID loading from the server save now works. + - v99.99-pre-3114 ID loading from the server save now works. + - v99.99-pre-3113 More network stuff, partially done id syncing. + - v99.99-pre-3112 OK, network channels appear to be working well for both dedi and integrated servers. + The beginnings of the new mod structure too. + - v99.99-pre-3111 More cleanup. Bidirectional server <-> client network works for mods as well as FML|HS now. + - v99.99-pre-3110 Check in patches. Add in some network timeout tweaking values so you can debug the network. + - v99.99-pre-3109 A network design I like. It uses the netty embedded channel to allow mods to build channel pipelines on top of + custom payload packets. + - v99.99-pre-3108 The basic network handshaking for FML is done. All scenarios seem to work. + - v99.99-pre-3107 Update gitignore + - v99.99-pre-3106 Merge branch 'master' of github.com:MinecraftForge/FML + Conflicts: + install/build.gradle + patches/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java.patch + patches/minecraft/net/minecraft/network/NetServerHandler.java.patch + - v99.99-pre-3105 Pass 1: Most patches are restored. + NOTES: 1. Network is completely broken. 2. GameRegistry is partially broken. 3. ID sync is not in. + - v99.99-pre-3104 Merge pull request #311 from AbrarSyed/patch-3 + fix derp in example builscript + - v99.99-pre-3103 fix derp in example builscript + - v99.99-pre-3102 Bump build for gradle fixes: + Now Builds for java 1.6 + Include version,json in universal + Fixed classpath issues in eclipse task. + - v99.99-pre-3101 Merge pull request #868 from luacs1998/patch-1 + Update readme for ForgeGradle + - v99.99-pre-3100 Updated FML: MinecraftForge/FML@c2b919d339e5f63271cfb67a77235c21c5c3b80e Don't validate signatures in dev env. + - v99.99-pre-3099 Don't validate signatures in dev env. + - v99.99-pre-3098 Update README.txt + - v99.99-pre-3097 Another update for eclipse users + - v99.99-pre-3096 Updated + - v99.99-pre-3095 Update readme for ForgeGradle + Let me know if there's anything else to add or change. + - v99.99-pre-3094 Fix build file pom closures. + - v99.99-pre-3093 Proper configuratuion name for jenkins. + - v99.99-pre-3092 Merge pull request #867 from GUIpsp/master + Fix gradle wrapper. + - v99.99-pre-3091 Make the gradle wrapper executable. + - v99.99-pre-3090 Merge pull request #859 from AbrarSyed/master + Gradlization + - v99.99-pre-3089 update build.gradle + - v99.99-pre-3088 Regenerate all patches, No functional change as added this is a formatting change only. + - v99.99-pre-3087 Updated FML: + MinecraftForge/FML@e9a7660cb8961660186c7c23e61ab35f9c2dfb81 updated samples + MinecraftForge/FML@30894f7afadf5d3f3c3d5a54c3f904413d5f2309 Merge pull request #307 from AbrarSyed/master + MinecraftForge/FML@c4b8a393f90b00ad7ee4992ea4341ffb6d676abb Make the working directory the root of the eclipse workspace. + - v99.99-pre-3086 Update run configs. + - v99.99-pre-3085 Make the working directory the root of the eclipse workspace. + - v99.99-pre-3084 Merge pull request #307 from AbrarSyed/master + updated samples + - v99.99-pre-3083 updated samples + - v99.99-pre-3082 Fix for new FML, and publish to maven local + - v99.99-pre-3081 Update forge + - v99.99-pre-3080 Merge pull request #306 from MinecraftForge/1.6.4 + Actually do it correctly. Should be more forge friendly now. + - v99.99-pre-3079 Fix NPE in FakePlayers when they are created in a purely client side environment. To remove in 1.7 as FakePlayers should be used for server side interaction with the world on a player's behalf, not for client rendering. + - v99.99-pre-3078 Fix NPE on specific tile entities when the block break event is canceled. Closes #863 + - v99.99-pre-3077 added buildSrc to the gitIgnore + - v99.99-pre-3076 Updated FML: + MinecraftForge/FML@23baf3a8ce58cb8306189401a60647957ccbb4c2 Actually fix the nethandler code + Update patches + - v99.99-pre-3075 Actually do it correctly. Should be more forge friendly now. + - v99.99-pre-3074 Merge branch '1.6.4' + - v99.99-pre-3073 Updated FML: + MinecraftForge/FML@da72640c7ef1f44c49f7f592fbdd193622a30b40 Way to go, missing import. *sigh* + - v99.99-pre-3072 Way to go, missing import. *sigh* + - v99.99-pre-3071 Updated FML: + MinecraftForge/FML@b7f34629c3c47b92ee89d72b0dc935b4997cb009 Don't try and open GUIs on the server. + - v99.99-pre-3070 Don't try and open GUIs on the server. + - v99.99-pre-3069 Don't send openGui commands from the fakeplayer. Fixes thaumcraft and probably others. + - v99.99-pre-3068 Updated FML: + MinecraftForge/FML@6af42bc656dfb98972d034363352affc9e777805 Add in null protection for client/server sides of handleChat + - v99.99-pre-3067 Merge branch '1.6.4' + - v99.99-pre-3066 Merge pull request #855 from CovertJaguar/patch-4 + Fix Water/Lava Fluid Localization + - v99.99-pre-3065 Fix Water/Lava Fluid Localization + - v99.99-pre-3064 Noop out FakePlayer.addStat. + - v99.99-pre-3063 Add in null protection for client/server sides of handleChat + - v99.99-pre-3062 Kill more references to modloader. + - v99.99-pre-3061 Remove all public all the time from Minecraft. It is unnecessary with ModLoader gone. DEAL WITH IT. File AT public requests, make a coremod, whatever. This needed to die. + - v99.99-pre-3060 Deprecation cleanup. Bye bye more modloader stuffs + - v99.99-pre-3059 First pass : kill modloader, clean up warnings + - v99.99-pre-3058 fixed versioning and stuff + - v99.99-pre-3057 Step 3: The Rebirth + - v99.99-pre-3056 Join the developers list in the pom and fix the client run configs in the workspace. + - v99.99-pre-3055 Merge pull request #302 from AbrarSyed/patch-1 + Update 1.6.4-rel.json + - v99.99-pre-3054 Update 1.6.4-rel.json + - v99.99-pre-3053 Change the build to capture an MCP version, also, tweak the sources so mavenLocal can be used for ForgeGradle + - v99.99-pre-3052 Step 2: The Reformation + - v99.99-pre-3051 update FML for gradle changes + - v99.99-pre-3050 Step 1: The Purge + - v99.99-pre-3049 Updated FML: + MinecraftForge/FML@3d25b4e793c59a9131a441d6c7a2d80cac9cd701 Add in the ability to strip interface references for specific interfaces - this is probably mostly useful for scala scenarios where sythetic methods are generated and is not a substitute for using Optional.Method where appropriate. Closes #300 + - v99.99-pre-3048 Fix license and naming + - v99.99-pre-3047 added src distribution gradle file + - v99.99-pre-3046 Move to install to not clutter root directory with the .bat and .sh files I know are coming. + - v99.99-pre-3045 Include eclipse template workspace, for packaging in src distro. + - v99.99-pre-3044 Add gradle wrapper + - v99.99-pre-3043 Publish to repo folder for local testing. + - v99.99-pre-3042 Step 3: The Rebirth + - v99.99-pre-3041 Step 2: The Reformation + - v99.99-pre-3040 Step 1: The Purge + - v99.99-pre-3039 Add in the ability to strip interface references for specific interfaces - this is probably mostly useful for + scala scenarios where sythetic methods are generated and is not a substitute for using Optional.Method where appropriate. + Closes #300 + - v99.99-pre-3038 Merge pull request #852 from MinecraftForge/breakevent + Merge BreakEvent branch, as nobody has told me that it breaks everything. And in prep from 1.7. + - v99.99-pre-3037 Updated FML: + MinecraftForge/FML@f4532410ec1dbf43ce15dfa78d07e5f7be408b08 Change a couple of warnings, as a prelude to 1.7- preinit is now required for all GameRegistry activity, and every item and block REQUIRES registration. + - v99.99-pre-3036 Change a couple of warnings, as a prelude to 1.7- preinit is now required for all GameRegistry activity, and every item and block REQUIRES registration. + - v99.99-pre-3035 Updated FML: + MinecraftForge/FML@8f87021b0f1ae5b277ad4d1891761b7a7ae1ab71 Fix derp with custom properties. They work now! + - v99.99-pre-3034 Fix derp with custom properties. They work now! + - v99.99-pre-3033 Updated FML: + MinecraftForge/FML@bc57ff9e83803d804e9d5374d76273fcd68611f4 Fix recursive API dependency resolution. Allows nested APIs, such as BuildCraft's + - v99.99-pre-3032 Fix recursive API dependency resolution. Allows nested APIs, such as BuildCraft's + - v99.99-pre-3031 Updated FML: + MinecraftForge/FML@de8ab934d8ae960ebc0dede16218ca1e9e488ebc Fix up duplicate entries + - v99.99-pre-3030 Fix up duplicate entries + - v99.99-pre-3029 Updated FML: + MinecraftForge/FML@81fe1c9682234297443402a54e4b852ef49d0ba8 Add in an API marker for API type packages. This does several things: 1. Packages marked as API will generate a new "modid" (the provides) that can be depended on. 2. Packages marked as API will be searched systemwide, and anything declaring that package (even without the API marker) will get an implicit dependency on the API package. 3. The API package itself will get a soft dependency on the "owner" package. + - v99.99-pre-3028 Add in an API marker for API type packages. + This does several things: + 1. Packages marked as API will generate a new "modid" (the provides) that can be depended on. + 2. Packages marked as API will be searched systemwide, and anything declaring that package (even without the API marker) + will get an implicit dependency on the API package. + 3. The API package itself will get a soft dependency on the "owner" package. + @Optional elements can refer to the API packages instead of a concrete mod as well. + - v99.99-pre-3027 Add new recipe sorter that is called after all mods are initalized. This is disabled by default in 1.6 to not break current worlds as it may change machine's recipy outputs. Will enable by default in 1.7. Players may enable it in the forge config. + - v99.99-pre-3026 Merge pull request #841 from XCompWiz/biomecheck + Adds a Check to prevent Biome Replacement + - v99.99-pre-3025 Adds a Check to prevent Biome Replacement + Splits the BiomeGenBase constructor to create one which takes a flag + that indicates whether to insert the biome object into the biomeList + array. The standard constructor calls the new one with the default of + true. This allows biome wrapper-objects to exist. + - v99.99-pre-3024 Format strings properly in MC's internal logger. Fixes resource pack case warnings. + - v99.99-pre-3023 Updated FML: + MinecraftForge/FML@dac7f590eabb326c4467dbc829b4aae1e4be2779 Modify ordering of networkmod registration and mod instantiation. This fixes VersionCheckHandler logging an incorrect failure message due to NPE. + MinecraftForge/FML@f0dc530b2833a1c89673208fe296dba5520671c1 Fix up documentation of VersionCheckHandler - it only ever accepted a String and only works on the NetworkMod annotated class + MinecraftForge/FML@243a21a353e6b7717f64008776928c7132110ddf Wrapping coremods as tweakers. Part 1. + MinecraftForge/FML@58a299aabcfadb4139f126a2d46b5247bede4185 Attempt to inject coremods as tweakers, so both can share a dependency ordering + - v99.99-pre-3022 Attempt to inject coremods as tweakers, so both can share a dependency ordering + - v99.99-pre-3021 Wrapping coremods as tweakers. Part 1. + - v99.99-pre-3020 Fix up documentation of VersionCheckHandler - it only ever accepted a String and only works on the NetworkMod annotated class + - v99.99-pre-3019 Modify ordering of networkmod registration and mod instantiation. This fixes VersionCheckHandler logging an incorrect failure message due + to NPE. + - v99.99-pre-3018 Fix null pointer exception in BiomeDictionary causing the ChunkManager's config to not load/save. + - v99.99-pre-3017 Updated FML: MinecraftForge/FML@bf54d4d66799f2e58944095826d0722ed0120b1f Make each mod's EventBus log a child of it's main logger. + - v99.99-pre-3016 Make each mod's EventBus log a child of it's main logger. + - v99.99-pre-3015 Add wildcard versions of OreDict replacements, Closes #827 + - v99.99-pre-3014 Updated FML: + MinecraftForge/FML@da4337efbfa07b35f5883107768f9ba2f1b24b9b Fix up handling the new method signature data for NetworkCheckHandlers + - v99.99-pre-3013 Fix up handling the new method signature data for NetworkCheckHandlers + - v99.99-pre-3012 Merge branch 'master' of github.com:OniBait/MinecraftForge into breakevent + - v99.99-pre-3011 Updated FML: + MinecraftForge/FML@f92962bbbbb90c19788a5dc2eafdc2eeefdd77ce Use null to empty, so missing values work. *sigh* + - v99.99-pre-3010 Use null to empty, so missing values work. *sigh* + - v99.99-pre-3009 And remember to make the event class static *sigh* + - v99.99-pre-3008 Add in an event for zombie summoning. Allows for mods to control summoning behaviour, as well as custom summoned mob. + - v99.99-pre-3007 And set the RIGHT variable *sigh* + - v99.99-pre-3006 And allow for tweaking baby chance as well. + - v99.99-pre-3005 Allow configuration of the zombie additional summoning mechanic. The vanilla mechanic is a little borked at times. + - v99.99-pre-3004 Updated FML: + MinecraftForge/FML@58577775d277a4408bda510534eb36841b08ced4 Very minor style fixes + MinecraftForge/FML@96be82343c25b83dd842ada8d6e8b66eb4e4ee00 Merge pull request #280 from mc10/patch-1 + MinecraftForge/FML@2714da10228020a6f2321f6c9a703f0d24fe1370 Primitive capability for tweakers to order. Add a "TweakOrder" integer property to your manifest, or accept the default of zero. + - v99.99-pre-3003 Prevent session from being printed to the console, also make sure the username is not empty. Causes a lot of bugs further down the line. + - v99.99-pre-3002 Primitive capability for tweakers to order. Add a "TweakOrder" integer + property to your manifest, or accept the default of zero. + - v99.99-pre-3001 Cleaned up patches to BlockOre and BlockRedstoneOre + Fixed trailing whitespace (it bugs me too) + - v99.99-pre-3000 Fixed formatting + - v99.99-pre-2999 Merge pull request #280 from mc10/patch-1 + Very minor style fixes + - v99.99-pre-2998 Very minor style fixes + Replacing tabs with spaces consistently, making brace styles consistent, etc. + - v99.99-pre-2997 Updated FML: + MinecraftForge/FML@fc3e7647d2aff01146b1f5bd2ab6b57ef8e833e5 Support, and fix up, interface lists for Optional + - v99.99-pre-2996 Support, and fix up, interface lists for Optional + - v99.99-pre-2995 Added some missing air checks to world gen features. + - v99.99-pre-2994 Merge branch 'upstream/master' + - v99.99-pre-2993 Add block break events based on @bloodmc's initial 1.5.2 Pull Request + - v99.99-pre-2992 Fix repeated argument in CleintCommands. + - v99.99-pre-2991 MinecraftForge/FML@a381874bb9c3bdeeb508bb81719b4d210eb29696 Delay sound system backend initalization to speed up startup and prevent race condition on some computers. + - v99.99-pre-2990 Delay sound system backend initalization to speed up startup and prevent race condition on some computers. + - v99.99-pre-2989 Merge pull request #792 from Eurymachus/opencontainer + Added PlayerOpenContainerEvent and added ForgeHooks.canInteractWith + - v99.99-pre-2988 Updated FML: + MinecraftForge/FML@bc64ceabef76b1f4667b22ca8241b72351b44338 Optional shouldn't be constructable itself. It's purely a wrapper thing. + MinecraftForge/FML@55525f6d2eb24f42c26a291b8ce98feb4d4498c9 ModLoader is officially deprecated. It will all cease to be with 1.7. + - v99.99-pre-2987 ModLoader is officially deprecated. It will all cease to be with 1.7. + - v99.99-pre-2986 Optional shouldn't be constructable itself. It's purely a wrapper thing. + - v99.99-pre-2985 Added PlayerOpenContainerEvent and added ForgeHooks.canInteractWith + - Used to override the canInteractWith during player tick + - setResult to ALLOW/DENY as required + - Defaults to Vanilla behaviour in any other instance. + Required for LittleBlocks Mod and to Assist Gullivers Mod + - v99.99-pre-2984 Updated FML: + MinecraftForge/FML@63ba3aa0099f43183315fb4e16f9e8e8007362f8 Add in support for Optional interfaces and methods. Be gone coremods! + - v99.99-pre-2983 Add in support for Optional interfaces and methods. Be gone coremods! + - v99.99-pre-2982 Add block break events based on @bloodmc's initial 1.5.2 Pull Request + - v99.99-pre-2981 Fix missing patch which caused per-world storage to not be saved. + - v99.99-pre-2980 Merge pull request #808 from rhilenova/player_list + Added pre/post to player list rendering in GuiIngameForge. + - v99.99-pre-2979 Merging in master. + - v99.99-pre-2978 Bump version number for todays changes. + - v99.99-pre-2977 Make isItemStackDamageable() pass the stack to getMaxDamage() to use the Forge version of getMaxDamage(). + Fixes display issues with mods using getMaxDamage(ItemStack) instead of the vanilla one. Closes #805 + - v99.99-pre-2976 Merge pull request #803 from benblank/block-power + Allow blocks to choose how they handle indirect power + - v99.99-pre-2975 Moved PLAYER_LIST event inside display check. + - v99.99-pre-2974 Merge pull request #793 from jrtc27/install-args + Pass arguments to install.sh and install.cmd to install.py + - v99.99-pre-2973 Add cancelable EntityStructByLightningEvent, Closes #789 + - v99.99-pre-2972 Stack sensitive version of Item.getItemStackLimit. Closes #771 + - v99.99-pre-2971 Merge pull request #772 from Lomeli12/master + Villager Trading GUI will now not open if Player is sneaking. Allowing for bypassing of the GUI. + - v99.99-pre-2970 Added all the vanilla records to the ore dictionary. Closes #731 + - v99.99-pre-2969 Direct canApplyAtEnchantingTable through canApply Closes #740 + - v99.99-pre-2968 Add pre and post event to rendering Chat, allowing for placement of the chat box. Closes #733 + - v99.99-pre-2967 Set densityDir in BlockFluidBase's constructor, closes #737 + - v99.99-pre-2966 Fix placement of snow cover over metadata 6. Closes #724 + - v99.99-pre-2965 Add the ability to register chat commands that only execute on the client. Works with autocomplete. + Client commands are gray when shown in the autocomplete list (when you press tab) + Closes #640 + - v99.99-pre-2964 move `shouldCheckWeakPower` to Forge section + - v99.99-pre-2963 Vanilla hopper should obey the IInventory contract, TileEntityHopper now takes into account IInventory.getInventoryStackLimit() when inserting items Closes #597. + - v99.99-pre-2962 Update workspace to point at launchwrapper 1.8 + - v99.99-pre-2961 Merge pull request #796 from HoBoS-TaCo/master + Added ItemTooltipEvent + - v99.99-pre-2960 Added ItemTooltipEvent + This event is fired at the end of ItemStack.getTooltip(EntityPlayer, boolean), which in turn is called from it's respective GUIContainer. It allows an itemstack's tooltip to be changed depending on the player, itemstack or whether the advanced information on item tooltips is being shown, toggled by F3+H. + - v99.99-pre-2959 Updated FML: + MinecraftForge/FML@5265e34a350adbb762264379f0134bfa40d33eaa Fix null killing the server + - v99.99-pre-2958 Fix null killing the server + - v99.99-pre-2957 Added pre/post to player list rendering in GuiIngameForge. + - v99.99-pre-2956 MinecraftForge/FML@35ab9f52b02d84592e4c7607feb6009710b2f7d9 Fix md5s for new checksums.sha1 in scala libraries. + - v99.99-pre-2955 Fix md5s for new checksums.sha1 in scala libraries. + - v99.99-pre-2954 allow blocks to choose how they handle indirect power + - v99.99-pre-2953 Updated FML: + MinecraftForge/FML@e356f4d713b1269825839954fe86f5312ede0fc6 Cross-modsystem compatibility fix with thanks to Mumfrey @ liteloader + MinecraftForge/FML@9b55f1f48f89a5348ac1d58622b71946f310316a Attempt at a shared modlist implementation - should allow visibility between liteloader and fml for "mod list display" + - v99.99-pre-2952 Attempt at a shared modlist implementation - should allow visibility between liteloader and fml for "mod list display" + - v99.99-pre-2951 Cross-modsystem compatibility fix with thanks to Mumfrey @ liteloader + - v99.99-pre-2950 Updated FML: + MinecraftForge/FML@bfc25bc5da1ff0f6fd0faf817b32a8f6d35dedc2 Add to both the classloader and the parent + - v99.99-pre-2949 Add to both the classloader and the parent + - v99.99-pre-2948 Updated FML: + MinecraftForge/FML@9f0f9e7288afc6cce9a425ad770a208af9e28648 Fix deobf tweaker + - v99.99-pre-2947 Fix deobf tweaker + - v99.99-pre-2946 Updated FML: + MinecraftForge/FML@ce6404fd5bb5e8e425af3bcafeaa285575bf39a3 TYPOS!!! + - v99.99-pre-2945 TYPOS!!! + - v99.99-pre-2944 Updated FML: + MinecraftForge/FML@8f18a3de9a02b003762dace891829ef64dfedf49 Separate deobf tweaker so it runs last. Should fix problems with cascaded tweakers expecting an obf environment. + - v99.99-pre-2943 Separate deobf tweaker so it runs last. Should fix problems with cascaded tweakers + expecting an obf environment. + - v99.99-pre-2942 Updated FML: + MinecraftForge/FML@8e26c99de3b44d272d2fdc398e0687db17bce3b7 Add debugging for deobfuscation + MinecraftForge/FML@1d902df5814b815959165e4aa69272003f002d25 Use the negative cache in latest legacylauncher. + MinecraftForge/FML@9815d8c3793182a08fcdbd29376a3f70bff464d0 Update for launchwrapper 1.8 + - v99.99-pre-2941 Add wrapper exception to the new Structure ID system to point to the correct Structure. + - v99.99-pre-2940 Update for launchwrapper 1.8 + - v99.99-pre-2939 Use the negative cache in latest legacylauncher. + - v99.99-pre-2938 Add debugging for deobfuscation + Add negative caching for field and method maps. Should shortcut some work + Fix handling the case where a class doesn't exist, but still needs deobf + Ask the patch manager for the bytes for the class, not the classLoader + Fix up some more places where we should look for a patched class + Fix problem with empty source classes and runtime deobfuscation + - v99.99-pre-2937 Updated FML: + MinecraftForge/FML@fc8c3bef0380d59c0842a252e4f0bd29127ee78b Update to new installer that uses xz compression and better support for non-standard jvms + - v99.99-pre-2936 Update to new installer that uses xz compression and better support for non-standard jvms + - v99.99-pre-2935 Fixed typo in bounding box based ladder checks that caused potential infinite loops with entities in certian positions. Thanks Overmind for reporting it. + - v99.99-pre-2934 Remove some side onlys on BiomeEvents that don't need them. + - v99.99-pre-2933 Update dev workspace for 1.6.4 .. + - v99.99-pre-2932 Updated FML: + MinecraftForge/FML@a4de22c1addf0a6b95d38e467a96f2af417c86d5 And use the parent that's actually going to be valid. *sigh* + - v99.99-pre-2931 And use the parent that's actually going to be valid. *sigh* + - v99.99-pre-2930 Updated FML: + MinecraftForge/FML@70cffe6982b27df0ea7d8d4d8851a0c0043bb2cb Herpaderp. Make addURL accessible. *sigh* + - v99.99-pre-2929 Herpaderp. Make addURL accessible. *sigh* + - v99.99-pre-2928 Fluid Rarity should have a default + Oops. + - v99.99-pre-2927 Updated FML: + MinecraftForge/FML@4a94c2c71bb4cc9644caeb06011a189989b22f87 Fix NPE when loading second single-player world + MinecraftForge/FML@0e80fcb8f716cfef5b016a73ca32ff0e2f3c3c05 Merge pull request #284 from smcv/uninit + MinecraftForge/FML@39620f1e41464f53482277dc3bcb0b9eed8ca25c Fix injection of tweaker into system + - v99.99-pre-2926 Fix injection of tweaker into system + - v99.99-pre-2925 Merge pull request #284 from smcv/uninit + Fix NPE when loading second single-player world + - v99.99-pre-2924 Fix NPE when loading second single-player world + After leaving a single-player world, getServer() can return null, resulting + in the stack trace below, "Fatal errors were detected during the + transition from SERVER_STOPPING to SERVER_ABOUT_TO_START", + "The ForgeModLoader state engine has become corrupted" and the client + getting stuck forever. + Exception in thread "Server thread" java.lang.NullPointerException + at cpw.mods.fml.client.FMLClientHandler.serverStopped(FMLClientHandler.java:620) + at cpw.mods.fml.common.FMLCommonHandler.handleServerStopped(FMLCommonHandler.java:468) + at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) + at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583) + - v99.99-pre-2923 Updated FML: + MinecraftForge/FML@79c39f8b7c711377f7919abd1ee6a56a339d1062 Fix classpath for launchwrapper 1.7 + - v99.99-pre-2922 Fix classpath for launchwrapper 1.7 + - v99.99-pre-2921 Merge pull request #794 from alexbegt/master + Correcting SoundManager Transformer + - v99.99-pre-2920 Correcting SoundManager Transformer + - v99.99-pre-2919 Clean patch fuzz + - v99.99-pre-2918 Pass arguments to install.sh and install.cmd to install.py + - v99.99-pre-2917 Updated FML: + MinecraftForge/FML@f6190e8752013c0d6857090ffd42559cf83809ae Update workspaces for 1.6.4 + - v99.99-pre-2916 Update workspaces for 1.6.4 + - v99.99-pre-2915 Updated FML: + MinecraftForge/FML@25981706ef12654b6c2baccc80fa2298bb5afb4a Update for MC 1.6.4 + MinecraftForge/FML@0950b9fc8441a2d3b022ed876f17ee5ac0c47b9c Fix up a deep crash in the early server init hanging the client + - v99.99-pre-2914 Fix up a deep crash in the early server init hanging the client + - v99.99-pre-2913 Update for MC 1.6.4 + - v99.99-pre-2912 Move have handler creation up, to prevent NPE. + - v99.99-pre-2911 Remove duplicate access transformer + - v99.99-pre-2910 Updated FML: + MinecraftForge/FML@e7dd728f955aa4713fef45fea770b1f91246d712 Format the log messages through MessageFormat. Thanks CovertJaguar for the pointer. + MinecraftForge/FML@82d896a35e08be5712bdc15bdb93e5d4fc0ddd46 Make final transformers actually work on methods as well. + - v99.99-pre-2909 Make final transformers actually work on methods as well. + - v99.99-pre-2908 Format the log messages through MessageFormat. Thanks CovertJaguar for the pointer. Closes #282 + - v99.99-pre-2907 Move the Structure data save files to per-world data folders. Vanilla saves them to the global folder which will potentially cause conflicts if two worlds generate 'Villages'. Which in the modded world is highly likely. Refer back to the long standing vanilla issue where nether 'villages' would override the overworlds villages, it's the same situation. + - v99.99-pre-2906 Make MapGenStructureIO name registration functions public, Any mod that has anything extending StructureStart or StructureComponent must register there classes and create a default (no parameter) constructor. + - v99.99-pre-2905 Unfinalized Item.getIconIndex(ItemStack) + - v99.99-pre-2904 Actually push the submodule update -.- + - v99.99-pre-2903 Bump version for new MC version. + - v99.99-pre-2902 Updated FML: + MinecraftForge/FML@da70cdd35a378d02db47d2aa31fb9aac87beaedc Update tweaker for new Launcher API + MinecraftForge/FML@352117fd78eec745da6c80b8d354947c4dbbbb48 Update for new installer and thank you. + MinecraftForge/FML@40a34af43105ebcb5a63ce2351ca119da5a8158e Merge branch 'master' into newtweak + MinecraftForge/FML@e77d2547ad447025729ae7f3cccaaf343c4c86f9 Update for pre-ninja 1.6.3 update + MinecraftForge/FML@34493b0d99e2cf2bdca080ff226f2dfeedb1cf51 Update for real 1.6.3 update + MinecraftForge/FML@95afc95b248ecc69bc6ffcc5a95912820d8f4066 Update mcp mod info + MinecraftForge/FML@ff75416a325717770a5cf457c859bfb0abcbe281 Update mc_versions data and commands patch and eclipse workspace + MinecraftForge/FML@8f2e67558127f16d92399ea97cbcb0df46d52e19 Update the src distro's eclipse workspace. + - v99.99-pre-2901 Update the src distro's eclipse workspace. + - v99.99-pre-2900 Update mc_versions data and commands patch and eclipse workspace + - v99.99-pre-2899 Update mcp mod info + - v99.99-pre-2898 Update for real 1.6.3 update + - v99.99-pre-2897 Update for pre-ninja 1.6.3 update + - v99.99-pre-2896 Merge branch 'master' into newtweak + - v99.99-pre-2895 Update for new installer and thank you. + - v99.99-pre-2894 Updated FML: + MinecraftForge/FML@81328b6684c5127427153807b5e498c2efefb96b Add in support for using a mirror list and provide checksums for packed download of libs + - v99.99-pre-2893 Add in support for using a mirror list and provide checksums for packed download of libs + - v99.99-pre-2892 Revert "Added a RenderType that allows Map-style rendering w/o inheriting from" + This reverts commit eb4688bf5ea132cd8ddc802a7dad6d423ad50543. + Conflicts: + patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch + - v99.99-pre-2891 Fix broken PR from vilml. TEST! + - v99.99-pre-2890 Merge pull request #784 from viliml/patch-1 + Prevent NPE in fluid lookup for block + - v99.99-pre-2889 Prevent NPE in fluid lookup for block + - v99.99-pre-2888 Merge pull request #782 from CovertJaguar/patch-1 + Allow Fluids to have Rarities + - v99.99-pre-2887 Fix the divider + - v99.99-pre-2886 Allow Fluids to have Rarities + Used for tool tips. + - v99.99-pre-2885 Move stuff around a bit- also tie range and enabled to options. + - v99.99-pre-2884 Merge branch 'master' of github.com:Adubbz/MinecraftForge into Adubbz-master + - v99.99-pre-2883 Sky colours now smoothly transition + Made transitions even smoother + Sky colours now smoothly transition + - v99.99-pre-2882 Tweak patch comment + - v99.99-pre-2881 Merge branch 'mapStyle' of github.com:Matchlighter/MinecraftForge into Matchlighter-mapStyle + - v99.99-pre-2880 Merge branch 'master' of github.com:micdoodle8/MinecraftForge into micdoodle8-master + - v99.99-pre-2879 Allows proper raytracing from actual player eye position rather than hardcoded eye heights. + - v99.99-pre-2878 Merge branch 'fovhook' of github.com:MachineMuse/MinecraftForge into MachineMuse-fovhook + - v99.99-pre-2877 Updated FML: + MinecraftForge/FML@b5af446d7111730c7973c9f0d6b76e62b78b9131 Fix sidedness derp in LanguageRegistry. + - v99.99-pre-2876 Fix sidedness derp in LanguageRegistry. + - v99.99-pre-2875 Villager Trading GUI will not open if Player is sneaking. + - v99.99-pre-2874 Check if block is air instead of just ID zero when growing from stem block. + - v99.99-pre-2873 Added a RenderType that allows Map-style rendering w/o inheriting from + ItemMap. + - v99.99-pre-2872 The partial tick should be available for all render player events. Weird it wasn't. + - v99.99-pre-2871 Redo harvest event. This time with simpler logic, that should be less liable to weird "missing" stuff. + - v99.99-pre-2870 Reverting HarvestEvent, for new implementation + - v99.99-pre-2869 Fix bug where guis were not closed properly, resulting in signs not having there text set. + - v99.99-pre-2868 Change trigger calculation so entities get some time to age before refiring the event. + - v99.99-pre-2867 Create helper apply_patches script and add paramter to change patch output folder. + - v99.99-pre-2866 Change from Cancelable to using a Result. This means you can force despawn mobs you + don't want around anymore. Also, deferred check to once every 20 ticks. May tune it + down further or make it a config if this event is a lag issue. + - v99.99-pre-2865 Create es_ES.lang + - v99.99-pre-2864 Added fov hook + Small formatting changes (opening braces on new line) + - v99.99-pre-2863 Add a cancellable despawn event- allows mods to decide to prevent the despawning + of certain otherwise normally despawnable mobs. + - v99.99-pre-2862 Small formatting changes (opening braces on new line) + - v99.99-pre-2861 fixed merge + - v99.99-pre-2860 Added fov hook + - v99.99-pre-2859 Add some javadoc to the HarvestBlock event. + - v99.99-pre-2858 Clean up some formatting. + - v99.99-pre-2857 Use the dropchance from the event. + - v99.99-pre-2856 Merge branch 'sometweaks' + - v99.99-pre-2855 Add in a block reverse lookup for fluids. Closes #749 + - v99.99-pre-2854 Add a harvestblock event, to allow mods to intercept and change the drops for blocks. Don't abuse this, or we'll have to take safety measures. + Fires for both silktouch and non-silktouch harvesting, and provides the player. Note, you may need to + change your break overrides to pass on the player for best results. + - v99.99-pre-2853 Defer firing CreateDecorator until it's likely mods have had a chance to register their listener. Should close #759 + - v99.99-pre-2852 MachineMuse, remember, there's TWO model formats supported! + - v99.99-pre-2851 Merge branch 'master' of github.com:jk-5/MinecraftForge into sometweaks + Conflicts: + patches/minecraft/net/minecraft/client/Minecraft.java.patch + - v99.99-pre-2850 Merge branch 'master' of github.com:mhahn1976/MinecraftForge into sometweaks + - v99.99-pre-2849 Merge branch 'french' of github.com:robin4002/MinecraftForge into sometweaks + - v99.99-pre-2848 Add a bit of javadoc + - v99.99-pre-2847 Merge branch 'displayname' of github.com:MachineMuse/MinecraftForge into sometweaks + Conflicts: + patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch + - v99.99-pre-2846 Merge branch 'objTessellation' of github.com:MachineMuse/MinecraftForge into sometweaks + - v99.99-pre-2845 Fix patch for new MCP naming. + - v99.99-pre-2844 Merge branch 'mouseevent2' of github.com:MachineMuse/MinecraftForge into sometweaks + - v99.99-pre-2843 Reduce patch size significantly + - v99.99-pre-2842 Fix player push out of blocks clientside being hardcoded and not based on entity size. + Added player eyeHeight field to allow changeable eye heights of players rather than being hardcoded per player class as well as add a getDefaultEyeHeight function. + - v99.99-pre-2841 fixed logic error + - v99.99-pre-2840 inserted hook into Minecraft.java + - v99.99-pre-2839 Added mouse event + - v99.99-pre-2838 Memoization of display name result + - v99.99-pre-2837 Update version to 9.10.1 for mcp naming changes. + - v99.99-pre-2836 Update forge for MCP naming updates + Updated FML: + MinecraftForge/FML@d0c6e92900590f578b80d9a6c00fa28fd333d3bf Update MCP data + - v99.99-pre-2835 Update MCP data + - v99.99-pre-2834 Merge remote-tracking branch 'forge/master' into objTessellation + - v99.99-pre-2833 Added display name hook + - v99.99-pre-2832 Fix possible NPE in searching code. + - v99.99-pre-2831 Updated FML: + MinecraftForge/FML@2a9c485edc4cf3382154d5b3b9b600386f2ab8ae Remove @SideOnly from 70318 (getDistance) it makes no sense that it's not on the server. + - v99.99-pre-2830 Remove @SideOnly from 70318 (getDistance) it makes no sense that it's not on the server. + - v99.99-pre-2829 Updated FML: + MinecraftForge/FML@a13598b17ea9637c054d867a76298d6c080c5e32 Use java 1.6 compatible method of closing the zip file. Stops stupid compile error. + - v99.99-pre-2828 Use java 1.6 compatible method of closing the zip file. Stops stupid compile error. + - v99.99-pre-2827 Small fix to container registry. emptyContainer is not null, it's "NULL_EMPTYCONTAINER" now and won't match any valid container. + - v99.99-pre-2826 Tweak the release to add in assets to the distributable. *sigh* + - v99.99-pre-2825 create french localization + - v99.99-pre-2824 Add some starting work for a forge tps command. Also update coremod for new FML behaviour + - v99.99-pre-2823 Updated FML: + MinecraftForge/FML@1c9a853868f7df0daa5f67b99401dfab44ae18e6 Allow coremods to properly inject asset readers. + MinecraftForge/FML@40b54013b4c9b01686411cd47a7866eeb650ea2b Allow server side lang file injection, hopefully + - v99.99-pre-2822 Allow server side lang file injection, hopefully + - v99.99-pre-2821 Allow coremods to properly inject asset readers. + - v99.99-pre-2820 capacity was not respected + Updated to properly calculate the amount of free space in the tank + before checking that against the amount of the resource. + - v99.99-pre-2819 Added GuiOpenEvent + You can use this for a clean way to override guis, without needing an + TickHandler to check if the gui you want to override is open and show + your own gui + Proper close check + - v99.99-pre-2818 Update tweaker for new Launcher API + - v99.99-pre-2817 Updated FML: + MinecraftForge/FML@b993cf4a9825865b3a8a0c7b083c23d56dbd1d6f More exception handling for less derpiness. + - v99.99-pre-2816 More exception handling for less derpiness. + - v99.99-pre-2815 In the time honoured tradition of trying to fix vanilla, we today attempt to patch the pathfinding AI so that it doesn't lag when + there's a lot of entities. Basically, if the zombie can't reach the villager, backoff subsequent pathfinding attempts. Hopefully + should really help with lag caused by zombie swarms. + - v99.99-pre-2814 Allow multipass RenderItem rendering for terrain icons too. Should fix sengir's saplings. + - v99.99-pre-2813 Updated FML: + MinecraftForge/FML@913f6f6d36bd179db7c147db0485e99dee693933 Try and use the relaunch log, which should be classloaded.. + MinecraftForge/FML@ac065ff5f76b6c512b346366107efde66e9e1c88 Reset the IWorldGenerator seed for each mod, before calling. That should mean worldgen is consistent and not dependent on mod ordering, or mod sideeffects. + - v99.99-pre-2812 Reset the IWorldGenerator seed for each mod, before calling. That should mean worldgen is consistent + and not dependent on mod ordering, or mod sideeffects. + - v99.99-pre-2811 Try and use the relaunch log, which should be classloaded.. + - v99.99-pre-2810 Skipp toss event for null entity items. Closes #732 + - v99.99-pre-2809 Cache world on all render passes in case some mod disables the first pass. + - v99.99-pre-2808 Fix bug with custom Fluids. You can now drown in them! + - v99.99-pre-2807 Updated FML: + MinecraftForge/FML@9468e41bbf3ea425c50daa710cf3ada11c82b238 Fix up scala refs, for better results + - v99.99-pre-2806 Fix up scala refs, for better results + - v99.99-pre-2805 Merge pull request #730 from Soaryn/patch-1 + Adds Temperature to Lava + - v99.99-pre-2804 Updated FML: + MinecraftForge/FML@ffdd056a18eddb8f28b74435d40e69c956b9dd48 Check keys, not values *sigh* + - v99.99-pre-2803 Check keys, not values *sigh* + - v99.99-pre-2802 Updated FML: + MinecraftForge/FML@f157e7a6ecdeac2758fc0eaf547d3e8a763fb15b And more coremod logging + - v99.99-pre-2801 And more coremod logging + - v99.99-pre-2800 Updated FML: + MinecraftForge/FML@4a9d0f9bd522e543b76daaf9c49b6214443c595f Add in some log information + - v99.99-pre-2799 Add in some log information + - v99.99-pre-2798 Updated FML: + MinecraftForge/FML@03989166665956df03aa85472eb13dca2d74a38d And actually instantiate the collection *sigh* + - v99.99-pre-2797 And actually instantiate the collection *sigh* + - v99.99-pre-2796 Updated FML: + MinecraftForge/FML@dec9a3924d361bc016cb7f6b3e95764158cf5ae1 Add in "FMLCorePluginContainsMod" in the manifest. If this value is present, FML will attempt to parse your mod jar file as a normal mod file as well, instantiating mod containers there. + - v99.99-pre-2795 Add in "FMLCorePluginContainsMod" in the manifest. If this value is + present, FML will attempt to parse your mod jar file as a normal mod + file as well, instantiating mod containers there. + - v99.99-pre-2794 Updated FML: + MinecraftForge/FML@24701206808a43b9c7b10d7130c47b5d1e841bb6 Clean up a couple of resources. Also, don't parse jars just because they're in the mods dir + - v99.99-pre-2793 Clean up a couple of resources. Also, don't parse jars just because + they're in the mods dir + - v99.99-pre-2792 Updated FML: + MinecraftForge/FML@9a5e24e338c6172531efb086a4b584c26d4f1435 Fix stupid derp is stupid. Closes #275 and means sp614x can do his thing + MinecraftForge/FML@ba90b616070ce15793eb05e5afaed62a6f07c6e7 Make sure we only add args to the argument list if a tweaker hasn't already. Should fix LiteLoader compatibility issue. + - v99.99-pre-2791 Make sure we only add args to the argument list if a tweaker hasn't already. + Should fix LiteLoader compatibility issue. + - v99.99-pre-2790 Fix stupid derp is stupid. Closes #275 and means sp614x can do his thing + - v99.99-pre-2789 Adds Temperature to Lava + Missing lava temperature. Feel free to change it to any value. + 1300K is the typical max for Magma so wasn't sure what was desired. Regardless, better than the same temp as water at 295K :smile: + - v99.99-pre-2788 Fix NPE in enchangint books. + - v99.99-pre-2787 Fix inverted case, search works now. + - v99.99-pre-2786 Merge pull request #606 from Shukaro/master + Add stone and cobblestone to ore dictionary + - v99.99-pre-2785 Addition: Added isAllowedOnBooks hook to Enchantments Closes #589 + - v99.99-pre-2784 Deprecate Block.addCreativeItems, Kill in 1.6.3+ Closes #655 + - v99.99-pre-2783 Merge pull request #679 from Chicken-Bones/invchanged + Add onNeighborTileChange callback to block by generalizing func_96440_m ... + - v99.99-pre-2782 Merge pull request #702 from MrMasochism/master + Added new function for control over dismount underwater + - v99.99-pre-2781 Allow creative tabs to have a search box if they want to Closes #592 + - v99.99-pre-2780 Merge pull request #717 from tommy1019/patch-3 + Fixed Fluid Non-Solid Block Duplication + - v99.99-pre-2779 Add optional feature to check entire bounding box for ladders. Closes #709 + - v99.99-pre-2778 Fixed Classic Checking + - v99.99-pre-2777 Fixed Double Item Drop + - v99.99-pre-2776 Fixed Fluid Non-Solid Block Duplication + - v99.99-pre-2775 Only refresh vanilla tile entities when IDs change. + - v99.99-pre-2774 Updated FML: + MinecraftForge/FML@f275a24b43559cfdced243ff77e9848c9d458362 Add in some reverse lookup methods for game registry data + MinecraftForge/FML@cb05c8c4aa60a131de92f0a21c06697c8f8896a8 Add missing SideOnly in BaseMod + MinecraftForge/FML@1857064afa9ace796440c19f3275637a6e659375 Merge pull request #266 from grompe/patch-1 + MinecraftForge/FML@182aa9c0cbe61ac69b0d428ead1dc817dd2a2e71 Fixed install.sh not passing arguments to install.py + MinecraftForge/FML@f46a538b41157081c840f647f123513ac4c5a071 Merge pull request #268 from Bo98/sh-args-fix + MinecraftForge/FML@29ef3d5ab412dcabbd67695558880c45011ace82 Update installer. + - v99.99-pre-2773 Update installer. + - v99.99-pre-2772 Merge branch 'miscchanges' + - v99.99-pre-2771 Merge pull request #610 from purpleposeidon/patch-1 + Add an InputStream constructor to WavefrontObject + - v99.99-pre-2770 Merge pull request #704 from StormTiberius/master + Adds cloud height to WorldType + - v99.99-pre-2769 Merge pull request #268 from Bo98/sh-args-fix + Fixed install.sh not passing arguments to install.py + - v99.99-pre-2768 Merge pull request #706 from heldplayer/fluidRendering + Fix small derp + - v99.99-pre-2767 Merge pull request #705 from heldplayer/fluids + Fix render colour on bottom of fluids + - v99.99-pre-2766 Fix small derp + - v99.99-pre-2765 Fix render colour on bottom of fluids + - v99.99-pre-2764 Fixed install.sh not passing arguments to install.py + - v99.99-pre-2763 Add cloud height to WorldType + - v99.99-pre-2762 Merge pull request #266 from grompe/patch-1 + Add missing SideOnly in BaseMod + - v99.99-pre-2761 Merge branch 'master' of github.com:EnderShadow/MinecraftForge into miscchanges + - v99.99-pre-2760 Add missing SideOnly in BaseMod + NetClientHandler exists only on client side and thus method using it should be annotated with SideOnly. + - v99.99-pre-2759 added temperature to fluids + it could be useful for blocks that are affected by temperature + - v99.99-pre-2758 Added a new function to allow control over whether an entity is dismounted when the entity it is riding goes under water + - v99.99-pre-2757 Merge pull request #700 from iChun/miscchanges + Fix RenderLivingEvent.Pre/Post not being fired by most Renders. + - v99.99-pre-2756 Fix RenderLivingEvent.Pre/Post not being fired by most Renders. + - v99.99-pre-2755 Add in some reverse lookup methods for game registry data + - v99.99-pre-2754 Updated FML: + MinecraftForge/FML@57befa89bbbf2bc2fcc4a97b78e07b3f9e23ef9d Fix keybindings being derped + MinecraftForge/FML@1d84e8063e9d0dc73928dba006e6001201285cad Temporarily add a version of 'reobfuscate.py' that will resolve complex reobfuscation graph issues with specialsource. Copy it over 'reobfuscate.py' in the mcp runtime dir. Hopefully will have an MCP/specialsource fix in the coming days. + - v99.99-pre-2753 Temporarily add a version of 'reobfuscate.py' that will resolve complex + reobfuscation graph issues with specialsource. Copy it over 'reobfuscate.py' + in the mcp runtime dir. Hopefully will have an MCP/specialsource fix in + the coming days. + - v99.99-pre-2752 Fix keybindings being derped + - v99.99-pre-2751 Tweak setBlock in update tick - it should only send serverside updates for + source blocks. Experimental attempt to fix worldgen issues for fluid blocks + - v99.99-pre-2750 Fix formatting error in PR + - v99.99-pre-2749 Merge pull request #695 from tommy1019/master + Fluid Rendering Fixes + - v99.99-pre-2748 Fluid Rendering Fixes + - v99.99-pre-2747 Add a translation map for looking up legacy liquid names to convert + to new fluid names. + - v99.99-pre-2746 Add support for loading legacy liquid stacks as new fluid stacks. + Requires having been written with the "liquidname" code from forge 1.5.x + - v99.99-pre-2745 Merge branch 'master' of github.com:tommy1019/MinecraftForge into miscchanges + - v99.99-pre-2744 Fix names for water/lava fluids. Closes #689 + - v99.99-pre-2743 Merge branch 'master' of github.com:iChun/MinecraftForge into miscchanges + - v99.99-pre-2742 Add SneakClick bypass to client + - v99.99-pre-2741 Fixed fluids eating each other + Fluids check for other fluids density before flowing, if their density + is higher they can flow into the other fluid, if not they can't. + - v99.99-pre-2740 Update RendererLivingEntity.java.patch + - v99.99-pre-2739 if statement added + - v99.99-pre-2738 Add Pre and Post events firing for RendererLivingEntity + - v99.99-pre-2737 Add Pre and Post events for RenderLivingEvent + - v99.99-pre-2736 Fluid Render Fix + Formatting + - v99.99-pre-2735 Merge pull request #665 from copyboy/master + Fix getArmorTexture by passing it the subtype + - v99.99-pre-2734 Fix getArmorTexture by passing it the subtype + - v99.99-pre-2733 Re-added deprecated liquids system. To be removed next major MC versions after issues with Fluids are fixed. (reverse-merged from commit 9b5208fa308f22c24e295ce3be38dcafea2857ea) + This WILL be removed and should not be developed against aside for a temporary 1.6 release. + - v99.99-pre-2732 Remove SideOnly(Client) in IBlockAccess.isAirBlock + - v99.99-pre-2731 MinecraftForge/FML@10b16d32da4b7c32b15e69cf1c636505ebbe2540 Use json 2.9.1 nightly for OSX in release json like vanilla does. + - v99.99-pre-2730 Use json 2.9.1 nightly for OSX in release json like vanilla does. + - v99.99-pre-2729 General code cleanup of Fluid system. Made Fluid icons and associated functions non-sided. + - v99.99-pre-2728 MinecraftForge/FML@3f21a2c1b413e591f61f2906c3adbadd9c5b09e3 Stupid spaces and windows escaping -.- + - v99.99-pre-2727 Stupid spaces and windows escaping -.- + - v99.99-pre-2726 Package 'version.json' with universal jar for maunchers to use. It's the json used by the vanilla Minecraft launcher for Forge. + - v99.99-pre-2725 MinecraftForge/FML@b2958c9066db8c95bb4260893fbfe00103fc4ba1 Add quotes for paths with spaces -.- + - v99.99-pre-2724 Add quotes for paths with spaces -.- + - v99.99-pre-2723 MinecraftForge/FML@9520978b81d4cba5d8b0af0d5f155bd115023795 Use a temporary file for recompile's command line to combat command length to long issues. + - v99.99-pre-2722 Use a temporary file for recompile's command line to combat command length to long issues. + - v99.99-pre-2721 Add onNeighborTileChange callback to block by generalizing func_96440_m to all blocks rather than just comparators. + - v99.99-pre-2720 Updated FML: MinecraftForge/FML@4981aa3421262c3c1c4705468fe202df8198b9f0 Fix potential NPE in villager skin registry. Closes #678 + - v99.99-pre-2719 Fix potential NPE in villager skin registry. + - v99.99-pre-2718 Merge pull request #675 from Soaryn/patch-1 + Fixes Vanilla Fluid Still Icon Setters + - v99.99-pre-2717 Fixes Vanilla Fluid Still Icon Setters + Fixes null icons from being set for both the still water/lava icons, and sets the correct Icon. + - v99.99-pre-2716 Updated FML: MinecraftForge/FML@c48b48ee15f38d3e794b6eb3499c536226ca5a79 Fix server launching. + - v99.99-pre-2715 Fix server launching. + - v99.99-pre-2714 Fix for new location of mcp logo. + - v99.99-pre-2713 Updated FML: + MinecraftForge/FML@0378355c3720d587652b7792665a8b70bf104eb3 The server.classpath generates the runtime manifest, so it needs the non-debug asm jars. + MinecraftForge/FML@a3f48734ffbbb2eccffdafcd3cbe73824bd1afd6 Fix up jar sanity check code. FML validation of the jar works now and doesn't derp classloading. + MinecraftForge/FML@9947ba85036542a3231e25328d3300f2a5337370 Fix logo handling. no more NPE if the logo can't be found. Also, fix location of mcp logo now. + - v99.99-pre-2712 Fix logo handling. no more NPE if the logo can't be found. Also, fix location of mcp logo now. + - v99.99-pre-2711 Fix up jar sanity check code. FML validation of the jar works now and doesn't derp classloading. + - v99.99-pre-2710 The server.classpath generates the runtime manifest, so it needs the + non-debug asm jars. + - v99.99-pre-2709 Monkey patch to try and make print flush properly. + - v99.99-pre-2708 Update changelog generator to point to new jenkins. + - v99.99-pre-2707 MinecraftForge/FML@c625ef30093abb0755985c74d1f31e2c4cf6cfdd Update Forge signature for new private key + - v99.99-pre-2706 Update Forge signature for new private key + - v99.99-pre-2705 Updated FML: + MinecraftForge/FML@7348929819b0ae8ad35419ef5dbf66e66b442858 Kill release time scala libraries, to be re-evaluated after all movement is done and shit is fixed. May require manual instalation for mods that use scala. + MinecraftForge/FML@6de36d78f57f6f08ec586b67b684d0e5406cd436 Coremods now have a primitive dependency capability. Also, we search mods dir for special "TweakClass" manifests. These are using the vanilla tweak mechanism to inject into Minecraft. Helpful for other "platform" systems, when you don't want to have to deal with json changes! + MinecraftForge/FML@d4b30422b64a62a2f8a8c2cccd94cb0fd06154e0 Update build and eclipse workspaces for debug asm. + - v99.99-pre-2704 Update build and eclipse workspaces for debug asm. + - v99.99-pre-2703 Coremods now have a primitive dependency capability. Also, we search mods dir for special + "TweakClass" manifests. These are using the vanilla tweak mechanism to inject into + Minecraft. Helpful for other "platform" systems, when you don't want to have to deal + with json changes! + - v99.99-pre-2702 Kill release time scala libraries, to be re-evaluated after all movement is done and shit is fixed. May require manual instalation for mods that use scala. + - v99.99-pre-2701 MinecraftForge/FML@b9f4b02cb0b041594656f05de70225df702a8ddd Kill mcp's truncate method, for more useful logs. + - v99.99-pre-2700 Merge pull request #661 from Adubbz/master + Made eating particles compatible with metadata + - v99.99-pre-2699 Kill mcp's truncate method, for more useful logs. + - v99.99-pre-2698 Updated FML: + MinecraftForge/FML@e44e8b3112bd56c716a00c19d0be2f15d9128b70 Force a global asset scan prior to mod construction : you should be able to reference assets anywhere in your mod now. + MinecraftForge/FML@20e93a412ee13498babef02d404f57bf5e0fd919 Fix up logos in the mod screen. Clean up some unnecessary casts and suppressions, use the -debug asm library at dev time, since it contains full symbols and code in compiled form. + - v99.99-pre-2697 Fix up logos in the mod screen. Clean up some unnecessary casts and suppressions, use the -debug asm + library at dev time, since it contains full symbols and code in compiled form. + - v99.99-pre-2696 Made eating particles compatible with metadata + Removed extra spaces + Made eating particles compatible with metadata + - v99.99-pre-2695 Force a global asset scan prior to mod construction : you should be able to + reference assets anywhere in your mod now. + - v99.99-pre-2694 Re-add reverted patch AGAIN cpw check your commits -.- + - v99.99-pre-2693 Updated FML: + MinecraftForge/FML@bab4d87ce76baa40200939cc46780b1d3b2ff466 Update FML for new stealth update for 1.6.2 + - v99.99-pre-2692 Update FML for new stealth update for 1.6.2 + - v99.99-pre-2691 Remove forge ISidedInventory, deprecated since 1.5. + - v99.99-pre-2690 Allow optional rider interaction for entities, thanks for the suggestion Vswe. + Updated FML: + MinecraftForge/FML@7af5c21d74679d1a53550f9719bba22b2f28dd13 @InstanceFactory was set to look for Fields instead of methods + MinecraftForge/FML@bc9d1fe657c7a0953adc7d4c5ed81c575bdfb0f1 Merge pull request #254 from CaptainShadows/patch-1 + - v99.99-pre-2689 Merge pull request #254 from CaptainShadows/patch-1 + @InstanceFactory was set to look for Fields instead of methods + - v99.99-pre-2688 Updated FML: + MinecraftForge/FML@97269a5e3dc0a0e2e1a79183f9f5f2ee120e90bd Decode the file URL. Hopefully will make things work more.. + MinecraftForge/FML@d4d522c5978ecd7a9195977b3327b441901bb5b4 And don't forget to remove the test code + - v99.99-pre-2687 And don't forget to remove the test code + - v99.99-pre-2686 Decode the file URL. Hopefully will make things work more.. + - v99.99-pre-2685 MinecraftForge/FML@c913258ca38e662264bdf4aafbfbef86881c9290 Disable signature check of client for now, it's broken. + - v99.99-pre-2684 Disable signature check of client for now, it's broken. + - v99.99-pre-2683 Updated FML: + MinecraftForge/FML@dfa3a2665d6782b87713cea26dda558ac990a72a Add MC Version to installed version name. + MinecraftForge/FML@e91431fb707ce3e7e4296ccb8f3b2e5208b4dfac Don't validate signatures on servers, they are not signed. + MinecraftForge/FML@c7ab872c85dd057a4e44e12e34089dfd1a1184b6 Temporarily disable GuiModList's Mod logos. + - v99.99-pre-2682 Temporarily disable GuiModList's Mod logos. + - v99.99-pre-2681 Don't validate signatures on servers, they are not signed. + - v99.99-pre-2680 Add MC Version to installed version name. + - v99.99-pre-2679 Updated FML: + MinecraftForge/FML@c997f2adbc4c11cd8c2abe5f82ccd00b0e954b68 FML now verifies that the minecraft jar is correct and intact. This is intended to discourage those who think that modifying the minecraft jar is still acceptable. + MinecraftForge/FML@0db4624b27a5ecf59ed506ccfc26459ca26ee408 Don't initialize the server. + MinecraftForge/FML@4fa375683fdb7edff67c951fb371ab4a23435308 Fix NPE in new debug line when patch targets don't exist. + - v99.99-pre-2678 Fix NPE in new debug line when patch targets don't exist. + - v99.99-pre-2677 Don't initialize the server. + - v99.99-pre-2676 FML now verifies that the minecraft jar is correct and intact. This is intended to discourage those who think that + modifying the minecraft jar is still acceptable. + - v99.99-pre-2675 Proper return for getRegisteredFluidContainerData thanks Soaryn. Ref issue #634 + - v99.99-pre-2674 Fix accedential reverted patch. + - v99.99-pre-2673 Make resourcelocation the class available on the server. + - v99.99-pre-2672 Test server-siding ResourceLocation + - v99.99-pre-2671 Drop two domain related fixes that have been applied in vanilla. + Updated FML: + MinecraftForge/FML@c47d08c89dfcacb96e36c427593174e08dcb4224 Tweak debug data on patched classes + MinecraftForge/FML@dbf5fe38cee04288e92d57f8782114b452245bce We now generate an adler32 checksum for each patched file and verify at load time that they match. Mismatch won't crash, but will emit a big warning.. + MinecraftForge/FML@e88a0cd13f63904f7317e1a73880611f58820389 Update for stealth update. Thanks mojang! + MinecraftForge/FML@2336002f20e9412a7663781b23c51de0eff6a692 The game is going to exit in face of patch mismatch, unless you force it to run with fml.ignorePatchDiscrepancies in the system properties. + - v99.99-pre-2670 The game is going to exit in face of patch mismatch, unless you force it to run with fml.ignorePatchDiscrepancies in the system properties. + - v99.99-pre-2669 Update for stealth update. Thanks mojang! + - v99.99-pre-2668 We now generate an adler32 checksum for each patched file and verify at load time that they match. + Mismatch won't crash, but will emit a big warning.. + - v99.99-pre-2667 Tweak debug data on patched classes + - v99.99-pre-2666 @InstanceFactory was set to look for Fields instead of methods + "fix it" to now match the javadoc :P + if it was set like that so modders wouldn't use it, it might be better to just say so in the documentation + - v99.99-pre-2665 Bump version to 9.10 for new MC version and removal of Fluids. + - v99.99-pre-2664 Remove deprecated Liquids API, Use new Fluids system as replacement. + - v99.99-pre-2663 Updated FML: + MinecraftForge/FML@1d0384f8f664d7002019b865675a5fddf2963b3d Update for 1.6.2 and MCP 8.04 + MinecraftForge/FML@111b0216fdc55f56a8361a584141bca7c9c3f070 Add the jsons for 1.6.2 + MinecraftForge/FML@6f96d89e2bf9313b26eeb4c334a208bf3e1c9ad4 Update eclipse workspaces for 1.6.2 + - v99.99-pre-2662 Update eclipse workspaces for 1.6.2 + - v99.99-pre-2661 Add the jsons for 1.6.2 + - v99.99-pre-2660 Update for 1.6.2 and MCP 8.04 + - v99.99-pre-2659 Updated FML: + MinecraftForge/FML@c97ac284a5e7dbdbccbad2f7ccc95252c4aef239 Update ModLoaderFuelHelper.java + MinecraftForge/FML@3a200e901e34ade679e4485307f57bee725bbe94 Fix coremod injection into main system. Should stop double-dipping coremods. + MinecraftForge/FML@2676c8999cbede05b5475ba68bfc25467a67d4fc Update mcp data. fixes #248 + MinecraftForge/FML@5990e29af7b70e343dfd9cf38bb3e033e71a4489 Merge pull request #247 from jk-5/patch-1 + MinecraftForge/FML@adc89722770b7319884619cadc6f10cc9050df24 Add cascadedTweaks. This will allow simple coexistence for any other mod framework using the tweaker system as well. Hi Voxel and LiteLoader! + - v99.99-pre-2658 Add cascadedTweaks. This will allow simple coexistence for any other mod framework using + the tweaker system as well. Hi Voxel and LiteLoader! + - v99.99-pre-2657 Merge pull request #247 from jk-5/patch-1 + Pull request for #232 + - v99.99-pre-2656 Update mcp data. fixes #248 + - v99.99-pre-2655 Fix coremod injection into main system. Should stop double-dipping coremods. + - v99.99-pre-2654 Merge pull request #645 from XCompWiz/bedspawn + Makes player-specific spawnpoints dimension aware + - v99.99-pre-2653 Makes player-specific spawnpoints dimension aware + Makes ServerConfigurationManager correctly get player-specific spawn + point for the target dimension + Changes EntityPlayer to store and save a (bed) spawn point for every + dimension, as well as transfer them to respawn "clones" + - v99.99-pre-2652 Re-gather list of Icons when atlas textures are stitched, allows for addition/removal of blocks/items after the atlas's inital constrction. + - v99.99-pre-2651 Fix enchantment effect on single pass items. Closes #644 + - v99.99-pre-2650 Merge pull request #642 from MinecraftForge/newliquid + New liquid system + - v99.99-pre-2649 Mark old liquid system as deperated to be removed next Minecraft release. + - v99.99-pre-2648 Merge remote-tracking branch 'refs/remotes/origin/newliquid' into newliquid + - v99.99-pre-2647 Merge branch 'master' into newliquid + - v99.99-pre-2646 Update ModLoaderFuelHelper.java + - v99.99-pre-2645 Updated FML: MinecraftForge/FML@54e06e841d1c8df24fc30e1ec3a51def67f58858 Move Resource refreshing until affter postInit. + - v99.99-pre-2644 Move Resource refreshing until affter postInit. + - v99.99-pre-2643 Add missing air checks to WorldGenTrees and ChunkCache Closes #593 + - v99.99-pre-2642 Fix compile errors temporarily, dont use till updated to new system. + - v99.99-pre-2641 Merge pull request #539 from richardg867/techne-1 + Techne model importer + - v99.99-pre-2640 Render pass sensitive version of Item.hasEffect, Closes #517 + - v99.99-pre-2639 Fix lether item rendering colors. + - v99.99-pre-2638 Add hook for EntityWither trying to destroy a block. + - v99.99-pre-2637 Merge pull request #600 from Lunatrius/rotation + Added rotation support for all vanilla blocks that can be rotated. + - v99.99-pre-2636 Fix domain issue with SoundPool entries. + - v99.99-pre-2635 Updated FML: + MinecraftForge/FML@7ce84491d1d4eada442944e02fc0e50c51f8045c Fix missing argument and startclient/startserver support. + - v99.99-pre-2634 Fix missing argument and startclient/startserver support. + - v99.99-pre-2633 Updated FML: + MinecraftForge/FML@155e8468180c93f1886a64028628764b1b22dd58 Add in support for mods/ as a mod location. Also drop coremods as a location. They go in mods too now. + MinecraftForge/FML@3f4bf61ae6757605b27078c7321de9f640876836 Update key + MinecraftForge/FML@4545beb49d5348d8632e42965627b9837115525b Add deobf-data to setup env. + MinecraftForge/FML@e24f94951741709329208f738000b72933302a24 Fix eclipse workspaces and launch configurations. + MinecraftForge/FML@532bee7ce1c4392ee11f0389d98f0c2be6240aa0 Update to new MCP bugfix version, Fixes: Missing Armor/Item rendering, and Boss health mapping issues. + - v99.99-pre-2632 Update to new MCP bugfix version, Fixes: Missing Armor/Item rendering, and Boss health mapping issues. + - v99.99-pre-2631 Fix eclipse workspaces and launch configurations. + - v99.99-pre-2630 Add deobf-data to setup env. + - v99.99-pre-2629 Include MANIFEST file from FML's universal.jar, makes the jar runnable now! + - v99.99-pre-2628 TEMPORARY fix for MCP mapping issue. + - v99.99-pre-2627 Update dev worksapce: Proper natives location and new server launch profile. + - v99.99-pre-2626 Update key + - v99.99-pre-2625 Add in support for mods/ as a mod location. Also drop coremods as a location. They go in mods too now. + - v99.99-pre-2624 Updated FML: + MinecraftForge/FML@6f0eedc9a64e4e246c40335e91b4868ad7f5a9e2 Fixed ClassCastException when loading ModLoader mods + MinecraftForge/FML@8844554da6d5d15756d7b0a9da2f5924006b3190 Merge pull request #243 from jrtc27/modclassloader + MinecraftForge/FML@7aa7221756d62ea1fbc750d7cf7acfdb28d75f2e Fix transformer search + MinecraftForge/FML@5f7df5e742cbc21565cee0d25709b5cb5462127c Revert "Keep these on our servers until the launcher is actually fixed -.-" + MinecraftForge/FML@ad79b9ed86eaf8c2702d79505d78a931c1774560 Fix up some deprecation warnings, and clean up coremod code that's going away. + MinecraftForge/FML@ba3707af22376f8f18103f63db56e4614a9c37db More javadoc cleanup + - v99.99-pre-2623 More javadoc cleanup + - v99.99-pre-2622 Fix up some deprecation warnings, and clean up coremod code that's going + away. + - v99.99-pre-2621 Revert "Keep these on our servers until the launcher is actually fixed -.-" + This reverts commit f1b533ad87ea08d6e62259c59779bcec1636e2fe. + - v99.99-pre-2620 Fix transformer search + - v99.99-pre-2619 Merge pull request #243 from jrtc27/modclassloader + Fixed ClassCastException when loading ModLoader mods + - v99.99-pre-2618 Attempt to gather lastBuild information to fix ChangeLog's off-by-one issue. + - v99.99-pre-2617 Move resource location resolution down to TextureAtlasSprite and allow for sprites that are not stitched. + - v99.99-pre-2616 Fixed ClassCastException when loading ModLoader mods + - v99.99-pre-2615 Start: f1b533ad87ea08d6e62259c59779bcec1636e2fe + End: f21cd286ca8e974b75536224a38cc0dacaca8454 + Updated FML: + MinecraftForge/FML@f21cd286ca8e974b75536224a38cc0dacaca8454 Resource packs, part two. FML mods are now resource packs. Vanilla will scan anything under 'assets' and turn it into a resource prefix. Use resourcelocations to look stuff up. + - v99.99-pre-2614 Resource packs, part two. FML mods are now resource packs. Vanilla will scan anything under 'assets' + and turn it into a resource prefix. Use resourcelocations to look stuff up. + - v99.99-pre-2613 Update ChestGenHooks for new Dungeon chest strcture. + - v99.99-pre-2612 Fix resource domain when loading icon. Textures should be located in /assets/{domain}/textures/{block|item}/{name}.png Same strcutre as before except 'assets' instead of 'mods'. + - v99.99-pre-2611 Update filler block to prevent useless console warning. + - v99.99-pre-2610 Make Block.setIconName public + - v99.99-pre-2609 Fix bound texture in Controls screen, Closes #631 and #629 + - v99.99-pre-2608 Updated FML: + MinecraftForge/FML@5a97d183dfb13b0f831172a1afef7407347ea7bc Remember to update your patches!!!! + MinecraftForge/FML@f1b533ad87ea08d6e62259c59779bcec1636e2fe Keep these on our servers until the launcher is actually fixed -.- + - v99.99-pre-2607 Keep these on our servers until the launcher is actually fixed -.- + - v99.99-pre-2606 Remember to update your patches!!!! + - v99.99-pre-2605 Updated FML: + MinecraftForge/FML@91ecf711092e1610dd10e77cdd517c3324e62d8d Fix -rel json + MinecraftForge/FML@efc369ee83a7b62f605c13e16efad66b63b4bd8c Fix EventHandler annotation. + MinecraftForge/FML@fbd57b32641b540d609314d91fd64350d50b9013 Mods are now loaded as resource packs. Vanilla will scan for valid prefixes based on subdirs of 'ass + ets' which can then be referenced as ResourceLocations with the ":path" notation. + - v99.99-pre-2604 Mods are now loaded as resource packs. Vanilla will scan for valid prefixes based on subdirs of 'assets' which + can then be referenced as ResourceLocations with the ":path" notation. + - v99.99-pre-2603 Fix EventHandler annotation. + - v99.99-pre-2602 Fix -rel json + - v99.99-pre-2601 Fix installer unintended replace. + Updated FML: + MinecraftForge/FML@9b6525e80504ff72a1798cf5797bf148295db776 Point scala downloads to our servers, Launcher doesn't like standard maven repos. + - v99.99-pre-2600 Point scala downloads to our servers, Launcher doesn't like standard maven repos. + - v99.99-pre-2599 Updated FML: + MinecraftForge/FML@29d6c875d0675ffa14428c511bd6ebe9232a486c Add FML Installer logo crated by @ZaverSLO https://twitter.com/ZaverSLO/status/349947190300508162 + MinecraftForge/FML@3d17434510e890574b68c8a181b80c830b5d043a Build installer package for the new client launcher. + MinecraftForge/FML@bf38d947569911dab03319a8b0f1964f36b195b2 Update json samples + MinecraftForge/FML@7037184a4e724300001dfc1f8df2e76a0ec30368 Fix up release JSON + MinecraftForge/FML@dc7d02ebf6c9fc5965344a9aeca79f230a40afb4 Fix json syntax error. + - v99.99-pre-2598 Release will now build a installer jar and use the standard 'target' output folder. + - v99.99-pre-2597 Update ToolMaterial enum helper. + - v99.99-pre-2596 Fix json syntax error. + - v99.99-pre-2595 Fix up release JSON + - v99.99-pre-2594 Update json samples + - v99.99-pre-2593 Build installer package for the new client launcher. + - v99.99-pre-2592 Add FML Installer logo crated by @ZaverSLO https://twitter.com/ZaverSLO/status/349947190300508162 + - v99.99-pre-2591 Merge pull request #627 from MinecraftForge/1.6 + Merge 1.6 branch + - v99.99-pre-2590 Update src distro installer script. Source distro works now! + - v99.99-pre-2589 Updated FML: + MinecraftForge/FML@1229c4c4ea888f4f69272eed94ef5a53ce79ccda Fix src distrabution, and got rid of pesky common folder in eclipse workspace. src is now installable. + MinecraftForge/FML@902772ed0cb6c22c4cd7ad9b0ec7a02961b5e016 Revert common folder fix, Common folder does nothing, feel free to delete it after first load. + - v99.99-pre-2588 Revert common folder fix, Common folder does nothing, feel free to delete it after first load. + - v99.99-pre-2587 Fix src distrabution, and got rid of pesky common folder in eclipse workspace. src is now installable. + - v99.99-pre-2586 Merge pull request #626 from MinecraftForge/1.6 + 1.6.1 Branch Merge + - v99.99-pre-2585 Try absolute path, to not confuse jenkins. + - v99.99-pre-2584 MinecraftForge/FML@7fecf2ad6bdd918149a3c43453f6a78bd11e5404 Update mcp URL. + - v99.99-pre-2583 Update mcp URL. + - v99.99-pre-2582 Deprecation sweep and update version to 8.9 to reflect 1.6.1 update. + - v99.99-pre-2581 Update release script to generate binary patches and include deobf data. + - v99.99-pre-2580 Updated FML: + MinecraftForge/FML@c418da353f6a8420b095fa737e8b0eae270d31ae Cleanup coremod code, server side working now. + - v99.99-pre-2579 Update GuiIngameForge to reflect Mojang changes in 1.6.1 + - v99.99-pre-2578 Add new launch configs to dev workspace. + - v99.99-pre-2577 Cleanup coremod code, server side working now. + - v99.99-pre-2576 1.6.1 Update + - v99.99-pre-2575 Support dirty submodules in changelog script. + - v99.99-pre-2574 Updated FML: + MinecraftForge/FML@110cf372eb5aa85df20b248976f1acdefa85e102 Add deobf data to merge-common, workspace is now actually runnable! + - v99.99-pre-2573 Add deobf data to merge-common, worspace is now actually runnable! + - v99.99-pre-2572 Updated FML: + MinecraftForge/FML@8960f6869fbe30d358a40997c47999025c3eae68 Add windows lzma executable http://tukaani.org/xz/ He states that most things are under public domai + n, But I couldn't find an exact reference to this executable. I'm going to assume it under public domain and distribuiting it here is fine. If not someone pleas + e direct me to the apropriate license and I will act accordingly. + MinecraftForge/FML@70cfe24e67adf6872ef1501599e2115e420c2539 Fix wrong project name in distro eclipse launch. + MinecraftForge/FML@7a004087f79b94bc92f29d50eb71288b6c1c968c Add deobf data to src dist. Dont create deobf jar as we ship the lzma Added *.lzma to .gitignore + - v99.99-pre-2571 Add deobf data to src dist. + Dont create deobf jar as we ship the lzma + Added *.lzma to .gitignore + - v99.99-pre-2570 Fix wrong project name in distro eclipse launch. + - v99.99-pre-2569 Add windows lzma executable + http://tukaani.org/xz/ + He states that most things are under public domain, But I couldn't find an exact reference to this executable. + I'm going to assume it under public domain and distribuiting it here is fine. If not someone please direct me to the apropriate license and I will act accordingly. + - v99.99-pre-2568 Updated FML: + MinecraftForge/FML@6a318ddb784ca8b2bef0f6718089f7beb4d404e0 Fix typo in new packages. + MinecraftForge/FML@3711da9c456d20865a965734cc5aeaf7f5cb5e5d Another typo + MinecraftForge/FML@e35e4b16ff3d6dea547c41f02f2ca31ebe1f74aa More fixups + MinecraftForge/FML@18371bd8c9bd107f774289da35519f593ccc8ee7 Some fixes for updated mcp code + MinecraftForge/FML@ef646d3146e1f285d2cb8e79a74373beffa84774 Merge branch '16launch' + MinecraftForge/FML@7406b38d8ad1bc5c2c641c74f1614b946f246588 1.6.1 + MinecraftForge/FML@12c928c538c1c04d3a21255c747d15468328ace9 Tweak commands patch + MinecraftForge/FML@3f15cd54c2d776ea161aaedbecad9e188d66578f Functional client @ 1.6.1 + MinecraftForge/FML@71a92de5d95fccc4fe17cc39d0836891c6622f4d Client launch for eclipse + - v99.99-pre-2567 Small fixup, need to Update GuiIngameForge for new HUD changes. + - v99.99-pre-2566 Client launch for eclipse + - v99.99-pre-2565 Functional client @ 1.6.1 + - v99.99-pre-2564 Tweak commands patch + - v99.99-pre-2563 1.6.1 + - v99.99-pre-2562 Merge branch '16launch' + - v99.99-pre-2561 Some fixes for updated mcp code + - v99.99-pre-2560 More fixups + - v99.99-pre-2559 Initial patch update to 1.6, Does not compile, need to update references to the old TexturePack system. + - v99.99-pre-2558 Update FML to 16launch branch + - v99.99-pre-2557 Update workspace for new library structure. + - v99.99-pre-2556 Another typo + - v99.99-pre-2555 Fix typo in new packages. + - v99.99-pre-2554 Push conf folder for 1.6, Relied heavily on a yet-unreleased version of MCP. + - v99.99-pre-2553 Added more render methods to IModelCustom interface. + - v99.99-pre-2552 Fixed both RenderAllExcept behaviours + - v99.99-pre-2551 More fixes, binpatching works + - v99.99-pre-2550 First draft of 1.6 update + - v99.99-pre-2549 New mappings for marker + - v99.99-pre-2548 Tweak missing mapping + - v99.99-pre-2547 Added tessellation methods to obj model, for ISBRH-friendliness + - v99.99-pre-2546 Add support for alternative maven servers in libraries. + Also download sources for public libraries, and atach them in eclipse. DOCUMENTATION!! YAYA! + - v99.99-pre-2545 Base GenDiff off deobf data's class list instead of the merged jar. Add option to delete target files that generate patches. + - v99.99-pre-2544 Add Clean Server/Client launcher. Update Start.java to new Main class and login system. + - v99.99-pre-2543 Update eclipse projects for new libraries dependancies, and update packages for new 1.6 classes. + - v99.99-pre-2542 Add suggestions output if it can. + - v99.99-pre-2541 Fixed update_packages.py for new folder strcture. + - v99.99-pre-2540 Add missing argument + - v99.99-pre-2539 Re-wrote/orginized a lot of fml.py. Almost everything is re-written/moved. + This is done in preperation for MCP to roll out SpecialSource support and the new 1.6 structure. + Also done for my sanity while reading through the code. + Intruduced a new function. If there is a 'mcp_data' folder in the FML folder, it will be copied to the MCP work directory after MCP is extracted. + It DOES overwrite anything that already exists. + This is intended for places like BuildServer to place libraries/assets to prevent them from needing to be downloaded every version. + Introduced a dev-env json. Need to write the eclipse workspace references to the new libraries. + Out custom json includes asm and legacylauncher. + Added proper OptionParsing to decompile.py + - v99.99-pre-2538 Add a simple property annotation system for mods. + - v99.99-pre-2537 Changed to the EventHandler annotation universally, documentation and stuff. + - v99.99-pre-2536 Fixes, so it builds again.. + - v99.99-pre-2535 Ignore binpatch + - v99.99-pre-2534 Add filter support for MCPMerger, and filter out libraries from the server's 'fat jar'. + - v99.99-pre-2533 Upgraded minecraft downloader to work with new launcher's asset/library system + New parameter: + --no-assets: Disables the downloading of minecraft's asset tree, recomended that build servers supply this flag to prevent downloading of useless data. + - v99.99-pre-2532 Add an InputStream constructor to WavefrontObject + It is said that Resource Packs will return InputStreams. And I like putting my models into texture packs which, obviously, give InputStreams rather than URLs. + - v99.99-pre-2531 Update OreDictionary.java + - v99.99-pre-2530 Add air check to Flint and Steel Ref: #602 + - v99.99-pre-2529 Fic Chest content gneeration delegate call. Cloases #609 + - v99.99-pre-2528 Bump Forge revision and mark recomended. + - v99.99-pre-2527 No more debug please + - v99.99-pre-2526 Fix build script. Add a sample JSON file. You'll need the newest Launcher code to run this. + - v99.99-pre-2525 More fixups for new launcher model + - v99.99-pre-2524 Merge in binpatch and use launcher + - v99.99-pre-2523 Add air checks to BlockSand falling and Piston pushing. Please report any other issues with custom 'Air' blocks in issue #602 + - v99.99-pre-2522 Added EntityLiving to Block.isLadder arguments, deperacating older version. New parameter has the possibility of being null, so modders must take care. Closes #608 + - v99.99-pre-2521 Merge pull request #607 from heldplayer/tripwires + Fix tripwire patches for solid side checks + - v99.99-pre-2520 Fix tripwire patches for solid sides + - v99.99-pre-2519 More tweaks + - v99.99-pre-2518 Server side tested and working. Setup is complex atm. That will change. + - v99.99-pre-2517 First cut of runtime binary patching. Needs some work to actually test it in a real scenario.. + - v99.99-pre-2516 Add stone and cobblestone to Ore Dictionary + - v99.99-pre-2515 Fix server patch FML update + Updated FML: + MinecraftForge/FML@22738de028a9ba51d43d73857dfb8969985566f0 Attempt to properly fix deadlock if the internal server derps. It should never hang now. Damn you fast computer.. + MinecraftForge/FML@05a854cd2af53ca822ee8b249b0b3bbe44f94675 Small tweaks to the mcp data. Nothing major.. + - v99.99-pre-2514 Small tweaks to the mcp data. Nothing major.. + - v99.99-pre-2513 Attempt to properly fix deadlock if the internal server derps. It should never hang now. Damn you fast computer.. + - v99.99-pre-2512 Make glass panes and iron fences connect to block sides based on solidity. This does change IBlockAccess, so anything with a custom IBlockAccess may need to implement the new method. + - v99.99-pre-2511 Forgot most important side, release script. + - v99.99-pre-2510 Fixed changelog generation. + - v99.99-pre-2509 Fix AIOOB exception in crash reporting if exception does not have a stack. Possible, but odd. + - v99.99-pre-2508 Add NPE protection to refernce to MinecraftServer.worldServer + - v99.99-pre-2507 Fix hoes being able to till dirt under other blocks, and made it look for air type blocks. + - v99.99-pre-2506 Fix Air block check in BlockPortal. + - v99.99-pre-2505 Add NPE protection to ItemStack delegates. Closes #601 + Also cleaned up the names of said delegates, we do not have to follow MCP's crowdsourced names as they are very bad. + Redirected damage through setItemDamage to allow items to have finder control of breaking. + - v99.99-pre-2504 Added rotation support for all vanilla blocks that can be rotated. + - v99.99-pre-2503 Disable ImageIO's File based cache, should speed up texturepack loading/stitching. + - v99.99-pre-2502 Updated FML: + MinecraftForge/FML@24c405665105a789a0708a7e30c8bcb96899da6b Add in an optional modid identifier for @SidedProxy. It's main use is when both scala and java @Mods reside in the same package, and you want the @SidedProxy behaviour for a specific @Mod language type. In general it should not be needed otherwise. + MinecraftForge/FML@cd0466395a8f1af3ec44f124bf4088df2d318603 Fix sysout with trailing messages after a newline + - v99.99-pre-2501 Fix sysout with trailing messages after a newline + - v99.99-pre-2500 Add in an optional modid identifier for @SidedProxy. It's main use is when both scala and java @Mods reside in the + same package, and you want the @SidedProxy behaviour for a specific @Mod language type. In general it should not be needed otherwise. + - v99.99-pre-2499 Merge branch 'master' into newliquid + - v99.99-pre-2498 Updated FML: + MinecraftForge/FML@6f3da9736531153629fb4213e3b2cae776bfb50a Don't throw an exception if the scala adapter find a java proxy. I may add some distinguishers to @SidedProxy so you know which mod it's for. + MinecraftForge/FML@59fe905695421a5be9370b0009ef794abaaf75bb Don't continue trying to send events to mods that depend on errored mods. + - v99.99-pre-2497 Don't continue trying to send events to mods that depend on errored mods. + - v99.99-pre-2496 Don't throw an exception if the scala adapter find a java proxy. I may add some distinguishers to @SidedProxy so you know which mod it's for. + - v99.99-pre-2495 Merge pull request #560 from jk-5/master + RenderGameOverlayEvent.Post ALL is not called in GuiIngameForge + - v99.99-pre-2494 Ignore registration of a object that is already registered. Preventing duplicate callback invocations. Thanks King_Lemming for pointing this out. + - v99.99-pre-2493 Add cache for ASM Event Handler bridge classes, should not need to redefine a class to invoke the same method on different instances. + - v99.99-pre-2492 Make changelog generation non-fatal untill we get jenkins issue figured out. + - v99.99-pre-2491 Fix isAir check to see if a portal can light. Should fix w/Railcraft and others + - v99.99-pre-2490 Patch village distance checking to use floats instead of ints, to avoid int wrapping + - v99.99-pre-2489 Fix arbitrary GUIContainer text coloring by forcing lighting to be disabled. Closes #594 + - v99.99-pre-2488 Merge branch 'master' of github.com:KingLemming/MinecraftForge into newliquid + Conflicts: + common/net/minecraftforge/common/network/ForgePacket.java + - v99.99-pre-2487 Updated FML: + MinecraftForge/FML@843a13c1ab1e3901160082fa63c557243fb64675 Try and clean up cycle detection output a bit + MinecraftForge/FML@82e9de8641c6a559eec711ea6d1e940d99cbc98f More tweaks to the mod sorting code + MinecraftForge/FML@ac97370f94d10beee5f021795cddda827c4411d4 Add in a pretty sorting error screen + MinecraftForge/FML@f1d68ed4c82cd28e50ec6a0befc55ff0165bfe08 Throw the sorting exception + MinecraftForge/FML@edc1fb24e2cad9badd2dd18ccccd590d77156e18 Send the "suspect list", and print the suspect versions + - v99.99-pre-2486 Send the "suspect list", and print the suspect versions + - v99.99-pre-2485 Throw the sorting exception + - v99.99-pre-2484 Add in a pretty sorting error screen + - v99.99-pre-2483 More tweaks to the mod sorting code + - v99.99-pre-2482 Try and clean up cycle detection output a bit + - v99.99-pre-2481 Forge Fluid System! + - v99.99-pre-2480 Fix potential GL issue when atlas animations bind textures without informating RenderEngine. + - v99.99-pre-2479 Cleanup Dimension Registration packet, generate takes no arguments, and added fix to world to prevent providers from overwriting the dimension ID. + - v99.99-pre-2478 Merge pull request #590 from bloodmc/master + Add support for servers to register dimensions on client. + - v99.99-pre-2477 Add support for servers to register dimensions on client. + In order to support multi-worlds such as MultiVerse, the server needs the + ability to register dimensions on client or many forge mods such as IC2 + will not function correctly. This has been an issue for MCPC which + provides both Forge and Bukkit support to players. By adding the + DimensionRegisterPacket class, MCPC now has the ability to send the + required packet to client to register a dimension with DimensionManager. + - v99.99-pre-2476 Introduced the framework for Forge's packet handler system. Heavily based off FMLPacket. + Packet splitting and reconstruction is handled. + - v99.99-pre-2475 Updated FML: + MinecraftForge/FML@3bf50c4bbe82f0cc317dafcf2a569cb5210bc738 Fix server side derp with Forge network packet handler + - v99.99-pre-2474 Fix server side derp with Forge network packet handler + - v99.99-pre-2473 Fixed creative tab rendering with invalid color closes #588 + - v99.99-pre-2472 Fix type in biome list. + - v99.99-pre-2471 Add forge network handling support + Updated FML: + MinecraftForge/FML@4922e90d81d8b8b9374c4d04858a06c5bf03965c Separate network mod config from setup. Allows for Forge Packet Handler nicety + - v99.99-pre-2470 Separate network mod config from setup. Allows for Forge Packet Handler nicety + - v99.99-pre-2469 Merge pull request #584 from Chicken-Bones/hitinfo + Add hitInfo field to MovingObjectPosition for when an int doesn't suffice + - v99.99-pre-2468 Fixed render count for stacks of blocks 40+ and distrabution of items based on scale. Closes #579 + - v99.99-pre-2467 Fix another NPE when Items are in Block range with custom renderers, Modders keep your items out of the block range! Closes #581 + - v99.99-pre-2466 Add hitInfo field to MovingObjectPosition for when an int doesn't suffice + - v99.99-pre-2465 Remember x & z passed to getTopSolidOrLiquidBlock and use it for foliage tests. Fixes #575 + - v99.99-pre-2464 Fix blending on the hotbar. Closes #574 + - v99.99-pre-2463 Add in a very simple stencil bit registry to try and arbitrate between mods wanting to use stencil bits in rendering + - v99.99-pre-2462 Updated FML: + MinecraftForge/FML@23b070c7d02a8da44bf04c2f9ba2b485a44ad967 Alternative @SidedProxy setter for Scala. + MinecraftForge/FML@2cca7aa759b4b6c3a128ce43bbd924e4762c43c2 Some more Scala @SidedProxy adjustments. Now properly supporting pure singletons, i.e. object C { @SidedProxy(...) var proxy: P = null } Removed fallback, as all such singletons are properly handled by the new code now, and class implementations fall back to the code also used for plain Java mods. + MinecraftForge/FML@8517a824e5251c409e05999d42fc6d70497609f5 Merge declaration and initialization of a variable. + MinecraftForge/FML@a3a920437f3ede6841ae2c449a38975b02b28088 Merge pull request #230 from fnuecke/master + - v99.99-pre-2461 Merge pull request #563 from Asajz/master + Default Quartz Ore Dictionary + - v99.99-pre-2460 Merge pull request #568 from hitchh1k3r/master + Furnace XP bug fix (fixed) + - v99.99-pre-2459 Merge pull request #571 from odininon/master + Addition: ItemStack sensitive canHarvestBlock + - v99.99-pre-2458 Merge pull request #565 from CovertJaguar/patch-1 + Possible NPE if the liquid isn't in the LD + - v99.99-pre-2457 Fix NPE when rendering EntityItems that are not blocks but int he block range. + - v99.99-pre-2456 Created an ItemStack sensitive version of canHarvestBlock. + - v99.99-pre-2455 Prevent water from dropping snowballs. + - v99.99-pre-2454 updated FurnaceRecipes.java.patch + - v99.99-pre-2453 Merge pull request #230 from fnuecke/master + Alternative setter logic for @SidedProxy in Scala classes/mods. + - v99.99-pre-2452 Fire EntityJoinWorled event for forced entities {Players and there mounts} as well, just ignore the cancelled value. + - v99.99-pre-2451 MinecraftForge/FML@787c0c4a6af3af60928b3a90f383a305a17a4347 Don't spit error on LWJGL not supporting 4.3 just warning. + Make custom item renderers attempt to use EQUIPPED type when running first person. For backwards compatiblity, will be removed in 1.6. + And a small change to make the 1.6 check not print it's stack trace. + - v99.99-pre-2450 Don't spit error on LWJGL not supporting 4.3 just warning. + - v99.99-pre-2449 Merge pull request #564 from purpleposeidon/patch-1 + Fix render bounding box of trapped double chests + - v99.99-pre-2448 Merge pull request #566 from jampot5000/patch-1 + Make getStencilBits static + - v99.99-pre-2447 Make getStencilBits static + Made getStencilBits static so it can be called. + - v99.99-pre-2446 Possible NPE if the liquid isn't in the LD + https://github.com/BuildCraft/BuildCraft/issues/787 + - v99.99-pre-2445 Move Partical rendering down in the order, after everything else. Should fix particals rendering behind water, digging process, and selection. + - v99.99-pre-2444 Fix render bounding box of trapped double chests + - v99.99-pre-2443 Added oreQuartz + Gives a default quartz Ore Dictionary (I know of at least 3 used by different mods that use Nether Quartz as an equivalent). + - v99.99-pre-2442 RenderGameOverlayEvent.Post(ALL) is now called in GuiIngameForge + - v99.99-pre-2441 Fixed NPE in rendering dragged items. + - v99.99-pre-2440 Attempt to allocate a 8-bit stencil buffer when creating Minecraft's display context. If that throws an error it will revert back to it's default values. + Also contains a method for modders to rereive how many bits the context was created with. Closes #552 + - v99.99-pre-2439 New RenderPlayer and RenderLiving events. Closes #493 + - v99.99-pre-2438 Changed to just plane entity for flexability. + - v99.99-pre-2437 EntityPlayer sensitive version of Item.isValidArmor, deprecated older version. Closes #551 + - v99.99-pre-2436 Merge declaration and initialization of a variable. + - v99.99-pre-2435 Some more Scala @SidedProxy adjustments. Now properly supporting pure singletons, i.e. + object C { + @SidedProxy(...) + var proxy: P = null + } + Removed fallback, as all such singletons are properly handled by the new code now, and class implementations fall back to the code also used for plain Java mods. + - v99.99-pre-2434 Alternative @SidedProxy setter for Scala. + - v99.99-pre-2433 Merge pull request #557 from pahimar/master + Expose the EntityLiving's combat tracker + - v99.99-pre-2432 Merge pull request #556 from micdoodle8/master + Separate EQUIPPED and EQUIPPED_FIRST_PERSON Item Render Types + - v99.99-pre-2431 Update forge_at.cfg + - v99.99-pre-2430 Capture and fire the PlaySoundAtEntity event for The client entity. Minecraft does some odd bypasses for no good reason. Thanks iPixile for reporting this. + - v99.99-pre-2429 Separate EQUIPPED and EQUIPPED_FIRST_PERSON Item Render Types + - v99.99-pre-2428 Updated FML: + MinecraftForge/FML@99bb50d8f8d27217ba58a41c802a504213e99461 Improved Entity Spawn Error + MinecraftForge/FML@c0cca7f41d5b080e39dd8d3d6cfc329295c822e6 Merge pull request #227 from CovertJaguar/patch-1 + MinecraftForge/FML@49111e9c5cffab49ec35f965801c3f0496f6def6 Add version detection to astyle and print error if it doesnt detect version 2.0+ + Also fixed astyle's config for max-instatement-indent that sometimes caused crashes with certian versions of astyle. + - v99.99-pre-2427 Add version detection to astyle and print error if it doesnt detect version 2.0+ + Also fixed astyle's config for max-instatement-indent that sometimes caused crashes with certian versions of astyle. + - v99.99-pre-2426 Merge remote-tracking branch 'refs/remotes/origin/1.5.2' + Conflicts: + common/net/minecraftforge/common/ForgeVersion.java + - v99.99-pre-2425 Bump version number for 1.5.2 + - v99.99-pre-2424 Merge pull request #550 from cadyyan/master + Build Script Error Handling Error + - v99.99-pre-2423 Merge pull request #227 from CovertJaguar/patch-1 + Improved Entity Spawn Error + - v99.99-pre-2422 Improved Entity Spawn Error + - v99.99-pre-2421 Fixed build error handling using invalid Python syntax. + - v99.99-pre-2420 Fixed hardcoding of MC version in debug text. + - v99.99-pre-2419 Updated FML: + MinecraftForge/FML@00f00b17bf0da262e6fe3e327ca2deedf7146305 Fix scalac detection to actually use the located command instead of defaulting to 'scalac' + - v99.99-pre-2418 Fix scalac detection to actually use the located command instead of defaulting to 'scalac' + - v99.99-pre-2417 Changelog generator will now bundle failed builds with the next successful build. Should make it look better and prevent the version numbers from being confusing. + - v99.99-pre-2416 Bump version to 7.7.2 so I can make a release. + - v99.99-pre-2415 Update to 1.5.2 PR. + MinecraftForge/FML@f0bba74a4748935ef3a715ae2f45feb75cc20376 Update for minecraft 1.5.2 + MinecraftForge/FML@62fdbad74c2507d147ecab56f56029135d88c6f5 Update MCP's md5 for the fixed srg files. + - v99.99-pre-2414 Update MCP's md5 for the fixed srg files. + - v99.99-pre-2413 Update for minecraft 1.5.2 + - v99.99-pre-2412 Merge pull request #543 from Chimaine/master + Fix unregistering of event listener + - v99.99-pre-2411 Replaced derpy tabs with spaces + - v99.99-pre-2410 Fixed ListenerListInst not being rebuild after unregistering a listener, causing calls to unregistered event listeners. + - v99.99-pre-2409 Merge pull request #542 from KingLemming/master + OreDictionary additions + ItemStack maxDamage hook + - v99.99-pre-2408 -Add vanilla Ores to the Ore Dictionary. No recipe replacement required. + -Add NBT-sensitive getMaxDamage() for ItemStack. + - v99.99-pre-2407 Attempted a fix for the changelog generation, should print all builds back to 1 now. + - v99.99-pre-2406 Updated FML: + MinecraftForge/FML@cf9b5b445ba284d389c7e32a03d9c8ef43469042 Don't leave scala running in interactive mode. + - v99.99-pre-2405 Don't leave scala running in interactive mode. + - v99.99-pre-2404 Updated FML: + MinecraftForge/FML@aa200923f0fe0c548faa4f103d803ade2e49d19d Fix patch derp. + - v99.99-pre-2403 Fix patch derp. + - v99.99-pre-2402 Updated FML: + MinecraftForge/FML@ddadf93ca1d648d88fdb61c9625cd675c3650ccd Fix when an old scalac is present on the system to not fail the build + - v99.99-pre-2401 Fix when an old scalac is present on the system to not fail the build + - v99.99-pre-2400 Fix rotation issue with non-block items. + - v99.99-pre-2399 ItemStack delegation to Item for damage values. + - v99.99-pre-2398 Try and be less noisy about world leaks + - v99.99-pre-2397 Updated FML: + MinecraftForge/FML@cfda7fc738ce6079f625a3822ebff5e7e0db5669 Fix URL for MCP + MinecraftForge/FML@781c68121626321e0efddaf4c4db9f1b8b5911db Some fixups for scala compilation in MCP. Scala should now be compilable and reobfuscatable with srgnames in MCP. + - v99.99-pre-2396 Some fixups for scala compilation in MCP. Scala should now be compilable and reobfuscatable with srgnames in MCP. + - v99.99-pre-2395 Fix URL for MCP + - v99.99-pre-2394 Updated FML: + MinecraftForge/FML@dcf069ca52738a7bb7bde01f1c7ebd2e06cd0ac6 Attempt to reduce lines on the screen for id mismatch. Hopefully prevents game crashes. + MinecraftForge/FML@58ba24add2a96bf4c079d5919f2d90dcc2f380e4 Fix possible NPEs in GameData + - v99.99-pre-2393 Fix possible NPEs in GameData + - v99.99-pre-2392 Attempt to reduce lines on the screen for id mismatch. Hopefully prevents game crashes. + - v99.99-pre-2391 Complete it, got the bug figured out + - v99.99-pre-2390 Techne model loader (incomplete for debugging) + - v99.99-pre-2389 Add forge/FML data to the f3 screen. + - v99.99-pre-2388 Updated FML: + MinecraftForge/FML@a3b5eaacfdd9218ef68d3dc064bba729b797cb3d Fix a small modloader compatibility derp: closes #222 + MinecraftForge/FML@677a6e578e84109702365da4a784f9a57d8c9957 Fix scala supporting SidedProxy. It should work now. + MinecraftForge/FML@334a76de75f2b417f04c23526c7e66ceb48e0de2 Update FMLDeobfuscatingRemapper.java + MinecraftForge/FML@42f1d8795599e0d1a516a1fdd7488a09b77e4565 Merge pull request #224 from Glought/master + MinecraftForge/FML@2dcabe01232b48009acbca6724565598761f561b Add a to string to fmlmodcontainer: should mean less derpy cyclic dependency data + MinecraftForge/FML@11ac46daebe901a6012a09ba5f6fe44af5b1be06 Fixing the GameRegistry. Now it is possible to register a Block with a BlockItem using following code: MyBlock myBlock = new MyBlock(); GameRegistry.registerBlock(myBlock, MyBlockItem.class, "myBlock"); where MyBlockItem class has one constructor with signature: public MyBlockItem(int id, Block block) + MinecraftForge/FML@c3fda11d100f9db7c32ef212ac37eade3e35d701 Merge pull request #225 from MarcinSc/master + - v99.99-pre-2387 Merge pull request #225 from MarcinSc/master + Suggested fix for issue 221 + - v99.99-pre-2386 Fixing the GameRegistry. Now it is possible to register a Block with a BlockItem using following code: + MyBlock myBlock = new MyBlock(); + GameRegistry.registerBlock(myBlock, MyBlockItem.class, "myBlock"); + where MyBlockItem class has one constructor with signature: + public MyBlockItem(int id, Block block) + - v99.99-pre-2385 Add a to string to fmlmodcontainer: should mean less derpy cyclic dependency data + - v99.99-pre-2384 Merge remote-tracking branch 'refs/remotes/origin/GuiIngame' + Conflicts: + patches/minecraft/net/minecraft/client/Minecraft.java.patch + - v99.99-pre-2383 Merge pull request #224 from Glought/master + Fix for Issue #223 + - v99.99-pre-2382 Update FMLDeobfuscatingRemapper.java + Fixes a "Type mismath:cannot convert from element type Object to FieldNode" error at line 176. + - v99.99-pre-2381 Allow spawning of Bonemeal particles even if block is not set. + - v99.99-pre-2380 Fix scala supporting SidedProxy. It should work now. + - v99.99-pre-2379 Fix a small modloader compatibility derp: closes #222 + - v99.99-pre-2378 Restore world unload event for client worlds Closes #531 + - v99.99-pre-2377 Fix replaceable checks to work on blocks with a non-replacable material, Closes #532 + - v99.99-pre-2376 Fix the BLOCK_3D render helper for items that aren't an instance of ItemBlock Closes #533 + - v99.99-pre-2375 Fix logic issue in CrashReportCategory patch, blame Jadedcat for sloppy quick patch. + - v99.99-pre-2374 Merge pull request #530 from Azanor/master + Fix for BiomeDictionary.getTypesForBiome throwing a ClassCastException when called. + - v99.99-pre-2373 getBiomesForType will cause the same problem + - v99.99-pre-2372 Fix for ClassCastException when attempting to fetch Biome types from BiomeDictionary + Attempting to fetch the BiomeDictionary types linked to a biome throws a ClassCastException. This fixes that + - v99.99-pre-2371 Simple block recolouring API: closes #525 + Fix up documentation on "rotation" API: it is up to the mod to decide interpretation of "rotation" for the mod/block. + - v99.99-pre-2370 Updated FML: + MinecraftForge/FML@b3d4ea05ec633fb1898e97febf786f1a3e420986 Fix possible NPE in findItemStack, closes #218 + - v99.99-pre-2369 Adds a field to the player for maximum health. Player.dat additions are present, getMaxHealth() needs a magic number for spawning. Closes #527 + - v99.99-pre-2368 Fix return value of EnchantPower hook, closes #518 + - v99.99-pre-2367 Forge now takes control of GuiIngame's renderGameOverlay, and spits out a ton of events to give modders control of how the screen is rendered. + Inital draft for community feedback. + - v99.99-pre-2366 New hook to allow Items to render Helmet overlays like pumpkins do. + - v99.99-pre-2365 Fix possible NPE in findItemStack, closes #218 + - v99.99-pre-2364 Updated FML: + MinecraftForge/FML@394f424185a044afcd6b31f400e731478171dd18 Fix to output versions in crash logs + MinecraftForge/FML@8f35adca7a41c280a4b63d4787f042f615966cac Use more expressive language when a version specifier is a simple unbounded above condition + - v99.99-pre-2363 Use more expressive language when a version specifier is a simple unbounded above condition + - v99.99-pre-2362 Fix to output versions in crash logs + - v99.99-pre-2361 Updated FML: + MinecraftForge/FML@5673c1dd2966536000c2b3f17f85131204c4a291 Add srgname to registerTileEntityWithAlternatives + MinecraftForge/FML@7aea09f4ca2f087d59ff6cb0de1c8e3e8b9ea4df Add type info to properly deobfuscate overloaded fields. Fixes #210. + MinecraftForge/FML@edffd04ed2e89ece75189f76b92ae47643ec92f8 Add in some caching of the read field descriptions for efficiency + MinecraftForge/FML@0daf1a6df4203d97be65a76a46550f6ad22ccc79 Merge branch 'agaricusb-fix-deobf-field' + MinecraftForge/FML@ada52078c75fdfa506a4287c112d01d9af961d5a Merge pull request #216 from agaricusb/add-srgname + - v99.99-pre-2360 Merge pull request #216 from agaricusb/add-srgname + Add srgname to registerTileEntityWithAlternatives + - v99.99-pre-2359 Merge branch 'agaricusb-fix-deobf-field' + - v99.99-pre-2358 Add in some caching of the read field descriptions for efficiency + - v99.99-pre-2357 Merge pull request #521 from ProgrammerHero/master + Fixed a bug that prevented proper lava generation near bedrock + - v99.99-pre-2356 fixed a bug that prevented proper lava generation near bedrock + - v99.99-pre-2355 Fix AIOOB in crash report stack trimming. + - v99.99-pre-2354 Add type info to properly deobfuscate overloaded fields. Fixes #210. + - v99.99-pre-2353 Add srgname to registerTileEntityWithAlternatives + - v99.99-pre-2352 Merge pull request #515 from pahimar/master + Fixes parsing faces for faces that do not have texture coordinate data + - v99.99-pre-2351 Missed a bit + - v99.99-pre-2350 Fix a derp in that we provision the various arrays for a face, even if we are not going to parse data into it. Solves NPEs for when obj models that don't have texture coordinates attempt to render. + - v99.99-pre-2349 Cave and Ravine gen will now take into account the Biomes top and foller block, allowing them to break the surface in modded biomes. Beaches, MushroomIslands and Deserts are exempt from this check to preserve vanilla world gen functionality. Closes #491 + - v99.99-pre-2348 Fix offset in AdvancedModelLoader. *doh* + - v99.99-pre-2347 Added a small method in the Block.java to specify the amount of enchanting power it can supply to an enchanting table. Closes #508 + - v99.99-pre-2346 Added NBT data to liquid stacks. Closes #501 + - v99.99-pre-2345 Add Item 'swing' callback for use when playing the arm swing animation. Closes #505 + - v99.99-pre-2344 Item callback for EntityItem update tick. Closes #426 + - v99.99-pre-2343 Delete sneaky extra file + - v99.99-pre-2342 Add in a generic factory interface, allowing for additional model support + to be added at runtime. + - v99.99-pre-2341 More interface work + - v99.99-pre-2340 Adding interface for other custom model format importers to implement + - v99.99-pre-2339 Switch out String.matches in favour of Pattern/Matcher usage, and a tad more documentation. + Fixed a bug in texture coordinate parsing (can have 2-3 values per entry, instead of the 3-4 I had before) + - v99.99-pre-2338 Wavefront object importer. Imports Wavefront object and offers some simple render methods for rendering the models in game. Modders have complete access to all the data in the model to write their own rendering related code as well. + - v99.99-pre-2337 Update MCP names to recent published names + Updated FML: + MinecraftForge/FML@1774e2bf3073c3449d1f289399971ad93a5b6479 MCP names update + - v99.99-pre-2336 Re-add and mark deprecated the old signature for ForgeHooksClient.getArmorTexture. + - v99.99-pre-2335 Deprecate preloadTexture, make it a no-op. Should stop derpiness with new + texturing system performance tweaks. + - v99.99-pre-2334 Updated FML: MinecraftForge/FML@4836b3272a9b292c62816c1d1f9e845486753839 Re-worked the Texture patches, optifine helper function, and re-added support fo + r dynamically rotating the texture for mod authors who do things horribly wrong. + - v99.99-pre-2333 Updated FML: + MinecraftForge/FML@a31607ae7d0214101679a1ecf1ae8032a5257eda Fix compilation derp, and clean up rotation helper. + - v99.99-pre-2332 Fix performance of texture uploads + Updated FML: + MinecraftForge/FML@00c788308881a07a683e17e2e9382313f3719b45 Very significant improvement in performance by using glSubImage to upload data. Inspired by frequent complaints about performance of hires texture packs. They probably still need a beefy system but should work. Hopefully I can figure out why the subImage GL side copy isn't working properly for an even more significant speed boost. But this gets things started. + MinecraftForge/FML@57ad221cc6d9605b9d521f86620c2a31f922ac24 And add the patches *sigh* + - v99.99-pre-2331 Optimize Texture loops a bit for non-rotated textures. Should help the FPS loss on higher resolution texture packs. If it becomes a major issue we may have to look into a more optimized animation system. + https://mojang.atlassian.net/browse/MC-13206 + - v99.99-pre-2330 Small bugfix in Stitcher that was preventing ti from fully filling the possible texture space. Should lower the amount of empty space in textures. + - v99.99-pre-2329 Small optimization for usages of Minecraft.getGLMaximumTextureSize(), only need to calculate it once. + - v99.99-pre-2328 Fix scoreboard saving bug caused by our fix of vanilla map saves. + - v99.99-pre-2327 Deprecate long dead interface that moved to FML. remvoe next MC version. + - v99.99-pre-2326 Updated FML: MinecraftForge/FML@1de89525cc2265bdce8704d9bd0d31c57bca4d97 Fixed issue with instalation when java/javac commands had quotes. + - v99.99-pre-2325 Updated FML: MinecraftForge/FML@704a70902fca3de620375116a33dccd3d6d576d0 Sanitize input to isRemappedClass to use '/' as a package seperator like the srg files. + - v99.99-pre-2324 New hook to allow Items to provide there own armor models. Closes #487 + - v99.99-pre-2323 This allows the result of the explosion to take into account metadata, + tile entities, or even to cancel it altogether. + Allowed block exploding to take into account tile entity and metadata + - v99.99-pre-2322 Untag NBTTagList.removeTag as client side only, allowing simple removal ont he server side. Closes #477 + - v99.99-pre-2321 Fix item deletion in creative menu for items that are the same id/meta but differnet NBT's. Closes #479 + - v99.99-pre-2320 Allow items to provide there own FontRenderer for there tooltips. Added for #463 + - v99.99-pre-2319 Clarify Factory call and Event Functionality + - v99.99-pre-2318 Added maxCanSpawnInChunk event to allow overriding of creature chunk spawn cap + - v99.99-pre-2317 MCP names update + - v99.99-pre-2316 Re-worked the Texture patches, optifine helper function, and re-added support for dynamically rotating the texture for mod authors who do things horribly wrong. + - v99.99-pre-2315 Fix compilation derp, and clean up rotation helper. + - v99.99-pre-2314 And add the patches *sigh* + - v99.99-pre-2313 Very significant improvement in performance by using glSubImage to upload data. Inspired by frequent complaints about performance of hires + texture packs. They probably still need a beefy system but should work. Hopefully I can figure out why the subImage GL side copy isn't working + properly for an even more significant speed boost. But this gets things started. + - v99.99-pre-2312 Fixed issue with instalation when java/javac commands had quotes. + - v99.99-pre-2311 Sanitize input to isRemappedClass to use '/' as a package seperator like the srg files. + - v99.99-pre-2310 Add function to remove categories from a configuration, indavidual properties can be removed using ConfigCategory.remove() Closes #462 + - v99.99-pre-2309 Pulled Biome Tag System by Emasher, Closes #433 + An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed. + A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it. + Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit. + - v99.99-pre-2308 Deprecate IArmorTextureProvider, moved to Item. And exposed more information to the function. Closes #365 + - v99.99-pre-2307 Add checking for 'ENUM$VALUES' in EnumHelper. Eclipse uses it's own internal compiler which does not follow the java standard of making the values field names $VALUES and private. Instead its public and ENUM$VALUES. Closes #502 + - v99.99-pre-2306 Updated FML: MinecraftForge/FML@570faeb790745c35403c67fabab57651b71da576 Added the ability to save transformed classes to disc for debugging. + - v99.99-pre-2305 Added the ability to save transformed classes to disc for debugging. + - v99.99-pre-2304 Revert MinecraftForge/MinecraftForge@f594109b30c87f5a0996eee9e8c4513380733cee If concurancy issues arise we will reassess. The provided solution caused entities to be removed incorrectly and cause 'invisible' entities client side. + - v99.99-pre-2303 Fix EntityPlayer passed to Bonemeal event. + - v99.99-pre-2302 Removed index bounds checking in some chunk functions, if you error blame Grum. + - v99.99-pre-2301 Fix off-by-one in rotated textures. + - v99.99-pre-2300 Fix vanilla texture bug causing rotated textures to be placed wrong. + - v99.99-pre-2299 Updated FML: + MinecraftForge/FML@8b8837c9ff635d4988e0a1504fca38667825daf0 Fix NPE when branding isn't present + - v99.99-pre-2298 Fix NPE when branding isn't present + - v99.99-pre-2297 Merge pull request #496 from Krapht/master + Remove a SideOnly that crashes server + - v99.99-pre-2296 Remove unneeded SideOnly. ref: Buildcraft/Buildcraft#710 + - v99.99-pre-2295 Removed obsolete patches + Updated FML: + MinecraftForge/FML@26ccb9106e443e664b0fdc1b95c3600b90ab2bc5 Change snooper/crash report brand handling. fmlbranding now loads another string! + MinecraftForge/FML@eff464cf0e656d92dfedf16e79e5cd6c36b9fc76 And the core patches for that + - v99.99-pre-2294 And the core patches for that + - v99.99-pre-2293 Change snooper/crash report brand handling. fmlbranding now loads another string! + - v99.99-pre-2292 Sanity check the item ID for loaded liquid stacks better. + - v99.99-pre-2291 Add in persistence code for LiquidTank. Using it should protect against liquids that get removed f.e. Closes #395 + - v99.99-pre-2290 Make liquidstacks immutable in their type data. Sorry about this, but it makes things a lot easier. + - v99.99-pre-2289 Fix up liquidstack so it knows about the texture sheet for it's icon + - v99.99-pre-2288 Fix AT file + - v99.99-pre-2287 Fix possible NPE in ChunkManager. Closes #478 in reality + - v99.99-pre-2286 Fix up some liquid logic + - v99.99-pre-2285 fix bug #489 from #429 + - v99.99-pre-2284 made BlockFluid.theIcon protected + - v99.99-pre-2283 Updated FML: + MinecraftForge/FML@0d844874124649099dbcbb9ae2b36719e1dda25f Fix up derp in access transformer + - v99.99-pre-2282 Fix hashCode + - v99.99-pre-2281 Fix up derp in access transformer + - v99.99-pre-2280 Use the liquid name in liquid stack persistence. Closes #429 + - v99.99-pre-2279 Updated FML: + MinecraftForge/FML@2bc6a0666f8a54f6b1fbc3398c6e3a385ecd35b5 Attempt to make any "default package" class public. This might fix problems with certain modloader mods that ship changes to vanilla classes. + - v99.99-pre-2278 Attempt to make any "default package" class public. This might fix problems with certain modloader mods that ship changes to vanilla classes. + - v99.99-pre-2277 Bump version number for 1.5.1 Note: We really need to do this more... + - v99.99-pre-2276 Fix NPEs when modders stupidly register null texture names. + - v99.99-pre-2275 Fixed issue with Event.hasAnnotation ignoring it's parameter. And cached its values for potential performance gain. Closes #482 + - v99.99-pre-2274 Damn you python and your tab obsession! + - v99.99-pre-2273 Changelog fixup + - v99.99-pre-2272 Re-enable changelog? Hopefully... + - v99.99-pre-2271 Merge branch 'mithionchanges' + - v99.99-pre-2270 Update patches! + - v99.99-pre-2269 Merge branch 'mithionchanges' + - v99.99-pre-2268 Merge branch 'mithionchanges' of github.com:Mithion/MinecraftForge into mithionchanges + Fix up code for minecraftforge style. Clean up patches. + Conflicts: + common/forge_at.cfg + patches/minecraft/net/minecraft/block/Block.java.patch + - v99.99-pre-2267 Updated FML: + MinecraftForge/FML@82bc9f1b35f5d51a722d294dd252e6bab4d54fa4 Add some information, and a log message letting you know it worked + - v99.99-pre-2266 Add some information, and a log message letting you know it worked + - v99.99-pre-2265 Updated FML: + MinecraftForge/FML@ede93d438f2b5fab92cd6a459247ca158354e430 Validate supplied stack size + MinecraftForge/FML@d73ac867df775174dafdd2da193fabd7c3e7407e Add a mechanism to dump the registry- useful for mod developers. + - v99.99-pre-2264 Add a mechanism to dump the registry- useful for mod developers. + - v99.99-pre-2263 Validate supplied stack size + - v99.99-pre-2262 Updated FML: + MinecraftForge/FML@5e1949eb0e3a43d3ec6c710289532d93f6819934 Clone the itemstack, and allow for passing in a stacksize + - v99.99-pre-2261 Clone the itemstack, and allow for passing in a stacksize + - v99.99-pre-2260 Updated FML: + MinecraftForge/FML@2d368c4c2eb6b4e0bb60757b6e1679c23aaad9db Itemstacks in the GameRegistry (manual registration by mods) + - v99.99-pre-2259 Itemstacks in the GameRegistry (manual registration by mods) + - v99.99-pre-2258 quick bugfix in entityenderman + reversed boolean check on event result + - v99.99-pre-2257 Ender Teleport Changes + Renamed Ender Teleport Event and added it in to ender pearls. + - v99.99-pre-2256 Enderman attackEntityFrom changed + Changed so that if the teleport fails upon being attacked, Endermen will + take damage as normal. + - v99.99-pre-2255 Enderman Teleport Event + New event when an enderman teleports that allows the teleport location + to either be modified or completely cancelled. + - v99.99-pre-2254 Access Transformer Changes + AT changes and corresponding class changes. + Additions (all made public): + EntityLiving.targetTasks + PotionHelper.potionRequirements + PotionHelper.potionAmplifiers + PotionEffect.duration + Potion.setIconIndex + Item.setPotionEffect + Block.blockHardness + Block.blockResistance + - v99.99-pre-2253 Add in block rotation support. It supports most vanilla blocks (hopefully), logs should be added soon. + - v99.99-pre-2252 Fix itemframe render bug + - v99.99-pre-2251 Fix AT config for texturemap + - v99.99-pre-2250 Player Flyable Fall Event + Adds an event to EntityPlayer that is posted on player fall when the + player has flight capabilities. + - v99.99-pre-2249 Brewing Stand Changes + Added an event on potion ingredient applied. Event contains the item + stacks of each of the potions being brewed as well as any remaining + ingredients. + Changed TileEntityBrewingStand and SlotBrewingStandPotion to look for + instanceof ItemPotion rather than potion.itemID + - v99.99-pre-2248 Entity Extended Properties Changes + Adds IExtendedEntityProperties interface, which specifies three methods + that are needed: Init, Save, and Load. + Adds the EntityConstructing event, which is called during the + constructor of Entity. It is needed there so that the reference is in + place during the ReadNBT call. + Adds hooks into Entity that allow registration of + IExtendedEntityProperties classes, as well as saving and loading to NBT. + - v99.99-pre-2247 Allow itemstack sensitive damage computation for attacks. Should allow + storing data in the nbt :) + - v99.99-pre-2246 Allow items to decide if they can or cannot have book enchantments applied + - v99.99-pre-2245 Updated FML: + MinecraftForge/FML@d9db27275ea06d37ae75e201140019ca152314b0 Fix mismatch screen a bit. Should render more correctly now and at least not be blank in a lot of circumstances.. + - v99.99-pre-2244 Fix mismatch screen a bit. Should render more correctly now and + at least not be blank in a lot of circumstances.. + - v99.99-pre-2243 Updated FML: + MinecraftForge/FML@d1ff1967b50f2ff2edf0b60acdb6508c0a3eeb06 Fixed FMLRelaunchLog's Newline Handling + MinecraftForge/FML@591a25722b36d2d1b200a31278cb8da117363f6b Merge pull request #208 from jrtc27/patch-1 + - v99.99-pre-2242 Merge pull request #208 from jrtc27/patch-1 + Fixed FMLRelaunchLog's Newline Handling + - v99.99-pre-2241 Fixed FMLRelaunchLog's Newline Handling + System.out.println("\n") causes currentMessage to start with a newline character, which means idx will always be 0 from then on. Therefore if idx is 0 messages must still be logged, otherwise no more messages sent to stdout will be logged and they will just accumulate in currentMessage. + - v99.99-pre-2240 Updated FML: + MinecraftForge/FML@f709ce757984b13acb7208d6d8fbdeaa83d2928d Fix missing block world rendering + MinecraftForge/FML@748eece456e079a21112a77047d004d4f410b170 Merge pull request #206 from mDiyo/patch-1 + MinecraftForge/FML@012a755bb9ce9737c843b0dfd86473d143b637be Fix up patch properly. Also, fix md5s for the jars. + - v99.99-pre-2239 Fix up patch properly. Also, fix md5s for the jars. + - v99.99-pre-2238 Merge pull request #206 from mDiyo/patch-1 + Fix missing block world rendering + - v99.99-pre-2237 Fix missing block world rendering + - v99.99-pre-2236 Merge MC 1.5.1 branch to master. + - v99.99-pre-2235 Merge MC 1.5.1 branch to master. + - v99.99-pre-2234 Updated FML: + MinecraftForge/FML@625da6492dddcaca8133718aeee97f9981ced623 Fix install.py --mcp-dir option. Fixes #204. + MinecraftForge/FML@687d3c059d054c338c25a489be206a9f3dc63d81 Merge pull request #204 from agaricusb/fix-mcpdir + - v99.99-pre-2233 Merge pull request #204 from agaricusb/fix-mcpdir + Fix install.py --mcp-dir option + - v99.99-pre-2232 MinecraftForge/FML@aaf02ea2ac938d8cbaafdd2f59985c0604d648d7 Updated for new PR client jar. + - v99.99-pre-2231 Updated for new PR client jar. + - v99.99-pre-2230 Fix install.py --mcp-dir option. Fixes #204. + - v99.99-pre-2229 Update to 1.5.1 Pre-Release: + MinecraftForge/FML@9565529baf77de27ed8b75be2065da3ba08d16c8 Updated to latest MCP and Minecraft 1.5.1 Pre-release. + MinecraftForge/FML@a573faf92def5dd01af380b3ca86de877c1178a2 Someone derped up this function bad, revert name. + - v99.99-pre-2228 Someone derped up this function bad, revert name. + - v99.99-pre-2227 Updated to latest MCP and Minecraft 1.5.1 Pre-release. + - v99.99-pre-2226 Updated FML: + MinecraftForge/FML@3c346247e1c5de12d4548f6a99349157057e2de6 Fix NPE with CoreMods who do not have the new MCVersion annotation. + - v99.99-pre-2225 Fix NPE with CoreMods who do not have the new MCVersion annotation. + - v99.99-pre-2224 Change placement of ChunkDataEvent.Save call to apply before sending to worker thread. + - v99.99-pre-2223 Updated FML: + MinecraftForge/FML@5cc90f060caace93c0bf041d3cc37208f425f623 Fix the logger to treat newlines better, hopefully. Closes #199 + MinecraftForge/FML@5e3af8ac0e18cfa3a92f9ba726ec1a6b55e87d97 Use the relaunch log, for class circularity safety. + MinecraftForge/FML@ce949e6099fe2a63ee6774acd6e55aa55d3b3673 Support simple mc version test in coremods, only effective through jar loading. Also, log some more data about the environment. + - v99.99-pre-2222 Support simple mc version test in coremods, only effective through + jar loading. + Also, log some more data about the environment. + - v99.99-pre-2221 Use the relaunch log, for class circularity safety. + - v99.99-pre-2220 Fix the logger to treat newlines better, hopefully. Closes #199 + - v99.99-pre-2219 New TextureStitchEvents called before and after a TextureMap gathers and stitches textures together. + Also added a config option to diable the writing of resulting stitched textures to disc. Default disables the writing. + - v99.99-pre-2218 Updated FML: + MinecraftForge/FML@24022ab6ba79e4babb57fc0db893c23d4aec85bc Added comments to note FML-only methods + MinecraftForge/FML@8905237306230a33e2a3bab7a2b6f7a8b42d94e4 Merge pull request #200 from bspkrs/patch-2 + MinecraftForge/FML@577b19c1cf12a354112e829fb5704c32fd6cd0a5 Fix potential NPE in class loading and add extra debug information. + - v99.99-pre-2217 Fix potential NPE in class loading and add extra debug information. + - v99.99-pre-2216 Fix placing of certian items on Redstone Blocks. + - v99.99-pre-2215 Fix equipment slots for items when right clicked, and dispensed using a dispensor. + - v99.99-pre-2214 Fix logic inversion that allowed SnowMen to create snow on hoppers. + - v99.99-pre-2213 Prevent pistons from generating snowballs. + - v99.99-pre-2212 Merge pull request #460 from LepkoQQ/master + Shaped Ore Recipe mirroring issue + - v99.99-pre-2211 Fix multipass item rendering so that it uses the right spritesheet for the item. + - v99.99-pre-2210 Fix ShapedOreRecipe checking mirrored recipes + - v99.99-pre-2209 Merge pull request #459 from ChildWalrus/sleep + Made some sleep-related fields public to allow fixing of sleeping bug in new dimensions + - v99.99-pre-2208 Fix Activator rails activating TNT carts, closes #458 + - v99.99-pre-2207 Merge pull request #455 from Corax/patch-1 + Update ForgeDummyContainer.java + - v99.99-pre-2206 Made WorldServer.allPlayersSleeping public + Made EntityPlayer.sleepTimer public + Sleep changes + - v99.99-pre-2205 Merge pull request #200 from bspkrs/patch-2 + Added comments to note FML-only methods + - v99.99-pre-2204 Updated FML: + MinecraftForge/FML@c5d5f4e5164111c5ae63e8de7ce97cc583d73e6e Fix AllPublic access transformer not affecting methods. Should fix modloader compatibility + - v99.99-pre-2203 Fix AllPublic access transformer not affecting methods. Should fix modloader + compatibility + - v99.99-pre-2202 Update ForgeDummyContainer.java + - v99.99-pre-2201 Added comments to note FML-only methods + - v99.99-pre-2200 Updated FML: + MinecraftForge/FML@4762d4d8ef00bd789ffb6bccbd12f7478b07da62 Allocate more ram {typically 256 is defailt} to fermflower, should fix decomplication issues on OSX + MinecraftForge/FML@6370c242f0e1cb8ec80c7dccc1133cb0d0607bae OS X's python 2.6.1 has a bug in zipfile.extractall that makes it unzip directories as regular files. So switch to extract + - v99.99-pre-2199 OS X's python 2.6.1 has a bug in zipfile.extractall that makes it unzip directories as regular files. So switch to extract + - v99.99-pre-2198 Allocate more ram {typically 256 is defailt} to fermflower, should fix decomplication issues on OSX + - v99.99-pre-2197 Remove the block if TE errors. + - v99.99-pre-2196 Add config toggle to atempt to remove TileEntities and Entities that error during there update without fully crashing the server, use at your own risk. Closes #424 + - v99.99-pre-2195 Updated FML: + MinecraftForge/FML@8f2dbf7046f52d836993edb946d7d310b399bf9d Fix up stupid derp in IMC code: actually reset the IMC list after each delivery. Fixes a bunch of mods. Sorry everyone. + - v99.99-pre-2194 Fix up stupid derp in IMC code: actually reset the IMC list after + each delivery. Fixes a bunch of mods. Sorry everyone. + - v99.99-pre-2193 Merge pull request #449 from iChun/patch-5 + [Bugfix] One should not assume an item would use the item spritesheet. + - v99.99-pre-2192 Fix for nether quartz not generating in the nether, Closes #454 + - v99.99-pre-2191 Fix RedstoneBlock power issues, Closes #452 + - v99.99-pre-2190 Fix bug with rendering one too many passes for ItemEntities Closes #450 + - v99.99-pre-2189 Deprecation Sweep in DungeonHooks and fixed wildcard in ChestGenHooks remove function. + - v99.99-pre-2188 [Bugfix] One should not assume an item would use the item spritesheet. + Item class has a func to return an int to use terrain.png or items.png. This makes forge take account of it. + - v99.99-pre-2187 Fix missed wildcard change in OreDictionary closes #448 + - v99.99-pre-2186 Add call to EntityLiving when counting entities for Spawning Cap. Closes #447 + - v99.99-pre-2185 Move the RenderWorldLastEvent back to before renderHand like it was in 1.4 Closes #444 + - v99.99-pre-2184 Fix RenderItem to work with items that use the terrain texture map that aren't in the block ID range. Close #443 + - v99.99-pre-2183 Fix crash when EnumHelper can't find $VALUES field, log info, and return gracefully. + - v99.99-pre-2182 Updated FML: + MinecraftForge/FML@23ea835fa7bc0cdb466d058814b5a0e0c67e8c9a Pass obfuscation status to coremods + - v99.99-pre-2181 Pass obfuscation status to coremods + - v99.99-pre-2180 Updated FML: + MinecraftForge/FML@d88db6c0cfd5484428b574889eae02d34535beae Fix up deep tree deobfuscation + - v99.99-pre-2179 Some tweaks to the liquid dictionary, to allow for canonical liquid stacks for things like rendering + - v99.99-pre-2178 Fix up deep tree deobfuscation + - v99.99-pre-2177 Updated FML: + MinecraftForge/FML@7b722bfcd6d4c6867d15492c293a455dfd50d272 Update MCP for latest PR silent update. + MinecraftForge/FML@c6dab815f4e036e25b8f56bef7b8ee63f838adb4 Missed joined.exc, must fix scripts. + - v99.99-pre-2176 Missed joined.exc, must fix scripts. + - v99.99-pre-2175 Update MCP for latest PR silent update. + - v99.99-pre-2174 Removed get/setTextureFile from Block, nolonger used. + - v99.99-pre-2173 Updated FML: + MinecraftForge/FML@a90504315e928915345c7b04972d912cdaa0bfdb Readjust size of mods button when Minecraft Realms button is enabled. + - v99.99-pre-2172 Readjust size of mods button when Minecraft Realms button is enabled. + - v99.99-pre-2171 Fix the oredictionary for the new recipe wildcard value of Short.MAX_VALUE. + - v99.99-pre-2170 Updated FML: + MinecraftForge/FML@3765ceb02d783ae5156976f3165bafdb6a3ddbb3 Update MCP, fixes the "broken texture packs" problem. + - v99.99-pre-2169 Update MCP, fixes the "broken texture packs" problem. + - v99.99-pre-2168 Updated FML: + MinecraftForge/FML@dab22f5b74f3f2a410e20583f811605dc8e3c05f Fix "0 mods" display when installed in forge. + - v99.99-pre-2167 Fix "0 mods" display when installed in forge. + - v99.99-pre-2166 Updated FML: + MinecraftForge/FML@179c504746910d4196eef3ee2d56f63cf585c983 Simplify logic in tick start/end + MinecraftForge/FML@29edd242cd7a1fadedf4fb874ea8bbd4e643bffa Fix coremods without a manifest crashing the game. Closes #181 + MinecraftForge/FML@ac16845fc4661fa046a252eda7f9a9a847940189 Fix demo mode crash. Closes #187 + MinecraftForge/FML@984291cee91f585a6f4300eedfed882c814843f8 Fix supertype parsing to handle null superclass (Hi Object!). Closes #160 + MinecraftForge/FML@f6479299936f0f94cfc43210dd9dd44b8b5350ef Merge branch 'master' of github.com:Uristqwerty/FML + MinecraftForge/FML@b301e8e4c1877be246fd4f0b45085b70773d8f2b Change type of connection queue to a concurrent linked queue. Much more efficient, hopefully. Closes #189 + - v99.99-pre-2165 Change type of connection queue to a concurrent linked queue. Much more efficient, hopefully. Closes #189 + - v99.99-pre-2164 Merge branch 'master' of github.com:Uristqwerty/FML + - v99.99-pre-2163 Fix supertype parsing to handle null superclass (Hi Object!). Closes #160 + - v99.99-pre-2162 Fix demo mode crash. Closes #187 + - v99.99-pre-2161 Fix coremods without a manifest crashing the game. Closes #181 + - v99.99-pre-2160 Updated FML: + MinecraftForge/FML@591e65fa1aa52d2a72dc527ad1c2ac53c8eb94c4 Revert "Use the reobfuscation maps in the reflection helper for field lookups: should help some reflection cases with the deobf." + MinecraftForge/FML@2a779ec3289f695b477ec6b0822a27801e2deba1 Try a different way of remapping the fields. Should work because it's userspace, not relauncher space + MinecraftForge/FML@ca2d8bd83475f37946b86cf6fabd8ff810f9c2bf Fix reflection helper: it needs to unmap the classname to find the field maps. + - v99.99-pre-2159 Fix reflection helper: it needs to unmap the classname to find the field maps. + - v99.99-pre-2158 Try a different way of remapping the fields. Should work because it's userspace, not relauncher space + - v99.99-pre-2157 Revert "Use the reobfuscation maps in the reflection helper for field lookups: should help some reflection cases with the deobf." + This reverts commit 485db6be2e6b54a9a523a2b06e0d886792b0826a. + - v99.99-pre-2156 Updated FML: + MinecraftForge/FML@485db6be2e6b54a9a523a2b06e0d886792b0826a Use the reobfuscation maps in the reflection helper for field lookups: should help some reflection cases with the deobf. + - v99.99-pre-2155 Use the reobfuscation maps in the reflection helper for field lookups: should help some reflection cases with the deobf. + - v99.99-pre-2154 Updated FML: + MinecraftForge/FML@25f3fcad4654d19637878bdfb2b70a9586fb3fc9 Fix up some relauncher stuff: the vanilla applet works now, as do other applets. Deobf data is resolveable for them too. + - v99.99-pre-2153 Fix up some relauncher stuff: the vanilla applet works now, as do other applets. Deobf data is resolveable for them too. + - v99.99-pre-2152 Updated FML: + MinecraftForge/FML@6bf7c9878cc959d5f5fa8ec0bf9d0d75037df882 Fixed srg name of minecraftDir for runtime deobf. + - v99.99-pre-2151 Fixed srg name of minecraftDir for runtime deobf. + - v99.99-pre-2150 Updated FML: + MinecraftForge/FML@95d0ff18cdca3b5a91b648c847c00f559f8ce6f2 Fix runtime deobfuscation for remapped inner classes + - v99.99-pre-2149 Fix runtime deobfuscation for remapped inner classes + - v99.99-pre-2148 Refresh patch + - v99.99-pre-2147 Updated FML: + MinecraftForge/FML@86a9c7d35953296f7c8bd3a2b1b43115ef0f9308 Fixup reobfusication of server code if present. + MinecraftForge/FML@8e7956397dd80902f7ca69c466e833047dfa5010 Just enable server side compile, and warn not to complain tous. + MinecraftForge/FML@889efc1c0a9216b55f6de275e4f4a279d977e60c Fixes GameRegistry.registerBlock + MinecraftForge/FML@fe1623a36a1bb8b0a046d833e896fd46d88898ef Merge pull request #195 from RainWarrior/snapshot15 + MinecraftForge/FML@62f5adf8e21d59408af409a88b2c81757fd3c587 Revert "Fix modlist to use the new texture binding functions, i think" + MinecraftForge/FML@58ee06ea8edf508daa4ab3920790c0153cf6660d Some fixes for the snapshot + MinecraftForge/FML@368a2245ef0071b0b7a35d3bd78ab1ae379f8faf Merge branch 'snapshot15' + MinecraftForge/FML@1eba1dfdc00edf12ca3d8586dc342563218fc717 Fix accidental commands.patch overwrite + MinecraftForge/FML@ebdb166ec87e63503f0071e557cdb44629a0e0c2 Merge branch 'snapshot15' + MinecraftForge/FML@450dd8313c2e9e46d173bbd242f84d48266af7c8 Fix up some small things, merging into mainline + MinecraftForge/FML@1642bad402efe819f4e763bf4b460d8c04194849 Fix Multi-part entity children ID issue, mobs with custom spawning must deal with child ids themselves. + - v99.99-pre-2146 Fix Multi-part entity children ID issue, mobs with custom spawning must deal with child ids themselves. + - v99.99-pre-2145 Merge remote-tracking branch 'origin/snapshot15' + - v99.99-pre-2144 Fix up some small things, merging into mainline + - v99.99-pre-2143 Merge branch 'snapshot15' + - v99.99-pre-2142 Fix accidental commands.patch overwrite + - v99.99-pre-2141 Merge branch 'snapshot15' + - v99.99-pre-2140 Some fixes for the snapshot + - v99.99-pre-2139 Revert "Fix modlist to use the new texture binding functions, i think" + This reverts commit 48544db690bf213a322954b7bd39cb3a8ca59bb1. + Conflicts: + client/cpw/mods/fml/client/GuiModList.java + - v99.99-pre-2138 Merge pull request #195 from RainWarrior/snapshot15 + Fixes GameRegistry.registerBlock + - v99.99-pre-2137 Fixes GameRegistry.registerBlock + - v99.99-pre-2136 Fix reobf call. + - v99.99-pre-2135 Early define CrashReport classes to combat invalid crash details. + - v99.99-pre-2134 Updated FML: + MinecraftForge/FML@f1c6bdd57d41a938cb3326d509042f6842e42396 Support the MCP format of partial reobfuscation for portability. Ensure modloader-like compatibility + MinecraftForge/FML@0419b9d9751ade4497343aefaf2ca43703eb479a Update MCP info for latest + - v99.99-pre-2133 Update MCP info for latest + - v99.99-pre-2132 Support the MCP format of partial reobfuscation for portability. Ensure modloader-like compatibility + - v99.99-pre-2131 Deprecated Forge's ISidedInventroy, there is a vanilla solution. Added temporary config option to legacy furnace slot orientation. + - v99.99-pre-2130 Fix typos. + - v99.99-pre-2129 Updated to 1.5 Pre-release + Updated FML: + MinecraftForge/FML@2d98835db8c6a7665ef55117d60ab4318876836b Scala support! It's still primitive, I hope that people will like it. I do :) + MinecraftForge/FML@5bfaf7c1700191b6ed8f4752c9a95bf8c25323ef Global object registry, also, support the new itemblockwithmetadata constructor + MinecraftForge/FML@80a40c03e644840d827eb7d67ff97f6558eaa2e4 Update to MCP 1.5 and minecraft 1.5. + MinecraftForge/FML@b3e854a15d7c50b4967be8237df5fdace95a15ee Update for new MCP with srg reobf. + - v99.99-pre-2128 Update for new MCP with srg reobf. + - v99.99-pre-2127 Update to MCP 1.5 and minecraft 1.5. + - v99.99-pre-2126 Global object registry, also, support the new itemblockwithmetadata constructor + - v99.99-pre-2125 Scala support! + It's still primitive, I hope that people will like it. I do :) + - v99.99-pre-2124 Updated FML: + MinecraftForge/FML@e9ff699c2dcd787a3e0ebaa427c625a48de4c9fb Refresh the renderengine after modloading is complete. Should fix issues with out-of-place texture registration by mods. + MinecraftForge/FML@a723aa68606d57b0ee5bac8b1d1905abef440b54 Refresh copyright notices on everything + MinecraftForge/FML@c42a2101408b21799728c88e2d02c718c3b0dd36 Strip deprecated code + MinecraftForge/FML@6eeae8c49ff4359dc21c44eb73e4e043285cd8bf Fix up state transition derp when the server crashes with an error- it shouldn't double-derp + MinecraftForge/FML@81c6421f84c1bff359dfe927974e8730b348806a Tweak license text- any osi licensed project can use the asm transformer code + - v99.99-pre-2123 Clean up Access Transformer mapping data + - v99.99-pre-2122 Tweak license text- any osi licensed project can use the asm transformer code + - v99.99-pre-2121 Fix up state transition derp when the server crashes with an error- it shouldn't double-derp + - v99.99-pre-2120 Strip deprecated code + - v99.99-pre-2119 Refresh copyright notices on everything + - v99.99-pre-2118 Refresh the renderengine after modloading is complete. Should fix issues with out-of-place texture registration by mods. + - v99.99-pre-2117 Make release quit on compile error. + - v99.99-pre-2116 Fix compile error, forget to flush to disc. + - v99.99-pre-2115 Readd second render pass to TileEntities and Entities, patches were missed when merging in master branch. As note, CB can DIAF. + - v99.99-pre-2114 Add an Icon to the LiquidStack, for rendering the liquid in various ways + - v99.99-pre-2113 Updated FML: + MinecraftForge/FML@abe4f73a9a3158f6f9d1ea2334798f54a25817bf FIX massive performance issue with FML. Thanks to @sfPlayer1 for finding this epic derp on my part! + - v99.99-pre-2112 FIX massive performance issue with FML. Thanks to @sfPlayer1 for finding + this epic derp on my part! + - v99.99-pre-2111 let's do it right this time. Hmmm + - v99.99-pre-2110 Call stitcher for non-existent textures as well. Probably allows + for generated textures. Hmmm + - v99.99-pre-2109 Updated FML: + MinecraftForge/FML@debbdc00be8ea1a261cdff83785ddc7100419a74 Capture Minecraft logs into FML logging + MinecraftForge/FML@74fffc6fdc2eda8caa9a7feb0826d7babb84751a Update next render to 40 + - v99.99-pre-2108 Fix ItemSeedFood respecting custom soils. + - v99.99-pre-2107 Removed erroring imports and update build function to die on errors. + - v99.99-pre-2106 New world event for controlling potential entity spawnlists. For #430 + - v99.99-pre-2105 Update next render to 40 + - v99.99-pre-2104 Capture Minecraft logs into FML logging + - v99.99-pre-2103 Add callback on TextureStitched to control texture loading. + - v99.99-pre-2102 Add helper functions for deling with custom TextureStitched + - v99.99-pre-2101 Fix animation location for textures with domains + - v99.99-pre-2100 Updated FML: + MinecraftForge/FML@aed2cc446ad8d5882890c5f218eb894ea7bd2577 Force file name encoding to UTF-8, caused different zips on different systems. + - v99.99-pre-2099 Force file name encoding to UTF-8, caused different zips on different systems. + - v99.99-pre-2098 Fixed new python changes. + - v99.99-pre-2097 Rework configuration, configs should now use Config.hasChanged to deterne if thehould call save(), also re-worked the saving to not use String.format as much. + - v99.99-pre-2096 Copy over some needed files for debugging. + - v99.99-pre-2095 Update submodule + - v99.99-pre-2094 Change FML module to read-only connection. + - v99.99-pre-2093 Update python scripts to reflect that FML is now a submodule. Delete updateasmdata as it's in /fml/ now. Build should work once again. + - v99.99-pre-2092 Remove window helper batch files. + - v99.99-pre-2091 Removed GNUWin32 files and uneeded files seince FML is now a submodule. + - v99.99-pre-2090 Added submodule changelog ganerator: + Updated FML: + MinecraftForge/FML@e74087ee430633475c3ca058e54e3ef242a9d6aa Ignore again, testing submodule. + - v99.99-pre-2089 Testing selective commit of submodule. + - v99.99-pre-2088 Ignore again, testing submodule. + - v99.99-pre-2087 Ignore this commit. + - v99.99-pre-2086 Add in simple texture management for mods using the stitcher. Scope with "{domain}:{texture}" to + get textures that are not at /textures//{texture}.png but /mods/{domain}/textures//{texture}.png + instead + - v99.99-pre-2085 Fix up patches for FML, also, add in FML as a submodule rather than a zip + - v99.99-pre-2084 Ignore deobf data + - v99.99-pre-2083 Force the joined.srg timestamp to zero- avoids annoying sha1 differences + - v99.99-pre-2082 Don't enforce signatures on minecraft classes + - v99.99-pre-2081 Update MCP URL for snapshot + - v99.99-pre-2080 Fix up runtime deobfuscation. Working well now. + - v99.99-pre-2079 Build, and use, MC versioned deobfuscation data + - v99.99-pre-2078 Merge branch 'runtimedeobf' into snapshot15 + - v99.99-pre-2077 Add in build for deobf data zip file, update for official mcp 7.39 + - v99.99-pre-2076 Updated Forge to s13w09c + - v99.99-pre-2075 Fix exc for renamed Behavior classes. + - v99.99-pre-2074 Actually remove classes from the csv when removed, and moved All EntityMinecart entities to net.minecraft.entity.item + - v99.99-pre-2073 Delete unneeded patch + - v99.99-pre-2072 Readd ignore for argo and bouncycastle, needed for our replacement to work properly. + - v99.99-pre-2071 Update FML to 1.5 snapshot 13w09c + - v99.99-pre-2070 Tweaks to runtime deobf + - v99.99-pre-2069 Update distribuited eclipse's classpath for updated libraries. + - v99.99-pre-2068 Not supposed to have debug stuff... + - v99.99-pre-2067 Sync up with FML, Will not run nativly as you need deobfusication_data.zip in your libs folder. + We have not setup the download for that yet, to make it yourself just zip joined.srg name it deobfusication_data.zip and put it in lib + - v99.99-pre-2066 Fix crash in GuiModList for mod logo files, logo is not rendering for unknow reason. + - v99.99-pre-2065 Fix bug in rename_vars where certian items would fail to be renamed. + - v99.99-pre-2064 Merge branch 'master' into snapshot15 + Conflicts: + fml-src-1.4.7-4.7.22.539-master.zip + fml-src-1.4.7-4.7.35.556-master.zip + fml-src-13w02b-4.99.16.541-snapshot15.zip + - v99.99-pre-2063 Merge commit '695b080197bd577cc34fe6dbc72b74f4a74b2d5c' into snapshot15 + Testing cherry picking. + - v99.99-pre-2062 Just enable server side compile, and warn not to cmplain to us. + - v99.99-pre-2061 Fixup reobfusication of server code if present. + - v99.99-pre-2060 Tweak IASM hook api. You can return multiple classes now. + - v99.99-pre-2059 Merge branch 'runtimedeobf' into snapshot15 + - v99.99-pre-2058 Change readFully to actually read a bunch of bytes at once now. Thanks to nallar and aartbluestoke for the suggestion to + revisit this.. + - v99.99-pre-2057 Clean up more junk + - v99.99-pre-2056 Update libs for 1.5. Lots of new libs. + - v99.99-pre-2055 Fix renderengine patch *sigh* + - v99.99-pre-2054 Merge branch 'master' into snapshot15 + Conflicts: + patches/minecraft/net/minecraft/client/renderer/RenderEngine.java.patch + - v99.99-pre-2053 Merge branch 'master' into snapshot15 + Conflicts: + client/cpw/mods/fml/client/TextureFXManager.java + - v99.99-pre-2052 Fix TESR culling for beacons, and implement a good enough measure for Chests. + - v99.99-pre-2051 Bump version to 6.6.2, declaring Forge for MC 1.4.7 feature complete, as 1.5 is on the horizon, only bug fixes from this point on. Unless something major happens on Mojang's end. + - v99.99-pre-2050 Add water and lava to liquid dictionary by default, closes #419 + - v99.99-pre-2049 Store the glMultiTexCoord lightmap for later use with glDrawArrays closes #406 + - v99.99-pre-2048 Added unload event for client worlds Closes #405 + - v99.99-pre-2047 WorldGen*Trees shoud not respect custom soils. Closes #355 + - v99.99-pre-2046 ItemStack sensitive versions of Item.getPotionEffect and Item.isPotionIngredient Closes #321 + - v99.99-pre-2045 clarify what the size is measured in for the dormant chunk cache. -.- + - v99.99-pre-2044 Fix movement speed check, closes #420 + - v99.99-pre-2043 Change usage of ketSet/get to entrySet in OreDictionary, closes #422 + - v99.99-pre-2042 Fixed entity colision above max world height, and below 0. Closes #400 + - v99.99-pre-2041 Disable automatic equiti of pcke dup items for players, and fixed index issues in Player.setCurrentItemOrArmor. + - v99.99-pre-2040 Merge pull request #188 from immibis/master + Console log thread should be a daemon thread. + - v99.99-pre-2039 Console log thread should be a daemon thread. + - v99.99-pre-2038 Update FML to 556: + b6d6f235 Fix sprite map issue. + 1158aa46 Fix Language Registry, closes #FML 163 + 50ce6fb3 Option to disable renaming for srgnames. + - v99.99-pre-2037 Fix sprite map issue. + - v99.99-pre-2036 Merge branch 'master' into runtimedeobf + - v99.99-pre-2035 Fix Language Registry, closes #163 + - v99.99-pre-2034 Fix Language Registry, closes #163 + - v99.99-pre-2033 Merge branch 'master' into runtimedeobf + - v99.99-pre-2032 Jenkins needs this script, *pokes Overmind* -.- + - v99.99-pre-2031 Fix profiler issue with RenderGlobal patch. Closes #414 + - v99.99-pre-2030 Fix EventTransformer throwing an NPE when transforming a class that doesn't exist. Closes #413 + - v99.99-pre-2029 Fix fortune modifier always passed as 0 to idDropped closes #412 + - v99.99-pre-2028 Fixes comparison for items in creative inventory, closes #411 + - v99.99-pre-2027 Added a hook into SlotArmor so Items can control if they are classified as a Armor type. Closes #408 + - v99.99-pre-2026 Add item frame transformations to the EntityItem render helper Closes #407 + - v99.99-pre-2025 Made LiquidStack.isLiquidEqual(ItemStack) properly check the contained liquid, in addition to obvious id/meta closes #399 and closes #403 + - v99.99-pre-2024 Kill .sh wrappers until someone writes more robust versions, closes #392 and closes #402 + - v99.99-pre-2023 Actually use the line parameter in ServerChatEvent, closes #401 + - v99.99-pre-2022 Kill generated timestamp in config files, if you want to retreive this information, usethe file's modified time. Closes #404 + - v99.99-pre-2021 Option to disable renaming for srgnames. + - v99.99-pre-2020 Fix ServerBrand retriever- forge is now forge,fml! + Update FML: cd96718 + cd96718 Fix HD mob skins, FINALLY!!! Stupid eyes are stupid. + - v99.99-pre-2019 Fix HD mob skins, FINALLY!!! + Stupid eyes are stupid. + - v99.99-pre-2018 Remove the single use interface ITickingArmor, and apply to Item directly. + - v99.99-pre-2017 Fix possible null case for collision bounding box. + - v99.99-pre-2016 Fix TESR rendering for double chests + - v99.99-pre-2015 Merge branch 'TESRculling' + - v99.99-pre-2014 Add in "armor ticking"- implement the interface and the armor piece will tick. + Update FML:22dbe41 + 22dbe41 Fix up mistake that broke all modloading. Nice. + - v99.99-pre-2013 Fix up mistake that broke all modloading. Nice. + - v99.99-pre-2012 Fix some class naming and packaging issues, pending an MCP update + for the same + - v99.99-pre-2011 Update for MCP 7.34 and MC 13w05b + - v99.99-pre-2010 MCP compilation works + - v99.99-pre-2009 Update FML:549b6fd + 549b6fd IMC tweaks: runtimeMessages now work (thanks for all that testing for this much requested feature!) and IMCEvent will no longer rem + 9fafdc1 More logging tweaks. You can probably configure individual mod log files if you wish now + f169f7c A log of logging cleanup. FML will now read logging.properties to configure logging channels a couple of times during startup. You + 3ac891f Try and handle "death on startup" a bit cleaner + 2dc0189 Deprecate the old GUI ticktype. They're dead and have been for some time. + dd98784 Tweak a method signature + 1c9a510 Add parameters to FML install to enable/disable certian aspects. Applying patches, running transformer/merger, and decompiling serv + 1bd6847 Fix up packages.csv ordering for easier diffing + - v99.99-pre-2008 Fix small derp in TE + - v99.99-pre-2007 IMC tweaks: runtimeMessages now work (thanks for all that testing for this much requested feature!) + and IMCEvent will no longer remove messages if no one gets them, so you can do + just manual runtime polling, if you wish. + - v99.99-pre-2006 More logging tweaks. You can probably configure individual mod log files if you wish now + - v99.99-pre-2005 A log of logging cleanup. FML will now read logging.properties to configure logging channels a couple of times during startup. + You should be able to filter a lot of messages based on things like modid and certain FML related features that can be noisy + like item tracking. + Should close #175 + - v99.99-pre-2004 Merge branch 'master' into TESRculling + - v99.99-pre-2003 Fix initalization issue with the clamping threshold config value. And remove vanilla console spam related to it. + - v99.99-pre-2002 Change WorldServer.allPlayersSleeping to public, and remove the SideOnly annotation on EntityPlayer.getSleepTimer() Closes #393 + - v99.99-pre-2001 Change access of upper and lower chest fields of InventoryLargeChest to public. Closes #387 + - v99.99-pre-2000 Added catch to TileEntityChestRenderer for potential crash when modders do bad things -.- Closes #389 + - v99.99-pre-1999 Rework canSilkHarvest hook to try and honor vanilla overrides, should close #391 + - v99.99-pre-1998 Added input getters for Ore recipies, and javadoc warning for modders, #390 + - v99.99-pre-1997 Add DimensionManager.unregisterProviderType for PR #388 + - v99.99-pre-1996 Fixup a resource leak warning. + - v99.99-pre-1995 Forge Additions: Exposed ChunkCache.worldObj to public PR #383 + - v99.99-pre-1994 Moved warning logic down, so that no more tickets are isues if the mod is over it's alotment. Fixes #378 + - v99.99-pre-1993 Final part of the deobfuscation data setup- fields are now deobfuscated as well. + All that remains, is to figure out what and how to distribute the deobfuscation data itself. + - v99.99-pre-1992 Read the joined.srg file directly from lib/deobfuscation_data.zip now. Still debating distribution method. + - v99.99-pre-1991 Now actually works for mods, somewhat. It currently generates access violations for + ModLoader mods that presume access to fields that are not actually accessible from + a different package. + - v99.99-pre-1990 Method deobfuscation now works + - v99.99-pre-1989 Working to read class names and remap them at runtime. + - v99.99-pre-1988 First draft runtime deobf + - v99.99-pre-1987 Try and handle "death on startup" a bit cleaner + - v99.99-pre-1986 We try and log a message if we detect a world leak: it's probably not infallible, but it should + help mod developers- if you see this when testing your mod with, say, mystcraft, you're probably + keeping a hold of an invalid handle to the World (either directly, or indirectly via Entity or TileEntity) + and you should look to refactor to wrap those handles in WeakReferences + - v99.99-pre-1985 Add in a mechanism for explicit subclassing of WeightedRandomChestItem to allow for + generational style chest content generation rather than static. Cleans up some old code nicely + - v99.99-pre-1984 Bump the revision number for the TESR and renderpass changes + - v99.99-pre-1983 Merge branch 'renderpass' of https://github.com/Chicken-Bones/MinecraftForge into TESRculling + Conflicts: + patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch + patches/minecraft/net/minecraft/entity/Entity.java.patch + patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch + - v99.99-pre-1982 Add in TESR culling, and a new TileEntity method to allow for differential sizing of the + TESR view culling vs the TE collision bounding box (the former defaults to the latter) + Checked into a branch because it's likely to break expanded TileEntities. + - v99.99-pre-1981 Fix NPE causing issue with the cache. Derpy derp. + - v99.99-pre-1980 Fix a potential problem with "Entity already added" when using the dormant + chunk cache capability. The entities in the dormant chunk cache will get new + IDs prior to the cached chunk returning. + - v99.99-pre-1979 Deprecate the old GUI ticktype. They're dead and have been for some time. + - v99.99-pre-1978 Tweak a method signature + - v99.99-pre-1977 Add parameters to FML install to enable/disable certian aspects. Applying patches, running transformer/merger, and decompiling server. + - v99.99-pre-1976 Attempt to fix a possible NPE in the face of ChickenBones' hackery. ChickenBones. stop it! + - v99.99-pre-1975 Merge remote-tracking branch 'origin/master' into snapshot15 and fix patches + Conflicts: + fml-src-1.4.7-4.7.22.539-master.zip + fml-src-1.4.7-4.7.4.520-master.zip + fml-src-13w02b-4.99.16.541-snapshot15.zip + patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch + patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch + patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch + patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch + patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch + patches/minecraft/net/minecraft/server/gui/GuiStatsComponent.java.patch + patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch + patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch + patches/minecraft/net/minecraft/world/World.java.patch + patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch + patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch + patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch + - v99.99-pre-1974 Fix a couple of forge patches + Update FML: d075daf + d075daf Merge branch 'master' into snapshot15 Fix up compilation and patching errors + 1bd6847 Fix up packages.csv ordering for easier diffing + dd832f2 Update for MCP7.30c - fixes redstone rendering issues + aebf6eb Add in a registry method to allow for alternative TileEntity names- they will be used to support loading maps containing the older definiti + 8921cfe Remember to add the new patches! + cd67596 The "ServerStarting" event should now properly crash the server if it fails, so the client will properly exit. Also, added in a "pre-server + e1c6630 Javadoc cleanup + 5ce4e31 Fix breaking change + a99c488 Merge branch 'patch-1' of https://github.com/bspkrs/FML into gh-updates + 94282c5 Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates + 7ad8529 Update MCP to MCP7.26a and refresh MCP names + 15534ed Update address of the FML repository to the new location in all the files + aa822e3 Fix logical error in comment text + a14ab91 Update license text to make clear that FML is not a way to sidestep MCP licensing. + 0165742 Fix mcp conf md5 signatures for the snapshot + 26a5b31 FMLLogFormatter: dynamic log level name + - v99.99-pre-1973 Merge branch 'master' into snapshot15 + Fix up compilation and patching errors + Conflicts: + common/cpw/mods/fml/common/registry/GameRegistry.java + conf/joined.srg + conf/params.csv + conf/version.cfg + patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch + - v99.99-pre-1972 Fix up packages.csv ordering for easier diffing + - v99.99-pre-1971 Update for MCP7.30c - fixes redstone rendering issues + - v99.99-pre-1970 Update FML:aebf6eb + aebf6eb Add in a registry method to allow for alternative TileEntity names- they will be used to support loading maps containing the older definiti + - v99.99-pre-1969 Add in a registry method to allow for alternative TileEntity names- they will be used to support + loading maps containing the older definitions. + - v99.99-pre-1968 Gave entities and tile entities access to the second render pass for translucency. + - v99.99-pre-1967 Change DimensionManager.getCurrentSaveRootDirectory() to try and work even for the new server about to start event + Update FML:8921cfe + 8921cfe Remember to add the new patches! + cd67596 The "ServerStarting" event should now properly crash the server if it fails, so the client will properly exit. A + - v99.99-pre-1966 Remember to add the new patches! + - v99.99-pre-1965 The "ServerStarting" event should now properly crash the server if it fails, + so the client will properly exit. Also, added in a "pre-server-start" event + that fires before the worlds are loaded for a save, just for you immibis. + - v99.99-pre-1964 Some javadoc fixes + - v99.99-pre-1963 Javadoc cleanup + - v99.99-pre-1962 Add in patch to change how playerinstance sends TE chunk updates. It should always send just the TEs + that changed now, and not "ALL" TEs. Also, added configuration value to change the 64 threshold to a + configurable number + - v99.99-pre-1961 Update FML: 5ce4e31 + 5ce4e31 Fix breaking change + - v99.99-pre-1960 Fix breaking change + - v99.99-pre-1959 Merge branch 'worldtype_customize' of https://github.com/ExtrabiomesXL/forge into gh-updates + - v99.99-pre-1958 Merge branch 'master' of https://github.com/CovertJaguar/MinecraftForge into gh-updates + - v99.99-pre-1957 Merge part of PR #375 related to ChunkEvent.Load for the client side + - v99.99-pre-1956 Update FML: a99c488 + a99c488 Merge branch 'patch-1' of https://github.com/bspkrs/FML into gh-updates + 94282c5 Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates + aa822e3 Fix logical error in comment text + 26a5b31 FMLLogFormatter: dynamic log level name + - v99.99-pre-1955 Merge branch 'patch-1' of https://github.com/bspkrs/FML into gh-updates + - v99.99-pre-1954 Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates + - v99.99-pre-1953 Update licencing information to make clear that forge is allowed to redistribute and automatically + download parts of MCP, but this permission is not transitive to people distributing MinecraftForge + source independently of the MinecraftForge project. + Update MCP to 7.26a and FML: 7ad8529 + 7ad8529 Update MCP to MCP7.26a and refresh MCP names + 15534ed Update address of the FML repository to the new location in all the files + a14ab91 Update license text to make clear that FML is not a way to sidestep MCP licensing. + - v99.99-pre-1952 Update MCP to MCP7.26a and refresh MCP names + - v99.99-pre-1951 Update address of the FML repository to the new location in all the files + - v99.99-pre-1950 Fixed render passes for EntityItems + Should be < instead of <= + - v99.99-pre-1949 Fix logical error in comment text + - v99.99-pre-1948 Update license text to make clear that FML is not a way to sidestep + MCP licensing. + - v99.99-pre-1947 Bump major and minor version numbers to mark 1.5, it's gunna break everything. Should be a compileable 1.5 build. + - v99.99-pre-1946 Fix check in getItem() to allow lowest item ID #361 + - v99.99-pre-1945 Update FML: + New scripts for signing jars, and repackging source folders. + Fix LanguageRegistry loading files in UTF-8 format. loadLocalization should work for non-xml in all languages now (assumes UTF-8) + Fix incorrect end length calculation. Closes #161 Thanks BStramke! + - v99.99-pre-1944 Merge pull request #370 from CovertJaguar/snapshot15 + MCL Update + - v99.99-pre-1943 Fix mcp conf md5 signatures for the snapshot + - v99.99-pre-1942 MCL Update + - v99.99-pre-1941 Removed some dead code, We don't bind custom tessellators + - v99.99-pre-1940 First patches updae to 1.5, Many rendeirng related changes, most notibly removed Item/Block's getTextureFile() functions. + - v99.99-pre-1939 Updated FML and at config for 1.5 snapshot + - v99.99-pre-1938 Update patche for jad-style names. + - v99.99-pre-1937 FMLLogFormatter: dynamic log level name + FMLLogFormatter now uses getLocalizedName or getName for log level name + Changes to be committed: + modified: common/cpw/mods/fml/relauncher/FMLLogFormatter.java + - v99.99-pre-1936 Temporary hosting + - v99.99-pre-1935 Another packaging update. I think we're done now. + - v99.99-pre-1934 Fix modlist to use the new texture binding functions, i think + - v99.99-pre-1933 A couple of packaging tweaks, clean up more junk. It may come back but for now it's gone + - v99.99-pre-1932 Delete old patches not needed anymore + - v99.99-pre-1931 Initial patch update for snapshot + - v99.99-pre-1930 Initial setup for snapshot- the client compiles, but patches fail to apply. + - v99.99-pre-1929 Updated patches for new JAD style names. + - v99.99-pre-1928 FML will now rename local variables to have JAD-style names instead of FernFlower var## names. New script to do this, to allow for modders to run it over there own code: python rename_vars.py -mcp [folders to rename]... + - v99.99-pre-1927 Fix incorrect end length calculation. Closes #161 Thanks BStramke! + - v99.99-pre-1926 Fix LanguageRegistry loading files in UTF-8 format. loadLocalization should work for non-xml in + all languages now (assumes UTF-8) + - v99.99-pre-1925 Merge pull request #158 from CovertJaguar/patch-2 + Added an accessor for villagers + - v99.99-pre-1924 Added an accessor for villagers + - v99.99-pre-1923 New python script to update java files for new package names. Usage: paython update_packages.py --mcp-dir [Folders To Repackage] + - v99.99-pre-1922 New python script for signing partial jar files. See comments inside for details. + - v99.99-pre-1921 Added event hooks to control to allow mod control of mob spawning. PR: #337 + Deprecated LivingSpecialSpawnEvent in favor of new LivingSpawnEvent.SpecialSpawn + - v99.99-pre-1920 Fixed incorrect lighting in some cases. Closes issue #349 + - v99.99-pre-1919 Added getter for Metadata smelting list, because, why not.. PR: #352 + - v99.99-pre-1918 Some small code cleanups. + - v99.99-pre-1917 Fixed issue where ChunkPriderEvent.InitNoiseField used the wrong sizeY value. + - v99.99-pre-1916 Fix issue where dungeon loot table had wrong values. + - v99.99-pre-1915 Update FML:6f1b762 + 6f1b762 Move server stopped *after* the server has actually stopped. *sigh* + - v99.99-pre-1914 Move server stopped *after* the server has actually stopped. *sigh* + - v99.99-pre-1913 Update FML:d9bfb29 + d9bfb29 Add in a "server stopped" event + - v99.99-pre-1912 Add in a "server stopped" event + - v99.99-pre-1911 Attempt to resolve the entity concurrency issue, by simply deferring unload + to the next tick + - v99.99-pre-1910 Update FML:6fc7bc4 + 6fc7bc4 Add in some classloader debugging information: use fml.debugClassLoading=true as a system property to track down prob + - v99.99-pre-1909 Add in some classloader debugging information: use fml.debugClassLoading=true as a system property + to track down problems with classes not being found or loading erratically. + - v99.99-pre-1908 Fix noisy exception logging + - v99.99-pre-1907 Fix a missed patch and cleaned up other patches + Rollback a method name change that breaks a lot of mods + Update FML: fb701cd + fb701cd Revert MCP name change for canConnectRedstone - it conflicts with a forge method of the same name and breaks 1 + - v99.99-pre-1906 Revert MCP name change for canConnectRedstone - it conflicts with a forge method of the same name and breaks 1.4.6 to 1.4.7 compatibility + - v99.99-pre-1905 Update for MC 1.4.7 + Update FML: f7cc50b + - v99.99-pre-1904 Update for MC 1.4.7 + - v99.99-pre-1903 Attempt a fix for the new chunk compression changes. + - v99.99-pre-1902 Update FML:1a232cf + 1a232cf Fix multiple GUI containers for ML containers. Sorry ultimatechest that this fix took so long, a bug report at + 853f54b Log if there's a problem reading the class bytes + - v99.99-pre-1901 Fix multiple GUI containers for ML containers. Sorry ultimatechest that + this fix took so long, a bug report at github.com/cpw/FML would help, + next time ;) + - v99.99-pre-1900 Log if there's a problem reading the class bytes + - v99.99-pre-1899 Fix mobs spawning on inverted slabs/stairs. + - v99.99-pre-1898 Add ability to WorldTypes to display the 'Customize' button and react to it + - v99.99-pre-1897 Fixed order <.< you saw nothing. + - v99.99-pre-1896 Use nanoTime instead of currentTimeMillis for potential performance increase. + - v99.99-pre-1895 Fixed typo in dungeon loot + - v99.99-pre-1894 Fixed EntityMinecard missed patch, Issue #338 + - v99.99-pre-1893 Fixed issue with Efficancy enchatment when connected to vanilla servers. + - v99.99-pre-1892 Merge branch 'Uristqwerty-master' + - v99.99-pre-1891 Merge branch 'master' of https://github.com/Uristqwerty/MinecraftForge into Uristqwerty-master + - v99.99-pre-1890 Protect deflation with a simple semaphore. Should close #336 + - v99.99-pre-1889 Update FML: Fix NPE in fingerprint loading, and pass expectged fingerprint to FMLFingerprintViolationEvent + - v99.99-pre-1888 Fix NPE in fingerprint loading, and pass expectged fingerprint to FMLFingerprintViolationEvent + - v99.99-pre-1887 Force parent ListenerListInsts to rebuild. + Without this change, it is possible (and, in fact, nearly guaranteed) for lists to rebuild endlessly if a parent list is marked as needing a rebuild but never actually read. This change forces the parent list(s) to rebuild as well, resulting in a significant performance increase and smoother framerate due to greatly reduced GC activity. + - v99.99-pre-1886 Update FML: 7e6456d + 7e6456d Fix a message delivery issue in IMC + 664ebda Some tweaks for signing and ID matching + - v99.99-pre-1885 Fix a message delivery issue in IMC + - v99.99-pre-1884 Fixes a vanilla bug where the player view would dip when stepping between certain blocks + https://mojang.atlassian.net/browse/MC-1594 + Issue #318, let me know if you notice any issue. + - v99.99-pre-1883 Fixed parameter ordering u.u + - v99.99-pre-1882 Re-write/Deprecated DungeonHooks loot tables, now uses ChestGenHooks like the rest of the world gen. Also fixes issue #330 by adding in enchanted books. + Should be API compatible. + - v99.99-pre-1881 Move chunk compression to the network thread in Packet 51 and 56 + This will reduce the server load considerably by doing the chunk data compression in writePacketData, which will be run from the network thread. + The chunk compression can easily use 1/4th of the overall server thread CPU time if someone is exploring much, especially when moving quickly (e.g. with quantum leggings). + Player, this is how it's properly done. + - v99.99-pre-1880 Explicitly check if useItem is not denied, allows for denying the item without denying the block + - v99.99-pre-1879 Fix missed patch in EntityMinecart, #334 + - v99.99-pre-1878 Delete unneeded patch. + - v99.99-pre-1877 Some tweaks for signing and ID matching + - v99.99-pre-1876 Some access transformations to allow mystcraft to work again. Closes #331 + - v99.99-pre-1875 Fix Fireworks to always work in SMP + - v99.99-pre-1874 Fix up enchantment at the enchanting table vs via a book. Adds in a method + that previously exists under a new name: canApplyAtEnchantingTable() + to determine enchantments that can apply at the enchanting table (a smaller + subset of all possible enchantments for an item, now). Also, add your + enchantments to the anvil book application list, if neccessary. + - v99.99-pre-1873 Tweak packet56 to see if this resolves the apparent worldgen derpiness + - v99.99-pre-1872 Server side only item callback: allow a held item to decide if it wants to pass sneak-clicks through + to a block, or not. Defaults false- the same as the new vanilla behaviour (sneak clicks with an item + in hand don't activateBlock anymore). + - v99.99-pre-1871 Move another patch up a bit - should actually close #329 + - v99.99-pre-1870 Add IPlantable to itemseedfood. Potato and carrot support! + - v99.99-pre-1869 Fixed cpw's derp in the PlayerInteractEvent logic. + - v99.99-pre-1868 Updated NetClientHandler for onConnectionClosed placement fix. + - v99.99-pre-1867 Update FML: + Fixed issue with users who don't have the JDK installed in there path + MCP will now output bfusicated files with windows reserved names to _name.class and FML will prioritize those names. + Fixed placement of onConnectionClosed callback + - v99.99-pre-1866 Remove unneeded file + - v99.99-pre-1865 Fixed placement of onConnectionClosed callback. + - v99.99-pre-1864 Fix ItemInWorldManager so that itemUseFirst works, and the playerinteractevent works. Minor patching mis hit. Apologies. + - v99.99-pre-1863 OK. AT the right thing, and add in a call to always get the right thing. Clean up patch fuzz too. + - v99.99-pre-1862 Access Transform a couple of methods + - v99.99-pre-1861 MCP will reobf classes with reserved names in windows to a legal file name. And FML will try to read these classes over the default ones. + - v99.99-pre-1860 Output obfed files with reserved windows names to _NAME.class + - v99.99-pre-1859 Merge remote-tracking branch 'origin/master' + - v99.99-pre-1858 Fixe BiomeDecorator AT entry. + - v99.99-pre-1857 Add quotes around javac command. + - v99.99-pre-1856 Drop the item in onBlockHarvested, not breakBlock + - v99.99-pre-1855 Fix up block drops for skulls and cocoa + - v99.99-pre-1854 And fix up the other equals + - v99.99-pre-1853 Fix comparing ItemStack tags for equality + - v99.99-pre-1852 Update FML: 40e57a2 + 40e57a2 Update MCP to newer version Fix fingerprint fire + - v99.99-pre-1851 Update MCP to newer version + Fix fingerprint fire + - v99.99-pre-1850 Fix accidentally removed not-deprecated methods. + Update FML: d604e44 + d604e44 InterModComms now supports a runtime polling based model for inter-mod comms at runtime. Deprecate method that shouldn't be used. COPY it's content to your mod. Don't CALL it. + 8b7778c Don't be as alarming about item overwrites. + - v99.99-pre-1849 InterModComms now supports a runtime polling based model for inter-mod comms at + runtime. + Deprecate method that shouldn't be used. COPY it's content to your mod. Don't CALL it. + - v99.99-pre-1848 Fix binding the texture for multiple render passes. Thanks mdiyo! Closes #320 + - v99.99-pre-1847 Allow RenderItem to be easily overridden for things that need to render entityitems. IronChest, BuildCraft, RP2, whatever... + - v99.99-pre-1846 Fixed items dieing improperly due to new EntityItem sync changes, also made items render offset when rendered in 3d. + - v99.99-pre-1845 Fix RenderItem so that forge textures load for it + - v99.99-pre-1844 Don't be as alarming about item overwrites. + - v99.99-pre-1843 Updated FML: + Fixes startclient/startserver + Added configuration file which allows modids to ignore ID validation checking. IT WILL CRASH YOUR GAME in 99.999% of cases. + Immibis is a whingy ass. And TinyTimRob too. Now STFU and GTFO. closes fml/#510 for ever. + - v99.99-pre-1842 Removed all functions marked as deperacted for the new MC version + - v99.99-pre-1841 Added configuration file which allows modids to ignore ID validation checking. IT WILL CRASH YOUR GAME in 99.999% of cases. + Immibis is a whingy ass. And TinyTimRob too. Now STFU and GTFO. closes #510 for ever. + - v99.99-pre-1840 Dixed ev eclipse worksapce, now references BC. + - v99.99-pre-1839 Added client src folder to classpath for startclient/startserver. + - v99.99-pre-1838 Removed hardcoded additions + - v99.99-pre-1837 Try and print error while signing jar + - v99.99-pre-1836 Added jar signing to forge, we sign cpw/* and net/minecraftforge/* + - v99.99-pre-1835 Inital update to 1.4.6, Version bumped to 6.5 + - v99.99-pre-1834 Update to MC 1.4.6 + - v99.99-pre-1833 Fix build script + - v99.99-pre-1832 more 1.4.6 tweaks + - v99.99-pre-1831 More work + - v99.99-pre-1830 Merge branch 'securityupdate' + - v99.99-pre-1829 Merge branch 'master' into securityupdate + - v99.99-pre-1828 Update FML: e98c311 + e98c311 Fix up handling null names. *sigh* + - v99.99-pre-1827 Fix up handling null names. *sigh* + - v99.99-pre-1826 Update FML: 293edb3 + 293edb3 Some tweaks to item identification. The GameRegistry methods are deprecated to encourage you to use the new named ones instead. These will force a name on the item/block, allowing for stronger matching t + 9266ff3 Updated MCP download mirriors upon Searge's request. + 31695d5 Fix var name messup + bfb3020 Update released eclipse project to link BouncyCastle + 22a88ea Change ID management slightly. IDs are tracked by block type for itemblock items now. This means servers will need to update. Also, ordinal rearrangements within a mod will no longer trigger server disco + - v99.99-pre-1825 Some tweaks to item identification. The GameRegistry methods are deprecated + to encourage you to use the new named ones instead. These will force a + name on the item/block, allowing for stronger matching than "sequential guessing" + - v99.99-pre-1824 More fixes + - v99.99-pre-1823 Remove erronious double call to PlayerDestroyItemEvent + - v99.99-pre-1822 Make PlaySoundAtEntityEvent fire for players as well + - v99.99-pre-1821 Updated MCP download mirriors upon Searge's request. + - v99.99-pre-1820 Move Side and SideOnly to relauncher package + - v99.99-pre-1819 Fix newline fun + - v99.99-pre-1818 More stuff for the thingy + - v99.99-pre-1817 Remove old NEI/CCC compatibility code and other classloading tweaks + - v99.99-pre-1816 Simplify logic in tick start/end + Change the EnumSet equivalent of "A &= ~ new(~B)" to "A &= B". + This eliminates the need for one temporary object in a frequently called loop, and reduces the number of methods that need to be invoked. + - v99.99-pre-1815 Update FML to fix a typo + - v99.99-pre-1814 Fix var name messup + - v99.99-pre-1813 Update FML: Fixed the eclipse workspace to reference BouncyCastle library. + - v99.99-pre-1812 Update AT for repackage + - v99.99-pre-1811 Update patches for repackage. + - v99.99-pre-1810 Update released eclipse project to link BouncyCastle + - v99.99-pre-1809 Updated python scripts for removal of common folder + - v99.99-pre-1808 Update FML: + Minecraft is now decompiled into sane package names. + Got rid of the src/common folder as the only folder that exists is src/mincraft, because the client and server codebase is merged. + ID Map generation/validation fixes + - v99.99-pre-1807 Manual import fixes + - v99.99-pre-1806 Fixup workspace for BC replacement + - v99.99-pre-1805 Automatically resolved imports. + - v99.99-pre-1804 Bump version to 6.4.2 to mark the merge of TerrainGen branch. + - v99.99-pre-1803 Merge branch 'terraingen' + - v99.99-pre-1802 Derp, imported the repackaged names not old names. + - v99.99-pre-1801 Update FML: + 2f34290e: Fix possible escape leakage.. + 83deece6: Change ID management slightly. IDs are tracked by block type for ItemBlock items now. This means servers will need to update. + Also, ordinal rearrangements within a mod will no longer trigger server disconnection, though a warning will still be logged. + - v99.99-pre-1800 Change ID management slightly. IDs are tracked by block type for itemblock items now. This means servers will need to update. + Also, ordinal rearrangements within a mod will no longer trigger server disconnection, though a warning will still be logged. + - v99.99-pre-1799 Fix possible escape leakage.. + - v99.99-pre-1798 More robust eclipse workspace replacement + - v99.99-pre-1797 Update readme to reflect the fact that we now download MCP. + - v99.99-pre-1796 Make BlockButton.sensible protected and non-final + - v99.99-pre-1795 Expose BiomeDecorator fields for custom Biome information, Issue: #239 + - v99.99-pre-1794 Fix shouldRiderSit() to properly determine if rider is sitting. + - v99.99-pre-1793 Fixes crash when mods add TreeMaps to the Configuration map, thanks AtomicStryker, PR: #282 + - v99.99-pre-1792 Fix type in ForgeChunkManager.ticketCountAvaILableFor, thanks iChun PR: #285 + - v99.99-pre-1791 Creative GUI will now remember what tab page you were on, thanks Matchlighter PR #290 + - v99.99-pre-1790 Pistons now respect world height a little better, for PR #286, will review Rotation event later. + - v99.99-pre-1789 New TileEntity function to determine if the TE should be destroied when Block/Meta changes, For Issue #300 + - v99.99-pre-1788 Add CloudRenderer for PR #304 + - v99.99-pre-1787 Add .DS_Store to the gitignore for mac users + - v99.99-pre-1786 Moved check if map cursor should 'spin' and which world a player respawns in to WorldProvider for PR #308 + - v99.99-pre-1785 Made BlockButton.func_82535_o overrideable for issue #311 + - v99.99-pre-1784 Made GuiContainer.drawSlotInventory overrideable for issue #312 + - v99.99-pre-1783 Fix ForgeDirection.ROTATION_MATRIX for issue #313 + - v99.99-pre-1782 Kill decompile if astyle is not found and set execution bits on mcp .sh files and astyle-osx + - v99.99-pre-1781 Fix for FML Fixes eclipse workspace, now sets execution bits on astyle-osx, and mcp .sh files. Also now kills install if astyle is not found. + - v99.99-pre-1780 Change to download bouncy castle as well. We also finally properly use the downloaded libs + even in vanilla code! + - v99.99-pre-1779 Remove extraneous patch file + - v99.99-pre-1778 Merge branch 'repackage' + Conflicts: + build.xml + client/cpw/mods/fml/client/FMLClientHandler.java + client/cpw/mods/fml/client/GuiIdMismatchScreen.java + common/cpw/mods/fml/common/FMLCommonHandler.java + common/cpw/mods/fml/common/IFMLSidedHandler.java + common/cpw/mods/fml/common/network/ModIdMapPacket.java + common/cpw/mods/fml/common/network/ModListResponsePacket.java + common/cpw/mods/fml/common/registry/GameData.java + common/cpw/mods/fml/common/registry/GameRegistry.java + common/cpw/mods/fml/common/registry/ItemData.java + common/cpw/mods/fml/common/registry/LanguageRegistry.java + common/cpw/mods/fml/server/FMLServerHandler.java + install/fml.py + patches/minecraft/net/minecraft/client/Minecraft.java.patch + patches/minecraft/net/minecraft/server/MinecraftServer.java.patch + patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch + - v99.99-pre-1777 Merge branch 'repackage' of github.com:cpw/FML into repackage + Conflicts: + common/cpw/mods/fml/common/registry/GameData.java + - v99.99-pre-1776 Merge pull request #145 from pahimar/master + More logging of loading files in LanguageRegistry + - v99.99-pre-1775 Update common/cpw/mods/fml/common/registry/LanguageRegistry.java + Add in logging of what file failed to be loaded + - v99.99-pre-1774 Updated FML to 486: + 02b54ca8: Add a modid on the mods list, should make it easier to do things like forge chunkloading config + 70670f2f: Fix build eclipse extractor task + b9fa3fc9: Add in storage, detection and validation of the ItemID array between client and server + 5e5d8206: Fixing id map generation - should validate correctly now + f9fc06a8: Remade python dist as 32-bit. + 93d47a1c: Reenabled replacement of the eclipse folder. + - v99.99-pre-1773 Fixed install --mcp-dir + - v99.99-pre-1772 Fixed release -skipchangelog + - v99.99-pre-1771 Fix patches, rebased with HEAD + - v99.99-pre-1770 Remade python dist as 32-bit. + - v99.99-pre-1769 Fixing id map generation - should validate correctly now + - v99.99-pre-1768 Reenabled replacement of the eclipse folder. + - v99.99-pre-1767 Remade python dist as 32-bit. + - v99.99-pre-1766 Fixing id map generation - should validate correctly now + - v99.99-pre-1765 Fix up idmap code + - v99.99-pre-1764 And finally, fix up the release install script to have a parameter to specity the MCP directory. + - v99.99-pre-1763 Fix Forge install script to use python shipped with FML. + - v99.99-pre-1762 Push didn't get all of eclipse.... + - v99.99-pre-1761 Cleaned up eclipse workspace and moved it to a zip file. + Setup will extract it if it doesn't already exist. + - v99.99-pre-1760 Some derp protection in the workspace copy. + - v99.99-pre-1759 Removed remaining references to src/common + Fixed eclipse workspace replacemnt on source dist + Cleanup some outputs + - v99.99-pre-1758 Updated build script to not use the mcp common directory as it doesn't exist anymore. + - v99.99-pre-1757 Fished moving out the rest of the default packaged classes to aproperiate packages. Updated patches and code to reflect. + - v99.99-pre-1756 Updated the update_packages script to support different mcp locations + - v99.99-pre-1755 Update fml_marker.cfg, Minecraft is now runnable! + - v99.99-pre-1754 Update all imports for repackaging. Branch is compileable. + - v99.99-pre-1753 Some stragler patches + - v99.99-pre-1752 Updated patches to new packages. + - v99.99-pre-1751 Give new classes a distinct package to be moved from. + - v99.99-pre-1750 Fixed 0.tree to actually refresh the workspace. + - v99.99-pre-1749 Remerged branch, and updated dev eclipse workspace. + - v99.99-pre-1748 Add in storage, detection and validation of the ItemID array between client and server + and also for world saves. May help with item configuration issues. + - v99.99-pre-1747 Add a modid on the mods list, should make it easier to do things like forge chunkloading config + - v99.99-pre-1746 Fix build eclipse extractor task + - v99.99-pre-1745 Fix RenderBlocks patch, touch branch + - v99.99-pre-1744 For @XCompWiz, added a hook to allow mods to dynamically change the color that water is rendered. + - v99.99-pre-1743 Readded unchanged version + - v99.99-pre-1742 Removed unchanged file + - v99.99-pre-1741 Added terrain gen events + Added biome color events for @XCompWiz + - v99.99-pre-1740 Fix release script for new forge job name. Add in skip changelog option for local builds + - v99.99-pre-1739 Remove MCP from released src distro.. whops. + - v99.99-pre-1738 Add in storage, detection and validation of the ItemID array between client and server + and also for world saves. May help with item configuration issues. + - v99.99-pre-1737 Fix static method, closes #271 + Don't spam the log if a mod requests a ticket beyond their maximum. A single message is fine. + - v99.99-pre-1736 Add Chunk Watch and UnWatch events. + - v99.99-pre-1735 fix List configs + - v99.99-pre-1734 Fix typo in chunkmanager config + - v99.99-pre-1733 Tweak release.py script: HEAD==master in general + Update FML: 26a2ef5 + 26a2ef5 Add a modid on the mods list, should make it easier to do things like fo + b4e3490 Fix build eclipse extractor task + 828341f Fix typo + 7a8dae5 Try and make branch non-derpy + d3c0e1f Try defaulting branch differently + 9c77d3f Remove old eclipse workspace and ship/extract as a zip file (use ant set + 6371e9b Assume Forge is the parent directory when checking for AT configs. + 516954e Name both zips the same format + 1151d5c Last part of branch name only please + 25f1dda Try and get a valid branch name on jenkins + 39a146f Clean up build.xml script- support outputting a branched jar file + 037dcae Small derp in install.py + 01d6da3 Try marking python as binary. + 8b26659 FML will now attempt to download MCP as part of the install process Now + 42b3e6a Windows Python distrabution created using py2exe, thanks Fesh0r for the + e709ab8 Marked more spots in gui/items bitmask as being free. + - v99.99-pre-1732 Add a modid on the mods list, should make it easier to do things like forge chunkloading config + - v99.99-pre-1731 Fix build eclipse extractor task + - v99.99-pre-1730 Fix issue with DimensionManager.shouldLoadSpawn + - v99.99-pre-1729 Fix typo + - v99.99-pre-1728 Merge branch 'master' into repackage + Conflicts: + eclipse/Clean/.classpath + eclipse/Clean/.project + eclipse/FML/.classpath + eclipse/FML/.project + install/fml.py + - v99.99-pre-1727 Try and make branch non-derpy + - v99.99-pre-1726 Try defaulting branch differently + - v99.99-pre-1725 Update python files to add support for specifying MCP directory and FML downloading MCP on the fly. + - v99.99-pre-1724 Update FML, now includes python, and will download MCP for you + - v99.99-pre-1723 Add wget and unzip from GnuWin32 for use in the setup scripts. + - v99.99-pre-1722 Remove old eclipse workspace and ship/extract as a zip file (use ant setupenvironment) + Fix up install.py for forge multibranch changes + - v99.99-pre-1721 Assume Forge is the parent directory when checking for AT configs. + - v99.99-pre-1720 Merge branch 'master' into repackage + Conflicts: + patches/minecraft/net/minecraft/client/EntityFX.java.patch + - v99.99-pre-1719 Name both zips the same format + - v99.99-pre-1718 Last part of branch name only please + - v99.99-pre-1717 Try and get a valid branch name on jenkins + - v99.99-pre-1716 Clean up build.xml script- support outputting a branched jar file + - v99.99-pre-1715 Small derp in install.py + - v99.99-pre-1714 Try marking python as binary. + - v99.99-pre-1713 FML will now attempt to download MCP as part of the install process + Now shipping a py2exe version of python for windows. + Linux/Macs should come with python pre-installed so they do not have a distrabution here. + - v99.99-pre-1712 Windows Python distrabution created using py2exe, thanks Fesh0r for the script. + - v99.99-pre-1711 Fix #289 + - v99.99-pre-1710 Add in some additional ticket loading callbacks for ChickenBones. Closes #284 + Add in a call to determine if there are possible chunktickets for a world. This should let + Mystcraft and other dynamic world generating mods check if they should immediately load + a world based on existing chunk tickets. + - v99.99-pre-1709 Fix issue where non-BlockContainer TEs would not be removed properly. + - v99.99-pre-1708 Fix issue where worlds were potentially unloaded improperly on server shutdown. + - v99.99-pre-1707 Fix logic issue in ForgeChunkManager.ticketCountAvaliableFor(username) PR + - v99.99-pre-1706 Small change to fix loading configs. + - v99.99-pre-1705 Added section of the EntityData NBT that will be persisted for players across respawning. + - v99.99-pre-1704 Fix potential NPE in EntityJoin handler and print warning. + - v99.99-pre-1703 Exposed some ChunkLoader information for PR #278 + - v99.99-pre-1702 Small tweak to config to use Treemap + - v99.99-pre-1701 Merge pull request #269 from XCompWiz/chunkcon + Adds a more intelligent chunk constructor + - v99.99-pre-1700 Fixed AIOOB issue with new sanity check in getBlock + - v99.99-pre-1699 Fix potential NPE in saving a property that didn't define a type. + - v99.99-pre-1698 Added new functions to the Config class to allow for specification of comments when getting properties. + Added new getTerrainBlock whihc will limit the resuling ID to < 256, useful for world gen. + Calls to getBlock with IDs less then 256 will be assigned values above 256 {Thus freeing up terrain gen slots} + Made ConfigCategory implement Map should fix compatibility with most mods that broke two builds ago. + - v99.99-pre-1697 Merge pull request #277 from Xhamolk/patch-1 + OreDictionary addition: getOreID(ItemStack) + - v99.99-pre-1696 New nested configuration category support, for PR #258 + - v99.99-pre-1695 Fixed random chest items not generating to there max stack sizes. + - v99.99-pre-1694 Fixed issue with abandoned chunks. + - v99.99-pre-1693 OreDictionary addition: getOreID(ItemStack) + Allow getting the oreID from a ItemStack, as an alternative from getOreID(String). + Now is easier to exchange items for their equivalencies through the OreDictionary. + - v99.99-pre-1692 Merge pull request #274 from iChun/patch-2 + Add check that Entity saves to disk before saving entity to saved chunkloading data. + - v99.99-pre-1691 Add check that Entity saves to disk before saving entity to saved chunkloading data. + Returning false to addEntityID prevents the entity from being saved (cred to LexManos) + Entities which do not save to disk but are chunkloaders causes errors the next time the world loads. This ought to fix it. + - v99.99-pre-1690 Updated FML, proper free-sprite list for /gui/items.png, and fixed MCP version. + - v99.99-pre-1689 Marked more spots in gui/items bitmask as being free. + - v99.99-pre-1688 Fixes ordering for z & x loops (proper array increment order) + The ordering before would skip about in the ids and metadata arrays. This runs linearly and should improve performance. + Done live on github + - v99.99-pre-1687 Fixes some weird formatting + - v99.99-pre-1686 Adds a more intelligent chunk constructor + Adds a chunk constructor with full block id range, that's metadata + sensitive, has intelligent coord ordering, and which allows for + generation at greater heights than 127. + - v99.99-pre-1685 Delete duplicate file + - v99.99-pre-1684 Finished repackaging net.minecraft.* net.minecraft.client is left + - v99.99-pre-1683 More re-packaging, got most classes out of the default package. + - v99.99-pre-1682 Move server specific patch back to common from minecraft. + Update FML: 1f5c58b + 1f5c58b Fix up MCP version + 61e4db2 Merge joined.exc add update howto + 5efc1eb Revert "Fix MC-2497 - derpy torch flames. Moved from forge. Everyone sho + 3b3600d Modified merger to just consider all server classes as common. And moved + edcc5ca Forgot mcp.cfg + ca79dfe Updated to 1.4.5b + 5945279 Fix python error + 57bf643 Modified decompile so that we do not have to decompile the server, saves + d9d0a46 Cleaned up some tabs + 2fac644 Change usage of ZipFile, fixes issues with Mac's default instation of py + - v99.99-pre-1681 Fix up MCP version + - v99.99-pre-1680 Merge joined.exc add update howto + - v99.99-pre-1679 Revert "Fix MC-2497 - derpy torch flames. Moved from forge. Everyone should benefit." + This reverts commit fa567014a54b3273002fe9cf424ab4cf3ec54c3a. + - v99.99-pre-1678 Remove common folder from projects + - v99.99-pre-1677 Move IBossDisplayData to shared + - v99.99-pre-1676 First half of new patches + - v99.99-pre-1675 Update FML imports + - v99.99-pre-1674 Inital script side commit for MC source repackaging done. + - v99.99-pre-1673 Fix TE Issue + - v99.99-pre-1672 Modified merger to just consider all server classes as common. And moved the defnition of CodecMus to the config. + - v99.99-pre-1671 Updated to MC 1.4.5b + - v99.99-pre-1670 Forgot mcp.cfg + - v99.99-pre-1669 Updated to 1.4.5b + - v99.99-pre-1668 Fix python error + - v99.99-pre-1667 Modified decompile so that we do not have to decompile the server, saves time. + - v99.99-pre-1666 Cleaned up some tabs + - v99.99-pre-1665 Change usage of ZipFile, fixes issues with Mac's default instation of python. Also cleaned the python a little bit. + - v99.99-pre-1664 Removed GnuWin32 programs, should no longer be needed as we've moved to python. + - v99.99-pre-1663 Update FML: 570592b + 570592b Attempt to fix a possible comodification risk + - v99.99-pre-1662 Attempt to fix a possible comodification risk + - v99.99-pre-1661 Stupid eclipse resetting preferences. Spaces, not tabs!!! + - v99.99-pre-1660 Add in events when forcing and unforcing chunks. Hope this works for you ChickenBones! + - v99.99-pre-1659 Update FML: fde9414 + fde9414 Change texturebinding to use the textureId directly rather than iconInde + - v99.99-pre-1658 Change texturebinding to use the textureId directly rather than iconIndex + to determine if it needs to rebind the texture sheet + - v99.99-pre-1657 Fixed custom soil checks for NetherStalk and Reeds + - v99.99-pre-1656 Fixed issue with default implementation of Beach plant type check + - v99.99-pre-1655 Release script will now include the Minecraft version in the arcive names. + - v99.99-pre-1654 Update FML: f348496 + f348496 Fix mod display list. Shouldn't be derpy anymore. + a5c31b5 Fix World patch- workaround no longer required and leftovers are bad. + 2dc3f0d Cleaned up the AT config updater, should work for any setup of the MCP w + - v99.99-pre-1653 Fix mod display list. Shouldn't be derpy anymore. + - v99.99-pre-1652 Fix World patch- workaround no longer required and leftovers are bad. + - v99.99-pre-1651 Cleaned up the AT config updater, should work for any setup of the MCP workspace now. + - v99.99-pre-1650 Fixed beds not working properly when respawning. + - v99.99-pre-1649 Remove EntityFX patch - moved to FML. Patch SuspiciousClasses to add "forge" + Update FML: fa56701 + fa56701 Fix MC-2497 - derpy torch flames. Moved from forge. Everyone should benefit. + 96935bb Fix an NPE in TileEntity trying to generate a crash report. Make suspicious classes just return the obvious. Fix NPE for FML crash report on server. Clean up dead pa + - v99.99-pre-1648 Fix MC-2497 - derpy torch flames. Moved from forge. Everyone should benefit. + - v99.99-pre-1647 Fix an NPE in TileEntity trying to generate a crash report. Make suspicious classes just return the obvious. + Fix NPE for FML crash report on server. Clean up dead patches. + - v99.99-pre-1646 Fix the derpy torch flames properly. Closes MC-2497 properly ;) + - v99.99-pre-1645 Update to MC 1.4.5 + Update FML: 43d3042 + 43d3042 Clean up a patch + fec221f Update FML for MC 1.4.5 + b0f0635 Fix for ModLoader static overrides not displaying. + 23a2513 Fix up derpy file name handling: closes #127 Fix up duping childmods: cl + a6eaa2b Fix spelling issue. + c6a0741 FML setup should now download and verify all the minecraft files needed + 5a1930e Small fix to some MCP metadata for pre2 + 418deba Update to MC 1.4.4 + 4ff2cff Fix bug when a modloader mod is run on a dedicated server and has a conn + - v99.99-pre-1644 Clean up a patch + - v99.99-pre-1643 Update FML for MC 1.4.5 + - v99.99-pre-1642 Some liquid events. Non-API breaking. Add them at your leisure. This helps liquids know + what's happening to them. In case they're volatile or something ;) + - v99.99-pre-1641 Another difference + - v99.99-pre-1640 Fix fillLiquidContainer - return null, not the empty container for + previous API compatibility + - v99.99-pre-1639 Merge remote-tracking branch 'origin/master' + - v99.99-pre-1638 Update FML to fix ModLoader/addOverride functionality. + - v99.99-pre-1637 Fix for ModLoader static overrides not displaying. + - v99.99-pre-1636 Merge branch 'KingLemming-master' + - v99.99-pre-1635 Change name to LiquidContainerRegistry. Fix up missing API. This better be it now! + - v99.99-pre-1634 Fixed oversights in liquid registry, added functionality for instant checks as requested by CJ. + Liquid list return is now secure. + - v99.99-pre-1633 Merge branch 'KingLemming-master' + - v99.99-pre-1632 Rename some liquid stuff for more sensible naming. Tweak API slightly. + - v99.99-pre-1631 Liquid Manager Rewrite - slightly more memory usage, loads more efficient at runtime. + Added default Lava and Water registrations to Liquid Manager. + Removed method which relied on flawed assumption that a given liquid only had a single type of container. + - v99.99-pre-1630 Add in the basic IBlockLiquid interface. The actual block implementation + will follow. + - v99.99-pre-1629 Add an ItemStack sensitive version of getIconForRenderPass, defers to + existing by default. Should allow NBT data to affect multipass icon rendering. + - v99.99-pre-1628 Change getLeft to getRotation, around any axis. + - v99.99-pre-1627 Some new stuff on the liquid API for better RP2 interaction. Coming soon: blocks! + - v99.99-pre-1626 Tweak liquidcontainer API for sidedness capability + - v99.99-pre-1625 Fix breaking despite cancel in creative mode for PlayerInteractEvent OR #247 + - v99.99-pre-1624 Allow for modders to decide whether or not players are positioned on ridingEntities similarly to pigs PR #244 + - v99.99-pre-1623 Fix issue where players would spawn in the ground. + - v99.99-pre-1622 Mods can use custom textures for Slot background overlay, instead of only items.png PR #245 and #246 + - v99.99-pre-1621 Added saplings and leaves to the ore dict. PR: #242 + - v99.99-pre-1620 Updated FML, Fixed spelling issues in logs, and file name issues. + - v99.99-pre-1619 Fix up derpy file name handling: closes #127 + Fix up duping childmods: closes #126 + FMLPreinitializationEvent now offers a getLogger() that'll return your mod a personalized logger instance + - v99.99-pre-1618 As agreed, liquid API from BuildCraft has been migrated to minecraft forge. There will be cleanups to follow, + including sided handling and client rendering tweaks. Stay tuned! + Tweak forgedirection for a couple of naming constants + - v99.99-pre-1617 Add toLeft rotational data to ForgeDirection + - v99.99-pre-1616 New field in ForgeDirection to hold just the valid directions. And made getOrientation a bit more efficient. + - v99.99-pre-1615 Fix crops not droping seeds properly. + - v99.99-pre-1614 Fix entity items rendering on the ground. + - v99.99-pre-1613 Fix spelling issue. + - v99.99-pre-1612 Bumped version number for 1.4.4 + - v99.99-pre-1611 Update to 1.4.4 + - v99.99-pre-1610 FML setup should now download and verify all the minecraft files needed to run MCP. + - v99.99-pre-1609 Small fix to some MCP metadata for pre2 + - v99.99-pre-1608 Update to MC 1.4.4 + - v99.99-pre-1607 Ore Dictionary Improvements, replaces vanilla recipes with OreDict recipes for some vanilla items. Thanks Covert. + - v99.99-pre-1606 Made Item constructor public, and made setTextureFile chainable, requires mods to recompile, but as this is for 1.4.3 i'm not concerned. + - v99.99-pre-1605 Fix bug when a modloader mod is run on a dedicated server and has a + connection handler assigned to it. Hi SmartMoving! Perhaps you should try + @Mod instead of BaseMod? + - v99.99-pre-1604 Merge branch 'mc143pre' + Update to minecraft 1.4.3 prerelease + - v99.99-pre-1603 Readdaed teleporter sensitive versions of the teleport function + Added per-world list of custom teleporters, Modders, use World.Load to populate this list. + Changed the definition of our version schemes. + - v99.99-pre-1602 Temporary update for 1.4.3 + Update FML: bd2123c + bd2123c Clean up some patch fuzz + c2a603c Update joined.exc file from latest conf + db12af4 Update to 1.4.3 + - v99.99-pre-1601 Clean up some patch fuzz + - v99.99-pre-1600 Update joined.exc file from latest conf + - v99.99-pre-1599 Update FML: 8356fe9 + 8356fe9 FUUUUUU! Stupid ticking. STOP REGISTERING TICK HANDLERS IN YOUR CONSTRUC + 6edce8b Patch a file handle leak in RegionFileCache handling when under memory p + ca2bbe0 Update MCP mapings again, yay bad syncs. + c8941a7 Updated MCP mapings. + 5e20c03 StartServer is now useable in merged code base. + - v99.99-pre-1598 Update to 1.4.3 + - v99.99-pre-1597 A useful tool for performing updates + - v99.99-pre-1596 FUUUUUU! Stupid ticking. STOP REGISTERING TICK HANDLERS IN YOUR CONSTRUCTORS. + I'm looking at you Rei's! + - v99.99-pre-1595 Patch a file handle leak in RegionFileCache handling when under memory pressure. + - v99.99-pre-1594 Update FML: Updated MCP mapings, and fixed StartServer + - v99.99-pre-1593 Update MCP mapings again, yay bad syncs. + - v99.99-pre-1592 Updated MCP mapings. + - v99.99-pre-1591 StartServer is now useable in merged code base. + - v99.99-pre-1590 Update FML: b19e882 + b19e882 Remove some debug, closes #123 + 9d7d32a Fix up tick management outside of mod loading phases for ModLoader mods. + d512539 Negatively cache failed class lookups, should help with @SideOnly performance issues. + - v99.99-pre-1589 Remove some debug, closes #123 + - v99.99-pre-1588 Fix up tick management outside of mod loading phases for ModLoader mods. + - v99.99-pre-1587 Negatively cache failed class lookups, should help with @SideOnly performance issues. + - v99.99-pre-1586 This update fixes some world corrupting vanilla error handling, mostly caused by + mods doing something derpy. Hopefully, your world saves will thank me. + Note that if the mod does derp, it's data is lost. It's not FML or Minecraft Forge's + responsibility if "DirtChest 2000 Mk5" can't write their TileEntity method correctly + and you lose your 100000 diamonds. + Update FML: a3a93f3 + a3a93f3 Fix some whitespace issues, handle possibly bugged entities as well + a7eb5dc Vanilla/mod bug fixes: CME on entity processing, TileEntity resetting chunk on save/load. + - v99.99-pre-1585 Fix some whitespace issues, handle possibly bugged entities as well + - v99.99-pre-1584 Vanilla/mod bug fixes: CME on entity processing, TileEntity resetting chunk on save/load. + - v99.99-pre-1583 Cleanup some debug in the script, and fix version number for the current build. + - v99.99-pre-1582 Fix a vanilla bug related to certian seeds and stronholds. + - v99.99-pre-1581 Fix cast issue when mods attempt to make fake worlds. + - v99.99-pre-1580 Change logs should now be bundled with downloads, as well as avalible on files.minecraftforge.net + - v99.99-pre-1579 Update FML:b23081d + b23081d Support for ModLoader 1.4.2. Good job Risu! + 66db4ec Add in an exclusion list tag for @Mod. The backend code isn't yet implemented, but shows the basic idea. + - v99.99-pre-1578 Support for ModLoader 1.4.2. Good job Risu! + - v99.99-pre-1577 Fix compile issue. + - v99.99-pre-1576 Merge pull request #232 from CovertJaguar/patch-7 + Added vanilla wood + dye to the Ore Dict + - v99.99-pre-1575 Added Stonghold, Village, and Spawn biome management helpers for PR 207 + - v99.99-pre-1574 Added vanilla wood + dye to the Ore Dict + Should help simplify interaction between mods that add similar items. + - v99.99-pre-1573 New hook to allow for custom beacon support blocks. + - v99.99-pre-1572 Exposed functions for adding superflat presets. + - v99.99-pre-1571 Added metadata sensitve experience to furnace recipies and added Item callback to determine experience gain. + - v99.99-pre-1570 Fix issue where scroll bar would not render when switching tab pages. + - v99.99-pre-1569 New hook to allow items to be on multiple creative tabs PR 176 + - v99.99-pre-1568 Remove some debug code + - v99.99-pre-1567 Changeable name tag render distance for PR: 174 + - v99.99-pre-1566 EntityLiving.experianceValue private->public for Issue #225 + - v99.99-pre-1565 Merge pull request #231 from ShadwDrgn/master + ServerChatEvent + - v99.99-pre-1564 Add event to cancel or change chat messages sent from server + - v99.99-pre-1563 Add event to cancel or change chat messages sent from server + - v99.99-pre-1562 Added system to place all configs that use Forge's Configuration function into a single file on disc. Optional config to enable this. Blame MattaBase for this idea.. + - v99.99-pre-1561 Pickblock will new compare NBT data, should allow mods to refine there result better. + - v99.99-pre-1560 Add in an exclusion list tag for @Mod. The backend code isn't yet implemented, but shows the basic idea. + - v99.99-pre-1559 Fix ItemSeed placement to take into account the IPlantable interface. + - v99.99-pre-1558 Added a per-world MapStorage feature that provides a method to store data files associated with a specific world, as well as fixes the issue with villagers loosing there village. {Where villagers wouldn't go inside at night} + - v99.99-pre-1557 Fix the accessor and type on World.getPersistentChunksFor() + Update FML: 8bd98c3 + 8bd98c3 Fix a small problem with the new MCP container- it can cause NPEs. Nice. + 34cc42d Fix up some javadoc complaints + - v99.99-pre-1556 Merge pull request #228 from pahimar/master + SlotCrafting fix for damageable container items + - v99.99-pre-1555 Update patches/common/net/minecraft/src/SlotCrafting.java.patch + - v99.99-pre-1554 Fix a small problem with the new MCP container- it can cause NPEs. Nice. + - v99.99-pre-1553 Fix up some javadoc complaints + - v99.99-pre-1552 MCP information is now included in Minecraft Forge. They deserve the credit :) + Update FML: 09eade4 + 09eade4 Update build - include MCP information in the source pack + 9bfe7df MCP deserves lots of credit. So here it is. + - v99.99-pre-1551 Update build - include MCP information in the source pack + - v99.99-pre-1550 MCP deserves lots of credit. So here it is. + - v99.99-pre-1549 Update FML: 8006b77 + 8006b77 Fix instantiation bug + 7cc91cf Simple InterMod comms. Send a message using FMLInterModComms.sendMessage(). Receive messages through an @IMCCallback + 24d7285 Update for MC 1.4.2 + cedf3d5 Duplicate Mod display screen. + - v99.99-pre-1548 Fix instantiation bug + - v99.99-pre-1547 Downgrade to FML 415, issue with new IMC system. + - v99.99-pre-1546 Update to 1.4.2, obf stayed the same, so only small revision. + - v99.99-pre-1545 Simple InterMod comms. Send a message using FMLInterModComms.sendMessage(). Receive messages through an @IMCCallback + - v99.99-pre-1544 Update for MC 1.4.2 + - v99.99-pre-1543 Duplicate Mod display screen. + - v99.99-pre-1542 Update World patch to fix map provider issue. + - v99.99-pre-1541 Add an access transform for Block.setBlockBounds - should help a lot of code that uses this. + Update FML: d915f39 + d915f39 Fix typo in access transformer + 346691c Fix the merge for forge + 6dadc1d Fix up references to minecraftDir in obf code + 8a55f68 Update FML for Minecraft 1.4.1 + 5645fa5 First update to 1.4.1, patches need updating. + ff0f00f Add some null checks, and throw descriptive exception when SideTransformer prevents a class from loading. + - v99.99-pre-1540 Fix typo in access transformer + - v99.99-pre-1539 Update to MC 1.4.1 and Forge 6.0.0 + - v99.99-pre-1538 Fix the merge for forge + - v99.99-pre-1537 Fix up references to minecraftDir in obf code + - v99.99-pre-1536 Update FML for Minecraft 1.4.1 + - v99.99-pre-1535 First update to 1.4.1, patches need updating. + - v99.99-pre-1534 Add some null checks, and throw descriptive exception when SideTransformer prevents a class from loading. + - v99.99-pre-1533 Fix color issues with Dyed Leather armor. + - v99.99-pre-1532 Fix up the setHandeled/setHandled for events, it is now a generalized setResult, the meaning of which is defined by each event. + - v99.99-pre-1531 Cleanup mirrored things in ShapedOreRecipe to address issue 208 and issue 210 + - v99.99-pre-1530 Remove deprecated code. + - v99.99-pre-1529 Fix NPE issue when mods add null EntityFX's to be rendererd. + - v99.99-pre-1528 Update FML: 7a34246 + 7a34246 Ship a client only class so the merge works both sides. + - v99.99-pre-1527 Ship a client only class so the merge works both sides. + - v99.99-pre-1526 Fix install.py so it can be installed properly from src distribution + - v99.99-pre-1525 Update FML (entire change log since last by me): 62a6b52 + 62a6b52 Fix RenderRegistry render ID - now at 36 Fix SpriteMaps - they're running out fast! Switch to forge if you can! RenderBiped now has an armo + b845cde Fix up FML python script for forge + 2c36dfb Update to MCP pre 3. Fixes some weirdnesses with explosions. + acd880d Merge branch '1.4' + e6f57e5 Update for MCP release + b1de0fc Remove fuzz from patches for INetworkManager change + ad44619 Fix for new names INetworkManager and ITexturePack. I also provide refactoring scripts for both, for your use... + 3a94211 Add a script to ignore git complaining about the eclipse workspace changing - run when you first open the eclipse workspace + 9386e23 Update gitignore - ignore the files that will change or be deleted + 10b318c Add in "starter" image for eclipse workspace + 995d5b7 Eclipse workspace fixup 2? + bbb12c8 Clean up eclipse workspace- part 1 + b50058e Clean up a bit of patch fuzz + 4a0bfa9 Fix CommonHandler for rename of the server thread class + 4d1ec66 Update with RC2 MCP. Use the joined.exc file directly since MCP now provides it. + b52e3d0 Fix exception for CodecMus + a1011c9 Fix some compilation issues. Requires resolving the worldclient abstract method + 0ebd4f3 Inital patch update to 1.4 + 89c68c4 Moved into EntityVillager + e4702cb Fix line ending detection during checkout. + 6e64fd7 We don't need logging here... + 014b3f4 remove useless -Server projects + 7628c67 Updated the AT config and Marker config for 1.4 obf + 54a322c Updae build to copy files that may decompile differently but are actually the same, and updated for 1.4 values. + aadf396 Update MCP Merge config. + 81e1855 Pull in MCP's 1.4 conf files. + 5686fd4 Fix error in merging of exec's + - v99.99-pre-1524 Update release script for mcp changes, releases now build. + - v99.99-pre-1523 Updated Forge version to 5.0.0, for 1.4 + - v99.99-pre-1522 Updated World patch, there are a lot of new things happening int he constructor, xcomp should probably vet this. + - v99.99-pre-1521 Teleporting has a new function (func_82448_a), made it so that you can supply your own teleporter to that function, and so it works with dimension movement factors. + - v99.99-pre-1520 Removed Forge's TileEntity.getRenderDistance, now a vanilla feature: TileEntity.func_82115_m + - v99.99-pre-1519 BlockCrops is now the parent class of multiple types of crops, Wheat, Potatoes, and Carrots, updated getBlockDropped patch to reflect. + - v99.99-pre-1518 Patches removing forge spawn protection, now a vanilla feature. + - v99.99-pre-1517 Entities have a new function to determine explosion strength that they create, and implemented Item frame pickblock. + - v99.99-pre-1516 BlockSnow now pretty much just passes harvestBlock to it's super. + - v99.99-pre-1515 Updated Render patches, Bipeds now have the ability to have helmets, of either blocks, or the new 'heads' + - v99.99-pre-1514 Patches that applied with little to no functional changes. + - v99.99-pre-1513 Forge spawn protection removed, now a vanilla feature. + - v99.99-pre-1512 No longer needed, getRenderDistance removed because Vanilla has it now, TileEntity.func_82115_m + - v99.99-pre-1511 Moved to common where it should be + - v99.99-pre-1510 Remove final from 'villageCollectionObj' to allow for delayed setup of Map source objects. + - v99.99-pre-1509 Update for new names in 1.4 + - v99.99-pre-1508 Fix RenderRegistry render ID - now at 36 + Fix SpriteMaps - they're running out fast! Switch to forge if you can! + RenderBiped now has an armorlist- so armortypes add to it as well + - v99.99-pre-1507 Update Forge's AT for 1.4 names. + - v99.99-pre-1506 Fix recompile call for 1.4 MCP change + - v99.99-pre-1505 FML Update for 1.4 + - v99.99-pre-1504 Fix up FML python script for forge + - v99.99-pre-1503 Update to MCP pre 3. Fixes some weirdnesses with explosions. + - v99.99-pre-1502 Merge branch '1.4' + - v99.99-pre-1501 Update for MCP release + - v99.99-pre-1500 Remove fuzz from patches for INetworkManager change + - v99.99-pre-1499 Fix for new names INetworkManager and ITexturePack. I also provide refactoring scripts for both, for your use... + - v99.99-pre-1498 Add a script to ignore git complaining about the eclipse workspace changing - run when you first open the eclipse workspace + - v99.99-pre-1497 Update gitignore - ignore the files that will change or be deleted + - v99.99-pre-1496 Add in "starter" image for eclipse workspace + - v99.99-pre-1495 Eclipse workspace fixup 2? + - v99.99-pre-1494 Clean up eclipse workspace- part 1 + - v99.99-pre-1493 Clean up a bit of patch fuzz + - v99.99-pre-1492 Fix CommonHandler for rename of the server thread class + - v99.99-pre-1491 Update with RC2 MCP. Use the joined.exc file directly since MCP now provides it. + - v99.99-pre-1490 Fix exception for CodecMus + - v99.99-pre-1489 Fix some compilation issues. Requires resolving the worldclient abstract method + - v99.99-pre-1488 Inital patch update to 1.4 + - v99.99-pre-1487 Moved into EntityVillager + - v99.99-pre-1486 Fix line ending detection during checkout. + - v99.99-pre-1485 We don't need logging here... + - v99.99-pre-1484 remove useless -Server projects + - v99.99-pre-1483 Updated the AT config and Marker config for 1.4 obf + - v99.99-pre-1482 Updae build to copy files that may decompile differently but are actually the same, and updated for 1.4 values. + - v99.99-pre-1481 Update MCP Merge config. + - v99.99-pre-1480 Pull in MCP's 1.4 conf files. + - v99.99-pre-1479 Fix error in merging of exec's + - v99.99-pre-1478 Bump version to 4.3, final for 1.3.2 + - v99.99-pre-1477 Remove some test code. + - v99.99-pre-1476 Added ability for mods to cleanly define and display new creative tabs. + - v99.99-pre-1475 Fix classloading issue preventing JRockit from running forge + - v99.99-pre-1474 Forge build change: the universal jar, if installed alongside a server jar file, can be executed to load forge. No server side merging required! + Update FML: 989ab3e + 989ab3e Update build.xml - add a classpath to the manifest. This means the universal jar is now a server side launche + 88f1dc9 Typos! + - v99.99-pre-1473 Update build.xml - add a classpath to the manifest. This means the universal jar is now a server side launcher. + - v99.99-pre-1472 Typos! + - v99.99-pre-1471 Update FML: 470a185 + 470a185 Try and avoid an NPE in crash reports + 0029518 Fix logging problems- log death messages and re-route the server through FML logs properly. + fe7a832 Fix the test mod + a2bc30b Coremods can be specified via the command line: fml.coreMod.load= This will help with developing coremods + bae1f74 Fix classpath for server + 887aa27 Add in the ability for a client to throw a custom exception that displays a custom gui instead of the default error message. + e17f267 Update FML internal classpath. Helpful for coremod devs + 3b9972a Don't use File to separate the last element of the path. It's a URL, they're always separated by '/' + 5c96afe Changed RelauchLibraryManager so that files with different paths on the same baseURL can be implemented in one ILibrarySet. + 1bca393 FML as a whole is now subject to transformers. + 27cf731 Bonus extra character. thanks randomitter! + 94c84cd Merge pull request #116 from Vazkii/patch-1 + c2d3195 Add Null check to FMLClientHandler.sendPacket + - v99.99-pre-1470 Make Item.createEntity only call when its specifically a EntityItem, not a subclass of it. + - v99.99-pre-1469 Try and avoid an NPE in crash reports + - v99.99-pre-1468 Fix logging problems- log death messages and re-route the server through FML logs properly. + - v99.99-pre-1467 Fix the test mod + - v99.99-pre-1466 Coremods can be specified via the command line: fml.coreMod.load= This will help with developing coremods + - v99.99-pre-1465 Fix classpath for server + - v99.99-pre-1464 Add in the ability for a client to throw a custom exception that displays a custom gui instead of the default error message. + - v99.99-pre-1463 Update FML internal classpath. Helpful for coremod devs + - v99.99-pre-1462 Don't use File to separate the last element of the path. It's a URL, they're always separated by '/' + - v99.99-pre-1461 Changed RelauchLibraryManager so that files with different paths on the + same baseURL can be implemented in one ILibrarySet. + - v99.99-pre-1460 FML as a whole is now subject to transformers. + - v99.99-pre-1459 Bonus extra character. thanks randomitter! + - v99.99-pre-1458 Dll files are binary as well. + - v99.99-pre-1457 Ship forgeversion.properties with release zips. Same format as fmlversion.properties. + - v99.99-pre-1456 New Block hook to determine if it can be destroied by the ender dragon, for PR 199 + - v99.99-pre-1455 Allow hook into GuiSlot for background rendering for PR #203 + - v99.99-pre-1454 Change the Crafting damage check to be the same as the usage damage check. (>= -> >) + - v99.99-pre-1453 Fill out the .gitattributes to help with line endings how they should be. + - v99.99-pre-1452 Reorganize the forced chunks a bit- offload the cost of immutable map building to the mods, rather than the chunk tick + - v99.99-pre-1451 Remove @SideOnly from removePotionEffect. Hi RichardG! + - v99.99-pre-1450 Add some accessors to teh ChunkLoader tickets. + - v99.99-pre-1449 Merge pull request #198 from iChun/patch-1 + Fix not passing right render pass to Item class. + - v99.99-pre-1448 Merge pull request #116 from Vazkii/patch-1 + Add Null check to FMLClientHandler.sendPacket + - v99.99-pre-1447 Fix bounds checking on chunkcache. Should fix a bunch of rp2 and maybe other extended tile entity code + - v99.99-pre-1446 Use weak references to the worlds in our maps. WorldClient would otherwise + leak all over the show. + - v99.99-pre-1445 Add Null check to FMLClientHandler.sendPacket + - v99.99-pre-1444 Expose RenderGlobal.field_72738_E (breakingBlocks) and fire OnBreak for items broken in itemUseFirst on the server. Both for Elo + - v99.99-pre-1443 Fix problem with spawning custom entities in hotloaded dimensions. + - v99.99-pre-1442 Fix not passing right render pass to Item class. + - v99.99-pre-1441 Fix a problem with re-entering worlds too quickly- the worlds will now *always* save before the menu re-appears. + - v99.99-pre-1440 Update forge to 4.2 + - v99.99-pre-1439 Merge branch 'master' of git://github.com/Chicken-Bones/MinecraftForge into Chicken-Bones-master + - v99.99-pre-1438 Remove dead WorldInfo patch. Tweak dimension code a bit for better naming, and use the new FML world loading facilities + Update FML: d0e7c9e + d0e7c9e Update patches *sigh* + f3e1cac Add in a savehandler strategy for reading and writing data to the world save. This service is only available to coremods via the WorldAccessConta + 51fb513 Add in some bukkit supporting code. Most of this is unimplemented until the bukkit coremod is complete. + 65c9fdd New stuff on the ModLoader! Risu has been busy. Closes #114 + c1d4458 Mods can now declare a range of minecraft versions they will run against + - v99.99-pre-1437 Update patches *sigh* + - v99.99-pre-1436 Add in a savehandler strategy for reading and writing data to the + world save. This service is only available to coremods via the + WorldAccessContainer interface on the mod wrapper. This is deliberate + and will not change. + - v99.99-pre-1435 Add in some bukkit supporting code. Most of this is unimplemented + until the bukkit coremod is complete. + - v99.99-pre-1434 Merge branch 'XCompWiz-mystcraft' + Merge in mystcraft base edits for a base clean mystcraft. Adds in a lot of extra capabilities + - v99.99-pre-1433 Server player concurrency fix + Fixes an issue where the server can move a player while the player is + moving, process the player's last move (putting the player back where + they were before the teleport), and then complain about the player + moving too fast when the client catches up to it's new position. Also + fixes this issue while riding an entity. Only affects player + client/server movement sync. + - v99.99-pre-1432 Lighting Time fix + score_under's lighting fix that limits and fairly distributes the amount + of time spent on recalculating lighting + - v99.99-pre-1431 MapStorage Fix + Fixes setting and timing of map storage object to allow for the + WorldProvider to use it during initialization + Forces single instance of map storage object (per side) + Moves setting of spawn to after provider setup + - v99.99-pre-1430 Adds world unloading and hotloading calls + Adds world unloaded message to MinecraftServer on save. + Adds world unloading calls to chunk provider/manager when all chunks are + unloaded. + Adds call in MinecraftServer getWorld to hotload world if it isn't + loaded. + - v99.99-pre-1429 Improves DimensionManager + Adds handling for unloading and hotloading of worlds, fixes some typos, + allows for dimensions to be unregistered (allowing save specific + dimension registrations), general changes to match these features. + - v99.99-pre-1428 New stuff on the ModLoader! Risu has been busy. Closes #114 + - v99.99-pre-1427 Mods can now declare a range of minecraft versions they will run against + - v99.99-pre-1426 Fix issue where mushrooms would not check the proper soil block. + - v99.99-pre-1425 Fix issue where light would not properly recalculate. + - v99.99-pre-1424 Add some of the model subsystem to the server. The part that doesn't require openGL. This allows for systems that dual models as collision/selection boxes etc. + - v99.99-pre-1423 Expanded DungeonHooks to allow for adding of custom DungeonLoot values directly, allowing for better control over the generated items. + - v99.99-pre-1422 Made PlayerEvent.BreakSpeed fire when a player cannot harvest the block. Issues #191 and #188 + - v99.99-pre-1421 Update FML: ca1ca4f + ca1ca4f Fix maps supporting greater than byte() dimension sizing + 15ee8bf Fix language registry additions, closes #113 + a08b5b1 Merge pull request #112 from pahimar/master + 8dac58f Added ability to query the Language Registry by key and language for specific localized text, as well as loading in localization text f + - v99.99-pre-1420 Fix maps supporting greater than byte() dimension sizing + - v99.99-pre-1419 Fix language registry additions, closes #113 + - v99.99-pre-1418 Dormant chunk cache might actually work now, and not mix chunks across worlds + - v99.99-pre-1417 Forgot comment, you see nothing... + - v99.99-pre-1416 Fix vanilla bug where the player would load chunks outside its range that would be 'abandoned' and never unloaded. + - v99.99-pre-1415 Fix buckets, need to rethink for bukkit compatibility. + - v99.99-pre-1414 A few requested features of ForgeChunkManager. Mods can specify a + chunkloading config directly in the config file, including chunk + loading overrides if they wish (and the config allows them). + Also added "player" tied tickets that bind to the player and not the + mod's quota. + - v99.99-pre-1413 Location aware version og Block.lightOpacity for PR #169 + - v99.99-pre-1412 Missing updates from last commit + - v99.99-pre-1411 Merge pull request #112 from pahimar/master + Additonal Language Registry functionality + - v99.99-pre-1410 Added preliminarty Player Interact event heavily based on the bukkit event. + - v99.99-pre-1409 Fix bug in last commit that caused block to not break. + - v99.99-pre-1408 Add PlayerEvent.HarvestCheck and PlayerEvent.BreakSpeed for dealing with things related to a player harvesting a block. + - v99.99-pre-1407 Added ability to query the Language Registry by key and language for specific localized text, as well as loading in localization text from a specific file/URL + - v99.99-pre-1406 Fix bug where breaking texture would not apply to top/bottom of beds. + - v99.99-pre-1405 Add in an "EntityEvent.EnteringChunk" event. Useful for your entity chunkloading stuff. + - v99.99-pre-1404 Merge remote-tracking branch 'origin/master' + - v99.99-pre-1403 Support for no BOM. + - v99.99-pre-1402 Update FML: f083707 + f083707 Extreme headless mode is back! + - v99.99-pre-1401 Extreme headless mode is back! + - v99.99-pre-1400 Some more tweaks to the chunkloading code. The world.load event fires slightly later- once the entity watcher is + set up, so entities can actually load into the server world. Also, tickets actually save and load properly + and null entities don't break the server + - v99.99-pre-1399 Update FML: dd39ae5 + dd7502a Fix parent child counts showing properly. Closes #107 thanks scott! + b36d447 It's useMetadata, not usesMetadata. thanks myrathi and psx. closes #110 + efb1066 Fix random shuffling when manipulating biomes by using a LinkedHashSet to preserve iteration order. Closes #111 + - v99.99-pre-1398 Fix parent child counts showing properly. Closes #107 thanks scott! + - v99.99-pre-1397 It's useMetadata, not usesMetadata. thanks myrathi and psx. closes #110 + - v99.99-pre-1396 Fix random shuffling when manipulating biomes by using a LinkedHashSet to preserve iteration order. Closes #111 + - v99.99-pre-1395 > != >= + - v99.99-pre-1394 Fix Configuration.getItem to return pre-shifted values suitible to pass into Item constructors. + - v99.99-pre-1393 Fire off PlayerDestroyItemEvent for crafting contianer items that get damaged to much. PR #183 + - v99.99-pre-1392 Changed Configuration to use overloaded methods, and changed the order of arguments to be Category, Key, Value instead of Key, Category, Value to hopefully help cleanup some peopels code. + Added function to get a free Item id. Will only accept values that are not in the block space. Needs testing. + Marked all the old getOrCreate* functions as deprecated. + - v99.99-pre-1391 Configuration will now attempt to detect the encoding of the file using the Byte Order Mark. + - v99.99-pre-1390 Fix up some config file handling to be even more resilient. + - v99.99-pre-1389 Support quoting in property and category names for almost all possible characters allowed + - v99.99-pre-1388 Fix some errors if the config is unparseable. It should log an exception and carry on with defaults. + - v99.99-pre-1387 More modifications to the ticket callback handling system. There are up to two callbacks during world loading now. One to allow + selective preference for ticket types. The other to actually allow the mod to force chunks. + - v99.99-pre-1386 Some changes to the ForgeChunkManager. + Null modData is allowed now. + The entity id is actually properly persisted in the ticket now. + There is a new "orderedLoadingCallback" that allows you to provide a preferred ticket loading order in case of "excess tickets". Also, tickets + that are not in the returned list are now unregistered. + There is a way to resort the chunks in the forced chunklist on a ticket now. + Log the dormant cache configuration + - v99.99-pre-1385 Update FML: dd39ae5 + dd39ae5 Try and fix the newline capture so consoles show on the server on windows again + b39f808 Readd ancient searge name so dan200 and computercraft can run again. REMOVE THAT CODE DAN. + - v99.99-pre-1384 Try and fix the newline capture so consoles show on the server on windows again + - v99.99-pre-1383 Readd ancient searge name so dan200 and computercraft can run again. REMOVE THAT CODE DAN. + - v99.99-pre-1382 Update FML: a2c059e + a2c059e Fix missing import. Thanks ichun :( + 19316a0 Version file searching should work for directories too + fbc7a5c Fix bug causing NPE if non-whitelisted player joins an FML server without FML installed + e9cfd10 Merge pull request #103 from iChun/patch-2 + 1424883 Fixed ModTextureAnimation not updating and not binding to correct image. + - v99.99-pre-1381 Some more fixes for chunkloading code. Works very reliably now. + - v99.99-pre-1380 Delete some debug code + - v99.99-pre-1379 Simple chunk caching capability for the chunkloader. This will store "dormant" chunks in a + configurable cache, potentially saving the cost of reloading them from disk. + - v99.99-pre-1378 And a concurrentmodificationexception in the same code + - v99.99-pre-1377 Fix NPE in ForgeChunkManager + - v99.99-pre-1376 Remove @SideOnly flag for function now required on the server + - v99.99-pre-1375 A lot of tweaks to the chunkloading for entity behaviour. Entities are now bound by a new + persistent id they *all* have, on the server side. + - v99.99-pre-1374 Working cross dimensional implementation of chunkloading for Forge. + - v99.99-pre-1373 Simple chunkloading implementation + - v99.99-pre-1372 Fix patch errors in merge of last PR -.- + - v99.99-pre-1371 Merge pull request #181 from micdoodle8/patch-1 + Fixed WorldProvider.setDimension() setting the wrong variable. + - v99.99-pre-1370 Update patches/common/net/minecraft/src/WorldProvider.java.patch + Fixed WorldProvider.setDimension() setting the wrong variable. + - v99.99-pre-1369 Fix missing import. Thanks ichun :( + - v99.99-pre-1368 Version file searching should work for directories too + - v99.99-pre-1367 Fix bug causing NPE if non-whitelisted player joins an FML server without FML installed + - v99.99-pre-1366 Fix accedental doubling of shift, Fixes saplings/flowers planting a space above where they should + - v99.99-pre-1365 New Plant API that allows for custom plants/soils. + - v99.99-pre-1364 Added new hooks for modifying the items generated in chests during world gen. + - v99.99-pre-1363 Merge pull request #103 from iChun/patch-2 + Fixed ModTextureAnimation not updating and not binding to correct image. + - v99.99-pre-1362 Redirect a lot of functions through WorldProvider for Mystcraft, allowing them to be overriden by the provider. + - v99.99-pre-1361 Merge pull request #173 from CovertJaguar/patch-5 + Fixed Entity Item render helper + - v99.99-pre-1360 Merge pull request #175 from iChun/patch-2 + Fix pick block key giving invalid spawn eggs + - v99.99-pre-1359 Added side sensitivity to standard EntityDiggingFX, added Block functions to override spawning of digging and breaking effects. + - v99.99-pre-1358 Logic derp (again) + - v99.99-pre-1357 Logic derped + - v99.99-pre-1356 Fix pick block key giving invalid spawn eggs + - v99.99-pre-1355 Fixed ModTextureAnimation not updating and not binding to correct image. + - v99.99-pre-1354 Fix potential NPE in Custom item entity span code caused by item id misconfigurations. + - v99.99-pre-1353 Fix recursion issue with new special item entity code. + - v99.99-pre-1352 Fixed Entity Item render helper + - v99.99-pre-1351 Update FML: 6c746ec + 6c746ec Tidy code + aacbfeb Change version.properties search slightly, allow access to found file from the preinit event + 1513b36 Add in the capability to read an internal version as .version from a file in the zip call versi + 35852a6 Fix up reversed assignment for version fallback + - v99.99-pre-1350 Tidy code + - v99.99-pre-1349 Change version.properties search slightly, allow access to found file from the preinit event + - v99.99-pre-1348 Add in the capability to read an internal version as .version from a file + in the zip call version.properties. Handy for autobuilding scripts. + - v99.99-pre-1347 Fix up reversed assignment for version fallback + - v99.99-pre-1346 Readd reverted EntityLiving patch + - v99.99-pre-1345 Merge remote-tracking branch 'origin/master' + - v99.99-pre-1344 96537dc - Fixup Item in hand rendering of textures > 16x + e88ddc5 - Make the exception print for headless servers if the Downloader cant initalize. + f24ff07 - Remove a bunch of warning about javadoc, not a real fix, but no more warning. + 3420ea7 - Update MCP Mapings + 87104f0 - Makes GetModSrc check the common folder when attempting to extract source files + 640446b - Tie parent/child containers together again. Should close #96 + 2cf4917 - Village mating produces added villagers, and the egg should place added villagers too. Closes #97. + 6394ee8 - Clean up stale references to the Player stored in the NetworkRegistry, closes #100 + 7299e05 - Merge pull request #99 from CovertJaguar/patch-1 + c4bd040 - More readable init logs + - v99.99-pre-1343 Fixup Item in hand rendering of textures > 16x + - v99.99-pre-1342 Make the exception print for headless servers if the Downloader cant initalize. + - v99.99-pre-1341 Remove a bunch of warning about javadoc, not a real fix, but no more warning. + - v99.99-pre-1340 Update MCP Mapings + - v99.99-pre-1339 Makes GetModSrc check the common folder when attempting to extract source files + - v99.99-pre-1338 Tie parent/child containers together again. Should close #96 + - v99.99-pre-1337 Village mating produces added villagers, and the egg should place + added villagers too. Closes #97. + - v99.99-pre-1336 Clean up stale references to the Player stored in the NetworkRegistry, + closes #100 + - v99.99-pre-1335 Merge pull request #99 from CovertJaguar/patch-1 + More readable state event logs + - v99.99-pre-1334 More readable init logs + - v99.99-pre-1333 Package all of paulscode/ with the universal jar to help mac users who cant understand how to merge folders -.- + - v99.99-pre-1332 Bump version to 4.1.2 to mark the end of todays changes. + - v99.99-pre-1331 Move spawn fuzz to WorldProvider/WorldType, useful for VoidWorld types. + - v99.99-pre-1330 Allow for respawning in different dimensions. + - v99.99-pre-1329 Read/Write config files as UTF-8 instead of ANSII, should fix issue with Turkish people. + - v99.99-pre-1328 Fix potential issue with custom events where the constructor is not visible from the EventBus class, Should never arise but meh. + - v99.99-pre-1327 Add ability for Items to create custom Entities for themselves when added to the world, PR: #151 + - v99.99-pre-1326 Move Forge init message to MinecraftForge.initalize + - v99.99-pre-1325 Make EntityJoinWorldEvent Cancelable properly + - v99.99-pre-1324 Merge pull request #146 from dries007/Fly + Allow flight permissions to be player sensitive + - v99.99-pre-1323 Implemented isBlockFoliage for pull #141 + - v99.99-pre-1322 Fix a few patch fuzzes + - v99.99-pre-1321 New EntityItem related events + Fixed player death event in SMP + Added Player specific drops event + Added generic EntityJoinWorldEvent + - v99.99-pre-1320 Clean up some javadoc warnings. + - v99.99-pre-1319 EntityLiving variation of drawBlockDamageTexture to allow for Non-player viewports. + - v99.99-pre-1318 Fix FillBucketEvent to work with stacked buckets. New change in 1.3 + - v99.99-pre-1317 Update FML: 89b8236 + 89b8236 Fix onConnectionClosed not being called on the client side of a connection + - v99.99-pre-1316 Fix onConnectionClosed not being called on the client side of a connection + - v99.99-pre-1315 Remove all references to ModLoader + - v99.99-pre-1314 Bump version to 4.1.1 + - v99.99-pre-1313 Update FML: 70f55c5 + 70f55c5 Add in exclusion list for IFMLLoadingPlugin. + 1c1716d Remove debug cruft + d567f79 To properly align with packet9respawn, make packet1login's dimension an int as well + ecd4e46 Attempt to build some protocol negotiation, and fix packet1login so that the dimension is a short, matching packet9respawn + 16fe495 Compatibility level is now passed from server to client - and the client tracks it. This means certain packet changes can be made without b + 4f70d23 Fix dependency checking: you can depend on specific versions of FML + - v99.99-pre-1312 Add in exclusion list for IFMLLoadingPlugin. + - v99.99-pre-1311 Remove debug cruft + - v99.99-pre-1310 To properly align with packet9respawn, make packet1login's dimension an int as well + - v99.99-pre-1309 Attempt to build some protocol negotiation, and fix packet1login so that the dimension is a short, matching packet9respawn + - v99.99-pre-1308 Compatibility level is now passed from server to client - and + the client tracks it. This means certain packet changes can be made + without breaking comms, hopefully + - v99.99-pre-1307 Fix dependency checking: you can depend on specific versions of FML + - v99.99-pre-1306 Update FML: 290a3c9 + 290a3c9 Merge pull request #94 from iChun/patch-1 + 9485dc5 Fix handleTinyPacket using short instead of int. + - v99.99-pre-1305 Merge pull request #94 from iChun/patch-1 + Fix handleTinyPacket using short instead of int. + - v99.99-pre-1304 Fix handleTinyPacket using short instead of int. + Silly cpw :P + - v99.99-pre-1303 Update FML: e6abb69 + e6abb69 Fix up tiny packet handler to actually work + e862052 Allow javax to be shipped by mods. Should allow some more modloader mods to work unaltered + 4071ad1 Add in a little bit of protocol cleanup. Start work on allowing multiple protocol versions + 6061964 Give a way to build the packet131mapdata packet correctly populated + b818769 Capture and leverage Packet131MapData + - v99.99-pre-1302 Fix up tiny packet handler to actually work + - v99.99-pre-1301 Allow javax to be shipped by mods. Should allow some more modloader mods to work + unaltered + - v99.99-pre-1300 Add in a little bit of protocol cleanup. Start work on allowing multiple + protocol versions + - v99.99-pre-1299 Give a way to build the packet131mapdata packet correctly populated + - v99.99-pre-1298 Capture and leverage Packet131MapData + - v99.99-pre-1297 Fix placing torches and the like on inverted woden slabs. + - v99.99-pre-1296 Update FML: 12bc4ba + 12bc4ba Make console logging pass through a single logging thread to avoid concurrency problems with launchers and stuff + 8fccfa2 Overlooked chat message support *sigh*. Fixes wierd mods that communicate through custom chat messages rather than + a697d04 Rescan mod packages where there was a possible mod identified to try and make sure we load it. Fixes Matmos r16 + - v99.99-pre-1295 Make console logging pass through a single logging thread to avoid concurrency problems with launchers and stuff + - v99.99-pre-1294 Overlooked chat message support *sigh*. Fixes wierd mods that communicate through custom + chat messages rather than anything else. Hi Superior enchanting! + - v99.99-pre-1293 Rescan mod packages where there was a possible mod identified to try and make sure we load it. Fixes Matmos r16 + - v99.99-pre-1292 Update FML: 9d812f1 + 9d812f1 And handle the other way to globally register an entity + 869cf78 Fix up mods trying to register entities outside of modloading. Now you'll get a big fat warning for doing such a de + 186680c Fix CJB mod compatibilty for real. Gui container registration can now happen in the constructor. YUK! + 5aed6d9 Fix compatibility with ModLoader dispenser hook. Fixes a bug with IDispenseHandler too - though it means that inter + 3d7a665 Fix headless operation, hopefully + - v99.99-pre-1291 And handle the other way to globally register an entity + - v99.99-pre-1290 Fix up mods trying to register entities outside of modloading. Now you'll get a big fat warning for doing such a derpy thing. + - v99.99-pre-1289 Fix CJB mod compatibilty for real. Gui container registration can now happen in the constructor. YUK! + - v99.99-pre-1288 Fix compatibility with ModLoader dispenser hook. Fixes a bug with + IDispenseHandler too - though it means that interface is now + deprecated + - v99.99-pre-1287 Fix headless operation, hopefully + - v99.99-pre-1286 Update FML: 10a7169 + 10a7169 Fix up trying to re-add stuff to the classpath when it's already there + 0eb7180 Fix out of range entity id handling for ModLoader mods a bit more. Thanks Herobrine mod! + b1b4c61 Expose GuiMerchantButton + 359cfb5 Log a big fat warning for the developer in the case the network version is not acceptable to the mod itself. (This can happen because of a bad range specifier for example) + - v99.99-pre-1285 Fix up trying to re-add stuff to the classpath when it's already there + - v99.99-pre-1284 Fix out of range entity id handling for ModLoader mods a bit more. Thanks Herobrine mod! + - v99.99-pre-1283 Expose GuiMerchantButton + - v99.99-pre-1282 Log a big fat warning for the developer in the case the network version + is not acceptable to the mod itself. (This can happen because of a bad range + specifier for example) + - v99.99-pre-1281 Update FML: 8656fd5 + 8656fd5 Also, make missing entity not blow things up + 25a4dcb Fix entity tracker "update" packet not computing correctly. Should work now.. + - v99.99-pre-1280 Also, make missing entity not blow things up + - v99.99-pre-1279 Fix entity tracker "update" packet not computing correctly. Should work now.. + - v99.99-pre-1278 Update FML: c90a853 + c90a853 Fix up addRenderer to catch exceptions from the basemod, also, addrenderer now supplies a list of the default renderers from MC for editing and will note the + 18069d8 Change download location for FML libraries to files.minecraftforge.net, add an encoding param to the javac command line to force utf 8 + a40f4a7 Add in random jar/zip files to the classpath. UGH this is so fucking ugly it's not funny. + 5b6460b Use a null socket and try to prefer the result of getLocalHost in the broadcast data. + - v99.99-pre-1277 Fix up addRenderer to catch exceptions from the basemod, also, addrenderer now supplies a list of the + default renderers from MC for editing and will note the changes made. + - v99.99-pre-1276 Change download location for FML libraries to files.minecraftforge.net, add an encoding param to the javac command line to force utf 8 + - v99.99-pre-1275 Add in random jar/zip files to the classpath. UGH this is so fucking ugly it's not funny. + - v99.99-pre-1274 Allow flight,player sensitive + - v99.99-pre-1273 Use a null socket and try to prefer the result of getLocalHost in the broadcast data. + - v99.99-pre-1272 Update FML: c0d1348 + c0d1348 Add in an ItemRenderer null check so FML can run render adding mods + 482c163 Inverted boolean logic. Grrr. + 221d113 ModLoader mob spawns use packet 24- build a bypass system so that they can still use it + f19f426 Remove debug statements + - v99.99-pre-1271 Add in an ItemRenderer null check so FML can run render adding mods + - v99.99-pre-1270 Inverted boolean logic. Grrr. + - v99.99-pre-1269 ModLoader mob spawns use packet 24- build a bypass system so that + they can still use it + - v99.99-pre-1268 Remove debug statements + - v99.99-pre-1267 Update FML: 9dd9b6e + 9dd9b6e Fix keybindings not loading properly from gamesettings file after restart + - v99.99-pre-1266 Fix keybindings not loading properly from gamesettings file after restart + - v99.99-pre-1265 Fix silk touch on Ender Chests. + - v99.99-pre-1264 Merge pull request #142 from ShetiPhian/movecheck_override + Server mods can now use noClip to push players through solid blocks without is being an invalid move and resetting the players position. Useful for creating semi-solid blocks like quicksand. + - v99.99-pre-1263 Fix Issue #140: Custom items not properly having texture applied for partical effects. + - v99.99-pre-1262 Update FML: acb0b21 + acb0b21 Fix so we always send received packets to handlers. Renders 250 filtering useless unless i can figure a way to intercept + - v99.99-pre-1261 Fix so we always send received packets to handlers. + Renders 250 filtering useless unless i can figure a way to intercept *outbound* packets that isn't as messy as I'm + contemplating + - v99.99-pre-1260 Update FML: b17dd3c + b17dd3c Some tests + fa66ffa Fix trying to load the client side packet handler, when on the server, hopefully? + b106420 Fix up network negotiation - now it will disconnect with a nice error screen if there are missing mods on the client vs se + - v99.99-pre-1259 Some tests + - v99.99-pre-1258 Fix trying to load the client side packet handler, when on the server, hopefully? + - v99.99-pre-1257 Fix up network negotiation - now it will disconnect with a nice + error screen if there are missing mods on the client vs server + - v99.99-pre-1256 Update FML: c971adb + c971adb Fix missing addCommand call: thanks "spawnwolf test command" + d6326de Fix a couple of modloader mods. Thanks! + 483667c Some functionality fixes for @Instance injection. + 8bef512 Versions now have two flavours: the @Mod(version) which is the "programmatic version" and is used for all version relationship calculatio + 501009c Always for ML mods into "public" class accessibility - we don't call from the default package like ML does. + d3d4308 Add in a convenience method for getting a class instance based on existence of another Mod. Useful for soft dependencies. + - v99.99-pre-1255 Fix missing addCommand call: thanks "spawnwolf test command" + - v99.99-pre-1254 Fix a couple of modloader mods. Thanks! + - v99.99-pre-1253 Some functionality fixes for @Instance injection. + - v99.99-pre-1252 Versions now have two flavours: the @Mod(version) which is the "programmatic version" and + is used for all version relationship calculation. The "display version" as sourced from + mcmod.info is used for display purposes only and can be literally anything. Note: they fall back + to one another when they're missing, and to "1.0" if both are absent. + Also, changed @Instance. Now, you can inject *other* mods using @Instance as long as you depend + on them as a "before" or "dependency" relationship. Classes containing @Instance will only be + loaded if the Mod the @Instance refers is present. So you don't have to worry about runtime class + resolution. + - v99.99-pre-1251 Update patches/common/net/minecraft/src/NetServerHandler.java.patch + Update patches/common/net/minecraft/src/NetServerHandler.java.patch + Server mods can now use noClip to push players through solid blocks without is being an invalid move and resetting the players position. + Useful for creating semi-solid blocks like quicksand. + - v99.99-pre-1250 Always for ML mods into "public" class accessibility - we don't call from the default package like ML does. + - v99.99-pre-1249 Add in a convenience method for getting a class instance based on + existence of another Mod. Useful for soft dependencies. + - v99.99-pre-1248 Update FML: 2d9b88b + 2d9b88b And more mod sorting fixes. + 93d5934 Actually *use* the sorted mod list + - v99.99-pre-1247 Fix FillBucketEvent to actually fire. + - v99.99-pre-1246 Fix call to createTileEntity on blocks that extend BlockContainer. + - v99.99-pre-1245 And more mod sorting fixes. + - v99.99-pre-1244 Actually *use* the sorted mod list + - v99.99-pre-1243 Update FML: 180a279 + 180a279 Merge pull request #82 from Chicken-Bones/master + cf38461 The access transformer will now handle classes in packages. + 2c85539 Reverse the meaning of state in fml.modStates system property and fmlModState.properties - it was very derpy before. Now: true is enabled, false is disabled, as you would expect + d651189 Actually fix the corrupt JSON problem + f6a8cd5 Fix isModLoaded for "disabled" mods, and the toposort as well + 3bde961 A bit more information for dependency handling + 6396bea Fix up handing corrupt mcmod.info + 6bc6def Fix a problem with network ids + 7328610 Fix up version handling properly. Hopefully, and the error screen. + 9fcc452 Only active mods should have dependencies checked, and be sorted + 26302a6 Fix oddity with Screen, print a version out in the sorted list! + - v99.99-pre-1242 Merge pull request #82 from Chicken-Bones/master + The access transformer will now handle classes in packages. + - v99.99-pre-1241 The access transformer will now handle classes in packages. + Eg. + public net/minecraft/client/Minecraft.T #timer + - v99.99-pre-1240 Reverse the meaning of state in fml.modStates system property and fmlModState.properties - it was very + derpy before. Now: true is enabled, false is disabled, as you would expect + - v99.99-pre-1239 Actually fix the corrupt JSON problem + - v99.99-pre-1238 Fix isModLoaded for "disabled" mods, and the toposort as well + - v99.99-pre-1237 A bit more information for dependency handling + - v99.99-pre-1236 Fix up handing corrupt mcmod.info + - v99.99-pre-1235 Fix a problem with network ids + - v99.99-pre-1234 Fix up version handling properly. Hopefully, and the error screen. + - v99.99-pre-1233 Only active mods should have dependencies checked, and be sorted + - v99.99-pre-1232 Fix oddity with Screen, print a version out in the sorted list! + - v99.99-pre-1231 Update FML: 62dbfb3 + 62dbfb3 Fix metadata + - v99.99-pre-1230 Fix metadata + - v99.99-pre-1229 Update FML: b91cbe9 + b91cbe9 Fix up versioned dependencies so they work a lot better, also add in a missing mods screen + - v99.99-pre-1228 Fix up versioned dependencies so they work a lot better, also add in a missing mods screen + - v99.99-pre-1227 Update FML: 93b8ba9 + 93b8ba9 Fix missing serverSendPacket + 23fdbbd Trading support for ModLoader - thanks Herblore! + d7a74d8 Close the jar, for cleanliness sake + 58e6dd9 Fix authors - it'll read both "authors" and "authorList" from the json now + 907cf2d More ML compatibility - fix up dragon mounts, thanks! + ee48a36 Fix up loading mods that are grandchildren of BaseMod + c6f362b Fix entity handling for ModLoader mods, thanks parachute mod! + - v99.99-pre-1226 Fix missing serverSendPacket + - v99.99-pre-1225 Trading support for ModLoader - thanks Herblore! + - v99.99-pre-1224 Close the jar, for cleanliness sake + - v99.99-pre-1223 Fix authors - it'll read both "authors" and "authorList" from the json now + - v99.99-pre-1222 More ML compatibility - fix up dragon mounts, thanks! + - v99.99-pre-1221 Fix up loading mods that are grandchildren of BaseMod + - v99.99-pre-1220 Fix entity handling for ModLoader mods, thanks parachute mod! + - v99.99-pre-1219 Fix lighting issue for air related to 4096 fix. + - v99.99-pre-1218 Merge remote-tracking branch 'origin/master' + - v99.99-pre-1217 Removed deprecated ISpawnHandler, that never worked in 1.3.2 so noone should be using it. See FML's replacement. + - v99.99-pre-1216 Made helper hooks for EntityLiving and EntityRenderer hooks for Optifine + - v99.99-pre-1215 Update FML: 6e01c59 + 6e01c59 Merge ChickenBones pull into FML - adds player trackers + a0cbd37 More precise error handling when an invalid class is present + 12323e2 Fix textures not applying properly + 789a4a3 Fix up entity spawning - hopefully they won't warp anymore. + a87d045 Add in a helper on the server start event for adding commands to the server. + 82e9309 Move villager trading hook up a bit. thanks sengir. + 8deaa37 Fix LAN to try hard to find a real network interface, not just localhost most of the time + b5363e3 Update build to not bother building client jar. Universal is everything now. + - v99.99-pre-1214 Merge ChickenBones pull into FML - adds player trackers + - v99.99-pre-1213 Fix formatting + - v99.99-pre-1212 Tweak patches and hooks slightly + - v99.99-pre-1211 More precise error handling when an invalid class is present + - v99.99-pre-1210 Fix textures not applying properly + - v99.99-pre-1209 Fix up entity spawning - hopefully they won't warp anymore. + - v99.99-pre-1208 Add in a helper on the server start event for adding commands to + the server. + - v99.99-pre-1207 Move villager trading hook up a bit. thanks sengir. + - v99.99-pre-1206 Fix LAN to try hard to find a real network interface, not just localhost + most of the time + - v99.99-pre-1205 Update build to not bother building client jar. Universal is everything + now. + - v99.99-pre-1204 Null protection for ticks() -- probably should uses EnumSet.noneOf() but + you can also use null now to stop ticking. closes #77 + - v99.99-pre-1203 More precise error handling when an invalid class is present + - v99.99-pre-1202 Fix textures not applying properly + - v99.99-pre-1201 Pickblock now replaces the currently selected item if it could not find a empty space. + - v99.99-pre-1200 Merge pull request #135 from dvrabel/minecart-drag + Use original minecart drag co-efficients for regular carts. + - v99.99-pre-1199 FML will now search '/forge/accesstransformers' for user defined access transformer config files to be applied during forge setup + - v99.99-pre-1198 Added IPlayerTracker hooks + - v99.99-pre-1197 Fix up entity spawning - hopefully they won't warp anymore. + - v99.99-pre-1196 Add in a helper on the server start event for adding commands to + the server. + - v99.99-pre-1195 Move villager trading hook up a bit. thanks sengir. + - v99.99-pre-1194 Fix LAN to try hard to find a real network interface, not just localhost + most of the time + - v99.99-pre-1193 Update build to not bother building client jar. Universal is everything + now. + - v99.99-pre-1192 Update FML: 28a10ac + 28a10ac Null protection for ticks() -- probably should uses EnumSet.noneOf() but you can also use null now to stop ticking. closes #77 + c349d51 Automatic mod entity registration into the global entity list. This might break entity code out there, sorry, but this way for most entities you no longer need to manage the global mod entity stuff at all. just remove it. FML will take care of the rest (note, worlds won't load the old entities) + ef01745 Add in a utility function that *might* tell you the context you're running in on either client or server: FMLCommonHandler.getEffectiveSide + c97d6a6 Try and stop sendPacketToAllAround from being crashy + 2062273 Mods can add mod specific crash information to the crash report now Forge needs to implement MinecraftForge.getCrashCallable + 6e6436e Fix up dispenser handling, add in new params for the dispenser: breaks IDispenseHandler, sorry + 38f4a22 Fix up MLProp handling for null info + 3a8b047 GUIs working in FML for ML mods + 52483ee Support gui opening for Shelf mod + dce1cbc Updated MCPMerger to annotate unique classes with there sides, and SideTransformer to null out any class that is loaded on the wrong side. + - v99.99-pre-1191 Null protection for ticks() -- probably should uses EnumSet.noneOf() but + you can also use null now to stop ticking. closes #77 + - v99.99-pre-1190 Automatic mod entity registration into the global entity list. This might break + entity code out there, sorry, but this way for most entities you no longer + need to manage the global mod entity stuff at all. just remove it. FML will + take care of the rest (note, worlds won't load the old entities) + - v99.99-pre-1189 Add in a utility function that *might* tell you the context + you're running in on either client or server: FMLCommonHandler.getEffectiveSide + - v99.99-pre-1188 Try and stop sendPacketToAllAround from being crashy + - v99.99-pre-1187 Mods can add mod specific crash information to the crash report now + Forge needs to implement MinecraftForge.getCrashCallable + - v99.99-pre-1186 Update FML to 304: + Client side only classes are properly annotated, and denied loading on server side + Added missing client side only ModLoader.getContainerGUI function + Guis work for FML mods now. + Fixed MLProp handeling of null info + Fix up dispenser handling, add in new params for the dispenser: breaks IDispenseHandler, sorry + - v99.99-pre-1185 Fix up dispenser handling, add in new params for the dispenser: breaks IDispenseHandler, sorry + - v99.99-pre-1184 Fix up MLProp handling for null info + - v99.99-pre-1183 GUIs working in FML for ML mods + - v99.99-pre-1182 Support gui opening for Shelf mod + - v99.99-pre-1181 Use original minecart drag co-efficients for regular carts. + Since the amount of speed lost is 1 - co-eff, rounding 0.997 to 0.99 + makes a big difference to the distance a minecart will travel (less + than half of the distance in vanilla 1.25). + - v99.99-pre-1180 Updated MCPMerger to annotate unique classes with there sides, and SideTransformer to null out any class that is loaded on the wrong side. + - v99.99-pre-1179 Updated onItemUseFirst call to include the new hit vector information, and updated readme. + - v99.99-pre-1178 Added missing server side onBlockStartBreak hook, fixes Sheers. + - v99.99-pre-1177 Fixed Forge's 4096 block filler initalization. + - v99.99-pre-1176 Fix IndexOutOfBounds exception, Major derp. + - v99.99-pre-1175 Update FML: 46c563a + 46c563a Expose more of the village construction parts for building village piece + 1380c2e Allow access to the type "ComponentVillage" + 71a3818 Documentation and registration for villager stuff + e3a343c Fix javadoc derp + 195b1a0 Villager trading, manipulation and village enhancement. Still WIP but sh + 69e66c3 Fix exception based logging to actually log the exception! + - v99.99-pre-1174 Expose more of the village construction parts for building village + pieces + - v99.99-pre-1173 Allow access to the type "ComponentVillage" + - v99.99-pre-1172 Documentation and registration for villager stuff + - v99.99-pre-1171 Fix javadoc derp + - v99.99-pre-1170 Villager trading, manipulation and village enhancement. Still WIP but should be functional + - v99.99-pre-1169 Fix exception based logging to actually log the exception! + - v99.99-pre-1168 Update FML: + 885637c Fix up keyboard events for modloader + 90a7c8f Pickup notification + - v99.99-pre-1167 Fix up keyboard events for modloader + - v99.99-pre-1166 Pickup notification + - v99.99-pre-1165 Changed order in which EntityItemPickupEvent is called, it will no longer be called if the 'delay' on the item is still active. Also EntityItems that are in the world with invalid item stacks will now kill themselves. + - v99.99-pre-1164 Merge pull request #129 from heldplayer/skyRenderer + Re: Adds a SkyProvider class that can handle the rendering of the sky + - v99.99-pre-1163 Move and add a few AT for forge: rail and leaves stuff mostly + Update FML (reorg some AT for FML vs forge): + 2171c0c Update fml_at with new transforms + 924a6f9 Fix derp where client sided packet handler would be created on a dedi server env + ad4cffb Add in support for "dummy" keybindings- ones that are added to the list but never do anything so the mod can handle it all themselves. + cf77ffb Don't complain about minecraft source code being in "net.minecraft.src". Derp. + b2fdcd7 Fix ModLoader add XP Smelting + 094ce2a Actually register client/server packetspecs as their correct sides! fixes #71 + - v99.99-pre-1162 Update fml_at with new transforms + - v99.99-pre-1161 Fix derp where client sided packet handler would be created on a dedi server env + - v99.99-pre-1160 Adds a SkyProvider class that can handle the rendering of the sky + - v99.99-pre-1159 Add in support for "dummy" keybindings- ones that are added to the list but never do anything + so the mod can handle it all themselves. + - v99.99-pre-1158 Don't complain about minecraft source code being in "net.minecraft.src". Derp. + - v99.99-pre-1157 Fix ModLoader add XP Smelting + - v99.99-pre-1156 Actually register client/server packetspecs as their correct sides! fixes #71 + - v99.99-pre-1155 Fix MC packet bugs for remote servers that use blocks with ids > 256 + - v99.99-pre-1154 Fixed bug in EntityMinecart that would cause them to fall through the ground at the bottom of slopes. + - v99.99-pre-1153 Update FML: + e8cb2c1 Error if channel name is invalid - either too short, or too long + 9c6c56c Add a connect and read timeout for downloading libraries. This should really stop the "waiting forever" at startup screen. + 0d5affe GIANT FAT WARNINGS if you use any code in net.minecraft.src or any subpackage thereof. Get it out of there, now! + 13f210f Fix up ML GUI ticking. Thanks sharose! + - v99.99-pre-1152 Error if channel name is invalid - either too short, or too long + - v99.99-pre-1151 Update WorldProvider.path diff. + - v99.99-pre-1150 Added timeout to MC's download of sound resouces. + - v99.99-pre-1149 Fix EntityItemPickupEvent 'pop' sound spamming. + - v99.99-pre-1148 Fixed EntityEvent.CanUpdate + - v99.99-pre-1147 Add a connect and read timeout for downloading libraries. This should really stop the "waiting forever" at startup screen. + - v99.99-pre-1146 GIANT FAT WARNINGS if you use any code in net.minecraft.src or any subpackage thereof. Get it out of there, now! + - v99.99-pre-1145 Fix up ML GUI ticking. Thanks sharose! + - v99.99-pre-1144 Update fml: + c61ad51 Organize ALL the imports + c0842b0 Expose the server in serverstart event + 2851079 Fix up directory injection of log file locations + 5197524 Refer to FMLLog, not FMLRelaunchLog + 78efd1a Tidy up server launch - reflection not required anymore + eee0a99 Also, log what the directory discoverer finds for mcmod.info + 10c96c3 And log the exception if it has a problem reading the jar file + 07cc3fb Fix jar loader failing to inject any metadata at all if mcmod.info is not found. + e31f143 Change install.cmd to install.bat, why, cuz people are .... Updated readme to mention needing server and client. + - v99.99-pre-1143 Organize ALL the imports + - v99.99-pre-1142 Expose the server in serverstart event + - v99.99-pre-1141 Fix up directory injection of log file locations + - v99.99-pre-1140 Refer to FMLLog, not FMLRelaunchLog + - v99.99-pre-1139 Tidy up server launch - reflection not required anymore + - v99.99-pre-1138 Also, log what the directory discoverer finds for mcmod.info + - v99.99-pre-1137 And log the exception if it has a problem reading the jar file + - v99.99-pre-1136 Fix jar loader failing to inject any metadata at all if mcmod.info is not found. + - v99.99-pre-1135 Change install.cmd to install.bat, why, cuz people are .... Updated readme to mention needing server and client. + - v99.99-pre-1134 Update FML to include some ML compatibility fixes. Minimap should run, assuming he + recompiles against standard ML interfaces. + This updates to official MCP 7.2, so you'll need to rebuild your workspace (some + small but important patches to MCP went in) + - v99.99-pre-1133 Some compatibility fixes for Rei's minimap, and tidy up a couple of things + - v99.99-pre-1132 Fix Forge branding string call + - v99.99-pre-1131 Update FML for mcp 72 final, change download location for FML files, and make the stop button work. + Hello is NOT going to go away :) + - v99.99-pre-1130 Allow white space in the property name. + - v99.99-pre-1129 Update FML, make the .sh scripts executable + - v99.99-pre-1128 Fix critical bug in FML load controller that complains about injected mod containers + - v99.99-pre-1127 Update FML to 285 + - v99.99-pre-1126 Handle the case where a mod tries to do something stateful during constructor phase, and log a big + fat message about it. Don't do it! + - v99.99-pre-1125 Small fixes, including showing the FULL name of Forge Mod Loader + - v99.99-pre-1124 Fix up null array in keybinding handler + - v99.99-pre-1123 Actually add in the system property for the minecraft home, should fix multimc too + - v99.99-pre-1122 Merge pull request #121 from Draake/master-pr1 + Added additional sound events to allow for low level information. + - v99.99-pre-1121 Removed SoundSetListenerEvent implementation. + - v99.99-pre-1120 Add in support for setting the home dir via the applet launch, also a system property for forcing the home dir + - v99.99-pre-1119 Whops + - v99.99-pre-1118 Fix potential index exception in ForgeDirection + - v99.99-pre-1117 Rename Orientation to ForgeDirection {Damn MCP naming a class Direction already} + - v99.99-pre-1116 Update FML again for mod screen blending fix. + - v99.99-pre-1115 Cleanup fml.py a little, should fix double printing of 'patching file' + - v99.99-pre-1114 Wrap mod description rendering in BLEND calls https://github.com/MinecraftForge/MinecraftForge/issues/96 + - v99.99-pre-1113 Add render distance property to TileEntity. + - v99.99-pre-1112 Fix issue with default getContainerItemStack + - v99.99-pre-1111 New Command event. + - v99.99-pre-1110 Seperated block placmenet logic in ItemBlock as immibis requested: https://github.com/MinecraftForge/MinecraftForge/pull/110 + - v99.99-pre-1109 Fix ItemBlock placement, should fix RP Deployers placing blocks 1 tile down. + - v99.99-pre-1108 Updated Orientation with new helper functionality. + - v99.99-pre-1107 Updated FML, should fix the new included eclipse workspace. + - v99.99-pre-1106 Made getmodifiedsrc noop for server. + - v99.99-pre-1105 Fix new eclipse workspace to load the project properly from start. + - v99.99-pre-1104 Fixed bug in DimensionManager that would cause Index error for custom dimensions, also made WorldProviders aware of what dimension they are. + - v99.99-pre-1103 Updated patches to 1.3.2 + - v99.99-pre-1102 Cleaned up forge scripts, and updated AT config for 1.3.2, deleted any reference to server specific code. + - v99.99-pre-1101 Update FML to 278, MC 1.3.2 + - v99.99-pre-1100 Cleanup repo, delete old code + - v99.99-pre-1099 Merge branch 'minecraft132' + Yes, we are already on 1.3.2 + - v99.99-pre-1098 KeyBinding handler change: a handler now takes an array of keys and calls back with the + activated key. Sorry for the inconvenience but this improves the usability of this + API a lot + - v99.99-pre-1097 Fix renderer's not getting the rendermanager set on them at registration time + - v99.99-pre-1096 Finished update to MCP 7.2, MC 1.3.2 pre. + - v99.99-pre-1095 KeyBinding handler change: a handler now takes an array of keys and calls back with the + activated key. Sorry for the inconvenience but this improves the usability of this + API a lot + - v99.99-pre-1094 Fix renderer's not getting the rendermanager set on them at registration time + - v99.99-pre-1093 Fixup included workspace to have single project with client/server launches. + - v99.99-pre-1092 Start working on MC 1.3.2 + - v99.99-pre-1091 Add in a helper for code migrating from ML renderer stuff + - v99.99-pre-1090 Readded patch to allow for use of custom teleporter for transfering dimensions. + - v99.99-pre-1089 Merge pull request #62 from calclavia/patch-1 + Shortcut function for addNameForObject() + - v99.99-pre-1088 Shortcut function for addNameForObject() + Having that long line of code makes the code a bit ugly... Please make this shortcut function like ModLoader.addName() so I don't need to use ModLoader.addName(). :) + - v99.99-pre-1087 Handle mod duplicate detection much better. Default the name of a mod to it's id. + Fix up the block registry problem. Fix the packetsend from c->s actually being + "disconnect" :) + - v99.99-pre-1086 Update FML with entity spawning fixes + - v99.99-pre-1085 Fix entity spawn packets + - v99.99-pre-1084 Updated FML, should fix 'derp?' RuntimeError + - v99.99-pre-1083 Force a Jenkins build + - v99.99-pre-1082 Merge pull request #60 from remuladgryta/master + fixed 'derp' error on @NetworkMod + - v99.99-pre-1081 fixed java.lang.NoSuchMethodException + getServerHandlerSpecDefaultValue() and + getClientHandlerSpecDefaultValue() should no longer give derp exeption + - v99.99-pre-1080 Fix PickBlock 'ghost item' bug when picking with a item selected. + - v99.99-pre-1079 Update release script to create universal binary distro. + - v99.99-pre-1078 Update debug settings to use Client's internal MinecraftServer.main to debug dedi-server env. + - v99.99-pre-1077 Delete Forge server projects + - v99.99-pre-1076 Update FML, Tons of bug fixes and proper merging of client and server. + - v99.99-pre-1075 FML will skip gathering MD5s for classes in the cpw package during the the inital recompile {Make Side/SideOnly reobf properly} + - v99.99-pre-1074 Merge remote-tracking branch 'origin/master' + - v99.99-pre-1073 Updated FML install to provide better error output, Updated commands.py patch to disable recompile of server project. + - v99.99-pre-1072 Hopefully let build continue if server reobf fails, and fix derp in FMLNetworkHandler for entities + - v99.99-pre-1071 Fix up concurrent modification exception - ticks for players now occur on both sides + - v99.99-pre-1070 Merge the last bits of the server code into the common directory, and annotate ModLoader/BaseMod for sided use + This means the FML-Server project is now defunct as all code is either common, client or bukkit. + - v99.99-pre-1069 Actually fix the applet launch - it now launches properly *and* closes the window + - v99.99-pre-1068 Fix up relaunch of the applet + - v99.99-pre-1067 Added additional sound events to allow manipulation of a sound source at its creation. + - v99.99-pre-1066 Change language loading a bit + - v99.99-pre-1065 Update spritehelper bitmaps for items and terrain + - v99.99-pre-1064 Tidy up some APIs, expose the addOverride mechanism. This should be pluggable by forge + but may need work to allow for each mod to have it's own override set + - v99.99-pre-1063 Fix derp in LanguageRegistry + - v99.99-pre-1062 Merge pull request #116 from bloodandiron/bonemeal-fix + Bonemeal handler fix + - v99.99-pre-1061 FMLModcontainer should not complain about annotations it has no idea about. so stfu fmlmodcontainer + - v99.99-pre-1060 Fix derp with EntityRegistry- bimap is not the right type for the name->container list + - v99.99-pre-1059 Fix bug where default bonemeal behavior wouldn't trigger. Only return if the event was canceled. + - v99.99-pre-1058 Add in a sided variant of the packethandlers in the annotation - also, a bit more + explicit warning on when to register blocks - if you do it after pre-init, you'll + reset the achievements + - v99.99-pre-1057 Generate channel registration for client, also, do it before the login events so you can send packets + - v99.99-pre-1056 Capture server packet handling errors into the FML log file for diagnostics + - v99.99-pre-1055 one more change for the road :) + - v99.99-pre-1054 Update FML, new AT features, and error info. + - v99.99-pre-1053 Don't spit debug all over the floor + - v99.99-pre-1052 updated conf, commands patch (missing newline?) and capturing the actual running + MC version and validating it at relaunch time is the correct MC version. + - v99.99-pre-1051 Add in callableminecraftversion + - v99.99-pre-1050 Entity AI accessibility, also AccessTransformer can make certain classes public now + - v99.99-pre-1049 Update AT config to expose some block functions and a few extras. + - v99.99-pre-1048 Delete dead IGuiHandler + - v99.99-pre-1047 Updated FML + - v99.99-pre-1046 Fixed ItemRenderer not grabbing custom texture files properly for block items + - v99.99-pre-1045 Add in a simple packet dispatcher for sending packets around + - v99.99-pre-1044 Add in a sided packet registry so that client vs server can vary + - v99.99-pre-1043 Fix double forge init on server + - v99.99-pre-1042 Should fix commands.py patching not working properly first run. + - v99.99-pre-1041 Merge pull request #50 from Krapht/master + Fix for getNextAvailableRenderId() returning ids in use by vanilla - thanks krapht! + - v99.99-pre-1040 Fixed getNextAvailableRenderId() returning ids in use by vanilla + - v99.99-pre-1039 Updated FML, Should fix a lot of installing issues for MCP. + Made patches error and not apply if the target file is not found. + Updated Event Transformer to add a default constructor... + Fixed 4096 setup code in MinecraftForge.initalize() + - v99.99-pre-1038 Fix MCPMerger injecting Side/SideOnly when it already exists. + - v99.99-pre-1037 Added patch verification to commands.py patch, and made it so MCP will check the original jars for the server, to prevent it from saying modified when it started out clean. + - v99.99-pre-1036 Add DEBUG constant to Access/Side Transformers to remove spam when not needed. Also AccessTransformer and MCPMerger should return a error code when it can not process causing MCP to stop decompile. + - v99.99-pre-1035 Fix EntityRegistry - mods can specify update frequency, range and velocity data, and also + patch EntityTracker to actually track FML entities + - v99.99-pre-1034 Fix NPE with no channels - always register FML + - v99.99-pre-1033 Fix issue in install script for users with spaces in there paths. + - v99.99-pre-1032 Added missing quotes around compile command. + - v99.99-pre-1031 Updated FML, fixed custom tool hooks, and spawn protection/player reach hooks. + - v99.99-pre-1030 Fix up the network mod issue properly. Maintain a real cache of mod objects + - v99.99-pre-1029 Update FML, server should run now. Still issue with NPE with no mods installed. + - v99.99-pre-1028 Remove profiler stuff - it's been deeply reorged. I'll look at re-adding it later + - v99.99-pre-1027 Fix up command patch to actually work + - v99.99-pre-1026 Fix commands.py to always include the two side classes so the fml jars are valid. + - v99.99-pre-1025 Fix build script- put client in first + - v99.99-pre-1024 Put the marker on the server ML file too + - v99.99-pre-1023 Fix universal not to dupe entries in the jar, also add in the fml mod as "untransformable" + - v99.99-pre-1022 Fix up launch when obfuscated *sigh* + - v99.99-pre-1021 Update netclienthandler patch. + - v99.99-pre-1020 Fix NPE for server relaunch + - v99.99-pre-1019 Fix up Package.getPackage(), also fix up loadcontroller construction + - v99.99-pre-1018 Add in Package.getPackage() support for sengir + - v99.99-pre-1017 Lost of work to try and complete ML support - probably still bits missing, but mostly there + - v99.99-pre-1016 Fixed Diemsnion API related NPEs, and updated FML to 231. + - v99.99-pre-1015 Newlines in diff file + - v99.99-pre-1014 Add special case to add Side/SideOnly to difflist + - v99.99-pre-1013 Fix up some network related stuff and optimize mod lookup a bit + - v99.99-pre-1012 Fix up proxy injector to inject properly + - v99.99-pre-1011 Fix decompile + - v99.99-pre-1010 Updated FML, updated patches + - v99.99-pre-1009 Fix NPE on missing mods - still need to actually handle missing mods properly on client + - v99.99-pre-1008 New downloader UI and new downloader backend - should be more robust now + - v99.99-pre-1007 Added -no_gen_conf to jenkins build + - v99.99-pre-1006 Added some extra error prints, hopeully get something useful when installed in the client. + - v99.99-pre-1005 Updated conf merger script to just merge everything, and normalize the line endings so git doesn't complain. + - v99.99-pre-1004 Update fml, impelemnted Diemsnion API stuff. + - v99.99-pre-1003 SidedProxy should work again - anywhere. Make sure it's on a static field though + - v99.99-pre-1002 More ticking hooks, and some other bits of clean up. Very close to "done" now. + - v99.99-pre-1001 Fix up modloader and clean up junk method + - v99.99-pre-1000 A lot of missing patches to code re-added. Almost all functionality should now + be restored. + ModLoader compatibility is not yet assured, there are some wrapper classes that + need re-writing first + - v99.99-pre-999 Readded common folder to startclient/server. + - v99.99-pre-998 Add in a registration method for gui handlers + - v99.99-pre-997 Overwrote lex's command patch + - v99.99-pre-996 Fix up MCP merger - it definitely works now - the game runs and runs well. + Fix up a couple of small network related issues. + Fix up the server launching fml properly. + - v99.99-pre-995 Include Forge's AT config into redist zips. + - v99.99-pre-994 Added new pick block hook for blocks and entites to allow for better grained control of the result. + - v99.99-pre-993 Fix oreientation bug causing levers not being able to place. + - v99.99-pre-992 Moved over Configuration + - v99.99-pre-991 Added common folder support to startclient/startserver + - v99.99-pre-990 Added some missing quotes that caused issues if your workspace had a space in it. + - v99.99-pre-989 Update fml + - v99.99-pre-988 Add lib folder to installed eclipse + - v99.99-pre-987 Copy forge files over in install. + - v99.99-pre-986 Delete conf, server compile, update fml, and fix install script. + - v99.99-pre-985 Cleaned up some more, fixed infinite loop with cancelable annotation, Client now compiles and enters world just fine. + - v99.99-pre-984 Add in missing patch - also, launch FML properly from the server + - v99.99-pre-983 Entity spawn adjustment - tracker + - v99.99-pre-982 Nope, unneeded patch + - v99.99-pre-981 Updated Client side patches for the new Merged MCP workspace. + - v99.99-pre-980 Fix ModLoader compilation, and MCPmerger invocation for Forge. + - v99.99-pre-979 Include conf folder and merge config in source zip + - v99.99-pre-978 Entity spawning - done + - v99.99-pre-977 Generate a universal binary package since we can now :) + - v99.99-pre-976 Merge branch 'MergingClientServer' + - v99.99-pre-975 Reorganized all the current patches + - v99.99-pre-974 Fix up annotation parser to parse arrays and enums + - v99.99-pre-973 Added SideTransformer to strip side only functions/fields out. + - v99.99-pre-972 Stage 1 of merging the client and server for MCP. + Results: + Client: 362 + Server: 3 (Only due to issues of FF decompilation inconsistancies) + Common: 910 + Stage 2: Write runtime transformer to remove annotated fields/methods with invalid side annotation. + - v99.99-pre-971 Gui Handler ported from MC forge + - v99.99-pre-970 Revert dumb stuff with commands patch - lots of gfx patching + - v99.99-pre-969 Removed a lot of old files + - v99.99-pre-968 Almost finished basic network stuff now + - v99.99-pre-967 Update some patches- more network work + - v99.99-pre-966 Finished World and EntityMinecart patches. + - v99.99-pre-965 More conversions, added all the entity living events. + - v99.99-pre-964 More work, moved over packet stuff, need to change everything to use new NetworkMod system + - v99.99-pre-963 Bunch of hooks re-added : network is more complete now, lot of basemod cleanup, moving stuff into + the registry area + - v99.99-pre-962 Moved some files. + - v99.99-pre-961 A bulk of more patches converted, updated fml + - v99.99-pre-960 More patches converted. + Refactored some of the events to be a better hiarachy. + - v99.99-pre-959 Fix location of forge in common handler - also some tweaks to modloader and other stuff + - v99.99-pre-958 Network support - there's still some work to do and full id sync isn't done yet, but it has proper registration + semantics and hooks for 250 handling + - v99.99-pre-957 Add in a lot of network handler stuff - also, expose the asm harvested data + - v99.99-pre-956 Some more patch migration before bed. + - v99.99-pre-955 More progress on converting patches from 1.2.5 + - v99.99-pre-954 Implemeneted adding grass seeds, as well as IShearable for BlockTallGrass + - v99.99-pre-953 Implemented BonemealEvent (IBonemealHandler replacement), and bonemeal making grass. + - v99.99-pre-952 Renamed MinecraftForge.eventBus to EVENT_BUS as it's constant. + - v99.99-pre-951 Moved in OreDictionary stuff to new system. IOreHandler is replaced by OreDictionary.OreRegisterEvent + - v99.99-pre-950 Missed a file + - v99.99-pre-949 First push of some small patches and introduction of basic events. As well as the first cases for Forge's Access Transformer + - v99.99-pre-948 Remove some unneeded fields from the annotations + - v99.99-pre-947 Moved paulscode to new client folder + - v99.99-pre-946 Made empty constructor for ModMetadata public + - v99.99-pre-945 Updated update_patches.py, and made first patch! + - v99.99-pre-944 Moved logo to new client folder + Added blank Access Transformer config for Forge + Implemented version storage + Added basic dummy FML mod container to remove the need for mod metadata file + Added beggining work on Forge event system + Updated and moved EnumHelper + - v99.99-pre-943 Update FML + - v99.99-pre-942 Updated build.py + - v99.99-pre-941 Remove eclipse files from old eclipse projects + - v99.99-pre-940 Fix path trimming for copytree + - v99.99-pre-939 Added merging fields/methods/param csv files. And updated FML to 197 + - v99.99-pre-938 Change property name to fml.modStates not fml.disabledMods- it makes more sense that way + - v99.99-pre-937 Add in a bit of logging when events get sent to mod containers + - v99.99-pre-936 Allow coremods to inject a modcontainer and run code + this will mean that FML is deliberately and very obviously incompatible with a modloader installation. + Fix up worldtype so that the server can run. + - v99.99-pre-935 Patch commands.py to support side '2' as common, as well as fix a few small errors in the update_patches and fml scripts. + - v99.99-pre-934 Helper function grab all unique searge names that are shared client and server + - v99.99-pre-933 Add newids to that list + - v99.99-pre-932 Add the direct copied files from MCP conf + - v99.99-pre-931 Committing inital work on generating sanitized MCP conf data. + - v99.99-pre-930 New Start.java which allows the user to login using a legit account for testing on servers. + - v99.99-pre-929 Dump old mcp config + - v99.99-pre-928 inital push of updated setup script and cleaned up forge.py + - v99.99-pre-927 Added a better eclipse workspace for deving Forge + - v99.99-pre-926 Get rid of all old patches + - v99.99-pre-925 Merged transformers/ to /common and renamed the asm source download to align better with the asm bin file name. + - v99.99-pre-924 Change place commands.py backup is stored. + - v99.99-pre-923 FML finish won't updatemcp automatically, easier integration with forge. + - v99.99-pre-922 Fix packaging and install to not have the src/ folder, making it align better with the dev env. + - v99.99-pre-921 Bumped version to 3.4.9, final commit for 1.2.5. + - v99.99-pre-920 Moved setting up eclipse to setup_mcp + - v99.99-pre-919 Fixed ant script to support common folder building and add the new files to the dist archives. + - v99.99-pre-918 setup_fml's decompile will result in proper md5 files now {if there is no compiler issues} + - v99.99-pre-917 Removed FMLRegistry, and IMinecraftRegistry. + Updated server side to use the seperated registry classes like the client does. + Updated searge name references on server + Made StatBase.statName public using AccessTransformer + Server should compile now + - v99.99-pre-916 Fix MockBlock compile + - v99.99-pre-915 Download argo/guava source references in install, and updated eclipse workspaces to reference them. + - v99.99-pre-914 Cleaned up commands.patch, removed debug print in fml.py + - v99.99-pre-913 Remove clientdrop, old reference files. + - v99.99-pre-912 Delete some dead files + - v99.99-pre-911 Fix commands patch, WorldType patch and some ML compat stuff + - v99.99-pre-910 More fixes + - v99.99-pre-909 More build fixes for jenkins + - v99.99-pre-908 Try and fix the jenkins build + - v99.99-pre-907 Change some event names, hook up the event code for server events for FML + - v99.99-pre-906 Merge branch 'newfmlmod' + - v99.99-pre-905 Introduced patching of runtime/commands.py to allow for usage of the src/common folder. + - v99.99-pre-904 Change some stuff around - begin launching the server through the wrapper too. + A lot of patches went in - the client and server both launch and start up mods. + - v99.99-pre-903 Rebase + - v99.99-pre-902 Merge pull request #114 from cpw/master + Line endings + - v99.99-pre-901 Normalize the repo + - v99.99-pre-900 More stuff + - v99.99-pre-899 Fix classpath for Client, maybe? + - v99.99-pre-898 Line endings for this branch + - v99.99-pre-897 A load of transformer accesses- also a few tweaks to the transformer, and linux support in the fml python + - v99.99-pre-896 Rewrote patch generation and application to no longer need diff, and attempt to apply common patches on decompiles that don't have one side or the other. + - v99.99-pre-895 Updated eclipse projects to have src-common linked resources + - v99.99-pre-894 Modified the decompiler stage to: + Compile and run AccessTransformer during the pre-RG stage of decompilation. + Merge resulting sources that are identical to src/common + ToDo: + Finish the common intergration: + -update_patches - Add common folder support + -apply_patches: + --patch each side, also patch all common patches to each side incase they are not merged, only if file exists. + - v99.99-pre-893 Add temp AccessTransformer config for FML + - v99.99-pre-892 Discard old setup script + - v99.99-pre-891 Fixed AccessTransformer issue with trying to load files, instead of resources. + - v99.99-pre-890 Merge pull request #113 from someh4x0r/master + Fix BlockTrapDoor.disableValidation on server + - v99.99-pre-889 Fix BlockTrapDoor.disableValidation on server + - v99.99-pre-888 Commit the start of some pluggable transformers + - v99.99-pre-887 XP for smelting + - v99.99-pre-886 Beginning the 1.3.1 update + - v99.99-pre-885 Add in the ability to create versioned dependencies for mod relationships + BaseMod versions are loaded too late so will never work as a versioned + dependency requirement, but can have versioned deps of others + - v99.99-pre-884 Fix up coremods with relaunch, add in a sample "coremod" + - v99.99-pre-883 Add in events for the method pre/init/post annotations so we can add in extra data during the event phase + - v99.99-pre-882 Fix whitespace issue + - v99.99-pre-881 Fix window sticking around - it doesn't anymore + - v99.99-pre-880 Add in "transform excluded" classes that we still need to take loading responsibility for + - v99.99-pre-879 Added in some dialogs when things don't go so well + - v99.99-pre-878 New logging stuff, also the early plugin api for forge + - v99.99-pre-877 Merge branch 'minecraft1.3' into newfmlmod + - v99.99-pre-876 Fix up mod classloading delegation + - v99.99-pre-875 Some patches to go along with the other changes + - v99.99-pre-874 More stuff as I roll out the changes + - v99.99-pre-873 A bunch more fixes for FML mods + - v99.99-pre-872 Merge remote-tracking branch 'mainlap/newkeys' into newfmlmod + Conflicts: + client/cpw/mods/fml/client/FMLClientHandler.java + - v99.99-pre-871 New key handling + - v99.99-pre-870 Check in a lot of recent work + - v99.99-pre-869 Check in new fml mod work so far. Lots still to do. + - v99.99-pre-868 Cleaned up the install script for the source distrabution to setup the workspace properly, delete argo, and download all required dependancies. + - v99.99-pre-867 Added call to clean_source to build script to fix patch fuzz on windows. + - v99.99-pre-866 Fix Client-Clean project to use relative path to argo. + - v99.99-pre-865 Should fix NPE on older ISoundHandlers EXA: http://minecraftforge.net/forum/index.php/topic,759.html + - v99.99-pre-864 Merge pull request #104 from cpw/master + Update to fml 176 - fixes a subtle tick bug + - v99.99-pre-863 Update fml with recent tick fix + - v99.99-pre-862 Merge pull request #102 from TrueBrain/EntityTracker + -Add: sync serverPos[XYZ] on spawning of entity + - v99.99-pre-861 -Codechange: applied LexManos' request + - v99.99-pre-860 -Fix: check for null where needed + - v99.99-pre-859 Made WorldGenMinable metadata sensitive. + - v99.99-pre-858 Fixed a improper rounding in EntityMinecart + - v99.99-pre-857 -Add: sync serverPos[XYZ] on spawning of entity + This fixes the issue that, up to 400 ticks from getting in range, + entities have a wrong offset (because server and client don't agree on + the position to calculate relative updates from) + - v99.99-pre-856 Another bloody ticking fix. This should fix mods that use ML.setInGameHook(true,false) on the + server side to recieve ticks. + - v99.99-pre-855 Fix up mod classloading delegation + - v99.99-pre-854 Fixes + - v99.99-pre-853 Incorporate server patches into client + - v99.99-pre-852 Remove two places that are unpatchable now + - v99.99-pre-851 Server repatching + - v99.99-pre-850 Add a "checkpatches" target and check if your patches are up to date before running a repatch operation + - v99.99-pre-849 Launch through the applet launcher too + - v99.99-pre-848 Some patches for the server + - v99.99-pre-847 Lots of client patch fixup + - v99.99-pre-846 Update git ignore to ignore a fernflowerzip that's lying around + - v99.99-pre-845 And we have a brand, "fml". We're definitely modded :) + - v99.99-pre-844 UnexpectedThrowable is now the much more awesome CrashReport! + - v99.99-pre-843 Merge branch 'master' into minecraft1.3 + Bring some of the ticking fixes in + Conflicts: + client/cpw/mods/fml/client/FMLClientHandler.java + patches/minecraft_server/net/minecraft/server/MinecraftServer.java.patch + - v99.99-pre-842 Got the relauncher downloading and injecting library files + - v99.99-pre-841 Merge pull request #98 from cpw/master + Update to fml 175 + - v99.99-pre-840 Update fml to 175- fixes some weird ticking behaviours for ML mods, adds in new ticking behaviours for smart mods + - v99.99-pre-839 Tweak ticking YET AGAIN. Should fire a solitary GUILOAD tick right as the game screen loads. + Hopefully fixes worldload tick issue too + - v99.99-pre-838 FFS let this fix that bloody ticking mess that is ML compatibility. + - v99.99-pre-837 Separate gui ticking completely. send it as if it's a world tick. ML gui ticks are epically dumb. + Fix Worldload being filtered from the trigger arming. + Also, improve errors going to an error screen. There should be more information now. + - v99.99-pre-836 Change gui ticking and world load tick. Should close issue #40 and kill it deader + than a very very dead thing. *$^*(#% Modloader ticking b#%$hit + - v99.99-pre-835 Merge branch 'master' into minecraft1.3 + - v99.99-pre-834 Tweak build xml for more cleanliness + - v99.99-pre-833 Merge branch 'antscriptupdates' + - v99.99-pre-832 Update some stuff + - v99.99-pre-831 Merge branch 'antscriptupdates' into minecraft1.3 + - v99.99-pre-830 Add in more options for ant script and clean up needing to clean every time. + - v99.99-pre-829 Updated some remaining scripts to call there python versions. + - v99.99-pre-828 Removed symlink files, shouldn't be in the repo. + - v99.99-pre-827 Moved licenses and credits into install folder. + - v99.99-pre-826 Merge branch 'testrecover' + - v99.99-pre-825 Merge branch 'antscriptupdates' into minecraft1.3 + - v99.99-pre-824 Merge branch 'antscriptupdates' + - v99.99-pre-823 Some more fixes to the ant stuff: apply patches now happens at the right time, I grab fernflower as part of + setup and added an updatepatches call too + - v99.99-pre-822 Merge branch 'antscriptupdates' into minecraft1.3 + Conflicts: + build.xml + - v99.99-pre-821 Merge branch 'antscriptupdates' + - v99.99-pre-820 Add in a setupenvironment ant target specifically for setting up an FML environment from scratch + - v99.99-pre-819 Harvest MC version from MCP + - v99.99-pre-818 fix sided proxy bukkit test (not used so not a biggie) + - v99.99-pre-817 Harvest MC version from MCP + - v99.99-pre-816 Fix furnaces not smelting the proper number of results after the first one. Damn you tahg, fix this! Keeps falling through my cracks. + - v99.99-pre-815 Initial checkin. Some patches are probably missing, but client compiles. + - v99.99-pre-814 Merge pull request #94 from cpw/hastileentitybugfix + Fix server check "blockHasTileEntity" used to determine if getDescriptionPacket + - v99.99-pre-813 Fix server check "blockHasTileEntity" used to determine if getDescriptionPacket + is sent for the block to be metadata sensitive. Thanks iChun! + - v99.99-pre-812 Working simple scheduled ticking, Player ticks + - v99.99-pre-811 Support tick spacing through new IScheduledTickHandler + - v99.99-pre-810 Merge pull request #93 from cpw/fixghost4096 + Fix ghost players who appear if they don't have the 4096 fix installed + - v99.99-pre-809 Change TickType.WORLD to send the world as arg[0] to match the server. + - v99.99-pre-808 Fix ghost players who appear if they don't have the 4096 fix installed + - v99.99-pre-807 And there are not 1000 seconds in a second + - v99.99-pre-806 Seconds are 1000 milliseconds long. Not 1 millisecond long. + - v99.99-pre-805 Tweak profiler command on bukkit + - v99.99-pre-804 Fix up a derp in the timing command + - v99.99-pre-803 Fix container creative to not add Blocks above 256 unless it's told to. + - v99.99-pre-802 Merge pull request #91 from cpw/multiversefix + Fix world provider behaviour: WorldProvider.byDimension should always return a new instance- otherwise you can end up with worlds overwriting one another + - v99.99-pre-801 Fix world provider behaviour: WorldProvider.byDimension should always return + a new instance- otherwise you can end up with worlds overwriting one another + - v99.99-pre-800 Fix code to use guava 10 only. Stupid bukkit plugins and daft dependencies on guava 10! + - v99.99-pre-799 Tweak for end profiling + - v99.99-pre-798 Add in simple profiler for bukkit + - v99.99-pre-797 Add in a mechanism to get the modcontainer for a mod - so things can be programmatically changed + - v99.99-pre-796 Add in bukkit support for recipe change + - v99.99-pre-795 Add in a new recipe handler registry method for ease of adding recipes to MC + - v99.99-pre-794 Merge remote-tracking branch 'origin/master' + - v99.99-pre-793 Fixed isBlockReplaceable and placing ItemBlocks' + - v99.99-pre-792 Fucking spelling nazis + - v99.99-pre-791 Updated FML to build 153 + - v99.99-pre-790 Fix bitmask bug related to 4096 in multi-block change. + - v99.99-pre-789 Added configuration option to disable the darkroom mechanic. For servers who wish to not risk destruction at one broken pipe. + - v99.99-pre-788 Add option to randomize potential spawn locations to have a more randomly dispersed spawn patern, useful for games like FTB vs. + - v99.99-pre-787 Fix NPE related to server/client not having block ids synced properly. + - v99.99-pre-786 Update tester mod + - v99.99-pre-785 Fix ticking for GUI ticks too! + - v99.99-pre-784 Fix dependency string processing error + - v99.99-pre-783 ModSorting test case + - v99.99-pre-782 FML 150, more tick related work. + - v99.99-pre-781 Fix ticking properly - ML world ticks now fire once, properly + - v99.99-pre-780 Close inputstream + - v99.99-pre-779 More bugfixes related to portal generation. Should be all now. + - v99.99-pre-778 Fix Vanilla bug where nether portals would not work above 127 + - v99.99-pre-777 Updated to FML 149, should fix all ticking issues with ModLoader mods + - v99.99-pre-776 Some 4096 I missed in custom renderers. + - v99.99-pre-775 Added stupididty exception for common issue with getMinecraftLogger. + - v99.99-pre-774 Rename unused ML prop config files if they exist (to .bak) and + skip generating if not needed + - v99.99-pre-773 Update bukkit with changes + - v99.99-pre-772 Revert "Test failing build" + This reverts commit 744febc38e915a12c388fe01ba6715d31b6b6ee2. + - v99.99-pre-771 Revert "Revert "Fail the build when recompilation fails"" + This reverts commit c2d920d738a294462338fbe955c62a0f4034304c. + - v99.99-pre-770 Revert "Fail the build when recompilation fails" + This reverts commit 482e3be3c9a96df8cefad81d78c7a4e83ad898b4. + - v99.99-pre-769 Test failing build + - v99.99-pre-768 Fail the build when recompilation fails + - v99.99-pre-767 Fix huge bug/typo in basemodticker that stopped ticks getting sent + - v99.99-pre-766 Updated to FML build #142, fixed FML compilation issue causing missing files when reobfing. + - v99.99-pre-765 Fix compilation error, Protip: Don't use java7 things when compiling for java6, and Don't report successful build on compilation errors cpw. + - v99.99-pre-764 Updated release script to automatically inject version info into .info file. + - v99.99-pre-763 Updated to FML 141, should fix ticking issues with certian mods, and crash issue with TropiCraft + - v99.99-pre-762 Remove cr's from modinfo descriptions, they print oddly in Minecraft. + - v99.99-pre-761 Print mod metadata info errors if we are in MCP. + - v99.99-pre-760 Should fix concurent modification exceptions when using removeSpawns + - v99.99-pre-759 Remove some eclipse preference files + - v99.99-pre-758 Update gitignore to ignore some eclipse preference files. + - v99.99-pre-757 Merge pull request #29 from ScottKillen/master + Fixed WorldType to allow custom WorldTypes + - v99.99-pre-756 Bumped version number for new IEntityLiving interface. + - v99.99-pre-755 Merge pull request #88 from pahimar/master + Fixes typo in the new EntityLivingHandler code + - v99.99-pre-754 Typo in the new EntityLivingHandler code + - v99.99-pre-753 Implemented enchanced EntityLiving events. Thanks Atomic for parts of it. + - v99.99-pre-752 Made setFailsafeFieldValue public for Rob + - v99.99-pre-751 Added EntityRendererProxy class for compatibility with ModLoader mods that rely on it's existance. + - v99.99-pre-750 More ticking cleanup + - v99.99-pre-749 Remove WorldLoad tick from modloader mods- too early. *sigh* + - v99.99-pre-748 Make sure to reset the clock trigger + - v99.99-pre-747 Force all client modloader ticks to occur at render end + - v99.99-pre-746 Client + ====== + Added hook in GuiCreateWorld to allow WorldType to present GUI on world creation. + - v99.99-pre-745 **Client** + * Delegated World.func_46068_G() (getHorizon), which depends on WorldType, to the WorldType class per LexManos' suggestion + - v99.99-pre-744 Client + ====== + - Fixed WorldType to allow custom WorldTypes in world creation GUI. + - Deprecated client WorldType.getSeaLevel() and renamed it with the more accurate name of getMinimumSpawnHeight. + - Changed related reference WorldProvider. + Server + ====== + - Fixed WorldType to allow custom WorldTypes + - Added methods to WorldType giving it the exact abilities of client WorldType + - Adjusted WorldProvider so that it relies on WorldType the same way it does on client. + - v99.99-pre-743 Few more cases for 4096, thanks TrueBrain + - v99.99-pre-742 Forgot Configuration in 4096 change. + - v99.99-pre-741 Initial 4096 fix based of mDiyo's work. + - v99.99-pre-740 Configurable kick message when you don't have forge. + - v99.99-pre-739 Merge pull request #27 from TheNoid/master + Make FML logs use system line endings … + - v99.99-pre-738 Make FML logs use system line endings for consistency with Java stack traces in the logs. + - v99.99-pre-737 Fixed bug in new entity sound hook. + - v99.99-pre-736 Bumped version number to 3.3.7 for full release. + - v99.99-pre-735 New onChunkUnload event for TileEntities, for psxlover. + - v99.99-pre-734 Added new ISoundHandler.onPlaySoundAtEntity hook. Should be backwards compatible with any older ISoundHandler implementations. + - v99.99-pre-733 Updated to FML #135 {Fixed ModList rendering issue, and incorrect arument on crafting hook} + - v99.99-pre-732 Server side fix for invalid parameter to onCrafting + - v99.99-pre-731 Proper fix for scroll list not covering all of the hidden scroll items. + - v99.99-pre-730 Merge pull request #26 from GenuineSounds/patch-2 + Incorrectly passing the IInventory of the extraction slot instead of the... + - v99.99-pre-729 Merge pull request #25 from GenuineSounds/patch-1 + Having the string trimmed to 9 made most long strings show a couple of p... + - v99.99-pre-728 Incorrectly passing the IInventory of the extraction slot instead of the crafting matrix, get back to me on why it's doing this instead of the default behavior of ModLoader and Forge. + - v99.99-pre-727 Having the string trimmed to 9 made most long strings show a couple of pixels at the very top and very bottom. ie + https://dl.dropbox.com/u/79514/2012-06-13_13.25.35.png + - v99.99-pre-726 Fixed concurent modification exception in the ore registry. + - v99.99-pre-725 Fix for potential concurancy modification exceptions + - v99.99-pre-724 Fixed possible NPE when blocks havent fully initalized yet. + - v99.99-pre-723 Updated FML to 132, TextureFX fix, and bumped revision to 6. + - v99.99-pre-722 Fixed KeyBinding issue with ModLoader container, if you register a KeyBinding twice it will discard the old one. And fixed issue where getVersion() could return null causing NPE. + - v99.99-pre-721 Made it so it will attempt to scale any Texture Effects that return data for smaller texture resolutions. Made the size descrepancy only a error for ITextureFX texture effects. + - v99.99-pre-720 Added bouncer functions for functions we removed. Makes MagicLauncher shut up about missing functions {not actually missing}, and therefor makes users stop thinking its a life or death error. + - v99.99-pre-719 New Ore Dictionary recipies. Allows for simpler Ore Dictionary integration with recipies. IOreHandler should no longer be used. + - v99.99-pre-718 Added hackish workaround for Tessellator.textureID to provent crashing while we wait for Optifine to update. + - v99.99-pre-717 Updated to FML 130 + - v99.99-pre-716 Fix up "errored" mod states so they actually read as errors + - v99.99-pre-715 Fix up bukkit for biome code + - v99.99-pre-714 Fix up biome handling for client and server + - v99.99-pre-713 - Fixed client crash bug in add/remove Biome functionality. Arrays.asList() returns a fixed-sized list per java spec. Adding and removing biomes throws UnsupportedOperationException. + - Fixed same on server and added disabled removeBiome functionality. This touched a lot of classes as the nonWorking removeBiome seemed to be lots of places inconsistent with addBiome. + - v99.99-pre-712 Tweak error handling - report the exception that caused the bailout + - v99.99-pre-711 Fix parameter ordering in ticks + - v99.99-pre-710 Update bukkit for world gen tweaks + - v99.99-pre-709 Change world generation to expose a mod interface + - v99.99-pre-708 Update bukkit for early load change + - v99.99-pre-707 Attempt early initialization of Minecraft Forge + - v99.99-pre-706 Update bukkit handler + - v99.99-pre-705 Add in a server side WORLDLOAD tick + - v99.99-pre-704 Fix ticking- need to register the basemod tickhandler *sigh* + - v99.99-pre-703 Fix ticking for new name "GAME" vs "WORLD" + - v99.99-pre-702 Update bukkit handlers + - v99.99-pre-701 Reorganize basemod ticking to use ITickHandler. Introduce "GAME" tick vs "WORLD" tick for + mods that want to tick per world and "globally" + - v99.99-pre-700 Expose a "clean" ticking interface and fix server tick loop for world ticks + - v99.99-pre-699 Tweak width of description + - v99.99-pre-698 Server side of ITextureProvider for Block/Item for compilations sake. + - v99.99-pre-697 Backwards compatibility fix for ITextureProvider + - v99.99-pre-696 Updated FML to 121 to fix world tick issues. + - v99.99-pre-695 Fix for in game tick running when it shouldn't. Fixed some tabbing issue in crazy's PR. + - v99.99-pre-694 Tag each Tessellator with it's associated texture ID. + - v99.99-pre-693 All Items and Blocks now implement ITextureProvider, and have a setTextureFile(String) function, to support cleaner code in Mods and in Forge. + - v99.99-pre-692 Updated MCP mapings. Moved the bulk of custom logic from RenderItem to ForgeHooksClient. + - v99.99-pre-691 Merge remote-tracking branch 'origin/master' + - v99.99-pre-690 Added kick info to disconnect event, updated to FML 120, keybindings, better image rendering in ModList ui. + - v99.99-pre-689 Interm implementation of keyboardEvent for ModLoader. + - v99.99-pre-688 Add static log() functions to the RenderAccessLibrary, and fixed up the logo rendering to better display the images. + - v99.99-pre-687 Fix bug in cart functions where would always return null. + - v99.99-pre-686 Merge pull request #14 from crazyputje/master + onTickInGUI fix. Thanks crazyputje! + - v99.99-pre-685 removed 'if (client.theWorld != null)' so it also ticks in the main menu + - v99.99-pre-684 Fixed some inverted logic causing tress to not gen correctly. + - v99.99-pre-683 Update FML to 117 + - v99.99-pre-682 Also, new hook in last commit for blocks to determine if they are able to be replaced by ores, for any mod that adds new world gen. Bumped revision up. + - v99.99-pre-681 New Hooks addedf for custom tree/leaves. And better interaction with trees growing and rerplacing certain blocks. Should allow for ExtraBiomes to behave nicer, and RedPower to make there blocks un-breakable by trees. + - v99.99-pre-680 Helps to have a retention policy + - v99.99-pre-679 Helps to have a retention policy for runtime annotations + - v99.99-pre-678 Updated to FML 115, added Forge Logo to the client dist, and in-game ModInfo page. + - v99.99-pre-677 We now bundle CodexIBXM from PaulsCode. See http://paulscode.com http://www.paulscode.com/forum/index.php?topic=4.0 and the included license files for more info. + - v99.99-pre-676 Add in bukkit proxy handler + - v99.99-pre-675 More proxy code + - v99.99-pre-674 Introduce a proxy side loader for mod use + - v99.99-pre-673 Fixed GuiModList Logo rendering to allow for logos of different sizes to be rendered properly. Logos will render themselves full underneath the text, It is the modder's job to make it look good. + - v99.99-pre-672 Updated to FML build 114 + - v99.99-pre-671 Update credits information + - v99.99-pre-670 Update readme for the client side + - v99.99-pre-669 Update bukkit handler to inject names at startup + - v99.99-pre-668 Merge remote-tracking branch 'origin/master' + - v99.99-pre-667 Fix up optifine detection properly + - v99.99-pre-666 Update bukkit handler + - v99.99-pre-665 Slight reorganization of texture ticking - accomodate optifine + - v99.99-pre-664 Add in optifine visibility for the mod list. Will search for an "optifine_mod.info" file on the + class path if sp614x wants to add one to optifine. + - v99.99-pre-663 Fix ticking on bukkit server + - v99.99-pre-662 Fix ticking on the server + - v99.99-pre-661 Implement missing language load hook for server + - v99.99-pre-660 Tweaks to basemod setup + - v99.99-pre-659 Bukkitside fixup + - v99.99-pre-658 Merge branch 'bukkitreorg' + - v99.99-pre-657 Merge branch 'bukkit' + Conflicts: + common/cpw/mods/fml/common/IWorldGenerator.java + common/cpw/mods/fml/common/registry/FMLRegistry.java + common/cpw/mods/fml/common/registry/IMinecraftRegistry.java + common/net/minecraft/server/CommonRegistry.java + common/net/minecraft/server/IMinecraftRegistry.java + common/net/minecraft/src/CommonRegistry.java + common/net/minecraft/src/IMinecraftRegistry.java + - v99.99-pre-656 Fix copied code. Derpbag. + - v99.99-pre-655 Update FML with recent mainline changes + - v99.99-pre-654 Update bukkit with new mod fixes + - v99.99-pre-653 Damn you bukkit with your same names for different classes!!!! EntityPlayer->EntityHuman + - v99.99-pre-652 Fix chunk generators for bukkit + - v99.99-pre-651 Bukkit version + - v99.99-pre-650 Merge branch 'bukkit' - massive code reorganization for fml 2.0 + Conflicts: + common/cpw/mods/fml/common/IWorldGenerator.java + common/cpw/mods/fml/common/registry/FMLRegistry.java + common/cpw/mods/fml/common/registry/IMinecraftRegistry.java + common/net/minecraft/server/CommonRegistry.java + common/net/minecraft/server/IMinecraftRegistry.java + common/net/minecraft/src/CommonRegistry.java + common/net/minecraft/src/IMinecraftRegistry.java + - v99.99-pre-649 More tweaks for proper API + - v99.99-pre-648 Reorganize for bukkit integration + - v99.99-pre-647 Fix project, new gui layout with screenshot, thanks Sengir! + - v99.99-pre-646 Included fmlversion.properties in the release zips. + - v99.99-pre-645 Added FML ReadMe, Credits, and License to release zips + - v99.99-pre-644 Updated to FML Build 95 + - v99.99-pre-643 Updated patches for FML, moved some extranious code to Forge classes instead of patches. + - v99.99-pre-642 Updated MCP Mapings and patches. + - v99.99-pre-641 Added FML mod info file + - v99.99-pre-640 Add in missing hooks, add branding information to the crash report + - v99.99-pre-639 Cleaned up names for Minecraft Forge's text files so they dont clash with other mods. Fixed up the release script to include the license text, and executable permissions for install.sh. + - v99.99-pre-638 Added new source clean step to fix linux vs windows astyle issues. + - v99.99-pre-637 Update FML to 92, this include full client side support, ModLoader nolonger needed. + - v99.99-pre-636 Fixed regex issue in last push. + - v99.99-pre-635 Fixed up for newline before case bodies. + - v99.99-pre-634 Should fix windows {me} generating different patches then linux {cpw} + - v99.99-pre-633 Bump version number for official release. + - v99.99-pre-632 Move first tick to the real first tick + - v99.99-pre-631 Merge in the mod texture changes from Lex + - v99.99-pre-630 Fixed location refs to fmlversion.properties + - v99.99-pre-629 Add in a static render access class for optifine and other render editing mods to use + - v99.99-pre-628 Add in a "world load" tick fired just as the world completes loading. This SHOULD fix millinaire. + - v99.99-pre-627 Changing up the mod list data + - v99.99-pre-626 Fixed up ModTexture* classes to use the ITextureFX events to resize the image as needed. Also fixed ModTextureStatic's not being applied properly. + - v99.99-pre-625 Fix up two stupid overwrites in my mergeup from lex + - v99.99-pre-624 Fix derp in MTS + - v99.99-pre-623 Patch fixing + - v99.99-pre-622 Update some stuff for updated tweaks + - v99.99-pre-621 Update FMLClient with my changes + - v99.99-pre-620 my tweaks + - v99.99-pre-619 difflist should include server and client now. + - v99.99-pre-618 Some patch cleanup. + - v99.99-pre-617 Rewrote how HD Texture support worked, to make it easier for Optifine to integrate. + Fixed TextureFlamesFX for extramly large texture sizes. + Fixed the texture size sceme to allow for different sizes of textures in the same pack. + - v99.99-pre-616 Line number changed.. + - v99.99-pre-615 Fix up the watch + - v99.99-pre-614 And some tweaks to the texture handling + - v99.99-pre-613 Fix up some fubars in MTS and MTA + - v99.99-pre-612 Lots of error handling. + - v99.99-pre-611 Missed a patch *sigh* + - v99.99-pre-610 Add simple API to allow mods to let their textures be overriden by other mods + - v99.99-pre-609 Because, of course, I broke the first build... + - v99.99-pre-608 Some logging of texture overrides- also, only unregister if it's an actual ModTextureStatic, not if it's a subclass. + - v99.99-pre-607 Derpy exceptions derpy exception handling + - v99.99-pre-606 Remove the dependency in RenderEngine, decided on the simple API for texture FX + - v99.99-pre-605 Tweak the render patch- we won't fail if the updateTexture call fails + - v99.99-pre-604 Update patches: add in a setup for most of the texturefx classes + - v99.99-pre-603 Tweaking texture loading + - v99.99-pre-602 Fix tileSize -> iconTileSize. Stupid MCP + - v99.99-pre-601 Catch throwable (NoClassDefFoundError) and don't abort loading- it's probably a badly named class file. + - v99.99-pre-600 Fix some derpy + - v99.99-pre-599 Update patches for hd textures + - v99.99-pre-598 Change hd texture handling + - v99.99-pre-597 Refresh the renderengine patch- catch and log some texture pack reload errors + - v99.99-pre-596 More mod list fixes + - v99.99-pre-595 Lots of cleanup on the mod list, pretend we're the mcpatcher for mod HD detection. + - v99.99-pre-594 Fix up fubar in worldprovider. Add in obfuscation detection. Capture the exception that crashes minecraft in the log file. + - v99.99-pre-593 ModLoader worldtype hackery compatibility + - v99.99-pre-592 Fix derp + - v99.99-pre-591 Only log the warning once per texture + - v99.99-pre-590 push patches + - v99.99-pre-589 Fix millinaire support. Fix Portal eating rendering time. add in profile visibility for mod stuff. + - v99.99-pre-588 Fix the serverside. FUUUUUUUU! + - v99.99-pre-587 HD patching complete? Clean up mod info data, Dummy field for dummy mods + - v99.99-pre-586 Improving the scroll list, HD texture patches + - v99.99-pre-585 Actually pass in the mod name + - v99.99-pre-584 Fix up incorrect dependency handling + - v99.99-pre-583 Fix stupid problem with braces + - v99.99-pre-582 Tick only when there's a world + - v99.99-pre-581 Fix nulls in the mod list, start building the gui screen + - v99.99-pre-580 Gui related ticking + - v99.99-pre-579 Try always loading the language data + - v99.99-pre-578 Always load the "en_US" langpack into the translation table first, then the actual language. + - v99.99-pre-577 Derpy derp- fix stupid pointless cast + - v99.99-pre-576 Fix missing ml.sendpacket, call in renderers + - v99.99-pre-575 Actually mark the sprite as used when you allocate it! + - v99.99-pre-574 Helps to add the new hook! + - v99.99-pre-573 Hook texture pack changes and loads so we can register override textures + - v99.99-pre-572 Fix problem with nulls in getModList + Work on the meta information file + - v99.99-pre-571 More tweaks to stuff: mod list, branding, more hooks + - v99.99-pre-570 Tidying up and more hooks + - v99.99-pre-569 Tweak block rendering organization. Add in worldgen for client. + - v99.99-pre-568 Tidy up a lot of code- ModLoader and BaseMod are now almost identical client and server side + - v99.99-pre-567 Tweak ordering for sorting- should be a stable sort now + - v99.99-pre-566 Update git version capture + - v99.99-pre-565 Ignore jenkins tags + - v99.99-pre-564 Tweak some build stuff for versioning + - v99.99-pre-563 Update build to actually put Loader in... + - v99.99-pre-562 tweak location of build properties in src jar + - v99.99-pre-561 Lots of tweaks to mod output pretty printing. new versioning scheme. + - v99.99-pre-560 Inventroy rendering + - v99.99-pre-559 Fixed up the ModLoader render block hook, RP's blocks now render. + - v99.99-pre-558 Should fix colliding model ids with MC's internal IDs + - v99.99-pre-557 Fixes + - v99.99-pre-556 Fix up build script a bit, all modloader is public, and fix tile entity renderer + - v99.99-pre-555 Add in some more stuff for handling key bindings, rendering + - v99.99-pre-554 Reorganize ticking a bit + - v99.99-pre-553 Separate sprite handling, fix worldtype + - v99.99-pre-552 Working on the ticking stuff + - v99.99-pre-551 more client side hooks and Texture overrides/animations. + - v99.99-pre-550 Halfway through ticking- won't compile + - v99.99-pre-549 Fixed AudioMod compatibility with MultiMC style launchers. + - v99.99-pre-548 Bit masked the entity ID to change the range from -127-127 to 0-255 + - v99.99-pre-547 ModLoader moves forwards + - v99.99-pre-546 Let's get hooking! + - v99.99-pre-545 API is restored for client side. Implementation starting. + - v99.99-pre-544 And some patches for that + - v99.99-pre-543 The beginning + - v99.99-pre-542 Introduce the client side FML + - v99.99-pre-541 Implement addBiome, hopefully. Pushes biome list to the WorldType field. Sorry Bioxx. + - v99.99-pre-540 Check in some eclipse crapola. + - v99.99-pre-539 Updated MCP Mapings + - v99.99-pre-538 Added forge identifier to statistics collection. + - v99.99-pre-537 Fix for furnaces not smelting the final item in full stacks. + - v99.99-pre-536 Merge pull request #55 from CovertJaguar/patch-1 + Added getters for version vars. + - v99.99-pre-535 Fixed Levers droping off the backs of stairs client side. + - v99.99-pre-534 static final vars are inlined during the compile step, making the version variables useless at runtime. + - v99.99-pre-533 Fix copied code. Derpbag. + - v99.99-pre-532 Update FML with recent mainline changes + - v99.99-pre-531 Merge branch 'master' into bukkit + - v99.99-pre-530 New block hooks for creating custom beds. + - v99.99-pre-529 Merge pull request #54 from cpw/master + Update to fml 74- fix a problem with MLProp and primitives + - v99.99-pre-528 Update to FML 74: fixes an important issue with MLProp + - v99.99-pre-527 Fix a small issue with the build output script + Fix a significant issue with MLProp handling and primitives- they work now + - v99.99-pre-526 Bumped revision to 3 + - v99.99-pre-525 Fixed Vinella mob spawning bug that prevented mobs from spawning on the top most chunk. Added new Block function to determine if a Mob can naturally spawn on the block. Add new hook to allow for special case handeling on natural entity spawn. + - v99.99-pre-524 Fix for loading Minecart Entities in worlds that were last accessed before Forge was installed. + - v99.99-pre-523 Moved MLMP compatibility functions to ModCompatibilityClient, and fixed issue where no vehicles would be spawned. + - v99.99-pre-522 New ISoundHandler interface, useful for adding custom sounds and dealign with sound based events. + Includes basuic AudioMod compatibility. + - v99.99-pre-521 Fixed vinella bugs when trying to access chunk information with a y < 0 + - v99.99-pre-520 Added MLMP hook invocation for vehicle spawn and opening GUI's to provide compatibility for clients that have both ModLoaderMP and forge installed. + - v99.99-pre-519 Updated to FML build #73 + - v99.99-pre-518 More text fixup + - v99.99-pre-517 Typos + - v99.99-pre-516 Add in detection for MLMP and try to fail with a graceful message. + - v99.99-pre-515 Exposed TileEntityData packet to TileEntities. And added helper sender function. + - v99.99-pre-514 Added metadata sensitive Chunk constructor for Bioxx + - v99.99-pre-513 Added MinecraftApplet.clas to the force output list because users cant understand the concept of only replacing files they are told to. And bumped version to 3.1.2 + - v99.99-pre-512 Implemented a 'small' packet system for those mods that need to send rapid, small data packets and who are concered about the overhead of the 250 payload packet. It uses packet 131. + - v99.99-pre-511 Fixed shift-clicking issue with items that utilized the new ItemStack sensitive smelting system. + - v99.99-pre-510 Added generic packet sending function to MinecraftForge class. + - v99.99-pre-509 made the ID in PacketEntitySpawn unsigned. + - v99.99-pre-508 Update bukkit with new mod fixes + - v99.99-pre-507 Merge branch 'master', remote-tracking branch 'origin' into bukkit + - v99.99-pre-506 Tweak the loader a little bit to just use file names, not fully qualified directories when referring + to mods. + - v99.99-pre-505 Implemented RichardG's Paged Achivement list GUI modifications. + - v99.99-pre-504 Merge pull request #51 from ShetiPhian/patch-1 + Edits enable use of EntityPlayer.canHarvestBlock (for PlayerAPI) + - v99.99-pre-503 Respawning in dimensions should now properly set the dimension ID for the new player instance. + - v99.99-pre-502 MAX_ENTITY_RADIUS Now works on the Y axis + - v99.99-pre-501 Edits enable use of EntityPlayer.canHarvestBlock (for PlayerAPI) when the ToolClass has no rules for the block. + - v99.99-pre-500 Fix for vanilla crash for chunk generation with block ID's above 127. + - v99.99-pre-499 Damn you bukkit with your same names for different classes!!!! EntityPlayer->EntityHuman + - v99.99-pre-498 Fix chunk generators for bukkit + - v99.99-pre-497 Merge branch 'master' into bukkit + - v99.99-pre-496 Merge pull request #49 from cpw/master + Update to fml 68: fixes a ticking issue and soft vs hard dependencies + - v99.99-pre-495 Update fml to build 68: fixes a ticking issue and soft vs hard dependencies + - v99.99-pre-494 Changed entity Forge spawning code works to be more in line with normal spawning: + (World, double, double double) constructor is nolonger called, normal (World) constructor, and setPositionAndRotation is called afterwords. + yaw, pitch, and yawHead is sent (if the entity isn't a EntityLiving yawHead isn't used) + The datawatcher data is also sent like a normal Entity. + - v99.99-pre-493 Bukkit version + - v99.99-pre-492 Added variable entity radius to World, to be used if a mod make really large entities. + - v99.99-pre-491 Fixed bug in BlockFire's old fields. + - v99.99-pre-490 Fix "soft" dependencies so they can exist properly + - v99.99-pre-489 Fixed TileEntity bug that was causing Ghost tile entities. + - v99.99-pre-488 Multi-pass item rendering now uese proper render pass number. + - v99.99-pre-487 Added slope velocity hook for Covert + - v99.99-pre-486 Fixed bugs in the Dimension transfer code, Now displays proper join message, and respawning in dimensions other then 0 works. + - v99.99-pre-485 Try to fix jenkins build. + - v99.99-pre-484 Merge pull request #42 from CovertJaguar/patch-2 + Added a function for checking block harvest levels. + - v99.99-pre-483 Added a function for checking block harvest levels without having to resort to reflection. + - v99.99-pre-482 Fix server patch + - v99.99-pre-481 Merge in fixes from chickenbones for tick related problem + and straighten out variable naming in ModLoaderModContainer + - v99.99-pre-480 Added ItemStack sensitive burn time hook. + - v99.99-pre-479 Added new Item function to allow for multiple rendering passes. + Fixed a vinella bug where item layters would not line up for EntityItem's + Added new IItemRendere helper flag for 3d block translations. + - v99.99-pre-478 Rewrote IItemRenderer to be a more generic and expandable version, Breaks previous interfaces, but this should be the last time the interface changes. + Implemented the MapRender hook ChickenBones requested. + - v99.99-pre-477 Merge pull request #39 from cpw/master + Update to fml 62: adds in a couple of fixes + - v99.99-pre-476 Update FML for new hooks: onPlayerLogout and onPlayerDimensionChanged + - v99.99-pre-475 Push the patched file, as well + - v99.99-pre-474 Add in more "Player" related events. Fix up some MLProp stuff + - v99.99-pre-473 Fix regular expressions, thanks ChickenBones! + - v99.99-pre-472 Update fml to 62- provision a server console command and fix mod loading order + - v99.99-pre-471 Tweak Console handler patch so we're more friendly to forge + - v99.99-pre-470 A proper console command handler, also fix ordering of loaded mods + - v99.99-pre-469 Merge pull request #36 from cpw/master + Update to fml 58, separate the "register" and "announce to mods" phases of login + - v99.99-pre-468 Add in a console command handler so you can access the command console + - v99.99-pre-467 FML 59: don't send a zero length register packet, add mod channels + - v99.99-pre-466 Don't send a register unless I have channels. Add the channel to the mod channels list. + - v99.99-pre-465 Fix separated login/announce handler + - v99.99-pre-464 Split the packet salutation in two so we can work with or without forge + - v99.99-pre-463 Merge pull request #35 from cpw/master + Update to fml 57, fixes the fact FML wasn't calling it's onlogin hook + - v99.99-pre-462 Update to FML 57: fixes FML not calling it's login handler code + - v99.99-pre-461 Add the player object to the onLogin event so you don't need to dive internals for it during login + - v99.99-pre-460 Call my handleLogin hook from NetLoginHandler, tweak output in server gui and log file. + - v99.99-pre-459 Changed IGuiHandler's signature to be compatible with both sides. Took out ModLoaderMp reference in README. + - v99.99-pre-458 Couple of output fixups and added script to be executed by Jenkins during the build. First test build. + - v99.99-pre-457 Add server spawn protection config option as per someh4x0r's request. + - v99.99-pre-456 Implemented ISaveEventHandler as ChickenBones's requested. + - v99.99-pre-455 Updated patch for mapings + - v99.99-pre-454 Added ChickenBones's request ITextureLoadHandler hook + - v99.99-pre-453 Rewrote the login code to delay full login untill forge fnishes negotiating network IDs. Should fix entities not having proper ID mapings. + - v99.99-pre-452 Merge pull request #33 from cpw/master + FML tweaks and a fix to release.py + - v99.99-pre-451 Delete the old one too + - v99.99-pre-450 Add in recent fml with fixes + - v99.99-pre-449 Fix release script to import "inject_version" + - v99.99-pre-448 Fix subdirectory loading properly: mods will load inside eclipse.. + - v99.99-pre-447 Actually figure out the path for directory class loading + - v99.99-pre-446 regular expressions in java==fail + - v99.99-pre-445 Recurse into subdirectories found + - v99.99-pre-444 Try multiple "jar" sources- for eclipse testing + - v99.99-pre-443 it's addURL not addUrl dumbo + - v99.99-pre-442 it's getdeclaredmethod, dipstick + - v99.99-pre-441 Fix package private resolution of fields/methods from base minecraft by loading into minecraft's class loader not our own + - v99.99-pre-440 Add in a missing client side method to modloader stubbed for the server + - v99.99-pre-439 Update patches for FML fix. + - v99.99-pre-438 Add the hooks for crafting and smelting + - v99.99-pre-437 Finished up converting the source dist install scripts to python. Fixed a couple issues with the other scripts. + - v99.99-pre-436 Should load from whatever minecraft comes from now... + - v99.99-pre-435 Updated repo scripts to python, allowing more flexability and less code duplication. + - v99.99-pre-434 Fixed update_patches.py to now delete old patch files that have no working src relation + - v99.99-pre-433 Deleted patches + - v99.99-pre-432 Initial patch update to FML and MC 1.2.5 + - v99.99-pre-431 MCP Conf update for 1.2.5 + - v99.99-pre-430 Build should work now. Fix a stupid javadoc import. + - v99.99-pre-429 New build script- version the src dist as well + - v99.99-pre-428 Documentation: lots + Some eclipse workspace settings that might help? + - v99.99-pre-427 Handle the minecraft object registry better- now the client compiles too + Also a quickie astyle run over the code.. + - v99.99-pre-426 Update the patches and fix the shell script + - v99.99-pre-425 Reorganize the code a little bit- move some stuff that was on FMLHandler to the common handler. Add a delegate + into the common handler that delegates to the right sided handler + - v99.99-pre-424 Clean up extraneous print statements from the build + - v99.99-pre-423 Fix INSTALL-fml.txt file location in the server zip + - v99.99-pre-422 Append a .class to the diff file list. Now you should just be able to iterate it and read every file in it directly. + - v99.99-pre-421 Run Astyle over the FML code. Happy lex? + - v99.99-pre-420 OK. Now the script works + - v99.99-pre-419 Crap at writing good python apparently + - v99.99-pre-418 Tweak file list script to print obf names + - v99.99-pre-417 Merge remote-tracking branch 'origin/master' + - v99.99-pre-416 Rebuilt patches with new scripts. + - v99.99-pre-415 Cleaned up update_patches to fix a few bugs. Updated applypatches to normalize the patch file's line endings to make them work cross platform. Added download_firnflower and setup script. As well as added the GnuWin32's diff binary, so windows can create patches as well. http://gnuwin32.sourceforge.net/ + - v99.99-pre-414 Created eclipse workspace, should allow simple and quick access to working on FML + - v99.99-pre-413 Missed a couple of wording tweaks + - v99.99-pre-412 Tweak the build a bit, add some more data and generate the + touched file list for forge + - v99.99-pre-411 Tidy up some of the installation media + - v99.99-pre-410 links to implementation + - v99.99-pre-409 Channel validation + - v99.99-pre-408 NetworkHandler doesn't care about channel ownership + - v99.99-pre-407 Update patches for network handler + - v99.99-pre-406 Modloader complete + - v99.99-pre-405 Generic container + - v99.99-pre-404 Config dir handling + - v99.99-pre-403 MLProp + - v99.99-pre-402 Mod sorting + - v99.99-pre-401 Everything except ordering + - v99.99-pre-400 Fix build script for generating md5s + - v99.99-pre-399 Update to 1.2.5 and hopefully forge compatibility + - v99.99-pre-398 Implemented a chat event handler system to allow for manipulating and handeling the various chat/command events. + - v99.99-pre-397 Add IChunkLoadHandler.canEntityUpdate() function to allow entities to update while in custom loaded chunks. + - v99.99-pre-396 Some cleanups to update_patches, should run properly on any system now. + - v99.99-pre-395 Fix some shadowing warnings. + - v99.99-pre-394 Forge support + - v99.99-pre-393 Initial attempts to support forge stuff + - v99.99-pre-392 Fix NPE + - v99.99-pre-391 More logging and maybe fix default package mods + - v99.99-pre-390 Logging fun. Whee! + - v99.99-pre-389 Fail + - v99.99-pre-388 More logging + - v99.99-pre-387 Tweak class loader + - v99.99-pre-386 Add more patches + - v99.99-pre-385 Some implementation + - v99.99-pre-384 tweak MC server hook + - v99.99-pre-383 some build and logging tweaks + - v99.99-pre-382 Fix build + - v99.99-pre-381 Fix derpy + - v99.99-pre-380 Tweak loader a bit + - v99.99-pre-379 Fix patching + - v99.99-pre-378 More build stuff + - v99.99-pre-377 More building fun + - v99.99-pre-376 fix build script + - v99.99-pre-375 Add in more ignore stuff and a sample "fmlbuild.properties" file + - v99.99-pre-374 More build stuff, adding in readme etc copied from forge + - v99.99-pre-373 Move more stuff around + - v99.99-pre-372 Build system + - v99.99-pre-371 Start patching fun + - v99.99-pre-370 Ignore stuff + - v99.99-pre-369 We're Forge Mod Loader, not Forge ModLoader + - v99.99-pre-368 Tweak license to refer to github + - v99.99-pre-367 Add licenses reorganize code + - v99.99-pre-366 Starting to get somewhere + - v99.99-pre-365 Thoughts on how to do the modloading properly + - v99.99-pre-364 Tab cleanup + - v99.99-pre-363 Initial commit + - v99.99-pre-362 Fixed camelcasing in IConnectionHandler, ment to do during first upgrade. + - v99.99-pre-361 Changed update_patches script to use python for the bulk, Prevents making 1800 temporary useless files. + - v99.99-pre-360 Fixed typo bug in MinecraftForge.getEntityTrackerInfo + - v99.99-pre-359 Updated to MC: 1.2.4 MLMP: 1.2.4 v1 + Removed all code that was marked as deprecated, IE: ICustomItemRenderer, and the functions in Configuration + - v99.99-pre-358 Reworked EntityPlayerMP.openGui to hopefully be more compatible with PlayerAPI + - v99.99-pre-357 Cleanup the EffectRenderer patches, Allows custom food items to have the proper particals. Cleaned up special case class in favor of basic java generics. + - v99.99-pre-356 Added rider sit pull request. + - v99.99-pre-355 Fixed a couple of bugs in the Configuration categories pull request. + Added helper functions to Property for standard int/boolean usage. + - v99.99-pre-354 Merge pull request #22 from CovertJaguar/patch-5 + Added the ability to define custom categories for config files. + - v99.99-pre-353 Updated MCP mapings + - v99.99-pre-352 Removed createCategory() function and changed it to create categories as they are encountered. + - v99.99-pre-351 Added the ability to define custom categories for config files. + - v99.99-pre-350 Added MinecraftForge.isClient() function that returns true if you are in the Minecraft Client, (As defined as net.minecraft.client.Minecraft existing) false otherwise. + Fixed a typo on PacketEntitySpawn that caused speed to be assigned improperly. + A little code cleanup. + - v99.99-pre-349 Implemented Pheenixm pull request allowing for more control over the camera. + - v99.99-pre-348 Changed logic in Configuration to allow for extended block ID mods easier access to change that. Just use reflection to change Configuration.configBlocks to whatever length you want. + - v99.99-pre-347 Fixed NPE on CustomPayload packets with 0 data + - v99.99-pre-346 Fixed a few typos that CovertJaguire found in The Forge entity handeling code. And re-wrote the connection sequance so that clients get a list of mod ids before anything else. + - v99.99-pre-345 Readded the deprecated interface ICustomItemRenderer. Added method to enforce deprecation cross Minecraft versions. + - v99.99-pre-344 Bumped version number to 1.4.1 + - v99.99-pre-343 Merge pull request #15 from newthead/master + Improved Custom Item Render Interface + - v99.99-pre-342 Merge pull request #16 from CovertJaguar/patch-3 + Fix for network code. + - v99.99-pre-341 Fixed dyes showing twice in creative list + - v99.99-pre-340 Reverted vanilla texture binding to an explicit if() statement based on item ID + - v99.99-pre-339 Changed render hook checks to all use ItemStack instead of itemID + - v99.99-pre-338 Fixed tile entities not properly being removed for blocks that do not extend BlockContainer, or override BlockContainer.onBlockRemoval + - v99.99-pre-337 Fix for network code. + - v99.99-pre-336 Fixed a class to a deprecated method to fix tool effectiveness. + - v99.99-pre-335 Fixed excessive need for user interaction in the install script. + - v99.99-pre-334 Merged item rendering interfaces into a single IItemRenderer + - v99.99-pre-333 Fixed IOException not found error in CovertJaguires pull request. Updated scripts so that build should now be fixed + - v99.99-pre-332 Reworked the workspace scripts so the build should fail on compile errors. This build should fail as a test. + - v99.99-pre-331 Modified patches to use new item render hooks + - v99.99-pre-330 Updated render hooks and registration to use the IItemRenderer interface + - v99.99-pre-329 Merged item rendering interfaces into a single IItemRenderer + - v99.99-pre-328 Merge pull request #14 from CovertJaguar/patch-2 + Added throws clause to ISpawnHandler functions... + - v99.99-pre-327 Fixed onTakenFromCrafting hooks to be called once per stack taken. Sadly due to how shift-click is handled, the passed in item stack is not garenteed to be the stack that the result was added to. + - v99.99-pre-326 Added additional flag for rendering entity item bobbing + - v99.99-pre-325 Cleanup/fix item render hooks + - v99.99-pre-324 Added render code for inventory items and entity items. + - v99.99-pre-323 Added remaining item render hooks, and fixed a static method access + - v99.99-pre-322 Clarified render option for inventory items + - v99.99-pre-321 Added hook for rendering equipped items + - v99.99-pre-320 Added new item render interfaces to Forge client + - v99.99-pre-319 Added throws clause to ISpawnHandler functions to keep the functions consistent with similar functions and increase ease of use. Exceptions are already being caught everywhere these functions are called, so no further changes required. + - v99.99-pre-318 Made BlockStairs, BlockFarmland, and BlockStep have proper sided-solidity. Can now place torches on any solid side of those blocks. + - v99.99-pre-317 Proper fix for SDK's invalid bit shifts of parameters for chunk population + - v99.99-pre-316 Fixed type on patch conversion messing up tile entities + - v99.99-pre-315 Fixed sides of grass not getting biome colors + - v99.99-pre-314 New EntityInteract hook for handeling player vs entity interaction on the global level vs the item level. + - v99.99-pre-313 Fixed forgotten type identifier in clean_src + - v99.99-pre-312 Merge pull request #12 from cpw/fixworldgen + Fix worldgen doubleshifting in ModLoaderMP until SDK fixes it. + - v99.99-pre-311 Fix worldgen doubleshifting in ModLoaderMP until SDK fixes it. + This means mods can generate surface and nether in SMP again. + - v99.99-pre-310 New script to fix decompile differences between windows and linux/osx. + Removed the MLProp special case, no longer needed as MLProp decompiles fine. + Updated patches to work on all systems. + Added warning and exit if the user does not say yes to the cleanup. + - v99.99-pre-309 Fixed a merge error. + - v99.99-pre-308 MCP Update. Fixed a few small bugs in the linux scripts. + - v99.99-pre-307 Custom dimensions should now honor the canRespawnHere function for respawning. + - v99.99-pre-306 Fixed a wrong argument for dimensions, should fix entity tracking. + - v99.99-pre-305 Fixed the inverted logic in the missing mod check. + - v99.99-pre-304 Fix up Configuration ids to only work for 256 ids until Jeb finishes the 4096 conversion. + - v99.99-pre-303 Merge remote-tracking branch 'origin/master' + - v99.99-pre-302 Fixed a bug where vines were not shearable. + - v99.99-pre-301 Merge pull request #11 from CovertJaguar/patch-1 + Fixed a minor bug with the Minecart Dictionary. + - v99.99-pre-300 Fixed a minor bug with the Minecart Dictionary. + - v99.99-pre-299 1.4.0 official release. + - v99.99-pre-298 Updated to MLMPv3 + - v99.99-pre-297 Implemented ChickenBone's Chunk handler + - v99.99-pre-296 Hack-fix for players getting stuck during logins. Detailed fix when bug is actually tracked down. + - v99.99-pre-295 Updated to latest MCP + - v99.99-pre-294 Fixed client side bonemeal on grass only making flowers + - v99.99-pre-293 Removed improper tile entity negation + - v99.99-pre-292 Fixed a generic tile entity line i missed on the server side. + - v99.99-pre-291 Fixed MLMP thinking Network mods need a client side when they dont. + - v99.99-pre-290 Updated to SDK MLMP v2 + - v99.99-pre-289 Fixed missing double array in MLMP's packet server side. Also, fixed the creative code again, brain failed. + - v99.99-pre-288 Updated to SDK's 1.2.3 MLMP, Mush cleaner, no longer supporting Flan's. + - v99.99-pre-287 Got my comparitor turned around + - v99.99-pre-286 Updated gitignore, fixed digging particles, fixed creative container showing to many blocks, fixed wrong argument for custom renderers. + - v99.99-pre-285 ItemBlock now implements ITextureProvider so that blocks with custom textures will showup properly when being held. + - v99.99-pre-284 Updated MCP's patch files. Fixes hangs on running MC as applet. + - v99.99-pre-283 Cleanup of ModLoaderMP and proper update to the latest version of ModLoader + - v99.99-pre-282 Fixed directory issues in the setup script + - v99.99-pre-281 Fixed NPE in the login handler + - v99.99-pre-280 Updated MCP mapings files + - v99.99-pre-279 No longer mark forge packets as chunk packets. + - v99.99-pre-278 Fixed missing space in linux scripts + - v99.99-pre-277 Updated for MLMP 1.2.3 v1 + - v99.99-pre-276 Made the scripts forge updating md5s/mcp/names + - v99.99-pre-275 Missed damageCarryover on the server + - v99.99-pre-274 Small imports cleanup + - v99.99-pre-273 First push of server side patch updates for 1.2.3. MLMP is still not updated so it does not include those changes, and will not compile. + - v99.99-pre-272 Deleted unneeded server side patches, Packet250 bug was fixed. And the others got moved to AnvilSaveHandler + - v99.99-pre-271 Couple of things I missed client side + - v99.99-pre-270 Bit of a cleanup of the client patches + - v99.99-pre-269 Client side initial patch update to Fernflower and MC 1.2.3 + - v99.99-pre-268 No longer needed, bug was fixed + - v99.99-pre-267 Same patch diff, files. + - v99.99-pre-266 Conf for 1.2.3 + - v99.99-pre-265 Deleted EntityPigZombie patches, Who needed these? Why could you not do this via reflection? + - v99.99-pre-264 removed unneeded import, and fixed casing of args in IShearable + - v99.99-pre-263 Fixed unneeded imports in ForgePacket + - v99.99-pre-262 Made mod_MinecraftForge extend NetworkMod, and changed NetworkMod to extend BaseModMP server side. + - v99.99-pre-261 Updated The Json enum helper to point to the new packaged names. And fixed a casing change in ModLoader + - v99.99-pre-260 Updated eclipse project for MCP 1.2.3's inclusion of the Start folder in the src folder. + - v99.99-pre-259 Deleted modLoaderMP.patch, unneeded now that we use Fernflower + - v99.99-pre-258 Updated scripts so that we use Fernflower now. Added a small python script to download fernflower for the user. And the scripts exit out if it fails. + - v99.99-pre-257 Bumped version to 1.3.4, final commit for Minecraft v1.1 + - v99.99-pre-256 Fixed bug in build script that caused the Minecraft/MinecraftServer classes to not be included. + - v99.99-pre-255 Client side of the new Dimension support. + - v99.99-pre-254 Fixed compile error for the spelling pull request. + - v99.99-pre-253 Fixed ITextureprovider for multi-textured items when rendering on the GUI. + - v99.99-pre-252 Merge pull request #4 from Deveducer/master + Fix spelling error + - v99.99-pre-251 Fixed spelling mistake ('Frequancy') + - v99.99-pre-250 Merge commit + - v99.99-pre-249 Ran AStyle over forge code for uniform code formatting, and refactored old code a bit to have cleaner names. + - v99.99-pre-248 Deleted Deprecated interfaces. + - v99.99-pre-247 Fixed line endings in windows update_patches + - v99.99-pre-246 Fixed up Shearable blocks to play nicer with sub-classes. + - v99.99-pre-245 Merge pull request #3 from Deveducer/patch-1 + People may think the server needs the mods to continue and not the clien... + - v99.99-pre-244 People may think the server needs the mods to continue and not the client. + - v99.99-pre-243 Fixed a bug in update_patches that caused apostrphies to be removed. Causing the last patch to be generated incorrectly. + - v99.99-pre-242 Initial attempt at server side extra dimensions support. + Mods must register there dimensions on load, by calling DimensionManager.registerDimension(uniqueID, WorldProvier, boolean) + Mods are resposible for writing there own transporter blocks. + Initial commit, needs some more testing and design thoughts. + - v99.99-pre-241 Implemented a response to Methuselah96's Arrow hook request. See IArrowNockHandler and IArrowLooseHandler + - v99.99-pre-240 Added new Item.getIconIndex context sensitive version. + - v99.99-pre-239 Moved Client side EntityPlayer.openGui work code to EntityPlayer for compatibility between player API. + - v99.99-pre-238 Introduced some debugging info into Forge packets. And a debug flag in the client and server packet handlers. + - v99.99-pre-237 Marked forge packets as 'chunk' packets. Giving them a higher priority making the initial mod list check more reliable. + - v99.99-pre-236 Changed the layout of the missing mods gui a little. Still needs a lot of work to look good. + - v99.99-pre-235 Fixed linux scripts, fixed TE bug. + - v99.99-pre-234 Merge branch 'master' of github.com:MinecraftForge/MinecraftForge + - v99.99-pre-233 Linux scripts fixed, TE bug fix. + - v99.99-pre-232 Implemented a generic EntityPlayer.openGui system, and the network backend for it to work on server and client. + - v99.99-pre-231 Expanded the Mod check to test for missing mods and display a GUI screen for the client if it is missing any. + The client now downloads NetworkMod ID's from the server upon connecting. + - v99.99-pre-230 Introuduced NetworkMod, a BaseMod extension and replacement for BaseModMP. All mods that are designed to work in the server environment should extend this. + NetworkMods will be assigned unique ModIDs by the server, and those IDs will be sent to the client upon connection. + Refactored Forge packets to the net.minecraft.src.forge.packets package. And introduced the base ForgePacket class. + Added initial ModList request/response. + - v99.99-pre-229 Exposed getters for NetServerHandler.playerEntity and NetworkManager.netHandler + - v99.99-pre-228 Fixed up the install scripts. The linux script no longer needs sed. Should fix some issues on OSX's without gsed. + Also forge sources will only be copied to sides that were downloaded. + Also, install scripts now prompt for input to cleanup. + - v99.99-pre-227 Split mod_MinecraftForge so that Clients arnt required to have MLMP installed if they don't use a MP mod. + - v99.99-pre-226 Bumped version to 1.3.3 + - v99.99-pre-225 Small update to update_patches.bat, to skip patch reject files. + - v99.99-pre-224 Update MCP Mapings + - v99.99-pre-223 Refactored so that ISpecialArmor items do not see the factor of 25 on the damage. + The value returned form ISpecialArmor.getProperties is now copied, so mod items are free to re-use there return values. + - v99.99-pre-222 Reworked ISpecialArmor to provide better functionality as requested by IC2 devs. + Armor can now be prioritized over other armor. + It can deal with damaging it's own itemstacks. + Also impkemented the ISpecialArmor.getArmorDisplay + - v99.99-pre-221 Implimented a new IShearable system. This allows mods to create both new shear-like items/blocks. As well as new Entities/Blocks that work with other mod's shear-like items. + - v99.99-pre-220 Implemented item.onBlockStartBreak call for creative single player. + - v99.99-pre-219 Added Item.onLeftClickEntity hook. Used to intercept and cancel the 'attack' action within items. + - v99.99-pre-218 Fixed ITextureProvider support for items that have multiple colored overlays. + - v99.99-pre-217 Lowered the amount of build log spam, and fixed the inject_version script for use on other systems. + - v99.99-pre-216 Missed a caluse, ISpecialArmor should work as intended now. And not destroy Armor instanatly. + - v99.99-pre-215 Implmented Sengir's IPickupHandler. + http://www.mod-buildcraft.com/forums/topic/hook-intercept-item-pickups-by-player-entities/?view=all + - v99.99-pre-214 Merged in the change to ISpecialArmor to introduce the DamageSource argument. + As well as the concept of damage absorption vs reduction. + - v99.99-pre-213 Created a Entity tracking ans spawning system. + Mod creators should call MinecraftForge.registerEntity to register a entity. + All entity ID numbers are Mod Unique. Meaning two mods can have Entity #1. + Added client and server side packet handlers for the 'Forge' channel. For use in internal packets such as the new Spawn packet. + Updated the build scripts to copy over unique server source files now that there actually are some. + For modders: + If you have a entity that used MLMP's 'owner' system, you should have your entity implement IThrowableEntity + If you have a entity that implments MLMLP's ISpawnable, you should implement ISpawnHandler. + They provide the same functionality, just in a cleaner, more orginized way and will be the method used when we eventually drop MLMP. + - v99.99-pre-212 Fixed return value for un/registerChannel. Now returns properly indicate when un/register commands should be sent. + - v99.99-pre-211 Setup .gitignore for eclipse bin dirs. + Fixed line endings in install.sh + Added mod_MinecraftForge for simpler logging of minecraft version in crash reports + Added new hooks for connection events, See IConnectionHandler for more details. + Added Packet250CustomPayload handeling and channel registraction management, see MessageManager and IPacketHandler for more details. + Forge now uses unsed fields in C->S Packet1Login to identify itself. None Forge clients will get a graceful disconnect message instead of the 'Unknown packet 230' + - v99.99-pre-210 First official commit for GitHub. Using to test build automation system firing from final configuration. + - v99.99-pre-209 New parameter for setup script to skip the initial decompile. Used in the build system to speed things up. + - v99.99-pre-208 bumbed version number + - v99.99-pre-207 Potions are not armor. + - v99.99-pre-206 Reorganized SpecialArmor code to work properly. + - v99.99-pre-205 Some typo fixes + - v99.99-pre-204 Updated for MCP Mappings + - v99.99-pre-203 Streamlined the Setup, Build and Package scripts: + On windows they no longer need the user to press enter every step + Moved version info out to version.txt, This will only effect the svn. If you update the version do it in version.txt not in ForgeHooks.java. + Introduced the build number into the version string. + Cleaned up some extra echos in scripts. + - v99.99-pre-202 Reach and Rail bugfix + - v99.99-pre-201 bumped version number + - v99.99-pre-200 Install.cmd now tries to add the system folder to the current path. + - v99.99-pre-199 Disabled updatenames int he isntall scripts till MCP fixes the reobf issue. + Updated to MLMP 1.1v2, Which says it fixes bugs it doesn't But it does fix the packet bug. + Fixed a bug in Packet 250. + - v99.99-pre-198 Updated MCP mappings + - v99.99-pre-197 Fixed the Minecart Drop bug + - v99.99-pre-196 Fixed a bug that caused snowballs to drop incorrectly. + - v99.99-pre-195 Small update to ContainerCreative hook for better compatibility with mods that extend block IDs. + - v99.99-pre-194 Fixed getCartClassForItem and getCartTypeForItem + - v99.99-pre-193 Bug Fix for Chests staying open on MP Servers + Implemented reach distance variable + - v99.99-pre-192 Fixed a few accessors I missed: + Server RailLogic.getNAdjacentTracks public + Server TileEntityFurnace.getItemBurnTime static + New GUIControls change, Made it into a scroll panel instead of a static position window. + This just makes things look better when multiple mods with KeyBindings are installed + - v99.99-pre-191 Fixed a mapping issue with client side TileEntityFurnace patch + - v99.99-pre-190 added missing files + - v99.99-pre-189 removed files from previous version + - v99.99-pre-188 bumped version number + - v99.99-pre-187 merged with 1.1 branch + - v99.99-pre-186 Bumped version number + Added initialization to ModLoader's log + - v99.99-pre-185 Fixed an unroll from the MCL merge. Updated MCP mappings. + - v99.99-pre-184 Fixed NPE on some JVM's + - v99.99-pre-183 Merged in MCL branch + - v99.99-pre-182 Improved the ladder hook. Added a new hook for sustained-use items. + - v99.99-pre-181 Fixed MCP mappings again. Fixed the Entity NBT code. + Added a new hook to support custom enchantments. + - v99.99-pre-180 Updated MCP Mappings. + - v99.99-pre-179 Fixed faces for BlockFire + - v99.99-pre-178 Refactored a bit of the TileEntity code so that ANY block may now have a tile entity. + This is to allow modders the ability to extend blocks other then BlockContainer, and still be able to have a TileEntity. + Also added a NBTTagCompound to the base EntityClass, this allows any entity to be given arbitrary data that will persist across world saves. + This data is NOT sent over the wire in a MP situation, to have data sent over the wire automatically use the built in data watcher. + - v99.99-pre-177 bumbed version number + - v99.99-pre-176 Changed Block.setBurnRate to public and Block.setBurnProperties + Re-added bounce functions to BlockFire for non-forge mods. + Should fix Optifine compatibility. + - v99.99-pre-175 Fixed a re-name that somehow missed the commit. + Serverside chanceToEncourageFire -> getFireSpreadSpeed + - v99.99-pre-174 Fixed some rendering issues. + - v99.99-pre-173 Another mapping update. + - v99.99-pre-172 Updated mapping for last commit + - v99.99-pre-171 Mapping updates. + - v99.99-pre-170 Re-added BlockFire's properties, apparently some people access this by reflection. + - v99.99-pre-169 Bumping the version number. + - v99.99-pre-168 Fixed some strange behavior in snow blocks. Fixed a missing patch checkin. + - v99.99-pre-167 A minimalistic hook for rendering world effect overlays or other 3D overlay + data. + - v99.99-pre-166 Major rework of the rendering core. Added support for custom render context + handling. + - v99.99-pre-165 Added Item.onDroppedByPlayer hook + - v99.99-pre-164 Deprecated IUseItemFirst, and made onUseItemFirst work in Creative. + - v99.99-pre-163 Added server side prototypes for addCreativeItems()s They are unused, but declared for compiling compatibility. + - v99.99-pre-162 Added hooks to BlockFire for setting block flame interaction properties. + - v99.99-pre-161 Replaced dropBlockAsItemWithChance in BlockNetherStalk with getBlockDropped. + - v99.99-pre-160 Fixed a minor crop fortune bug. + - v99.99-pre-159 Commit of a hook for adding items into world dungeon generation. + Uses a weighted random selection scheme. + Also a hook for adding custom mobs to the dungeon generation list. + - v99.99-pre-158 Updated mappings + - v99.99-pre-157 Implemented ISidedInventory for Brewing Stands. + Top is input, 1 slot + All other sides are output, 3 slots. + - v99.99-pre-156 Added missing native library path to forge_client project. + Added harvest levels/effectiveness for Axes and Shovels. + - v99.99-pre-155 Fixed a zLevel bug with custom item renderers. + - v99.99-pre-154 bumped version numbers + - v99.99-pre-153 Fixed seeds/wheat not dropping from Crops/TallGrass. + All future Forge code should use proper annotations when Overriding. + - v99.99-pre-152 Small fix to decrease the number of glBindTexture calls that are immediately overridden. + - v99.99-pre-151 The install scripts will now only patch the client/server if they are there. + This allows for people to only worry about getting one side setup correctly if they don't care about the other. + - v99.99-pre-150 Fixed a infinite recursion loop in spacetoad's commit to Block.java.patch + Added @Deprecated annotations to the 'backwards compatible' functions spacetoad re-added. + Made changes to the install scripts: + -Will overwrite the current MCP mappings and use the ones that ship with forge, this + should eliminate all the issues of people not being able to install it because they updated there mcp.cfg + -Will now move fernflower.jar if it is found, so that MCP will not decompile using it. + Should fix the issues of people trying to use forge with fernflower installed. + -Will call updatemcp/updatenames so that users get the latest mappings for unmapped items. + -Also calls updatemd5s so that the forge API is skipped when spitting out reobfusicated files. + Update the readme to be more accurate. + Added my name to the credits :P + Updated the update_patches/package scripts to account for grabbing the conf folder. + Added GnuWin32's grep + - v99.99-pre-149 bumped version number + - v99.99-pre-148 further backward compatibility fixes + - v99.99-pre-147 Added my EnumHelper classes, this allows for dynamic creation of Enum values at runtime. + See My post for a example: + http://www.minecraftforum.net/topic/514000-api-minecraft-forge/page__view__findpost__p__10948540 + - v99.99-pre-146 Missed some mappings + - v99.99-pre-145 For for updated mappings. + - v99.99-pre-144 added server side of the previous commit + - v99.99-pre-143 fixed backwards compatibility + - v99.99-pre-142 Fixed fortune enchant. + This breaks forge's quantityDropped signature, be careful when updating mods. + - v99.99-pre-141 Cleaned up a few things related to MLProp + Deleted unmaintained fernflower patch. + - v99.99-pre-140 Added a hoe handler for advanced farming. + - v99.99-pre-139 Added new tool harvest intercept hook. Removed mlprop.patch. + - v99.99-pre-138 Moved dye creative adds to the ItemDye class. + - v99.99-pre-137 Creative Container population hook. + - v99.99-pre-136 Fixed missing CraftingManager patches for the repair disable hook. + Fixed smp mlprop. + - v99.99-pre-135 Added MLprop.java that ST forgot when he merged. + Fixed EntityPlayer.getPlayerStrVsBlock metadata function for 1.0.0 changes in Enchantments/Potions. + - v99.99-pre-134 bumped version number + - v99.99-pre-133 merged with pre-1.9p5 branch, for 1.0.0 release + - v99.99-pre-132 fixed mapping + - v99.99-pre-131 New block destruction hook. Deprecated IOverrideReplace. + - v99.99-pre-130 Updated MCP mapping, backed out a useless patch. + - v99.99-pre-129 Added some IC2 items. + - v99.99-pre-128 Changed a field permission for MFR. + - v99.99-pre-127 Small TileEntity fix. + - v99.99-pre-126 Added a few more known ingots. + - v99.99-pre-125 Bugfix for numeric range of mob and window IDs. + - v99.99-pre-124 Fixed TileEntity caching. + - v99.99-pre-123 Patch for a small activation glitch in doors. + - v99.99-pre-122 MCP update. + Fixed a problem with TileEntity sending. + - v99.99-pre-121 Rolled in a critical MLMP fix, because MLMP is virtually unmaintained. + - v99.99-pre-120 Added ore dictionary. + - v99.99-pre-119 Fix for new MCP mappings. + Fixed the distribution of flowers with bonemeal. + Fixed accidentally making obsidian easy to mine. + - v99.99-pre-118 Fixed line endings in install.sh + - v99.99-pre-117 Updated the package.sh script to include the patches, the new install.sh, and modLoaderMP/mlprop.patch + - v99.99-pre-116 Changed the windows setup to use del instead of remove. + Both update patches scripts no longer remove svn entries. + Added the forge_client\bin and forge_server\bin folders to the svn ignore. + - v99.99-pre-115 bumbed forge minor version + - v99.99-pre-114 reactivated special armor code + - v99.99-pre-113 Made the windows setup script a bit more robust, also made both scripts filter out non-patch files. {Issue with svn files} + - v99.99-pre-112 Fixed a bug in forge_client project that had a hard link to E:/MCP/jars/bin/paul.jar now points to MCP/jars/bin/minecraft.jar {has the same paulsound libraries} + Major refactoring of the patches, now each modified file gets its own patch file. + Rewrote all the scripts to use new multi-patch system. + Added linux install.sh using new system. + Added some required libraries from GNUWin32 for the windows side of the new setup.bat/update_patches.bat http://gnuwin32.sourceforge.net/ + - v99.99-pre-111 Changed a field permission. + - v99.99-pre-110 Fixed another TileEntity bug. + - v99.99-pre-109 ISidedInventory is now explicitely an inventory + - v99.99-pre-108 Fixed the MCP mappings. + - v99.99-pre-107 - Added an ItemStack parameter to IArmorTextureProvider + - Added ISidedInventory + - Added IBonemealHandler + - Added hooks in grow-on-grass and in break tall grass. + - Fixed furnace output of multiple items. + - Added getBlockDropped(). + - Bumped version number to 1.1.1. + - v99.99-pre-106 Hopefully fixed the major TileEntity bugs. + - v99.99-pre-105 Fixed TileEntities, bumped version number. + - v99.99-pre-104 Fixed digging particles. + - v99.99-pre-103 Added a fix for onItemUse regression. + - v99.99-pre-102 More MCP mapping fixes. + - v99.99-pre-101 Undid that. Whoops. + - v99.99-pre-100 Code to remove a single block effectiveness. + - v99.99-pre-99 Metadata-sensitive quantity dropped. + - v99.99-pre-98 Fixed up a few bugs in the tool path. + - v99.99-pre-97 Fixed another bug in the furnace patch. Works now. + - v99.99-pre-96 Small bugfix for furnace patch. + - v99.99-pre-95 Metadata-sensitive smelting patch. + - v99.99-pre-94 Fixes for MCP updates. + - v99.99-pre-93 Fixed the 1.8.1 version for MLMP support. + - v99.99-pre-92 A bunch of little patches to make it actually build for 1.8.1. + - v99.99-pre-91 First attempt at a 1.8.1 version. May not work. + - v99.99-pre-90 Unrolled a mistaken fix. + - v99.99-pre-89 Another try for osx. + - v99.99-pre-88 A small fix to hopefully make the script work on a mac. + - v99.99-pre-87 Redesigned TileEntity handling. + - v99.99-pre-86 fixed SMP bug related to BuildCraft issue #226 + - v99.99-pre-85 A few small patches to fix obscure piston rendering bugs. + - v99.99-pre-84 Optifine compatibility patch. + - v99.99-pre-83 updated to latest MCP, and added custom item rendering facilities + - v99.99-pre-82 Improved trapdoor hook. + - v99.99-pre-81 New lighting hook. + - v99.99-pre-80 Fixed new MCP mappings. + - v99.99-pre-79 bumped forge version # to 1.0.6 + - v99.99-pre-78 added ArmorProperties constructors, remove deprecated subprograms (supposedly not used by anyone) + - v99.99-pre-77 fixed headers, implemented new armor computation for IC2 + - v99.99-pre-76 Fixed the permissions on a couple fields in ItemTool. + - v99.99-pre-75 temporary reverted to r61 + - v99.99-pre-74 updated credits + - v99.99-pre-73 Patched the installer again. + - v99.99-pre-72 Fixed a typo. + - v99.99-pre-71 Small RedPower-specific patch. + - v99.99-pre-70 Added armor texture hook. + - v99.99-pre-69 New install script for Windows. + - v99.99-pre-68 Fixed the version number. + - v99.99-pre-67 Changed some field permissions. + - v99.99-pre-66 Handler for custom block highlight. + - v99.99-pre-65 Version control logic, improved the destroy handling hook. + - v99.99-pre-64 Improved BTW compatibility. + Finished the placement hook changes. + Added a sleep handler. + Added a current item destroyed handler. + - v99.99-pre-63 Checking in the new crafting hook. + - v99.99-pre-62 Added a little support for two-pass rendering. + - v99.99-pre-61 Forgot the forge hooks. + - v99.99-pre-60 Updates: + - Added warning message for non-preloaded textures. + - Documentation + - Ladder fix for SMP. + - Obsoleted IBlockSecondaryProperties + - Added hooks for place-by-side. + - Fixed texture 3 and piston texture bug. + - Added new tool system. + - v99.99-pre-59 Added patches for decompiled by fernflower source. Client only, and not tested enough. Using is currently not recommended. + - v99.99-pre-58 Uploaded new install file. + - v99.99-pre-57 Fixed for the new version of MCP. + - v99.99-pre-56 Uploaded install fix. + - v99.99-pre-55 The ladder hook. + - v99.99-pre-54 Fixed a typo in isBoundingBoxBurning. + - v99.99-pre-53 updated list of contributers + - v99.99-pre-52 updated release and package script to take into account credit file + - v99.99-pre-51 renamed file + - v99.99-pre-50 initial revision of the credit file, to be completed + - v99.99-pre-49 Added a comment. + - v99.99-pre-48 Added a small patch to MovingObjectPosition. + - v99.99-pre-47 Not really a change. + - v99.99-pre-46 Added a texture preloader to avoid render glitches on the first render. + - v99.99-pre-45 New multiple-tessellator texture renderer. + - v99.99-pre-44 New install script for Linux users. + - v99.99-pre-43 improved installation and setup scripts + - v99.99-pre-42 Added secondary block properties patch. + - v99.99-pre-41 Fixed a little path bug. + - v99.99-pre-40 Improved the setup scripts. + - v99.99-pre-39 Fixed bugs in the pickaxe code. + - v99.99-pre-38 Improved some documentation. + - v99.99-pre-37 removed inner classes, remove redundant biome control + - v99.99-pre-36 fixed files for release + - v99.99-pre-35 additional comments + - v99.99-pre-34 added comments + - v99.99-pre-33 fixed exceptions in minecraft code + - v99.99-pre-32 fixed previous checkin + - v99.99-pre-31 added sources packaging + - v99.99-pre-30 add custom armor, for #13 + - v99.99-pre-29 first batch of documentation + minor reformatings + - v99.99-pre-28 Added explosion resistance hook. + - v99.99-pre-27 fixed addPixaxeBlockEffectiveAgainst + - v99.99-pre-26 Added the four new hooks from RedPower, and the TileEntity bugfix. + - v99.99-pre-25 added missing copyright header + - v99.99-pre-24 added missing file + - v99.99-pre-23 added mineable block configuration, for #6 + - v99.99-pre-22 added missing graphical features, added configuration management, for #5 + - v99.99-pre-21 improved previous patch, extracted internal class + - v99.99-pre-20 fixed compilation errors + - v99.99-pre-19 fixed setup file + - v99.99-pre-18 Removed MCForgeEffectRenderer, patched MC EffectRenderer + - v99.99-pre-17 removed OBE file + - v99.99-pre-16 fixed setup script for windows and patch + - v99.99-pre-15 fixed packaging script + - v99.99-pre-14 fixed patch script and added release scripts + - v99.99-pre-13 Added OnGameStart hook, added custom effect render to fulfill infinite sprite support. Render needs to be changed a little to cover items also, though. + - v99.99-pre-12 added headers + - v99.99-pre-11 added support for infinite sprites, for #4 + - v99.99-pre-10 implement infinite terrain sprites, for #3 + - v99.99-pre-9 fixed style, added biome population support, for #2 + - v99.99-pre-8 initial revision of the license + - v99.99-pre-7 fixed previous checkin + - v99.99-pre-6 added basic build script for windows + - v99.99-pre-5 added missing patch step + - v99.99-pre-4 made initial setup, implemented custom bucket, for #1 + - v99.99-pre-3 added main project directories + - v99.99-pre-2 added main source directory + - v99.99-pre-1 added base directories diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c023ec8b20f512888fe07c5bd3ff77bb8f..7454180f2ae8848c63b8b4dea2cb829da983f2fa 100644 GIT binary patch delta 18435 zcmY&<19zBR)MXm8v2EM7ZQHi-#I|kQZfv7Tn#Q)%81v4zX3d)U4d4 zYYc!v@NU%|U;_sM`2z(4BAilWijmR>4U^KdN)D8%@2KLcqkTDW%^3U(Wg>{qkAF z&RcYr;D1I5aD(N-PnqoEeBN~JyXiT(+@b`4Pv`;KmkBXYN48@0;iXuq6!ytn`vGp$ z6X4DQHMx^WlOek^b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per/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0c..c53aefaa 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java new file mode 100644 index 00000000..832194f7 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java @@ -0,0 +1,14 @@ +package com.amuzil.omegasource.skillapi.activators; + +import com.mojang.blaze3d.platform.InputConstants; + +import java.util.ArrayList; + +/** + * Essentially a wrapper class for a part of combination/sequential list of keys. + */ +public class KeyCombination { + + private ArrayList keys; + +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombo.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombo.java new file mode 100644 index 00000000..7365d881 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombo.java @@ -0,0 +1,7 @@ +package com.amuzil.omegasource.skillapi.activators; + +/** + * Wrapper class for the whole sequential list of keys. + */ +public class KeyCombo { +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/listeners/DynamicStateListener.java b/src/main/java/com/amuzil/omegasource/skillapi/listeners/DynamicStateListener.java index 0615301a..3b30584f 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/listeners/DynamicStateListener.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/listeners/DynamicStateListener.java @@ -1,4 +1,13 @@ package com.amuzil.omegasource.skillapi.listeners; +/** + * Listeners store activators. Activators have a list of pre-requisites/events. + * Listeners search for those events and trigger all activators as needed. + * 1 listener per activator. + * Activators can have hard-coded pre-requisites or loaded ones from json files. + * Upon 'skill mode' being activated (whether through a toggle key or something else), all + * skill listeners are loaded. Listeners that are always active are the toggle listeners/initialise + * listeners. + **/ public class DynamicStateListener { } From 68a208a58db6c98c9ca9c1b6add286392a8d2467 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Wed, 23 Mar 2022 16:22:47 +1100 Subject: [PATCH 003/469] still defining everything first --- .../skillapi/activators/Activator.java | 11 +++- .../skillapi/activators/KeyCombination.java | 6 ++- .../skillapi/activators/KeyCombo.java | 7 --- .../skillapi/activators/KeyInfo.java | 50 +++++++++++++++++++ .../skillapi/activators/KeyPermutation.java | 30 +++++++++++ 5 files changed, 94 insertions(+), 10 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombo.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/activators/KeyInfo.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/activators/KeyPermutation.java diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java index 6833abc2..74f83922 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java @@ -10,7 +10,7 @@ public class Activator { * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and * consolidate for good code practice later. */ - public enum ActivatorType { + public enum ActivationType { RADIAL, HOTKEY, MULTIKEY, @@ -44,4 +44,13 @@ public enum GestureType { SIMPLE, COMPLEX } + + /** + * Simple activators take direct events/information to pass to a listener (radial menu and such). + * Complex take other activators and simple events. + */ + public enum ActivatorType { + SIMPLE, + COMPLEX + } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java index 832194f7..0ae9f920 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java @@ -3,12 +3,14 @@ import com.mojang.blaze3d.platform.InputConstants; import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; /** - * Essentially a wrapper class for a part of combination/sequential list of keys. + * Stores all possible permutations. */ public class KeyCombination { - private ArrayList keys; + private LinkedList keys; } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombo.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombo.java deleted file mode 100644 index 7365d881..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombo.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.amuzil.omegasource.skillapi.activators; - -/** - * Wrapper class for the whole sequential list of keys. - */ -public class KeyCombo { -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyInfo.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyInfo.java new file mode 100644 index 00000000..d42f9ac9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyInfo.java @@ -0,0 +1,50 @@ +package com.amuzil.omegasource.skillapi.activators; + +import com.mojang.blaze3d.platform.InputConstants; + +//Takes a key, delay, and held length. +public class KeyInfo { + + private InputConstants.Key key; + //In ticks (20 ticks a second) + private int delay; + //Also in ticks. -1 to 1 all are effectively just pressed. Remember, this class doesn't check + //the logic, only provides the values for which to apply it with. + private int held; + + public KeyInfo() { + this.key = InputConstants.UNKNOWN; + this.delay = 0; + this.held = -1; + } + + public KeyInfo(InputConstants.Key key) { + this.key = key; + this.delay = 0; + this.held = - 1; + } + + public KeyInfo(InputConstants.Key key, int delay) { + this.key = key; + this.delay = delay; + this.held = -1; + } + + public KeyInfo(InputConstants.Key key, int delay, int held) { + this.key = key; + this.delay = delay; + this.held = -1; + } + + public InputConstants.Key getKey() { + return this.key; + } + + public int getDelay() { + return this.delay; + } + + public int getHeld() { + return this.held; + } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyPermutation.java new file mode 100644 index 00000000..5777a56a --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyPermutation.java @@ -0,0 +1,30 @@ +package com.amuzil.omegasource.skillapi.activators; + +import java.util.ArrayList; +import java.util.List; + +/** + * Essentially a wrapper class for a part of combination/sequential list of keys. + * This is meant to be a fragment of a whole key-combination, and it allows developers + * to break up the combination in a way that's readable + makes sense. + */ +public class KeyPermutation { + + //Key and delay. + private List keys; + + public KeyPermutation() { + this.keys = new ArrayList<>(); + } + + public KeyPermutation(List keys) { + this.keys = new ArrayList<>(); + this.keys.addAll(keys); + } + + public KeyPermutation(KeyInfo info) { + this.keys = new ArrayList<>(); + this.keys.add(info); + } + +} From fce1463ddb46cd51c2bda50fc046c4aa2612b1e1 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 23 Apr 2022 13:55:38 +1000 Subject: [PATCH 004/469] Adding the data structure for the radix tree --- .../Activator.java | 8 ++- .../skillapi/activateable/KeyCombination.java | 12 ++++ .../{activators => activateable}/KeyInfo.java | 20 +++--- .../KeyPermutation.java | 2 +- .../skillapi/activators/KeyCombination.java | 16 ----- .../omegasource/skillapi/data/Condition.java | 8 +++ .../omegasource/skillapi/data/RadixNode.java | 11 +++ .../omegasource/skillapi/data/RadixTree.java | 67 +++++++++++++++++++ .../omegasource/skillapi/data/RadixUtils.java | 4 ++ .../data/conditions/EventConditions.java | 23 +++++++ .../data/conditions/StateCondition.java | 17 +++++ 11 files changed, 161 insertions(+), 27 deletions(-) rename src/main/java/com/amuzil/omegasource/skillapi/{activators => activateable}/Activator.java (84%) create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java rename src/main/java/com/amuzil/omegasource/skillapi/{activators => activateable}/KeyInfo.java (67%) rename src/main/java/com/amuzil/omegasource/skillapi/{activators => activateable}/KeyPermutation.java (92%) delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixUtils.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventConditions.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java similarity index 84% rename from src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java rename to src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java index 74f83922..af740f0d 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activators/Activator.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java @@ -1,4 +1,7 @@ -package com.amuzil.omegasource.skillapi.activators; +package com.amuzil.omegasource.skillapi.activateable; + +import com.amuzil.omegasource.skillapi.data.Condition; +import com.amuzil.omegasource.skillapi.data.conditions.EventConditions; /** * Covers all the different ways to activate an ability. @@ -6,6 +9,9 @@ */ public class Activator { + //Will fix this later + public Activator() { + } /** * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and * consolidate for good code practice later. diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java new file mode 100644 index 00000000..fb4dd073 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java @@ -0,0 +1,12 @@ +package com.amuzil.omegasource.skillapi.activateable; + +import java.util.LinkedList; + +/** + * Stores all possible permutations. + */ +public class KeyCombination { + + private LinkedList keys; + +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyInfo.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java similarity index 67% rename from src/main/java/com/amuzil/omegasource/skillapi/activators/KeyInfo.java rename to src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java index d42f9ac9..361db073 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyInfo.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.skillapi.activators; +package com.amuzil.omegasource.skillapi.activateable; import com.mojang.blaze3d.platform.InputConstants; @@ -6,33 +6,35 @@ public class KeyInfo { private InputConstants.Key key; - //In ticks (20 ticks a second) - private int delay; + //In ticks (20 ticks a second). Can be used to make someone wait between key presses for something. + private int minDelay; + //Maximum delay before the listener should stop caring + private int maxDelay; //Also in ticks. -1 to 1 all are effectively just pressed. Remember, this class doesn't check //the logic, only provides the values for which to apply it with. private int held; public KeyInfo() { this.key = InputConstants.UNKNOWN; - this.delay = 0; + this.minDelay = 0; this.held = -1; } public KeyInfo(InputConstants.Key key) { this.key = key; - this.delay = 0; + this.minDelay = 0; this.held = - 1; } public KeyInfo(InputConstants.Key key, int delay) { this.key = key; - this.delay = delay; + this.minDelay = delay; this.held = -1; } public KeyInfo(InputConstants.Key key, int delay, int held) { this.key = key; - this.delay = delay; + this.minDelay = delay; this.held = -1; } @@ -40,8 +42,8 @@ public InputConstants.Key getKey() { return this.key; } - public int getDelay() { - return this.delay; + public int getMinDelay() { + return this.minDelay; } public int getHeld() { diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java similarity index 92% rename from src/main/java/com/amuzil/omegasource/skillapi/activators/KeyPermutation.java rename to src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java index 5777a56a..9df850ed 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.skillapi.activators; +package com.amuzil.omegasource.skillapi.activateable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java b/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java deleted file mode 100644 index 0ae9f920..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/activators/KeyCombination.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.amuzil.omegasource.skillapi.activators; - -import com.mojang.blaze3d.platform.InputConstants; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - -/** - * Stores all possible permutations. - */ -public class KeyCombination { - - private LinkedList keys; - -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java new file mode 100644 index 00000000..428fc42e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java @@ -0,0 +1,8 @@ +package com.amuzil.omegasource.skillapi.data; + +public interface Condition { + + void register(Runnable success, Runnable expire); + + void unregister(); +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java new file mode 100644 index 00000000..4a13b8ec --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java @@ -0,0 +1,11 @@ +package com.amuzil.omegasource.skillapi.data; + +import java.util.Map; + +public class RadixNode { + RadixNode parent; + + Map children; + Runnable fallback; + Condition fallbackCondition; +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java new file mode 100644 index 00000000..47b82b6a --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java @@ -0,0 +1,67 @@ +package com.amuzil.omegasource.skillapi.data; + +import java.util.Iterator; +import java.util.List; + +public class RadixTree { + RadixNode root; + + RadixNode active; + List activeConditions; + + void register() { + registerNode(root); + } + + void registerNode(RadixNode node) { + active = node; + + if (node.fallbackCondition != null) { + activeConditions.add(node.fallbackCondition); + node.fallbackCondition.register(() -> terminate(node), () -> terminate(node.parent)); + } + + node.children.forEach((condition, child) -> { + activeConditions.add(condition); + condition.register(() -> moveDown(child), () -> expire(condition)); + }); + } + + void moveDown(RadixNode child) { + Iterator iterator = activeConditions.iterator(); + while (iterator.hasNext()) { + Condition condition = iterator.next(); + condition.unregister(); + iterator.remove(); + } + + registerNode(child); + } + + void expire(Condition condition) { + condition.unregister(); + activeConditions.remove(condition); + if (activeConditions.isEmpty()) { + terminate(active); + } + } + + void terminate(RadixNode node) { + Iterator iterator = activeConditions.iterator(); + while (iterator.hasNext()) { + Condition condition = iterator.next(); + condition.unregister(); + iterator.remove(); + } + + Runnable action = node.fallback; + while (action == null && node.parent != null) { + node = node.parent; + action = node.fallback; + } + + if (action != null) { + action.run(); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixUtils.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixUtils.java new file mode 100644 index 00000000..620a969e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixUtils.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.skillapi.data; + +public class RadixUtils { +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventConditions.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventConditions.java new file mode 100644 index 00000000..87671eb3 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventConditions.java @@ -0,0 +1,23 @@ +package com.amuzil.omegasource.skillapi.data.conditions; + +import com.amuzil.omegasource.skillapi.data.Condition; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.Event; + +public class EventConditions { + + public abstract class EventCondition implements Condition { + Runnable success; + Runnable expire; + + abstract void listen(E event); + } + + public abstract class ForgeEventCondition extends EventCondition { + + @Override + public void register(Runnable success, Runnable expire) { + MinecraftForge.EVENT_BUS.register(this); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java new file mode 100644 index 00000000..61ce06a3 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java @@ -0,0 +1,17 @@ +package com.amuzil.omegasource.skillapi.data.conditions; + +import com.amuzil.omegasource.skillapi.data.Condition; + +public interface StateCondition extends Condition { + + boolean isSatisfied(); + + default void register(Runnable success, Runnable expire) { + if (isSatisfied()) { + success.run(); + } else { + expire.run(); + } + } + +} From e3cad7b1c56bb570c311fc253d9f9ef12d393dd0 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Tue, 26 Apr 2022 01:04:22 +1000 Subject: [PATCH 005/469] Adding more listener interfaces Specifically event conditions (forge and timed) --- .../amuzil/omegasource/skillapi/SkillAPI.java | 22 ++++++---------- .../skillapi/activateable/Activator.java | 3 --- ...entConditions.java => EventCondition.java} | 11 +++----- .../data/conditions/ForgeEventCondition.java | 13 ++++++++++ .../data/conditions/TimedEventCondition.java | 25 +++++++++++++++++++ 5 files changed, 48 insertions(+), 26 deletions(-) rename src/main/java/com/amuzil/omegasource/skillapi/data/conditions/{EventConditions.java => EventCondition.java} (60%) create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java diff --git a/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java b/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java index 5723dd9f..1f674bef 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java @@ -1,17 +1,13 @@ package com.amuzil.omegasource.skillapi; -import net.minecraft.block.Block; -import net.minecraft.block.Blocks; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; -import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; -import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; -import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent; -import net.minecraftforge.fml.event.server.FMLServerStartingEvent; +import net.minecraftforge.fml.event.lifecycle.*; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -28,11 +24,10 @@ @Mod(SkillAPI.MODID) public class SkillAPI { - // Directly reference a log4j logger. - private static final Logger LOGGER = LogManager.getLogger(); - //MODID reference public static final String MODID = "skill_api"; + // Directly reference a log4j logger. + private static final Logger LOGGER = LogManager.getLogger(); public SkillAPI() { // Register the setup method for modloading @@ -56,7 +51,6 @@ private void setup(final FMLCommonSetupEvent event) { private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client - LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().options); } private void enqueueIMC(final InterModEnqueueEvent event) { @@ -69,14 +63,12 @@ private void enqueueIMC(final InterModEnqueueEvent event) { private void processIMC(final InterModProcessEvent event) { // some example code to receive and process InterModComms from other mods - LOGGER.info("Got IMC {}", event.getIMCStream(). - map(m -> m.getMessageSupplier().get()). - collect(Collectors.toList())); + LOGGER.info("Got IMC {}", event.getIMCStream().map(m -> m.getMessageSupplier().get()).collect(Collectors.toList())); } // You can use SubscribeEvent and let the Event Bus discover methods to call @SubscribeEvent - public void onServerStarting(FMLServerStartingEvent event) { + public void onServerStarting(FMLDedicatedServerSetupEvent event) { // do something when the server starts LOGGER.info("HELLO from server starting"); } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java index af740f0d..aa19261c 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java @@ -1,8 +1,5 @@ package com.amuzil.omegasource.skillapi.activateable; -import com.amuzil.omegasource.skillapi.data.Condition; -import com.amuzil.omegasource.skillapi.data.conditions.EventConditions; - /** * Covers all the different ways to activate an ability. * Gonna use an enum to describe for now. Will update that later; think of it as a placeholder. diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventConditions.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java similarity index 60% rename from src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventConditions.java rename to src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java index 87671eb3..55c28906 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventConditions.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java @@ -4,20 +4,15 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; -public class EventConditions { - - public abstract class EventCondition implements Condition { +public abstract class EventCondition implements Condition { Runnable success; Runnable expire; abstract void listen(E event); - } - - public abstract class ForgeEventCondition extends EventCondition { @Override public void register(Runnable success, Runnable expire) { - MinecraftForge.EVENT_BUS.register(this); + this.success = success; + this.expire = expire; } } -} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java new file mode 100644 index 00000000..1c0ea156 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java @@ -0,0 +1,13 @@ +package com.amuzil.omegasource.skillapi.data.conditions; + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.Event; + +public abstract class ForgeEventCondition extends EventCondition { + + @Override + public void register(Runnable success, Runnable expire) { + super.register(success, expire); + MinecraftForge.EVENT_BUS.register(this); + } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java new file mode 100644 index 00000000..3031da17 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java @@ -0,0 +1,25 @@ +package com.amuzil.omegasource.skillapi.data.conditions; + +import net.minecraft.client.Minecraft; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.Event; + +public abstract class TimedEventCondition extends EventCondition { + + int duration; + + @Override + public void register(Runnable success, Runnable expire) { + super.register(success, expire); + //Need to replace with mc server world + //Schedule.schedule(duration, () -> expire.run()); + //TODO: Figure out how to incorporate success and expire into mc's runnable system + Minecraft.getInstance().executeIfPossible(() -> { + //Somehow check for time: + if (duration < 1) + success.run(); + else + expire.run(); + }); + } +} From 1b7d963047d512c4a4a8398eaa1b2699e3180516 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Tue, 31 May 2022 15:25:54 +1000 Subject: [PATCH 006/469] working on conditions and triggers before the tree structure gets implemented --- .../skillapi/activateable/KeyCombination.java | 16 +++++++++- .../skillapi/activateable/KeyInfo.java | 8 ++++- .../skillapi/activateable/KeyPermutation.java | 10 ++++-- .../data/conditions/EventCondition.java | 21 +++++++------ .../data/conditions/TimedEventCondition.java | 19 ++++++------ .../skillapi/data/conditions/VRCondition.java | 4 +++ .../data/conditions/VRGestureCondition.java | 4 +++ .../data/conditions/VRMotionCondition.java | 4 +++ .../data/conditions/key/KeyCondition.java | 9 ++++++ .../conditions/key/KeyEventCondition.java | 20 ++++++++++++ .../data/conditions/key/KeyHoldCondition.java | 31 +++++++++++++++++++ .../conditions/key/KeyPressCondition.java | 19 ++++++++++++ .../conditions/key/KeyReleaseCondition.java | 19 ++++++++++++ .../skillapi/util/KeyboardData.java | 8 +++++ 14 files changed, 169 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRGestureCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRMotionCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyEventCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/util/KeyboardData.java diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java index fb4dd073..c965928a 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.skillapi.activateable; +import java.util.ArrayList; import java.util.LinkedList; /** @@ -7,6 +8,19 @@ */ public class KeyCombination { - private LinkedList keys; + private LinkedList keys; + + public KeyCombination() { + this.keys = new LinkedList<>(); + } + + public KeyCombination(KeyPermutation keyP) { + this.keys = new LinkedList<>(); + this.keys.add(keyP); + } + + public KeyCombination (LinkedList keys) { + this.keys = keys; + } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java index 361db073..7c0dea90 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java @@ -1,6 +1,11 @@ package com.amuzil.omegasource.skillapi.activateable; import com.mojang.blaze3d.platform.InputConstants; +import com.sun.jna.platform.KeyboardUtils; +import net.minecraft.client.KeyboardHandler; +import net.minecraft.client.player.KeyboardInput; + +import java.awt.event.KeyEvent; //Takes a key, delay, and held length. public class KeyInfo { @@ -14,6 +19,7 @@ public class KeyInfo { //the logic, only provides the values for which to apply it with. private int held; + public KeyInfo() { this.key = InputConstants.UNKNOWN; this.minDelay = 0; @@ -35,7 +41,7 @@ public KeyInfo(InputConstants.Key key, int delay) { public KeyInfo(InputConstants.Key key, int delay, int held) { this.key = key; this.minDelay = delay; - this.held = -1; + this.held = held; } public InputConstants.Key getKey() { diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java index 9df850ed..a50dae10 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java @@ -2,11 +2,14 @@ import java.util.ArrayList; import java.util.List; +import java.util.Set; /** * Essentially a wrapper class for a part of combination/sequential list of keys. * This is meant to be a fragment of a whole key-combination, and it allows developers * to break up the combination in a way that's readable + makes sense. + * ONLY SUPPORTS MULTIPLE KEYS AT ONCE. DELAY IS USELESS HERE. If multiple keys are passed with *different* delay, + * the key with the most delay will be read. */ public class KeyPermutation { @@ -18,8 +21,7 @@ public KeyPermutation() { } public KeyPermutation(List keys) { - this.keys = new ArrayList<>(); - this.keys.addAll(keys); + this.keys = keys; } public KeyPermutation(KeyInfo info) { @@ -27,4 +29,8 @@ public KeyPermutation(KeyInfo info) { this.keys.add(info); } + public List getKeys() { + return this.keys; + } + } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java index 55c28906..167eea13 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java @@ -1,18 +1,21 @@ package com.amuzil.omegasource.skillapi.data.conditions; import com.amuzil.omegasource.skillapi.data.Condition; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; public abstract class EventCondition implements Condition { - Runnable success; - Runnable expire; - abstract void listen(E event); + //These are only public for package organisation. DO NOT TOUCH OUTSIDE YOUR CONDITIONS. + //Success moves to the next node down in the tree. + public Runnable success; + //Expires the tree, making the listener disregard further nodes and reset back to the top. + public Runnable expire; - @Override - public void register(Runnable success, Runnable expire) { - this.success = success; - this.expire = expire; - } + public abstract void listen(E event); + + @Override + public void register(Runnable success, Runnable expire) { + this.success = success; + this.expire = expire; } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java index 3031da17..4cbf800b 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java @@ -7,19 +7,18 @@ public abstract class TimedEventCondition extends EventCondition { int duration; + int maxDuration; @Override public void register(Runnable success, Runnable expire) { super.register(success, expire); - //Need to replace with mc server world - //Schedule.schedule(duration, () -> expire.run()); - //TODO: Figure out how to incorporate success and expire into mc's runnable system - Minecraft.getInstance().executeIfPossible(() -> { - //Somehow check for time: - if (duration < 1) - success.run(); - else - expire.run(); - }); + } + + @Override + public void listen(E event) { + duration++; + if (duration >= maxDuration) + success.run(); + else expire.run(); } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRCondition.java new file mode 100644 index 00000000..4dd63b8d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRCondition.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.skillapi.data.conditions; + +public abstract class VRCondition { +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRGestureCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRGestureCondition.java new file mode 100644 index 00000000..4d28b4c9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRGestureCondition.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.skillapi.data.conditions; + +public abstract class VRGestureCondition { +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRMotionCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRMotionCondition.java new file mode 100644 index 00000000..1c606aac --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRMotionCondition.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.skillapi.data.conditions; + +public abstract class VRMotionCondition { +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyCondition.java new file mode 100644 index 00000000..fa27ed2e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyCondition.java @@ -0,0 +1,9 @@ +package com.amuzil.omegasource.skillapi.data.conditions.key; + +import com.amuzil.omegasource.skillapi.activateable.KeyInfo; +import com.amuzil.omegasource.skillapi.data.conditions.StateCondition; + +public interface KeyCondition extends StateCondition { + + KeyInfo getKeyInfo(); +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyEventCondition.java new file mode 100644 index 00000000..62c6fd8f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyEventCondition.java @@ -0,0 +1,20 @@ +package com.amuzil.omegasource.skillapi.data.conditions.key; + +import com.amuzil.omegasource.skillapi.activateable.KeyInfo; +import com.amuzil.omegasource.skillapi.data.conditions.EventCondition; +import net.minecraftforge.client.event.InputEvent; + +public abstract class KeyEventCondition extends EventCondition implements KeyCondition { + + private KeyInfo key; + + public KeyEventCondition(KeyInfo key) { + this.key = key; + } + + @Override + public KeyInfo getKeyInfo() { + return key; + } + +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java new file mode 100644 index 00000000..64f9603e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java @@ -0,0 +1,31 @@ +package com.amuzil.omegasource.skillapi.data.conditions.key; + +import com.amuzil.omegasource.skillapi.activateable.KeyInfo; +import com.amuzil.omegasource.skillapi.data.conditions.TimedEventCondition; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.Minecraft; +import net.minecraftforge.client.event.InputEvent; +import org.lwjgl.glfw.GLFW; + +public abstract class KeyHoldCondition extends TimedEventCondition implements KeyCondition { + int duration; + private KeyInfo key; + + public KeyHoldCondition(KeyInfo key) { + this.key = key; + } + + @Override + public void listen(InputEvent.KeyInputEvent event) { + if (event.getAction() == GLFW.GLFW_PRESS && event.getKey() == getKeyInfo().getKey().getValue()) { + //We don't actually want success to run here, we want it to run if this condition is satisfied + //and the key has been held for a certain amount of time + success.run(); + } + } + + @Override + public KeyInfo getKeyInfo() { + return key; + } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java new file mode 100644 index 00000000..e12422b0 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java @@ -0,0 +1,19 @@ +package com.amuzil.omegasource.skillapi.data.conditions.key; + +import com.amuzil.omegasource.skillapi.activateable.KeyInfo; +import net.minecraftforge.client.event.InputEvent; +import org.lwjgl.glfw.GLFW; + +public abstract class KeyPressCondition extends KeyEventCondition { + + public KeyPressCondition(KeyInfo key) { + super(key); + } + + @Override + public void listen(InputEvent.KeyInputEvent event) { + if (event.getAction() == GLFW.GLFW_PRESS && event.getKey() == getKeyInfo().getKey().getValue()) { + success.run(); + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java new file mode 100644 index 00000000..4c8d40d6 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java @@ -0,0 +1,19 @@ +package com.amuzil.omegasource.skillapi.data.conditions.key; + +import com.amuzil.omegasource.skillapi.activateable.KeyInfo; +import net.minecraftforge.client.event.InputEvent; +import org.lwjgl.glfw.GLFW; + +public abstract class KeyReleaseCondition extends KeyEventCondition { + + public KeyReleaseCondition(KeyInfo key) { + super(key); + } + + @Override + public void listen(InputEvent.KeyInputEvent event) { + if (event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == getKeyInfo().getKey().getValue()) { + success.run(); + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/util/KeyboardData.java b/src/main/java/com/amuzil/omegasource/skillapi/util/KeyboardData.java new file mode 100644 index 00000000..33e38014 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/util/KeyboardData.java @@ -0,0 +1,8 @@ +package com.amuzil.omegasource.skillapi.util; + +import java.awt.event.KeyEvent; + +public class KeyboardData { + //Converts InputConstants key data into GLFW + +} From e5b1918565eb0de5fa2ca0d27d1647e586e3ad91 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Tue, 9 Aug 2022 17:34:49 +1000 Subject: [PATCH 007/469] working on radixtree --- .../skillapi/data/RadixBranch.java | 61 ++++++++++++ .../omegasource/skillapi/data/RadixLeaf.java | 11 +++ .../omegasource/skillapi/data/RadixNode.java | 45 ++++++++- .../omegasource/skillapi/data/RadixTree.java | 99 +++++++++++++------ .../data/leaves/MouseMovementLeaf.java | 43 ++++++++ 5 files changed, 225 insertions(+), 34 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixLeaf.java create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java new file mode 100644 index 00000000..6dc7ca3c --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java @@ -0,0 +1,61 @@ +package com.amuzil.omegasource.skillapi.data; + +import java.util.HashMap; +import java.util.LinkedList; + +public class RadixBranch { + LinkedList path; + + HashMap>, RadixLeaf> leaves; + + void init() { + path = new LinkedList<>(); + leaves = new HashMap<>(); + } + + void burn() { + path.clear(); + leaves.values().forEach(RadixLeaf::burn); + leaves.clear(); + } + + void reset(RadixNode root) { + path.clear(); + addStep(null, root); + leaves.values().forEach(RadixLeaf::reset); + } + + void addStep(Condition activator, RadixNode node) { + path.add(new Step(activator, node)); + } + + boolean registerLeaf(Class> type, RadixLeaf leaf) { + if (leaves.containsKey(type)) { + return false; + } else { + leaves.put(type, leaf); + return true; + } + } + + void resetLeaf(Class> type) { + leaves.get(type).reset(); + } + + T measureLeaf(Class> type) { + return (T) leaves.get(type).measure(); + } + + static class Step { + Condition activator; + RadixNode node; + + //TODO: Constructor + void init() { + activator = null; + //Nonull + node = null; + } + } +} + diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixLeaf.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixLeaf.java new file mode 100644 index 00000000..430d7d6b --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixLeaf.java @@ -0,0 +1,11 @@ +package com.amuzil.omegasource.skillapi.data; + +public interface RadixLeaf { + + void burn(); + + void reset(); + + T measure(); + +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java index 4a13b8ec..ad643bfb 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java @@ -1,11 +1,48 @@ package com.amuzil.omegasource.skillapi.data; +import javax.annotation.Nonnull; import java.util.Map; +import java.util.function.Consumer; public class RadixNode { - RadixNode parent; - + // If a condition is fulfilled, the active node moves down to the mapped child node Map children; - Runnable fallback; - Condition fallbackCondition; + + // Called when the active node is moved down from the parent node to this node + Consumer onEnter; + // Called when the active node is moved down from this node to a child node + Consumer onLeave; + // Called when the active node is moved up to the root node because either all children's conditions have expired or the terminate condition has been fulfilled + Consumer onTerminate; + // If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate + Condition terminateCondition; + + void init() { + //All can be anything + children = null; + onEnter = null; + onLeave = null; + onTerminate = null; + terminateCondition = null; + } +} + +class RootNode extends RadixNode { + // This is the only node where onEnter is called not when this node is moved down to, but rather when a (sub)child node terminates + + void init() { + onTerminate = null; + terminateCondition = null; + } +} + +class EndNode extends RadixNode { + void init() { + children = null; + //@Nonnull + onEnter = null; + onLeave = null; + onTerminate = null; + terminateCondition = null; + } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java index 47b82b6a..b11afe31 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java @@ -1,52 +1,91 @@ package com.amuzil.omegasource.skillapi.data; +import java.util.HashMap; import java.util.Iterator; import java.util.List; public class RadixTree { - RadixNode root; + final RadixNode root; + RadixBranch branch; RadixNode active; List activeConditions; - void register() { - registerNode(root); + void init() { + root = nonnull; + branch = new RadixBranch(); + active = null; + activeConditions = new HashMap<>(); } - void registerNode(RadixNode node) { + boolean registerLeaf(Class> type, RadixLeaf leaf) { + return branch.registerLeaf(type, leaf); + } + + void burn() { + activeConditions.forEach(Condition::unregister); + activeConditions.clear(); + + if (active.terminateCondition != null) { + active.terminateCondition.unregister(); + } + + active = null; + + branch.burn(); + } + + void start() { + branch.reset(root); + setActive(root); + } + + void setActive(Node node) { active = node; - if (node.fallbackCondition != null) { - activeConditions.add(node.fallbackCondition); - node.fallbackCondition.register(() -> terminate(node), () -> terminate(node.parent)); + if (active.onEnter != null) { + active.onEnter.accept(branch); + } + + if (active.terminateCondition != null) { + active.terminateCondition.register(() -> terminate(node), () -> {}); } - node.children.forEach((condition, child) -> { + active.children.forEach((condition, child) -> { activeConditions.add(condition); - condition.register(() -> moveDown(child), () -> expire(condition)); + condition.register(() -> { + branch.addStep(condition, child) + moveDown(child); + }, () -> expire(condition)); }); } - void moveDown(RadixNode child) { - Iterator iterator = activeConditions.iterator(); - while (iterator.hasNext()) { - Condition condition = iterator.next(); - condition.unregister(); - iterator.remove(); + // Called when either the node's terminate condition is fulfilled or all active child conditions have expired + void terminate(Node node) { + activeConditions.forEach(Condition::unregister); + + if (active.onTerminate != null) { + active.onTerminate.accept(branch); + } + + if (active.terminateCondition != null) { + active.terminateCondition.unregister(); } - registerNode(child); + activeConditions.clear(); + + start(); } - void expire(Condition condition) { - condition.unregister(); - activeConditions.remove(condition); - if (activeConditions.isEmpty()) { - terminate(active); + void moveDown(Node child) { + if (active.onLeave != null) { + active.onLeave.accept(branch); + } + + if (active.terminateCondition != null) { + active.terminateCondition.unregister(); } - } - void terminate(RadixNode node) { Iterator iterator = activeConditions.iterator(); while (iterator.hasNext()) { Condition condition = iterator.next(); @@ -54,14 +93,14 @@ void terminate(RadixNode node) { iterator.remove(); } - Runnable action = node.fallback; - while (action == null && node.parent != null) { - node = node.parent; - action = node.fallback; - } + setActive(child); + } - if (action != null) { - action.run(); + void expire(Condition condition) { + condition.unregister(); + activeConditions.remove(condition); + if (activeConditions.empty()) { + terminate(active); } } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java b/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java new file mode 100644 index 00000000..63a31c53 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java @@ -0,0 +1,43 @@ +package com.amuzil.omegasource.skillapi.data.leaves; + +import com.amuzil.omegasource.skillapi.data.RadixLeaf; +import javafx.scene.input.MouseEvent; +import net.minecraftforge.common.MinecraftForge; + +import java.awt.*; +import java.awt.geom.Point2D; +import java.util.LinkedList; +import java.util.List; + +public class MouseMovementLeaf implements RadixLeaf> { + java.util.List path; + + + public void init() { + path = new LinkedList(); + MinecraftForge.EVENT_BUS.addListener(this::listener); + } + + @Override + public void burn() { + path.clear(); + MinecraftForge.EVENT_BUS.removeListener(this::listener); + } + + @Override + public void reset() { + path.clear(); + } + + @Override + public List measure() { + return path; + } + + //TODO: Find the right event + //Dunno if this is the right event + void listener(MouseEvent event) { + path.add(new Point2D.Double(event.getX(), event.getY())); + } + +} From 8729f6595c9e91d1c5025685dfbf0d275e8f17d1 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Tue, 9 Aug 2022 17:46:32 +1000 Subject: [PATCH 008/469] working towards it --- .../skillapi/data/RadixBranch.java | 2 +- .../omegasource/skillapi/data/RadixTree.java | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java index 6dc7ca3c..b6b5629e 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java @@ -53,7 +53,7 @@ static class Step { //TODO: Constructor void init() { activator = null; - //Nonull + //Nonnull node = null; } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java index b11afe31..4801e878 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java @@ -1,21 +1,24 @@ package com.amuzil.omegasource.skillapi.data; -import java.util.HashMap; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class RadixTree { - final RadixNode root; + RadixNode root; RadixBranch branch; RadixNode active; List activeConditions; void init() { - root = nonnull; + //Nonnull + root = null; branch = new RadixBranch(); active = null; - activeConditions = new HashMap<>(); + //TODO: Make a map, should be a map not a list. Conditions should map to their respective nodes. + //e.g. HashMap + activeConditions = new ArrayList<>();//HashMap(); } boolean registerLeaf(Class> type, RadixLeaf leaf) { @@ -40,7 +43,7 @@ void start() { setActive(root); } - void setActive(Node node) { + void setActive(RadixNode node) { active = node; if (active.onEnter != null) { @@ -54,14 +57,14 @@ void setActive(Node node) { active.children.forEach((condition, child) -> { activeConditions.add(condition); condition.register(() -> { - branch.addStep(condition, child) + branch.addStep(condition, child); moveDown(child); }, () -> expire(condition)); }); } // Called when either the node's terminate condition is fulfilled or all active child conditions have expired - void terminate(Node node) { + void terminate(RadixNode node) { activeConditions.forEach(Condition::unregister); if (active.onTerminate != null) { @@ -77,7 +80,7 @@ void terminate(Node node) { start(); } - void moveDown(Node child) { + void moveDown(RadixNode child) { if (active.onLeave != null) { active.onLeave.accept(branch); } @@ -99,7 +102,7 @@ void moveDown(Node child) { void expire(Condition condition) { condition.unregister(); activeConditions.remove(condition); - if (activeConditions.empty()) { + if (activeConditions.isEmpty()) { terminate(active); } } From 6dd452952107d7fde01826f22aef2bbfd0fc2da9 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Wed, 10 Aug 2022 17:54:45 +1000 Subject: [PATCH 009/469] slowly getting there; revamped MouseMovement to use vec3ds --- .../skillapi/data/RadixBranch.java | 22 +++++++++++++-- .../omegasource/skillapi/data/RadixNode.java | 10 +++++-- .../data/leaves/MouseMovementLeaf.java | 27 ++++++++++++------- 3 files changed, 45 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java index b6b5629e..54f114c0 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java @@ -6,6 +6,7 @@ public class RadixBranch { LinkedList path; + //TODO: Fix this HashMap>, RadixLeaf> leaves; void init() { @@ -50,11 +51,28 @@ static class Step { Condition activator; RadixNode node; - //TODO: Constructor + + public Step(Condition activator, RadixNode node) { + this.activator = activator; + this.node = node; + } + + public Step() { + this.init(); + } + void init() { activator = null; //Nonnull - node = null; + node = new RadixNode(); + } + + public Condition getActivator() { + return activator; + } + + public RadixNode getNode() { + return node; } } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java index ad643bfb..5df35464 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.skillapi.data; -import javax.annotation.Nonnull; import java.util.Map; import java.util.function.Consumer; @@ -17,8 +16,12 @@ public class RadixNode { // If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate Condition terminateCondition; + public RadixNode () { + this.init(); + } + void init() { - //All can be anything + //All can be anything. TODO: Fix. children = null; onEnter = null; onLeave = null; @@ -30,6 +33,7 @@ void init() { class RootNode extends RadixNode { // This is the only node where onEnter is called not when this node is moved down to, but rather when a (sub)child node terminates + @Override void init() { onTerminate = null; terminateCondition = null; @@ -37,6 +41,8 @@ void init() { } class EndNode extends RadixNode { + + @Override void init() { children = null; //@Nonnull diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java b/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java index 63a31c53..3a49c04b 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java @@ -1,27 +1,28 @@ package com.amuzil.omegasource.skillapi.data.leaves; import com.amuzil.omegasource.skillapi.data.RadixLeaf; -import javafx.scene.input.MouseEvent; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.client.event.ScreenEvent; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.LivingEvent; -import java.awt.*; -import java.awt.geom.Point2D; import java.util.LinkedList; import java.util.List; -public class MouseMovementLeaf implements RadixLeaf> { - java.util.List path; +public class MouseMovementLeaf implements RadixLeaf> { + java.util.List path; public void init() { - path = new LinkedList(); + path = new LinkedList<>(); MinecraftForge.EVENT_BUS.addListener(this::listener); } @Override public void burn() { path.clear(); - MinecraftForge.EVENT_BUS.removeListener(this::listener); + //MinecraftForge.EVENT_BUS.removeListener(); } @Override @@ -30,14 +31,20 @@ public void reset() { } @Override - public List measure() { + public List measure() { return path; } //TODO: Find the right event //Dunno if this is the right event - void listener(MouseEvent event) { - path.add(new Point2D.Double(event.getX(), event.getY())); + void listener(LivingEvent.LivingUpdateEvent event) { + Vec3 look = event.getEntityLiving().getLookAngle(); + //int x = InputConstants. + path.add(look); + } + + void listen(ScreenEvent.KeyboardCharTypedEvent event) { + } } From 11b875297bb6abd13c7e7344a8b612e3e5782a6c Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Wed, 10 Aug 2022 22:25:40 +1000 Subject: [PATCH 010/469] it compiles now??? --- .../skillapi/data/RadixBranch.java | 5 +++- .../skillapi/util/ClassToLeafMap.java | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/util/ClassToLeafMap.java diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java index 54f114c0..4fc60d12 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.skillapi.data; +import com.amuzil.omegasource.skillapi.util.ClassToLeafMap; + import java.util.HashMap; import java.util.LinkedList; @@ -7,7 +9,8 @@ public class RadixBranch { LinkedList path; //TODO: Fix this - HashMap>, RadixLeaf> leaves; + //Class and Consumer + HashMap, RadixLeaf> leaves; void init() { path = new LinkedList<>(); diff --git a/src/main/java/com/amuzil/omegasource/skillapi/util/ClassToLeafMap.java b/src/main/java/com/amuzil/omegasource/skillapi/util/ClassToLeafMap.java new file mode 100644 index 00000000..59e645ca --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/util/ClassToLeafMap.java @@ -0,0 +1,23 @@ +package com.amuzil.omegasource.skillapi.util; + +import com.amuzil.omegasource.skillapi.data.RadixLeaf; + +import java.util.HashMap; +import java.util.Map; + +public class ClassToLeafMap { + + //Can be copied for consumers too + private final HashMap, RadixLeaf> map = + new HashMap<>(); + + @SuppressWarnings("unchecked") + public static RadixLeaf put(Map, RadixLeaf> map, Class key, RadixLeaf c) { + return (RadixLeaf) map.put(key, c); + } + + @SuppressWarnings("unchecked") + public static RadixLeaf get(Map, RadixLeaf> map, Class key) { + return (RadixLeaf) map.get(key); + } +} From eb1f08ca3e9618d878c3c7764723634390a8264b Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 11 Aug 2022 02:21:58 +1000 Subject: [PATCH 011/469] basic conditions done, compiler errors removed --- .../skillapi/activateable/KeyCombination.java | 1 - .../skillapi/activateable/KeyInfo.java | 5 -- .../skillapi/activateable/KeyPermutation.java | 1 - .../omegasource/skillapi/data/Condition.java | 13 ++++-- .../skillapi/data/RadixBranch.java | 3 +- .../omegasource/skillapi/data/RadixNode.java | 9 ++++ .../data/conditions/EventCondition.java | 21 ++++----- .../data/conditions/ForgeEventCondition.java | 19 +++++++- .../data/conditions/SimpleCondition.java | 35 ++++++++++++++ .../data/conditions/TimedEventCondition.java | 46 +++++++++++++++---- 10 files changed, 118 insertions(+), 35 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java index c965928a..88608427 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.skillapi.activateable; -import java.util.ArrayList; import java.util.LinkedList; /** diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java index 7c0dea90..d265bb28 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java @@ -1,11 +1,6 @@ package com.amuzil.omegasource.skillapi.activateable; import com.mojang.blaze3d.platform.InputConstants; -import com.sun.jna.platform.KeyboardUtils; -import net.minecraft.client.KeyboardHandler; -import net.minecraft.client.player.KeyboardInput; - -import java.awt.event.KeyEvent; //Takes a key, delay, and held length. public class KeyInfo { diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java index a50dae10..f9e07396 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java @@ -2,7 +2,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.Set; /** * Essentially a wrapper class for a part of combination/sequential list of keys. diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java index 428fc42e..95a4a590 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java @@ -1,8 +1,15 @@ package com.amuzil.omegasource.skillapi.data; -public interface Condition { +public abstract class Condition { - void register(Runnable success, Runnable expire); + protected Runnable onSuccess; + protected Runnable onExpire; - void unregister(); + public void register(Runnable onSuccess, Runnable onExpire) { + this.onSuccess = onSuccess; + this.onExpire = onExpire; + } + + // This should not cause any errors when called if the condition is already unregistered or was never registered in the first place + public abstract void unregister(); } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java index 4fc60d12..9fb77258 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java @@ -8,11 +8,10 @@ public class RadixBranch { LinkedList path; - //TODO: Fix this //Class and Consumer HashMap, RadixLeaf> leaves; - void init() { + public RadixBranch() { path = new LinkedList<>(); leaves = new HashMap<>(); } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java index 5df35464..d8313ff7 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java @@ -42,6 +42,15 @@ void init() { class EndNode extends RadixNode { + public EndNode() { + super(); + } + + public EndNode(Consumer onEnter) { + this.init(); + this.onEnter = onEnter; + } + @Override void init() { children = null; diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java index 167eea13..f05ebd75 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java @@ -3,19 +3,18 @@ import com.amuzil.omegasource.skillapi.data.Condition; import net.minecraftforge.eventbus.api.Event; -public abstract class EventCondition implements Condition { +import java.util.function.Function; - //These are only public for package organisation. DO NOT TOUCH OUTSIDE YOUR CONDITIONS. - //Success moves to the next node down in the tree. - public Runnable success; - //Expires the tree, making the listener disregard further nodes and reset back to the top. - public Runnable expire; +public abstract class EventCondition extends Condition { - public abstract void listen(E event); + //Make sure to instantiate this to something in inherited classes. + public Function condition = null; - @Override - public void register(Runnable success, Runnable expire) { - this.success = success; - this.expire = expire; + public void listen(E event) { + if (condition.apply(event)) { + onSuccess.run(); + } else { + onExpire.run(); + } } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java index 1c0ea156..1cdf543a 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java @@ -3,11 +3,26 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; -public abstract class ForgeEventCondition extends EventCondition { +import java.util.function.Function; + +public class ForgeEventCondition extends EventCondition { + + public ForgeEventCondition() { + this.condition = null; + } + + public ForgeEventCondition(Function condition) { + this.condition = condition; + } @Override public void register(Runnable success, Runnable expire) { super.register(success, expire); - MinecraftForge.EVENT_BUS.register(this); + MinecraftForge.EVENT_BUS.addListener(this::listen); + } + + @Override + public void unregister() { + //MinecraftForge.EVENT_BUS.removeListener(this::listen); } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java new file mode 100644 index 00000000..9405f2fe --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java @@ -0,0 +1,35 @@ +package com.amuzil.omegasource.skillapi.data.conditions; + +import com.amuzil.omegasource.skillapi.data.Condition; +import net.minecraft.world.entity.ai.Brain; + +import javax.xml.ws.Provider; + +public class SimpleCondition extends Condition { + + Provider condition; + + public SimpleCondition(Provider condition) { + this.condition = condition; + } + + public SimpleCondition() { + this.condition = null; + } + + @Override + //TODO: Fix this/check if using the right provider + public void register(Runnable onSuccess, Runnable onExpire) { + if (condition.invoke(true)) { + onSuccess.run(); + } else { + onExpire.run(); + } + } + + @Override + public void unregister() { + //Expires anyway if the boolean condition is failed, but... + this.onExpire.run(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java index 4cbf800b..9425ebd4 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java @@ -1,24 +1,50 @@ package com.amuzil.omegasource.skillapi.data.conditions; -import net.minecraft.client.Minecraft; +import com.amuzil.omegasource.skillapi.data.Condition; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; -public abstract class TimedEventCondition extends EventCondition { +public class TimedEventCondition extends EventCondition { - int duration; - int maxDuration; + Condition subCondition; + int timeout; + int current; + + public TimedEventCondition() { + this.subCondition = new SimpleCondition(); + this.timeout = -1; + this.current = 0; + this.onSuccess = null; + this.onExpire = null; + } + + public TimedEventCondition(Condition subCondition, int timeout, int current, Runnable onSuccess, Runnable onExpire) { + this.subCondition = subCondition; + this.timeout = timeout; + this.current = current; + this.onSuccess = onSuccess; + this.onExpire = onExpire; + } + + @Override + public void register(Runnable onSuccess, Runnable onExpire) { + super.register(onSuccess, onExpire); + subCondition.register(onSuccess, onExpire); + MinecraftForge.EVENT_BUS.addListener(this::listen); + } @Override - public void register(Runnable success, Runnable expire) { - super.register(success, expire); + public void unregister() { + //MinecraftForge.EVENT_BUS.removeListener(this::listen); + subCondition.unregister(); } + // Simplified @Override public void listen(E event) { - duration++; - if (duration >= maxDuration) - success.run(); - else expire.run(); + current += 1; + if (current >= timeout) { + onExpire.run(); + } } } From fb2b946ba21cc6c14cc46d3c4f48a4a3edcf6244 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 11 Aug 2022 03:39:00 +1000 Subject: [PATCH 012/469] confirmed conditions work --- build.gradle | 12 ++++++------ .../com/amuzil/omegasource/skillapi/SkillAPI.java | 14 ++++++++++++-- .../skillapi/data/conditions/SimpleCondition.java | 11 +++++------ .../skillapi/data/conditions/StateCondition.java | 2 +- .../data/conditions/key/KeyHoldCondition.java | 2 +- .../data/conditions/key/KeyPressCondition.java | 2 +- .../data/conditions/key/KeyReleaseCondition.java | 2 +- src/main/resources/META-INF/mods.toml | 12 ++++++------ 8 files changed, 33 insertions(+), 24 deletions(-) diff --git a/build.gradle b/build.gradle index 0ad724ed..49bfffc2 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle' version = '1.0' group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html -archivesBaseName = 'modid' +archivesBaseName = 'magus' // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) @@ -78,7 +78,7 @@ minecraft { property 'forge.logging.console.level', 'debug' // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. - property 'forge.enabledGameTestNamespaces', 'examplemod' + property 'forge.enabledGameTestNamespaces', 'magus' mods { examplemod { @@ -106,7 +106,7 @@ minecraft { property 'forge.logging.console.level', 'debug' // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. - property 'forge.enabledGameTestNamespaces', 'examplemod' + property 'forge.enabledGameTestNamespaces', 'magus' mods { examplemod { @@ -123,7 +123,7 @@ minecraft { property 'forge.logging.console.level', 'debug' // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. - args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + args '--mod', 'magus', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { examplemod { @@ -170,8 +170,8 @@ dependencies { jar { manifest { attributes([ - "Specification-Title" : "examplemod", - "Specification-Vendor" : "examplemodsareus", + "Specification-Title" : "magus", + "Specification-Vendor" : "OmegaSource", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, diff --git a/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java b/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java index 1f674bef..daf0aec9 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java @@ -1,9 +1,13 @@ package com.amuzil.omegasource.skillapi; +import com.amuzil.omegasource.skillapi.data.conditions.ForgeEventCondition; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.event.entity.living.LivingAttackEvent; +import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; @@ -12,6 +16,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import java.util.function.Function; import java.util.stream.Collectors; // The value here should match an entry in the META-INF/mods.toml file @@ -25,7 +30,7 @@ @Mod(SkillAPI.MODID) public class SkillAPI { //MODID reference - public static final String MODID = "skill_api"; + public static final String MODID = "magus"; // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); @@ -47,6 +52,11 @@ private void setup(final FMLCommonSetupEvent event) { // some preinit code LOGGER.info("HELLO FROM PREINIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); + + //Testing for some conditions +// Function cond = event1 -> event1 instanceof LivingAttackEvent && ((LivingAttackEvent) event1).getSource().getEntity() instanceof Player; +// ForgeEventCondition test = new ForgeEventCondition<>(cond); +// test.register(() -> System.out.println("Success??"), () -> {});//System.out.println("Condition failed??")); } private void doClientStuff(final FMLClientSetupEvent event) { @@ -55,7 +65,7 @@ private void doClientStuff(final FMLClientSetupEvent event) { private void enqueueIMC(final InterModEnqueueEvent event) { // some example code to dispatch IMC to another mod - InterModComms.sendTo("examplemod", "helloworld", () -> { + InterModComms.sendTo("magus", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world"; }); diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java index 9405f2fe..3b2c37d3 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java @@ -1,26 +1,25 @@ package com.amuzil.omegasource.skillapi.data.conditions; import com.amuzil.omegasource.skillapi.data.Condition; -import net.minecraft.world.entity.ai.Brain; -import javax.xml.ws.Provider; +//import javax.xml.ws.Provider; public class SimpleCondition extends Condition { - Provider condition; + boolean condition; - public SimpleCondition(Provider condition) { + public SimpleCondition(boolean condition) { this.condition = condition; } public SimpleCondition() { - this.condition = null; + this.condition = false; } @Override //TODO: Fix this/check if using the right provider public void register(Runnable onSuccess, Runnable onExpire) { - if (condition.invoke(true)) { + if (condition) { onSuccess.run(); } else { onExpire.run(); diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java index 61ce06a3..bb8a14b5 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java @@ -2,7 +2,7 @@ import com.amuzil.omegasource.skillapi.data.Condition; -public interface StateCondition extends Condition { +public interface StateCondition {//extends Condition { boolean isSatisfied(); diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java index 64f9603e..52c18b07 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java @@ -20,7 +20,7 @@ public void listen(InputEvent.KeyInputEvent event) { if (event.getAction() == GLFW.GLFW_PRESS && event.getKey() == getKeyInfo().getKey().getValue()) { //We don't actually want success to run here, we want it to run if this condition is satisfied //and the key has been held for a certain amount of time - success.run(); + // success.run(); } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java index e12422b0..83f63cab 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java @@ -13,7 +13,7 @@ public KeyPressCondition(KeyInfo key) { @Override public void listen(InputEvent.KeyInputEvent event) { if (event.getAction() == GLFW.GLFW_PRESS && event.getKey() == getKeyInfo().getKey().getValue()) { - success.run(); + //success.run(); } } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java index 4c8d40d6..ed51f8e8 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java @@ -13,7 +13,7 @@ public KeyReleaseCondition(KeyInfo key) { @Override public void listen(InputEvent.KeyInputEvent event) { if (event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == getKeyInfo().getKey().getValue()) { - success.run(); + // success.run(); } } } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index aabc446e..36333b8d 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -15,19 +15,19 @@ license="All rights reserved" # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod -modId="examplemod" #mandatory +modId="magus" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata # see the associated build.gradle script for how to populate this completely automatically during a build version="${file.jarVersion}" #mandatory # A display name for the mod -displayName="Example Mod" #mandatory +displayName="Magus" #mandatory # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ #updateJSONURL="https://change.me.example.invalid/updates.json" #optional # A URL for the "homepage" for this mod, displayed in the mod UI #displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional # A file name (in the root of the mod JAR) containing a logo for display -logoFile="examplemod.png" #optional +logoFile="magus.png" #optional # A text field displayed in the mod UI credits="Thanks for this example mod goes to Java" #optional # A text field displayed in the mod UI @@ -41,7 +41,7 @@ Have some lorem ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. -[[dependencies.examplemod]] #optional +[[dependencies.magus]] #optional # the modid of the dependency modId="forge" #mandatory # Does this dependency have to exist - if not, ordering below must be specified @@ -53,10 +53,10 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn # Side this dependency is applied on - BOTH, CLIENT or SERVER side="BOTH" # Here's another dependency -[[dependencies.examplemod]] +[[dependencies.magus]] modId="minecraft" mandatory=true # This version range declares a minimum of the current minecraft version up to but not including the next major version - versionRange="[1.16.5,1.17)" + versionRange="[1.18.2, 1.19)" ordering="NONE" side="BOTH" From 2616f8e39819131788acf40ad20e14e8955eadcb Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 11 Aug 2022 03:52:44 +1000 Subject: [PATCH 013/469] conditions confirmed work --- .../com/amuzil/omegasource/skillapi/SkillAPI.java | 11 ++++++++++- .../skillapi/data/conditions/EventCondition.java | 3 +++ .../skillapi/data/conditions/ForgeEventCondition.java | 4 ++-- .../skillapi/data/conditions/TimedEventCondition.java | 6 ++++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java b/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java index daf0aec9..8af2809f 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java @@ -56,7 +56,16 @@ private void setup(final FMLCommonSetupEvent event) { //Testing for some conditions // Function cond = event1 -> event1 instanceof LivingAttackEvent && ((LivingAttackEvent) event1).getSource().getEntity() instanceof Player; // ForgeEventCondition test = new ForgeEventCondition<>(cond); -// test.register(() -> System.out.println("Success??"), () -> {});//System.out.println("Condition failed??")); +// ForgeEventCondition test2 = new ForgeEventCondition<>(cond); +// test.register(() -> { +// System.out.println("Success??"); +// test.unregister(); +// }, () -> {}); +// test2.register(() -> { +// System.out.println("Sus-ccess"); +// test.unregister(); +// }, () -> { +// }); } private void doClientStuff(final FMLClientSetupEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java index f05ebd75..a5da4541 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.skillapi.data.Condition; import net.minecraftforge.eventbus.api.Event; +import net.minecraftforge.eventbus.api.SubscribeEvent; import java.util.function.Function; @@ -10,6 +11,8 @@ public abstract class EventCondition extends Condition { //Make sure to instantiate this to something in inherited classes. public Function condition = null; + //Annotation needed for forge + @SubscribeEvent public void listen(E event) { if (condition.apply(event)) { onSuccess.run(); diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java index 1cdf543a..ac2ac61a 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java @@ -18,11 +18,11 @@ public ForgeEventCondition(Function condition) { @Override public void register(Runnable success, Runnable expire) { super.register(success, expire); - MinecraftForge.EVENT_BUS.addListener(this::listen); + MinecraftForge.EVENT_BUS.register(this); } @Override public void unregister() { - //MinecraftForge.EVENT_BUS.removeListener(this::listen); + MinecraftForge.EVENT_BUS.unregister(this); } } diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java index 9425ebd4..340058e1 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java +++ b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.skillapi.data.Condition; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; +import net.minecraftforge.eventbus.api.SubscribeEvent; public class TimedEventCondition extends EventCondition { @@ -30,16 +31,17 @@ public TimedEventCondition(Condition subCondition, int timeout, int current, Run public void register(Runnable onSuccess, Runnable onExpire) { super.register(onSuccess, onExpire); subCondition.register(onSuccess, onExpire); - MinecraftForge.EVENT_BUS.addListener(this::listen); + MinecraftForge.EVENT_BUS.register(this); } @Override public void unregister() { - //MinecraftForge.EVENT_BUS.removeListener(this::listen); + MinecraftForge.EVENT_BUS.unregister(this); subCondition.unregister(); } // Simplified + @SubscribeEvent @Override public void listen(E event) { current += 1; From ce61191120f71c026c9002b4480b10e2c860628a Mon Sep 17 00:00:00 2001 From: Mahtaran Date: Thu, 11 Aug 2022 01:17:50 +0200 Subject: [PATCH 014/469] :fire: clean up some of the mess --- CREDITS.txt | 65 - LICENSE | 674 --- LICENSE.md | 22 + LICENSE.txt | 520 -- README.md | 4 +- README.txt | 46 - changelog.txt | 12345 ------------------------------------------------ 7 files changed, 24 insertions(+), 13652 deletions(-) delete mode 100644 CREDITS.txt delete mode 100644 LICENSE create mode 100644 LICENSE.md delete mode 100644 LICENSE.txt delete mode 100644 README.txt delete mode 100644 changelog.txt diff --git a/CREDITS.txt b/CREDITS.txt deleted file mode 100644 index a70c53d5..00000000 --- a/CREDITS.txt +++ /dev/null @@ -1,65 +0,0 @@ -Minecraft Forge: Credits/Thank You - -Forge is a set of tools and modifications to the Minecraft base game code to assist -mod developers in creating new and exciting content. It has been in development for -several years now, but I would like to take this time thank a few people who have -helped it along it's way. - -First, the people who originally created the Forge projects way back in Minecraft -alpha. Eloraam of RedPower, and SpaceToad of Buildcraft, without their acceptiance -of me taking over the project, who knows what Minecraft modding would be today. - -Secondly, someone who has worked with me, and developed some of the core features -that allow modding to be as functional, and as simple as it is, cpw. For developing -FML, which stabelized the client and server modding ecosystem. As well as the base -loading system that allows us to modify Minecraft's code as elegently as possible. - -Mezz, who has stepped up as the issue and pull request manager. Helping to keep me -sane as well as guiding the community into creating better additions to Forge. - -Searge, Bspks, Fesh0r, ProfMobious, and all the rest over on the MCP team {of which -I am a part}. For creating some of the core tools needed to make Minecraft modding -both possible, and as stable as can be. - On that note, here is some specific information of the MCP data we use: - * Minecraft Coder Pack (MCP) * - Forge Mod Loader and Minecraft Forge have permission to distribute and automatically - download components of MCP and distribute MCP data files. This permission is not - transitive and others wishing to redistribute the Minecraft Forge source independently - should seek permission of MCP or remove the MCP data files and request their users - to download MCP separately. - -And lastly, the countless community members who have spent time submitting bug reports, -pull requests, and just helping out the community in general. Thank you. - ---LexManos - -========================================================================= - -This is Forge Mod Loader. - -You can find the source code at all times at https://github.com/MinecraftForge/MinecraftForge/tree/1.12.x/src/main/java/net/minecraftforge/fml - -This minecraft mod is a clean open source implementation of a mod loader for minecraft servers -and minecraft clients. - -The code is authored by cpw. - -It began by partially implementing an API defined by the client side ModLoader, authored by Risugami. -http://www.minecraftforum.net/topic/75440- -This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader. - -It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge. -http://www.minecraftforge.net/ - -Additionally, it contains an implementation of topological sort based on that -published at http://keithschwarz.com/interesting/code/?dir=topological-sort - -It also contains code from the Maven project for performing versioned dependency -resolution. http://maven.apache.org/ - -It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/ -with credit to it's authors. - -Forge Mod Loader downloads components from the Minecraft Coder Pack -(http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team. - diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f288702d..00000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..b3dbff00 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,22 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index b0cbe2b3..00000000 --- a/LICENSE.txt +++ /dev/null @@ -1,520 +0,0 @@ -Unless noted below, Minecraft Forge, Forge Mod Loader, and all -parts herein are licensed under the terms of the LGPL 2.1 found -here http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and -copied below. - -Homepage: http://minecraftforge.net/ - https://github.com/MinecraftForge/MinecraftForge - - -A note on authorship: -All source artifacts are property of their original author, with -the exclusion of the contents of the patches directory and others -copied from it from time to time. Authorship of the contents of -the patches directory is retained by the Minecraft Forge project. -This is because the patches are partially machine generated -artifacts, and are changed heavily due to the way forge works. -Individual attribution within them is impossible. - -Consent: -All contributions to Forge must consent to the release of any -patch content to the Forge project. - -A note on infectivity: -The LGPL is chosen specifically so that projects may depend on Forge -features without being infected with its license. That is the -purpose of the LGPL. Mods and others using this code via ordinary -Java mechanics for referencing libraries are specifically not bound -by Forge's license for the Mod code. - - -=== MCP Data === -This software includes data from the Minecraft Coder Pack (MCP), with kind permission -from them. The license to MCP data is not transitive - distribution of this data by -third parties requires independent licensing from the MCP team. This data is not -redistributable without permission from the MCP team. - -=== Sharing === -I grant permission for some parts of FML to be redistributed outside the terms of the LGPL, for the benefit of -the minecraft modding community. All contributions to these parts should be licensed under the same additional grant. - --- Runtime patcher -- -License is granted to redistribute the runtime patcher code (src/main/java/net/minecraftforge/fml/common/patcher -and subdirectories) under any alternative open source license as classified by the OSI (http://opensource.org/licenses) - --- ASM transformers -- -License is granted to redistribute the ASM transformer code (src/main/java/net/minecraftforge/common/asm/ and subdirectories) -under any alternative open source license as classified by the OSI (http://opensource.org/licenses) - -========================================================================= -This software includes portions from the Apache Maven project at -http://maven.apache.org/ specifically the ComparableVersion.java code. It is -included based on guidelines at -http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html -with notices intact. The only change is a non-functional change of package name. - -This software contains a partial repackaging of javaxdelta, a BSD licensed program for generating -binary differences and applying them, sourced from the subversion at http://sourceforge.net/projects/javaxdelta/ -authored by genman, heikok, pivot. -The only changes are to replace some Trove collection types with standard Java collections, and repackaged. -========================================================================= - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/README.md b/README.md index 2194af0a..c613d29c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# skillsapi -Temporary code storage for the skills part of magus. Hardest thing in the entire API, followed by rendering. +# Magus's Skill API +Temporary code storage for the skill part of Magus. diff --git a/README.txt b/README.txt deleted file mode 100644 index 344bca75..00000000 --- a/README.txt +++ /dev/null @@ -1,46 +0,0 @@ - -Source installation information for modders -------------------------------------------- -This code follows the Minecraft Forge installation methodology. It will apply -some small patches to the vanilla MCP source code, giving you and it access -to some of the data and functions you need to build a successful mod. - -Note also that the patches are built against "un-renamed" MCP source code (aka -SRG Names) - this means that you will not be able to read them directly against -normal code. - -Setup Process: -============================== - -Step 1: Open your command-line and browse to the folder where you extracted the zip file. - -Step 2: You're left with a choice. -If you prefer to use Eclipse: -1. Run the following command: `gradlew genEclipseRuns` (`./gradlew genEclipseRuns` if you are on Mac/Linux) -2. Open Eclipse, Import > Existing Gradle Project > Select Folder - or run `gradlew eclipse` to generate the project. - -If you prefer to use IntelliJ: -1. Open IDEA, and import project. -2. Select your build.gradle file and have it import. -3. Run the following command: `gradlew genIntellijRuns` (`./gradlew genIntellijRuns` if you are on Mac/Linux) -4. Refresh the Gradle Project in IDEA if required. - -If at any point you are missing libraries in your IDE, or you've run into problems you can -run `gradlew --refresh-dependencies` to refresh the local cache. `gradlew clean` to reset everything -{this does not affect your code} and then start the process again. - -Mapping Names: -============================= -By default, the MDK is configured to use the official mapping names from Mojang for methods and fields -in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this -license, if you do not agree with it you can change your mapping names to other crowdsourced names in your -build.gradle. For the latest license text, refer to the mapping file itself, or the reference copy here: -https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md - -Additional Resources: -========================= -Community Documentation: http://mcforge.readthedocs.io/en/latest/gettingstarted/ -LexManos' Install Video: https://www.youtube.com/watch?v=8VEdtQLuLO0 -Forge Forum: https://forums.minecraftforge.net/ -Forge Discord: https://discord.gg/UvedJ9m \ No newline at end of file diff --git a/changelog.txt b/changelog.txt deleted file mode 100644 index 1fd6944a..00000000 --- a/changelog.txt +++ /dev/null @@ -1,12345 +0,0 @@ -1.18.x Changelog -40.0 -==== - - 40.0.24 [1.18] Make it easier to register custom skull blocks models (#8351) - - 40.0.23 Rework fog events (#8492) - - 40.0.22 Update Forge Auto Renaming Tool to the latest version (#8515) - - 40.0.21 Add patches to enable MobEffects with IDs > 255 (#8380) - - 40.0.20 Allow sound instances to play custom audio streams (#8295) - - 40.0.19 Fix NPE caused by canceling onServerChatEvent (#8516) - - 40.0.18 [1.18.2] Fix tags for custom forge registries. (#8495) - Tag-enabled registries must now be registered to vanilla's root registry. See RegistryBuilder#hasTags. - Modded tag-enabled registries have to use the format `data//tags///.json` - This format is to prevent conflicts for registries with the same path but different namespaces - EX: Registry name `examplemod:shoe`, tag name `blue_shoes` would be `data//tags/examplemod/shoe/blue_shoes.json` - RegistryEvent.NewRegistry has been moved and renamed to NewRegistryEvent. - RegistryBuilder#create has been made private. See NewRegistryEvent#create - Created new ITagManager system for looking up Forge tags. See IForgeRegistry#tags. - Add lookup methods for Holders from forge registries. See IForgeRegistry#getHolder. - - 40.0.17 Lower custom item entity replacement from highest to high so mods can cancel it during a specific tick (#8417) - - 40.0.16 Fix MC-176559 related to the Mending enchantment (#7606) - - 40.0.15 [1.18.x] Allow blocks to hide faces on a neighboring block (#8300) - * Allow blocks to hide faces on a neighboring block - * Allow blocks to opt-out of external face hiding - - 40.0.14 [1.18.x] Fix FMLOnly in forgedev and userdev (#8512) - - 40.0.13 Clear local variable table on RuntimeEnumExtender transformation (#8502) - - 40.0.12 Pass server resources to reload listener event (#8493) - - 40.0.11 Use UTF-8 charset for Java compilation (#8486) - - 40.0.10 Use wither as griefing entity when it indirectly hurts an entity (#8431) - - 40.0.9 Provide access to the haveTime supplier in WorldTickEvent and ServerTickEvent (#8470) - - 40.0.8 Fix durability bar not respecting an item's custom max damage (#8482) - - 40.0.7 Add event for controlling potion indicators size (#8483) - This event allows forcing the rendering of the potion indicators in the - inventory screen to either compact mode (icons only) or classic mode - (full width with potion effect name). - - 40.0.6 Introduce system mods to mod loading (#8238) - Core game mods are mods which are required to exist in the environment - during mod loading. These may be specially provided mods (for example, - the `minecraft` mod), or mods which are vital to the framework which - FML is connected to (for example, Forge and the `forge` mod). - These core game mods are used as the only existing mods in the mod list - if mod sorting or dependency verification fails. This allows later - steps in the which use resources from these mod files to work correctly - (up to when the error screen is shown and the game exits). - - 40.0.5 Add missing module exports arg to server arguments list (#8500) - - 40.0.4 Fixed swim speed attribute (#8499) - - 40.0.3 Fix incorrect movement distance calculation (#8497) - - 40.0.2 Add support to Forge registry wrappers for new Holder system. Closes #8491 - Fix TagBasedToolTypesTest not generating needed data correctly. - - 40.0.1 Fix JNA not working at runtime and causing issues with natives. - - 40.0.0 Update to 1.18.2 - Co-authored-by: sciwhiz12 - Co-authored-by: Marc Hermans - Co-authored-by: LexManos - Co-authored-by: Curle - -39.1 -==== - - 39.1.2 1.18.x Omnibus (#8239) - - 39.1.1 Bump modlauncher and securejarhandler version (#8489) - - 39.1.0 Update license headers to compact SPDX format. - License has not changed, this is just more compact and doesn't include years. - Bump version for RB. - -39.0 -==== - - 39.0.91 Remove - from allowed characters in mod ids. - The Java Module System does not allow them in module ids. - Closes #8488 - - 39.0.90 Fix static initializer crash when loading BakedRenderable. - - 39.0.89 Fix regressions for onAddedTo/RemovedFromWorld and related events (#8434) - - 39.0.88 [1.18] Integrate the gametest framework with Forge (#8225) - - 39.0.87 Re-add missing Shulker patch for EntityTeleportEvent (#8481) - - 39.0.86 Fix entity type in conversion event to Drowned (#8479) - - 39.0.85 Add VanillaGameEvent to allow for globally listening to vanilla's GameEvents (#8472) - - 39.0.84 Provide damage source context to Item#onDestroyed(ItemEntity) (#8473) - - 39.0.83 Add missing shear and elytra game events (#8471) - - 39.0.82 Fix comment for permission handler config setting (#8466) - - 39.0.81 Apply nullable annotations to LootingLevelEvent (#8422) - - 39.0.80 Fix Mob Spawner logic with CustomSpawnRules. Closes #8398 - - 39.0.79 Fix LivingDropsEvent not having all drops for foxes (#8387) - - 39.0.78 Add missing Locale parameter to String.format calls, Fixes getArmorResource functionality on some locaales. (#8463) - - 39.0.77 Allow items to hide parts of their tooltips by default (#8358) - - 39.0.76 Prevent 1.x Branches being treated as Pull Requests. (#8443) - - 39.0.75 Fix RegistryObject not working if created after registry events (#8383) - - 39.0.74 Add support for tagging StructureFeatures (#8408) - - 39.0.73 Re-added the patch for LivingExperienceDropEvent and enable it for dragons (#8388) - - 39.0.72 Implement getPickupSound on ForgeFlowingFluid (#8374) - - 39.0.71 Add getCodec method in ForgeRegistry (#8333) - - 39.0.70 Fix #8298 (MobBucketItem) and add test mod (#8313) - - 39.0.69 Deprecate IForgeAbstractMinecart::getCartItem (#8283) - - 39.0.68 Fix HoeItem patch incorrectly applied during migration. (#8384) - - 39.0.67 Fix issues with client only commands in combination with server only commands not using MC's command system. (#8452) - - 39.0.66 Fix FoliagePlacerType and TreeDecoratorType registry (#8394) - - 39.0.65 Fix PlayerChangeGameModeEvent (#8441) - - 39.0.64 Fix comparison of custom ParticleRenderTypes leading to broken particle effects. (#8385) - - 39.0.63 Fix cases where null is potentially sent to Screen events. Closes #8432 - - 39.0.62 Ensure ScreenEvent doesn't accept null screens (#8296) - - 39.0.61 Update cobblestone tags (#8292) - - 39.0.60 Prevent release of custom payload packet buffer on the server side. (#8181) - - 39.0.59 Make `MinecraftLocator` respect non-`MOD` FML Mod Types Fixes #8344 (#8346) - - 39.0.58 Fix vanilla worlds being marked experimental (#8415) - - 39.0.57 Simplify usage of IItemRenderProperties::getArmorModel (#8349) - - 39.0.56 Hide mod update notification while screen is still fading in (#8386) - - 39.0.55 Revert "Hooks to allow registering and managing custom DFU schemes and types. (#8242)" - - 39.0.54 Provide NPE protection against out of order init of the TYPES and REF (#8410) - - 39.0.53 Add ShieldBlockEvent (#8261) - - 39.0.52 Add renderable API to allow easier rendering of OBJ and other custom models, from Entity and BlockEntity renderers. (#8259) - This is a redesign of a discarded section of my initial model system rewrite, back in 1.14. - In order to use it with the OBJ loader, you can use OBJLoader.INSTANCE.loadModel to get the OBJModel, and then call OBJModel#bakeRenderable() to get a SimpleRenderable object to render with. - The SimpleRenderable support animation, by providing different transformation matrices for each part in the MultipartTransforms. - Additionally, a BakedRenderable helper exists to turn an arbitrary BakedModel into a renderable. - After trying to get the B3D loader to work, I decided it wasn't worth the trouble and marked it for removal instead. - - 39.0.51 Merge values of defaulted optional tags, Fixes issue where multiple mods declare the same optional tag. (#8250) - - 39.0.50 Added new 1.18 biomes to the BiomeDictionary (#8246) - - 39.0.49 Hooks to allow registering and managing custom DFU schemes and types. (#8242) - - 39.0.48 Ping data compression (#8169) - - 39.0.47 Expand the LevelStem codec to allow dimension jsons to specify that the dimension's chunk generator should use the overworld/server's seed (#7955) - - 39.0.46 Add Client Commands (#7754) - - 39.0.45 Remove references to the now-broken `BlockEntity#save(CompoundTag)` method (#8235) - - 39.0.44 update McModLauncher libraries to newer versions... - - 39.0.43 add extra keystore properties - - 39.0.42 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.41 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.40 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.39 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.38 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.37 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.36 fix crowdin key - - 39.0.35 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.34 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.33 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.32 fix secondary branches builds - - 39.0.31 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated - - 39.0.30 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated - - 39.0.29 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated - - 39.0.28 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated - - 39.0.27 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated - - 39.0.26 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated - - 39.0.25 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated - - 39.0.24 Remove primary branches from building on secondary branch configuration and publish crowdin data. (#8397) - * Remove the normalized branch names also from the filter. - * Add the additional publishing arguments to get the crowdin information. - * TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - * Fix the configuration. - * Remove the required patch and use the base script. - * Make a note about the reference. - Co-authored-by: cpw - - 39.0.23 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed - - 39.0.22 Correct the build configuration to support a setup. (#8395) - * Add a setup task and publish the correct versions. - * Reconfigure build task and disable the normal build and test cycle on everything but pull requests, run an assemble there. - * Fix the derp in the build configuration. - - 39.0.21 Enable the TeamCity CI pipeline (#8368) - * Setup the build.gradle - * Setup the teamcity toolchain. - * Revert the usage of the local build of GU. - * Automatically add it now, it will always exist and is added to maven automatically by GU. - * Implement the branch filter and move the constant for the minimal changelog tag to a constant in the extension. - * Adding the JDK and Gradle version to the build script. - - 39.0.20 Fix and improve Ingredient invalidation (#8361) - - 39.0.19 Rework world persistence hooks to fix the double registry injection when loading single player worlds. (#8234) - - 39.0.18 Update tags for new 1.17 and 1.18 content (#7891) - - 39.0.17 Fix TerrainParticle rendering black under certain conditions (#8378) - - 39.0.16 Allow modded tools to work on glow lichen (#8371) - - 39.0.15 Fix custom climbable blocks not sending a death message (#8372) - Fixes #8370 - - 39.0.14 Provide access to the blockstate in BucketPickup#getPickupSound for multiply-logged blocks (#8357) - - 39.0.13 Fix clients being unable to deserialize tags for custom registries (#8352) - - 39.0.12 Fix particles going fullbright for a few frames when first spawning (#8291) - - 39.0.11 Also create parent directories when creating config files (#8364) - - 39.0.10 Fix crash with PermissionsAPI (#8330) - Fixes a crash in singleplayer, when the internal server didn't shut down correctly between world loads. - - 39.0.9 Re-add missing default spawn lists in features (#8285) - Fixes #8265 - Fixes #8301 - - 39.0.8 Fixed incorrect generic in PermissionAPI (#8317) - - 39.0.7 Redo of the whole PermissionAPI (#7780) - Co-authored-by: LexManos - - 39.0.6 Fix misplaced patch in SpreadingSnowyDirtBlock. - Fixes #8308. - - 39.0.5 Add RenderArmEvent to make overriding just the arm rendering not require copying nearly as much vanilla code (#8254) - - 39.0.4 Add MobEffect tags (#8231) - - 39.0.3 Log missing or unsupported dependencies (#8218) - - 39.0.2 Fix datagen test for sounds definitions provider (#8249) - - 39.0.1 Fix wrong stage being declared in transition to common (#8267) - - 39.0.0 Update to 1.18.1 - Co-Authored by: - - Curle - _ Orion - -38.0 -==== - - 38.0.17 [CVE-2021-44228]: Update Log4J to fix the security issue inside it. (#8268) - - 38.0.16 Fix KeyMappings only checking if they conflict with themselves. (#8256) - - 38.0.15 Fix ChunkWatchEvent not being fired (#8253) - - 38.0.14 Call handleUpdateTag for BlockEntities again (#8237) - - 38.0.13 Fix test worldgen data (#8248) - - 38.0.12 Allow Forge Registries to return key information for overridden objects. Fixes #8230 - - 38.0.11 Save Chunk capabilities to the chunk, rather than recursively to the capabilities. - - 38.0.10 Fix LevelChunk capability attach crash. - Fix client chunks not having capability providers attached. - Add capability attach tests. - - 38.0.9 Make HandshakeConsumer public again. - Fixes #8241 - - 38.0.8 Complete TODO in ShapedRecipe patch causing logspam related to minecraft:air - - 38.0.7 Add missing biomes back to the BiomeDictionary - - 38.0.6 Readd Mixin 0.8.5 to fix modules issues. - - 38.0.5 Readd PoseStack field to RenderTooltipEvent. - - 38.0.4 Fix custom loot serializers using wrong registry names - - 38.0.3 Fix DungeonHooks not returning correct values. Fixes dungeons in world spawning pigs. - - 38.0.2 Fix dedicated server install. Closes #8226 - Fix example mod - Fix obf issue with records. Closes #8228 - Fix dependencies beingg out of sync from vanilla. Closes #8227 - Disable mixin due to module incompatibility. - - 38.0.1 Fix mod resources not loading. - Add BreakingItemParticle.java.patch which I forgot to commit during the porting. - - 38.0.0 Initial port to 1.18 - Co-authored-by: David Quintana - Co-authored-by: SizableShrimp - -37.1 -==== - - 37.1.0 Bump version for final RB of 1.17's lifecycle. Move on to 1.18! - -37.0 -==== - - 37.0.127 Fix LiquidBlock's fluid field not being redirected to the supplier getFluid. Closes #7922 - - 37.0.126 [1.17.x Omnibus] Fix typos and javadocs across code base (#8144) - - 37.0.125 Fix /forge setdimension command arguments not parsing/suggesting correctly. - - 37.0.124 Fix Spectating Part Entity (MC-46486) (#8206) - - 37.0.123 Use HttpClient for VersionChecker (#8148) - - 37.0.122 Changed control flow of post mouse events to allow listening to events handled by vanilla. (#8133) - - 37.0.121 Deprecate durability bar methods in Item extension (#8214) - To retain compatibility with existing mods, the vanilla methods redirect - to the extension methods for now. - Users should now use and override the vanilla methods as directed in - the javadocs of the now-deprecated methods, as the extension methods - will be removed in the future. - Fixes #8201 - - 37.0.120 Reorder image tooltip component to match vanilla (#8213) - Fixes #8212 - - 37.0.119 Fix render pipeline lighting issue with small cubes (#8158) - This will also allow other mods which need to calculate small normalised vectors to be able to use the default classes without needing to write their own, while not effecting any side effects created by how the base game uses this function. - - 37.0.118 Fixes infinite loop when dismounting in `EntityMountEvent` (#8114) - - 37.0.117 Fix onChunkUnloaded not gettting called correctly (#8103) - - 37.0.116 Fix death message for tamed animals not having proper cause of death. (#8196) - - 37.0.115 Fix potential issue with BackgroundScanHandler for users with slow disc IO (#8176) - - 37.0.114 Make WorldEvent.Load run for Overworld before chunk creation like other dimensions (#8167) - - 37.0.113 Deprecate net.minecraftforge.common.util.Constants and inner classes to encourage usage of vanilla constants (#8140) - - 37.0.112 [1.17.x] Change expected type of LootTable fields to arrays (#8194) - #8184 reverted some LootTable patches, including the types of fields `f_79023_` and `f_79024_`. However, `ForgeLootTableProvider` still expects a list, however the type of the fields is an array now. - This PR changes the expected type in `ForgeLootTableProvider` to an array as well. - - 37.0.111 Apply window resizing to all gui layers (#8207) - - 37.0.110 [1.17.x] make ScrollPanel better usable by modders (#8179) - - 37.0.109 Update installer to 2.1.+ so we don't have to bump it in the future. - - 37.0.108 Remove Old LootPool Patches (#8184) - - 37.0.107 Remove the remnants of the selective reload listener (#8072) - - 37.0.106 Fix the hopefully last issue with GAMELIBRARY loading (#8162) - - 37.0.105 Fix part entities not working at all (#8177) - - 37.0.104 Pass IModelData through IForgeBakedModel#getModelData() before asking the BakedModel for the particle texture (#8106) - - 37.0.103 Fix blocks with flammable material catching fire from lava when they are marked as non-flammable (#8160) - - 37.0.102 Add `BiomeDictionary#hasType(String)` (#8157) - - 37.0.101 Add "forge:enchanting_materials" tag in place of Lapis in the Enchanting Table (#8149) - - 37.0.100 Fix Breaking waterlogged blocks occasionally displays air for a frame Closes #7253 (#8128) - - 37.0.99 Add accessor to an unmodifiable view of the fullPots map in FlowerPotBlock (#8108) - - 37.0.98 Fix Behavior With Unknown Items in Recipes (#8105) - - 37.0.97 Disable jenkins cache system until a functional system is in place. - - 37.0.96 Fix another crash with new tooltip events (#8155) - * Fix another crash with new tooltip events - * Add ItemStack context to ghost recipe tooltip events - * Expand Tooltip Event test mod to add a screen to test all tooltip render methods - - 37.0.95 Add entity source to PotionAddedEvent (#8147) - - 37.0.94 Add helper methods to generate blockstate and models for button, pressure plate, sign to BlockStateProvider/ModelProvider (#8139) - - 37.0.93 Fix Entity#onAddedToWorld not being called for non-player entities server-side (#8134) - - 37.0.92 Add ATs for world generation extensibility, focusing on `NoiseBasedChunkGenerator`, `NoiseSampler`, `NoiseBasedAquifer`, and `Beardifier` (#8087) - - 37.0.91 Make AdvancementProvider extensible by modders (#8120) - - 37.0.90 Skip loading jars with neither a manifest, nore a mods.toml. - Deprecate helper functions related to ModFile/Metadata. - Mark ModFileFactory as to be removed from our usage. - It may be useful for other loaders, but introduces a weird level of indirection that makes things a pain. - If there are consumers of this API please leave feedback before the next major mc version so we can be sure to provide something useful. - - 37.0.89 Fix mods with both a manifest and a mods.toml have mismatched module names. - - 37.0.88 Fix missing toolTip methods in Screen (#8154) - - 37.0.87 Fix render tooltip render patch (#8153) - - 37.0.86 Attempt to fix non-mods.toml jar files. Closes #8136 #8146 #8152 - Make jenkins copy gradle cache to address concurrent build issues. - - 37.0.85 Tooltip event rewrite (#8038) - Redesigns the tooltip events, and adds a feature where mods can register factories for ClientTooltipComponents, which are used for custom rendering in tooltips. The old events are maintained for binary compatibility. - - 37.0.84 Add ForgeSpawnEggItem to lazily handle EntityTypes (#8044) - - 37.0.83 Reimplement IForgeBlockEntity#onLoad() hook (#7946) - - 37.0.82 Implement GUI Stacking feature. (#8130) - You can now use `mc.pushGuiLayer` and `mc.popGuiLayer` to manage the layers. - mc.setScreen behaves such that if called with a non-null screen it replaces the entire stack, and if called with null it closes the entire stack. - - 37.0.81 Add ability for people to add custom pack finders (RepositorySources) (#8121) - Added AddPackFindersEvent which lets you add additional resource/data pack sources to the game. - Added PathResourcePack as a utility to allow easy providing of a subfolder in a mod as a resource pack. - - 37.0.80 Added EntityEvent.EnteringSection event to replace EnteringChunk event. (#8078) - - 37.0.79 Prevent Block/Entity data side leak on integrated servers by copying custom data before writing. #8111 - - 37.0.78 Re-implement linear filtering text render types (#8052) - * Re-implement linear filtering text render types - Implements and closes #7996 - - 37.0.77 Fix breaking block particles not respecting IModelData (#8065) - The sprite used for the block particles needs updating after the constructor otherwise it defaults to the texture sprite returned from passing ModelData.INSTANCE to get IForgeBakedModel#getParticleIcon. Calling updateSprite fetches the real IModelData instance for that blockstate/pos and sets the texture to the desired one - - 37.0.76 Fix Signs breaking with custom `WoodType`s (#8132) - - 37.0.75 Bump SJH version. Closes #8127 - Attempt addressing loading libraries during dev time, and bump SPI version introducing GAMELIBRARY type. #7976 #7957 #8090 - - 37.0.74 Capability rework to get rid of @CapabilityInject and use CapabilityToken as the identifier, deprecated old system for removal in 1.18. (#8116) - - 37.0.73 Fix pet death message being sent when pet death event is canceled. (#8110) - - 37.0.72 [1.17.x] implements canConnectRedstone(), Redstone dust now defers to the blockstate for determining connectivity (#8014) - - 37.0.71 Prevent call to Item#initializeClient when in datagen (#8097) - When running under data-generation, the Minecraft singleton is unavailable - even though the operating env is under the CLIENT dist. Adding this check - prevents crashes from devs unaware of this, as most uses of - IItemRenderProperties (usually for a custom BEWLR) make use of the - Minecraft singleton and therefore will cause NPEs if not guarded against. - A similar thing happens in MobEffect and Block. - - 37.0.70 Move ItemStack#forgeInit call earlier to allow earlier capability queries (#8096) - - 37.0.69 Remove incorrect FallingBlock patch (#8092) - The patch accidentally replaces the minimum build height (set by the - dimension via e.g. datapacks) with 0, causing falling blocks placed - below Y level 0 to never fall. - Fixes #8091 - - 37.0.68 Fix inverted hooks for PermissionsChangedEvent (#8089) - Because IEventBus#post returns true on cancellation and the patched-in - hooks inverts the return of the ForgeHooks method, if the player - whose permission level is being changed is online and the event is not - cancelled, the permission change _is_ cancelled. - The fix is inverting the patched-in hooks and the default return value - of the ForgeHooks method, so that the permission change is cancelled - only if the player is online, the event is fired, and the event is cancelled. - Fixes #8088 - - 37.0.67 Add the missing patch for ItemStack for last build. (#8085) - - 37.0.66 Support Lazy capabilities on itemstacks, for better ItemStack copy performance. (#7945) - - 37.0.65 Fix EntityJoinWorldEvent not firing as expected: (#8033) - - Fix entities loaded from disk not getting the event. - - Fix vehicles with passengers getting the event twice. - - 37.0.64 Re-add patch to release buffer in custom payload packet (#8042) - - 37.0.63 Propagate all arguments passed to the server start scripts to the game (#8060) - - 37.0.62 Remove old Log4j thread cache invalidation (#8068) - - 37.0.61 Fix pick-block for items that map to multiple blocks. Closes #8080 - - 37.0.60 Update nashorn to 15.3, which fixes crashing when run on Java 17. - Please note that due to https://bugs.mojang.com/browse/MCL-18306, the vanilla launcher will not let you use Java 17 yet without workarounds. - - 37.0.59 Add mixin full release to install list. (#8076) - - 37.0.58 Add new tool action for shield blocking, replacing `IForgeItem#isShield` (#8055) - - 37.0.57 Add workaround for pairs of `'` being stripped (#8050) - Fixes #7396, where if a translated string with balanced pairs of single - quote characters passes through ForgeI18n, the quotes are stripped - because of ExtendedMessageFormat. This is most notable in languages - where `'` is used frequently, like Canadian French from the bug report. - Note that unbalanced pairs cause an IllegalArgumentException in - ExtendedMessageFormat, which means the message is not affected. - - 37.0.56 Re-add missing patch for IForgeItem#getEquipmentSlot (#8041) - - 37.0.55 Added PlayerPermissionChangedEvent(#8023) - - 37.0.54 Changed Monster Requirement to Mob in RangedBowAttackGoal (#7960) - - 37.0.53 Add shebang to run.sh in server files (#8058) - - 37.0.52 Fix incorrect parameter being sent to AbstractContainerScreen#getSlotColor. - - 37.0.51 Patch ModSorter to include forge mod in forgeAndMC list (#8043) - - 37.0.50 Fix GuiUtils#drawContinuousTexturedBox making assumptions about what shader is currently active, and fix buttons and header not showing on LoadingErrorScreen (#8022) - - 37.0.49 Fix ScrollPanel render calls and usage (#8012) - - 37.0.48 Fix all layers of ItemLayerModel being fullbright (#8039) - Fixes #8007 - - 37.0.47 Cleanup Tag Loading, this migrates thins to more of a vanilla style. (#7898) - - 37.0.46 Add Shears ToolActions (#7997) - Make shear interactions extend to subclasses - Add Shears actions for beehive harvesting, pumpkin carving and trip wire disarming - - 37.0.45 Fix broken fmlonly installer and promote it to page gen (#8029) - Update gradle wrapper to 7.2 - - 37.0.44 Minor resource pack related fixes (#7884) - - 37.0.43 Fix misaligned patch causing monsters to not spawn in nether fortresses correctly. - - 37.0.42 Add RegisterCapabilitiesEvent (#8021) - - 37.0.41 Move static ITEM_TIER_ORDERING_JSON resourcelocation declaration from anonymous class into outer class to work around eclipse compiler error. (#8018) - - 37.0.40 Fix entities not spawning in structures (#8020) - This affects swamp huts, pillager outposts, ocean monuments, and nether fortresses - - 37.0.39 Add support for forge's "remove" list to tag datagenerators (#7911) - - 37.0.38 Add hook to allow items to customize the attack sweep range. (#7981) - - 37.0.37 Track the active mod within DeferredWorkQueue (#7973) - - 37.0.36 Allow to check spawner block entity in events (#7941) - - 37.0.35 Remove neutral mob patches as the bug was fixed upstream. (#8001) - - 37.0.34 Ensure that all render targets in a PostChain use the same format (#7978) - closes #6995 - - 37.0.33 Fix update checker to use runtime minecraft version (#8000) - - 37.0.32 Correct incorrect arguments for render hand event (#7987) - - 37.0.31 Redesign the tool system to rely on the new vanilla tags. (#7970) - Changed: - - ToolType is replaced with ToolAction, which can selectively represent which actions are supported by an item. - - Added a canPerformAction method to query ToolActions. - - Renamed canHarvestBlock to isCorrectToolForDrops to match vanilla. - - Added TierSortingRegistry, which can be used to add custom tiers and supports sorting between vanilla or with other mods. - How to use: - For the breaking system there's 2 methods: - - getDestroySpeed decides if an item *can* mine the block fast. Override if you have multiple tags or your item isn't a DiggerItem. - - isCorrectToolForDrops decides if an item will get drops. Returning false will also slow down mining, regardless of getDestroySpeed. Override if you have type-dependant tiers or your item isn't a DiggerItem. - For the tier system mods can just call `TierSortingRegistry.registerTier(tier, "name", List.of(lesser tiers), List.of(better tiers));` to register their tiers. - There's helper methods to query tiers such as TierSortingRegsitry.isCorrectTierForDrops. - The ToolActions solve 2 problems: - 1. distinguishing which kind of digger an item can be - 2. querying if the item can perform specific secondary actions. - Any item can override `canPerformAction` to customize which actions it performs. - - 37.0.30 Fixed reference to registryAccess in dimension fix, and marked for removal in next MC version. Closes #7961 - - 37.0.29 Bump BootStrapLauncher, and make sure Capability providers call parent revive. - - 37.0.28 Fix custom ingredients not being read correctly over the network. (#7980) - - 37.0.27 Add a OnDatapackSyncEvent, useful as a notification for modders to send extra data to the client (#7912) - - 37.0.26 Add access transformer to make Features.Decorators class public (#7974) - - 37.0.25 Fix NullPointerException in DetercorRailBlock patch. - - 37.0.24 Remove entity.remove(keepData) functions because Mojang changed entity removal mechanics. - If a modder wishes to use the capabilities from a invalid entity. They must manually call reviveCaps/invalidateCaps themselves. - - 37.0.23 Add forceSystemNanoTime config option to the client. - Normally glfwGetTime is used, but in some cases it may have performance issues. - - 37.0.22 Rename potion registry fields to match the mojang names (#7939) - - 37.0.21 Fix patch issue that removed SimpleWaterloggedBlock from BaseRailBlock (#7937) - - 37.0.20 Fix EntityInteractSpecific Event not being fired in server (#7936) - - 37.0.19 Add BlockEntityRenderer registering to RegisterRenderers (#7975) - - 37.0.18 Fix installer issue with spaces in paths. (#7972) - - 37.0.17 Remove unused config entries. (#7954) - - 37.0.16 Re-add call to Ingredient#invalidateAll() (#7953) - - 37.0.15 Remove Generic from ProjectileImpactEvent (#7959) - Generification of this event was half-done and has been aborted, leaving the generic parameter in place just creates confusion and crashes - - 37.0.14 Introduce RegisterShadersEvent to register shaders with the proper timing (runs every client resource reload). - Fix ShaderInstance to allow resourcelocations with namespaces as input. - Fix shader parsing to respect resource domains. - Fix ForgeRenderTypes to use the right shader in each situation. - Add custom forge shader for unlit translucent entity rendering, equivalent to the vanilla entity translucent shader. - - 37.0.13 Fix userdev mod deps on the classpath (#7919) - - 37.0.12 Fix typo in FluidBlockWrapper (#7931) - - 37.0.11 Fix rounding related errors with small entity pathfinding. Closes #7730 - - 37.0.10 Add modder-friendly way to edit the boat model / texture in custom boats (#7897) - - 37.0.9 Fix EntityRendererEventsTest crashing dedicated server when running forge_test_server in forgedev (#7930) - - 37.0.8 Added RegisterClientReloadListenersEvent which lets you register reload listeners with appropriate timing. - Added new entity rendering events. - - EntityRenderersEvent.RegisterLayerDefinitions: Used to register layer definitions for entity models. - - EntityRenderersEvent.RegisterRenderers: Used to register entity renderers. - - EntityRenderersEvent.AddLayers: Called during resource reload after all renderers have been constructed and it's safe to add layers. - Removed RenderingRegistry, which is now not necessary. - Removed a few unused things. - Fixes #7920 - - 37.0.7 Pass the 'includeName' flag to the ItemTossEvent (#7894) - - 37.0.6 remove old direct GL call (#7907) - - 37.0.5 1.17 Fix InitGuiEvent (#7906) - - 37.0.4 Expose RenderStateShard inner classes (#7895) - In 1.17, all of the inner classes of `RenderStateShard` (`RenderStateShard.OverlayStateShard`, `RenderStateShard.WriteMaskStateShard`, etc.) have been changed to protected. These classes are needed however to create new `RenderType.CompositeRenderType`'s using `RenderType.CompositeState.CompositeStateBuilder`. - Since these are protected inner classes, their constructors also can't be directly be obtained using `ObfuscationReflectionHelper`. - Currently, any mod using custom `RenderType`'s will have to either: - - add their own access transformer for the inner classes, or - - extend `RenderStateShard` to access `RenderStateShard`'s inner classes, and extend `RenderType` to access `RenderType.CompositeRenderType` - This PR changes the visibility of `RenderStateShard`'s inner classes to public in Forge's `accesstransformer.cfg`. - - 37.0.3 added back attribute patches (#7886) - - 37.0.2 Bump SecureJarHandler, and fix life cycle event's deferred work being on the incorrect thread/boot classloader. - - 37.0.1 Bump SecureJarHandler to fix package meta issue. Closes #7881 - Fix version.json having duplicate libraries. - - 37.0.0 Update to 1.17 - Update to Official classnames - Patchwork - Make the game compile and run - Merge in the new HUD overlay API - Merge in the new render properties API - PEEL - Use Gradle 7.2 snapshot to fix eclipse integration bug in 7.1, Would use 7.0 but FG needs 7.1 for some reason. - New FML installer - Update to 1.17.1 - Co-authored-by: LexManos - Co-authored-by: SizableShrimp - Co-authored-by: cpw - Co-authored-by: Curle - Co-authored-by: Unnoen - Co-authored-by: covers1624 - Co-authored-by: DaemonUmbra - Co-authored-by: gigaherz - -36.2 -==== - - 36.2.0 New 1.16.5 RB. - -36.1 -==== - - 36.1.66 ForgeGradle 5.1 and Gradle 7, which allows development on J16. Runtime still targets J8. (#7877) - - 36.1.65 Work around javac scoping issue. - - 36.1.64 Fix LAN worlds where registry entries have been removed. - - 36.1.63 Fix FakePlayers having null `connection` and add FakePlayer test mod (#7733) - - 36.1.62 Use '{assets_root}' rather than task output path for userdev config (#7873) - - 36.1.61 Fix missing userdev config for datagen runs (#7871) - - 36.1.60 Adds a damage float in Lightning Entity and patches Entity to use it. (#7849) - - 36.1.59 Patch several mob classes to let them use modded versions of their ranged weapons (#7845) - - 36.1.58 Add Fishing bobber projectile impact event (#7842) - - 36.1.57 Removes misapplied patch in Entity (#7841) - - 36.1.56 Removes misleading Nullable annotation from canCreatureSpawn (#7840) - - 36.1.55 Corrects the assigning of mob kills, Fixes MC-121048 (#7836) - - 36.1.54 Updates MouseHelper to allow for Horizontal Scroll to be recognized as Vertical Scroll (#7834) - - 36.1.53 Fix entities losing their scoreboard data when they are unloaded (#7826) - - 36.1.52 [1.16] Allow blocks other than beds or respawn anchors to act as respawn points (#7824) - - 36.1.51 Regen patches - - 36.1.50 Add AT entries for DimensionSettings to make them easier for mods to work with (#7817) - - 36.1.49 New hook to allow Trapdoors be climbable for custom ladders (#7816) - - 36.1.48 Convenience change for potion enumeration - does not change patch size in any meaningful way! (#7811) - - 36.1.47 Adds knockback attribute to players and updated knockback calculation to PlayerEntity#attack (#7806) - - 36.1.46 Fix mod menu URL click bounds (#7804) - - 36.1.45 Fix vanilla rotation/mirroring issues (#7803) - Patch minecraft to fix MC-227255 and MC-134110, which are block - rotation and mirroring issues. I noticed this from problems with - Structurize, but this probably affects any other mods that allow - rotating or mirroring structures (as well as vanilla structure blocks). - - 36.1.44 Synchronize `ResourcePackList#addPackFinder` (#7799) - - 36.1.43 Fixes tryFluidTransfer_Internal to respect the FluidStack drainable when draining fluidSource. (#7782) - - 36.1.42 Add IRecipeType parameter to burn time hooks (#7771) - - 36.1.41 Use MobGriefingEvent for PiglinEntity when determining whether Piglins want to pick up items. (#7762) - - 36.1.40 [1.16.x] Remove redundant mobgriefing check in SmallFireaballEntity. (#7761) - - 36.1.39 Changed AbstractFurnaceTileEntity's canBurn and burn functions to use IRecipe's 'assemble' instead of 'getResultItem' (#7756) - - 36.1.38 Bypass chunk future chain when processing loads and getChunk called. (#7697) - - 36.1.37 Removed sidedness from PacketBuffer methods. (#7236) - Affected methods: - * readLongArray (x2) - * readSectionPos - * readString (no-arg variant) - - 36.1.36 Add data generators for sounds.json (#6982) - - 36.1.35 Add custom TextureAtlasSprite loaders (#7822) - Adds a system for mods to specify custom texture loaders which can be requested by the resource pack through a metadata section in the .mcmeta file. Due to technical reasons, png file is still required for MC to identify a texture as existing, even if the loader doesn't use it. - - 36.1.34 Fix PlayerGameModeEventTest and ForgeWorldTypeTest so they don't crash the dedicated server when running forge_test_server in forgedev (#7869) - - 36.1.33 Add userdev to run config. - - 36.1.32 Add truncation to FMLStatusPing to work around protocol limits (#7818) - - 36.1.31 Remove ModelResourceLocation patch for SAS entry (#7813) - - 36.1.30 Fix jar file path detection if the path contains a "!" (#7790) - - 36.1.29 Add method to get the number of elements in a model builder (#7792) - - 36.1.28 Fix vanilla packet splitter remote detection and add advancement packet splitting (#7802) - - 36.1.27 Add option for linear filtering of text texture (#7645) - - 36.1.26 Use empty model instead of missing model for non-existant layers in multilayer models (#7750) - Fixes issues when using multi-layer models as part of composite models - - 36.1.25 Add debug logging to packet compression encoder. - Should make figuring out who is sending large packets easier. - Disable with -Pforge.disablePacketCompressionDebug=true - - 36.1.24 Removed signature line from mod list screen. #7500 - - 36.1.23 Reinstate the MinecartCollisionHandler field to AbstractMinecartEntity (#7748) Closes #7506. - - 36.1.22 Fix PlayerEvent.BreakSpeed's pos being nullable. (#7747) Closes #7615. - - 36.1.21 Fix OBJ Loader data gen string (#7746) Closes #7616 - - 36.1.20 Add an event similar to PlayerEvent.NameFormat but for the name shown in the tab list. (#7740) - - 36.1.19 Fix filling buckets with fluids without bucket items consuming the fluid (#7745) Closes #7670 - - 36.1.18 Work around crash while loading flatworld with modded structures. (#7764) - * Work around crash while loading flatworld with modded structures. - * Maybe fix issue with gradle daemon leaking memory and slowing down CI builds. - - 36.1.17 Update Forge to Gradle 6.9 - - 36.1.16 Add barrels and barrels/wooden block and item tag (#7676) - - 36.1.15 Fix shears not properly breaking tripwire (MC-129055) (#7718) - - 36.1.14 Fix Line endings in tooltips not handled properly in multiplayer screen Closes #7738 (#7739) - - 36.1.13 Fix cats, phantoms and pillagers saying they're at BlockPos.ZERO during LivingSpawnEvent.CheckSpawn (#7722) - - 36.1.12 [1.16] Add missing Multipart Blockstate Builder feature: Nested condition groups (#7677) - - 36.1.11 Pass BlockPos to BlockParticleData used for "fall impact" particle (#7705) - - 36.1.10 Check version ranges of optional dependencies when present (#7710) - If an optional dependency is present, but it does not conform to the version range, - it will now error out in the same fashion as missing required dependencies, instead - of a more cryptic error down the line due to a missing method/class/field/etc. - Implements and closes #7696 - - 36.1.9 Fix ClientVisualization crashing on systems without monitors (#7719) - - 36.1.8 Fix Furnace Minecarts going faster then vanilla (#7725) - - 36.1.7 Update for Forge's new maven (#7723) - - 36.1.6 A bloody quote FFS - - 36.1.5 Update for new maven - - 36.1.4 Fix broken java9hacks for j16 handling.. - - 36.1.3 Add generic EntityTeleportEvent (#7694) - - 36.1.2 Restore SS version, fixes findFieldInstanceChecks - - 36.1.1 Fix sign textures being stitched onto every texture atlas (#7690) - - 36.1.0 Fix AT order, missed exec line and bump for RB. - -36.0 -==== - - 36.0.61 Fix wrong eye height when entity size changes (esp. baby animals) (#7628) - - 36.0.60 Allow ITeleporter to override the vanilla teleport sound (#7682) - - 36.0.59 Fix datapack exception related to EnumArgument with siblings (#7686) - Invalid enum constants are now properly thrown as a CommandSyntaxException - - 36.0.58 Add support for custom WoodTypes (#7623) - - 36.0.57 Use JGit instead of GrGit now that jcenter is going away. - Update missed mapped name in MDK. - - 36.0.56 Bump nashorn wrapper version. - - 36.0.55 Fix yet another copypasta. - - 36.0.54 Fix incorrectly replaced SRG names - - 36.0.53 Fix potential Deadlock when using custom Item entities. (#7532) - Be careful when adding Entities during Chunk Load (#7519) - - 36.0.52 Fix copypasta. - - 36.0.51 Automatically fix some issues with configurations deemed invalid for simple reasons (#7671) - - 36.0.50 Add coremod that injects bouncer methods to work around name conflicts with official names. - Fixes a binary break. - - 36.0.49 Bump SpecialSource - - 36.0.48 Bulk update license year, and use replacement variable so that the current year is always used. - - 36.0.47 Introduce a new feature that lets mods know if optional mods and optional network channels are present in the remote. - Allow connections from forge versions that don't have the vanilla splitter. - - 36.0.46 Regenerate patches with relative headers. This should lower conflicts in future PRs. - Convert Forge to use Official mappings. - Mojang released their obfuscation mappings but we have not used them up until now due to wanting to get their license to be more explicitly permissive. - It is clear that their intent is to allow us to use their names for developing mods like this. - See the full wording, and our interpretation here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md - - 36.0.45 Update to FG4, and Gradle 6.8. - - 36.0.44 Support splitting vanilla packets that are too large on forge<->forge connections (#7485) - Currently only for SUpdateRecipesPacket and STagsListPacket that blow up with huge datapacks - - 36.0.43 Fix a few places where the vanilla method was being called instead of the forge one (#7535) - Cleanup javadocs references slightly, fix a couple spots not using the proper forge hooks, and remove a couple unneeded patches - Update deprecation comment on isAir - - 36.0.42 Add Opacity to ForgeHooksClient#renderMainMenu (#7660) - - 36.0.41 Add support for caching of configuration values. (#7608) - - 36.0.40 Added entity attribute setup and creation events - - 36.0.39 Fix updateItemStackNBT not properly being called (#7646) - Re-added ItemStack delegate redirect transformer - - 36.0.38 Fix a few FluidUtil issues that were causing DispenseFluidContainer to not function properly (#7422) - - 36.0.37 Add a way to specify a custom background texture with namespaces in the Creative GUI. (#7404) - - 36.0.36 Fixed Configs not correcting when hot-loaded from changes on disk (#7427) - - 36.0.35 Reduce default logging markers in the MDK. Modders can re-enable these for better debugging. (#7432) - Modders PLEASE read your damn log, and fix the errors we point out. Spamming modpacks with stack traces is just lazy programming. - - 36.0.34 Deprecate Forge's setdimension command, vanilla execute command can do this now. (#7459) - - 36.0.33 Fix ItemTextureQuadConverter.convertTexture generating wrong quads, fixes #7620 (#7650) - - 36.0.32 Added MultipartBakedModel.getModelData(). (#7595) - This allows custom IBakedModel implementations to use the IModelData provided by their IBakedModel.getModelData() when used in the context of a multipart model. - - 36.0.31 fix global cache not being a block render type (#7648) - - 36.0.30 Allow mods to use additional custom LootParameter when querying existing loot tables (#7515) - - 36.0.29 Add ForgeHooks.canEntitySpawn to Cat, Phantom, and Patrol spawners. (#7569) - - 36.0.28 Fix/Replace player visibility event (#7573) - - 36.0.27 Fix: Clear the last error from glfwInit to prevent vanilla from throwing an exception later in the chain when glfw errors. (#7587) - - 36.0.26 Fix MC-181464 persisting for modded shields (#7602) - - 36.0.25 FIx race condition in LazyOptional (#7611) - - 36.0.24 [1.16.5] Fix shaders breaking almost every overlay that uses textures, fixes #7575 (#7624) - - 36.0.23 Disable syncing of Feature and Biome registries (#7639) - - 36.0.22 Add IExtensibleEnum to GrassColorModifier (#7641) - - 36.0.21 Log stacktraces in NettyPacketEncoder. (#7654) - - 36.0.20 Lower logging level for datafixer warning to debug (#7636) - - 36.0.19 Reintroduce forge's chunk manager to allow mods to force chunks with either a block position or entity (UUID) "owner" and have them properly persist between restarts (#7642) - - 36.0.18 Fix two places where querying an object for the new "valid" capability from a capability invalidation listener could cause the object to return the old invalid capability. (#7643) - - 36.0.17 Fix config spec in cases of enum class discrepancies (#7635) - - 36.0.16 Fix onBlockAdded being called twice for ItemEntity placing non-TE blocks (#7607) - - 36.0.15 Prevent NullPointerException when adding new loot pool. (#7605) - - 36.0.14 Added generic multi part entity API (#7554) - - 36.0.13 Fix IAngerable entities crashing when reading nbt on client (#7618) - - 36.0.12 [1.16.x] Add loot table ID in Global Loot Modifiers (#7428) - - 36.0.11 Add a block tag to allow mods to blacklist blocks endermen should not be able to place blocks on top of, similar to how vanilla hardcodes against them being able to place things on bedrock (#7548) - - 36.0.10 Fix translucent model parts of MultiLayerModels rendering as missing models due to differing rendertypes when rendering block model (#7579) - - 36.0.9 Fix existing file tag provider support looking in the wrong folder for custom tag types (#7576) - - 36.0.8 Propery re-encode registries (#7629) - - 36.0.7 Properly encode registries. (#7626) - - 36.0.6 Inject vanilla dimensions inside worlds missing them (#7599) - - 36.0.5 Introduce a new field_to_instanceof transformer to reduce some simple patches. - - 36.0.4 Fix broken build. - - 36.0.3 Add modded biomes to overworld biome list (#7360) - - 36.0.2 Fix dynamic registries not getting ids assigned correctly from old worlds in specific unordered value insertions. Closes #7586 - - 36.0.1 Optionally add a milk fluid to the vanilla bucket (#7294) - Fixes the previous broken code that was supposed to make mod registered milk returned by the vanilla bucket by allowing mods to enable a milk fluid. - - 36.0.0 1.16.5 Initial Update. - -35.1 -==== - - 35.1.39 Update Coremods, ASM, and include standalone Nashorn to load on J15. - - 35.1.38 Introduce a new field_to_instanceof transformer to reduce some simple patches. - - 35.1.37 Update Coremods, ASM, and include standalone Nashorn to load on J15. - - 35.1.36 Added IWeatherParticleRenderHandler to allow a mod to take control over weather particles and sounds. (#7522) - - 35.1.35 Allow Chunk loading Tickets to opt-into forcing chunk ticks. (#7525) - - 35.1.34 Fix crash when mods add goals to skeleton horses (MC-206338) (#7509) - - 35.1.33 Set WM_CLASS and WM_INSTANCE_NAME for early progress window (#7534) - - 35.1.32 Make UnboundedMapCodec more lenient in decoding dimensions. Fixes MC-197860 (#7527) - - 35.1.31 Fix FML's Config Sync packet not allowing same length filenames in encoder and decoder. Closes #7584 - - 35.1.30 Prevent NPE and deprecated MissingMappings.getMappings function. Closes #6252 - - 35.1.29 Fix entities not correctly being able to be ridden under water. - - 35.1.28 Fix crash when beehive is broken by fake player (#7566) - - 35.1.27 Add supplier variant to `AbstractBlock.Properties#lootFrom` (#7563) - - 35.1.26 Fix ModFileResourcePack.getAllResourceLocations ignoring resourceNamespace. (#7562) - Fixes #7405 - - 35.1.25 Fix missing serializers when deserializing global loot modifiers (#7561) - - 35.1.24 Fix VanillaConnectionNetworkFilter sending out invalid entity properties packets without an entity ID (#7560) - - 35.1.23 Make shear interactions extend to subclasses (#7544) - - 35.1.22 Add a SoundType subclass that uses suppliers (#7538) - - 35.1.21 Fix compound ingredient in shapeless recipes (#7537) Fixes #7530 - - 35.1.20 Fix potential NPE in ForgeHooks.onItemPlaceIntoWorld when passing in null player. (#7505) - - 35.1.19 Fix modded PointOfInterestType's not populating blockstate map when registered (#7503) - - 35.1.18 Add new LivingConversionEvent to control mobs turning into other mobs. (#7386) - - 35.1.17 Add ItemAttributeModifierEvent (#7484) - - 35.1.16 Fix RightClickBlock ALLOW not being implemented (#7426) - - 35.1.15 Quiet down errors related to modders not changing their update urls from the default. - - 35.1.14 Make mod data packs able to be disabled. It'll break things, but that's on you. Closes #6776 - - 35.1.13 Add generated resource tracking to ExistingFileHelper - - 35.1.12 Fix BlockStateProvider item models not knowing about block models - Add tests for this case - - 35.1.11 Override invalidateCaps instead of remove for vanilla TE capability invalidation (#7536) - Properly invalidate patched in vanilla TE caps in invalidateCaps instead of remove so that they get invalidated on chunk unload - - 35.1.10 Make TEs invalidate capabilities when the chunk they are in unloads (#7529) - Fixed LazyOptional potentially notifying invalidation listeners multiple times. - - 35.1.9 Fixed entity navigation to stop entities spinning - MC-94054 (#7520) - - 35.1.8 Fix wrong function call in BlockStateProvider::horizontalFaceBlock (#7514) - - 35.1.7 Fix datagen order of multipart conditions being unstable - - 35.1.6 Fix forge config option for default world type not applying unless you change the default world type (#7521) - - 35.1.5 Implement feature for mods to define new world types (#7448) - * Mods can now register world types via a new forge registry, and optionally register a settings screen to tweak them. - * The default world type for dedicated servers and singleplayer world creation is configurable via forge's common config. - - 35.1.4 Fix dimType not encode to registries (#7513) - - 35.1.3 Add support for referencing forge's resources and specifying existing mods to data generators (#7456) - - 35.1.2 Fix #6692 - Thanks @AterAnimAvis for help and suggestions - - 35.1.1 Fix translucent blocks not rendering properly when moved by pistons on fabulous (#7441) - - 35.1.0 Bump version for RB. - -35.0 -==== - - 35.0.22 Fix food bar not rendering when non-living entities are mounted (#7446) - - 35.0.21 Fix MC-194811 - Removing structures causes chunk save errors. - - 35.0.20 Fix concurrency issue in StartupMessageManager (#7483) - - 35.0.19 Fix forge registry types that have private constructors (BlockStateProviderType, BlockPlacerType, FoliagePlacerType, TreeDecoratorType) (#7482) - - 35.0.18 Fix problem where the absence of forge and MC in later loading triggered a weird crash. - - 35.0.17 Fix NPE problem when modid is mismatched. - - 35.0.16 Return the processed modlist data to the upstream system, not the raw unprocessed data. Should resolve the problem - that mixin complains about missing info when it's in a "crashed" situation. - - 35.0.15 Fix dims on servers not loading the first run (#7445) - - 35.0.14 Allow for custom argument types by filtering them on vanilla connections (#7463) - - 35.0.13 Add Player context to AnvilUpdateEvent (#7442) - - 35.0.12 Don't overwrite PlayerAdvancement's player with a fake one (#7454) - If a FakePlayer is constructed with the same UUID/GameProfile as a - currently active player, the player object within PlayerAdvancement is - set to the fake player. - As fake players cannot receive advancements (see grantCriterion), this - prevents the actual player from receiving any advancements until they - change dimension/relog. - - 35.0.11 Add BannerBlock.forColor to SAS to fix banner.toItem() on servers. - - 35.0.10 Call Harvest check event even if the block doesn't require any tool (#7414) - - 35.0.9 Use linked collections to stabilize order when adding new registry entries. - - 35.0.8 Render local player when the renderViewEntity is not the local player (#7216) - - 35.0.7 Some help in ExtensionPoint regarding DISPLAYTEST. Let's improve those tick rates! - - 35.0.6 Handle erroring during early mod construction phases, and actually report that into the error UI - by doing armslength exception handling and propagation. - - 35.0.5 Support backwards loading 1.16.3 mods in 1.16.4, because we are able to do that. Tweak loading a bit to be smarter about dependency errors of various kinds. - - 35.0.4 Add FluidStack codec, and a test mod that verifies its behaviour matches the existing write/read logic. - Add missing license headers. - - 35.0.3 Update event bus version (should be 3.0.5) - Tweak MDK to automatically populate recommended values for things like forge version, loader version and minecraft version. - - 35.0.2 Workaround for modded attributes on vanilla entities logging warnings on vanilla clients - Switch to a handler-based approach per packet class, simplify patch, add some docs - Add license header and docs - Switch to a network handler based approach - Switch to a network handler based approach - revert build gradle change - Simplify Packet patch - Add license header to IForgePacket - Revert ForgeHooks changes - Less hacky and more generic way to filter packets for vanilla connections - _Actually_ Order SAS. - It's early - Order SAS - simplify vanilla connection check - Remove unneeded import change - - 35.0.1 Fix early sorting bug that meant the file deduping was causing an error, to, well, not cause it, so we can get to an error screen. - - 35.0.0 1.16.4 Initial Update - -34.1 -==== - - 34.1.42 Fix Biomes not properly copying over ids loaded from the save to the new Dynamic Registry. - - 34.1.41 Introduce custom loader additions to the model data generators. (#7450) - Currently implemented loaders: - * OBJ - * Composite - * Multi-layer - * Item layers (vanilla item/generated but with fullbright texture support) - * Bucket - * Separate Perspective - - 34.1.40 actually rollback on error in registry events. - - 34.1.39 Fix config parse failure causing crash in building exception message. fixes #7438 - - 34.1.38 Auto-detect ansi support for log4j2 - move to fml.loading subpackage - Add license header - - 34.1.37 Return client resources even if no data pack found on server. Closes #6225 (Pull request) - - 34.1.36 Update modlauncher. fixes #7452 - - 34.1.35 Fix (NonNull)Lazy.Concurrent using a global lock (#7403) - * Fix Lazy.Concurrent using a global lock, thus preventing multiple threads from resolving independent Lazy's at the same time - * Use Lazy with an added null check to implement NonNullLazy - - 34.1.34 Update forge mappings to 20201028-1.16.3 (#7435) - - 34.1.33 Fix breaking changes from the Biome rename PR #7434 (#7439) - - 34.1.32 Reimplement nametag distance attribute, fix attribute translation keys (#7387) - - 34.1.31 Fix data pack biomes failing to load in SingleBiomeProvider (#7434) - - 34.1.30 Add in proper handling of equals and hashcode for modjar urls. Fixes very slow loading on windows. - - 34.1.29 Force 8.0.5 ML - - 34.1.28 Restore FingerprintViolationEvent with appropriate THIS IS F*CKING DEAD DELET WARNINGS. - Also, notify in UI if using legacy JDK without capability to read out security data from mod jars. - - 34.1.27 Add signature reporting for mods, using new signature capture from ModLauncher. Need to figure out - how to reflect Minecraft's JAR signatures into here. - - 34.1.26 Rollback registries to vanilla state if something happens during loading, so subsequent activities can still run and not generate false reports.. - - 34.1.25 Fix mcp_snapshot mapping issue causing unneeded patches. Closes #7424 - - 34.1.24 Fix resource leak in the OBJ loader. - - 34.1.23 Fix issue with ITeleporter allowing easier use of vanilla logic. (#7317) - - 34.1.22 Adds tag support for Enchantments, Potions, and TileEntityTypes (#7379) - - 34.1.21 Resuscitate BiomeDictionary using RegistryKeys instead of biome references. - - 34.1.20 Add event for player changing game mode (#7355) - - 34.1.19 Fix RCON multipacket responses not actually understanding UTF8. - - 34.1.18 Fix RCON not sending newlines in output for multiline. Fixes https://bugs.mojang.com/browse/MC-7569, a very old bug that is really annoying if you use RCON. - - 34.1.17 Fix Texture Presence String (#7408) - - 34.1.16 Fix typo causing potential error in vine growth. Closes #7406 - Sort missing registry dumps by name, making it easier to read. - - 34.1.15 Fixed conditional advancement loading when using the "advancements" array. - Added automatic generation of conditional advancements from the criteria in the conditional recipe entries. - Added advancement name calculation from the recipe ID. - - 34.1.14 Additions to the mdk build.gradle to accommodate datagens. (#7398) - - 34.1.13 Added Basic Class-Level SAS Capability to checkSAS, added Vector4f to SAS (#7385) - - 34.1.12 Add hooks to allow modification of structures spawn lists (#7344) - - 34.1.11 Add back patches to Screen allowing for item tooltips to be auto wrapped again (#7378) - Only deals with the methods receiving an ItemStack or ITextComponent(s), the methods that take IReorderingProcessor(s) are left alone. - - 34.1.10 Bump mixin version to 0.8.2 - - 34.1.9 Add in extra debug logging - - 34.1.8 Remove redundant call to CrashReport generator - Vanilla is doing a crashreport for itself at startup now. - Add a UUID into crashreport that is also logged in all channels at crash report generation time. This will allow to associate crash reports and the logs. - - 34.1.7 Fix doc README and answer lex's question - - 34.1.6 Modify how ModLoadingStage handles dispatch to Registry Events. Stops the objectholder spam and generally improves performance on larger packs. - - 34.1.5 Added "Bukkit Plugin" to InvalidModIdentifier (#7384) - - 34.1.4 Fix vanilla Campfire smoke bug. MC-201374 (#7381) - - 34.1.3 Fix toggleable keybindings still being active while in GUI Fixes #7370 (#7373) - - 34.1.2 Fix modded EntityClassifications not being useable in the codec. (#7337) - - 34.1.1 Support effective materials of vanilla AxeItem (#7351) - - 34.1.0 Prep new RB. - -34.0 -==== - - 34.0.21 Fix grass disappearing when alwaysSetupTerrainOffThread is true (#7291) - - 34.0.20 Accessors for inspecting and removal of biome generation settings. Fixed carvers still being immutable. (#7339) - - 34.0.19 Revive BiomeManager and BiomeLayer hooks. - - 34.0.18 Fix a few minor issues with custom tag types and fix OptionalNamedTags (#7316) - - 34.0.17 Fix ToggleableKeyBinding differences to vanilla. (#7338) - - 34.0.16 Fix forge light pipeline applying block offsets twice (#7323) - - 34.0.15 Updated build badge versions to 1.16.3 in readme (#7325) - - 34.0.14 Add a better license error screen (#7350) - - 34.0.13 Fixed container item being consumed in brewing stand. #7307 (#7314) - - 34.0.12 Fix parse results of CommandEvent being disregarded (#7303) - - 34.0.11 [1.16] Fix possible crash when using rendering regionCache (#7207) - - 34.0.10 [1.16] Reimplement ICloudRenderHandler, ISkyRenderHandler and IWeatherRenderHandler (#6994) - - 34.0.9 Make Biome.Climate and BiomeAmbiance fields accessible (#7336) - - 34.0.8 Use mixin 0.8.1. Should fix problems with mixin not working properly with latest modlauncher. - - 34.0.7 Sets the empty/fill sounds for vanilla fluids. - Use Fluid's fillSound rather than emptySound when filling buckets. - - 34.0.6 Add MatrixStack-aware alternatives to the methods in GuiUtils (#7127) - - 34.0.5 Fix json biomes not setting registry name correctly for the BiomeLoadingEvent. (#7329) - - 34.0.4 Fix inconsistencies in how the values from the model are passed into the baked model. - This puts them in line with vanilla, as intended. - - 34.0.3 Reimplemented drawHoveringText (#7268) - - 34.0.2 New BiomeLoadingEvent that allows modders to edit biomes as they are being deserialized. - - 34.0.1 Bump MCP version for lambda issue. - - 34.0.0 1.16.3 Update - Also included a bunch of warning cleanups. - -33.0 -==== - - 33.0.59 Fix tile entities being replaced when not needed. (#7318) - - 33.0.58 Fix exception when getting rendering box for tile entities with no collision boxes. (#7301) - - 33.0.57 More crash reporting tweaks. Don't crash when trying to show warnings. Also, put the exception name in the error screen on the second line! - - 33.0.56 Fix Minecart speed cap on rail being initialized to 0 (#7315) - - 33.0.55 Add support for custom tag types (#7289) - - 33.0.54 More crash report tweaks. Put a button to open the generated crash report on the error screen, tweak formatting of crash report, and add the enhanced stack trace data (transformers et al) - - 33.0.53 New hook for better custom scaffolding movement (#7261) - - 33.0.52 Fixed crash with zip paths (#7300) - - 33.0.51 Fix custom teleporters NPE (#7296) - - 33.0.50 Prevent duplicate wrapper tags from crashing (#7283) - - 33.0.49 Add partialTicks to RenderNameplateEvent (#7277) - - 33.0.48 Fixing logic in getCurrentRailPosition to correctly identify the rail… (#7276) - - 33.0.47 [1.16.x] Fixes for Bamboo, Enchantments and Conduits, small adjustments to bring some patches closer to the vanilla code. (#7239) - - 33.0.46 Bump resource pack version to 6 (#7299) - - 33.0.45 Remove dead ForgeHooks.canToolHarvestBlock function. (#7262) - - 33.0.44 Re-implement DrawHighlightEvent$HighlightEntity Firing (#7233) - - 33.0.43 Reimplement FarmlandWaterManager (#7213) - - 33.0.42 Add dataprovider for Global Loot Modifiers (#6960) - - 33.0.41 Fix crash when dumping crash report for an exception that has a null cause (#7308) - - 33.0.40 Tweak crash report dump to visit all the causes up to the top. - - 33.0.39 Fix ExplodedDirectoryLocator visiting non-existent paths. Closes #7203 - Also, bump modlauncher to 7.0.1 to fix resources. - - 33.0.38 Fix some potential issues in crash dumping during mod loading - - 33.0.37 Park the polling thread for a bit, if we're not the one driving the task list forwards. This allows for the actual driver to work on low cpu count machines. - - 33.0.36 Use new enumeration mechanism in ModLauncher, to allow getResources to work. This enables serviceloader-in-mods, and other stuff that might need to visit multiple mod jars. Also, tweaked the visitor code slightly, may result in a trivial performance change. Closing #7302 as it's not really relevant any more. - - 33.0.35 Fix compiler issue in eclipse properly - - 33.0.34 Fix crash caused by previous commit (#7298) - - 33.0.33 Dirty casting hacks to fix eclipse compiler inference issue. I'm sorry cpw. - - 33.0.32 Fix broken ExistingFileHelper import - Add licenses to some new files - - 33.0.31 Add validation via resources for tag providers (#7271) - BREAKING CHANGE: Moved ExistingFileHelper to common package - Remove various workarounds from forge tag providers - - 33.0.30 Move the "modloading" thread activity onto _our_ worker pool. It turns out that the vanilla worker pool can deadlock during stitching if it's insufficiently large, if modloader "waitForTransition" is also a worker member of that pool. - Closes #7293 (to reproduce issue easily, modify Util.func_240979_a_ and change the values in the MathHelper.clamp call). I've verified that 3 and below for "max" cause the problem. (I didn't test a whole range of values, just sufficient to reproduce problem and verify fix). Note that setting it to zero (and using the "direct executor" that's inaccessible in normal operation) works as well with this fix. - - 33.0.29 Fix missed debugging code. Read the config from the config. - - 33.0.28 Fix up slight registry change and other 1.16.2 stuffs. - - 33.0.27 Merge branch '1.16.1' into 1.16.x - # Conflicts: - # patches/minecraft/net/minecraft/client/Minecraft.java.patch - # patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch - # src/main/java/net/minecraftforge/fml/client/ClientModLoader.java - # src/main/java/net/minecraftforge/registries/GameData.java - - 33.0.26 Fix up all the things. Removed SidedProvider because it served no real purpose anymore. - - 33.0.25 Merge branch '1.16.x' into 1.16.1 - # Conflicts: - # src/main/java/net/minecraftforge/fml/ModList.java - # src/main/java/net/minecraftforge/fml/client/ClientModLoader.java - - 33.0.24 Redo event dispatch, removes a bunch of nonsense, and tries to integrate with the vanilla CF system where possible - - 33.0.23 Add particle culling (#6981) - - 33.0.22 Wrap vanilla's 'default' biome registry in ForgeRegistry. - This should allow registering mod dimensions like in 1.16.1, while the data driven system is fleshed out. - - 33.0.21 Clarify in the LazyOptional which methods carry the lazyness over to the returned value and which don't. (#6750) - For consistency, this meant making a few changes: - - Renamed the existing lazy mapping method to lazyMap, to indicate that it doesn't run the mapping immediately. - - Added a new implementation of map(), which returns Optional, and resolves the value in the process. - - Changed filter() to return Optional, since there's no way to filter lazily. - - Added a new method resolve(), which helps convert the custom LazyOptional class into a standard Optional, for use - with library methods that expect Optional. - * Update License headers. - - 33.0.20 Add user-friendly exceptions when config loading fails (#7214) - - 33.0.19 Replace EntityHeight event with EntitySize event (#6858) - - 33.0.18 [1.16] ForgeEventFactory#canCreateFluidSource reintroduced (#7181) - - 33.0.17 Cleanup and expand Forge tags (#7004) - - 33.0.16 Fix modproperties property in mods.toml causing exception (#7192) - - 33.0.15 Log info about server list warning (#7209) - Make it easier to figure out what mods are missing or have to be marked as client/server side only. - - 33.0.14 Fix ItemStack#isDamageable is not calling Item#isDamagable (#7221) - - 33.0.13 Improve performance and cleanup code for DelegatingResourcePack (#7228) - - 33.0.12 Fix small logging issues with loading pack.png for mods (#7265) - - 33.0.11 Fix config iteration order (#7230) - - 33.0.10 Cleanup Forge's build script, fix some unneeded patches. - Add checkExcscheckAll tasks. - - 33.0.9 Readding DifficultyChangeEvent hooks (#7240) - - 33.0.8 Improve startup time by caching the manifest data for mod jars (#7256) - - 33.0.7 Removed HarvestDropsEvent (#7193) - - 33.0.6 Remove forge optional tags in favor of Vanilla's new system. (#7246) - - 33.0.5 New method for creating modded tag references, fix connecting to vanilla servers. - - 33.0.4 Fix creating nether portals. - - 33.0.3 Print mod file name on InvalidModFileException (#7241) - - 33.0.2 Updated MDK and README for 1.16.2 (#7243) - - 33.0.1 Fix server connection, misapplied patch (#7245) - - 33.0.0 Initial 1.16.2 Update - -32.0 -==== - - 32.0.110 Fix ModelRegistryEvent firing every time resources reload instead of just once. - - 32.0.109 Move ModelRegistryEvent invocation to when the model loading is about to start. - Freeze the ModelLoaderRegistry right after this event happens, just before model loading actually begins. - This means ModelRegistryEvent is now the correct place to register loaders, as it was intended. - This is a slight breaking change, but any mod that used FMLClientSetupEvent before will need to be updated regardless due to the existing race condition. - - 32.0.108 Fix wrong BlockState param passed into canSustainPlant from FarmlandBlock (#7212) - - 32.0.107 Add harvest levels for hoes and new 1.16 blocks for pickaxes Fixes #7187 (#7189) - - 32.0.106 Fix debug world not generating modded blocks (#6926) - - 32.0.105 New IForgeBlock#getToolModifiedState hook allow better control over tools interacting with blocks. (#7176) - - 32.0.104 Added new hook to allow Biomes to control their Edge biomes (#7000) - - 32.0.103 Add support for custom elytra (#7202) - - 32.0.102 Re-introduce "outdated" notification on Mods button in main menu (#7123) - - 32.0.101 Fix RenderTickEvent using wrong partial ticks value when game is paused. Fixes #6991 (#7208) - - 32.0.100 Implement forge IBakedModel methods in vanilla wrapper models - - 32.0.99 Fix another case of swallowed errors not shutting down mods. - - 32.0.98 Revert "Properly shutdown FMLModContainer's event bus when an error in a lifecycle event is detected." - This reverts commit 30bad1e2 - - 32.0.97 Revert "Shut down all other mod handlers if the loading cycle errors. This prevents other mods from throwing errors and being blamed for initial cause. This is a temporary hack until cpw re-writes the mod event dispatcher." - This reverts commit 7592bbe8 - - 32.0.96 Shut down all other mod handlers if the loading cycle errors. - This prevents other mods from throwing errors and being blamed for initial cause. - This is a temporary hack until cpw re-writes the mod event dispatcher. - - 32.0.95 Properly shutdown FMLModContainer's event bus when an error in a lifecycle event is detected. - - 32.0.94 Enable EventBus type check during ForgeDev, and add IModBusEvent marker to ModelRegistryEvent. - - 32.0.93 Make license toml entry optional during 1.16.1 - There are to many existing mods to make this required. - Yes, we are technically before a RB and can do breaking changes. However this is too large. - - 32.0.92 Missed one event. NewRegistry needs the marker. - - 32.0.91 Update MDK license to default to All rights reserved, and offer a link to chooseyourlicense.com as a place to research appropriate licenses. - Note: the license field _is_ backwards compatible and will simply be ignored on older forge versions. - - 32.0.90 Update coremods and spi, include mandatory license field in metadata. Added at top level of mods.toml file. - - 32.0.89 Update modlauncher, eventbus, accesstransformers and more to use a newer mechanism for generating ASM. - Introduced IModBusEvent as a marker interface for events on the ModBus. Expect exceptions if you use - the modbus for events not listened there. - - 32.0.88 Fix rail 180 rotations (#7177) - - 32.0.87 Fire AnimalTameEvent for cats (#7172) Closes #7171 - - 32.0.86 Fix Biome generation error. - - 32.0.85 Fix SleepingTimeCheckEvent not being fired in initial sleep test. (#7005) - - 32.0.84 Fix ClimberPathNavigator spinning when width is small. Closes #6993 (#6997) - - 32.0.83 Re-added PlayerEvent.NameFormat (#6992) - - 32.0.82 Fixed modded overworld biomes not spawning [1.16.x] (#6990) - - 32.0.81 Added EntityLeaveWorldEvent (#6984) - - 32.0.80 Re-implement moddable flammabilities (#6983) - - 32.0.79 Updated versions in README and removed flocker.tv mentions (#6978) - - 32.0.78 Re-add patch for PlayerSetSpawnEvent (#6977) - - 32.0.77 Fix ChunkDataEvents using different data tags (#6961) Fixes #6957 - - 32.0.76 Post SoundLoadEvent on mod bus instead of forge bus (#6955) - - 32.0.75 Remove startupquery. Currently wasn't functional, and 1.16 has out of band state loading in all cases, so the complex functionality there is no longer needed. Going to research using the Lifecycle indicator from DFU as a proxy/replacement. Probably with some codec FUN. - - 32.0.74 Run Forge's data generators to sync 1.16 vanilla changes. - - 32.0.73 Don't show the early launcher GUI when running data. It's not needed and prevents use on automated builds. - Need to investigate why a bunch of tags seem to be being blown away by rerunning on forge. - - 32.0.72 Add mixin - - 32.0.71 Load Modded Datapacks in DatapackScreen, before world creation (#6913) - - 32.0.70 Fix inconsistencies with model/blockstate datagen - - 32.0.69 Filter duplicate mod files from mod file scan data (#6855) - - 32.0.68 Fixed Forge commands. Closes #6973 Closes #6974 Closes #6976 - - 32.0.67 Added an event for registering commands. closes #6968 (#6969) - - 32.0.66 Make all functions in Style common. (#6931) - - 32.0.65 Mark Raid.WaveMembers as an extensible enum. (#6878) - - 32.0.64 Fix checkPatches task. Closes #6956 - Fix patched in method using srg name. Closes #6965 - Fix capabilities not being collected for ClientWorld. Closes #6966 - Fix TagEmptyCondition using client side copy of tags instead of server. Closes #6949 - Fix ExtendedButton using narrator text. Closes #6958, Closes #6959 - Fix misaligned patch in RepairContainer. Closes #6950, Closes #6953 - Fix LivingJumpEvent not being fired for players jumping horses. Closes #6929 - Remove extra getToughness method in ArmorItem. Closes #6970 - Remove GetCollisionBoxesEvent. Closes #6921 - - 32.0.63 Fix race condition with DeferredRegister for custom registries (#6951) - - 32.0.62 Remove hooks into beacon base/payments. Vanilla uses tags now for extensibility. (#6948) - - 32.0.61 Expose the DataPackRegistries instance to the AddReloadListenerEvent (#6933) - - 32.0.60 Fix canRepair not being set true as default (#6936) - Closes #6934 and #6935 - - 32.0.59 Fix misaligned patch causing LivingEquipmentChangeEvent to never be posted. - - 32.0.58 Fix particles sometimes "losing" the lightmap and drawing fullbright. - - 32.0.57 Add simple patch checker and cleanup patches (#6851) - * Add simple patch checker and cleanup patches - * Address comments - * move task implementation - * genPatches is now finalized by checkPatches - * the S2S artifacts are automatically removed - * added class and method access checking - - 32.0.56 Fix the modifier combined name for keybinds displaying two pluses outside of forgedev #6901 (#6902) - - 32.0.55 Fix harvest level and tool type not actually getting set #6906 (#6922) - - 32.0.54 Reimplement ITeleporter Patches (#6886) - - 32.0.53 Add function to add items with the same behavior as the pumpkin for enderman (#6890) - - 32.0.52 Custom Item integration with Piglins (#6914) - - 32.0.51 Some dead code cleanup, and re-implement some bed hooks. (#6903) - - 32.0.50 Fix missing null checks in ForgeIngameGui (#6907) - - 32.0.49 Fix swap offhand keybind not working in GUIs (#6920) - - 32.0.48 New AddReloadListenerEvent that gathers server side data reload handlers. (#6849) - - 32.0.47 Attempt to use a more compatible method to initialize stencil support. - In case the separate attachments don't work for everyone, there's a new setting to choose the combined attachment. - - 32.0.46 Fix multi-layer item rendering. - - 32.0.45 Update copyright year to 2020. - - 32.0.44 Model system improvements: - - Port some things I did in 1.14 which I couldn't do in 1.15 due to breaking changes. - - Fix multi-layer block models not working (1.16 RenderType doesn't override toString the same way anymore) - - Implement multi-layer item rendering. - - Improve CompositeModel submodel data passing. - - 32.0.43 Pass matrixstack in tooltip render events (#6885) - - 32.0.42 Include model data in getQuads call (#6884) - The model data wasn't included when getting quads from specific sides, but was when getting quads for side = null. - - 32.0.41 Fix improper handling of baked lighting in forge light pipeline - Closes #6812 - - 32.0.40 Fix FMLServerAboutToStartEvent being fired too late on the integrated server https://github.com/MinecraftForge/MinecraftForge/issues/6859 - - 32.0.39 Fix miss-aligned patch ItemEntity (#6895) - - 32.0.38 Add hoe tool type (#6872) - - 32.0.37 Fix loading screen color and text (#6824) - - 32.0.36 Allow any armor to have custom knockback resistance (#6877) - - 32.0.35 Add senderUUID to ClientChatReceivedEvent (#6881) - - 32.0.34 Re-write checkATs function and automate making Items/Blocks public. - - 32.0.33 Reorganize modloading on the dediserver. This removes the DedicatedServer parameter from the FMLDedicatedServerSetupEvent. - Code for customizing the server instance should be moved to the ServerAboutToStartEvent or similar, where the server instance - is available. - This reorganization means that mods will load fully before the server is even constructed, or the server properties loaded. We also move the EULA right to the front so we don't have to wait for bootstrap. - This should fix the problems with mods which customize world data and other things. - - 32.0.32 Fix datagen resolving tags and exploding. (#6865) - - 32.0.31 Fix Language.javaLocale parsing (#6862) - - 32.0.30 Fix IItemHandler wrappers for chests not updating both chests (#6875) - - 32.0.29 Fix missed patch in PlayerList and EntitySelectioonContext. Closes #6846 Closes #6850 - - 32.0.28 Make Type classes safe to use in concurrent loading (#6825) - - 32.0.27 Fix access levels being hardcoded to private via patch overriding AT entry (#6848) - - 32.0.26 Fix tag related issues when connecting to a vanilla server. - - 32.0.25 Fix Forge's internal handler being registered in wrong place. - Fix double call to loader end. - - 32.0.24 Add a model loader that lets mods specify different models for different perspectives. - Allow custom models to reference vanilla item models as child models. - - 32.0.23 Fix swim speed being incorrect. Closes #6845 - Fix BreakSpeedEvent having null position. Closes #6844 - Add MatrixStack to BackgroundDrawnEvent. Closes #6843 - Fix some patches that should of been ATs. Closes #6839 - Add getter to ServerPlayer to access client's language calue if sent. Closes #6829 - Some patch cleanup. - - 32.0.22 Fix blocks being harvested with incorrect tools. - - 32.0.21 fix misapplied patch - also sneak in an import patch removal - - 32.0.20 Make installer use MCPConfig version to identify MC assets. - - 32.0.19 Tweak the server startup a bit, make sure methods that can't work because they run before a server exists explode saying so. - Also fix other launch profiles. - - 32.0.18 Fix dedicated server loading by constructing mods before data packs are created. - - 32.0.17 Fix create method. - Fix test mods not loading correctly. - - 32.0.16 Reintroduce missed patch in EntityClassification. - - 32.0.15 Include a getter for the matrix stack in OverlayEvent (#6834) - - 32.0.14 Fix block render types not being properly applied to item entities (#6832) - - 32.0.13 [1.16.x] Allow GlobalEntityTypeAttributes' EntityType -> AttributeModifierMap to be added to (#6822) - * Make GlobalEntityTypeAttributes map able to be added to - * Split get patch into two lines - * Favor Forge's map over vanilla - - 32.0.12 Fixed creative screen arrows (#6827) - - 32.0.11 Added call to method for tooltip with FontRenderer (#6831) - - 32.0.10 Retarget Block.Properties patch to the new AbstractBlock, reintroduce harvestLevel and harvestTool fields (#6819) - * Retarget Block.Properties patch to the new AbstractBlock, reintroduces the harvestLevel and harvestTool fields. - * Slight adjustment to fix the lootTableSupplier. - - 32.0.9 Fixed sneaking while swimming (#6817) - - 32.0.8 Fixed tooltip rendering issues (#6815) - - 32.0.7 Fixed villager trades having non-applicable enchants - Also added an AT at lex's request - - 32.0.6 Updated MDK mods.toml versions (#6808) - - 32.0.5 Add missing patch to ScreenShotHelper (#6809) - Adds the missed patch back - - 32.0.4 Fix block drops (#6810) - - 32.0.3 Fix locate command (#6811) - - 32.0.2 Rework BlockSnapshot and fix client notifications. Closes #6807 - - 32.0.1 Bump MCPConfig version. - - 32.0.0 Update to 1.16.1 and fix a couple more patch problems - -31.2 -==== - - 31.2.33 Fix some patching derps from 1.15 merge - - 31.2.32 Clean up legacy cruft - - 31.2.31 Final patching - - 31.2.30 Compiling fixes - IN GAME! - - 31.2.29 Patching and updates - - 31.2.28 Setup and import of 1.16 YEET - - 31.2.27 Allow RayTraceContext to be constructed with a null entity. (#6708) - - 31.2.26 Replace explicit shears reference in vanilla loot tables with tag for modded shears. (#6765) - - 31.2.25 Fix cache file sorting issue on linux (#6793) - - 31.2.24 Fire jump event for horses when ridden (#6802) - - 31.2.23 Modify how modfiles load slightly, for better decoupling. - - 31.2.22 Throw an exception from DeferredRegister when trying to register entries after registry event has fired (#6789) - - 31.2.21 Potential userProperties Fix (#6740) - - 31.2.20 Add system for dimensions to be marked for deletion (#6515) - - 31.2.19 Fix dedicated server issue in some implementations of Block.getPickBlock. Closes #6566 - - 31.2.18 Fire SpecialSpawn event for mobs spawners. Closes #6700 - - 31.2.17 Remove the yellow coloring on hover in ExtendedButton to match vanilla behavior. Closes #6714 Closes #6713 - - 31.2.16 Fix entity pathing not matching vanilla. Closes #6755 - - 31.2.15 Fixed --server argument crashing the client (#6754) - Closes #6753 - Moving the fadeOutStart setter above the callback invocation prevents re-entry into the block (which would result in an infinite loop and a StackOverflowException) if the callback causes a render tick (which creating a new ConnectionScreen does). - - 31.2.14 Fixed ItemStack comparison ignoring capabilities when stack nbt is null. (#6764) - - 31.2.13 Supply matrixstack to IRenderHandler where possible. Closes #6439 (#6537) - - 31.2.12 Fix StartupQuery not working more than once on the client (#6699) - - 31.2.11 Added ProjectileImpactEvent.FireworkRocket (#6758) - - 31.2.10 Add custom registry type support to DeferredRegister. (#6742) - It's still a hard dependency because it requires a class reference. - But there is not a sane way to test registry types without a class reference. - - 31.2.9 Fix "overlayMessage" rendering in ForgeIngameGui being different than vanilla (#6748) - - 31.2.8 Implement loader for ItemLayerModel. - Add support for specifying which layers are fullbright. - Fix improper generation of model edge. - Thanks to iChun and KnightMiner for the fix suggestions. - - 31.2.7 Remove dead test classes. - - 31.2.6 Add --flat argument to data generators to not create data in mod specific directores. - Useful For Forge's test mods mainly. - Standardized data gen cache file's folder separators. - Added ItemModelProvider to BlockStateProvider for cleaner datagen code. - Added .gitattributes to fix datagen json's line endings correct on windows. - - 31.2.5 Improve the DistExecutor API and introduce some "almost completely" safe mechanisms to handle sided lambdas. - In general, use sided lambdas safely by embedding them in a separately loaded class. There's a whole twitch stream - dedicated to investigating this problem. See link in DistExecutor if you're interested. - - 31.2.4 Fix typo in new registry fields' names - Note: this is technically a breaking change. If you for some reason added code referencing these two fields in the last few hours, sorry. - - 31.2.3 Fix server startup query info not including new text - - 31.2.2 Improve look of notification GUI, improve StartupQuery API - - 31.2.1 Add forge registries for applicable new registry types - Expose constructors for all forge registry entries - Also, remove deprecation on ItemCameraTransforms/TransformType - - 31.2.0 Bump version for new RB. - -31.1 -==== - - 31.1.99 Update MCP Mappings. - - 31.1.98 fix test mod and add warning comment to framebuffer (#6698) - - 31.1.97 Fix FireBlock using flammability instead of spread speed when looking for places to spread. Closes #6646 - - 31.1.96 Fix incorrect argument passed in RenderPipeline potentially causing crash. #6677 - - 31.1.95 Re-added patch to enable stencil buffer in net.minecraft.client.shader.Framebuffer - Add test for the stencil buffer feature. Only tests that it doesn't crash when enabling, for now. - giga - - 31.1.94 Allow Music Discs to be created with SoundEvent delegates. (#6523) - - 31.1.93 Use IProperty#getName when generating blockstate jsons (#6582) - Close #6520 - - 31.1.92 Model system fixes: - - Add "origin" key to determine what origin to use. This will default to the existing (broken) behaviour to avoid breaking changes. - - Fix interaction of transforms with variant transforms (transformation ordering). - - Fix OBJ loader ignoring "diffuseLighting" attribute from the json. - This attribute will continue not being used if "ambientToFullbright" is on (default) to avoid breaking changes. - - 31.1.91 Fixed typo in registry alias writing causing infinite loop. Closes #6689 - - 31.1.90 Fixed Partivle.onGround not updating correctly due to decompile error. Closes #6595 - - 31.1.89 Remove duplicate post of ChunkEvent.Load. (#6697) - - 31.1.88 Fix LevelChange event not firing after enchanting (#6693) - - 31.1.87 Fix server config directory remaining locked when integrated server is shut down. (#6644) - - 31.1.86 Fix exclusion of coremods not filtering correctly when the mods directory is a symbolic link. (#6600) - - 31.1.85 Allow Bees to use custom hives. (#6656) - - 31.1.84 Fixed tile entities persisting when switching between states that don't have TEs without changing the block. (#6674) - - 31.1.83 Fixed CropGrowEvents not firing for Bamboo (#6680) - - 31.1.82 Fix vanilla screens escape key not matching done button behavior (#6682) - - 31.1.81 Fixed FluidTank.drain calling onContentsChanged when simulating (#6684) - - 31.1.80 Fix infinite loading screen when resources error. Closes #6592 & #6593 - - 31.1.79 Fix IForgeBlock.removedByPlayer not firing on the client. (#6638) - - 31.1.78 Update to newer eventbus, with typetools compatibility with jvms up to j14. No guarantees on actual game compatibility however. - - 31.1.77 Fixed informational /forge commands being repeated to all ops when logging is enabled. Closes #6330 - - 31.1.76 Fix ModListScreen escape key not matching done button behavior. Closes #6672 - - 31.1.75 Patch the bucket logic to not hardcode some checks to WATER. Fixes not being able to place custom fluids into modded fluid-loggable blocks that accept fluids other than water. - - 31.1.74 Avoid discarding the bottom 4 bits of the lightmap coords. It turns out vanilla relies on those bits. Fixes some blocks being darker than they should be in certain circumstances. - - 31.1.73 Fix issue with providing a null ItemStack to onPlayerDestroyItem (#6633) - - 31.1.72 Allow overriding of tool level requirements when harvesting a block, via the HarvestCheck event. (#6632) - - 31.1.71 Fixed Hoppers not inserting fully into custom contains with slots that can hold more then max stack (#6631) - - 31.1.70 Fixed ChunkDataEvent.Save being fired with a null world if chunk isn't fully generated when unloaded. (#6628) - - 31.1.69 Fix vanilla loot table resource leak. (#6622) - - 31.1.68 Change recipe condition log level to debug. (#6621) - - 31.1.67 Fix milk buckets removing potion effects without filters. (#6609) - - 31.1.66 Added missing localization for swim speed, and reach distance attributes (#6585) - - 31.1.65 Allow colors of tooltip to be specified in GuiUtils.drawHoveringText tooltip methods (#6579) - - 31.1.64 Fix config comments referencing disallowed enum values. (#6542) - - 31.1.63 Remove redundant call to modifyLoot. Closes #6657 - - 31.1.62 Fix various issues with the loading screen and datagen - Fix NPE on datagen startup - Fix early loading GUI hanging and never terminating after datagen - Add loading GUI messages for datagen - - 31.1.61 Fix BackgroundScanHandler crashing on servers (#6660) - - 31.1.60 Remove silly icon override. Squirrels are fun y'all.. - - 31.1.59 Rename window icon image to avoid conflict, fix not using vanilla icon - - 31.1.58 Fix VariantList calling deprecated bake method - - 31.1.57 Fix resource packs not being sorted properly. Closes #6287 - - 31.1.56 Fix Automatic Event Subscriber not detecting mod id defaults, and fix test mods. - - 31.1.55 Use forge logo as short term window Icon, fix Buffer cast problems for new JDK stupid. - - 31.1.54 Handle message display a bit better, try to make the UI tick a bit better.. Still a problem with - a modelbake right at the end, happening on the window flip. - - 31.1.53 Move ClientVisualization to secondary thread - - 31.1.52 move handOffWindow down near start() - - 31.1.51 merge early startup into main window if used. It seems to work well.. Also ticks window on main thread, so mac compatible now. - - 31.1.50 Update jenkinsfile and gradle for new versions of things.. - - 31.1.49 Fix potential NPEs in RegistryObject.orElseThrow/isPresent/ifPresent Closes #6647 - - 31.1.48 Add tickRate setter to the ForgeFlowingFluid Properties builder. - - 31.1.47 Fix recursion mess in PlayerAdvancement loading, by using an alternative based on a toposorted list of all advancements. - It seems to be fully equivalent in testing, but there may be corner cases, so there is a config to disable, though disabling - may break servers, especially those chunkloading fake players. - - 31.1.46 Revert defualt jvm args. - - 31.1.45 Fixed dev time compilation using J9+ producing incorrect bytecode. - - 31.1.44 Add "type" field to global loot modifier jsons. (#6554) - * Add "type" field to global loot modifier jsons and fix tests. - To avoid binary breaking, "type" defaults to be the same as the filename. - * Fix license headers. - - 31.1.43 Fix child annotations not inheriting member name, cleanup - - 31.1.42 Fix element type of scanned child annotations - - 31.1.41 Fixed PlantType not extending IExtensibleEnum, Closes #6286 - - 31.1.40 Added hook to allow modded Hill Biomes (#6571) - - 31.1.39 Improve performance of VertexBufferConsumer by inlining element locs - - 31.1.38 Revive forge lighting pipeline, disabled by default for now - Remove a lot of light value convolution by using 0..1 for nearly everything - Fix a lot of TODOs that are needed for the lighting pipeline to function - Potential fix for #6425 - - 31.1.37 Fix Tag serializing empty optionals, improve RegistryObject error msg - - 31.1.36 Remove SideOnly from WoodType methods - - 31.1.35 Cleanup IForgeTagBuilder code style. - - 31.1.34 Move global loot test data files out of generated folder - - 31.1.33 Add support for optional tag values to Tag.Builder - Add optional tag values to data gen test - Fix data gen test not running by correcting gui_light value - - 31.1.32 Fix a few issues with BufferBuilder - Fix vanilla bug that caused the byte order of the buffer from getNextBuffer to be incorrect - Fix missing modification to nextElementBytes in putBulkData - - 31.1.31 Deprecate ModelBuilder#gui3d, add ModelBuilder#guiLight - - 31.1.30 Add renderer to RenderNameplateEvent (#6562) - - 31.1.29 Defer writing the server.properties file until after mods have loaded to prevent config loss (#6545) - - 31.1.28 Fix ownership leak in ItemStackHandler (#6580) - - Triggered by invoking ItemStackHandler#extractItem with `simulate=true` - - 31.1.27 Fix cycle happening in noteblock even though we're setting the new value as well.. - - 31.1.26 Add a progress message for atlas textures. Fills a big time gap on bigger packs. - - 31.1.25 Remove ArrowEntity patch, vanilla fixed MC-107941 - - 31.1.24 Fix Forge's tps and gen commands. - - 31.1.23 Update gradle wrapper - Update MCPConfig to version that bypasses javac compiler bugs - Fix Global loot test compile errors. - - 31.1.22 Fix loading text not rendering after mojang logo appears - - 31.1.21 Fix loading GUI corrupting matrix state - - 31.1.20 Somewhat restore the loading screen overlay. It seems that once the mojang logo and progress bar - start running, I can no longer write to the window, even though I am obviously trying to.. - - 31.1.19 Add projection matrix to RenderWorldLastEvent (#6536) - - 31.1.18 Global Loot Functions (#6401) - - 31.1.17 Updated ForgeDev MCP Mapping Version (#6532) - - 31.1.16 Fix up alarming security crisis with network handling that allowed for wrong code execution on the server, resulting in CRASHED SERVERS. AWFUL stuff. - Also fixed a silly log message from the login handler. - This change introduces a mechanism to direct certain packets to only process on one side or another. Invalid sidedness will result in the connection being terminated. - - 31.1.15 Make TransformationHelper.slerp for quaternions public (#6528) - - 31.1.14 Fixed Conduit and Beacon Activation on Vanilla Servers (#6438) - - 31.1.13 Fix ITeleporter being ignored when teleporting from the end to the overworld (#6505) - * Fix custom teleporters triggering end credits when returning from the end - * Fix setdimension command ignoring position - - 31.1.12 Fix missing call to itemstack TER (#6445) - - 31.1.11 Fix missed modeldata passing in BlockModelRenderer (#6442) - - 31.1.10 Fix NPE when players rejoin the server in a dimension that was deleted (#6511) - - 31.1.9 Fix a wrong RenderState name MC-167447 (#6501) - - 31.1.8 Fix client not informing server when it attempts to interact with things, and is canceled by a client side handler. - - 31.1.7 Fix wrong arguments passed to ForgeHooksClient.renderSpecificFirstPersonHand() (#6496) - - 31.1.6 Fixed ChunkWatchEvent.(Un)Watch not firing correctly (#6453) - - 31.1.5 Update version and support data on README. (#6429) - - 31.1.4 Fixed Food not using effect suppliers, to better support delayed initialization and registry replacements. (#6411) - - 31.1.3 Fixed displaying item names when only more sensitive version changes (#6402) - - 31.1.2 Fix gui_light for forge's item parent models. - - 31.1.1 Allows custom blocks to define if they should use the fluid overlay instead of the flowing texture when in a fluid (#6493) - - 31.1.0 Fix a small patch misalignment. - -31.0 -==== - - 31.0.19 Add FluidStack support to the Forge packet buffer. (#6353) (#6485) - - 31.0.18 Make Minecarts work with modded powered/activator rails. (#6486) - Re-adds functionality for rails to have different maximum speeds. - - 31.0.17 Revert game data to frozen on disconnect from a remote server or when terminating a local server. Closes #6487 (#6497) - - 31.0.16 Remove unintended changes. - - 31.0.15 Implement fluid overlay texture rendering for custom fluids. - - 31.0.14 Fixed Attacks/Punches not Registering (#6481) - Replaced incorrect magic number with constant - - 31.0.13 Clean up a bunch of render events (#6444) - * Delete RenderHandEvent as RenderSpecificHandEvent can do everything it does and more. Rename RenderSpecificHandEvent to RenderHandEvent as it's now the only hand rendering event. - * Pass MatrixStack and IRenderTypeBuffer into the event whenever they are available. If they're available, that means we're in a batching environment and the modder should not be using the tessellator or other buffers on their own, or they risk "Already building" crashes. - - 31.0.12 Fix NullPointerException on java 8u242 in dev environment. (#6473) - Java 8u242 no longer re-initializes internal sys_paths and usr_paths fields in loadLibrary when they are null, so the value can't be set to null. - - 31.0.11 Fix incorrectly ported patch for restoreBlurMipmap (#6450) - - 31.0.10 Fix RightClickBlock code differences between client and server implementation (#6451) - - 31.0.9 Defer material getting for ChestTileEntityRenderer into seperate function (#6465) - - 31.0.8 Small Forge config fixes (#6466) - - 31.0.7 Fix ChunkDataEvent.Load not firing, it now fires in the aync thread. Be careful. Closes #6471 - - 31.0.6 Fix incorrect keybinding modifiers patch. Closes #6478 - - 31.0.5 Fix PlayerChangedDimensionEvent using incorrect from dimension argument in ServerPlayerEntity.teleport. Closes #6457 - - 31.0.4 Fix default mod resources loosing it's sort order. - - 31.0.3 Fix WakeupEvent patch misalign. Closes #6474 - - 31.0.2 [1.15] Reimplemented the ITeleporter interface (#6404) - - 31.0.1 Hook "gui_light" value from the model into the IBakedModel implementations. - Apply some of the suggestions from the 1.14 models PR. - - 31.0.0 1.15.2 Initial Update - -30.0 -==== - - 30.0.51 Cleanup fml packages removing old deprecated classes related to GUIs/Configs and fix HoverChecker (#6437) - Fixed ModListWidget name to avoid confusion and collision. - Delete CheckBox, as vanilla has it's own CheckBox now which looks much better - Rename ModConfigEvent.ConfigReloading to ModConfigEvent.Reloading - - 30.0.50 Fixed parameter name issue in ISTER rename. #6461 (#6468) - - 30.0.49 Fix default widget foreground color. - - 30.0.48 Updated method names referencing ItemStackTileEntityRenderer (#6461) - - 30.0.47 Fix Widget Foreground Color not allowing pure black (#6460) - - 30.0.46 Fixed rounding issue with entity navigation fix (#6455) (#6456) - - 30.0.45 Fixed RenderTypeLookup loosing mappings for registry replacements. (#6452) - - 30.0.44 Use extended version of getLightValue in all places (#6433) - - 30.0.43 [1.15.x] Added entity nameplate rendering event hook (#6416) - - 30.0.42 Remove emissive items hook, add small utility for bakedquad lighting - - 30.0.41 Fix breaking overlay weirdness. applyBakedNormals was not transforming the baked normals when applying them. Fixes #6432 - - 30.0.40 [1.15] Add new InputEvent.ClickInputEvent, addresses #5802 (#6047) - - 30.0.39 Fix dark spots in fullbright quad rendering. - Fix multi-layer model not declaring dependency on the particle texture. - Fix mistake in 2c054fca which I didn't intend to push when I did. - - 30.0.38 Fix multi-layer model loader to actually work in a sane way. No more "base" model involved, and now transforms and overrides work as expected. - - 30.0.37 Attempt to fix fullbright lighting. - Fix lightmap value calculation. - - 30.0.36 Add constructor for FishBucketItem that accepts suppliers - - 30.0.35 Fix QuadTransformer normal processing. - - 30.0.34 Fix validation in RotationBuilder#angle (fixes #6323) (#6408) - - 30.0.33 Add support for custom nether portal frame blocks (#6389) - - 30.0.32 InputEvent.RawMouseEvent fix (#6395) - - 30.0.31 Fixed Big Mushrooms not generating (#6390) - Removed vanilla negation from Forge logic that negated the vanilla logic it was replacing - also ran datagen to update the dirt tag to reflect changes that were previously made in the datagen code - - 30.0.30 Fix dyes tag containing dye items instead of tags - Update generated data - - 30.0.29 [1.15.x] Remove unused parameter from ElementBuilder#rotation (fixes #6321) (#6407) - - 30.0.28 Refactor BlockStateProvider to encapsulate a BlockModelProvider - Make most protected methods of data generators public - - 30.0.27 Fix crash when building BakedQuadBuilder - Add javadocs and move sprite to constructor where possible - - 30.0.26 Fix incorrect check for missing texture in DynamicBucketModel - - 30.0.25 Remove custom vertex format from BakedQuad - - 30.0.24 A few more binary-breaking changes, before it's too late: - - Move CompositeModel out of its package. - - Move a few inner classes from the OBJ loader. - - Rename the bucket model and fluid model classes to match the naming convention. - - Remove BiomeEvent.* and WorldTypeEvent.InitBiomeGens as they are not currently implemented and they haven't been in the previous version either. - - 30.0.23 Cherry-pick ca819e09 from the 1.14.x branch. Removes a patch from NativeImage which was invalid. - - 30.0.22 Fix the particle renderer not setting GL state between each type. MC-168672 - - 30.0.21 Fix CompositeModel not respecting "display" transforms. - Remove leftovers from discarded feature. - - 30.0.20 Allow model jsons to override the material library used by OBJ models. - Fix model loader test mod resources. - Update licenses. - - 30.0.19 Apply baked-in lightmap data to rendering - - Fix ForgeHooksClient.fillNormal injecting data to lightmap - - Fix OBJModel not filling lightmap data - - Fix NewModelLoaderTest blockitem not linking with block - - 30.0.18 Fix LightUtil.unpack to set the 4th component to 1 when expanding an xyz position into a 4-component vector. - Add TRSRTransformer test mod. - Fix signature of the bindTileEntityRenderer method, to account for covariance. - - 30.0.17 More model/rendering fixes: - - Breaking change: Change ClientRegistry.bindTileEntityRenderer to a factory, so mods don't have to manually specify the dispatcher. - - Breaking change: Delete obsolete SimpleModelState (the class was duplicated by mistake, see SimpleModelTransform) and ICustomModelState (part of the old loader API). - - Breaking change: Rename getTextureDependencies to getTextures, for consistency. - - Reinstate the getRenderLayer method, fixed appropriately to return the new RenderType value. - - Fix OBJ loader applying the model transform in the wrong reference frame. - - Fix vanilla bug in TransformationMatrix#func_227986_a_ - - Fix QuadTransformer logic. - - Added new method to IModelConfiguration to retrieve the owner IUnbakedModel, needed in order to construct ItemOverrideLists when baking custom models. - - Reintroduce multi-layer model through the new model loader system. - - 30.0.16 New batch of Model/rendering fixes: - - PerspectiveMapWrapper did not pass IModelData through to the wrapped model. - - CompositeModel did not store the returned textures from getTextureDependencies. - - VertexFormat used COLOR instead of UV to detect UV presence. - - QuadTransformer would crash due to index out of bounds. - - Small cleanup of TransformationHelper - - 30.0.15 Fix obj models having all faces in the same mesh, breaking material assignments and visibility in the process. - Reintroduce lost patch from the model loader, which would cause the custom values to be missing from generated models. - - 30.0.14 Fix diffuse lighting being baked into models, fixes dark items - - 30.0.13 Fix item quads not using the existing vertex color when applying tint colors. - - 30.0.12 Fix bucket model. Some mask textures were not added to the repository, and the bucket override generation was broken. - Fix OBJ loading crash due to a float value being parsed as int. - Fixes 6377 - - 30.0.11 Fix game crashing when modded entities are present (#6364) - - 30.0.10 Fix warning screen about missing minecraft registry entries (#6363) - - 30.0.9 Fix capabilities becoming inaccessible on returning from end (#6368) - - 30.0.8 Some code cleanup for 1.15 (#6362) - - 30.0.7 Fix MainMenuScreen patch - - 30.0.6 Mod list GUI detail pass - - Make padding consistent on all elements - - Properly horizontally center the "Search" text - - Update and resize forge/mcp logos - - Enable linear filtering on logo rendering by default - - Can be disabled with the "logoBlur" mods.toml property - - 30.0.5 Fix mod list screen (#6367) - - 30.0.4 Fix items in ground being too small, we were applying perspectives twice. - Restore forge patch and fix a tiny mistake in it. - - 30.0.3 Fix keybinds not loading/saving correctly - - 30.0.2 Remove uvlock hook, fixes broken stair/fence/etc models - - 30.0.1 Update fallback spec version - - 30.0.0 Update to 1.15.1 - -29.0 -==== - - 29.0.4 Finish converting the code from javax.vecmath to the vanilla vector classes. Forge is now vecmath-free! - - 29.0.3 Remove deprecations - - 29.0.2 Fix incorrect item lighting - - 29.0.1 Revert fluid change to use Material, fixes server crash - - 29.0.0 Update to 1.15 - Due to the massive rendering changes, certain features, such as emissive item rendering and the forge block rendering/lighting pipeline are currently disabled. - Co-authored-by: David Quintana - Co-authored-by: tterrag - Co-authored-by: Unnoen - -28.1 -==== - - 28.1.107 Added a couple of raytraceresult.getType() != MISS checks in places where they were absent. This corrects a couple of vanilla oversights and also greatly reduces Forge bus event spam for arrows and llama spit. (#6355) - - 28.1.106 Restored canRiderInteract boolean in IForgeEntity (#6347) - - 28.1.105 Split DrawBlockHighlightEvent into subevents to make usage clearer, addresses #2190 (#6269) - - 28.1.104 Allow classpath locator to discover jars via FMLModType attribute - - 28.1.103 Tidy up some output and also add libraries from the modfile detection into the transforming classloader. - - 28.1.102 Fix swapped yaw/pitch in camera setup event - - 28.1.101 Restore camera setup render event (#6335) - - 28.1.100 Fixed invocation of Vanilla spawn logic (#6334) - Forge's replacement of the Vanilla logic gets inverted, so the Vanilla logic inside that replacement must be inverted to correct for this. - (Fixes #6332) - - 28.1.99 Add item tag 'beacon_payment' for items that can activate a beacon (#6328) - - 28.1.98 Added FENCES_WOODEN and FENCE_GATES_WOODEN tags as fuels in AbstractFurnaceTileEntity (#6327) - - 28.1.97 New SleepFinishedTimeEvent allowing control of world time when waking up. (#6043) - - 28.1.96 Fix EntityLootTables not calling addTables - - 28.1.95 Make EntityLootTables reusable for modders - - 28.1.94 Fix emissive items not working - - 28.1.93 Fix the hang on startup problem when windows' broken device enumeration - causes a huge glfwInit slowdown. Log a message too when this is detected. - See https://github.com/glfw/glfw/issues/1284, https://stackoverflow.com/questions/10967795/directinput8-enumdevices-sometimes-painfully-slow, - https://discourse.libsdl.org/t/win-10-initing-joystick-causes-45s-hang-in-sdl-dinput-joystickdetect/23293 - - 28.1.92 Add hooks to make it easier to add custom TNT blocks (#6290) - - 28.1.91 Add tags supports_beacon and supports_conduit and modify Beacon and Conduit to use these tags (#6266) - - 28.1.90 Fix RawMouseEvent not being cancelable (#6310) - - 28.1.89 Fix DyeColor referencing incorrect Tag path. Fixes #6301 (#6303) - - 28.1.88 Modify StonecutterContainer to allow shift-click insertion of any block with a valid recipe rather than limiting to blocks in an Immutable List (#6268) - - 28.1.87 Fix #6305 lighting optimization using the wrong method - - 28.1.86 Add support for modded warm ocean biomes in bonemeal code - - 28.1.85 Optimize SectionLightStorage#cancelSectionUpdates loop - - 28.1.84 Add LeftClickEvent trigger to onPlayerDamageBlock (#6046) - - 28.1.83 Fixed an NPE caused by missing registries. (#6292) - Missing registries in this case being registries renamed without proper remapping or created by mods that were removed. - - 28.1.82 Made the slash optional in fml confirm/cancel. (#6282) - - 28.1.81 Fix registry snapshots not reading aliases correctly. Closes #6298 - - 28.1.80 A few tweaks to things. Make the mods command a bit better, make the - IndexedMessageCodec actually log which network channel it got back packets - on. Also, improve the custom directorymodlocator with actual custom names, - finally, allow up to 99 log rollovers, up from 7 default (this means a - repeatedly crashing server is less likely to roll out the log of the first - crash). - - 28.1.79 Fix BlockStateProvider#horizontalBlock emitting rotations >=360 - - 28.1.78 Added some more biome types to BiomeDictionary (#6250) - - 28.1.77 Replaced getTypes invocation in ensureHasTypes with a direct reference to types, preventing infinite recursion (#6284) - The direct reference is checked via ternary and reports if the set is empty, this is likely to result in log spam if modders don't assign types to their biomes - - 28.1.76 Fix lang generator escaping newlines, add lang generator test - - 28.1.75 Escape control chars and unicode when writing out lang datagen - - 28.1.74 Allow LanguageProvider helpers to accept suppliers of subtypes - - 28.1.73 Expose private helper methods in BlockLootTables to subclasses - - 28.1.72 Fixed vanilla bug in entity navigation to stop entities spinning (MC-94054) (#6091) - - 28.1.71 Reimplement usage of Item#doesSneakBypassUse() (#6114) - - 28.1.70 Handle logging during shutdown better on the server, by not - closing the logfile before the server itself has shutdown. - - 28.1.69 Fix NPE in modlauncher when there is no mods dir yet. - - 28.1.68 Fixed NPEs caused by uninitialized lists in ModDirTransformerDiscoverer (#6277) - - 28.1.67 Make Loot Table data generators more reusable for modders. - - 28.1.66 Add Blockstate and Model data providers (#6241) - - 28.1.65 Allow pack locators to load from the mods folder. - Regular mods are now automatically de-duped based on the version number - - the highest version file of a "root mod id" is now selected automatically. - - 28.1.64 Exclude Cobblestone slabs and wall recipes (#6230) - - 28.1.63 Fixed forge rendering pipeline and shape based light occulsion. (#6178) - - 28.1.62 Fix shouldCauseReequipAnimation not affecting anything (#6256) - - 28.1.61 Expose the registrationchange event to simple channel (not that anyone should care, but who knows?) - Also, Context.getNetworkManager should have been public. Derp. - - 28.1.60 Fix clientside chunk load event spam. Was an offset patch.. Also fire unload on the client side too. - - 28.1.59 Add in an event to expose the standard MC channel stuff to network - event channels that care about such things. Mods using simplechannel - don't need to care. - Also, put a sync wrapper around crashreportextender, so it doesn't - die sometimes randomly during startup. - - 28.1.58 Fix #6244 RightClickBlock#getUseBlock and #getUseItem being ignored (#6246) - - 28.1.57 Fix vanilla models with parents not loading properly from forge blockstates. - - 28.1.56 Include a profile icon for the launcher json (#6222) - - 28.1.55 Fixed loading error/warning screen not showing (#6218) - - 28.1.54 Fixed MC-162953 bounds checks in `NativeImage` (#6216) - - 28.1.53 Allow mods actually to have their own usable config gui (#6208) - - 28.1.52 Fix error logging in FMLUserdevLaunchProvider.setup (#6206) - - 28.1.51 Fix shear sound not playing (#6202) - - 28.1.50 Fix some config checks still using the old fields (#6193) - - 28.1.49 Add onCropsGrow event to KelpTopBlock (#6171) - - 28.1.48 Fix mod info panel rendering incorrectly on some systems with HiDPI displays (pesky macs) (#6170) - - 28.1.47 Re-add PlayerGiveXpEvent & PlayerChangeLevelEvent (#6165) - - 28.1.46 Skip background for hidden effect instances (#6197) - - 28.1.45 Bump modlauncher version to 4.1 - - 28.1.44 Fixed IModelData not being cleared when tile entity is removed (#6115) - - 28.1.43 Allow modded IParticleRenderTypes to be rendered (#6221) - - 28.1.42 Better sanity checks in ModelDataManager - - 28.1.41 Make customClientFactory optional again (#6191) - - 28.1.40 Fix forge blockstates and custom model loading (#6154) - * Reimplement forge blockstates variant through the use of a pseudo-model that handles the model loading, retexturing, custom data, etc. on behalf of the blockstates loader. This model gets injected into the model registry with an autogenerated unique name, to not collide with other model locations. - * Fix model loaders not being properly initialized by calling the reload method from the loader register function. In 1.12, registering a reload listener caused the listener to be called right away from the register method. This is not true anymore. - - 28.1.39 Add a super early GUI for showing pre-game launch messages from FML. NOTE: this cannot show on MAC because MAC can't handle - off-thread GUIs in any way shape or form, and we need the main thread to do real work. - Fix forge fading in wrongly. - - 28.1.38 New round of fluid system fixes: (#6175) - - Fix race condition lazy-initializing flowing fluid block data. - - Fix typo in ItemTextureQuadConverter that prevents certain animated textures from being used in the fluid bucket. - - Fix calls to onContentsChanged in FluidTank. - - Fix FluidUtil.tryEmptyContainer logic when simulating. - - Fix EmptyFluidHandler.fill returning the wrong number. - - 28.1.37 Combine all hidden mod resource packs into a single sortable pack - Fix mod datapacks sorting under vanilla - - 28.1.36 Split server and client side pack locators apart and move them to their - respective behavioural components. This should facilitate fixing the - server pack data pack ordering, as well as other new features of mod - resource packs. - - 28.1.35 Fix dimension types being incorrect when connecting to a non-Forge server. Closes #6203 - - 28.1.34 Fix the stupid derp that broke singleplayer dims. Don't send the dim packet - to the local client - it is not needed because obviously not. Seems to have - fixed the problem. Probably infinity new bugs by this. - - 28.1.33 Move OnlyIn patches on DyeColor to SAS file - Also fix broken cobblestone stairs recipe - - 28.1.32 Expose DyeColor#colorValue, remove OnlyIn from all DyeColor methods - - 28.1.31 Properly propagate the DimensionType information from server to client - at client connection time. This means the client now knows about the - dimensiontype properly and can access the ModDimension information on - the client. - - 28.1.30 Fix FluidTank with empty contents throwing error if drained (#6196) - - 28.1.29 Move opening initial screen to after startup and events are enabled (#6139) - This allows events to be fired for the initial opening of the main menu - Also fixes MC-145102 - - 28.1.28 Changed all calls of `BlockState#getSoundType` to use the sensitive version. (#6120) - - 28.1.27 Patch Sweet Berry Bush to have Crop Growth Event Hook (#6094) - - 28.1.26 Allow structure processors to process entities - - 28.1.25 Remove forced ANSI terminal - it breaks the Eclipse terminal output. - As a result, we can now support coloured log output again, by default. - Regen run configs to get the change (you should do this every update, you - know :D) - - 28.1.24 Make patched-in StairsBlock constructor public - Also fix supplier generic being too narrow in DeferredRegister#register - - 28.1.23 Integrate modlauncher changes for mixin. - - 28.1.22 Fix new flower pot ctor not being usable with deferred register - - 28.1.21 Usability improvements to RegistryObject/DeferredRegister - - 28.1.20 Add constructor to StairsBlock that accepts a state supplier - - 28.1.19 Fix server jar manifest path. - - 28.1.18 Fix sea level not being available on client, move hook to Dimension - - 28.1.17 Add template arg to StructureProcessor#process - - 28.1.16 Fix timezone issue with the installer. - - 28.1.15 Bump binpatcher and jarsplitter versions to address Java differences on older JDKs. - - 28.1.14 Allow modded dimensions to customise World#getSeaLevel - - 28.1.13 Fix jigsaw blocks not mirroring properly - - 28.1.12 Fix type bound on GameRegistry.findRegistry being too narrow - - 28.1.11 Add IExtensibleEnum#init, extend FillerBlockType/PlacementBehaviour - - 28.1.10 Tag the deprecation of DeferredWorkQueue. I think this is causing confusion - as to scope. Its functionality will be tied to the events in future - - so mods can request the deferred work through methods on the Mod Lifecycle - events directly. The API will be coming soon. - - 28.1.9 Fixed the problem where an error would cause the main thread to continue - even though there were still parallel threads running. Also, handle exceptions - in the AutomaticEventSubscriber rather than leaking them to the Parallel processor. - Actually closes #6148 - - 28.1.8 Make FlowerPotBlock extensible and reusable for mods - - Change static lookup map to an instance variable - - Add an instance variable for the "empty pot" for the current block - - Keep one instance of the lookup map between the empty pot and all its full versions - - Convert everything to use delegates - - 28.1.7 Post tag event directly from reloader thread (#6164) - - 28.1.6 Some tweaks around the code base. A functional consumer for networking - return a bool from your consumer function, rather than setPacketHandled. - Tweak the server modloading behaviour to try and be a bit clearer that a mod errored. - - 28.1.5 Update furnace fuels to not recreate it's list every query, and update when tags are reloaded. Add Tag update events. (#6140) - - 28.1.4 Maintain default behavior for Item#canPlayerBreakBlockWhileHolding() (#6128) - - 28.1.3 Update README badges to fix wrong version. (#6141) - - 28.1.2 Reimplemented "MouseEvent" as RawMouseEvent for 1.14.X (#6144) - - 28.1.1 Fix patch for vanilla spawning in WorldEntitySpawner (#6130) - - 28.1.0 Fix Entity.getPersistentData function name. Closes #6131 - Bump spec version for first 1.14.4 RB. - -28.0 -==== - - 28.0.106 Fix ParticleFactoryRegisterEvent not firing (#6126) - - 28.0.105 Minor fixes to the fluids (#6150) - * Fixed vanilla rendering of fluids to take into account the alpha bits of the color, and fix usages accordingly. - * Fixed missing texture derp. - - 28.0.104 Some (sadly breaking) improvements to the Fluid API (#6110) - * Some (sadly breaking) improvements to the API, after feedback and concerns provided by users: - - Moved calculation of the translation key to the FluidAttributes constructor, so that builders can be shared between still & flowing sub-fluids. - - Moved biome-based coloring to a dedicated FluidAttributes.Water variant, which is not used by default. - - Added logic to automatically gather fluid textures into the list of textures to bake. - - Patched BucketItem and FlowingFluidBlock to avoid eager access to the fluid objects. - - Added a ForgeFlowingFluid class, as a more user-friendly way to construct a new FlowingFluid. - - 28.0.103 Add new DeferredRegistry helper, and change RegistryObject to update when overrides are registered. - - 28.0.102 Delay Block loot table name generation until needed, as calling early will result in an empty name as the block is not registered yet. - - 28.0.101 Fix slimes splitting more times then they should. Closes #6138 - - 28.0.100 Fix a couple places not calling forge getLightValue - - 28.0.99 Properly fix missing attribute issue, add vanilla bug ID - - 28.0.98 Fix vanilla typo causing errors when client is missing entity attributes - - 28.0.97 Remove StructureArgument to work around vanilla issue, clean up custom arguments - - 28.0.96 Fix SCommandListPacket underflowing buffer when encountering a missing argument type - - 28.0.95 Fix problem with network connections timing out frequently. Turns out - there's a race condition - and the extra work forge does causes it to - happen much more frequently than vanilla (though I'm sure it's a vanilla - issue). Closes #6124, #5767 and probably lots more. - - 28.0.94 Make /locate command support modded structures - - 28.0.93 Make STRUCTURE_FEATURE registry a slave map of the FEATURE registry - Also convert Feature.STRUCTURES to a slave map - - 28.0.92 Fix REGISTER packet encode/decode issues. - Changed ForgeConfig values to return the default value if the config is not loaded, and exposed the value objects as a internal config. - - 28.0.91 Fix naming conflicts with official names. - - 28.0.90 Fix item used stat not triggering properly on last item in the stack. - - 28.0.89 Add a bunch of tags from the omnibus. - Fix test imports. And update patches for line numbers. - - 28.0.88 Add spawn reason to spawn events (#6096) - - 28.0.87 Add collisionExtendsVertically hook to allow modded blocks that extend collision into the block above similar to fences. (#6092) - - 28.0.86 Fixed PlayerInteractEvent.LeftClickBlock useItem/useBlock (#6045) - - 28.0.85 Readded IForgeItem#getHighlightTip hook. (#6036) - - 28.0.84 Added gravity as attribute to Entities (#5630) - - 28.0.83 Fix CME on chunk unload in FarmlandTicketManager (#5998) - - 28.0.82 Add a modfolderfactory. Fix up login payload exposure. - - 28.0.81 Peel IModLocator into the SPI package and extract a small IModFile - interface as well. This allows building external IModLocator - implementations. - - 28.0.80 Add in some client only player connectivity events. Closes #5536 - - 28.0.79 Add in MC REGISTER nonsense. Shut up #5730 - Tweak network a bit to fix initialization order stupidity. (Constants don't - load classes!) - - 28.0.78 move default log level for debug file to debug instead of trace, and remove millis from console and GUI. Also remove unused config xmls - - 28.0.77 Added getters for FMLPlayMessages.SpawnEntity - - 28.0.76 Move indexFor and biConsumer into FMLHandshakeHandler and expose them publicly, so mods can add additional - login messages. Closes #6087 - - 28.0.75 Hookup BlockEvent.FluidPlaceBlockEvent (#6103) - - 28.0.74 Update libs to 1.0 versions, bump grgit, and fix tag search behaviour that resulted. - - 28.0.73 Fluid rework derp fixes. (#6098) - * Fix nulls returning from non-null methods, and null-check of non-nullable values. - * Fix missed computation of the isEmpty flag in FluidStack - * Cleanup getAmount/isEmpty calls. - * Remove redundant suppliers. That info is readily available from the vanilla Fluid / FluidState. - - 28.0.72 Minor model system cleanup/documentation (#6089) - - 28.0.71 Fix Digging particle sometimes using the wrong block pos to get additional model data (#6077) - - 28.0.70 Change fml.modloading.brokenfile.optifine to not imply that Forge is responsible for Forge-Optifine compatibility. (#6080) - - 28.0.69 Add a config comment that lists the available constants of enums (#6079) - - 28.0.68 Restore PotionShiftEvent (#6042) - - 28.0.67 Added new InputEvent.MouseScrollEvent, fixes #5811 (#6037) - - 28.0.66 Add Villager Trading Events (#6016) - - 28.0.65 Strip side annotations from CropsBlock.getSeedsItem (#6013) - - 28.0.64 Updated constants to 1.14 (#6012) - - 28.0.63 Added hook to allow biomes to specify custom river variants. (#5969) - - 28.0.62 Add particle factory registration event (#6018) - - 28.0.61 Make FluidStacks non-nullable, and implement some TODOs. - - 28.0.60 Fix license headers so `gradlew build` is happy. - - 28.0.59 Fluid API rework (#5983) - - Moved forge fluids into FluidAttributes companion object to the vanilla Fluid. By gigaherz - - Redesigned the Fluid API to be closer to the Items API. By King Lemming - Co-authored-by: King Lemming - - 28.0.58 Recipe system cleanup. (#6014) - - 28.0.57 Fix regular arrows giving off particles after a world reload (MC-107941) (#6061) - - 28.0.56 Fix coremod not redirecting to the correct method (#6078) - - 28.0.55 Fix blocks being placed in adventure mode. Closes #6085 - Add early error for setting invalid world directory. Closes #6084 - Fix PlayerTickEvent not firing when dead, even if player isn't removed from world yet. Closes #6074 - Fix PlayerDestroyItemEvent not firing for some cases. Closes #6067 - - 28.0.54 Fix Javac generics breakage. - - 28.0.53 Prevent worlds from unloading while players are in out-of-world states by tracking all worlds references by every player in the server's player list. - - 28.0.52 Add Argument serializer for ModIdArgument. EnumArgument can't as vanilla doesn't support extra data. - - 28.0.51 Sort server.properties while writing. - - 28.0.50 Fix chunk load failure when entering End portal Closes #6068 - - 28.0.49 Fix Configs not generating correctly on first load Closes #6069 - - 28.0.48 Add hook to load custom mrls/rls not attached to a block or item. (#6010) - - 28.0.47 Cover more cases for RightClickBlock event and restore onItemUseFirst (#6009) - - 28.0.46 Make DimensionManager.SavedEntry save sky light consistently (#6019) - - 28.0.45 Fix extract inheritance not using proper classpath and update buildscript for FG asm changes. - - 28.0.44 Grrr. Stupid error. Sorry lex: I fixed it. - - 28.0.43 Actually reload config when it changes on disk. Closes #5541 and #5959 - - 28.0.42 Move fml's PlayerEvent and TickEvent to forge. Update - `import net.minecraftforge.fml.common.gameevent.PlayerEvent;` - to - `import net.minecraftforge.event.entity.player.PlayerEvent;` - and - `import net.minecraftforge.fml.common.gameevent.TickEvent;` - to - `import net.minecraftforge.event.TickEvent;` - - 28.0.41 Bump modlauncher to 3.2.x. Add a sender modid and document IMC. Closes #5746 - - 28.0.40 Turned minecraft into a proper Mod, with a "dummy" language provider. - Also fixed the "translations" not being available early if an exception occurs - by force loading the forge and MC ones. Closes #5984 - - 28.0.39 Fix a crash I caused by misunderstanding formatToString (#6007) - - 28.0.38 Fix userdev setup by moving SAS concept to FG. - - 28.0.37 Add piston events (#5798) - - 28.0.36 Fix AT for EntitySpawnPlacementRegistry.register - - 28.0.35 Make ParticleManager.IParticleMetaFactory public (#5926) - - 28.0.34 Add button to open mods folder (#5986) - - 28.0.33 Change ModLoadingException to display ModID instead of ModInfo instance identifier. (#5999) - - 28.0.32 Fixed PlayerInteractEvents not working (#5976) - - 28.0.31 Fixed Buttons in the error screen are incorrectly rendered if they are extremely long Closes #5687 (#5924) - - 28.0.30 Fix LazyOptional throwing NPE to consumers when owners null. (#5772) - - 28.0.29 Make Villager profession unlocalized name use modids when not 'minecraft' Closes #5977 - Fixed trees able to be generated through water. Closes #6000 - Change Block#toString to use getRegistryName instead of getNameForObject Closes #5937 - Allow Cooking Recipes to deserialize results with stack sizes. Closes #5960 - - 28.0.28 Fixed DimensionType.getRegistryName() returning null Closes #5992 - Fixed RegisterDimensionEvent not firing for new worlds. Closes #5987 - - 28.0.27 Introduce new Side Annotation Stripper system to semi-automate the shipment of Sided methods and cleanup patches. - New forge:checkSAS task to validate this config file. Closes #5995 - - 28.0.26 Move world unload patch to tick function to prevent duplicate unloading, fix log message in dim manager, fix javadoc for unload method (#5964) - - 28.0.25 fix melon and pumpkin seeds being peaceable on more than just farmland (#5980) - - 28.0.24 Fixed possible ClassCastException with dye-able armor. (#5985) - - 28.0.23 Fix naming for dev launch providers - they're in MCP.. - - 28.0.22 Register a config command. Currently one subcommand: showfile, which - when passed a modid and a type (CLIENT, COMMON or SERVER) will display - a link in the caller's chat to open that file in the OS file viewer of choice. - - 28.0.21 Load default configs from the defaultconfig directory by default. (Can - be overridden in the fml.toml config file if desired). - Will load any type of config tracked file from there - client, common, server - or custom tracked file. This means you can ship defaults for your pack - in a defaultconfig directory. I am thinking about ways to force a specific - config override for an existing config. - - 28.0.20 Fix vanilla bug that hardcore death doesn't clean up properly, leaving - a running server and a broken GUI. Vanilla bug MC-148865 - - 28.0.19 Fixed network ticking player entity while it is dead. And explicitly prevent overworld from unloading. Closes #5978 - - 28.0.18 Crash report extended to show ModLauncher FML and Forge data. - - 28.0.17 Fix potion transformer to look up the right name depending on context. - - 28.0.16 Added a coremod, shush, don't tell Lex. - Seriously, this is how to do targeted changes to specific classes. - In this case, adding a fieldtomethod redirect for EffectInstance.potion - to allow substitution. - - 28.0.15 Fix Slimes not splitting on death Closes #5973 - - 28.0.14 Fix @ObjectHolderRegistry not properly detecting vanilla class level references. Closes #5958 - - 28.0.13 Fixed missed patch causing blocks to not dropping EXP and BreakEvent to not fire. - - 28.0.12 Fix & Improve state comparison when checking vanilla block replacements (#5922) - - 28.0.11 Keep player cap data until they have revived. Closes #5956 - - 28.0.10 Fix objloader registering at wrong time. Closes #5847. Added test - class as suggested in the issue. - Note: most tests are commented out at the present time, pending - rework. Tests that work, work. - - 28.0.9 Fix datafixer exception catch: Closes #5951 - - 28.0.8 Fix error when ModsDiscoverer visits a non existent mods dir. - Closes cpw/modlauncher#30 - - 28.0.7 Merge branch 'pull/5948' into 1.14.x - - 28.0.6 Realms' removal has removed the need for additional jar transformation. - - 28.0.5 Make I18N format errors less spammy, also remove single apostrophes from - current translations in en_us.json. Other langs may still have problems. - Closes #5952 - - 28.0.4 Fix spam during startup (#5957) - - 28.0.3 Fix forge 1.14.4 startup in obfed enviroment (#5955) - - 28.0.2 Updated Example Version Range for 1.14.4 (#5950) - * Updated Example Version Range for 1.14.4 - * Also changed loader version and version range - - 28.0.1 Fix javac compile issues. - - 28.0.0 Provisional update to 1.14.4. Missing a lot of playerinteractionmanager patches because everything moved and I'm tired. - Fix up immediate problems. - bump to 28. - -27.0 -==== - - 27.0.61 Update mappings to 20190719 in prep for 1.14.4.. - - 27.0.60 Fix RegistryObject when used with generic registry entry classes - - 27.0.59 Remove OnlyIn Client Distribution from Effect and EffectType methods. (#5925) - - 27.0.58 Change default BrewingRecipe to use an Ingredient for the input instead of ItemStack. Closes #5944 - Add AT for GameRules.register Closes #5946 - Fix Forge Blockstate loader model path is inconsistent with vanilla blockstates Closes #5892 - Fix client crashing when opting not to load a world when there's missing blocks Closes #5886 - - 27.0.57 Fix CheckSpawn event logic for natural spawns. - - 27.0.56 Fixed item breaking particles not capturing current state of the ItemStack. Closes #5934 - - 27.0.55 Fix RenderSpecificHandEvent firing with wrong hand stack (#5927) - - 27.0.54 [1.14.x] Fix text positioning issues caused by scaling loading screen (#5932) - - 27.0.53 Fixed PlayerSleepInBedEvent pos is always null Closes #5936 - Fixed decompile error causing Endless Loop in ModelBackery if model errors exist. - Fixed NPEs related to teleporting players without portals. - - 27.0.52 Add simple concurrency protection to Server world list. Closes #5938 and #5739 - - 27.0.51 Update modlauncher to the 3.x series. - - 27.0.50 Rework GuiModList mod info to use custom scrolling panel impl - - 27.0.49 Cleanup Forge's Access Transformer, and add ATs for Block.Properties#noDrop, and AxeItem/PickaxeItem. Closes #5866 and Closes #5921 - - 27.0.48 Fix race condition in client mouse handler. Closes #5888 - - 27.0.47 Added LootPool.Builder#bonusRolls setter. Closes #5887 - - 27.0.46 Implemented Item.get/setDamage hooks. Closes #5899 - - 27.0.45 Implement Item.isRepairable in Crafting and Grindstone. Closes #5917 - - 27.0.44 Re-implement state.onBlockExploded() Closes #5914 - - 27.0.43 Add general damage hook for items. Closes #5502 (#5670) - - 27.0.42 Fix syntax error in IRenderHandler. - - 27.0.41 Pass tick counter to custom render handlers (#5744) - - 27.0.40 Fire Loading event (#5795) - - 27.0.39 Fix logoFile not working properly (#5775) - - 27.0.38 Adds some explanatory javadocs and check world in ModelDataManager (#5762) - - 27.0.37 Add InputEvent documentation (#5698) - - 27.0.36 Add IModelData to getParticleTexture (#5756) - - 27.0.35 Fixed BakedModelWrapper not delegating new methods (#5761) - - 27.0.34 Throw exception when a mod returns null from a dispatched capability provider (#5646) - - 27.0.33 Add isServer and isClient methods to LogicalSide (#5606) - * Add helper methods to LogicalSide. - * Fix backwards docs. - - 27.0.32 Added documentation to ObfuscationReflectionHelper adn deprecated index based functions. (#5893) - - 27.0.31 Fixed EntityJoinWorldEvent not being fired when player is added to ServerWorld. #5827 - Fixed wrong example path for the access transformer in the MDK build.gradle. #5891 - Added getters for mouse x/y velocity and if the middle-mouse button is being held down. #5776 - Modify issue template for better clarity. #5874 - Fixed grindstone not using ItemStack-sensitive getMaxDamage. #5831 - Added ParticleManager.registerFactory to Forge's AT. #5896 - Fixed NPE in SidedInvWrapper when side was null. #5787 - Moved EndermanEntity.setAttackTarget super call to allow LivingSetAttackTargetEvent the ability to override default behavior. #5778 - Added field to make "Looking at" debug info maximum distance configurable #5714 - - 27.0.30 Disable Config Button when no mods are selected (#5905) - Closes #5889 - - 27.0.29 Fix MC-258 on mod list screen, enable sorting, minor tweaks. (#5846) - - 27.0.28 Fixed #5895: Shearing via Displenser drops Shears (#5906) - - 27.0.27 Fix link applying to whole component in chat if component starts with link (#5909) - - 27.0.26 Added harvestLevel and harvestTool setter to the Block.Properties. (#5916) - - 27.0.25 Fix installer realms issue on server. - Uptake EventBus changes to fix some potential dead locks. - - 27.0.24 Fix old entity not being removed on dimension change (#5833) - - 27.0.23 Update TextureStitchEvent.Pre to give access to the list of ResourceLocations that will be loaded as textures. (#5870) - - 27.0.22 Add installer processor to deobfuscate Mincraft's Realms library. - This task will processes the current realms library from the json, so the installer must be re-ran every time they update it. - - 27.0.21 Redirect a method to the recipe book container, to allow modded screens to have a recipe book. (#5873) - - 27.0.20 Fix WorldEvent.Unload not firing on the client (fixes #5880) (#5884) - - 27.0.19 Fix TickEvent.PlayerTickEvent firing twice for tick end (fixes #5878) (#5885) - - 27.0.18 Fix type cast issues in ForgeConfig values. Closes #5894 - Added config value set and save functions. - By default mod configs are auto-saved, so you do not need to call save unless you create your own Config object. - - 27.0.17 Remove legacy StartupProgress. - Implement properly scalable progress thanks to @gigaherz. Closes #5863. - Implement API for pushing messages to the startup screen from mods. - Add memory display. - - 27.0.16 Update coremods to newer version, with support for new targets. - - 27.0.15 Fix duplicate WorldEvent.Unload call in client key handler. - Add recipe generator to replace vanilla recipes with Forge tags. - - 27.0.14 Fix dimension save data invalid cache being to aggressive. - - 27.0.13 Fix garbled "µs" (#5818) - - 27.0.12 Fix fmluserdevdata not being a valid launch target. - - 27.0.11 Split userdev data entry point into it's own provider to fix duplicate mod issue. - - 27.0.10 Fix configs correcting numeric values when the primitive type differs - Fix configs with range not clamping the corrected value, and instead - just replacing with the default - Closes #5855 - - 27.0.9 Fix item placement losing NBT data in creative mode (#5757) - - 27.0.8 Add extension to write entry id's to PacketBuffer's (#5812) - - 27.0.7 Add isItemValid check for ItemStackHandler (#5850) - - 27.0.6 Fix leather armor dye recipe (#5836) - - 27.0.5 [1.14.x] Replace dye items in Forge tags. (#5843) - - 27.0.4 Update readme and issue template. (#5773) - - 27.0.3 implement Ingredient.getSerializer for custom ingredients (#5813) - - 27.0.2 Fix vines and scaffolding not being climbable. - Fix powered rails not spreading power correctly. Closes: #5854 - - 27.0.1 Fix misaligned ServerWorld initCapabilities patch. - - 27.0.0 Initial 1.14.3 update. - -26.0 -==== - - 26.0.63 Fix too many registries being sent from server to client - - 26.0.62 Remove OnlyIn on TagCollection#getOwningTags - Fixes Block#getTags crashing on servers - - 26.0.61 Reorganize sided event dispatch slightly. Dispatch model and entityrenderer - functions at more appropriate times. - - 26.0.60 Tweak for lowercase handling. - - 26.0.59 Merge branch 'pull/5793' into 1.14.x - - 26.0.58 Fix crash when crashing during modloading. Fix GuiModList being weird. - - 26.0.57 Process the main modloading work on the async thread, but still - do deferred work on the main thread by passing in the executor. - - 26.0.56 Clean up config comments, make comment array nonnull - - 26.0.55 Fix forge event bus never starting up - - 26.0.54 Automatically add range to config comments - - 26.0.53 First pass of adding text to the loading progress UI. It deliberately uses the very primitive STB - generated font, so can only render basic ASCII text, and also only renders pre-defined strings, - as translations aren't available either. - - 26.0.52 Add mod failure identification - - 26.0.51 Moved some events to the Mod's event bus. You'll need to update which bus - you're listening to for these. (The Mod event bus is the only one actively - dispatching events during model loading). - ModelRegistryEvent, ModelBakeEvent, TextureStitchEvent.Pre, TextureStitchEvent.Post, ColourHandlerEvent.Block, ColourHandlerEvent.Item - - 26.0.50 Fix StartupQuery, and put tests back. - - 26.0.49 Fix stupid bug introduced with the refactor.. - - 26.0.48 Tidy up mod loading a bit more, and also crash if the [[mods]] list isn't - a list. - - 26.0.47 Merge remote-tracking branch 'origin/1.14.x' into 1.14.x - - 26.0.46 Fix server side loading, tweak mods command. - - 26.0.45 Fix ModelDataTest - - 26.0.44 Merge remote-tracking branch 'origin/1.14.x' into 1.14.x - - 26.0.43 Update mappings, move mod initialization to the async loader. - - 26.0.42 Fix #5612 add entity to ISelectionContext - - 26.0.41 Fix #5768 add access to MainWindow object in RenderGameOverlayEvent - - 26.0.40 Fix #5810 incorrect cullface on some models - - 26.0.39 Fix #5686 ArmorLayer still calls deprecated getArmorResource - - 26.0.38 Fix bad patch breaking armor dyeing - - 26.0.37 Make sure test mods load, fix BlockstateRetextureTest - - 26.0.36 Fix #5805 ModelBakeEvent does not fire - - 26.0.35 Fix lighting not being sent to client when large amounts of blocks change at once. Closes #5839 - Remove RecipeType/VanillaRecipeTypes, as 1.14 has a vanilla system for this. - - 26.0.34 Fix some compile errors in test classes. - - 26.0.33 Fix Vanilla resources loading from classpath, instead of the extra jar. Causing issues in dev time, and Forge replacements. Closes #5824 - - 26.0.32 Add temporary hard crash when mods error until we can load our error screen. - - 26.0.31 Make ReverseTagWrapper unmodifiable, fix error in log when mods folder doesn't exist initial scan. - - 26.0.30 Skip running the datagenerator on unrequested mods. - Add a run config for the data task for modders to use - - 26.0.29 Remove paulscode hack. It is not needed in 1.14, since paulscode is - no longer used. - - 26.0.28 Modify lex's data handler to use proper mod lifecycle event mechanisms - instead. New Lifecycle Event for requesting data harvesting. Mods will - be constructed, the registry will fire, and then a new Data event will - fire. Submit new data tag files to the data gatherer if you wish. - The game will shutdown after this. No other mod elements will happen. - - 26.0.27 Add params for the exception message - tweak logging - - 26.0.26 Expose the data entry point and generate Forge's Tags using it. - - 26.0.25 Add reverse tag cache, to make looking up tags for items/blocks/etc.. less costly. - - 26.0.24 Update Example Mod (#5781) - - 26.0.23 Fix AT for EntitySpawnPlacementRegistry.register (#5799) - - 26.0.22 Implement getValue in ClearableRegistry fixing DimensionArgument. (#5809) - Fix DimensionArgument - - 26.0.21 Fix RenderSpecificHandEvent firing with wrong hand (#5789) - - 26.0.20 Use dragon_immune block tag instead of manually checking blocks (#5792) - - 26.0.19 Fix #5806 sheep drop shears instead of wool - lol - - 26.0.18 Fix incorrect method used in ShrubFeature patch - - 26.0.17 Rework AbstractTreeFeature patches to reduce impact and avoid name conflicts - - 26.0.16 Add IContainerFactory for reading custom container data on the client - - 26.0.15 Fix Fishing and Mineshaft Minecarts loot tables erroring. #5785 - Fix Client block breaking speed not matching the server. #5790 - Fix Village Siege event location, and MC-154328 preventing Sieges starting. #5800 - Fix EntityJoinWorldEvent not firing on client, or some server code paths. #5786 - - 26.0.14 Adjust NetworkEvent#enqueueWork to match vanilla logic - In singleplayer our packet work could get delayed until the next tick, - breaking the expectation of packet read order. Fixes that using - NetworkHooks.openGui would result in missing inventory data on the client - - 26.0.13 Fix gameDir argument error on dedicated server. - - 26.0.12 Add forge registries for most vanilla registries - Made all registry names consistent with their vanilla counterparts - Also added a system for legacy registry names, so no data will be lost - Cleaned up formatting in GameData and ForgeRegistries - - 26.0.11 Add registry flag for syncing - - 26.0.10 Fix issues preventing test mods loading - - 26.0.9 Add forge registry for container types, expose ScreenManager.registerFactory - - 26.0.8 Don't NPE during construction of ModLoadingException.. - - 26.0.7 Fix misobfed methods due to mapping conflict. - - 26.0.6 Update mappings - - 26.0.5 Fix block activation not occurring serverside - Missing block of code from the old patch caused it to be skipped - - 26.0.4 Rework model patches/classes for new bake signature - - 26.0.3 Fix NamespacedWrapper not delegating a new getter. Fixing data loading spam at world start. - Update red/yellow/green tags with new vanilla item names. - Reenabled test source directory in project and made ModelDataTest compile. - - 26.0.2 and userdev - - 26.0.1 Fix realms class name - - 26.0.0 Fix travis build - -25.0 -==== - - 25.0.220 Update to 1.14.2 - - 25.0.219 Include new library in installer json. - Change order of versions on main menu, to prevent overlap with default window size. - Fix Forge update not displaying version info. - - 25.0.218 Fix vanilla structures loosing valid flags, And fix error placement for unsaveable structures. - - 25.0.217 Fix tall grass not dropping seeds. Closes #5675 - - 25.0.216 Enhance crash reports and logging to capture transformers on stack trace elements. - Moved log4j2.xml file to the launcher source set, so it loads first in the client. - - 25.0.215 Remove cache eviction for model data, optimize - - 25.0.214 dimesnion -> dimension typos (#5684) - - 25.0.213 FENCES_NETHER_BRRICK => FENCES_NETHER_BRICK (#5681) - - 25.0.212 GEMS_QUARRTZ -> GEMS_QUARTZ (#5635) - - 25.0.211 Small comment typo fixes for ObfuscationReflectionHelper (#5583) - - 25.0.210 Fix MC-146650 GuiContainer#keyPressed to return the correct key handled boolean (#5367) - - 25.0.209 Fix build script producing duplicated eclipse source folders. - Fix not including userdev source in sources jar. - Update license header of files that need it. - Delete patches_old folders. Most are unneeded in 1.13+ as the systems they effected were changed significantly. Any that need to be readdressed can be done as PRs. - - 25.0.208 Fix caps not being visible on old player during clone event (#5728) - - 25.0.207 Fix vanilla bug in writing structure templates with multiple palettes. - - 25.0.206 Add support for vanilla recipes having nbt on result (#5710) Fix #5663 - - 25.0.205 Fix modded TEs not being removed on block change - - 25.0.204 Fix #5735 by pushing new build. Shutdown Forge eventbus when errors occur. Closes #5711 - Also, improve logging so warnings, errors and fatals are always shown, regardless of marker. - - 25.0.203 Update 'build.gradle' to fix run configs for launching forge - - 25.0.202 Remove patch causing TEs to be removed on state change - - 25.0.201 Fix default IUnbakedModel bake method using wrong format - - 25.0.200 Add ModelDataTest to test mods.toml - - 25.0.199 Updated a couple of libraries. Fixed bug where modid could be in toml but - not found during loading, yet game continued to load. - - 25.0.198 Add test mods run configs - - 25.0.197 Better handle errors from eclipse compiled (non-compiling) bytecode - - 25.0.196 Finish model loader debug mod - - 25.0.195 Comment out test Mod/EventBusSubscriber annotations, fix up ModelLoaderRegistryTest - - 25.0.194 Fix BakedQuadRetextured calling old BakedQuad ctor - - 25.0.193 Add new system for model data, replacing extended states (#5564) - - 25.0.192 Bump ForgeSPI version, and add support for DistCleaner stripping interfaces from classes. - Add more detail to VersionChecker log info. - - 25.0.191 Add explicit return type checks for extensible enums, fix exc - - 25.0.190 Fix EnumRarity, make sure extensible enums have at least one factory candidate - - 25.0.189 Make EnumRarity extensible - - 25.0.188 Allow loading json constants outside of _constants - - 25.0.187 Update skipped_commits.md - - 25.0.186 Fix some vertex format changes not being handled correctly (#5368) - - 25.0.185 Transform vertex normals as well as positions when generating quads (#5242) - - 25.0.184 Fix for SidedInvWrapper isItemValid using wrong slot (#5642) - - 25.0.183 Add comment to vanilla bugfix, update skipped_commits.md - - 25.0.182 Change default username to 'Dev', add ability to replace '#' with randomized numbers - - 25.0.181 Fix MC-128441: cross-dimensional teleporting does not work - - 25.0.180 Add Forge dimension-changing hooks to spectator handling code (#5212) - - 25.0.179 Minor performace improvement when building chunks and rendering blocks (#5286) - - 25.0.178 Catch json parsing errors from constants/factories files (#5258) - - 25.0.177 Allow custom DataSerializers to be registered safely (#5245) - - 25.0.176 Further clean up Constants, and add two new BlockFlags - - 25.0.175 Remove unnecessary patch - - 25.0.174 Update skipped_commits.md - - 25.0.173 Fail fast when null is used with setTag instead of crashing in writeEntry (#5257) - - 25.0.172 Update Constants for 1.13 - - 25.0.171 Added more Constants (#5323) - - 25.0.170 Add a few events pertaining to villages (#5302) - - 25.0.169 Sync up canPlaceTorchOnTop logic with BlockTorch#isValidPosition - - 25.0.168 Update skipped_commits.md - - 25.0.167 Fix special spawn event not firing in many cases. (#5389) - Co-authored-by: tterrag - - 25.0.166 Only prompt for missing registries on local worlds (#5348) - - 25.0.165 Reimplement ForgeHooks#onPlaceItemIntoWorld and remove old place events - - 25.0.164 Add EntityPlaceEvent (#5057) - Co-authored-by: tterrag - - 25.0.163 Fix small logic error in ItemTextureQuadConverter (#5463) - - 25.0.162 Better support for custom bows (#5209) - - 25.0.161 Fix up torch placement logic to handle more vanilla special-casing (#5426) - - 25.0.160 Update skipped_commits.md - - 25.0.159 Written size does not include int bytes. - - 25.0.158 Extend Region files to support >1MB per chunk. - If the 'sector count' is 255, ask the compressed data header for the proper length. - - 25.0.157 Simplify custom item rendering by removing GL emissivity hacks - - 25.0.156 Support diffuse lighting flag in item rendering - - 25.0.155 Add a hook to allow continuously using items through stack changes (#4834) - - 25.0.154 Update skipped_commits.md - - 25.0.153 Add redirects to PotionEffect to respect registry replacement (#5213) - - 25.0.152 Add FieldRedirectTransformer updated to new modlauncher API - - 25.0.151 Fix small logic error in emissive item rendering code (#5320) - - 25.0.150 Ensure slave maps are cleaned up when handling registry overrides (#5250) - - 25.0.149 Remove hack to force enum configs to strings - - 25.0.148 Fix #5688 config values are unordered, update Night-Config - - 25.0.147 Cleanup/Implement some todos (#5660) - - 25.0.146 Readd redirecting of stdout and stderr (#5678) - - 25.0.145 Fix some typos in spawn dimension patches (#5669) - - 25.0.144 Remove Vanilla Logging Config (#5618) - This will re-enable Forge's logging configuration in "production" - - 25.0.143 Add GuiContainerEvent.DrawBackground event. (#5595) - - 25.0.142 [1.13.x] Fire InputEvents (#5533) - - 25.0.141 Fix compile error in FakePlayer from cherry pick - - 25.0.140 Update skipped_commits.md - - 25.0.139 Fix potential issues with the Minecraft FakePlayer lingering around after world unloads. - - 25.0.138 Fix potion remove event not always firing, add expiry event - - 25.0.137 added PotionHooks, closes #3867, #4375 (#4614) - - 25.0.136 Fix EntityDataManager logging level - - 25.0.135 Fix some typos in cherry-picked commits - - 25.0.134 Update skipped_commits.md - - 25.0.133 Add a hook for farmland watering (#4891) - - 25.0.132 Add logging for data manager key registration errors (#5129) - - 25.0.131 Fix #5659 setdimension command entity filtering, avoid inverting logic - - 25.0.130 Improve support for custom block path types (#5203) - Co-authored-by: tterrag - - 25.0.129 Allow items to control the rate of repair from mending (#5102) - - 25.0.128 Update skipped_commits.md - - 25.0.127 Improve exception handling from server starting events (#5226) - - 25.0.126 Improve context provided by potion icon rendering hooks (#5111) - - 25.0.125 Fix an ObjectHolderRef internal error message (#5214) - - 25.0.124 Implement rendering for item models with emissive quads (#5047) - - 25.0.123 Fix inaccurate main thread name shown in client log (#5078) - - 25.0.122 Fix Baked Item models with transformations (#5241) - - 25.0.121 Update skipped_commits.md - - 25.0.120 Stop firing LivingSetAttackTargetEvent for setRevengeTarget (#5217) - - 25.0.119 Fix missing string parameters in some log messages (#5210) - - 25.0.118 Re-add some missing villager profession patches (#5200) - * Fix zombie villagers only spawning with vanilla professions - * Fix spawning modded villagers that do not have their own building - - 25.0.117 Fix the bed position given to the SleepingTimeCheck event (#5107) - - 25.0.116 Fix some null returns from defaulted registries (#5235) - - 25.0.115 Only remove synthetic lambda methods referenced in body of SideOnly methods (#5127) - - 25.0.114 Update skipped_commits.md - - 25.0.113 fixed visual bug with guislider - - 25.0.112 Make Forge blockstate variants correctly inherit AO setting from vanilla models (#5190) - - 25.0.111 Make Forge-provided default transforms accessible to custom models - - 25.0.110 Actually parse the i18n exception message into the super constructor, - so the exception has a useful text message, even in crash logs and - on the server. - - 25.0.109 Refactor to use naming service, and provide an MCP naming service when - in userdev. Step 1 to supporting loading SRG mods in userdev. - - 25.0.108 Fix respawnevent being fired with old player instead of new. Fixes #5658 (#5668) - - 25.0.107 Implement API for mods to control their server status response.. - - 25.0.106 Merge branch 'pull/5636' into 1.13.x - - 25.0.105 Fix StartupQuery to run properly on dedicated server.. Closes #5649 - - 25.0.104 Remove remaining deprecations, improve a few patch comments - - 25.0.103 Fix BrandingControl caching text through resource reload - - 25.0.102 Add back EntityPlayer patch to return main inventory in IItemHandler - Fixes #5638 - - 25.0.101 Fire the ModIdRemappingEvent on the Forge Event bus. Closes #5632 - - 25.0.100 Remove redundant method call in Minecraft patch. Also fix a translation - string error (closes #5643) - - 25.0.99 Add method to IResourcePack to hide it entirely from the UI (#5525) - - 25.0.98 Remove game registry comparsion from list ping - - 25.0.97 Defer configuration of channel until it is actually available during - connection. Closes #5626 - - 25.0.96 Add class to wrap IItemHandler as IInventory for easier recipe interaction. (#5522) - - 25.0.95 Remove uses of java.awt (#5591) - `java.awt` will statically load itself when `java.awt.Color`, `java.awt.Dimension`, etc are loaded. - This conflicts with lwjgl3 and must be avoided (except for in mojang's server gui). - - 25.0.94 Fix PlayerInteractEvent using Dist when it should be using LogicalSide (#5611) - - 25.0.93 Re-Add the list ping compatibility checker - - 25.0.92 Update Night-Config to 3.5.0, improve defineEnum methods - Closes #5537 - - 25.0.91 Fix loading errors GUI crashing when errors occur during construction - - 25.0.90 Revive CapabilityProvider on entity revive. Madders should NOT need this, as caps are copied via NBT. - - 25.0.89 Do not invalidate caps when entity is being moved across worlds. Should fix #5500 - - 25.0.88 Fix NPE in TileEntityPistonRender when class is created to early. - - 25.0.87 Fix getDefaultCreatorModId for enchanted books (#5534) - - 25.0.86 Handle null return from ResourcePackInfo.createResourcePack - - 25.0.85 Allow login packets to only generate on server based connections - Run injectSnapshot on the client thread, wait for result and - disconnect when injectSnapshot fails. - Fix DevServer to load MOD_CLASSES - Fix LaunchTesting to properly load log4j2 markers (don't use a - static variable in that class!) - - 25.0.84 Exclude PR builds from discord and changelog - - 25.0.83 Exclude noci branches from travis - - 25.0.82 Fix being unable to plant nether wart (#5572) - - 25.0.81 Fix silk touch not working on Ender Chests. - - 25.0.80 Fix entity spawn packet pitch (reversed yaw/pitch) (#5603) - - 25.0.79 Fix invalid inventory being sent to ItemCraftedEvent Closes #5580 - Fixed custom ingredient network serialization by removing unneeded mark. Closes #5577 - Changed HorseArmorType constructor to not prefix vanilla paths to custom armors. Closes #5574 - Fix removeBlock being called with invalid canHarvest value. Closes #5570 - - 25.0.78 Add UI for warnings that occurred during loading (#5530) - - 25.0.77 Fix max entity radius not being settable by making it a instance method on world. Closes #5601 - Fix VoidFluidHandler.INSTANCE not being a instance of VoidFluidHandler. Closes #5602 - Remove backwards compat code and make IItemHandler.isItemValid non-default. Closes #5598 - - 25.0.76 Add way to publish the reobf Jar with the maven-publish - task. The standard way does not publish reobfuscated - artifacts. - - 25.0.75 Add in the ability to load modlists from a file. - This is simple: .list is a newline separated list - of maven-like coordinates for mods to load into the game. - They are searched for in all known maven roots. - - 25.0.74 Fix rails not being able to be placed on hoppers. - - 25.0.73 DimensionManager.registerDimension now returns the DimensionType instance for convienance. - You can still access others in DimensionType.getByName() - Fixed ForgeRegistry rappers not forwarding isEmpty. - - 25.0.72 Refactor Userdev and Forgedev launching. - Locating mods on the classpath in dev should solve linked MC sources when debugging. - As well as loading deobfed mods. - Rewrote how arguments are handled in dev, so users can overwrite any defaults we provide. - Added basic Yggdrasil auth support. Passing in --username and --password arguments. - ONLY USE IF NECESSARY. Forge is NOT responsible for your login information. - - 25.0.71 Make userdev parse out the classifier for the Forge jar that is on the classpath. - Should fix debugging Minecraft at dev time. - - 25.0.70 Tidy up network initialization, and force it to classload early in - modloading lifecycle. Closes #5576 - - 25.0.69 Tweak log4j2 config and allow access to classdump functionality from - modlauncher. - - 25.0.68 Fix #5584 by copying the zipped resource to a temporary directory if - paulscode is requesting it. This is so icky. - - 25.0.67 Log a message as well, when we crash. - - 25.0.66 Try writing a temporary file to disk when a paulscode thread requests - a resource, because even zipfilesystems return interruptible file channels. - - 25.0.65 Enforce specversion number for forgeSPI so we don't crash with weird errors later. - - 25.0.64 Put both LogicalSides on NetworkDirection: - Origination (where it came from) and Reception (where it arrived at). - - 25.0.63 Rewrite the FML Handshake packet formats to include actually syncing the registry data and introduce the concept of caching it locally. - Snapshots are not injected yet due top threading issues. - - 25.0.62 Handle differing network versions for FML gracefully? - - 25.0.61 Fix problem with duplicate mods caused by duplicate classes found during scan. - File Scan results are now sets. - - 25.0.60 Try to fix #5573 by peeling the worldclient fetch into a separate handler. - - 25.0.59 Tidy up server launch. The JAR will resolve it's libraries from a relative - path. We just need to verify what we need is on the classpath, and - try and handle when it's not, cleanly (by recommending running the - installer). - The manifest now embeds the correct launch arguments to allow FML to - resolve - these were _never_ editable, and belong somewhere out of - the way. - - 25.0.58 Add missing constructors in KeyBinding to match existing vanilla constructors. (#5480) - - 25.0.57 Update MDK Readme to describe new FG3 procedures. (#5553) - - 25.0.56 Fix Custom Entity Data not persisting between world loads. Closes #5562 - Fix BlockRailState inverting flexibility flag. Closes #5550 - Disable Forge's hooks on dispensing Buckets until Fluid system re-write. Closes #5545 - Fix modifier only keybinds. Closes #5544 - - 25.0.55 Fix entity shearing logic (#5566) - - 25.0.54 Fix droppers not spawning items in world (#5559) - - 25.0.53 Allow vanilla connections properly, and allow mods to decide. - - 25.0.52 Patch DimensionSavedDataManager to not spam FS mkdirs requests for - empty files that don't exist yet, and don't contain data. Should - result in a significant performance improvement for those with slower disks. - - 25.0.51 Fix GUI packet dispatch, add additional blockpos helper for common usecase. - - 25.0.50 Fix startup Query to actually display (fixed commit). - - 25.0.49 Update to 0.10 modlauncher API with performance improvements.. - - 25.0.48 Hide the webhook address so people don't spam it. - - 25.0.47 Remove debug leftovers from Jenkinsfile. - - 25.0.46 Delete old OreDictionary file, fix type in NUGGETS_IRON field name, and ping discord from jenkins. - - 25.0.45 Merge extra and data jars. As Log4j has issues with it's config being in a different jar then the custom logger. - - 25.0.44 Add GuiUtils.drawInscribedRect, use in mod list GUI to fix logo rendering - - 25.0.43 Fix reference to UnsafeHacks in RuntimeEnumExtender - - 25.0.42 Fix double tall plants not being shearable, add IShearable to seagrass - Closes #5524 - - 25.0.41 Add back missing ItemColors patch (#5474) - - 25.0.40 Fix entities being killed in one hit. Closes #5511 - Fix unloc pattern for tps output - - 25.0.39 Fix MinecraftForge.initialize not being called. - Fixes UsernameCache and harvest tools - Closes #5529 - - 25.0.38 Make BannerPattern extensible (#5464) - - 25.0.37 Remove EnumFacing internal ID maps from AT file (#5526) - - 25.0.36 Fix GuiEnchantment using wrong value to index enchantClue array (#5452) - - 25.0.35 Fix some minor patch regressions (#5490) - - 25.0.34 Altered EntityType registry to use a Forge based registry (#5493) - - 25.0.33 Fix bug with ObfuscationReflectionHelper (#5509) - - 25.0.32 Move unsafehacks to separate JAR built separately.. - - 25.0.31 Clean up Entity patches, remove extra method. Closes #5494 - - 25.0.30 Remove now defunct eclipse files from MDK - - 25.0.29 Add a simple network API.. - - 25.0.28 Refactor forge and example run configs based on MinecraftForge/ForgeGradle#546 - - Updated run config formats based on the refactored setup - - Removed old 'runclient' and 'runserver' JavaExec tasks, replacing them by creating the run configs using the refactored setup. - - Set 'assetIndex' environment variable from FG - - Updated MDK for new run config setup - - 25.0.27 Make SpawnPlacementType extensible, remove from ArmorMaterial - - 25.0.26 Fix connection to vanilla servers. Generate a default mod server config - for mods connecting to servers. - - 25.0.25 Fix TPS string - - 25.0.24 Change openGui to take a Consumer - - 25.0.23 Fix author and other strings in the mdk mods toml file, update coremods to 0.3.+ - - 25.0.22 Fix World crashing on load Fixes #5499 (#5503) - - 25.0.21 Actually dispatch handleWorldDataSave. Closes #5492 - - 25.0.20 Merge branch 'pull/5483' into 1.13.x - - 25.0.19 Fix assetIndexes for 1.13.1 - - 25.0.18 Fix travis build for 1.13.x branch - - 25.0.17 Merge branch 'pull/5484' into 1.13.x - - 25.0.16 Fix lazy ModContainer evaluation skipping thrown loadingExceptions - Fix formatting - - 25.0.15 Fixes #5446 Listening for the same registry event in two different mods fails - Tell the mod event bus not to track phasing for events. - - 25.0.14 Add back missing patch for Item.BLOCK_TO_ITEM - - 25.0.13 Fix the MDK.. - - 25.0.12 Fix network syncing of SERVER config. Enable COMMON Config. Fix network - login handling. - - 25.0.11 Fix serverlang loading issue, by frontloading MC and Forge langs, - so error messaging works. - - 25.0.10 Use MC VERSION in the dependencies string for the extra jar - - 25.0.9 Publish to mainline - - 25.0.8 Remove Forge ChunkLoader - vanilla has a new system. API will follow. - - 25.0.7 Fix Block$Properties AT for new class name - - 25.0.6 Fix VillagerRegistry - - 25.0.5 Add the language providers to the main classloader as well, so - their resources are available to other classes.. - - 25.0.4 Fix RegistryManager#getRegistry not working for generic registry entries - - 25.0.3 Fix license headers - - 25.0.2 Fix GlowstoneFeature patch name - - 25.0.1 Fix javac compile issues. - - 25.0.0 Initial 1.13.2 update. Major thing to note is that Dimensions have been completely revamped. - DimensionType is not unique per Dimension. See DimensionManager for more details. - Vanilla now has a chunk loading system, so Forge's will need to be deprecated/adapted. - -24.0 -==== - - 24.0.192 Actually fix byte array behaviour for openGui. - - 24.0.191 Fix byte array behaviour for OpenContainer packet - - 24.0.190 Clean up the mod loading context objects. There is only one ThreadLocal now. - **BREAKING CHANGE** FMLModLoadingContext is renamed to FMLJavaModLoadingContext. - LanguageProviders can setup additional contextual data. - - 24.0.189 Implement a GUI packet and GUIFACTORY for triggering from the server. - - 24.0.188 Merge branch 'pull/5451' into 1.13-pre - # Conflicts: - # patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch - - 24.0.187 Handle bad formats with an exception. Translators MAKE SURE you watch for this error! - - 24.0.186 Handle invalid JAR files more gracefully. Don't crash. - - 24.0.185 Fix JKS to be stored as binary - - 24.0.184 Enable https to Let's Encrypt endpoints by using an SSL factory with - the two extra Let's Encrypt root certs installed into an auxiliary - keystore. - The keystore was generated using standard commands, documented in the - FixSSL class. - The Let's Encrypt certificates are not provided by default in Java 8 - prior to update 101. - - 24.0.183 Its 2019. Update licence headers to match. - - 24.0.182 Fix Terminal Handler and GUI logging on dediserver, hopefully.. - - 24.0.181 Fix config to use new system properly, without exploding the server. - Separates server specific config into the server config file. - - 24.0.180 Fix up accidental newline removal that broke the console... - - 24.0.179 Fix #5429 properly, without breaking symlinks on linux.. - - 24.0.178 Move to using Minecrell's terminal logger directly, for better ANSI control and JLine support. - - 24.0.177 Make a second logger with colour highlighting and control it with a sysproperty: - forge.logging.colourconsole.level (defaults to off).. - - 24.0.176 Tidy up modcontainer building and discovery.. - - 24.0.175 Use a configuration value for the thread count, make it default to - availableProcessors when set to <=0 (default value is -1) - - 24.0.174 Revert "Make sure to create entire path for directory, fixes #5429" - This reverts commit 77dd9eb8 - This will completely break symlinks on linux. - - 24.0.173 Port CommandEvent and custom entity selectors to 1.13 (#5411) - - 24.0.172 Finish off most old patches, fix issue for mounted entities. - - 24.0.171 Patch direct accesses to Entity.type to use getter instead (#5308) - - 24.0.170 Tentatively reintroduce a container-opening system - - 24.0.169 Add synchronized modifier to runtime enhanced enum methods - - 24.0.168 Add IExtensibleEnum, fix DimensionType create method - - 24.0.167 Change IRenderHandler to an interface Closes #4640 - - 24.0.166 Made functional interface IChunkGeneratorFactory public (#5395) - - 24.0.165 Fix leaking unclosed InputStream in Scanner.fileVisitor (#5432) - - 24.0.164 Invalidate capabilities that we attach to vanilla entities and TileEntities. Closes #5307 - - 24.0.163 'Fix' Specific y-levels in water behaving like you're in air. Closes #5341 - - 24.0.162 Reintroduce ObfuscationReflestionHelper closes #5373 - - 24.0.161 Fixed Crosshair attack indicator texture issue Closes #5442 - Add friendlier error message for @Mod annotations with missing mods.toml entry. Closes #5440 - Remove Log4J console highlighting. As it doesn't work on many consoles, and prints invalid characters. Closes #5420 - - 24.0.160 Let ItemGroup provide it's own tabs image resource location (#5330) - - 24.0.159 Allow GuiContainer and ItemGroup to specify slot hover colors (#5332) - - 24.0.158 Port Minecraft client patch for 'ClientTickEvent' (#5397) - - 24.0.157 Fix statistics gui crashing when handling input events (#5435) - - 24.0.156 Properly set context classloader in mod loading threads. - - 24.0.155 Rework server launching at runtime to include needed default arguments and validate libraries exist. - Move Forge config loading to manual while config system is in development. - - 24.0.154 Added 'create'-method for EnumCreatureType (#5400) - - 24.0.153 Fix redstone power calculation (#5433) - - 24.0.152 Fix wrong grass block being used for comparisons (#5434) - - 24.0.151 Make sure to create entire path for directory, fixes #5429 - - 24.0.150 Put the FMLModContainer back in it's cage. Delete the ClasspathLocator. - - 24.0.149 Use the resource pack directly in the GuiModList, skip the resourcepackinfo. - Closes #5418 - - 24.0.148 Fix inventory items not properly being synced to client. Closes ##5421 & #5417 - - 24.0.147 Expose the ModFile in the scan data, so languages can read it and make - mod construction decisions. - - 24.0.146 Fix RuntimeEnumExtender creating new enums with incorrect ordinal value (#5402) - - 24.0.145 Config watching and config events now actually work! - Also fixed small bug with MOD_CLASSES not defaulting to empty string. - - 24.0.144 ConfigEvents - the beginning. - - 24.0.143 Merge branch 'pull/5405' into 1.13-pre - - 24.0.142 Fix 5408 by making Paths from the default provider (not inside jars) - offer a FileInputStream rather than Files.newInputStream. Fun. Stupid - ancient paulscode. - - 24.0.141 More old patch work, cleaned up static methods added to ItemStack, and various networking functions. - - 24.0.140 Config option implemented - - 24.0.139 Reimplement update checker - - 24.0.138 Update for ForgeSPI change, revert back to VersionStatus checking - - 24.0.137 Bring back the forge beta warning. Use a check to see if the forge minor version is zero, as ForgeVersion.getStatus() is not implemented - - 24.0.136 Merge branch 'pull/5404' into 1.13-pre - - 24.0.135 Use recommended approach to applying version data to mdk. - - 24.0.134 Fix mdk properties - now the mdk offers default console debug logging - with various useful channels for development enabled. - - 24.0.133 Fixed missed OptionalCapabilityInstance to LazyOptional refactors in patches - - 24.0.132 Refactor OptionalCapabilityInstance to LazyOptional; clean up - - Move to util package, rename to LazyOptional - - Clean up existing javadocs, add javadocs to everything missing them - - Add more NonNull functional interfaces, and use them everywhere - - Move orEmpty() to Capability, works better here anyways - - 24.0.131 More logging tweaks, including some aimed at userdev. - `forge.logging.markers=` will enable markers. - - 24.0.130 Big cleanup of logging. Might do some tweaks of the userdev logging, but this should be good for vanilla.. - - 24.0.129 Cherry pick mezz's logging improvements.. - - 24.0.128 Update to 0.9.0 of modlauncher.. - - 24.0.127 Merge branch 'ichttt-fixDuplicateNamespace' into 1.13-pre - - 24.0.126 Fix some of minecraft's resources loading twice, as minecraft is on the list of namespaces as minecraft and as an empty string - - 24.0.125 Fix modsorter to not crash on soft dependencies that don't exist. - - 24.0.124 Fix resource pack info generator - use the first modid as part of the - pack prefix. - - 24.0.123 Make MOD_CLASSES available to the forge development environment as well. - - 24.0.122 Change MOD_CLASSES to support %% separated paths, that are grouped into - %% sets. Allows for multiple mods to be located in UserDev. - - 24.0.121 Fix handing the "minecraft" dependency properly by adding it to the list - of mods. - - 24.0.120 Send head yaw, use setPositionAndRotation - - 24.0.119 Add license header - - 24.0.118 Clean up patch a bit, check for net.minecraft. - - 24.0.117 Readd modded entity spawning/tracking support - - 24.0.116 Fix first call to ToolType.get always returning null (#5396) - - 24.0.115 Fix NPE in ItemGroup concurrency patch - - 24.0.114 A couple of minor improvements and fixes to ForgeConfigSpec (#5394) - - Use the config file's path instead of the config object in error messages. - - Print the dotted path of each config key instead of the array version (group.item instead of [group item]). - - Fix comments causing a config file to be considered incorrect. - - Pass each list element to the element validator, rather than the whole list. - - 24.0.113 Add RecipesUpdatedEvent, fired when recipes are downloaded from the server. (#5303) - - 24.0.112 [1.13] A sweep through deprecations (#5345) - - 24.0.111 Add a RayTraceResult method to Block that can be can be overridden (#5354) - - 24.0.110 [1.13] Make Caps, TESR, Entity renderers, and keybinds thread safe to call during parallel init (#5359) - - 24.0.109 [1.13] Check canSustainPlant for valid ground in BlockBush (#5362) - - 24.0.108 Repatch missed hasTileEntity redirects. And cleanup related patches. Closes #5369 - - 24.0.107 Fixed fence and iron bars block placement (#5372) - - 24.0.106 Make ChunkGeneratorType.Settings accessible for modders (#5376) - - 24.0.105 Make ItemGroup constructor threadsafe (#5384) - - 24.0.104 Fix item interaction in creative mode. (#5385) - - 24.0.103 Fix #5365: Some chat messages lose their formatting (#5386) - - 24.0.102 Fix vanilla trying to load the constants json as an recipe. Closes #5388 - Force constant names to use namespace of their json file. To prevent conflicts. - - 24.0.101 Add recipe types for faster runtime iteration. (#5312) - - 24.0.100 Fix capability attach event not firing with base type - - 24.0.99 Port Minecraft client patch for 'RenderTickEvent' (#5329) - - 24.0.98 Add back several missing patches for FML events (#5390) - - 24.0.97 Fix dependents not being loaded into mod sorter - - 24.0.96 Improves topological sort - This can be used for mod sorting, dependencies between registries, etc. - e.g. https://github.com/MinecraftForge/MinecraftForge/pull/4694#issuecomment-412520302 - New features: - Now accepts guava graph - Performance improvement: no longer reverse the graph; changed dfs to bfs - Accepets a comparator for secondary order, e.g. natural order, index by map - Now properly reports all cycles in a graph with Tarjan's strongly connected component algorithm - Adds a test to prove the validity of the sort and cycle detection - Modified build.gradle for test source directory and dependencies - Mod loading changes: - Sort mod file info instead of suppliers (we don't have suppliers instances) - Moves cycle error reporting out of topological sort and into mod sorter - Prevent mod file dependencies between mods that share the same file - - 24.0.95 Expose a couple of mods.toml properties properly. Half-implemented - override namespace - still needs to be reviewed and determined how this - might work in detail. - - 24.0.94 Use the reply logical side when enqueing work - When receiving a packet, NetworkDirection.getLogicalSide details where - the packet was the packet was sent from. Therefore, on a client it'll - be SERVER (and vice virsa), and so the work is queued on the sever - thread, instead of using Minecraft. - - 24.0.93 Use minecraft's util class to open files - - 24.0.92 Validate mod ids - - 24.0.91 Fix classcast in autoeventsubscriber, also actually make progression - work properly. This whole thing is a bit of a gross hack. - - 24.0.90 Fix recipe constants being overridden by a blank map. Closes #5380 - - 24.0.89 Fix case error in AutomaticEventSubscriber - - 24.0.88 Tell travis to skip 1.13 builds - they don't work there. - - 24.0.87 Move Registry Events to the mod event bus. - Add infrastructure to allow parallel or synchronous dispatch of - mod events, and pass-through of events to the dispatch system. - - 24.0.86 Greatly improve DeferredWorkQueue API (#5357) - - 24.0.85 Add utilities that RuntimeEnumExtender expects to exist - - 24.0.84 Re-introduce patch for injecting registry mappings during world loading. - And re-introduce registry freezing to ONLY the Register events. - Filter ObjectHolders by registry type and fire between every Register event. - - 24.0.83 Implement ConfigValue as a wrapper around ForgeConfigSpec results (#5361) - - 24.0.82 Fix exploded directory locator to actually scan all paths for a file. - - 24.0.81 Update MDK for new naming scheme - - 24.0.80 Fix up event naming, move them to sensible packages and document everything a bit. - - 24.0.79 [1.13] Expand tag deserializer to add optional values and remove values without overwriting everything. (#5350) - - 24.0.78 Fix mod lifecycle event names - - 24.0.77 Update a bunch of libs, rename some of the mod events to more - meaningful names. - - 24.0.76 Add list support to ForgeConfigSpec. - Fix incorrect Supplier used in ForgeConfigSpec. - Port ForgeChunkManager config to new system. - Delete old Configuration classes. It's finally gone! - - 24.0.75 Add list of so-far skipped 1.12 commits - - 24.0.74 Add CreativeTabs#getLabelColor - Patch skipped, was already applied in https://github.com/MinecraftForge/MinecraftForge/commit/47a11b9a7e35c2a2273b6828bd802f2cb06f5cd7#diff-0ea0358443c2ecf3b8682228736149b3R71 - - 24.0.73 Allow providing a BufferedImage for banner render generation (#5041) - Ported to 1.13 using NativeImage - Co-authored-by: tterrag - - 24.0.72 Fix Mesa biome entry tags in the BiomeDictionary (#5177) - - 24.0.71 Patch PotionHelper to use registry delegates (#5142) - - 24.0.70 Update github stale so issues can be Assigned - - 24.0.69 Fix MC-136995 - Chunk loading and unloading issue with entities placed in exact positions. (#5160) - This includes three commits from 1.12.x: - https://github.com/MinecraftForge/MinecraftForge/commit/c20a5e8805f64097430cf0722011f20862a8df9c - https://github.com/MinecraftForge/MinecraftForge/commit/93b704b459c6f537d3b1651008c49ce1db2e0ca1 - https://github.com/MinecraftForge/MinecraftForge/commit/ee0d43bbde37e258c36de1003436dbe3fcf88077 - Scatter gun patches to improve entity tracking and position tracking. - Provided by Aikar through the Paper project, this commit of patches combines the following patches: - https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0306-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch - https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0315-Always-process-chunk-registration-after-moving.patch - https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0335-Ensure-chunks-are-always-loaded-on-hard-position-set.patch - https://github.com/PaperMC/Paper/blob/fd1bd5223a461b6d98280bb8f2d67280a30dd24a/Spigot-Server-Patches/0378-Sync-Player-Position-to-Vehicles.patch - Co-authored-by: Gabriel Harris-Rouquette - - 24.0.68 Fix blockstate id map calculation. (#5279) - - 24.0.67 Move @EventBusSubscriber application to just after construction instead of pre-init. - - 24.0.66 Make Block.Builder methods accessible. Closes #5310 (#5313) - - 24.0.65 Fix exception mismatch for entity types (#5344) - - 24.0.64 Fix datapack walking not working for mod datapacks. Closes #5334 (#5335) - - 24.0.63 Add missing setSeed calls to ForgeBlockModelRenderer (#5338) - - 24.0.62 Reimplement @ObjectHolder scanning, and expose system for others to add handlers. - Fix forgedev and userdev run configs. - Fix issue in log functions assuming String arguments. - - 24.0.61 Fix reference to IForgeDimension.SleepResult being through Dimension, thus causing a Srg2Source issue. - And improper getWorld patch. - - 24.0.60 Update userdev and runconfigs for ForgeGradle changes. - - 24.0.59 Fix some translation strings. Will pull a big string update from crowdin too. - - 24.0.58 Fire registry events before preinit and after construct. - - 24.0.57 Update to 0.4.0 of modlauncher - - 24.0.56 Fix classloading properly. ModLoadingClassLoader doesn't work - with the proper delegation model. Abandoned it, in favour of injecting - locators into the Transformer classloader directly. - - 24.0.55 Fix up some stuff with resource packs, so the guilist works properly. - - 24.0.54 Update mdk with some tweaks for building - - 24.0.53 Finish up classloading system. Use ModJARURL to locate resources - and enable ModLauncher to use those instead. This allows all mods to load - within the scope of the game classloader, removing weird conflicts and - class discovery problems. - - 24.0.52 client and server work standalone and in forge dev. Next up userdev. - Moved some launchplugin code to the launcher. Moved servermain to - the launcher. - server currently needs cmdline arguments --fml.forgeVersion=24.0.51-1.13-pre --fml.mcVersion=1.13 --fml.mcpVersion=2018.09.12.04.11.00 --fml.forgeGroup=net.minecraftforge.test - - 24.0.51 fix up some discovery code, and make regular runtime _mostly_ work. - Still WIP and doesn't quite get to main screen yet. - - 24.0.50 Fix new launcher jar packaging. - Run license checker over new code. - - 24.0.49 separated fmllauncher code from main forge mod code. This enables much - stronger classloader separation between the two sides. Forge now - loads as a regular mod. - Still needs a bunch of debugging, but structure looks good and game loads - in forge dev. - - 24.0.48 ResourceLocation Utils for doing things.. - - 24.0.47 Better documentation for IForgeWorldType, TERFast, TERAnimation - Also rename AnimationTESR to TileEntityRendererAnimation - - 24.0.46 Fix patch mistake in IForgeWorldType: CUSTOMIZED -> BUFFET - - 24.0.45 Clean progress bar code and fix TextureMap patch (#5304) - - 24.0.44 Implement GuiScreen events for mouse and keyboard (#5297) - - 24.0.43 Add the sender to NetworkEvent.Context for server-side event handlers (#5295) - - 24.0.42 Port most of the world patches (#5294) - - 24.0.41 Change how Forge itself is located to be loaded similar to a real mod. - Fixes Minecraft/Forge annotation data missing. - Fix Capability injection. - - 24.0.40 FastTESR -> TileEntityRendererFast - - 24.0.39 Rendering patches (#5262) - - 24.0.38 Added JVM argument so lwjgl dll extraction works with unicode os usernames, closes #5282 (#5283) - - 24.0.37 Change getWorld function name to prevent inheritance change in Chunk - - 24.0.36 Fix the path handling for mod jar resource packs. (#5228) - - 24.0.35 Add raytrace logic to the GuiOverlayDebugForge, so that the debug overlay can show the currently targetted block and liquid. (#5278) - - 24.0.34 Fix typo in patch, that was preventing the key assigned to the chat keybind from working while in a searchable tab in the creative GUI. (#5276) - - 24.0.33 Fix classloading issues in userdev (and possibly also for things like tests within forgedev) (#5275) - - 24.0.32 World and TileEntity patch work. - TerrtainGen events are removed, 1.13's world gen re-write invalidates them all. - - 24.0.31 Create a userdev-specific main, and include it as an injected file in the userdev jar. (#5231) - - 24.0.30 More entity patch work. ISpecialArmor deleted. - - 24.0.29 Port some patches to 1.13 (#5267) - - 24.0.28 Fix vanilla exception mismatch: DataFixerUpper throws IllegalArgumentException but Minecraft tries to catch IllegalStateException instead, causing a hard crash instead of a soft one. (#5229) - - 24.0.27 Use getRawSchemeSpecificPart to preserve escape characters in uri, fix #5236 (#5237) - - 24.0.26 world.gen.feature patches, worldgen should be stable with vanilla. In all places I looked. - - 24.0.25 More patch work, our async chunk loading doesn't appear to be viable for 1.13. - - 24.0.24 Entity patches progress. - - 24.0.23 Fix race condition causing the FML handshake to hang (#5222) - - 24.0.22 Include project group in ForgeVersion and determine path to patched jar. - While testing we install to net.minecraftforge.test. So don't hardcode it. - - 24.0.21 Item and NBT patches, IShearable blocks are responsible for setting themselves to air, to allow for setting other states. - - 24.0.20 Most client patches done except the render pipeline. - Someone who has more in depth knowledge of that rendering system will need to do it. - - 24.0.19 Add my 'patches_old' directory, so that people can see my "progress". - Once the old folder is done, then patches are done. - Want to know whats still to do? Look in that folder. - Now stop asking. - - 24.0.18 GUI Patches - - 24.0.17 More patchwork. - - 24.0.16 Fix imports, remember to re-run gen patches! - - 24.0.15 Patch work, most of block classes, and fix eclipse run configs. - - 24.0.14 Add a a test publish stage to jenkins file for PRs. Should allow for full publish cycle test without actually publishing. - - 24.0.13 Fix crash when placing furnaces or brewing stands in 1.13 (#5225) - - 24.0.12 Fix changelog classifier, and prevent jenkins from running concurrent builds. - And remove caching from setup, as it doesn't use the rangemap. - - 24.0.11 Make Forge group/name dynamic in MDK as well. - - 24.0.10 Include changelog in published artifacts. - - 24.0.9 Fix jenkinsfile version detection and attempt caching rangemap again. - - 24.0.8 Fix version number not having MC prefix, and build artifacts. - - 24.0.7 Workaround for gradle issue with jar signing. - - 24.0.6 Setup instead of build. - - 24.0.5 Change checkout process. - - 24.0.4 Disable tests until we re-make them. - - 24.0.3 Move cache again, documentation is vague. - - 24.0.2 Potentially fix cache in Jenkinsfile. - - 24.0.1 Fix missing quote. - - 24.0.0 Create jenkins file for new jenkins. - Change version scheme to tag based versions. - -v8.99 -===== - - v8.99.2104 Add missing license headers. (#5192) - - v8.99.2103 MDK progress. - - v8.99.2102 Widen scope of gitignored eclipse files - - v8.99.2101 AdvancementRewards 1.13 patch - - v8.99.2100 Fix mod asset loading - - v8.99.2099 Fix diffuse lighting being broken on vanilla pipeline (#5185) - - v8.99.2098 run textcomponenttranslations through the ForgeI18N message format translator as well. - - v8.99.2097 load languages on the server as well as the client, and fix up a bunch of data packs. - - v8.99.2096 Server run profile, also setup logging for client profile. - - v8.99.2095 Tweak library locating code. Works well on vanilla and dev now. - - v8.99.2094 Fix the forge version presented to the game (remove MC prefix) - - v8.99.2093 Move the version packages somewhere that is now filtered so it doesn't - load twice. - - v8.99.2092 Fall colours - 🎃🎃🎃🎃🎃🎃🎃🎃🎃🎃 - - v8.99.2091 Missing language now presents to the UI. - - v8.99.2090 Better error passing from early to game client launch. - - v8.99.2089 Use the maven artifact code rather than our very outdated copy - - v8.99.2088 Add SHAs for post processors to allow the installer to skip if matching. - SpecialSource needs a update to stabilize output before it can be cached. - - v8.99.2087 Launch in the vanilla launcher now. - - v8.99.2086 More installer related tweaks. - - v8.99.2085 Specify version information using Java 8's Package Version system. - - v8.99.2084 Fix builds without crowdin key, and installer work. - Started moving version out of code. - Include expected vanilla class hashes in universal so we can validate them at runtime. - - v8.99.2083 fix up the examplemod for new FML and add a couple of extra bits. - - v8.99.2082 Use latest paulscode (removes need for soundfix transformer) and fix gitignore. - - v8.99.2081 Branding fixup. - - v8.99.2080 Config GUI tweaks, and MCP is now part of the "minecraft" entry. - - v8.99.2079 Installer work, universal obfed to srg names, and binpatches against SRG named clients. - - v8.99.2078 Fixup the config GUI and get things working again. - - v8.99.2077 Work on installer json generation. - - v8.99.2076 Basic error display GUI. - - v8.99.2075 Work on publishing tasks. - Userdev/universal/mdk done. - mdk needs updating once FG3 user side is finished. - Installer waiting on Interaller project re-write to do install time deobf/patching. - - v8.99.2074 Some tweaks to get the launcher working. - - v8.99.2073 Update mappings to 09/21 snapshots. - Conflict with getMatrix in ITransformation, so renamed to getMatrixVec. - - v8.99.2072 Disable eclipse compiler and switch to SRG patches. - - v8.99.2071 Fix remaining issues preventing compilation, launching, and loading worlds (#5156) - Fix duplicate ID for ingredient serializers - Fix KeyBinding compile errors. No GuiKeyBindingList patches yet. - Implement controls GUI and WorldServer patches - - v8.99.2070 Fixed all compile errors except the 4 in KeyBinding. - - v8.99.2069 More because git likes to split to many - - v8.99.2068 Ran License checker to fix the headers of files missing them. - - v8.99.2067 More work on compile errors, New system for ToolClasses, using a ToolType class instead to de-stringify things. - - v8.99.2066 Block patches and event work (#5138) - - v8.99.2065 Add concept of pushing/poping levels to ForgeConfigSpec as well as comments on those levels. - - v8.99.2064 Fix borked Item patch - - v8.99.2063 Fix the rest of the "easy" compile errors (#5151) - * Add Entity.changeDimension patch and transitively required patches - * Fix throws declaration on CommandSetDimension#execute - * Fix rest of errors in fluid package - * Add PLAYER_REACH attribute - * Fix compile errors in fml.client.config and add GuiButton patch - * Delete unnecessary client.config classes, fix all config errors - * Comment some fluid errors in models - * Fix all errors in common package root, except ForgeHooks - * Mass comment network package - * Experimental conversion of extended states to generic base class - * Fix errors in common.util - * Remove config annotation stuff cuz lex said so - * Make extended state stuff compile fully - - v8.99.2062 Beginning work on redesigning Config API. - - v8.99.2061 More work on recipes, custom ingredients, recipes, and constants should work now. - - v8.99.2060 Tweak to remove javac compile errors related to generics on registries. - Also remove the recipes registry call - they're gone from registries completely. - - v8.99.2059 Net handling pass 2. Tidied up login packet sourcing, generate registry packets. - - v8.99.2058 Net Handshake phase 1. Validates pairings on client and server. - - v8.99.2057 Migrate most of the OreDictionary to tags. - - v8.99.2056 Enforce bounds on min/max registry IDs - - v8.99.2055 Recipe work. No longer a registry. OreDictionary related code removed in favor of Tags. Started moving some OreDict items to tags. - Added code to RuntimeEnumExtender to return existing enum values with the same name if they exist instead of creating more. - - v8.99.2054 Fix errors in commands and getDimension->getId - - v8.99.2053 Revert unintentional change to FG version - - v8.99.2052 Command work, and Added TileEntityType as a Forge Registry. - - v8.99.2051 More compile cleanups. (#5139) - - v8.99.2050 Update MCPConfig to use new ForgeFlower to fix AccessTransformer issues on inner classes. - - v8.99.2049 Fix most of the compile errors in the client package (#5137) - * Add KeyBinding#getKey and clean up errors in KeyModifier - * Add dimension IRenderHandler patches - * Fix most of the compile errors in client package. - The rest are missing Block/KeyBinding patches - * Disable selective reloads until configs are finished - * Add OnlyIn on IForgeDimension to match those of Dimension - - v8.99.2048 Pin MCPConfig version - Cleanup and implement BrewingRecipes - Delete client command related things - Cleanup some biome stuff. - - v8.99.2047 Fix vanilla bug with GLFW init error display - actually the error, not the memory address containing the message - Load natives from the environment var, not hardcoding. - - v8.99.2046 Fix launching in dev - - v8.99.2045 Fix AnvilChunkLoader not having access to chunk cap dispatcher - - v8.99.2044 Add I18n accessor, fix up some mod log messages, make the EnumExtender work. - - v8.99.2043 Port capability patches to 1.13 and refactor to new system (#5134) - * resource package and misc leftover rendering stuff - * Port Item and ItemStack patches - * Extract most item patches to interface - * Refactor Item#setNoRepair to be part of Item.Builder - * Adapt AnimationItemOverrideList to new cap system - * Improve null contract of OptionalCapabilityInstance - * Remove Capability.cast - * Update CapabilityAnimation to new cap system - * Remove OptionalCapabilityInstance#flatMap and add NonNullConsumer - * Add capability patch to Entity, not everything yet - * Fix Entity patch and add missing methods to IForgeEntity - * Fix null contract of CapabilityDispatcher - * Add TileEntity caps - * Adapt FluidUtil to new cap system - * Add world caps - * Add chunk caps - * Clean up cap patches - * Replace all tabs with spaces - * Move builder methods on Item to Item.Builder - Whitepsace fix - * Sided stuff take 2 - * Prevent OptionalCapabilityInstance creating additional empty instances - * Cache getCapability result in AnimationTESR - * Fix imports in TileEntity patch - * Pull out cap code to base class, add village caps - - v8.99.2042 Initial blind port of the mod error screens - - v8.99.2041 Porting Forge rendering code to 1.13 (#5132) - - v8.99.2040 Introduce rework of Capability provider. And reduce errors to <2000 - - v8.99.2039 Remove old paulscode libraries. - Re-work EnumHelper and ObjectHolder systems to bypass JITer of final fields. - Other cleanups. - - v8.99.2038 More error cleanup, reinstanted IForgeReigstryEntry. - The abstract class will be used as the default, and to enable delegates but we should keep it api simple by keeping the interface. - Removed some patches that didnt get removed in the rebase. - - v8.99.2037 Add some missing libraries and work on GuiIngameForge. Down 700 errors. - - v8.99.2036 Tweak - - v8.99.2035 Network init - - v8.99.2034 Server starts - - v8.99.2033 Patches deleted - - v8.99.2032 Zeroth pass on 1.13 - - v8.99.2031 Moving some stuff around, network and server events. - - v8.99.2030 Dediserver runs and talks to clients. - - v8.99.2029 A much more straightforward networking system. - - v8.99.2028 Some beginnings of a network again. - - v8.99.2027 Well, it works, for a game, now. - - v8.99.2026 Some more stuffs. ObjectHolder's replacement? - - v8.99.2025 Things. they work. Obviously still WAY more to do. - - v8.99.2024 more things. Moving ModContainer around. - - v8.99.2023 metadata is dead - - v8.99.2022 Fidgeting while the world burns 🔥🔥🔥🔥🔥🔥 - - v8.99.2021 WOW 😲 such broken. Many brokes. - - v8.99.2020 Holy Moly, it's a big fat commit of broken code! - - v8.99.2019 Starting to put the launch itself together - - v8.99.2018 Access Transformer. Starting to try and launch things. - - v8.99.2017 Early signs of modloading - - v8.99.2016 Coremod - - v8.99.2015 Update NewFML.md - - v8.99.2014 Add documentation explaining changes. - - v8.99.2013 Goodbye @Mod, it was lovely knowing you! - - v8.99.2012 Goodbye @Mod, it was lovely knowing you! - - v8.99.2011 Delete MarkerTransformer. I don't think this has been used in years. - - v8.99.2010 Fix --mods and --modListFile arguments not making it past LaunchWrapper. - - v8.99.2009 Remove BlamingTransformer (#5115) - - v8.99.2008 Fix more apache exclusions. - - v8.99.2007 Change org.apache to org.apache.maven. class loader exclusion. - - v8.99.2006 Increase time it takes for Github Pull Requests to go stale - - v8.99.2005 Add variant alias for item models not loaded via blockstate (#5025) - - v8.99.2004 Added getter for children of CompoundIngredient (#5082) - - v8.99.2003 Allow network leak detection level to be specified (#5067) - - v8.99.2002 Fix saved toolbars not working with non-vanilla items (#5063) - - v8.99.2001 Fix server watchdog thread occasionally crashing on first run (#5019) - - v8.99.2000 New SleepingTimeCheckEvent to add yet another way to control sleeping. (#5013) - - v8.99.1999 Allow sending packets to client from ServerConnectionFromClientEvent (#4991) - - v8.99.1998 Fixed overworld spawn point reset when respawning in another dimension (#4982) - - v8.99.1997 Fix ModList cache never being updated (#5081) - - v8.99.1996 Fix loading languages with no underscore in the name (#5105) - - v8.99.1995 Fixed Redstone and RedstoneDiodes placement on modded blocks that use BlockFaceShape.SOLID for Top. (#5100) - - v8.99.1994 Fix blank Server GUI console log (#5089) - - v8.99.1993 Fix SlotItemHandler.isItemValid check - - v8.99.1992 Improve performance of FluidRegistry.getBucketFluids - - v8.99.1991 Fix received data for last vertex format element not being recorded (#5074) - - v8.99.1990 Fix missing lang entry for Swim Speed attribute (#5064) - - v8.99.1989 Added Swim Speed Attribute to EntityLivingBase (#4990) - - v8.99.1988 Add function to lookup model location for an ItemStack (#5017) - - v8.99.1987 Allow custom SpawnPlacementType registration (#4973) - - v8.99.1986 Resource type sensitive ResourceManager reloading, Disabled by default, but may increase performance. (#4658) - - v8.99.1985 Improve crash report details (#5011) - - v8.99.1984 Fire colour events for mesa and swamp biomes (#5029) - - v8.99.1983 Add functionality in IItemHandler to test if a slot can accept an item (#5033) - - v8.99.1982 Added CreativeTabs#getBackgroundImage (#5034) - - v8.99.1981 Add wooden doors to the OreDictionary. (#5036) - - v8.99.1980 Update and clean up Forge fluid render model (#4763) - - v8.99.1979 Allow configuring log levels using system properties. (#5024) - Defaults are: - -Dforge.logging.mojang.level=info (note that setting this to debug or trace will enable extra debug behavior which may slow things down or detect issues and crash) - -Dforge.logging.console.level=info - -Dforge.logging.file.level=info - -Dforge.logging.debugFile.level=trace - - v8.99.1978 Update README on github to fix the CLA section - - v8.99.1977 Add support for FluidStack-dependant colouring to Forge bucket (#4952) - - v8.99.1976 Use itemstack in LivingEntityUseItemEvent.Finish before it was used (#5015) - - v8.99.1975 Check use item result before calling onItemUseFirst. (#5016) - - v8.99.1974 Clean up and improve ICapabilityProvider javadocs (#4978) - - v8.99.1973 Update license header on ChunkIOThreadPoolExecutor - - v8.99.1972 Fix potential deadlock when chunkload raises non-IO exception (#4861) - - v8.99.1971 Fix MDK not having license texts. - - v8.99.1970 Change some client hooks to use GlStateManager functions (#5010) - - v8.99.1969 Move some test mods into appropriate packages (#5006) - - v8.99.1968 Write full class name in undefined packet error messages. (#4970) - - v8.99.1967 Fix ItemHandlerHelper.giveItemToPlayer creating item entities with incorrect contents (#5007) - - v8.99.1966 Run licenseFormat to apply license header to all files. - - v8.99.1965 Restore original license headers in Maven versioning package - - v8.99.1964 Restore original license headers of delta package - - v8.99.1963 Setup configuration for licenser Gradle plugin - - v8.99.1962 Fix player movement status not syncing across dimension change (MC-10657) (#4974) - - v8.99.1961 Fix some ClassCastExceptions incorrectly being logged in FML handshake. (#4972) - - v8.99.1960 Fix ISpecialArmor to allow for "Unblockable" damage to be handled if the armor opts in. (#4964) - - v8.99.1959 Fix FML entity network spawning not using EntityBuilder's facctory. Closes #4845 and #4846 - - v8.99.1958 Fix NPE when sleeping in some custom beds. Closes #4956 - - v8.99.1957 Added Fluid Place Block Event for when fluid changes blocks in world. (#4627) - - v8.99.1956 Cleanup licenses - - v8.99.1955 Add Farmland Trample Event (#4895) - - v8.99.1954 Switch from trove to fastutil collections (#4933) - - v8.99.1953 Added Item#readNBTShareTag(ItemStack, NBTTagCompound) (#4932) - - v8.99.1952 Fix MC-234: Z-fighting when viewing break animation side-on (#4928) - - v8.99.1951 Clean up some dimension manager code and add a command to list dimensions (#4902) - - v8.99.1950 Change item model loading priority to fix model conflicts (#4898) - - v8.99.1949 Improve server console implementation (#4821) - - v8.99.1948 Add validation to recipe registry (#4957) - - v8.99.1947 Fix flickering leaves when mods break the blurMipmap settings (#4997) - - v8.99.1946 Clear out stored errors after model loading finishes (#4938) - - v8.99.1945 Fix AutomaticEventSubscriber error message (#4986) - - v8.99.1944 Always wrap mod creation errors in LoaderException - to make error message more clear - - v8.99.1943 Fix vertex lighter using stale normal data (#4917) - - v8.99.1942 Fix structure template processors causing cascading world generation (#4979) - - v8.99.1941 Fix scala mods crashing with the json annotation cache. - - v8.99.1940 Fix black flickering on animated models by clamping max diffuse lighting multiplier to 1.0 (#4962) - - v8.99.1939 Fix crash from search tree processing invalid recipes (#4942) - - v8.99.1938 Fix names in JSON annotation data not matching expected format. Closes #4953 - - v8.99.1937 Bump version in prep for new RB. - - v8.99.1936 Add potential support for models defining 'vanilla like' rotations in Forge's Modified Blockstate format. - - v8.99.1935 Copy the Dedicated server's EULA checking to main() function so it can exit earlier. Closes #3659, #3661 - - v8.99.1934 Fix Forge bucket not declaring all texture dependencies (#4930) - - v8.99.1933 Reuse multipart model instances across variants (#4791) - - v8.99.1932 Fix language parsing for creating the java locale - - v8.99.1931 Fixes parameter inconsistency in IFieldWrapper (Fixes #4325) (#4766) - - v8.99.1930 Added formatting support for status messages (#4925) - - v8.99.1929 Fix server-side data not being released (#4882) - - v8.99.1928 Fix memory leaks in EnchantmentHelper (MC-128547) (#4880) - - v8.99.1927 Change composite models to fetch quads from submodels using full context (#4809) - - v8.99.1926 Expand Villager Farmer AI to generic crops. (#4745) - - v8.99.1925 Check name prefix used for tile entity registrations (#4681) - - v8.99.1924 Add an event to control nether portal formation (#4735) - - v8.99.1923 Allow custom models to have per-state lighting (#4732) - - v8.99.1922 Fix some light-emitting blocks letting light through (MC-119932) (#4642) - - v8.99.1921 Preserve original ChunkPos for decoration events. (#4767) - - v8.99.1920 Fix library folder detection on various JVMs. - - v8.99.1919 Add supports for redirects when doing mod version checks (#4826) - - v8.99.1918 Fix imports - - v8.99.1917 Give immediate and complete error messages when there is a crash during startup (#4869) - - v8.99.1916 Revert "Give immediate and complete error messages when there is a crash during startup (#4869)" - This reverts commit a38f5fd6a24297490671cd300b5e4a9020189f63. - - v8.99.1915 Remove invalid optimization in ItemStackHandler#setStackInSlot #3465 - - v8.99.1914 Give immediate and complete error messages when there is a crash during startup (#4869) - - v8.99.1913 Clean up mod dependency checking code (#4922) - - v8.99.1912 Fix version range check for required mods #4918 - - v8.99.1911 Add javadoc note about minimum required Forge versions for old Forge. Close #4918 - - v8.99.1910 Fix possible NPE when calling Loader.getIndexedModList #4919 - - v8.99.1909 Fix MC-12269 Various Particles glitchy movement (#4914) - - v8.99.1908 Fix deobfuscator not regenerating super maps (#4856) - - v8.99.1907 Clean up broken aliases caused by registry bug #4894. (#4909) - - v8.99.1906 Move registry snapshot read/write code to Snapshot class. Cleaner code. - - v8.99.1905 Only revert to frozen data on server shutdown on client. Should fix race condition exposed by #4904 - - v8.99.1904 Potentially fix issue with BungeeCord or other servers resetting the registry mappings on the client while the game is running. - Errors may still occure if the client knows about world data beyond vanilla. Servers should NEVER send world/registry invocations before they have sent registry mappings. - Closes #4901 - - v8.99.1903 Reduce range requirement for World.checkLightFor from 17 to 16 (#4729) - - v8.99.1902 Fix typo in validation of vanilla registry wrappers (#4899) - - v8.99.1901 Fix #4772: add an "isActivator" boolean to powered rails (#4774) - - v8.99.1900 Add checks for undefined packet discriminators when sending messages (#4890) - - v8.99.1899 Fix some code holding client world references longer than needed (#4881) - - v8.99.1898 Don't try to render removed tile entities. Fixes MC-123363 (#4811) - - v8.99.1897 Fix overrides typo in saving registry data. Closes #4894 - - v8.99.1896 Fix library path and soft fail when repository root is not found. - - v8.99.1895 Fix libraries not being added to the modlist when using external metadata. Closes #4879 - - v8.99.1894 Fix dragon fight not initialising correctly under some circumstances (#4868) - - v8.99.1893 Cleanup some issues with the mod extraction to the memory modlist. Closes #4874 #4875 - - v8.99.1892 Improve missing mod dependency error screen (#4762) - - v8.99.1891 Fix biome dictionary's biome type detection (#4878) - - v8.99.1890 Clean up Reader/Writer handling to use a specified charset (#4872) - - v8.99.1889 Suppress firing events at load time if an error has already occurred (#4801) - - v8.99.1888 Fix FluidUtil.getFluidHandler skipping some fluid tile entities (#4854) - - v8.99.1887 Parse contained dependency Timestamp as long instead of int (#4866) - - v8.99.1886 Fix Forge's metadata not being loaded. Closes #4865 - - v8.99.1885 Fix mods without ModSide meta value. - - v8.99.1884 Rewrite dependency extraction to use mod list system (#4841) - - v8.99.1883 Bump Forge version for new dev chunk. - - v8.99.1882 Fix vanilla duplication bug. - - v8.99.1881 Slow down Forge chunk gen worker when save queue is to high. - Prevents task from completing while tons of chunks are pending save. - And add minimum notification every 60 seconds. - - v8.99.1880 Add support for World Workers skipping ticks without being removed from the worker list. - - v8.99.1879 Fix MC-88179 in a better way that avoids and closes #4824 (#4830) - - v8.99.1878 Improve the warning logged for cascading world generation (#4725) - - v8.99.1877 New ITeleporter interface making dimensional teleportation easier. (#4602) - - v8.99.1876 Add a FML outbound target for all players tracking a point or entity in the world. Closes #3677 (#4631) - - v8.99.1875 Prevent EntityPlayer.attackEntityFrom from firing LivingAttackEvent twice (#4661) - - v8.99.1874 Add a way to get a list of registered biome types (#4685) - - v8.99.1873 Improve performance of some ExtendedBlockState methods (#4698) - - v8.99.1872 Optimise adding normal element to vertex formats (#4699) - - v8.99.1871 Check for empty dimensions outside of chunk unloading loop, culling worlds without needing chunk unloads to trigger it. (#4704) - - v8.99.1870 Create event for overriding mob griefing flag based on entity. (#4710) - - v8.99.1869 Add description to Error raised by the server hang watchdog. (#4714) - - v8.99.1868 Update ItemHandlerHelper.giveItemToPlayer to allow player who picked up the item to hear the sound as well (#4720) - - v8.99.1867 Fixed Spectator mode particles and sounds computed from where you have been before (MC-46445) (#4728) - - v8.99.1866 Add a WorldProvider#canSleepHere() method to allow providers to control sleeping in beds separately from re-spawning. (#4741) - - v8.99.1865 Fix FMLCommonHandler#exitJava printing useless/wrong calling info (#4742) - - v8.99.1864 Reduce memory usage of model transforms (#4753) - - v8.99.1863 Fix some block connection logic not matching vanilla (#4781) - - v8.99.1862 Fix for the player inadvertently being removed from the Entity Tracker when the chunk they were in unloads after they teleport out of it. (#4784) - - v8.99.1861 Small performance improvement to ItemStack, by using Items.AIR directly instead of getting it from the Block map. (#4786) - - v8.99.1860 Added chunk instance to ChunkWatchEvent (#4805) - - v8.99.1859 Add fences and fence gates to ore dictionary (#4807) - - v8.99.1858 Fix entities sometimes not rendering when out-of-world (#4823) - - v8.99.1857 Fix issues with the test mods - - v8.99.1856 Reorganise test mods into packages (#4706) - - v8.99.1855 Fix servers crashing due to initializer on @SideOnly field (#4825) - - v8.99.1854 Cleaner TileEntityItemStackRenderers, now stored on the Item. Modders should be careful and cache their renderers. (#4700) - - v8.99.1853 Add support for creator mod ID for modded enchanted books, potions, arrows, and spawn eggs (#4810) - - v8.99.1852 Remove Mercurius from optional mods. - - v8.99.1851 Fixed sound engine crash when stopping streaming sounds (#4765) - - v8.99.1850 Merge vanilla pre-decompile annotations with Forge's post-patching. Fixes #4769 Crash detail classes causing class not found errors. - - v8.99.1849 Fix NBT data loss when shift-clicking stacked items in the enchantment table (MC-17431) (#4817) - - v8.99.1848 Update docs for ItemTooltipEvent - - v8.99.1847 Fix some IResources being leaked (#4806) - - v8.99.1846 Fix server console logging issues - Closes #4808 - - v8.99.1845 Fix up logging and log4j configuration (#4802) - - v8.99.1844 Make lookupFluidForBlock work for flowing water and lava (#4675) - - v8.99.1843 Patched BlockInfo#updateLightMatrix to use IBlockState#doesSideBlockRendering instead of Block#doesSideBlockRendering (#4798) - - v8.99.1842 Fix integrated server crash not stopping client (#4796) - - v8.99.1841 Fix #4792 TextComponentHelper handling for FakePlayers - - v8.99.1840 Fix serverside startup failure when checking for vanilla acceptance (#4783) - - v8.99.1839 Improve how smooth lighting code handles translucency (#4711) - - v8.99.1838 Prevent various vanilla blocks from loading unloaded chunks (#4689) - - v8.99.1837 Improve the "Mod rejections" error message when connecting to a server (#4761) - - v8.99.1836 Fix the ForgeChunkManager to use the writebehind FileIO thread for writing (#4777) - the chunk file. Closes #4775 - This is a performance tweak - doing File IO on the server thread during - world saves causes significant lag spikes. This is one of many. - - v8.99.1835 Fix vanilla crash classes not being preloaded. Closes #4769 - Fix classes not being aggregated for mods using the new annotation cache. - - v8.99.1834 Fix incorrect dimension ID being used for maps (#4690) - - v8.99.1833 Don't cull generated item models with non-default transforms (#4749) - - v8.99.1832 Maintain deterministic order in deserialised Forge blockstates (#4748) - - v8.99.1831 Add function to BufferBuilder to directly insert byte data. Closes #4722 - - v8.99.1830 Clean up some GUI code and change magic numbers to GL constants (#4734) - - v8.99.1829 Minor cleanup for TestAnnotationParser - - v8.99.1828 Initial implementation of JSON based annotation scanning. - Disabled by default for now, until proven to be fully function. - Enable using -Dfml.enableJsonAnnotations=true - - v8.99.1827 Remove Mercurius from release JSON, Sadly it's dead we may address it at a later date. - - v8.99.1826 Update Github Stale bot message to better explain how to un-stale issues - - v8.99.1825 Bump version for RB. - - v8.99.1824 Change chunk gen command to only keep the target dimension loaded (#4705) - - v8.99.1823 Fix inconsistency between vanilla and modded glass. Closes #4679 (#4680) - - v8.99.1822 New hook in WorldProvider to control client lighting re-checks (#4645) - - v8.99.1821 New hook to delegate some liquid related physics to the blocks themselves. (#4604) - - v8.99.1820 Remove texture loads from SimpleModelFontRenderer (#4721) - - v8.99.1819 Fix some shapeless recipes using damageable items not working (#4713) - - v8.99.1818 Use relative time offset, rather than absolute value, for animations (#4635) - - v8.99.1817 Fixed UV contraction for the texture in the top-left corner of the texture map (0, 0), see sp614x/optifine#1024 (#4703) - - v8.99.1816 Fix some test mods preventing Forge server-Vanilla client connections (#4616) - - v8.99.1815 Fix errors in preInit being lost when followed by a crash in fireRegistryEvents or objectHolder - - v8.99.1814 Added @Ignore to the annotation based Config system. (#4696) - - v8.99.1813 Improve error message on server when a vanilla client connects (#4691) - - v8.99.1812 Fixed pumpkins passing the wrong position to isSideSolid on placement (#4686) - - v8.99.1811 Fix MusicType enumhelper not working (#4682) - - v8.99.1810 Make FluidUtil sounds server-side, add simulate option for tryFill/EmptyContainerAndStow (#4623) - - v8.99.1809 Expose CriteriaTriggers.register, closes #4109 (#4634) - - v8.99.1808 Catch and log exceptions during model baking (#4609) - - v8.99.1807 Fix forge fluids being treated as solid blocks (#4606) - - v8.99.1806 Add MobSpawnerBaseLogic reference to SpecialSpawn and CheckSpawn events (#4600) - - v8.99.1805 Fix default GUIConfig displaying child categories twice (#4599) - - v8.99.1804 Added a tooltip color event. (#4595) - - v8.99.1803 Moved firing the MinecartInteractEvent from individual subclasses up to EntityMinecart, which as a result automatically supports EntityMinecartMobSpawner and EntityMinecartTNT. (#4583) - - v8.99.1802 Add missing check for allowed values to recolorBlock() (#4579) - - v8.99.1801 Avoid copying Forge Registry keys, values, and entries (#4545) - - v8.99.1800 Make async chunk loading a config option (#4544) - - v8.99.1799 Allow WorldProviders to specify in-game music (#4539) - - v8.99.1798 Block::addRunningEffects (#4248) - - v8.99.1797 [1.12.x] Implement hooks allowing mods to add horse armor. Partially addresses #3975. (#3994) - - v8.99.1796 Fix debug flags for ClassPatchManager not working. Closes #3674 - - v8.99.1795 Fix FML error logging for mods that crash during FMLLoadCompleteEvent - - v8.99.1794 Minor code and documentation cleanup. (#4664) - - v8.99.1793 Fix dormant chunk cache allowing entity data to be overwritten (#4528) - - v8.99.1792 Fix dimension data not being saved (#4667) - - v8.99.1791 Don't copy state from variant to multi-part model (#4629) - - v8.99.1790 Fix vanilla giant jungle trees causing cascading generation (#4652) - - v8.99.1789 Fix Beetroot crops don't break/drop when trampled (#4644) - - v8.99.1788 Enhance crash message when custom models return null default state (#4615) - - v8.99.1787 Update Github StaleBot config to run on old Issues as well as PRs - - v8.99.1786 Downgrade RegistryEntry's dangerous alternative prefix message to info instead of BigWarning. - This is still most likely a broken mod, but nobody ever actually fixes themselves, and i'm tired of being blamed for 'spamming' the logs. - - v8.99.1785 Fix missing call to release() in the event channel handler (#4513) - (reverted from commit cd99957627625f7baeff8761c6382b05db9699d3) - - v8.99.1784 Added Custom Slime Block hook for Piston. (#4520) - - v8.99.1783 Add some extra context to Advancements/Minecart/Fishing/TileEntity loot handlers.(#4443) - - v8.99.1782 Adjust light matrix calculations to use per-face logic (#4339) - - v8.99.1781 Fix applyUVLock not preserving input order (#4336) - - v8.99.1780 Adjust diffuse light calculation to match vanilla facing values (#4305) - - v8.99.1779 Fix invalid rendering of single-frame B3D models (Fix #3815) - - v8.99.1778 Fix animation of rotated block parts (#4156) - - v8.99.1777 Fix BakedQuadRetextured not overriding getSprite (#4137) - - v8.99.1776 Added LivingKnockBackEvent event to allow better control over knock back effects. (#4503) - - v8.99.1775 Delay egg creation to avoid null statistics (#4508) - - v8.99.1774 Fix missing call to release() in the event channel handler (#4513) - - v8.99.1773 Reimplemented TileEntity and Entity Update Profiling in the /forge track command (#4521) - - v8.99.1772 [macOS] Fix missing text on loading error screens (#4532) - - v8.99.1771 Don't enforce IPv4 for clients connecting to IPv6-only servers (#4563) - - v8.99.1770 Add an event for registering block/item colour handlers (#4565) - - v8.99.1769 Fix: Anvil Bug with Custom Damage Items. (#4570) - - v8.99.1768 BlockFlowerPot now checks solid top side instead of old method. (#4571) - - v8.99.1767 Fix startIndex for /forge generate position parsing (#4572) - - v8.99.1766 Make vanilla powered rails receive power from mods' custom powered rail subclasses (#4573) - - v8.99.1765 Deprecate passing a class to CapabilityManager::register (#4574) - - v8.99.1764 Add missing nullability annotations to some Forge-added methods (#4578) - - v8.99.1763 Change how chests check if they're blocked. (#4584) - Readd Vanilla Bug: https://bugs.mojang.com/browse/MC-378 - - v8.99.1762 Allow EntityFishHook to spawn water particles in all liquids that use Material.WATER (#4585) - - v8.99.1761 Add Sound loading progress bar (#4593) - - v8.99.1760 Clean up capability checking for entities (#4591) - - v8.99.1759 Fix sometimes being unable to extract items from double chests (#4590) - - v8.99.1758 Fix item handler documentation that says returning ItemStack.EMPTY is required (#4587) - - v8.99.1757 Added color as field with setter to Fluid class. (#4460) - - v8.99.1756 Prevent tooltips from going off the top of the screen. - - v8.99.1755 [1.12] Add Advancement Event (#4467) - - v8.99.1754 Update java docs for IItemHandler. Fix #4553 - - v8.99.1753 Restore binary compatibility in EntityItemPickupEvent - - v8.99.1752 Re-enable Vanilla's Shapeless recipe matching. - - v8.99.1751 Fix for the EntityItemPickupEvent having 0 count item when event is fired. (#4549) - - v8.99.1750 Don't force IPv4 network stack if IPv6 is specifically requested (#4547) - - v8.99.1749 Fix more bad shapeless recipe matching. Closes #4557 - - v8.99.1748 Version bump for Recommended Build. - - v8.99.1747 Add TAG_LONG_ARRAY to Constants.NBT (#4552) - - v8.99.1746 Create custom shapeless recipe matching system. Should solve #4516 damageable items in shapeless recipes. - - v8.99.1745 Clean up old code for detecting BaseMods. Close #4530 (#4540) - - v8.99.1744 Fix BufferBuilder not expanding under some conditions. (#4538) - - v8.99.1743 Add support.yml for support bot on github. - - v8.99.1742 Fix errors caused by multi-target messages sent from LAN host (#4536) - - v8.99.1741 Fix server icon response leaking buffer (MC-122085) (#4534) - - v8.99.1740 Fix CompoundIngredents not working properly in shapeless recipes. - - v8.99.1739 [1.12.x] Added BucketUse event to ForgeUniversal Bucket (#4454) - - v8.99.1738 Non-player entities now respect WorldProvider.getMovementFactor, closes #4470 (#4471) - - v8.99.1737 Fix entity spawn messages not handling buffer correctly (#4524) - - v8.99.1736 Make Ingredient explode wildcard values like OreIngredient. - Fixes some issues related to Grums order fix for Shapeless recipes. - Other more advanced usages need to be documented and tested. - - v8.99.1735 Fix server incorrectly marked as stopped before forge's handleServerStopped() (#4517) - - v8.99.1734 Fix network buffer leak with multi-part messages (#4511) - - v8.99.1733 Fix buffer leak in vanilla custom payload packet handling (#4512) - - v8.99.1732 Fix network buffers not being released in some places (#4510) - - v8.99.1731 Fix resource loading on some mac systems when SplashProgress is enabled (#4082) - - v8.99.1730 Fix MC-51150 (#4495) - - v8.99.1729 Fix incorrect lighting of item models (#4493) - - v8.99.1728 Change item model alpha tests to match values used for rendering (#4490) - - v8.99.1727 Fix NPE when player tries to sleep without bed (#4487) - - v8.99.1726 Added tint index of 0 to fluid models (#3938) - - v8.99.1725 Fix FastTESR quad sort (#4298) - - v8.99.1724 Fix the incorrect matching algorithm in ShapelessRecipes and ShapelessOreRecipe (#4472) - - v8.99.1723 Fix BlockDynamicLiquid using mismatched state/position pair (#4501) - - v8.99.1722 Fix more test mod warnings (#4477) - - v8.99.1721 Add LivingDamageEvent (#4349) - - v8.99.1720 Create IRecipeContainer interface and implementation to allow RecipeBook to work on custom GUIs (#4480) - - v8.99.1719 Add InputUpdateEvent (#4356) - - v8.99.1718 Added a cloud renderer that uploads geometry to the GPU. (#4143) - - v8.99.1717 [1.12] Replace ThrowableImpactEvent with a more generic version (#4040) - - v8.99.1716 Clean up BlockSnapshot code (#3737) - - v8.99.1715 Fixed property losing state after rename. (#4123) - - v8.99.1714 Fix GameData#revert ignoring RegistryManager parameter (#4232) - - v8.99.1713 Allow custom selector types to be defined (#4259) - - v8.99.1712 Clean up more deprecated library functions (#4283) - - v8.99.1711 Improve performance of World.collidesWithAnyBlock (#4286) - - v8.99.1710 Move reach distance to an attribute (#4331) - - v8.99.1709 Resolve a crash relating to plantFlower when biome has no flowers (#4381) - - v8.99.1708 Improve the Forge Bucket (#4435) - - v8.99.1707 Prevent fake players from making advancements (#4438) - - v8.99.1706 Further reduce quad count of generated item models (#4448) - - v8.99.1705 Fix killing blow causing combat tracker to lose data (MC-121048) (#4452) - - v8.99.1704 Recalculate chunk height map minimum on load (#4453) - - v8.99.1703 Changed BlockFluidBase "fog" color use color from Fluid getColor() method (#4462) - - v8.99.1702 Improve performance of inserting into inventory wrappers (#4468) - - v8.99.1701 Fix some locations where State Sensitive Materials were not used. Closes #4474 - - v8.99.1700 Add caching of data for flat lighting (#4358) - - v8.99.1699 Fix spider/chicken jockeys being unable to spawn naturally (MC-103516) (#4429) - - v8.99.1698 Clean up Forge commands. Add HelpCommand. Fix #4444 (#4451) - - v8.99.1697 Fix some more test mod warnings (#4469) - - v8.99.1696 [1.12.x] [Animation API] Add rotation origin variable (#4466) - - v8.99.1695 Fix some warnings produced by test mods (#4456) - - v8.99.1694 Fix performance regression in FastTESR rendering - - v8.99.1693 Fix outdated VersionParser javadoc link - - v8.99.1692 Add configuration for probot-stale for github - - v8.99.1691 Update mcp mappings to 20171003 - - v8.99.1690 [1.12] Add support for client & server dependencies for mods (#4403) - - v8.99.1689 Add Item.getModId to show which mod is associated with a subitem (#4330) - - v8.99.1688 Add Chunk capabilities (#4228) - - v8.99.1687 Fix some chunk data packets being created unnecessarily (#4414) - - v8.99.1686 Improve performance of vertex format mapping by caching hashcodes (#4370) - - v8.99.1685 Reduce the number of quads generated by ItemLayerModel (#4332) - - v8.99.1684 [1.12] Check both hands for sneak interaction bypass (#4256) - - v8.99.1683 Allow item models to use formats other than ITEM (#4273) - - v8.99.1682 Fix being unable to see with night vision under some conditions (#4383) - - v8.99.1681 Fix block and torch placement logic not matching vanilla (#4210) - - v8.99.1680 Add hook to configure EntityEquipmentSlot for item. - - v8.99.1679 Store entity data for dormant chunks using NBT (#4162) - - v8.99.1678 Allow for MapDecoration to use alternate rendering, for example a custom spritesheet (#4027) - - v8.99.1677 Remove limitation of Shaped crafting recipes not being used on grids larger than 3x3 - - v8.99.1676 Fix not being able to write in a blank, renamed Book and Quill (#4433) - https://bugs.mojang.com/browse/MC-1685 - - v8.99.1675 Add new /forge entity list command for displaying a list of all entities in world. - As well as tracking down chunks with large amounts of entities. - - v8.99.1674 Fix test mod shield JSON incorrect bottom face UV's (#4295) - - v8.99.1673 Prevent a mutable BlockPos leak in World#setBlockState (#4388) - - v8.99.1672 Fix IngredientNBT comparing stackSize when checking if ingredient is valid (#4418) - - v8.99.1671 Auto-detect registry namespace when using a legacy string id in EntityEntryBuilder fixes #4410 (#4411) - - v8.99.1670 Introduce entity entry builder, useful in the Register event replacing needed calls to EntityRegistry. (#4408) - - v8.99.1669 MC 1.12.2 update. - - v8.99.1668 Fix lightmap calculation vertex clamping (#4387) - - v8.99.1667 Fix chunk gen mobs not firing the CheckSpawn event. Closes #4394 (#4396) - - v8.99.1666 Add an extra error check for OBJ model materials (#4402) - - v8.99.1665 Fix up test mods (#4399) - - v8.99.1664 Add new /forge gen command to generate large amounts of chunks. - Usage: /forge gen [dimension] [notifications] - Position is in Block Coords, and can be relative to the player. These will be converted to chunk coords for you. - Count is the number of chunks to load. This is not a radius, actual total number of chunks. - Dimension is optional, you can use this to pregen other worlds. - Notifications is the chunk interval to inform you of the generating progress. This is optional and will be 5% or 100 whichever is higher. - Added new config option to modify vanilla world gen to fix various cascading issues. MC-117810 MC-114332 and more. - This WILL change block placement from vanilla world gen. So this is a opt-in value. Do not report differences in worlds with this flag enabled. - - v8.99.1663 Fixed ShapedOre recipes not laying out correctly with the guidebook. - - v8.99.1662 Fixed search tabs using wrong contents. (#4393) - - v8.99.1661 Bump version for RB. - - v8.99.1660 Fix #4386 Race condition when unloading chunks causes dead tile entities - - v8.99.1659 Patch block model renderer to use location-aware light value (#4303) - - v8.99.1658 Improve generation of normals for vanilla models (#4313) - - v8.99.1657 Fire RenderGameOverlayEvent for vignette (#4360) - - v8.99.1656 Fix light sources rendering wrongly with night vision (MC-58177) (#4365) - - v8.99.1655 Fix CustomModLoadingErrorDisplayScreen not being handled during init or preinit. (#4320) - - v8.99.1654 Insert FML handler before Vanilla connection handshake completes (#4380) - - v8.99.1653 Add missing bounds checks to ItemTextureQuadConverter (#4343) - - v8.99.1652 Allow custom GuiEditArrayEntries without having to recreate the object in several places (#4329) - - v8.99.1651 Add support instructions to be displayed when creating an issue on Github (#4323) - - v8.99.1650 Adjust float (un)packing functions to be slightly more accurate (#4316) - - v8.99.1649 Fix vanilla map pixel data being used in various places (#4068) - - v8.99.1648 [1.12] Remove patches adding chunkExists() function, switch to vanilla code (#4054) - - v8.99.1647 Added missing MapGen types to the InitMapGenEvent (#4322) - - v8.99.1646 Fix nether wart, pumpkins, and melons passing the new state as the original state to CropGrowEvent.Post (#4377) - - v8.99.1645 Fix FieldWrapper.MapWrapper initialising wrong category (#4335) - - v8.99.1644 Don't parse category names as regular expressions in FieldWrapper.MapWrapper (#4334) - - v8.99.1643 Fix issue saving observers using different metadata then vanilla. - - v8.99.1642 Fix netty warning spam when sending >1MB packets (#4363) - - v8.99.1641 Fix FML handshake crash, fixes #4285 and #3974 (#4304) - - v8.99.1640 Fix recipe book auto-fill not working for OreDictionary ingredients. - - v8.99.1639 Fix KeyBindings reset buttons being inverted. - - v8.99.1638 Fix for dummied server side registry entries while client has read entries. - - v8.99.1637 Tabulate crash report mod list and add signature information (#4251) - - v8.99.1636 [1.12] Fix wood plank ore dictionary recipes (#4310) - - v8.99.1635 Fix UnknownFormatConversionException during erroring TE/Entity removal (#4312) - - v8.99.1634 Add support for server side only recipes, as well as detection of vanilla client recipe book filter to prevent errors. - - v8.99.1633 Fix typo in CapabiltyFluidHandler (#4306) - - v8.99.1632 Fix splitting big packets skipping one byte per additional part (#4301) - - v8.99.1631 Fix tests - - v8.99.1630 Add PlayerSPPushOutOfBlocksEvent. (#4091) - - v8.99.1629 Add Ability to Override PotionEffect Default Sort Order (#4172) - - v8.99.1628 Add support for oredict item predicates in advancements, and add a registry for item predicates (#4188) - - v8.99.1627 Add support for running IModel.retexture() on models from blockstates (#4200) - - v8.99.1626 Fix invalid FastTESR quad ordering (#4267) - - v8.99.1625 Continue loading mod recipes and advancements after encountering an error (#4277) - - v8.99.1624 Add a hook to allow world providers to change the lightmap colours (#4279) - - v8.99.1623 Fix MC-117075 lag spike when unloading many tile entities (#4281) - - v8.99.1622 Better descriptions on dependency version range error screen (#4284) - - v8.99.1621 Filter out scala libraries in forge dev workspace. - - v8.99.1620 Fix IOUtils import error caused by server/client libraries desync. - - v8.99.1619 Fix odd NPE with list files for empty directories. - - v8.99.1618 Fixed missing line in logger. - - v8.99.1617 Cleanup some output and move the Jar-In-Jar extractor to before any coremods/mods are loaded so. - The intention is to rework this entire thing to use maven style storage, IF we can get Mojang to pass in the Libraries folder. - - v8.99.1616 Lex doesn't like this. - Revert "Fix up MC version compatibility checking to be a little less verbose." - This reverts commit 1927fd76e20a1b3075cb841b09c2caeb57ebd242. - - v8.99.1615 Fix up MC version compatibility checking to be a little less verbose. - If people use properly formatted version compatibility strings, or the - default compiled in one, this will work exactly as before, but has - less dependence on specific formats for the mcversion string. So a mod - declaring [1.11, 1.12] will now be 1.12.1 compatible by default, for - example. - - v8.99.1614 1.12.1 Update, Not much modder facing changes, 1.12 mods should load and run fine on this version. - - v8.99.1613 Add smarter getter for block slipperiness (#4116) - Fixed MC-119811, Boats rubber banding when dismounted. - - v8.99.1612 Add GuiContainer Foreground render event. (#4127) - - v8.99.1611 Use ClassValue to store tileentity names for profiler in lazy cache. (#4021) - - v8.99.1610 Move client-only config options to client config (#4084) - - v8.99.1609 Added CriticalHitEvent to allow more control over whether a attack is a critical or not, and what damage it does. - - v8.99.1608 Fix stacked entity item rendering using the wrong transform for the extra items. (#4158) - - v8.99.1607 Fix lopsided 'V' in FML icons. (#4179) - - v8.99.1606 Added pages to the advancements GUI to allow for unlimited root advancements. (#4183) - - v8.99.1605 Ignore neighbor changes for comparators on the client (Vanilla behavior) (#4186) - - v8.99.1604 Fixed bug where config categories errored if they contained regex special characters. (#4187) - - v8.99.1603 Allow sneaking to bypass villager interaction GUI. (#4193) - - v8.99.1602 Clean up Block.getLightValue(IBlockState, IBlockAccess, BlockPos) (#4203) - - v8.99.1601 Make LivingEntityUseItemEvent not abstract (#4208) - - v8.99.1600 Replace hardcoded block check with isTopSolid method call for placing button/lever (#4212) - - v8.99.1599 Added support for oredict dyes to Fireworks, Armors, and Shulker recipes. (#4223) - - v8.99.1598 Limit some server to client update packets for Item Capabilities (#4252) - - v8.99.1597 Fixed Armor bar disappear after changing dimension. MC-88179 (#4265) - - v8.99.1596 Fix the firing location of InputEvent.MouseInputEvent (#4270) - - v8.99.1595 Fix some broken test mods (#4245) - - v8.99.1594 Fixed swapping of finite fluids with negative densities. (#4237) - - v8.99.1593 Fix overrides not being read from the server registry snapshot (#4224) - - v8.99.1592 Fix some test mods crashing server caused by model loading (#4225) - - v8.99.1591 Fix FML handshake race condition, fixes #4219 (#4220) - - v8.99.1590 Prevent player from dying infinitely due to zero max health (MC-119183) - - v8.99.1589 [1.12] Allow the server to handle item-block interaction if onItemUse doesn not return PASS (#3967) - - v8.99.1588 Allow support for custom Shields and Shield disabling weapons. - - v8.99.1587 Make Optional.Interface repeatable (#4138) - - v8.99.1586 Log a warning if a coremod does not follow best practices (#4146) - - v8.99.1585 Ignore fortune for anything but seeds in crops (#4160) - - v8.99.1584 Added support for vanilla "nbt strings" in json recipes (#4113) - - v8.99.1583 Fix tripwire statemap not being complete when mappings change. Closes #3924 - - v8.99.1582 Fixed invalid erroring case during loading Advancements form mods that don't have advancements. - - v8.99.1581 Fixed issue where rendered held items wouldn't properly update when the reequip animations isnt shown. Closes #4175 - - v8.99.1580 Send remap event when data is frozen to notify modders to bake things. - Fixes search not working when connecting to vanilla servers. - - v8.99.1579 Fire recipe registry event after json recipes are loaded. - - v8.99.1578 Clean up uses of deprecated library functions (#4130) - Avoid catching and rethrowing runtime exceptions - Append error messages to exceptions instead of the log - - v8.99.1577 Remove unneeded block patches (#4167) - - v8.99.1576 Improve javadocs for Mod dependencies (#4168) - - v8.99.1575 Stop "Binary patch set is missing" error log in dev environment - - v8.99.1574 Add basic Github issue template - - v8.99.1573 Fix errors in test mods - - v8.99.1572 Remove unnecessary maxStackSize restrictions on brewing potions. (#4155) - - v8.99.1571 Fix game freeze when resizing the window too small on the mods gui (#4148) - - v8.99.1570 Adjust EnumHelper#addCreatureType to EnumType (#4089) - - v8.99.1569 Allow advancement icons to have nbt (#4114) - - v8.99.1568 Attempt fix, or at least better debugging for RecipeBook accessing unknown recipes. - - v8.99.1567 Fix MC-68754, Screen is not resizeable after exiting fullscreen due to LWJGL bug - - v8.99.1566 Use Item's custom FontRenderer for tooltips in the Creative Gui (#4101) - - v8.99.1565 Fix Recipe Toast crash when granted more than 5000 recipes (#4124) - - v8.99.1564 Throw packet encoding exceptions instead of suppressing them, to prevent corrupt packets (#4144) - - v8.99.1563 Quiet down warning for missing translation files. - - v8.99.1562 Update JOpt version on the dedicated server to match client. - - v8.99.1561 Fix getting missing models for overridden Item registry entires - - v8.99.1560 Fix override duplication caused by bad comparison. - - v8.99.1559 Fix log spam when creating dummy blocks. - - v8.99.1558 Include location of the call when a mod uses System.out or System.err (Fix #4135) - - v8.99.1557 Fix unblockable damage being blocked by armor. (#3933) (#4106) - - v8.99.1556 Improve furnace fuel handling (#4083) - - v8.99.1555 Add isSpawner parameter to the CheckSpawn event (#4075) - - v8.99.1554 RenderLivingEvent now stores partialTick - 2 - - v8.99.1553 Fix missing messages of missing models (#4120) - - v8.99.1552 Correct the default resource location of potion registry (#4117) - - v8.99.1551 Version bump for RB - - v8.99.1550 Added Block::getFogColor to allow custom blocks to control fog colors while inside them. (#4090) - - v8.99.1549 Optimize ExtendedBlockState.getClean, cache the return value instead of calculating it. Closes #3936 - - v8.99.1548 Squelch spam in EventBus register, Closes #4102 - - v8.99.1547 Add @ObjectHolder scanning to vanilla MobEffects, Biomes, Enchantments, SoundEvents, and PotionTypes constants. Closes #4104 - - v8.99.1546 Use java 8 collection functions - - v8.99.1545 Use lambdas for short anonymous methods - - v8.99.1544 Use multiple catch, try-with-resources, replace system.out and e.printStackTrace - - v8.99.1543 Fix the creative menu search function. Closes #4100 - - v8.99.1542 Fix MissingMapping REMAP action. Closes #4069 - - v8.99.1541 Repopulate client SearchTreeManager when registries are refreshed. Closes #4094 - - v8.99.1540 Fix Biome unit test - - v8.99.1539 Add support for loading mod advancements from the mod jar files. - - v8.99.1538 Fix error when using RegistryBuilder and not specifying a max id number. - - v8.99.1537 Allow the recipe registry to be modified. - - v8.99.1536 Fix BiomeDictionary not collecting correctly. - - v8.99.1535 Remove incorrect call to .toString() when instantiating custom config array entries. (#4078) - - v8.99.1534 Remove outdated patch to BlockDoublePlant - - v8.99.1533 Fix substitution tests - - v8.99.1532 Remove some deprecated methods and clean up - - v8.99.1531 Remove the call to client.refreshResources during loading (#4032) - - v8.99.1530 Added dependencies and dependency ordering for textures. (#4070) - - v8.99.1529 More work on registry override ability. Closes #4079 - - v8.99.1528 Fix ItemStack/Block/BlockSpecial not applying at runtime. - - v8.99.1527 Add a FluidUtil method to interact with an arbitrary IFluidHandler (#4080) - - v8.99.1526 Further Java 8 cleanup (#4077) - - v8.99.1525 Fix missed side only on BlockFlower - - v8.99.1524 Fix ModelBlockAnimation expsing a private class. - - v8.99.1523 Make Block.getSubBlocks not client side only. - - v8.99.1522 Cleanup of model system, taking advantage of java 8; - replaced guava Optional and Function with java 8 versions. - - v8.99.1521 Reload client recipe book after loading modded recipes. - - v8.99.1520 Make Dummy block an Air block. - - v8.99.1519 Fix NPE in MissingMappings event. Closes #4067 - - v8.99.1518 Make getSubItems non-client only. Use it for Ingredient iteration. - - v8.99.1517 Fix Emerald generation causing chunk loading. - - v8.99.1516 Fix minecraft:item_nbt ingredient type. - - v8.99.1515 Add Block.getDrops that uses NonNullList, deprecate the old method. Fix #3567 (#3778) - - v8.99.1514 Remove arrival/departure message methods from WorldProvider (#2733) - - v8.99.1513 Clean up logging - - v8.99.1512 Use instanceof ItemFishingRod instead of item equality (#4060) - - v8.99.1511 [1.12] Cleanup of files with old licence headers, Add missing LGPL 2.1 licence headers (#4051) - - v8.99.1510 Fix uncaught ClassCastException from invalid recipe file (#4043) - A JsonSyntaxException will now be thrown, caught and logged when the conditions property of a recipe isn't an array - - v8.99.1509 Fix onBlockClicked handler firing twice and Item.onArmorTick in the wrong place (#4037) - - v8.99.1508 Update MCP to 20170624 - - v8.99.1507 Remove Java 8 warnings now that Minecraft requires it - - v8.99.1506 Fire AnimalTameEvent for parrots (#4003) - - v8.99.1505 Make ForgeRegistry iterator sorted. Closes #4058 (#4059) - - v8.99.1504 Loosen up registry locks until data freeze. - - v8.99.1503 Fix conflicts - - v8.99.1502 Implement override tracking and syncing. - Overrides MUST be registered within a tracked event so we know what mod it came from. - This will allow servers/saves to select which mod 'wins' and becomes to active entry. - This should also mean that when connecting to a vanilla server things will revert. - - v8.99.1501 Disable substitution test, substitutions are not managed the way they used to be. - We do not care about substitutions, People who replace entries should make them compatible with the existing item. - - v8.99.1500 Fixup some registry tests, dummies are now persisted across syncing. - - v8.99.1499 More work, game loads and runs now. - Moved Registry events to directly AFTER PreInit instead of before. - This allows modders to register handlers for it without @EventBusSubscriber. - It also allows you to register custom things needed before the construction of blocks or items such as Fluids. - TODO: Move Fluids to a real registry. - @ObjectHolder can now be used on private fields. - Reworked FMLModIdMappingEvent to include data for all registries. - Tile Entities are now registrable. - - v8.99.1498 First pass of registry rewrite. - Tests do not run yet. - Things of note: - Removed the idea of substitutions, just register multiple items with the same name they will override each other like a normal map. - Decoupled Forge registries from vanilla classes. They now use bouncer classes. MODDERS SHOULD NEVER USE THESE - Introduced more stringent registry locking. As it sits things are only allowed to be registered during the RegistryEvent.Registry phases! - This is to force modders to split up their registrations, and pave the way for calling these functions multiple times during a single MC lifecycle. - ObjectHolder, Missing Mappings, etc... *should* now work for all registry types, nothing should be special cased to Blocks/Items anymore. - Added optional generic dummy factory to registries, to allow registry creators the ability to dummy more then just Blocks. - Re-worked the ItemStack transformer and applied it to ItemBlock and ItemBlockSpecial. Allowing us to cleanup reflective hacks in Block callbacks. - Registry onAdd callback is now only fired on the ACTIVE registry, fixing any issues of temp registries overriding active objects. - - v8.99.1497 Fix Universal bucket handling for Fluids with NBT (Fix #3757) - - v8.99.1496 Clean up Logging (#3953) - # Conflicts: - # patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch - # patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch - # patches/minecraft/net/minecraft/entity/EntityList.java.patch - # patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch - # src/main/java/net/minecraftforge/oredict/OreDictionary.java - - v8.99.1495 Fix ShapedOreRecipe matching. #4038 - - v8.99.1494 Fix recipe names in packaged jars. Closes #4039 - - v8.99.1493 Update NoteBlockEvent with new instruments. Resolves #4018. (#4019) - - v8.99.1492 Fix Chunk patch (#4036) - - v8.99.1491 IRecipeConditions forge:and and forge:false (#4017) - - v8.99.1490 Fix patches in Chunk and Explosion (#4036) - - v8.99.1489 Fix itemstack comparison with null - - v8.99.1488 Fix loading recipe jsons from jar files. - - v8.99.1487 Fix shapeless recipes not being able to use NBT on output, and fixed issue with null groups. - - v8.99.1486 [1.12] Fixes Exception when getting modlist for a vanilla client (#4028) - - v8.99.1485 Remove unused patch to ItemRecord. Closes #2686. (#4035) - - v8.99.1484 Log info on Travis tests - - v8.99.1483 Disable TestNetworkHandshake to make Travis work again - - v8.99.1482 Add timeout to TestNetworkHandshake setup - - v8.99.1481 Add missing Override annotations - - v8.99.1480 Update MCP mappings to 20170617 - - v8.99.1479 Update mcp mappings to 20170611 - - v8.99.1478 Clean up ShapedOreRecipe and ShapelessOreRecipe - - v8.99.1477 Allow condition factories to be registered from JSON (#4015) - - v8.99.1476 Patch a small bug in SPacketLoginSuccess that lets us emulate the network - handshake. This will be very useful as I rebuild the networking. - - v8.99.1475 Filter any recipe starting with _, Such names are reserved for metadata. - Actually implement conditions for recipes. - - v8.99.1474 Fix NBT ItemStack support in json loader. Closes #4002 - - v8.99.1473 Fix OreIngredient comparing items in reverse. Closes #3999 - - v8.99.1472 Make registries persist by default, fixes #3989 (#3998) - - v8.99.1471 Fix exception in ShapedOreRecipe.checkMatch for recipes that don't fill entire crafting grid (#3995) - - v8.99.1470 Fix parseShaped missing Empty slot item. Closes #3990 - - v8.99.1469 Fix CraftingHelper.parseShapred error. Closes #3979 - - v8.99.1468 Fix NPE in config menu with custom keybinds. Closes #3985 - - v8.99.1467 In-progress Registry system enhancement. - Needs cpw to take a look at enabling removing/overriding in the registry stuff. - But in theory it loads json recipes for mods now. - - v8.99.1466 Update ASM for 5.2, and host it on Forge's maven now. - - v8.99.1465 Update VanillaRegistryTests - - v8.99.1464 Try a different way of doing the callback, it removes the derpitude, but at - one point, I thought the way it was was necessary. Is this a race condition? - Dunno, but it's a lot simpler and doesn't rely on a netty hack. - - v8.99.1463 Fix the netty bug introduced by netty commit https://github.com/netty/netty/commit/29fdb160f33776c76f0b46aada48a9c9f3babcbf - that means we don't get activated until after handlerAdded is complete. - In effect, our handler can't handle anything until handlerAdded has - completed. - - v8.99.1462 Initial patch update to 1.12. - Some things to note: - Netty is screwy so currently can't join single player. @cpw - Crafting has been MAJORY reworked. The current GameRegistry functions are nooped, this is IN THE WORKS. - Just need to move the recipe list to a full class registry, and then re implement the in-code recipe registration. - Also, it IS advised that modders move to JSON, because ideally we'll see a S->C recipe syncing system in 1.13 - which would allow servers to have custom recipes. - OreDictionary currently 1/2 works, need to write a better algorithm for replacing ingredients. - Please be patient - Rendering: - A lot of functions got a new float parameter, this is similar to partial ticks, needs more research - - v8.99.1461 Fix getShareTag replacing data on the server (#3776) Closes #3682 - - v8.99.1460 Fix crashed caused by bad mods reflectively breaking the grass drop list. Closes #3943 - - v8.99.1459 Fix shaders not loading from mod domains Closes #3921 - - v8.99.1458 Clean up MapData patch (#3905) - - v8.99.1457 NBTTagList implements Iterable (#3884) - - v8.99.1456 Fix canRiderInteract being called on the wrong entity (#3934) - - v8.99.1455 Changed Event.setCanceled To throw UnsupportedOperationException instead of IllegalArgumetnException when called on a non-cancelable object (#3926) - - v8.99.1454 Make Teleporter fields accessible to subclasses (#3930) - - v8.99.1453 Deprecate vanilla getExplosionResistance and properly annotate the forge replacement (#3929) - - v8.99.1452 Make World.isValid and World.isOutsideBuildHeight public (#3919) - - v8.99.1451 Clean up formatting of Forge Test mods and disable noisy ones (#3908) - - v8.99.1450 Fix broken milk bucket model (#3925) - - v8.99.1449 Fix patches of GuiScreen(#3704) and ItemDye(#3736) (#3878) - - v8.99.1448 Make hopper update accessible to subclasses. Closes #3849 - - v8.99.1447 Update EntityPlayer armor calculations and ISpecialArmor (#3838) - - v8.99.1446 Tweak vertex lighter to avoid causing excess array initialisations (#3771) - - v8.99.1445 Fixes for PlayerDestroyItemEvent being called with empty itemstacks. (#3728) - - v8.99.1444 [1.11.2] Added support for Village capabilities (#3648) - - v8.99.1443 Fixes BlockLiquidWrapper placing a Static fluid where it should place a Flowing one (#3893) - - v8.99.1442 Disable frost walker enchantment on anything but vanilla water (#3906) - - v8.99.1441 Fix head being angled badly when riding mobs. Fixes MC-1207 (#3901) - - v8.99.1440 Print system details on startup without printing a full crash report (#3909) - - v8.99.1439 Reduce memory pressure from new objects during loading screen (#3907) - - v8.99.1438 Add methods to write IForgeRegistryEntry to ByteBuf (#3806) - - v8.99.1437 Fix normals not being generated for formats without normals (#3896) - Fix normals not being generated for formats without normals - - v8.99.1436 Fix MC-117087, prevent calling Class.getSimpleName on TEs unnecessarily (#3873) - - v8.99.1435 Add a configurable delay when unloading dimensions, fixes #3455 (#3679) - - v8.99.1434 Changed custom entity selectors from event based to factory based. (#3579) - - v8.99.1433 Create ItemFishedEvent, the event is cancelable, but items are not mutable. Use LootTables to control that. (#3705) - - v8.99.1432 Fix forge pipeline block shifts (#3789) - - v8.99.1431 Add pack.mcmeta to examplemod (#3813) - - v8.99.1430 Relocate TileEntity#onLoad call to after it's added to the world instead of the chunk so as to have a valid world reference (#3836) - - v8.99.1429 Improvements to FluidUtil (#3839) - - v8.99.1428 Allow client commands to control whether they can be invoked without prefix. (#3847) - - v8.99.1427 When the window is closed during loading, exit the game quickly (#3858) - - v8.99.1426 Remove splash.properties option for Mojang logo (has been disabled) (#3859) - Fix backgound color being applied to the Forge logo - - v8.99.1425 Fix GuiMultipleModsErrored ignoring scrolling with mouse wheel. (#3861) - - v8.99.1424 [1.11.2] Fixed Zombie Villagers not setting and getting professions correctly (#3678) - - v8.99.1423 Prevent NPE in ConfigManager and fix config gui being enabled for all mods. Fixes #3856. (#3860) - - v8.99.1422 Fix return value of ItemHandlerHelper.insertItem being incorrect when destination was null. Closes #3840 - - v8.99.1421 Fix vanilla inventory wrappers not properly calling markDirty. Closes #3854 and #3810 - Also updated IItemHandler javadocs to reflect returning EMPTY instead of NULL. - - v8.99.1420 Add in a check to the splash screen. If the Display.update call takes - too long on average (over first 200 frames) we'll use a sleep based - timer to allow mods doing splash screen work some time on the - LWJGL global lock. - (cherry picked from commit 03d7eaa) - - v8.99.1419 Cleanup AccessTransformer debug output - - v8.99.1418 Fix NumberFormatException being thrown for empty ItemStack deserialization - Thanks @gabizou, 1.11.2 version of #3830 - - v8.99.1417 Fix Fluid models rendering with gaps (#3747) Closes #2993 - - v8.99.1416 Fix mutable blockpos leak MC-114281 (#3742) - - v8.99.1415 Fix typo in LootEntry.Serialiser causing incorrect serialisation. Closes #2757, Fixes MC-115407 (#3823) - - v8.99.1414 Fix invulnerable items becoming invisible client side MC-53850 (#3807) - - v8.99.1413 Add Item.canDestroyBlocksInCreative() allowing more items to not break blocks in creative (#3805) - - v8.99.1412 Ignore calls to sendMessage for fake players. Fixes #3796. (#3798) - - v8.99.1411 Fixed HarvestDropsEvent issue by fixed-length lists on getDrops (#3778) - - v8.99.1410 Add GenerateMinable event for mesa gold (#3774) Closes #3738 - - v8.99.1409 Skip loading models if there is a fatal mod dependency error (#3772) Close #3768 - - v8.99.1408 Add AnimalTameEvent for handling animal taming (#3763) - - v8.99.1407 Added missing bounds check to ChunkCache.getBiome (#3752) - - v8.99.1406 Allow result of PlayerInteractEvent to be changed when it's cancelled (#3744) - - v8.99.1405 Add EnumHand and ItemStack to BonemealEvent (#3736) - - v8.99.1404 Added a boolean flag for disabling Entity onUpdate (#3731) - The flag is false by default, and if true the Entity will not update. It is saved and loaded from NBT, and is called updateBlocked. Modders are responsible for managing this flag for entities they with to 'freeze' or 'unfreeze'. - - v8.99.1403 Revert block snapshots in reverse order. Fixes #3608. - - v8.99.1402 Add LootTableManager to the LootTableLoadEvent (#3717) - - v8.99.1401 Fix EntityFallingBlock check for ITileEntityProvider (#3711) - - v8.99.1400 Added ClientChatEvent. Closes #1442 (#3704) - - v8.99.1399 Fix custom array entry class for config GUI being ignored when adding new entries (#3697) - - v8.99.1398 Use thread groups to detect the effective side (#3644) - - v8.99.1397 New LivingDestroyBlockEvent for controlling if some entities can destroy blocks (#3628) - - v8.99.1396 Fix breaking particles on dedicated server. Closes #3825 - - v8.99.1395 Fix arrays in map values for config system - - v8.99.1394 [MC-2518] Fixed missing break sound and particles. Closes #3821 - - v8.99.1393 Fix java 6/7 compatibility in GuiConfig (#3824) - - v8.99.1392 [1.11.x] Fix blank tab in creative inventory when additional tabs evenly divisible by 10 (#3817) - - v8.99.1391 Adding config GUIs to the @Config based configuration System (#3735) - Lots of internal API that modders should not touch. See test mods for example usages. - - v8.99.1390 Fix vanilla bug where player reputations villages were reset on read. - Deprecated Username based API in favor of UUID based API. - - v8.99.1389 Add setter for default key in RegistryBuilder. Closes #3804 - - v8.99.1388 Fix error when reading world info for old saves with missing dimensions. Closes #3786 #3331 - - v8.99.1387 Detect and log cascading chunk generation issues during terrain population (#3756) - - v8.99.1386 Fix duplicate achievements getting added to the achievement list (#3770) (#3779) - - v8.99.1385 Fix #3733 Splash Screen memory bar background matches screen background (#3775) - - v8.99.1384 Add additional constructors to EnergyStorage to set values at load time. - - v8.99.1383 Fix parameter-names for WorldProvider.shouldMapSpin (#3767) - - v8.99.1382 Fix MC-112730 TE global renderer duplicate render (#3651) - * Fix TE global renderer duplicate render - - v8.99.1381 Fix entity write catch block (#3726) - - v8.99.1380 Fixed TESR items not rendering correctly before entering world (MC-112292) (#3666) - Fixed crash when rendering text in TESR items before entering world - - v8.99.1379 Fixed 'reset to defaults' button not working on some Forge config fields. - - v8.99.1378 Add DifficultyChangeEvent (#3525) - - v8.99.1377 Allow mods to set other default "home dimensions" for respawning. (#3528) - - v8.99.1376 Persist PotionEffect curative items and initialize defaults from Potion (#3573) - - v8.99.1375 Added Forge slot methods to creative container (#3581) - - v8.99.1374 Restore missing Biome GetWaterColor event. Closes #3164. (#3625) - - v8.99.1373 Fixed Missing Furnace Fuels (#3627) - - v8.99.1372 Fix @Config.Comment not working on subcategory Objects. Closes #3593 - - v8.99.1371 Prevent concurrent modification of ClassInheritanceMultiMap (#3632) - - v8.99.1370 Improve exception messages during initialization. - - v8.99.1369 Fixed ChunkCache.getTileEntity creating tile entities off world thread. - - v8.99.1368 Start firing AttachCapabilitiesEvent (#3645) - - v8.99.1367 Add @Name annotation to config system allowing you to use custom key for value. - Also added category option to root config to allow customization. See examples/docs for information. - - v8.99.1366 Fixed Flower Forests not having proper flowers. Closes #3652 - - v8.99.1365 Fix Poppy to Dandelion ratio - - v8.99.1364 Fix forge:default-item missing case for FIXED transform (#3663) - - v8.99.1363 Add implementation for Living Attack event on client-side for players (#3667) - * Fixed unused import - - v8.99.1362 Fix bug caused by ItemMinecart patch (#3672) - - v8.99.1361 Make getRGBDurabilityForDisplay use getDurailityForDisplay by default. Closes #3670 (#3673) - - v8.99.1360 Add a null check for the throwable message in NetWorkDispatcher#exceptionCaught (#3688) - (cherry picked from commit 1be1bb59c5c4c7432c515ef07beb6bf7e1f6ef27) - - v8.99.1359 Use Forge setting to determine baby zombie chance. Fixes #3690. - - v8.99.1358 Properly fix IShearable implementation. Fixes shears taking damage twice, mooshroom particles, and blocks dropping incorrect loot. - - v8.99.1357 Fix English injection for some mods on dedicated server. - - v8.99.1356 Fix hoppers being able to insert shulker boxes into shulker boxes. - - v8.99.1355 Override Mojang's new logging config to re-enable our logging to text file. - The new launcher's GUI for logs WILL NOT WORK until they add support on their end. - - v8.99.1354 Fix for bad decompile process on Particle.java that causes onGround flag to not get set properly as well as motionX and motionZ not being set to 0 when their axis has collision happening (#3716) - - v8.99.1353 Fix ClientTickEvent Post firing inside another profiler section (#3715) - - v8.99.1352 Fix Item.doesSneakBypassUse being applied incorrectly. - - v8.99.1351 Added check for quad builder to always have the particle texture set, and fixed where that wasn't true. Fixes #3653 - - v8.99.1350 Stop rotation of extended pistons, beds, and double chests Fixes #3634 - Fix rotation of repeaters and comparators - - v8.99.1349 Fixed TileEntity#getRenderBoundingBox not offsetting correctly causing more TEs to render then needed (#3709) - - v8.99.1348 [1.11.2] Make AbstractSkeleton implementable by fixing limited access on getStepSound (#3702) - - v8.99.1347 Fix extracted mods crash report file name for Windows (#3701) - - v8.99.1346 Remove dynamic lambda methods when inside of SideOnly methods - Clean signatures of ReflectionHelper methods. - - v8.99.1345 Fix spawn-fuzz formula (#3695) - - v8.99.1344 Fix world spawn fuzz. (reverted from commit 450c3a80c10c1dc27ef68a3f5e5f58af6a827fde) - Protip Don't code while groggy. - - v8.99.1343 Fix world spawn fuzz. - - v8.99.1342 Fix some cases where world time is not passed through the WorldProvider. (#3685) - - v8.99.1341 Fix addTypes not adding in the base types. (#3681) - - v8.99.1340 Replace listSubtypes with listSupertypes to match the intended behavior. (#3564) - - v8.99.1339 this finaly fixes #2866 (#3656) - - v8.99.1338 Fix MC-111753 (#3655) - - v8.99.1337 Fix default missing model zoom text not being set to false on all places. - - v8.99.1336 Small bugfix in lighting logic. - - v8.99.1335 Added the variant name to the missing model. (#3328) - - v8.99.1334 Fix #3635 MC-103403 fix ingredient count for ingot block recipes (#3640) - - v8.99.1333 New client config option to force all chunk rendering off the main thread. - This may help FPS issues, but may also result in world holes/rendering issues. - Also fix Forge configs not saving properly. - - v8.99.1332 Cache entity constructors for a small performance optimization - - v8.99.1331 Bypass forge chunk cache if it's configuratively disabled - (cherry picked from commit 9fe6385) - - v8.99.1330 Fix category comments not working. Closes #3593 - - v8.99.1329 Fix Biome#getSpawnableList returning an empty list for non-vanilla EnumCreatureTypes (#3611) - - v8.99.1328 Skip first baking in ModelLoader (#3621) - - v8.99.1327 Allow block to specify their type for AI pathfinding (#3546) - - v8.99.1326 Fix vanilla bug MC-98707 (#3565) - - v8.99.1325 Improve performance of inserting into inventory wrappers (#3622) - - v8.99.1324 Add missing patch to ItemStack isItemStackEqual (#3577) - - v8.99.1323 Add Iron Nugget to OreDictionary (#3571) - - v8.99.1322 Fix ContainerRepair patch to prevent NPE (#3553) - - v8.99.1321 Fix DungeonHooks method to use correct type (#3587) - - v8.99.1320 Removed an unsafe usage of `EntityMinecart.getType()` (#3592) - - v8.99.1319 Fix #3576 Unnecessary warning about totem being renamed (#3614) - - v8.99.1318 Fix milk not working on anything at all (#3574) - - v8.99.1317 Fix #3596 Close jar sources safely in Java 6 (#3597) - - v8.99.1316 Clean up null issues, add more annotations (#3590) - - v8.99.1315 Small cleanup for PlayerInteractEvent (#3563) - - v8.99.1314 Fix and clean up ItemBow.onPlayerStoppedUsing() patch (#3555) - - v8.99.1313 Fix IItemHandler's IStorage using nulls (#3580) - - v8.99.1312 Fix null check in BrewingRecipeRegistry (#3584) - - v8.99.1311 Fix a couple more ItemStack null checks (#3586) - - v8.99.1310 Use travis_wait to extend the timeout on gradlew build (#3610) - - v8.99.1309 Fix super call to ItemOverrideList constructor inside AnimationItemOverrideList, fixes #3264. - - v8.99.1308 Added caching for baked vanilla models, fixes #3594. - - v8.99.1307 Fix horse cap patch being reapplied in the wrong place (#3609) - - v8.99.1306 Add .travis.yml (#3598) - * Add .travis.yml - * fix --refresh-dependencies - * try java 8 - * add build with stracktrace - * Fix running test - * try building with java 6 - * try using simplified init.gradle - * Revert "try using simplified init.gradle" - This reverts commit e56041e794e3b8c13453245eb2605118e4ac68ce. - * Revert "try building with java 6" - This reverts commit 51795385f453fdd8a0e77c632b5463d8754b1ba4. - * Fix running tests - * skip createExe task - * Test with broken debug mod - * Revert "Test with broken debug mod" - This reverts commit 3b26700582ba4f4f5477f5927b0006ef0fe85bb0. - - v8.99.1305 Fix tests... - - v8.99.1304 Inital 1.11 update. - - v8.99.1303 Fix #3561 import io.IOUtils instead of compress.utils.IOUtils (#3562) - - v8.99.1302 Update MCP mappings to snapshot_nodoc_20161220 (#3551) - - v8.99.1301 Properly deobfuscate lambda expressions (#3552) - - v8.99.1300 Add nullable annotations to IGuiHandler (#3550) - - v8.99.1299 Add hook to allow any block to respond to filtered block updates like the Observer block (#3547) - - v8.99.1298 Fix some resources that are never closed, close in a finally block (#3544) - - v8.99.1297 [1.11] Fixes for Chunk.getBlockLightOpacity implementation (#3537) - - v8.99.1296 [1.11] Fix ItemHandlerHelper canStack and ItemStack areTagsEqual methods not checking capabilities (#3500) - - v8.99.1295 Make NBSP character display as a space. MC-2595 (#3522) - Add easy getter for the Locale: MinecraftForgeClient.getLocale() - - v8.99.1294 Added Oak door to Ore Dictionary Exclusion list to fix able to craft it with any wood type (#3519) - - v8.99.1293 Fix setting the world in TileEntity.addTileEntity (#2863) (#3517) - - v8.99.1292 [1.11] Made WalkNodeProcessor consider burning blocks (#3515) - - v8.99.1291 Fix uses of uppercase "Forge" where it fails Loader.isModLoaded(modID) (#3513) - - v8.99.1290 Patch EntityPlayerSP to use location-aware version of isNormalCube (#3494) - - v8.99.1289 [1.11] Add memory display to loading screen (#3447) - - v8.99.1288 reset repo to upstream and reapplied patches (#3434) - - v8.99.1287 [1.11] Added EnchantmentLevelSetEvent (#3433) - - v8.99.1286 Register Minecraft mod container in FML loader (#3414) - - v8.99.1285 Small memory optimization in Registries. - - v8.99.1284 Fix modid field name for ProjectInjector. - - v8.99.1283 Enable Enforcement of modid formatting. Must be lowercase and <= 64 characters - - v8.99.1282 Bump version for RB. - - v8.99.1281 [1.11.x] Refine fluid placement utilities (#3509) - - v8.99.1280 Properly filter out annotations that are for multiple mods in the same mod source. - This prevents disabled mods from getting their proxies injected. - Also prevents mods from getting their proxies injected multiple times. - Effects the @EventBusSubscriber, @Instance, @Metadata, @SidedProxy annotations. - If the target modid is not in the annotation data, and there are multiple mods in the source, it will attempt to find it by matching the annotations's class names. - This is a potentially breaking change. Review your logs for "skipping" messages. - - v8.99.1279 Prevent a crash when scheduling block updates for non-existing blocks #3485 - - v8.99.1278 Fix issue reading chunks from the network when client and server do not agree on block count. Closes #34925 - - v8.99.1277 Restore missed patch in World.updateComparatorOutputLevel. Closes #3495 - - v8.99.1276 Make SlotItemHandler override Slot.getSlotStackLimit. Closes #3497 - Make Container.mergeItemStack respect target slot's max size when slot is non-empty. Closes #3498 - Fix Shift clicking in Beacons with stacked items when fuel slot is empty. - - v8.99.1275 Added gradle.properties to MDK (#3361) - The file sets the default max heap size to 3 GiB so that the decompilation doesn't fail as often. - (cherry picked from commit 49ec3d1b9322ee2b7a1312059118173b0b3fe6d0) - - v8.99.1274 Add ItemBlockSpecial#getBlock (#3343) - (cherry picked from commit cf26f4acbe48ee8790edc03d0b5c16c1167278ab) - - v8.99.1273 Add null check and informative error message when client receives an invalid update packet (#3266) - (cherry picked from commit 882e0e3bf22784d693e3816b0efeba5fbedb1a22) - - v8.99.1272 Fix for showing config default values twice in tooltip (#2257) (#3338) - (cherry picked from commit be73ec3d5ebd972cfacb0f255f71112a0430bc43) - - v8.99.1271 Added isItemValidForSlot check to hopper extraction (#3444) - (cherry picked from commit 0348760a774ca7ed9639376baadae38e272f5bf8) - - v8.99.1270 Fix NPE when rendering missing mod screen with version bound requirements. #3501 - - v8.99.1269 Make sure to log kick messages in NetworkDispatcher. Closes #3507 - - v8.99.1268 [1.11] Fix null checks in shouldCauseReequipAnimation (#3482) - - v8.99.1267 [1.11] Add biome dictionary types for newer biomes (#3475) - - v8.99.1266 [1.11] Add canApplyAtEnchantmentTable to Item (#3463) - Allowing increased control of which enchantments can be put on an item over Vanilla's hard-coded item type checks. - Render enchantment buttons disabled when the item is enchantable but the enchantability requirement is not met on lower levels. - - v8.99.1265 Add a way for modded GuiScreens to cancel mouse and keyboard events (#3438) - - v8.99.1264 Add missing pooled BlockPos retain in World patch (#3486) - - v8.99.1263 Moved TextureStitchEvent.Pre to allow custom sprites for blocks (#3436) - - v8.99.1262 Fix sky colour blending not working for render distances >16 (#3476) - - v8.99.1261 Allow connectable blocks to choose what they can connect to (#3437) - - v8.99.1260 Changed Armor Material to use an ItemStack aware version (#3469) - - v8.99.1259 Fix Redstone Torch memory leak (#3474) - - v8.99.1258 BiomeDictionary code cleanup (#3466) - - v8.99.1257 Added EquipmentChangeEvent (#3411) - - v8.99.1256 Update assets to new Forge brand (#3464) - - v8.99.1255 First pass at exposing data fixers to modders. - Each mod gets its own version number, mods SHOULD NOT rely on other - mod's fixers, just care about yourself. - Walkers can use IDataFixerData to retrieve their version. - - v8.99.1254 Add getSlotLimit(slot) to IItemHandler (#3445) - - v8.99.1253 Pass along if the respawn event was the result of the end being conquered or not (end respawning is really FUNKY code and uses death instead of 'change dimension') - - v8.99.1252 Add method to check if an Entity can trample a Block. Fixes #2510 (#2730) - - v8.99.1251 Provide access to GuiContainer location and dimensions (#3440) - - v8.99.1250 Clean up handling of changes to IVertexConsumer (#3458) - - v8.99.1249 Provide access to ShapedOreRecipe width and height (#3439) - - v8.99.1248 Quick fix for another ItemStack null check (#3426) - - v8.99.1247 Fix problem with the server hanging around after forcing the client to exit, leaving behind stale processes. - - v8.99.1246 Fix using the wrong Pair implementation (#3449) - - v8.99.1245 Fix #3432 Hopper and Dropper item moving does not exactly match vanilla (#3442) - - v8.99.1244 Fix #3424 ItemCraftedEvent returns air when shift-clicking (#3441) - - v8.99.1243 Cleanup some null checks and remove deprecated methods in Item and Block (#3429) - - v8.99.1242 Fix max CustomPayload size, 1MB not 16MB. - - v8.99.1241 Insert FML packet handler into Vanilla pipelines in case modders send FMLPacket to vanilla. Fixes #3422 - - v8.99.1240 Make all tests one side only, so we can test vanilla clients in dev env. - - v8.99.1239 Fix AbstractMethodException in FML Registries. Closes #3427 - - v8.99.1238 Fix ItemStack null check in PlayerInteractionManager - - v8.99.1237 Move EntityHorse capability patches to AbstractHorse (#3417) - Fixes #3409 - - v8.99.1236 Fix Item transfers related to Hoppers. - - v8.99.1235 Remove Block.addInformation exists in vanilla (#3413) - - v8.99.1234 Initial annotations/nullability changes (#3392) - - v8.99.1233 Add GetCollisionBoxesEvent. Allows manipulation of the collision boxes of blocks for entities. MC1.11 edition. (#3405) - - v8.99.1232 First draft of Entity Registry re-write. - - v8.99.1231 Make Wither Skulls respect Block.canEntityDestroy. Closes #3404 - (cherry picked from commit 6b52023a5c341420d976cb50359e2a2a4a6a9192) - - v8.99.1230 Added EnumHand parameter to Block.getStateForPlacement (#3402) - - v8.99.1229 Fix client side placement issue on blocks with GUIs. Closes #3399 - - v8.99.1228 Fix issues with ZombieVillagers Closes #3398 - 1.11 doesn't intertwine zombie types anymore so our edits to split them out for custom professions are not needed. - - v8.99.1227 Fix Villagers for 1.11 (#3401) - - Add cartographer registry entry - - Fix textures for the nitwit - - v8.99.1226 [1.11] Fix nullability issues around ForgeHooks and Capabilities (#3395) - - v8.99.1225 Change OreDictionary over from "null" to the new ItemStack system. (#3400) - - v8.99.1224 Do not install mod_list.json for optional mods. - Classpath scanning is in so they will still be detected - - v8.99.1223 Include Mercurius in installer. See Forge Forums for more info. - - v8.99.1222 Restore the ability to register modded TileEntities. - - v8.99.1221 Implement fluid item capabilities without item swapping - - v8.99.1220 Remove deprecated Fluid stuff - - v8.99.1219 Fix crafting causing crash (#3388) Closes #3387 - - v8.99.1218 Fix ItemStackHandler's constructor ignoring size. Closes #3386 - - v8.99.1217 Fixed damage bar color. Closes #3389 - - v8.99.1216 Make EntityShulker fire EnderTeleportEvent. Closes #3383 - (cherry picked from commit d48985fafaed6de6f09136b999ca8aa44184a7b9) - - v8.99.1215 Added event to allow modification of player visibility to mobs/AI (#3382) - (cherry picked from commit 0a5ef64d6ea96fe85d7c62107081ced649e6a3e9) - - v8.99.1214 Restore another missing patch in WorldProvider. - - v8.99.1213 Disable capabilities for empty ItemStacks. - - v8.99.1212 [1.11] Fix initCapabilities for ItemStacks (#3379) - - v8.99.1211 Apply missed patch to WorldProvider. - - v8.99.1210 Fix build.gradle problems: - Installer missing url.png - UploadArchives erroring on local systems due to missing changelog - Adding branch name improperly. - - v8.99.1209 Fix localizations not loading correctly in legacy resource packs. - - v8.99.1208 Fix FurnaceRecipy registration. - - v8.99.1207 Fixed test cases for 1.11 changes. - - v8.99.1206 Initial 1.11 release update. - - v8.99.1205 Initial 1.11-pre1 update - - v8.99.1204 regenerate entitylivingbase patch - - v8.99.1203 Update to 20161111 mcp names - - v8.99.1202 Improve error message from crashes during loading (#3362) - - v8.99.1201 Added events for crop growth (#3320) - - v8.99.1200 Add support for custom entity selectors in commands (#3356) - - v8.99.1199 Added PermissionAPI (#3155) - - v8.99.1198 Add hand argument to BlockEvent.PlaceEvent (#3221) (#3270) - - v8.99.1197 Fixes #3237 and #2752. (#3347) - * Fix #3237 by correctly utilising the keepLooking argument. - * Explain within SimpleNetworkWrapper's javadoc that the execute of the handler isn't on the main Minecraft thread. - - v8.99.1196 Made default slot implementation respect inventory stack size limit. - - v8.99.1195 Fixed Block.setBedOccupied ignoring 'occupied' parameter - - v8.99.1194 Add Item#getNBTShareTag (#3342) - * Add Item#getNBTShareTag - * Update comment - - v8.99.1193 Call Looting Event on player death and loot table drops (#3275) - * Call Looting Event on player death and loot table drops - * Simplify patches - * More code cleanup: Replace old usage with compact forgehooks implementation - - v8.99.1192 Fix POTENTIAL issue with Texture Stitcher exceeding max size. - - v8.99.1191 Fixed Ore Dictionary replacing the oak boat recipe (#3329) - Fixes the oak boat recipe being able to be crafted with any wood - - v8.99.1190 Improve the default isItemValid() and getItemStackLimit() implementations in SlotItemHandler. You can now properly swap the player's held itemstack with the slot's itemstack. (#3273) - - v8.99.1189 Fixed texture stitcher not using full texture height before expanding width. - - v8.99.1188 Update readme to be a little more clear. - - v8.99.1187 Special case not drooping snowballs for water and snow layers. Closes #3326 - - v8.99.1186 Fix MC-105406 (OpenGL leak in View Frustum) (#3308) - - v8.99.1185 Fix very laggy mipmap slider MC-64581 (#3305) - - v8.99.1184 Add Block#getStateForPlacement (#3129) - - v8.99.1183 Add better key modifier behavior for GUI contexts (#3307) - - v8.99.1182 Make item repair recipe respect itemstack's getMaxDamage (#3295) - - v8.99.1181 Fix infinite loop in dragon fight when the dragon is over the void. - - v8.99.1180 Fix Tabbing issues with config classes. - - v8.99.1179 Initial pass a re-working the configuration system. - Work in progress. - - v8.99.1178 Add in missing test runner for a test. Fixes failing tests on jenkins, hopefully. - - v8.99.1177 Fix substitutions being broken after freezing - actually store the original state in registry copies, not the computed state, which is wrong because it only sees the sub, not the original. - - v8.99.1176 Revert "Another fix for registry substitutions. Closes #3212" - This reverts commit ec2977afc919c0f676f59977e6065148ea635f9e. - - v8.99.1175 @ObjectHolder will now inject null for dummied objects. Closes #3301 - - v8.99.1174 Allow all Forge Registries to work with ObjectHolder (#3220) - - v8.99.1173 Revert commits related to filtering proxy and Automatic Subscriber annotations. - Broke some existing setups, will require a annotation definition change in 1.11. - - v8.99.1172 Fix proxy injector filtering. (#3300) - - v8.99.1171 Bump version for new Recommended Build. - - v8.99.1170 Introduce IContextSetter for events. - This will set the active mod container for events using the normal EventBus. - Fixes improper warnings from initializing mods using the new Registry events. - Modders, you should not use this as it has many performance implementations - and if abused will slow down the event bus A LOT. ActiveModContainer is not - thread safe. - - v8.99.1169 Filter out proxy injectors for incorrect mods. - Prevents mod classes being initialized early when multiple mods are in the same source. - - v8.99.1168 Small Cleanup in example build.gradle. - - v8.99.1167 Fix unbound keybindings are activated by unknown keyboard keys (#3288) - - v8.99.1166 caseSensitiveCustomCategories must be set before loading the configuration file. (#3269) - Otherwise one set with categories in lowercase letters and on case sensitive - set is generated. - - v8.99.1165 Fix typo in sky rendering causing tons of BlockPos allocations (#3267) - - v8.99.1164 Add in registry registration events, new subscription events you can use to make sure you're registering things at the "best" time. - - v8.99.1163 Add support for generic filtering of events. - Please DO NOT use this in performance sensitive environments where you will have tons of things added to the listener list. - If that's the case define sub-classes as they have completely separate lists and will thus be more efficient when firing the event. - - v8.99.1162 Fix roofed forests posting decoration events for small mushrooms rather than big (#3259) - - v8.99.1161 Add support for offhand bow aiming animation (#3085) - Vanilla allows you to use a bow in your offhand, but it's not visible to others or in third person. - Fixes MC-88356 - - v8.99.1160 Remove oredict for Bone Block recipe, stop white dye to bonemeal exploit (#3255) - - v8.99.1159 Fixed Biome.platFlower not being called when bonemealing grass. Closes #3254 - - v8.99.1158 Added getCommandMap() & getSortedCommandList() in CommandTreeBase (#3251) - - v8.99.1157 New event to allow mutating a baby entity based on it's parents (#3227) - - v8.99.1156 Added CommandTreeBase (#3193) - - v8.99.1155 Fix debug command creating empty file (MC-103399) (#3218) - - v8.99.1154 Fix universal bucket not being returned in crafting recipes (#3234) - - v8.99.1153 Create EnergySystems.md - - v8.99.1152 Fix potential shading issue in GuiEditArrayEntries. Closes #3247 - - v8.99.1151 Introducing a new standardized energy capability system. - Heavily inspired by the old RedstoneFlux API developed by King Lemming and Team CoFH. - - v8.99.1150 Fixed ItemStacks having ForgeCaps tag when no caps are serialized. - - v8.99.1149 Fix Cactus being able top be planted on incorrect soil. - - v8.99.1148 Fix wrong var being used during getMaxSpawnPackSize check. (#3240) - - v8.99.1147 Move dismount version of EntityMountEvent to Entity class. Should fix canceling dismounting. Closes #3226 - - v8.99.1146 Yet another fix for stupid stairs. Closes #3224 - - v8.99.1145 Make StructureBlock TESRs always render. Closes #3222 - - v8.99.1144 Fix item use stats (#3216) - - v8.99.1143 Fixed decorate event being called with SHROOM type for both convered trees and large mushrooms. Closes #3215 - - v8.99.1142 Another fix for registry substitutions. Closes #3212 - - v8.99.1141 Update gradle wrapper to 2.14, reference MC json, and add java6 compat lines to default MDK build.gradle. - - v8.99.1140 Add legacy support for signature change of AddCallback. - - v8.99.1139 Revert changes to ItemTool for binary compatibility (#3211) - - v8.99.1138 Expand getHarvestLevel to include player and blockstate (#3192) - - v8.99.1137 Make enchantment tables spawn particles for any custom energy provider. Closes #3208 - - v8.99.1136 Allow blocks to affect the beacon color (#3205) - - v8.99.1135 Fix armors rendering badly. Closes #3196 - - v8.99.1134 Fixed NPE from missing Capabilities (#3191) - - v8.99.1133 Fix World Capabilities NPE when there are no attached capabilities. - - v8.99.1132 Introduced Capabilities for World (#3069) - - v8.99.1131 Fix vanilla bug in BlockFalling that caused blocks to loose state info during world gen. Closes #3183 - - v8.99.1130 Added PlayerBrewedPotionEvent (#3187) - - v8.99.1129 Don't crash if you select a fake player - - v8.99.1128 Skip searching for mods in the JAVA_HOME directory. Closes #2249 and #2250 - - v8.99.1127 Fix leather armor overlay not rendering when armor is pure white. Closes #3184 - - v8.99.1126 Fix test mod IDs, names, and versions (#3122) - Most of our test mods have bad IDs (uppercase) and are missing names or - versions. Forge produces a bunch of warnings in the console about this, which - makes it more likely that an important message will be missed. - - v8.99.1125 Make InventoryHelper#spawnItemStack use ItemStack#splitStack to avoid losing capability data. (#3163) - - v8.99.1124 Unlike BakedQuad, UnpackedBakedQuad does not propagate the diffuse lighting flag to Vertex Consumers. Made UnpackedBakedQuad conform to BakedQuad's behavior. (#3181) - - v8.99.1123 Add RenderTooltipEvent (#3034) - - v8.99.1122 Set ModelLoader.WHITE's texture size iniatlly instead of defaulting to zero and being set later. - - v8.99.1121 Fix #3165 Dispensers with buckets can destroy fluid handler blocks (#3180) - - v8.99.1120 Fix Fire not using getFireSpreadSpeed. Closes #3175 - - v8.99.1119 Fix issue with stairs. - - v8.99.1118 Removed unintentional functionality when using the Splash Screen. - - v8.99.1117 Disable DecorateEventDebug by default. - Prevents me thinking that decoration is broken >.< - - v8.99.1116 Compleetly skip FML handshake for Vanilla connections. Should fix race condition. Closes #3084 - - v8.99.1115 Fix name in legacy support in registry changes. - - v8.99.1114 Make stair culling use actual state, and be more robust. Closes #3170 - - v8.99.1113 Fix Vertex Transformer for breaking models (#3132) - * Add setTexture to IVertexConsumer and propagate it. - - v8.99.1112 Fix Forge fluids not serializing properly. Closes #3152 - - v8.99.1111 Restone binary compatibility with registry substitution rework. - Modders please switch to using the provided RegistryBuilder to ensure more forward compatbility. Closes #3144 - - v8.99.1110 Second pass at fixing 'Dissapearing Doors' This now more robustly fixes ALL uses of get and has slight performance improvements for itterable states. Closes #3139 - - v8.99.1109 Added config option to disable Forge's fix of Stair/Slab face culling. - Some vanilla resource packs exploit this issue in their custom models causing unintended rendering issues. - - v8.99.1108 Fixed 'Dissapearing Doors', An issue where the world would try to save blockstates that are not serializeable. - - v8.99.1107 Allow CommandEvent to change the parameter set. Closes #1762 - - v8.99.1106 Another pass at substitutions - now capable of fixing up ItemBlock to point at the right block when a block is substituted, should also handle substituting itemblocks. There's some hackery in the way we have to change the value of ItemBlock.block, but it's not too egregious in my opinion. - - v8.99.1105 Clean up AT file - - v8.99.1104 Merge remote-tracking branch 'origin/pr/3120' into 1.10.x - - v8.99.1103 Fix anvil output slots being wrong by adding new ones. Closes #3121 without breaking existing mod workarounds for the badly ordered slots. - - v8.99.1102 Expose vanilla brewing recipe registration - (cherry picked from commit 24bf163) - - v8.99.1101 Clean up some legacy settings, making sure there's translation strings. Closes #2965 Thanks for the prompt Zaggy! - - v8.99.1100 Refresh patch after cherry pick (cherry picked from commit 71f75bf) - - v8.99.1099 Fix MC-91728 - (cherry picked from commit 71f75bf) - - v8.99.1098 Remove sideonly on all other SoundType methods - (cherry picked from commit 46c7cac) - - v8.99.1097 Fixed NeighborNotifyEvent not containing the piston facing direction. - (cherry picked from commit 5637c41) - - v8.99.1096 Use extended state for breaking models (#3086) - - v8.99.1095 Clean up block patch. Also push json update. - - v8.99.1094 Merge remote-tracking branch 'origin/pr/3116' into 1.10.x - - v8.99.1093 Merge remote-tracking branch 'origin/pr/3089' into 1.10.x - - v8.99.1092 Merge remote-tracking branch 'origin/pr/3125' into 1.10.x - - v8.99.1091 Fix #3126 - duplicate stat id error - don't use the "universal iterators" in statbuilding, use the one without the duplicate entries. (The duplicate entry one is for rendering setup) - - v8.99.1090 FIX : IndexOutOfBoundException - - v8.99.1089 Tidy up some more todos - - v8.99.1088 Mark it for actual removal in 1.11 - - v8.99.1087 Fix a vanilla bug with the blockstate ID map not being properly symmetric with respect to block.getStateFromMeta - closes #3012 properly but probably has a random MCJIRA ticket somewhere too. - - v8.99.1086 Update decorate for biomes to support Decorate event - - v8.99.1085 No-nonsense getSoundType - - v8.99.1084 Merge remote-tracking branch 'origin/pr/3072' into 1.10.x - - v8.99.1083 Merge remote-tracking branch 'origin/pr/3087' into 1.10.x - - v8.99.1082 Rename the event to RenderSpecificHandEvent - - v8.99.1081 Merge remote-tracking branch 'origin/pr/3115' into 1.10.x - - v8.99.1080 Merge remote-tracking branch 'origin/pr/3110' into 1.10.x - - v8.99.1079 Merge remote-tracking branch 'origin/pr/3112' into 1.10.x - - v8.99.1078 Add shouldCauseBlockBreakReset callback to Item. This allows to keep breaking blocks if the NBT or similar changes. - - v8.99.1077 Use CreateFluidSourceEvent for mod fluids as well - - v8.99.1076 Add a test for CreateFluidSourceEvent - - v8.99.1075 Add CreateFluidSourceEvent to control infinite fluid sources - - v8.99.1074 Merge remote-tracking branch 'origin/pr/3055' into 1.10.x - closes #3055 and #3043 hopefully. Complex solution, but it seems legit. Needs testing. - - v8.99.1073 Something that needs to happen: warn people about bad modids- if they're not lowercased, or if they're too long. - - v8.99.1072 Add missing cancelable - - v8.99.1071 Add hand-specific render event - - v8.99.1070 Fix hotkey with default modifier loading wrong when modifier set to NONE - - v8.99.1069 Fix async race condition on new chunks (closes #3020) (#3090) - This patch fixes a race condition that sometimes caused a just generated chunk - to be generated a second time. In some this caused generated structures to - appear incomplete such as in Issue #3020 when the second generated version - effectively overwrote the original version of the chunk. - This patch ensures when ProvideChunk calls LoadChunk synchronously we always - attempt to load the chunk (if not cached) thus avoid the race condition without - changing the logic for async loading for chunks already saved to disk. - Thus this should retain the async functionality from PR #2946 while preventing - generation issues caused by the race condition. - - v8.99.1068 Some tweaks to ContainedDeps - it should extract to a file in versionedMods directly, even if the tag in the jar has a subpath element. It'll also skip if there is a matching filename in the main mods dir. - - v8.99.1067 Add the new tests into the suite - - v8.99.1066 Some dummy block replacement tests - it seems they work correctly. - - v8.99.1065 Some more substitution tests. It seems like it's working as it should. - - v8.99.1064 More tests. Substitutions now work, and a fix is included. *sigh* Closes too many bugs to count. - - v8.99.1063 Some test harness stuffs. Time to get the registry manager properly tested. - - v8.99.1062 Add TextureDump forge test mod - - v8.99.1061 Added support for using static methods as event listeners, Register the .class instead of an instance. - And added an improvement to calltime listener rebuilding. - - v8.99.1060 Fixed sound paused/resume issue - - v8.99.1059 Force mipmap even if textures are the wrong size - - v8.99.1058 Lets make a half-decent readme. Thanks to Rorax for the install video! - - v8.99.1057 Merge remote-tracking branch 'origin/pr/3036' into 1.10.x Closes #3036 Thanks Mezz! - - v8.99.1056 Bump version for a RB - - v8.99.1055 Merge #3060 into 1.10.x - - v8.99.1054 Remove event stuff - - v8.99.1053 Move to a hook in EntityMinecart - - v8.99.1052 Add throwable impact event (#3071) - - v8.99.1051 Add ability for custom detector rail output - - v8.99.1050 Update build.gradle to not append the branch name if it matches the minecraft version. - - v8.99.1049 Fix hopper extract behavior being broken on edge cases due to IItemHandler capability. Closes #3062 - - v8.99.1048 Add an event that allows to modify the looting level based on damage source - - v8.99.1047 Fixed FPS graph and new debug lines not being rendered in Debug screen. Closes #3054 - - v8.99.1046 Restore (buggy?) behavior of vanilla BlockPistonMoving and ignore drop chance (#3052) - - v8.99.1045 Fix villages generating to high when using a cusom sea level. Closes #3050 - - v8.99.1044 Update build.gradle to have single line for specifying minecraft version, and will update ForgeVersion.java as needed. - - v8.99.1043 Forge will now load extra mods from mods/mod_list.json and mods/mc_version/mod_list.json. - As defined by the same json spec as --modListFile. - And now if repositoryRoot is prefixed with absolute: the path will NOT be relative to the MC directory. - - v8.99.1042 Store member field mappings in the mapping table, possible fix for #3043 - - v8.99.1041 Fixed MC version number... - I could of SWORN we removed this in favor of a automated system... - - v8.99.1040 1.10.2 Update - - v8.99.1039 Fix mob-spawners crashing for non-living entities and simply the patch in the process (#3042) - - v8.99.1038 Fix milk bucket is fillable with water or lava when milk is unregistered (#3039) - - v8.99.1037 Fix legacy handling for ItemBucket subclasses and non-universal buckets (#3038) - - v8.99.1036 Fix FluidContainerRegistry handling potions as water bottles (#3037) - - v8.99.1035 Remove duplicated universal buckets from the creative list (#3035) - - v8.99.1034 Big warning for recipe types found without being registered, it turns out this is pretty severe, modders need to fix it. - - v8.99.1033 Add Forge fluid handler test - - v8.99.1032 Fix comparison stability of the Recipe Sorter with unknown recipes #2962 (#3030) - - v8.99.1031 Fixed Husks rendering as standard zombies. Closes #3028 - - v8.99.1030 Fixed chests being replaced when trees grew. - - v8.99.1029 Simple implementation of a Open/Close container event (#3017) - - v8.99.1028 Provide 'cleaner' version of TextureMap.setTextureEntry. Closes #1385 - - v8.99.1027 Fix incorrect logic in ChunkCache.isSideSolid. Closes #3026 - - v8.99.1026 Fixed incorrect variable being sent to doSpecialSpawn. Closes #2986 - - v8.99.1025 Fixed shifted patch in GameSettings causing settings to not load properly. Closes #3025 #3022 - - v8.99.1024 Fix doors popping off solid sides. - - v8.99.1023 Fix that the Missing blocks/items/registries prompt often got stuck. - - v8.99.1022 Fix Realms button text to be shorter again. Closes #3019 - - v8.99.1021 Fix item pickup dupe bugs. Closes #3015 - - v8.99.1020 [1.10] Fix keys with KeyModifier failing to load (#3018) - Fix key options with KeyModifier failing to load due to NumberFormatException - - v8.99.1019 Accept more 1.9.4 version strings. Fix NPE for custom villager types and their associated zombie spawns. Still needs review. - - v8.99.1018 Fix all guis closing as soon as they are opened (#3013) - - v8.99.1017 Fix version number. - - v8.99.1016 Update to 1.10 - - v8.99.1015 Fix the MDK - it gets the license too! - - v8.99.1014 Update the build.gradle script to ship the new license and stop shipping the old licenses. - - v8.99.1013 In accordance with our stated goal of relicensing Forge to LGPL v2.1, this commit enacts that change. Although it is using the 1.9.4 codebase, it is intended that this branch become public with the 1.10 changes, as such the license will take effect at that time. The three commits from persons who have failed to accept the new license, as documented in #2789, have had their commits reverted. This should complete the license transition. Commits after the commit date of this commit should be considered licensed by LGPLv2.1, as indicated in LICENSE-new.txt. All patches are now considered owned by the Forge project and Forge Development LLC in particular (note that they will not get the license boilerplate, as they are machine generated files). - - v8.99.1012 Revert "Added PlayerOpenContainerEvent and added ForgeHooks.canInteractWith" - This reverts commit 8d0b58ee6fe1dca88f5874a9dd08368b0f5859e6. - # Conflicts: - # common/net/minecraftforge/common/ForgeHooks.java - # patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch - # patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch - - v8.99.1011 Revert "Added tab completion" - This reverts commit fe327fbd7662e0a1e71b89125f0a94ae48239bd0. - # Conflicts: - # src/main/java/net/minecraftforge/server/command/ForgeCommand.java - - v8.99.1010 Revert "Changed forge command tab completion to use getListOfStringsMatchingLastWord()" - This reverts commit 6a299a483a4865e13cd61e5d900a9e0c004a9226. - # Conflicts: - # src/main/java/net/minecraftforge/server/command/ForgeCommand.java - - v8.99.1009 Made forge-type spawn eggs spawn childs, when right clicking EntityAgeable again. (#2982) - - v8.99.1008 Merge remote-tracking branch 'origin/pr/2994' - # Conflicts: - # patches/minecraft/net/minecraft/item/ItemStack.java.patch - - v8.99.1007 Make ASMDataTable more useful: (#2911) - - EnumHolder now has getters for it's data - - enum arrays work now - - nested annotations work now outside of being in arrays - (cherry picked from commit f10f750) - - v8.99.1006 Fix incorrect FluidUtil doc (#2996) - - v8.99.1005 Improve the "missing mods" on-screen error message (#2997) - - v8.99.1004 Fix ItemStack deserialization can't clear nbt (#3005) - - v8.99.1003 Update CONTRIBUTING.md - - v8.99.1002 Update CONTRIBUTING.md - - v8.99.1001 Fix #2918 Make dispensers with buckets work with modded fluids (#2947) - - v8.99.1000 Fixed brewing stand returning incorrect solts for side inventories. - - v8.99.999 Fixed villager career display names being off by one. - - v8.99.998 Fix broken EntityItem merging for Items with capabilities - - v8.99.997 Fix DataParameter mixup when vanilla clients are connected causing CCE in zombie renderer (#2992) - - v8.99.996 Fix AnimationItemOverrideList not falling back to super (#2990) - - v8.99.995 Fix #2961 Capability data is not preserved by fluid handler interactions (#2976) - - v8.99.994 Slight tweak to early loading, to accommodate FMP - - v8.99.993 Fixed Fernflower decompile issue in AnvilChunkLoader.saveExtraData() Closes #2985 - - v8.99.992 Mute the connection reset by peer exception - it's spamilicious for the most part. - - v8.99.991 Fix missing IMC message query. - - v8.99.990 Read a Update JSON in UTF-8 (#2978) - - v8.99.989 Add getter for the world to LootContext (#2954) - - v8.99.988 Fixed arrows not showing in non default AchievementPages (#2968) - - v8.99.987 Add methods to Fluid to allow custom vaporization overrides (#2959) - - v8.99.986 Fixes #1984. - - v8.99.985 Modified SimpleModelState to ignore the parts it doesn't know about. Fixes model part hiding always applying to some models when transformations are specified in the blockstate json. - - v8.99.984 Pass the GL context back from the splash screen during the EntityRenderer init. - - v8.99.983 Fire ChunkWatchEvent.Watch event, closes #2767. Based on @sfPlayer1 patch suggestion. It looks like this logic has shifted relative to 1.8, so there may be differences in event behaviour now. - - v8.99.982 Fix asynchronous chunk loading (#2946) - Since the update to Minecraft 1.9.4 chunks were actually never loaded - asynchronously because a sync request was always made from the - PlayerChunkMap shortly after the chunk had been queued. - - PlayerChunkMapEntry now only loads chunks synchronously *after* the - chunk failed to load asynchronously. - - Fixed some minor bugs that caused "Attempted to dequeue chunk" messages - - Simplified ChunkProviderServer patch. loadChunk no longer generates chunks, - so there is no need to handle that. - - Moved loader and provider to ChunkIOProvider so there is no need for - "hashCode abuse" - - v8.99.981 Make it easier to use FluidTanks that have input/output restrictions (#2945) - These internal function should NOT be used by anything except the owner of the tank. - - v8.99.980 Fixed BiomeProvider.getModdedBiomeGenerators method name. Closes #2937 - - v8.99.979 Several bugfixes for PlayerInteractEvent (#2943) - * Don't change Result if setCanceled(false) called - * Fix RightClickEmpty firing even when targeting a block or entity - * Add a left click empty event - * Move hook point for EntityInteractSpecific to the right place - * Fix LeftClickBlock not firing clientside in creative, and clarify docs about creative - - v8.99.978 Add new IFluidHandler for capabilities. (#2942) - Old fluid system is deprecated and slated for removal in the next cleanup cycle. - - v8.99.977 Add a Slot#isSameInventory() method (#2884) - This fixes shift + double clicking items in Containers that use - SlotItemHandler slots. - - v8.99.976 Fixed POTENTIAL issue where mods would query world infrom from TEs before they are set. Closes #2863 - - v8.99.975 Expanded custom villagers to Zombies and world gen. - Fixed edge cases where custom professiosn wernt being used correctly. Closes #2862 - - v8.99.974 Fixed client side ticking TileEntites after they are unloaded. Closes #2852 - - v8.99.973 Fixed position sent to sanSustainPlant from cactus. Closes #2941 - - v8.99.972 Forge will now warn the user and ask permission to load a world with unknown registries. Closes #2934 - - v8.99.971 Fix BlockFluidBase having collision. Closes #2932 - - v8.99.970 Merge branch '1.9.4' - - v8.99.969 Initial support for model visibility system. Implemented it for OBJ, B3D and normal vanilla models; fixed NPE accessing parent state in B3DModel. Fixes #2801. - - v8.99.968 Improve JavaDoc links, fix some broken JavaDocs (#2833) - Improve JavaDoc links, fix broken JavaDocs - - v8.99.967 Reordered transformations during LayerHeldItem rendering, fixes #2827. - - v8.99.966 Fixed new ICrashReportDetail loader working with packaged mods by delaying it until the ModContainer's construct event. Closes #2924 - - v8.99.965 Fixed issue with @ObjectHolder and the new registry system. Closes #2640 - Only run static initalizers for classes we need to get the names from values. - - v8.99.964 Fixed village wells not having their biomes set. Closes #2499 - - v8.99.963 Fixed TileEntityBeacon not using position-aware getLightOpacity. Closes #2530 and #2910 - - v8.99.962 Fixed potential issue with Chunk.getLightOpacity being called before the chunk is added to the world map. Closes #2529 - - v8.99.961 Fixed FluidUtil.tryEmptyFluidContainerItem not checking if the tank can accept fluids first. Closes #2527 - - v8.99.960 Make sure tool-classes for vanilla tools are initialized early. Closes #2909 and #2525 - - v8.99.959 Fix tooltip for survival tab in the creative menu not drawing on any but the first page. Closes #2908 and #2504 - - v8.99.958 Fix Thorns enchantment bypassing ISpecialArmor.damageArmor function. Closes #2463 - - v8.99.957 Reinitalize statistics information on Mapping changes. - Fixes mismatched stats to item/block ids. And auto registers stats for modded items. - Closes #2454 - - v8.99.956 Fixed NBTTagString.toString not properly escaping \'s. Closes #2393 - - v8.99.955 Add ServerHangWatchdog to TerminalTransformer whitelist. Closes #2203 - - v8.99.954 Fix setTileEntity causing the world to remove the new and old tile entities. Closes #2164 - - v8.99.953 Fixed EntityRegistry.addSpawn adding duplicate spawn entries. Closes #2112 - - v8.99.952 Fix javadocs for BiomeColor events. Closes #2093 - - v8.99.951 Fire LivingSpawnEvents for MobSpawners. Closes #2079 - - v8.99.950 Fire PopulateChunkEvent Pre and Post in ChunkProviderFlat. Closes #2050 - - v8.99.949 Move getArmorModel hook up two lines so that the attributes and animation information is set. Closes #1939 - - v8.99.948 Close player's inventory to prevent potential dupe issues on some modded items. Closes #1431 - - v8.99.947 More uniformly apply Configuration.caseSensitiveCustomCategories. Closes #1353 - - v8.99.946 Set Enchantment table's harvest level. Closes #1349 - - v8.99.945 Capture interfaces when scanning classes and preload implementations of ICrashReportDetail. - - v8.99.944 Fix installer downloading vanilla jar when not needed. And filter some more known libraries. - - v8.99.943 Strip Optional from the class signature as well, since that's loaded by the TypeToken registry code and might cause a crash. - - v8.99.942 Pass the correct position into isSideSolid in BlockRailBase#canPlaceBlockAt (#2919) - - v8.99.941 Add hook for TE data sync on client (#2893) - - v8.99.940 Switch new constructor to use floats (#2904) - - v8.99.939 Make unit test for EnumHelper more robust and less spammy. Now detects missing accessors as well. - - v8.99.938 Fix paramters for addArmorMaterial, addOption and addGameType. - - v8.99.937 Add Unit Test to detect mismatches between EnumHelper and Enum ctor - - v8.99.936 Add alternative ItemAxe Constructor - - v8.99.935 Fix villagers having farmer skin on vanilla servers. Closes #2894 - - v8.99.934 Fire playerDestroyItem event's in some cases where we were not. - - v8.99.933 Fix Container.compouteStackSize not respecting stack version of maxStackSize. Closes #2756 - - v8.99.932 Set max enchantment ID to Short.MAX_VALUE. Closes #2799 - - v8.99.931 Tipped arrows are now not affected by infinite enchantment but are still effected by creative mode. - - v8.99.930 Take capabilities into account when comparing ItemStack NBT's. Closes #2726 - - v8.99.929 Fix screenshot link paths on Windows (#2886) - - v8.99.928 Tweak build file slightly - allow passing buildNumber using gradle parameters (-PbuildNumber=...) and provide a "resetBuildNumber" function to reset the buildNumber to zero in the ForgeVersion file. Means builds can be reproducible in-IDE. - - v8.99.927 Add Unit Test to detect mismatches between EnumHelper and Enum ctor - - v8.99.926 Update example mod for new mappings. - - v8.99.925 Bump version information for 1.9.4. - - v8.99.924 Fix schizophrenia in version numbers. - - v8.99.923 Update mappoings snapshot to 20160518 - - v8.99.922 1.9.4 Update. - Major things to note: - Class renames: https://gist.github.com/LexManos/44dd211f90f498ad4015279b103dff86 - Tile Entities are now packed in the ChunkData packet. - Forge intends to work around this to better support large moded worlds, but for the time being modders should implement the new function carefully and only send what data they need to! - Minecraft's codebase now has annotations, these are directly from Mojang and should be adheared to! - Added support for package-info.java's containing @Nullable information for all MC code base. - - v8.99.921 Fix Bucket rendering and add sound (#2865) - * Adjust generated quads from texture to take texture size into account #2858 - * Fix universal bucket not passing through when rightclicking on a non-block - Add proper sound events when picking up modded fluids #2821 - * Have FluidUtil execute properly on both sides and sync as expected. Add default sounds to interacting with tanks - * Save sound for filling/emptying in the fluid - - v8.99.920 Lets just simply this. Fixes last commit. - - v8.99.919 Add modder facing API for Villager Career level trades. Ref: #2854 - - v8.99.918 Extended Animation State Machine format to allow multiple transitions from one state. - - v8.99.917 Fix up release jsons to clean up extraneous netty references - - v8.99.916 Make LootPool constructor public again. Closes #2847 - - v8.99.915 Fix type in LootEntry json name. And rename LootTable.finalize to freeze to avoid overriding Object function. Closes #2846 and #2847 - - v8.99.914 Fixed joint animation application correctly. - - v8.99.913 Add ScreenshotEvent (#2828) - Add ScreenshotEvent - - v8.99.912 New LootTable interaction system and event. - Modders can now modify and reference internal elements of a loot table by name. - Editing can ONLY be done in the event and any external editing will cause a exception to be thrown. - See this gist for more information: https://gist.github.com/LexManos/77c983d67b9ad27010428478b66d50fd - - v8.99.911 Fixed joint hierarchy not being used fully in the animation system. - - v8.99.910 Fixed issue in ChunkIO that would potentially cause NPEs on chunks. Closes #2837 - - v8.99.909 Fixed map extension recipie. - - v8.99.908 Fix the rand given to PopulateChunkEvent (#2834) - - v8.99.907 Fix areas where dimension types are used as dimension IDs. - - v8.99.906 Add NPE protection to in-hand item rendering. - - v8.99.905 Fix url regex (#2815) - Fixed url detection in chat messages. Stops false positives such as `um.....no` - - v8.99.904 Bump version for new RB. - - v8.99.903 Slightly better practice because wait can be randomly interupted. - - v8.99.902 Merge in a fix from 1.8.9 for rails - - v8.99.901 Merge branch '1.9' - - v8.99.900 Remove usage of AsynchronousExecutor library in favor or a simpler implementation. - - v8.99.899 Add a java version detection and nag system for users on Java 7 or below. - Added detection of mods that rely on Java 8 and a graceful error screen. - The nag screen will be shown once a day. It can be disabled by editing the forge.cfg. - However it is HIGHLY recomended that user update to Java 8. - - v8.99.898 Fix withers breaking bedrock. Closes #2813 - - v8.99.897 Fixed villager profession not being set correctly on the client, and fixed custom village texture rendering. Closes #2766. - - v8.99.896 Fixed cooldown overlay sometimes rendering opaque. Closes #2772. - - v8.99.895 Make ChunkRenderDispatcher.countRenderBuilders configurable. Closes #2775. - - v8.99.894 Fixed custom fluid sufraces not rendering from the bottom. Closes #2800. - - v8.99.893 Fix TextureMap failing when registering a sprite's resource location twice (#2785) - - v8.99.892 Call markDirty when restoring blocks with TileEntities. (#2809) - This change makes sure the updated tileentity is saved properly within the - chunk. - - v8.99.891 Call markDirty when restoring blocks with TileEntities. (#2808) - This change makes sure the updated tileentity is saved properly within the - chunk. - - v8.99.890 Call markDirty when restoring blocks with TileEntities. (#2807) - This change makes sure the updated tileentity is saved properly within the - chunk. - - v8.99.889 Add Potion.renderHUDEffect (#2798) - - v8.99.888 Fix wrong blockstate being passed to notifyNeighborsRespectDebug. (#2806) - - v8.99.887 Only run block physics for TileEntities while capturing block placement. (#2805) - Currently, all blocks placed by players that are not TE's run physics - twice. Blocks that contain a TileEntity are not affected due to a check in - 'ForgeHooks.onPlaceItemIntoWorld'. - In order to fix the problem, 'Chunk.setBlockState' will now verify if - blocks are being captured before running onBlockAdded and if so, only run - physics if the block has a tileentity. This check also prevents blocks - such as TNT's from running its physics (explosion) when placement event is - cancelled. - - v8.99.886 Only run block physics for TileEntities while capturing block placement. (#2803) - Currently, all blocks placed by players that are not TE's run physics - twice. Blocks that contain a TileEntity are not affected due to a check in - 'ForgeHooks.onPlaceItemIntoWorld'. - In order to fix the problem, 'Chunk.setBlockState' will now verify if - blocks are being captured before running onBlockAdded and if so, only run - physics if the block has a tileentity. This check also prevents blocks such - as TNT's from running its physics (explosion) when event is cancelled. - - v8.99.885 Fix sluggish scrolling on GuiScrollList's and fix small rendering issue with scroll bar on certian screen sizes. - - v8.99.884 Fix SidedInvWrapper accessing wrong slots for setStackInSlot. (#2797) - Fix DoubleChestItemHandler not implementing IItemHandlerModifiable - - v8.99.883 Close #2780 add CMD localization for Mac key bindings (#2792) - - v8.99.882 Update LICENSE-new.txt - Better words - - v8.99.881 Update LICENSE-new.txt - Words - - v8.99.880 Update LICENSE-new.txt - Clarification on infectivity - - v8.99.879 Add the new license text. Not yet applicable to forge. - - v8.99.878 Fix NPE on shield break. Closes #2786 - - v8.99.877 Boss bar render event (#2701) - Allow control over increment height - - v8.99.876 Fix forge:default-block transformation. (#2760) - The first-person left-hand rotation was a little bit of. - - v8.99.875 Expose a central place to access all of Vanilla and Forge's registries using the new registry API. - - v8.99.874 Fix log spam from invalid key modifiers (#2746) - - v8.99.873 make WorldSavedData implement NBTSerializable (#2745) - - v8.99.872 Don't use import static with net.minecraft classes. Using the latest MCP snapshots this causes an import conflict. (#2742) - - v8.99.871 Add cancelable event for Potions shifting the gui position (#2667) - Add cancelable event for Potions shifting the gui position - - v8.99.870 Fix ForgeChunkManager world unloading check (#2736) - - v8.99.869 Fix being kicked from server when climbing ladders. - - v8.99.868 Fix potential desync between Forge's Villager profession and vanilla's int based system. - - v8.99.867 Update ore dictionary (#2721) - Updated the Ore Dictionary with more vanilla items: - -Prismarine Shard ( "gemPrismarine" ) - -Prismarine Crystals ( "dustPrismarine" ) - -Prismarine Block ( "blockPrismarine" ) - -Prismarine Brick ( "blockPrismarineBrick" ) - -Dark Prismarine ( "blockDarkPrismarine" ) - -Nether Wart ( "cropNetherWart" ) - -Sugarcane ( "sugarcane" ) - -Paper ( "paper" ) - -Ender Pearl ( "enderpearl" ) - -Bone ( "bone) - -Gunpowder ( "gunpowder) - -String ( "string" ) - -Nether Star ( "netherStar" ) - -Leather ( "leather" ) - -Feather ( "feather" ) - -Egg ( "egg" ) - -End Stone ( "endstone" ) - -Torch ( "torch" ) - -Vine ( "vine" ) - -Cactus ( "blockCactus" ) - -Grass ( "grass") - -Obsidian ( "obsidian" ) - -Red Sandstone ( added to "sandstone" ) - -Crafting Table ( "workbench" ) - -Slime Block ( "blockSlime" ) - -Granite ( "stoneGranite" ) - -Polished Granite ( "stoneGranitePolished" ) - -Diorite ( "stoneDiorite" ) - -Polished Diorite ( "stoneDioritePolished" ) - -Andesite ( "stoneAndesite" ) - -Polished Andesite ( "stoneAndesitePolished" ) - - v8.99.866 Merge pull request #2729 from kashike/feature/bossinfo - Remove @SideOnly(Side.CLIENT) from BossInfo/BossInfoServer methods - - v8.99.865 Remove @SideOnly(Side.CLIENT) from BossInfo/BossInfoServer methods - These methods can also be used by the server (see BossInfoServer, it sends packets to the client but the methods are @SideOnly(Side.CLIENT)) - - v8.99.864 Made forge fluids use smooth lighting. - - v8.99.863 Fixed NPE in dedicated server languages. And fixed logger for main FML event bus. - - v8.99.862 Cleanup OBJLoader parse function and fix issues related to JVM differences. - Also fix support for sopme of the spec that was partially respected. - - v8.99.861 Enhance some error logging related to OBJLoader issues, and RegistryEntries. - - v8.99.860 Merge pull request #2723 from mezz/pick-fix - Fix some plain keybinds not working when a modifier is active - - v8.99.859 Fix some plain keybinds not working when a modifier is active - - v8.99.858 Merge pull request #2719 from mezz/pick-fix - Fix #2717 Pick block hotkey not working in inventories - - v8.99.857 Fix #2717 Pick block hotkey not working in inventories - - v8.99.856 Merge pull request #2718 from nekosune/patch-1 - Corrected CapabilityItemHandler.readNBT ignoring anything in slot 0 in 1.9 - - v8.99.855 Corrected CapabilityItemHandler.readNBT ignoring anything in slot 0 in 1.9 - - v8.99.854 Merge pull request #2714 from nekosune/patch-1 - Corrected CapabilityItemHandler.readNBT ignoring anything in slot 0 - - v8.99.853 Corrected readNBT ignoring anything in slot 0 - - v8.99.852 Fixed forge fluid having a collision box. - - v8.99.851 Fixed zip being closed too early in the server language loading. - - v8.99.850 Merge pull request #2709 from iTitus/bucketModel - Fix dynbucket item transformation. - - v8.99.849 Fix dynbucket item transformation. - - v8.99.848 Fixed some test mods not being marked as client-only. - - v8.99.847 Fixed mod languages not being loaded on the server. - - v8.99.846 Merge pull request #2708 from Zaggy1024/1.9 - Fix PlaySoundEvent replacing a sound with PositionedSound causing an NPE. - - v8.99.845 Fixed using PlaySoundEvent to replace a sound with a PositionedSound causing an NPE due to the Sound field not being set by a call to ISound.createAccessor(SoundHandler). - - v8.99.844 Merge pull request #2707 from mezz/keyBinding19-4 - Add modifier support to vanilla keybindings. - - v8.99.843 Merge pull request #2604 from williewillus/pie - New PlayerInteractEvent for 1.9 - - v8.99.842 Player Interact Event - - v8.99.841 Add modifier support to vanilla keybindings. - Add Orange conflict color for modifier/key conflicts - (like Ctrl and Ctrl-Z conflicting) - Related to #2692 - - v8.99.840 Merge pull request #2704 from AEnterprise/1.9 - onBlockHarvested is no longer called twice - - v8.99.839 Fix improper logic in ItemHandlerHelper.giveItemToPlayer causing some items to not be added. Closes #2705 - - v8.99.838 Fixed EntityJoinWorldEvent not being fired for some entitites on Server Worlds. Closes #2685 - - v8.99.837 Fix issue caused by setting spawnRadius to 0. Closes #2624 - - v8.99.836 Made both exceptions occuring during item model loading print in the log; closes #2696. - - v8.99.835 Added the ability to change the printed model error count; Added printing of actual exceptions causing missing variants related to blockstate loading, closes #2689. - - v8.99.834 onBlockHarvested is no longer called twice - - v8.99.833 Merge pull request #2702 from McJty/1.9 - Added DimensionManager.createProviderFor() to WorldClient constructor… - - v8.99.832 Added DimensionManager.createProviderFor() to WorldClient constructor similar to what is done - in WorldServer to make sure the correct provider is created client-side too. - - v8.99.831 Merge pull request #2616 from iTitus/updateNotificationIcon - Add update notification icon made by @gigaherz, closes #2582 - - v8.99.830 Merge pull request #2697 from mezz/keyBinding19-3 - Fix inability to attack while holding modifier keys - - v8.99.829 Fix inability to attack while holding modifier keys - - v8.99.828 Merge pull request #2695 from mezz/keyBinding19-2 - Re-Add key binding modifiers and contexts. - - v8.99.827 Re-Add key binding modifiers and contexts. - - v8.99.826 Revert "Add key binding modifiers and contexts.", until it's fixed. - This reverts commit 34c3af7e853d578c8e17e1f0cdf886251fad74ae. - - v8.99.825 Changed generic signature of GameRegistry.register methods to work around the type inference bug; updated all example mods to the new block/item registration method. - - v8.99.824 Merge pull request #2693 from Adubbz/1.9 - Fixed mismatched registry names and mod ids - - v8.99.823 Merge pull request #2692 from mezz/keyBinding19 - [1.9] Add key binding modifiers and contexts. - - v8.99.822 Properly deprecate and link the replacement methods in GameRegistry. Add helper method for registering a block with default ItemBlock because people keep complaining -.- - - v8.99.821 Fixed mismatch registry names and mod ids - - v8.99.820 Add key binding modifiers and contexts. - Same as #2674, but for Minecraft 1.9 - - v8.99.819 Fixed compile error in registry code with Eclipse. - - v8.99.818 Capture a vanilla freeze - will be used when FML connects to vanilla servers, soon - - v8.99.817 Support ResLocations for IMC - - v8.99.816 Improved UV offset hackery - should fix most visible custom model seams. - - v8.99.815 MinecraftForge-2684 [1.9] New Registry ignores keys - - v8.99.814 MinecraftForge-2683 InvocationTargetException for Forge 1820 for 1.9 - - v8.99.813 Add registries for soundevents, enchantments and potiontypes - MinecraftForge-2576 [1.9] SoundEvents (and Enchantments and PotionTypes) need a FML registry - - v8.99.812 Reconcile Block.patch - - v8.99.811 Squashed commit of the following: - commit b3b290aec9d3010a134859da6001ea28a96c2fdc - Merge: c6ce6a0 d803f7d - Author: cpw - Date: Fri Mar 25 13:28:04 2016 -0400 - Merge branch 'RegistryRework' of https://github.com/LexManos/MinecraftForge into LexManos-RegistryRework - Implement proper registry slaves. Should help with rollback related issues. - Missing patch - commit d803f7db76f65db9d27302c9804a643bc853dc22 - Author: LexManos - Date: Tue Mar 22 03:36:14 2016 -0700 - Update VillagerRegistry and use it. Should in theory make custom villagers work now. Using string version instead of int id for networking. - commit eb5e5b4b42fdca26d2a104e4dc1e6a3ea3051a7b - Author: LexManos - Date: Tue Mar 22 02:14:16 2016 -0700 - More cleanup. - commit edbc56b2ff314629d0e402709f3cf29fc79c4a3d - Author: LexManos - Date: Tue Mar 22 02:05:23 2016 -0700 - More cleanups, removed deprecated UniqueIdentifier {ResourceLocation now} - commit e2df8d1be3c97601508f83dc97b0e8853fa1e271 - Author: LexManos - Date: Tue Mar 22 01:29:19 2016 -0700 - Stupid generics.... - commit 46d57dc4677fa5ff3923e64eaccfb33d7e5aad8d - Author: LexManos - Date: Tue Mar 22 01:00:25 2016 -0700 - Some registry tweaking to provde a non-complicated API modders can use. - - v8.99.810 Fix remapped blocks being overriden with dummy air blocks. Closes #2491 - - v8.99.809 Merge pull request #2679 from tterrag1098/render_in_layer_state - Add state param to Block.canRenderInLayer - - v8.99.808 Add state param to canRenderInLayer - - v8.99.807 Merge pull request #2678 from shadowfacts/BlockAddInfo-19 - Forward ItemBlock#addInformation to Block#addInformation - - v8.99.806 Forward ItemBlock#addInformation to Block#addInformation - - v8.99.805 Merge pull request #2659 from kashike/feature/immutable-blockpos - Replace Forge's getImmutable method with the vanilla method - - v8.99.804 Merge pull request #2664 from gigaherz/capability-storage - Make access to the Capability IStorage less annoying - - v8.99.803 Fix landing particles not showing up. Cloes #2661 - - v8.99.802 Make NoteBlockEvent raw constructor protected to allow subclasses. Closes #2153 - - v8.99.801 Fix bows not animating properly when picking up ammo while using. Closes #2672 - - v8.99.800 Fix shrubs not generating correctly. Closes #2663 - - v8.99.799 Fix EntityPlayer still running old armor logic. Closes #2670 - - v8.99.798 Merge pull request #2634 from mezz/null-pick - Fix Block.getPickBlock returning an ItemStack with a null Item - - v8.99.797 Fixed StackOverflow caused by the previous commit, closes #2669. - - v8.99.796 Prevent missing model from loading multiple times. - - v8.99.795 Fix Block.getPickBlock returning an ItemStack with a null Item - - v8.99.794 Add wrapper methods for IStorage#readNBT/writeNBT. - - v8.99.793 Replace Forge's `BlockPos#getImmutable` method with the included `BlockPos#toImmutable` (func_185334_h), while keeping the override in PooledMutableBlockPos to prevent mutable leaks. - Also prevent a mutable blockpos leak in World#setTileEntity - - v8.99.792 Fixed crosshair always being white, closes #2653. - - v8.99.791 Enabled diffuse lighting by default in UnpackedBakedQuad.Builder. - - v8.99.790 Fixed diffuse lighting not being applied if forge lighting pipeline is disabled, closes #2651 - - v8.99.789 Merge pull request #2650 from mezz/1.9 - Make tooltips layout in the right direction, wrap if there is no room - - v8.99.788 Make tooltips layout in the right direction, wrap if there is no room - Same as #2649, but for Minecraft 1.9 - - v8.99.787 Merge pull request #2649 from mezz/tooltips - Make tooltips layout in the right direction, wrap if there is no room - - v8.99.786 Make tooltips layout in the right direction, wrap if there is no room - Fixes #2255 - - v8.99.785 Disabled erroring block, fixed DynBucketTest.TestItem model. - - v8.99.784 Merge pull request #2645 from diesieben07/populate_event - Fix PopulateChunkEvent.Post not firing. - - v8.99.783 Made some more public fields either private or final. - - v8.99.782 Removed RenderWorldEvent, encapsulated all public event fields. - - v8.99.781 Removed LanguageRegistry and CollectionWrapperFactory. - - v8.99.780 Fixed isSideSolid causing infinite loops due to the call to getActualState. - - v8.99.779 Cleanup: removed IEEP, removed redundant casts, fixed imports, fixed typos. - - v8.99.778 New Builder class in BlockStateContainer. Makes building containers with both listed and unlisted properties cleaner. - Make all methods of BiomeGenBase$BiomeProperties public so that modders can use that class outside subclasses. - - v8.99.777 Fix PopulateChunkEvent.Post not firing - - v8.99.776 Merge pull request #2643 from diesieben07/beetroots - Fix BlockCrops.getDrops not respecting new age methods (for beetroots) - - v8.99.775 Fix BlockCrops.getDrops not respecting new age methods (for beetroots) - - v8.99.774 Add flashing update notification icon made by @gigaherz, closes #2582 - It is added to the "Mods" button in the main menu and to out-of-date mods in the mod list (there it replaces the "U"). - Also fixes a little typo. - - v8.99.773 Register the animation Capability. No idea how it worked before at some point. - - v8.99.772 Show meaningful error if ModelLoaderRegistry is used before the missing model is initialized. - - v8.99.771 Fix typo causing biomes to be generated in wrong chunks. Closes #2632 - - v8.99.770 Fixed custom entities unique ids. - - v8.99.769 Update FML Entity Spawn packet for 1.9's location change. Closes #2567 - - v8.99.768 Merge pull request #2622 from williewillus/dupedropfix2 - Actually fix dupe drop - - v8.99.767 Added Capability.cast, to allow avoiding unchecked casts in ICapabilityProvider.getCapability - - v8.99.766 Fix swap animations for sure this time. - - v8.99.765 Actually fix dupe drop - - v8.99.764 Make OreDictionary.initVanillaEntries() private so that dumb modders will stop calling it. - - v8.99.763 Allow finite fluids to be drained correctly - - v8.99.762 Merge pull request #2531 from Choonster/finite-fluid-drain-fix - Allow finite fluids to be drained correctly - - v8.99.761 Merge pull request #2587 from diesieben07/spawn_egg_fix - Fix mod spawn eggs and EntityList.func_188429_b - - v8.99.760 Merge pull request #2592 from matthewprenger/patch-1 - Pass exceptions thrown in mod event buses back to FML to handle appropriately - - v8.99.759 Merge pull request #2593 from williewillus/dupedropfix - [1.9] Fix double dropping of items. Closes #2549 - - v8.99.758 Merge pull request #2621 from Thutmose/patch-1 - Fix pushing players inside blocks. - - v8.99.757 Fix pushing players inside blocks. - same changes made to the 1.9 branch - - v8.99.756 Merge pull request #2614 from williewillus/entitycaps - Expose IItemHandler on vanilla entities - - v8.99.755 Added support for custom dyes with Banners. Closes #2596 - - v8.99.754 Make RenderLivingBase.add/remvoeLayer, Closes #2573 - - v8.99.753 Fix pushing players inside blocks. - - v8.99.752 Update according to suggestions - - v8.99.751 Exclude jna from termal tansformer. - - v8.99.750 Add ShieldDecoration and Tipped arrows to recipe sorter. Closes #2613 - - v8.99.749 Fixed Item.shouldCauseReequipAnimation hook. - - v8.99.748 Fix Chests not opening correctly with semi-solid blocks on top. - - v8.99.747 Merge pull request #2618 from Thutmose/patch-1 - Allow players sized smaller than 1 block to walk into small spaces - - v8.99.746 Merge pull request #2605 from Thutmose/playersize - Fixed players smaller than 1 block not being able to walk under overhang - - v8.99.745 Rework DimensionManager for new DimensionType enum, replaces the old provider registry. Also fixed save folder issues with dimensions. Closes #2570 - - v8.99.744 Allow players sized smaller than 1 block to walk into small spaces - Same as #2605 but for 1.9 branch - - v8.99.743 Allow players sized smaller than 1 block to walk into small spaces - - v8.99.742 Merge pull request #2612 from CovertJaguar/master - Add missing Minecart/Track hook. - - v8.99.741 Added default left hand transforms for forge transform strings. Closes #2615. - - v8.99.740 Made VertexBuffer.sortVertexData cleanup pointers after it's done. Closes #2528. - - v8.99.739 Ignore blocks/items with null registry name during model loading. Fixes NPE during resource reloading in worlds with removed blocks/items. - - v8.99.738 Removed blockCenterToCorner from TRSRTransformation constructor. Closes #2461. - - v8.99.737 Implemented slightly more generic version of UVLock, re-enabled it for json models. Closes #2607. - - v8.99.736 Expose IItemHandler on vanilla entities - - v8.99.735 Add missing Minecart/Track hook. - - v8.99.734 instance -> INSTANCE - - v8.99.733 Separated model classes to client and common packages. - - v8.99.732 Switched animation system to capabilities, added animated item example, fixed state passing in MultiModel. - - v8.99.731 Merge pull request #2610 from gigaherz/1.9-enchantment - Fix for enchantment table rolling invalid enchants - - v8.99.730 Merge pull request #2590 from blay09/patch-1 - [1.9] Fix KeyInputEvent only being fired if Keyboard.getEventKeyState() is false - - v8.99.729 Merge pull request #2606 from CovertJaguar/1.9 - Fix #2601 Minecart infinite acceleration - - v8.99.728 Fix a condition that caused the enchantment table to roll invalid enchantments. - - v8.99.727 Fix #2601 Minecart infinite acceleration - - v8.99.726 Fix EntityList.func_188429_b not supporting mod-entities, fixes spawn eggs, fixes #2581 - - v8.99.725 Merge pull request #2594 from Corosauce/master - Fix for patch targetting the wrong field to change for failed pathfinding penalty - - v8.99.724 Fix for patch targetting the wrong field to change for failed pathfinding penalty - - v8.99.723 Merge pull request #2589 from diesieben07/player_riding_fix - Fix broken patch in EntityPlayer.updateRidden - - v8.99.722 Merge pull request #2586 from williewillus/fixcrops - [1.9] Fix BlockCrops looking for wrong AGE property for subclasses. Fix #2555 - - v8.99.721 Merge pull request #2585 from iTitus/patch-1 - Fix the EntityPlayer patch - - v8.99.720 Merge pull request #2584 from Corosauce/1.9 - Fix for patch targetting the wrong field to change for failed pathfinding penalty - - v8.99.719 Fix bucket test - - v8.99.718 Merge branch 'master' into 1.9 - - v8.99.717 Ignore classes directory - - v8.99.716 Fix double dropping of items. Closes #2549 - - v8.99.715 Pass exceptions thrown in mod event buses back to FML to handle apropriately - - v8.99.714 Fix KeyInputEvent only being fired if Keyboard.getEventKeyState() is false. - It used to be called for both key-up and key-down states prior to 1.9, so I assume Vanilla's changes to F3 behavior broke the patch. - - v8.99.713 Fix broken patch in EntityPlayer.updateRidden - - v8.99.712 Fix #2555 - - v8.99.711 Fix the EntityPlayer patch - In 1.8.9 the call goes to getDisplayNameString() so that any changes from the PlayerEvent.NameFormat event are being take into account. - In this patch the call goes to func_70005_c_() which is the getter for the GameProfile name. - I changed it back. - Sorry if you do not want to accept it because it is a one-liner. - - v8.99.710 Fix for patch targetting the wrong field to change for failed pathfinding penalty - - v8.99.709 Fixed sprite not being passed to the quad builder for custom models. - - v8.99.708 Fixed outline shader rendering, closes #2560. - - v8.99.707 Fixed Block.doesSideBlockRendering, closes #2564. - - v8.99.706 Fixed invalid index calculation in BakedQuadRetextured. - - v8.99.705 Fix AT lines. - - v8.99.704 Fixed quads that don't need diffuse lighting getting it anyway. - - v8.99.703 Merge pull request #2559 from Adubbz/master - BlockColors and ItemColors no longer assume non-Vanilla id constancy. Added a getter for ItemColors. - - v8.99.702 Fixed MultiLayerModel not getting correct submodels; Unified the gui lighting of normal and custom models - diffuse lighting is now done in the pipeline, no need for IColoredBakedQuad anymore. - - v8.99.701 BlockColors and ItemColors no longer assume non-Vanilla id constancy. Added a getter for ItemColors. - - v8.99.700 Fixed NPE when sneak using a item. - - v8.99.699 Fixed Sand not falling. - - v8.99.698 Fixed onUseStop being called twice {Bows firing twice} - - v8.99.697 Fix vanilla bug where bows consumed tipped arrows in creative. - - v8.99.696 Remove our entity position fixer. Vanilla fixed the bug in 1.9. - - v8.99.695 Javadocs, small cleanup. - - v8.99.694 Fixed progress reporting for model loading. - - v8.99.693 Removed imports in patches. - - v8.99.692 Fixed EffectRenderer patch, closes #2547. - - v8.99.691 Fixed incorrect culling of mod TESRs. - - v8.99.690 Fixed incorrect rotations for items in the left hand. Closes #2548. - - v8.99.689 Fixed model error reporting, fixed model errors in test mods that shouldn't happen, fixed custom texture loading, made more things private/final. - - v8.99.688 Merge pull request #2544 from Vazkii/patch-1 - 1.9: Fixed registering armor materials through EnumHelper exploding - - v8.99.687 1.9: Fixed registering armor materials through EnumHelper exploding - 1.9 ArmorMaterial now requires a SoundEvent for the equip sound. - - v8.99.686 Fixed breaking of tall grass. It now uses fortune. Expanded grass seed hooks to allow Fortune. Potentially removing in future in favor of LootTables. - - v8.99.685 Fix digging blocks in survival. - - v8.99.684 PlayerManager updated. - - v8.99.683 Delete mcp patches. - - v8.99.682 We are based on 1.9 not 1.8.9 :D - - v8.99.681 Update patches for fixed inner class suffeling in srg files. - - v8.99.680 Big model loader refactoring: simplified a lot of things, broke some error reporting. Still generally works. - - v8.99.679 First version of updated of ModelLoader, mostly works. - - v8.99.678 Fixed some errors in forge.exc - - v8.99.677 Updated to latest mappings. Exc is broken, some anonymous classes didn't map to srg names. - - v8.99.676 Merge pull request #2539 from bonii-xx/bugfix - Fix CombinedInvWrapper accessing incorrect slots - - v8.99.675 Fix CombinedInvWrapper accessing incorrect slots - Closes #2533 - - v8.99.674 Switch to srg patches - - v8.99.673 Fixed armor rendering - - v8.99.672 Fixed incorrect rendering state caused by transparent rendering pass for entities. - - v8.99.671 Fixed emply hand not rendering in first person. - - v8.99.670 Capture Biome Registry within FML - - v8.99.669 Fixed (hopefully) perspective transformations for custom models too. - - v8.99.668 Fix items rendering too low in first person. - - v8.99.667 Move the patch into the fml override handler, for less patch - - v8.99.666 Fix race condition between server ticks and the netlogin code handshaking for FML - - v8.99.665 Fix perspective transformations for left-handed items, disable ModelAnimationDebug until model loading is fixed. - - v8.99.664 Fixed position being shifted before being sent to shouldSideBeRendered. - - v8.99.663 Bump version info. Rather important. - - v8.99.662 Added bypass functions to Defaulted registry, DO NOT USE THIS MODDERS FORGE INTERNAL ONLY. - And some other fixups for running. - - v8.99.661 Interaction hooks need to be re-added but compiles {Doesn't run} - - v8.99.660 Fix up PlayerSP for the AT - - v8.99.659 Another AT, for the player - - v8.99.658 Finish world, chunkloading should work again? - - v8.99.657 Potion cleanup. Moar fixes! - - v8.99.656 Remove more chestgenhooks stuff. Clean up some more ATs - - v8.99.655 More fixups, removing chestgenstuff aggressively. Use loot tables. Any missing ones WILL be added by Mojang. - - v8.99.654 Another compilation fix - More patch tweaks for compilation errors. onItemUseTick takes an entity now, cos skellies use stuff too - - v8.99.653 Some more forge code fixes - - v8.99.652 Most of ItemInWorldManager reject, various small error fixes. - - v8.99.651 World - - v8.99.650 10 more rejects down. - 98 errors 6 rejects left. - - v8.99.649 More patch work, client patches. - - v8.99.648 Allow finite fluids to be drained correctly - - v8.99.647 Few more compile fixups - - v8.99.646 Command fixups - - v8.99.645 Remove two patches that aren't needed anymore - - v8.99.644 Some client handler cleanup - - v8.99.643 Fix up import in Potion - - v8.99.642 Some more FML related fixups - - v8.99.641 Some fixups for FML, and use the FML registry for potions - - v8.99.640 NetworkDispatcher/FMLProxyPacket 41 more errors cleaned. - - v8.99.639 Temporary hack to fix MCP mappings for param names we are using that is causing compile errors. - - v8.99.638 Fishing is now a loot table no more need for FishingHooks. {LootTables still need to be evaludated if they need extra hooks, but thats later} Goodbye 44 compile errors! - - v8.99.637 Fixed errrors in Fluids package. TODO: Make BlockLiquid implement IFluidBlock and REMOVE FluidContainerRegsitry. Everything *should* be able to use IFluidContainer directly. - - v8.99.636 Made OBJModel.java compile. - - v8.99.635 Model UV lock handling from the state to the model, fixed most compile errors in ModelLoader, disabled it (and ModelBakeEvent) until it's functional, fixed some errors in ForgeHooksClient. - - v8.99.634 Removed generics from IModel subinterfaces, add ed ModelProcessingHelper instead. - - v8.99.633 WorldServer: NOTE - ChestGenHooks has NOT been updated in accordance with plans for removing it - GuiStats - Fixup deletion of egg handling in entity registry? - - v8.99.632 ServerPinger - PlayerList - - v8.99.631 ModelBox, PositionTextureVertex, TexturedQuad. Does anyone really use those on the server? - - v8.99.630 LanguageManager - NetHandlerPlayClient - - v8.99.629 Fixed B3D loader, fixed some obvious errors in ModelLoader. - - v8.99.628 Fix various errors in text mods. - - v8.99.627 World Patches work. - - v8.99.626 More work on misc things. - - v8.99.625 Delete reject files i missed - - v8.99.624 Merge pull request #2521 from Adubbz/master - Updated BiomeManager to 1.9 - - v8.99.623 Updated BiomeManager to 1.9 - - v8.99.622 Merge pull request #2520 from Adubbz/master - Updated the biome dictionary to support 1.9 - - v8.99.621 Enchantments, some world, Biomes, bucks, world/gen/features. - - v8.99.620 Updated the biome dictionary - Squashed commits: - [4064de6] Updated the biome dictionary - - v8.99.619 DedicatedServer - IntegratedServer - - v8.99.618 Chunk - - v8.99.617 Updated raw types in ExtendedBlockState, fixed some ATs, updated some things that needed updating in model classes. - - v8.99.616 removed Item.getModel, functionality is now achieveable via ItemOverrides. - - v8.99.615 GuiOverlayDebug, ItemModelMesher, RenderManager, Stitcher fixed + minor fixes in forge gui classes. - - v8.99.614 GuiCreateWorld, GuiSlot, GuiUtilRenderComponents, GuiContainerCreative - - v8.99.613 Small renames before bed. - - v8.99.612 Merge pull request #2514 from CovertJaguar/1.9 - Fix broken patches for EntityMinecart - - v8.99.611 Items done, <1000 errors whoot! - - v8.99.610 Fix broken patches for EntityMinecart - - v8.99.609 Some entity patches. - - v8.99.608 Fixed most errors in the model stuff, except for ModelLoader and b3d and obj getQuads/handleBlockState methods. - - v8.99.607 FontRenderer - - v8.99.606 tabs -> spaces. - - v8.99.605 EntityRenderer, most of RenderGlobal, minor fix to LayerBipedArmor. - - v8.99.604 RendererLivingEntity, RenderEntityItem, RenderItem, RenderManager, LayerArmorBase; Item.getModel + ISmartItemModel are now inside ItemOverrideList; fix class rename in TESR patch. - - v8.99.603 A bunch of rendering rejects updated. - - v8.99.602 Updated various block model patches. - - v8.99.601 Some import renames and compile error fixes, killed ~800. - - v8.99.600 util, tileentity, stats, realms. Potions got an overhaul and out registry will need to be adapted. - - v8.99.599 net.minecraft.block.* patches - - v8.99.598 First few patches applied - - v8.99.597 Add rejects with mcp names for application to main codebase. Let's roll? - - v8.99.596 Add in mcp named patches and use them. Initial 1.9 setup. - - v8.99.595 Don't ignore rejects - - v8.99.594 Merge pull request #2476 from Abastro/fovfixes - Added Event: EntityViewRenderEvent#FOVModifier - - v8.99.593 Merge pull request #2500 from me4502/master - Added local click position to PlayerInteractEvent. Fixes #2482 - - v8.99.592 Added local click position to PlayerInteractEvent. - - v8.99.591 Added EntityViewRenderEvent#FOVModifier - Enables mods to modify raw FOV directly. - Avoids modifier limit from FOVUpdateEvent. - Aware of blocks which are needed for fov change related with materials. - - v8.99.590 Fixed dummy blocks not being removed from registry on dedicated server correctly. Closes #2487 - Also added some more debug logs! - - v8.99.589 Merge pull request #2497 from bonii-xx/universal_bucket - Fix WordServer.canCreatureTypeSpawnHere not using Forge Events. - - v8.99.588 Fix WordServer.canCreatureTypeSpawnHere not using Forge Events. - Followup of #2496 - - v8.99.587 Merge pull request #2495 from elix-x/master - Increased actual maximum fuel burn time - - v8.99.586 Merge pull request #2496 from bonii-xx/universal_bucket - Fix WorldEvent.PotentialSpawns Event passing the list instance of the… - - v8.99.585 Fix WorldEvent.PotentialSpawns Event passing the list instance of the ChunkProvider to users - - v8.99.584 Increased actual maximum fuel burn time - Increased actual maximum fuel burn time from 32767 to 2147483647. - Backwards compatible. - - v8.99.583 ModelLoader: added verbose error logging showing items/blockstates associated with model locations; removed redundant cast leftover from ungenerified code; fixed up a couple of warnings. - - v8.99.582 Fix race condition when using indexed codec in a LAN server. Fixes spurious crash when LAN server is running. - - v8.99.581 Log when it's likely the indexedcodec is gonna fail, because of LAN server derps likely. Try and give some context for debuggers. - - v8.99.580 Merge pull request #2488 from bonii-xx/universal_bucket - Fix universal bucket logging an exception - - v8.99.579 Fix universal bucket logging an exception - - v8.99.578 Merge pull request #2485 from AlgorithmX2/world_getLightOpacity - Test getLightOpacity(world,pos) in World as well as the chunk. - - v8.99.577 Test getLightOpacity(world,pos) in World as well as the chunk. - - v8.99.576 Merge pull request #2443 from AlgorithmX2/cap_pickup_entityitem - Preserve ItemStack Caps when picking Items up. - - v8.99.575 Preserve ItemStack Caps when picking Items up. - - v8.99.574 Merge pull request #2429 from AlgorithmX2/in_material_hooks - In Material Hooks - For Swimming, Overlays, Boats, and Fishing. - - v8.99.573 In material Liquid Hooks. - - v8.99.572 Merge pull request #2481 from diesieben07/potion-draw-fix - Fix Potion.shouldRenderInvText - - v8.99.571 Fix Potion.shouldRenderInvText - - v8.99.570 Merge pull request #2478 from AlgorithmX2/pre_getLightOpacity - Fix bug with getLightOpacity based on TileEntities, - - v8.99.569 Fix bug with getLightOpacity based on TileEntities, - Capture getLightOpacity prior to removing the tile entity. - - v8.99.568 Fix loading of world ID maps for worlds without dummy data. Closes #2477 - - v8.99.567 Merge pull request #2474 from bonii-xx/universal_bucket - Fix customized bucket names not getting translated correctly - - v8.99.566 Added default levels for fluid extended properties in fluid model. - - v8.99.565 Fix customized bucket names not getting translated correctly - - v8.99.564 Merge pull request #2333 from bonii-xx/universal_bucket - Add an universal bucket. - - v8.99.563 Add universal bucket - - v8.99.562 Fix chat formatting not surviving line wraps in chat messages. - - v8.99.561 Merge pull request #2470 from diesieben07/shader-fix - Fix the entity shader hook - - v8.99.560 Fix the entity shader hook - - v8.99.559 Merge pull request #2467 from iLexiconn/master - Added hook to add entity spectator shader - - v8.99.558 Merge pull request #2468 from nallar/master - Workaround JDK-8087309: Constant folding "static final boolean" is incomplete - - v8.99.557 Workaround JDK-8087309: Constant folding "static final boolean" in boolean expressions is incomplete - - v8.99.556 Added hook to add entity spectator shader - - v8.99.555 Protect BlockSnapshot and Chunk.getTileEntity from mutible BlockPos instances. Closes #2438 - - v8.99.554 Fixed Block.onNeighborChange not being called for all axises. Closes #2428 - - v8.99.553 Add missing classes to CrashReport preloading. Closes #2421 - - v8.99.552 Fixed invalid item being passed to gatherCapabilities when itemstacks changed item. Closes #2445 - - v8.99.551 Fixed implementation of RenderEntityItem.shouldSpreadItems. Closes #2448 - - v8.99.550 Fixed vanilla bug where network clients would see incorrect break progress on blocks. Closes #2462 - - v8.99.549 Fixed Block/Item.setRegistryName printing a incorrect warning when used. Closes #2398 - - v8.99.548 Fixed Entity.shouldRiderSit modifying game logic and not just rendering. Closes #2402 - - v8.99.547 Fixed invalid parameters being sent to LivingSpawnEvent.CheckSpawn. Closes #2453 - - v8.99.546 Potential fix for NPE when using an item to open a slotless inventory. Closes #1354 - - v8.99.545 Fix custom model loader reload hook not firing during registration. - - v8.99.544 Fix incorrectly updated patch to ChunkCache. Related to #2451. - - v8.99.543 Fix multiple registrations of reloading hooks in custom model loaders. - - v8.99.542 Remove Mojang logger spam in EntityItem. - - v8.99.541 Fix jar signer not applying to universal packed in the installer. - - v8.99.540 Fix TRSRTransformation.toItemTransform. Closes #2425. - - v8.99.539 Merge pull request #2437 from pau101/master - Fix #2321 - - v8.99.538 Fix #2321 - - v8.99.537 Merge pull request #2423 from Mumfrey/fix/jdt - Fix ASM SignatureReader choking on invalid lambda local var signatures emitted by JDT - - v8.99.536 Revert binary-incompatible changes in models. - - v8.99.535 Fix droppers not dropping. - - v8.99.534 One day I will learn to include all required classes in the commit. - - v8.99.533 Added "gui3d" and "smooth_lighting" options to the forge blockstate. Implemented them for vanilla and B3D models. Added generic types to IModel subinterfaces, to simplify chaining. - - v8.99.532 Merge pull request #2434 from matthewprenger/logcommandexceptions - Log unknown exceptions in commands. Resolves #2433 - - v8.99.531 Log unknown exceptions in commands. Resolves #2433 - - v8.99.530 Fix ASM SignatureReader choking on lambda signatures generated by JDT - - v8.99.529 Fixed incorrect patch to GenLayer, causing large vanilla biomes to not work properly. - - v8.99.528 Provide original armor model in the custom armor model hook. - - v8.99.527 Fixed small bug in item extraction code. - - v8.99.526 Fix NoSuchElementException in ModelBlockAnimation caused by empty event list. - - v8.99.525 Bump version in prep for new Recomended Build. - - v8.99.524 Loosen TileEntity's default hasCapability implementation. Modders should specifically opt in. - - v8.99.523 Merge pull request #2336 from VikeStep/master - [1.8.9] Add EntityTravelToDimensionEvent - - v8.99.522 Fixed minor race condition between mouse clicks and TESR in the animation example. - - v8.99.521 Add EntityTravelToDimensionEvent - Resolve Merge Conflict - Move event call inside conditional - - v8.99.520 Sometimes I forget how much trivial things are missing from Java 6. - - v8.99.519 Merge pull request #2331 from RainWarrior/model-animation - Model animation system - - v8.99.518 Model animation system. - Main things of interest: - * IAnimationStateMachine - state machine for animations; can load - from json. - * AnimationTESR - automatic TESR for animated models. - * AnimationModelBase - same for entities. - * ITimeValue - time-varying value, used to control animation - parameters from code. - * TESRs can now be batched - look at TESR.renderTileEntityFast + - TE.hasFastRenderer. - * RegionRenderCache is not accessible to TESRs and other client-side - logic - MinecraftForgeClient.getRegionRenderCache. - - v8.99.517 Fix J6 compile error in IItemHandler PR. - - v8.99.516 Merge pull request #2401 from ShetiPhian/Fix-isBeaconBase-BlockPos - Fixed: the BlockPos passed to isBeaconBase - - v8.99.515 Merge pull request #2385 from rwtema/master - Add IItemHandler capability - - v8.99.514 Add IItemHandler capability - Add the actual patches that I forgot. - Add simple implementations of IStorage and the factory methods. - Add ItemStackHandler. A simple IItemHandler implementaton. - return nulls, not throw nulls. - Move the vanilla wrappers to a separate class for now. - Minor clean ups of VanillaWrapper code. - Inline static methods. - Add comments. - Minor cleanup of code. - Remove redundant size field and add a validate slot index method. - Minor formatting issues. - Break early If stacksize to insert is 0. - Remove setByte() methods. - Throw exception if IItemHandler can't be modifyed in NBT loading. - Replace event handler with patches - Add capability to mine cart inventory entities. - Change formatting and registration of capability. - Make InventoryPlayer implements IItemHandler because why not. Also added a field to allow mods that add additional player inventory space to publicly expose them. - Reduce patch sizes - Lazy initialization of the item handler for vanilla tiles. - Minor formatting changes. - Create a single vanilla chest item handler that will merge with adjacent chests when detected. Added hooks to reset the cached adjacent value when a block update is detected and when a chunk loads. - Revert "Make InventoryPlayer implements IItemHandler because why not. Also added a field to allow mods that add additional player inventory space to publicly expose them." - This reverts commit 306d4a37fd0e8c8a0754411c013b750dfe8e2c87. - Fix furnace derp - Replace double chest code with a simpler method. - Vanilla wrappers implement IItemHandlerModifiable (since they are modifiable) - Minor code cleanups - Add an onContentsChanged() and onLoad() callback methods.to the default implementation. - Add slot as a parameter in the callback method. - Change IItemHandlerModifiable.setStackInSlot() to void, and added a note about not being intended for cross-mod use. - Improve ItemStackHandler handling of errored NBT. - Make the stacks array protected. - Fix a lot of derps in SlotItemHandler. - Fix derp in ItemStackHandler - Clarify comments on IItemHandler - ItemStackHandler no longer caches the stack array in local variable. - Clean up the Chests code to make intentions clearer - Vanilla hoppers have their cooldown activated when an item is inserted. Made this behavior part of an item handler (rather than the insertion code) - Fix mistake in ItemStackHandler - More documentation of potential edge cases in getStackInSlot() - Make limit checking more resiliant. - - v8.99.513 Fixed: BlockPos passed to isBeaconBase - - v8.99.512 Merge pull request #2378 from blay09/bugfix/slotdrop - Fix items being dropped through slots outside GUI boundaries - - v8.99.511 Merge pull request #2399 from asiekierka/fix-2388 - Fixed ItemStack.splitStack not preserving capabilities, Closes #2388 - - v8.99.510 Restore OreDictionary.getOres(String, boolean) and doeOreNameExist(String) functions that went MIA in git merge issue. - Original Commit: https://github.com/MinecraftForge/MinecraftForge/commit/cd3bbfb02c9fcd4ce4bbf00f460dfdd6a386d107 - - v8.99.509 Fix invalid ServerHangWatchdog patch causing it to not apply. - - v8.99.508 Fix #2388 - - v8.99.507 Merge pull request #2396 from Minecrell/patch-3 - Strip console formatting codes for Vanilla log file - - v8.99.506 Merge pull request #2394 from iLexiconn/master - Fixed makeItemStack ignoring stackSize - - v8.99.505 Strip console formatting codes for Vanilla log file - - v8.99.504 Fixed makeItemStack ignoring stackSize - Fixes #2376 - - v8.99.503 Fixed error detection login in ModelLoader, reduced the maximum number of printed stack traces to 5 per domain. - - v8.99.502 Fix forge logging not working correctly in ForgeDev. - - v8.99.501 Fix Deobfusication transformer throwing verification errores in Eclipse development environments. - - v8.99.500 Correctly handle error caused by missing/malformed bucket model definition file. - - v8.99.499 Call deserialze on capabilities in ItemStack.setItem. Closes #2384 - - v8.99.498 Fix ItemStacks not getting the parent capability provider from items. Closes #2383 - - v8.99.497 Merge pull request #2367 from kashike/feature/quiet-watchdog - Skip hang detection on first run of the server hang watchdog - - v8.99.496 Merge pull request #2358 from boq/bedless - Allow sleeping without bed block under player - - v8.99.495 Allow sleeping without bed - - v8.99.494 Fixed missing model error reporting, made block and item variants sort before loading, to make the splash screen info more useful. - - v8.99.493 Fix spruce not growing properly - - v8.99.492 Fixed problem with LAN connections seeing the original ProxyPacket and consuming the first byte. Closes #2373 - - v8.99.491 Fix shouldRefresh not to be so over-eager about modded TEs. Should fix Packet21 causing a TE reset. - - v8.99.490 Fix items being dropped out of a GuiContainer when dealing with a slot outside of the xSize/ySize boundaries. - - v8.99.489 Clone FML packet indexes if channel is not open. Fixes potential threading issue. - - v8.99.488 Merge pull request #2375 from bonii-xx/dynbucket - Default bucket model is empty, allow bucket model without fluid. - - v8.99.487 Default bucket model is empty, allow bucket model without fluid. - This allows capsules, cans, bottles,... to use the same item model for their item variant. Also it's makes much more sense. - - v8.99.486 Merge pull request #2370 from mezz/screenBackground - Add DrawScreenBackgroundEvent - - v8.99.485 Add GuiScreenEvent.BackgroundDrawnEvent - - v8.99.484 Fix problem which meant runtime deobf to MCP names wasn't working. SRG named mods located in the mods dir of a dev - environment will now load normally. - - v8.99.483 Skip hang detection on first run of the server hang watchdog - - v8.99.482 New Capability system allowing for more manageable world object features. - When combined with @Optional this should address all issues of soft dependancy on mods/apis. - This also addresses the issue of dynamic functionality in TileEntities/Entities. - Current capability providers: TileEntity, Entity, ItemStack - Also added INBTSerializeable, a generic interface for game objects that can be written to/from NBT tags. - Vanilla capabilities will be coming soon, mostly on request and review. - So start requesting capabiliteis on vanilla/Forge features. - - v8.99.481 Fixed banners not droping the correct item when harvested using modded mechanics. Closes #2258 - - v8.99.480 Fix jline server console not showing colored text. Closes #2334 - - v8.99.479 Fixed GuiWrongMinecraft having wrong Log file name. Closes #2348 - - v8.99.478 Made WrongMinecraftVersionException and ModSortingException a bit easier to read in log files. Closes: #2345 - - v8.99.477 Remove dead code in JarDiscoverer. Closes #2346 - - v8.99.476 Catch GROUND item transform type with the forge hook too. - - v8.99.475 Implemented face culling for item models, improves performance slightly. Closes #2326 - - v8.99.474 Merge pull request #2355 from williewillus/fixentityitemdupe - Fix bug with /give command and items with larger than default lifespans - - v8.99.473 Fix visual effect entity persisting longer than it should - Fix derp - - v8.99.472 Fixed issue with WorldServer.getTileEntities when being called with ranges that overlap chunks oddly. Closes #2350 - - v8.99.471 Made block model loading bar more robust, and fixed the count. - - v8.99.470 Added progress bar for the ModelLoader. - - v8.99.469 Derp. - - v8.99.468 Model loader improvements: adding custom data/textures to models that don't need them doesn't cause a error now, since it's common to put those in the defaults section of the blockstate json; you can get IModel associated with the variant now - using ModelLoaderRegistry.getModel; MultiLayerModel should now respect transformations applied to it, and respect part transformations. - - v8.99.467 STFU I know how to code. *shouts* get off my lawn! - - v8.99.466 Make the parent dir tree for the dep extractor - - v8.99.465 Changed default implementation of Block.getExtendedState. Closes #2309. - - v8.99.464 Java6 + Eclipse + Gradle strike again. - - v8.99.463 Fixed implementation if IRetexturableModel in ItemLayerModel. Closes #2244. - - v8.99.462 Don't crash on exception during loading of item variants from blockstate jsons. - - v8.99.461 Fixed perspective transformation handling for fluid models, changed inventory fluid model to use unrotated still texture. - - v8.99.460 Fixed invalid flow vector caching of still fluids. - - v8.99.459 Fixed random offset not working properly for flatly-lit models. - - v8.99.458 Explicitly close the file. - - v8.99.457 Add a simple ContainedDep mechanic- mods can contain other mods or libs, and can specify them using a manifest tag: "ContainedDeps". - This is a space separated (manifest standard) list of jar files that are to be extracted into the version specific directory. - There's also a special system property "fml.skipContainedDeps" that will allow for runtime skipping of extraction of contained deps (a comma separated list, based on the file name). - - v8.99.456 Added new get/setRegistryName functions to Item and Block. - And helper functions in GameRegistry to allow for registering using those names automatically. - This is to simplify registration and get rid of the horrible hacks users are doing now with 'unlocalised names'. - - v8.99.455 Move substitution activation after id loading. This should fix the problem of null for existing object. - - v8.99.454 SidedProxy now has sensible default values - nested ClientProxy and ServerProxy classes. - - v8.99.453 Merge pull request #2332 from killjoy1221/master - Add links for messages and other commands - - v8.99.452 Add links for messages and other commands - - v8.99.451 Reverted Render registration changes due to them working. - - v8.99.450 Nobody is left behind. - - v8.99.449 Fixed RenderingRegistry not working. Closes #2312. - - v8.99.448 Fix that the dummy registry entries don't allow clients connecting to servers. Also fix that it repeatedly nags about missing stuff in the world. - - v8.99.447 Fix boss health bar rendering when debug overlay is enabled. Closes #2328 - - v8.99.446 Swap Mod and Realms button to fix new realms 'notification' icon. - - v8.99.445 Fix J6 compile issue with ModelFluid. - - v8.99.444 Allow for default 1.8.8 mods to be loaded. Should be SRG compatible. - - v8.99.443 Restored transparency to the Forge logo. - - v8.99.442 Updated the forge logo to a higher-quality GIF file. Closes #2276. - - v8.99.441 Fixed wrong import. - - v8.99.440 Fixed broken leaky caching of OBJ models. - - v8.99.439 Caching of fluid models. Fixes #2145. - - v8.99.438 TESRs registering in preinit don't break pistons anymore. Fixes #2298. - - v8.99.437 Fixed color disabling not working for forge pipeline. Closes #2286. - - v8.99.436 1.8.9 update - - v8.99.435 Merge remote-tracking branch 'origin/1.8.8' - - v8.99.434 Merge pull request #2322 from bonii-xx/dynbucket - Fix bucket replacement not loading the bucket model by itself if repl… - - v8.99.433 Fix bucket replacement not loading the bucket model by itself if replacing buckets. - This happens when no other mod that uses the bucket model is present. - Also added a simple method for registering the bucket model, should give - modders an idea on how to use the general model. - - v8.99.432 Merge pull request #2320 from bonii-xx/slime - Add a hook for custom particle spawning for slimes - - v8.99.431 Add a hook for custom particle spawning for slimes - - v8.99.430 Merge pull request #2318 from diesieben07/entity-egg - Allow forge-type spawn-eggs to spawn child entities when clicking EntityAgeable - - v8.99.429 Allow forge-type spawn-eggs to spawn child entities when clicking EntityAgeable - - v8.99.428 Fix Button/Torch/Lever placement on stairs and slabs. Closes #2291 - - v8.99.427 Fixed random block position offset not applying correctly. - - v8.99.426 Added an ability to register custom item variants, not ending with "#inventory". Should allow grouping multiple item models into 1 blockstate json. - - v8.99.425 Try and make sure active substitutions are immediately available in the block to item map. - - v8.99.424 Actually use the delegate for the itemblock - - v8.99.423 Capture ItemBlock remaps. - - v8.99.422 Try and fix registry NPE when substitution is active. - - v8.99.421 Blocks are no longer erased from the registry if the mod isn't present. This means that modded blocks can potentially retain their IDs - even if they are temporarily not present in the game. Currently TileEntity data associated with the block is erased. - - v8.99.420 Fix up persistent substitution. Should close #2259 - - v8.99.419 Fix the channel handler naming. It now uses the standard netty namer for it, by careful use of cunning reflection. - - v8.99.418 Fixed vanilla bug related to spawning entities on top of fences. Closes #2303 - - v8.99.417 Fixed registry issues that prevented connecting to 1.8 Forge servers. - More precisely: Servers with missing registries default back to frozen version. - Throw descriptive error if we do not have any information. - - v8.99.416 Merge pull request #2282 from bonii-xx/dynbucket - Add a dynamic bucket model that displays the animated liquid contained - - v8.99.415 Add a dynamic bucket model that displays the animated liquid contained - Has a config option (default off) that replaces the vanilla buckets with the forge bucket model - New original bucket textures from mr_hazard - - v8.99.414 Fixed NPE caused by accessing undefined layer in MultiLayerModel. - - v8.99.413 Merge pull request #2293 from Lunatrius/fix/client-command-autocomplete - Fix client side command auto-complete not working correctly. - - v8.99.412 Fix client side commands adding parts of the color codes on autocomplete (prefix "7" and suffix "r"). - - v8.99.411 Fix dependency resolution for models with custom data/textures. - - v8.99.410 LightUtil.pack and .unpack now work correctly with unpacked arrays of size <4. - - v8.99.409 Delayed quad list resolution in MultiModel, fixes NPE in MultiLayerModel. - - v8.99.408 Forge pipeline will now take original model lightmap into account, if present. - - v8.99.407 Fixed java6 errors in previous commit. - - v8.99.406 IModel can now depend on a variant definition (ModelResourceLocation); added MultiLayerModel - simple model that'll render correctly in multiple layers + example of using it. - - v8.99.405 Preparations for the Animation system. - Changes to the Model API - IModelState now works with Optional. Handling of parts of the model is not optional, and coordinate space/result interpretation is up to the caller. IModel doesn't extend IModelPart by default anymore; MapModelState uses composition to achieve previous functionality, IModelPart implementations are disjoint now. Updated perspective handing to the new API, removed IPerspectiveState (MapModelState is now the same thing). Perspective transforms for the default fluid model. - - v8.99.404 Fix enchanting applying the same enchantment multiple times. Closes #2273 - - v8.99.403 Merge pull request #2272 from AlgorithmX2/addLandingEffects - Added addLandingEffects allowing mods to override landing particles - - v8.99.402 Merge pull request #2270 from AlgorithmX2/getHighlightTip - Add getHighlightTip allowing a item to override its displayed renderToolHightlight - - v8.99.401 Added addLandingEffects allowing mods to override landing particles, for blocks that require world information to determine textures. - - v8.99.400 A test for issue #1848. Please try this with any mods you can @ 1.8.8, and see if you still get log spam of any kind (not just the - log message from the issue either). - - v8.99.399 Add getHighlightTip allowing a item to override its displayed renderToolHightlight. - - v8.99.398 Merge pull request #2268 from minzmann/master - [1.8.8] Minor Fixes to PotionEffect.java.patch - - v8.99.397 Fix derpage when loading a 1.8 world, with persistent state being entirely ignored in that case. - - v8.99.396 Update PotionEffect.java.patch - - v8.99.395 Merge pull request #2239 from bonii-xx/potionhiding - Add shouldRender() to Potions that allows to hide them completely in … - - v8.99.394 Merge pull request #2228 from Minecrell/patch-2 - Fix some issues with the console command completion - - v8.99.393 Use ItemStack.hasEffect. closes #2230 - - v8.99.392 Merge pull request #2233 from liachmodded/mcl-typo - Fix a typo in jar detection - - v8.99.391 Merge pull request #2248 from AlgorithmX2/isOpaqueFace - Added doesSideBlockRendering to provide finer grain face culling. - - v8.99.390 Added doesSideBlockRendering to provide finer grain face culling. - Implemented for BlockStairs and BlockSlab. - - v8.99.389 Fix wrong EventType passed for Emerald ore-gen. - - v8.99.388 Deprecate int IDs in FluidRegistry. Modders should only ever use the String name. Also add a 'friendly' exception when attempting to get an ID for a unregistered fluid. Closes #1374 - - v8.99.387 Add EMERALD and SILVERFISH to GenerateMinable event. Closes #1158 - - v8.99.386 Fixed ModList GUI rendering incorrectly. Closes #2254 - - v8.99.385 Merge pull request #2253 from simon-i1-h/patch-1 - [1.8.8] Fixed edge case where position dependent light would not update. - - v8.99.384 Fixed that oldLight is not being used. - - v8.99.383 Workaround for https://github.com/google/guava/issues/738 - - v8.99.382 Fixed orientations of generated item faces. Fixes #2215. - - v8.99.381 Fixed colored leather armor, and custom armor textures. - - v8.99.380 Remove MCP reference patches. - - v8.99.379 Add shouldRender() to Potions that allows to hide them completely in the inventory - - v8.99.378 Improve the console command completer - - Fix space after command getting removed when completing a - subcommand together with the command prefix - - Add support for completing without input (shows command list) - - Sort command completion results - - Fix console spamming command prefixes after closing the input stream - - v8.99.377 Add a flag to the modidremapping event. If the remapevent is because the registry is refreezing, it'll be true. - - v8.99.376 Fix typo in `guava` - - v8.99.375 Clean up chunk patch. - - v8.99.374 Merge pull request #2231 from techbrew-mc/patch-1 - Initialize sources list - - v8.99.373 Initialize sources list - Fixes crash NPE thrown by addFile() - - v8.99.372 Most requested feature of all time? TileEntity init method called after it's ready to roll. remove all the if (firstTicks) - - v8.99.371 Merge branch 'Emberwalker-lang-adapter-fix' into 1.8.8 - Closes #1898 - - v8.99.370 Fix language adapter loading. - The language adapter is now properly picked up after the mod is loaded - on the classpath, fixing the ClassNotFoundException occurring before. - Also fixed some minor formatting and made it throw a full - RuntimeException on failure. - Fix up some formatting - - v8.99.369 Be noisy when API is in a coremod. It'll never work and modders should realize that fact. - - v8.99.368 Merge branch 'mezz-potionIsBadEffect2' into 1.8.8 - - v8.99.367 Merge branch 'potionIsBadEffect2' of https://github.com/mezz/MinecraftForge into mezz-potionIsBadEffect2 - - v8.99.366 Merge branch 'kashike-fix/secman' into 1.8.8 - - v8.99.365 Merge branch 'fix/secman' of https://github.com/kashike/MinecraftForge into kashike-fix/secman - - v8.99.364 Allow entity selectors to select "." in entity names. Closes #2125 - - v8.99.363 Merge branch 'Minecrell-jline' into 1.8.8 - - v8.99.362 A few fixes - - v8.99.361 Fixup Jline integration - - v8.99.360 Merge branch 'jline' of https://github.com/Minecrell/MinecraftForge into Minecrell-jline - - v8.99.359 Some tweaks - GameRegistry is modder facing API, so avoid having MC methods there. Fix a couple of registry bugs. - - v8.99.358 Merge branch 'PotionRegistry2' of https://github.com/bonii-xx/MinecraftForge into bonii-xx-PotionRegistry2 - - v8.99.357 Fix problem with spam from registry on loading a second world. Empty the staging. - - v8.99.356 Add a PotionRegistry to handle dynamic distribution and remapping of Potion IDs - - v8.99.355 Merge pull request #2209 from lumien231/MemoryWorldLeak1.8.8 - Fixed: Server not being stopped, causing Worlds to stay loaded - - v8.99.354 Fix up blockstate rebuild. Closes #2221. Also fix formatting. IDEA has differences. Solved now. - - v8.99.353 Add chunk loading protection to WorldSever.getTileEntitiesIn, may prevent orphanced chunks and a CME in EntityPlayerMP. Note: The 'max' parameters are NON-inclusive. - - v8.99.352 Giant registry fixup - - v8.99.351 Compiler warnings pass, undeprecated SplashProgress related stuff. - - v8.99.350 Removed IItemRenderer class, all functionality is possible with new rendering system. - - v8.99.349 Fixed Large mushrooms generating incorrectly. - - v8.99.348 Fixed placing blocks on snow layers with more then one layer. - - v8.99.347 Bump version for new Minecraft version. - - v8.99.346 Propogate AbortException. Closes #2206. Also fix tracing printstream when printStackTrace is called. - - v8.99.345 Fixed: The Integrated Server not being stopped when exiting a singleplayer world to the main menu - - v8.99.344 Add .exc for StatList patch - More tweaking - - v8.99.343 Fix up a couple of patches, affected by the recent update - - v8.99.342 Fix button and lever placement problem. Closes #2204 - - v8.99.341 Merge pull request #2205 from Illyohs/bugfix/mdk - [1.8.8] Remove trailing */ causing errors in the mdk build script - - v8.99.340 Remove trailing */ in the build.gradle - - v8.99.339 More cleanups, some documentation, a bunch of deprecations. - - v8.99.338 Cleaning up some derpy names - - v8.99.337 Clean up some very long dead code. Bukkit hasn't existed in a very long time now. IASM never worked, and I'm not about to implement it. - - v8.99.336 Deprecate it as well, because hey, it's redundant now. - - v8.99.335 ONE EVENT BUS TO RULE THEM ALL AND IN THE DARKNESS FIRE THEM! - - v8.99.334 Yeah, amount is NOT deprecated. - - v8.99.333 Fix MDK for 1.8.8 using FG2.1 snapshot - - v8.99.332 OMG! Documentation? WUT? I haz lost my mind. - Also, Functional interface for IMC. Senders can send a classname implementing Guava's function, and receivers - will be able to get that function, and do, well, whatever, really. Probably best for those callback type - scenarios, connecting up APIs and stuffs. - - v8.99.331 Cleanup Fluid deprecations stuff. - - v8.99.330 Update universal manifest for 1.8.8's json. - - v8.99.329 Update mappings to 20151122. - - v8.99.328 Merge branch 'master' into 1.8.8 - - v8.99.327 Merge remote-tracking branch 'origin/noci-1.8.8' into 1.8.8 - - v8.99.326 Fixed NPE is B3D loader caused by the missing vertex normal; updated the example chest model - it's now has 2 meshes; Updated ModelAnimationDebug - it now uses the new chest model, renders the base with the static world renderer, and only the lid with the TESR. - - v8.99.325 Fixed forge lighting working incorrectly outside 0x1000000 coordinates. - - v8.99.324 Removed face doubles from item models. - - v8.99.323 Fix holes in generated item models. - - v8.99.322 B3D loader: removed 2 redundand null checks, changed constructor args to final to fix (java6?) inner arg error. - - v8.99.321 Implemented interpolation of TRSR transformations; B3D: added interpolation capabilities to B3DState, animated TESR example in ModelAnimationTest (pure TESR right now, no separation inside the example model between the static and dynamic parts right now). - - v8.99.320 Fix derpy fir trees in the taiga. So many patches. See if we can find any more mistakes?! - - v8.99.319 Fix weird patch issue where the this FG commit: https://github.com/MinecraftForge/ForgeGradle/commit/2f0ca9921b961133689d29b807333241010a802d - breaks if the exact end of a line is a srgname. Not ideal, but should work. - - v8.99.318 Small tweak to the OUT/ERR logger - should skip the Throwable stuffs now. - - v8.99.317 Back to srgnames for patches. We should be starting to look OK now. - - v8.99.316 Fixed forge lighting working incorrectly outside 0x1000000 coordinates. - - v8.99.315 Use the 2.1 snapshot for FG - - v8.99.314 Re-add trove and vecmath. Mojang no longer ship them. - - v8.99.313 Fix a typesig that was broken - - v8.99.312 Add jline-based console with colors and tab-completion - - v8.99.311 Removed face doubles from item models. - - v8.99.310 Fix holes in generated item models. - - v8.99.309 Fix invalid position passed to isAir/getLight in World.playAmbientSound - - v8.99.308 Merge pull request #2196 from Choonster/master - BiomeManager: Fix off-by-one errors - - v8.99.307 Fix bold font rendering, Unicode is 2x pixel density of normal. - - v8.99.306 BiomeManager: Fix off-by-one errors - - v8.99.305 B3D loader: removed 2 redundand null checks, changed constructor args to final to fix (java6?) inner arg error. - - v8.99.304 Use the FMLSecurityManager checkPermission(Permission) method for context-based permission checks. Fixes #2067 - - v8.99.303 Enable the normal ModList GUI in game. Use GL_SCISSOR to support the transparent in-game GUI. - - v8.99.302 Moved client side Block.onBlockDestroyed to after Item.onBlockDestroyed to match server order. - - v8.99.301 Fix incorrect position passes to Block.getExplosionResistance from entities. - - v8.99.300 Implemented interpolation of TRSR transformations; B3D: added interpolation capabilities to B3DState, animated TESR example in ModelAnimationTest (pure TESR right now, no separation inside the example model between the static and dynamic parts right now). - - v8.99.299 This should be everything needed to separate blocks and items completely. - - v8.99.298 Merge branch 'master' into noci-1.8.8 - - v8.99.297 Merge pull request #2117 from lumien231/master - Fixes Client Login Issue when logging into a non existent dimension - - v8.99.296 Fix Client Login Issue when logging into a non existent dimension - - v8.99.295 Remove a suppression - - v8.99.294 ExtendedBlockState, Properties generic updates. - - v8.99.293 Some generic and other warning cleanups - - v8.99.292 Merge branch 'master' into noci-1.8.8 - - v8.99.291 Model stuff: updated to generics, fixed various warnings, added handling of new perspective types. - - v8.99.290 A few tweaks, things are starting to work now.. - - v8.99.289 All the patches done? Some code fixups.. It begins. - - v8.99.288 Fix a newly missing AT. Remove all CL_ references. OBFID is gone. - - v8.99.287 WorldGen rejects, lots of them. Couple of small fixes elsewhere. - - v8.99.286 Enchantment,EnchantmentHelper,EntityEnderman,EntityZombie,EntityVillager,FurnaceRecipes,RecipeFireworks,RecipeRepairItem,NetworkSystem,S00PacketServerInfo - PotionEffect,StatList,Session,WeightedRandomChestContent,Explosion,ExtendedBlockStorage,SaveHandler. - All NBT patches seem to have been merged upstream, so removing. The IntegratedServer and MinecraftServer pending queue changes also removed, as fixed upstream. - - v8.99.285 Bump version for Recomended Build. - - v8.99.284 Overlay patch fix: use the correct block position. - - v8.99.283 EntityRenderer, StringTranslate rejects fixed. - - v8.99.282 TextureMap, TextureManager and Stitcher rejects fixed. - - v8.99.281 Manually updated WorldChunkManager, Chunk and BiomeDecorator patches, removed imports. - - v8.99.280 ItemBlock, ItemBow, ItemMonsterPlacer, ItemReed, ItemSign rejects fixed. - - v8.99.279 PlayerManager, PlayerProfileCache, ServerConfigurationManager, NetHandlerHandshakeTCP rejects fixed; ItemInWorldManager patch error fixed. - - v8.99.278 TileEntity and TileEntityHopper rejects fixed, GuiOverlayDebug patch fixed. - - v8.99.277 ItemRenderer, RenderGlobal, StateMap, RenderItem rejects updated. - - v8.99.276 RenderEntityItem, RenderPlayer, RendererLivingEntity, LayerArmorBase, ItemStack rejects fixed; changed Armor Layer hook to catch LayerBipedArmor only. - - v8.99.275 GuiButton, GuiChat, GuiCreateWorld, GuiIngameMenu, ServerListEntryNormal, GuiStats rejects updated. - - v8.99.274 EntityPlayer patch updated. - - v8.99.273 Updated FML Gui methods to WorldRenderer API changes. - - v8.99.272 LoadingScreenRenderer,Minecraft,GuiContainerCreative,PlayerControllerMP,LanguageManager,Locale,SimpleReloadableResourceManager,EntityList,EntityLivingBase,EntityWither,EntityMinecart,EntityPlayerMP - NethanlderPlayClient patch is now in vanilla. The FMLCommonHandler future exception catcher is not needed anymore, it's in Util. The caching of player profiles is now in vanilla (SkinManager). - - v8.99.271 Delete rejects that I initially processed. - - v8.99.270 BlockOre, BlockRotatedPillar, SoundManager, EntityPlayerSP, GuiScreen, GuiAchievements, GuiContainer, BlockModelRenderer, ContainerEnchantment, Slot updated manually and imports removed; GitSlot patch updated. - - v8.99.269 Merge pull request #2179 from arideus101/patch-1 - Fixed issue where custom colored armor wouldn't be colored. (reverted from commit dee0b2084b519419bbf97d8ad177204830ea2b07) - - v8.99.268 Merge pull request #2179 from arideus101/patch-1 - Fixed issue where custom colored armor wouldn't be colored. - - v8.99.267 Merge pull request #2177 from gabizou/master - Fix a possible NPE when checking supertypes of interfaces. - - v8.99.266 Allows Custom Armor Coloring to be done easily - - v8.99.265 Merge branch '1.7.10' - fix up some oredictionary and substitution related issues - - v8.99.264 Fix firing the remap event. It always fires now, and additionally fires when the registry reverts to frozen. - Most mods refer to the gameregistry for ids they care about, so this shouldn't affect anything significantly, - but if your mod was dependent on their being content in the remap event, and only acting on that content, - empty content means it's "reverted to frozen" state - the state at the start of the game. - - v8.99.263 Fix a possible NPE when checking supertypes of interfaces. Closes #2176. - - v8.99.262 EntityAIAttackOnCollide, ServerStatusResponse, MinecraftServer, NetHandlerLoginServer, Vec3, BiomeGenBase, AnvilChunkLoader, ChunkProviderServer, MapGenRavine, MinecraftServer updated; fix in Block, GuiIngameForge; can load the world and play with ~20 more manual error fixes. - - v8.99.261 WorldProvider, WorldType, WorldServer, WorldServerMulti - - v8.99.260 IntegratedServer, World, EnumChatFormatting and EnumFacing - - v8.99.259 FontRenderer + Item patch update; WorldVertexBufferUploader patch derp fix. - - v8.99.258 Fix generics and error in the BlockState patch. - - v8.99.257 Updated various rendering-related patches and classes to 1.8.8; forge still uses vecmath. - - v8.99.256 Two more corner cases in the oredictionary. Should work for all cases now. - - v8.99.255 Patches and rejected patches. Note: some which had imports are not listed here because they need - to be refactored not to have imports. - Progress: https://gist.github.com/cpw/29695e426e2b122cf8ff - - v8.99.254 Test of mcp patching - - v8.99.253 Fixed Stronghold Library not having anything in it's chests. - - v8.99.252 Fixed Open url confirm screen not showing URL. - - v8.99.251 regenerate reference patchset at patches.mcp. These will be used to generate a new patchtree under patches. - - v8.99.250 1.8.8 initial work - - v8.99.249 Merge pull request #2174 from diesieben07/findBlockFix - Fix GameData.findBlock - - v8.99.248 Fix GameData.findBlock - - v8.99.247 Fixed anaglyph transformation not being applied in the forge lighting fully. - - v8.99.246 Provide ItemCameraTransforms for vanilla models when possible. - - v8.99.245 OBJ loader: reworked texture resolution: keys now have to start with #, like every other model loader; models without explicit library now work, remapping is possible by using the key "#OBJModel.Default.Texture.Name"; in addition to remapping by material name, remapping by texture name works too, like in other model formats. - - v8.99.244 Performace fix for item rendering. - - v8.99.243 Merge pull request #2167 from Choonster/master - Fix texture error message for broken textures - - v8.99.242 Fix texture error message for broken textures - -- Fixes #2100 - -- Iterates over badTextureDomains instead of missingTextures.keySet() - as a domain can have broken textures without any missing textures - - v8.99.241 Introduce a new centralized version checking system. - Using the @Mod annotation mods can opt-in to a centrally controlled update system. - This is PURELY a notification system and will NOT automatically download any updates. - The End User can control which mods check for updates and disabel the system entirely using the Forge Config and GUI. - Format for the json the URL must point to is described here: https://gist.github.com/LexManos/7aacb9aa991330523884 - - v8.99.240 Redesign the ModList GUI to use a scrolling list for the main body content. - Allowing for larger information to be displayed. - URLs are auto-detected and now clickable. - Mod Logos are now centered, it looks better. - - v8.99.239 Merge FML and Forge lang file, and update crowdin project. - - v8.99.238 Fixed block color multiplier not being cached properly in the forge renderer, performance improvement. - - v8.99.237 OBJ model: use original vertex material when defining face. - - v8.99.236 Merge pull request #2161 from The-Fireplace/master - Fixed a bug with GuiConfigEntries.SelectValueEntry - - v8.99.235 Fixed a bug that caused the config option name to overlap with the selectable values when using GuiConfigEntries.SelectValueEntry, fixes #2114 - - v8.99.234 Obj loader: fix vertices shared between faces having the same attributed (uvs/normals). - - v8.99.233 OBJ loader: fixed another whitespace-related issue; removed unused "modifyUVs" property for now; added the "flip-v" property to switch between OpenGL-style and DirextX-style model UVs; fixed normals - they are now correct in-world, still a bit strange for the items; fixed normals a little bit for B3D models too. - - v8.99.232 Fix color multiplier applied incorrectly for items. - - v8.99.231 OreDictionary will warn if there's an invalid ore being registered now, rather than just - using -1 and doing weird things with the list as a result. - - v8.99.230 Fix substitutions for recipes and oredict recipes. Should mean that substitutions start working properly. - - v8.99.229 Merge pull request #2154 from shadekiller666/OBJ_Loader - OBJLoader Update: Fix for normal generation, whitespace handling, and UVs outside 0-1 range - - v8.99.228 Fix for the previous commit - transparent blocks were handled improperly. - - v8.99.227 Changed how the forge lighting system handles holey models for opaque blocks; it now mimics vanilla behaviour, which allows light to pass through them. - - v8.99.226 OBJLoader: Quick bandages to support/fix the new way that face/vertex normals are calculated, a very quick bandage to patch TextureCoordinates for the time being, and the Parser now uses a Pattern to split strings on whitespace instead of only splitting on " ". - - v8.99.225 Merge pull request #2151 from AbrarSyed/patch-1 - Update FG version to 2.0.2 - - v8.99.224 Merge pull request #2146 from bonii-xx/potionidfix - Fix Potion IDs above 127 - - v8.99.223 Update FG version to 2.0.2 - - v8.99.222 Merge pull request #2126 from diesieben07/join-world-fix - Fix CME when entities are spawned from EntityJoinWorldEvent - - v8.99.221 More lighting fixes, flat lighting now works correctly for grass and torches. - - v8.99.220 Fixed normal calculation for vanilla models, fixed the grass darkening and simular issues. - - v8.99.219 Fixed piston rendering (WorldRenderer offset wasn't applied); fixed TESR being registered too early in one of the debug mods. - - v8.99.218 Fixed another generic issue in MultiModel. - - v8.99.217 Provide a IModel for "builtin/generated", fixes #2147 - - v8.99.216 Fixed AO being applied to OBJ model transparency, and OBJ loader trying to force the loading of the builtin white texture. - - v8.99.215 Fixed generic bug in MultiModel - - v8.99.214 Perspective awareness for vanilla and multi models, fixes #2148. - Improved error handling in MultiModel. - - v8.99.213 Merge pull request #2091 from shadekiller666/ItemModelLoadingFix - Fixed a bug with item model loading - - v8.99.212 Small fix for reworked classic lighting - - v8.99.211 Fixed a bug with item model loading that would occur if ModelBakery.addVariantName() was called with the same string location parameter for 2 different items, and the string pointed to a location that didn't exist, where ModelLoader.loadAnyModel() would substitute the blockdefinition in for the item model, but wouldn't remove the original input location from the loadingModels list, which would cause the location from the second call to throw an IllegalStateException even though that location now has a model. - - v8.99.210 Added OBJ loader for the ModelLoaderRegistry system. - - v8.99.209 Added back in the lost class - - v8.99.208 Model pipeline system. - Should replace all ad-hoc quad generation methods in forge, and make IBakedModel -> WorldRenderer data transfer faster. Added IVertexConsumer + helper classes; lighting that works correctly for non-axis-aligned faces using the new infrastructure. Changed smooth lighting algorithm, now it should work correctly for everything. - New block lighter can be disabled in the forge config options. - - v8.99.207 Fix Potion IDs above 127 - - v8.99.206 Allow server to access Potion isBadEffect() - - v8.99.205 Merge pull request #2022 from simon816/guava-apache-lcl-exclusion - Add Guava and Apache to LaunchClassLoader exclusion list on server - - v8.99.204 Merge pull request #2129 from darkevilmac/master - Add PlayerSetSpawnEvent - - v8.99.203 Add PlayerSetSpawnEvent - - v8.99.202 Fix CME when entities are spawned from EntityJoinWorldEvent - - v8.99.201 '#' is now added automatically to the beginning of the texture names in B3D models, and the remapping is expected via the blockstate JSON, since it's more reasonable than adding it to the file name in the modelling program or matching the resource location with the filename. - - v8.99.200 Fixes Attributes.transform affecting only 1 vertex. - - v8.99.199 Merge pull request #2103 from olee/patch-1 - Fix possible crash in EventBus - - v8.99.198 Merge pull request #2120 from luacs1998/eventbus_fix - Fix a possible crash in EventBus - - v8.99.197 Fix a possible crash in EventBus - - v8.99.196 Merge pull request #2118 from rubensworks/itemmonsterplacer-dispenser - Fix dispenser action for modded spawn eggs - - v8.99.195 Fix dispenser action for modded spawn eggs - - v8.99.194 Fix entity count being incorrect for spawning logic. Now filter out 'persistant' entities. - - v8.99.193 Update Gradle wrapper to 2.7 - - v8.99.192 Merge pull request #2002 from ganymedes01/master - Disallow conflicting furnace recipes - - v8.99.191 Workaround for MinecraftForge/ForgeGradle#256 - - v8.99.190 Disallow conflicting furnace recipes - - v8.99.189 FMLNetworkHandler.openGui should not try and open a GUI on a FakePlayer. - Fixes #2082 and probably dozens of mod errors. Also, side benefit of the - merged codebase! FML code can ref Forge code! - - v8.99.188 Merge branch 'laci200270-patch-1' - - v8.99.187 Format a bit better - - v8.99.186 Merge branch 'patch-1' of https://github.com/laci200270/MinecraftForge into laci200270-patch-1 - - v8.99.185 Much requested temporary hack for items and TESRs. Context: #1582, #1597, #1713, #2058 and others. - - v8.99.184 Merge pull request #2086 from Vorquel/master - Fix faulty channel name checking - - v8.99.183 Merge pull request #2069 from simon816/profile-request-fix - Use already provided profile for the player's own skin - - v8.99.182 Use already provided profile for the player's own skin - - v8.99.181 Add Guava and Apache to LaunchClassLoader exclusion list on server - Move exclusions to common place. Less likely to get out of sync - - v8.99.180 Fix possible crash in EventBus - There is currently no way to check if an event handler has been registered or not. - But when trying to unregister a not-registered event handler, Minecraft crashes with a NullPointerException. - This is a simple fix to prevent such crashes. - - v8.99.179 More cleanup of the default eclipse workspace. The project is now called "MDKExample" not "Minecraft". - The project tree is now contemporary, instead of a copy from 1.5.x era MC. The launches are cleaned up, and refer to - a better default "runDir" of "run" rather than "eclipse".. Updating to FG2.0.1 which will contain relevant binary fixes. - - v8.99.178 Fix eclipse workspace inside the mdk - don't run it through the tokenconverter. Also add in CREDITS-fml.txt to the MDK - it's still required. - - v8.99.177 Fixed issue where config folder would not be created before SplashProgress tried to read from it. - Default macs to disable the new loading screen due to to many macs having issues. - Users can enable it again by editing their config. - Catch and gracefully handle more errors when starting up the Splash Screen. - - v8.99.176 Update gradle wrapper and fix changelog task. - - v8.99.175 Fix faulty Channel name - - v8.99.174 Fix crowdin again. Run, jenkins, for god's sake, run! - - v8.99.173 Fix crowdin task. Good luck jenkins, lets roll! - - v8.99.172 Fix ciWriteBuildNumber task. Ugly, but it works. - - v8.99.171 Merge branch 'fg2' - - v8.99.170 Remove patches - - v8.99.169 Update FMLSecurityManager.java - - v8.99.168 Fix packaging the gradle wrapper properly. There is still a problem with - the MDK- it fails to run setupDecompWorkspace. - Filed an issue at ForgeGradle, since this seems to be something FG2 shouldn't - be doing, but is? - https://github.com/MinecraftForge/ForgeGradle/issues/235 - - v8.99.167 Trying to fix the MDK to include gradle wrapper, but the gradle-wrapper.jar is - corrupted. @AbrarSyed can you take a look? - - v8.99.166 The final nail in the coffin. BYE! - - v8.99.165 Fix MDK task - it now runs. - - v8.99.164 Merge pull request #2072 from AbrarSyed/fg2 - Added MDK package - - v8.99.163 added MDK package - - v8.99.162 Merge pull request #1969 from diesieben07/blockhighlight - Re-introduce RenderBlockOverlayEvent - - v8.99.161 FML's metabolic processes are now history. FML's off the twig. FML's kicked the bucket, FML's shuffled off this mortal coil, - run down the curtain and joined the bleedin' choir invisible!! THIS IS AN EX-PROJECT! - - v8.99.160 Vestigal fml-ectomy. - - v8.99.159 FML is no more. FML has ceased to be. FML's expired and gone to meet its maker. FML's a stiff! Bereft of life, FML rests in peace. - - v8.99.158 Merge branch 'master' of https://github.com/AbrarSyed/MinecraftForge into fg2 - - v8.99.157 Merge branch '1.7.10' - - v8.99.156 fixed deployment credentials - - v8.99.155 Fix placing skulls on fence posts. Closes #2055 - - v8.99.154 Merge pull request #1968 from modwizcode/master - Fix harvest logic running in addition to shearable logic - - v8.99.153 Merge pull request #2048 from shadekiller666/UnlistedPropertyValue - Fix for ExtendedBlockStates containing at least one IProperty and one IUnlistedProperty preventing block placement. - - v8.99.152 Fixed a bug with ExtendedBlockStates containing at least one IProperty and one IUnlistedProperty not allowing blocks to be placed. - - v8.99.151 Merge pull request #2017 from liach/add-enum - Add hook for adding EnumPlantType and fixed npe in BiomeType - - v8.99.150 Merge pull request #2004 from simon816/sign-nbt-fix - Fix placing signs with NBT prompting for text - - v8.99.149 Merge pull request #2047 from Zaggy1024/forgeblockstatesv1fixes - Fixed two bugs with the Forge blockstates v1 loader. - - v8.99.148 Fixed a Forge blockstates json removing models causing an NPE in the loader. - Fixed the deep clone of a V1 Variant not cloning the submodels properly. - - v8.99.147 Merge pull request #1983 from clienthax/patch-1 - Make layer methods public - - v8.99.146 Merge pull request #2044 from rubensworks/enumfacing-server - Remove SideOnly's from EnumFacing allowing full class to be used on both sides. - - v8.99.145 Make EnumFacing events available server-side - - v8.99.144 Merge pull request #2035 from rubensworks/master - Fix source block check for BlockFluidClassic - - v8.99.143 Fix source block check for BlockFluidClassic - - v8.99.142 Cherry pick some changes from 1.8 for inner class discovery, also fix the negativecache. Closes #1872 - - v8.99.141 Merge pull request #2023 from diesieben07/entity-pick - Allow the new entity eggs to be created via middle-click on an Entity while in creative mode. - - v8.99.140 Allow the new entity eggs to be created via middle-click - - v8.99.139 Add an EnumHelper hook and fixed an issue - - v8.99.138 Be a little bit more helpful when the ObjectHolder misses. Should help figure out what is going in in #2006 - - v8.99.137 Wake up the FluidRegistry before any mods start loading. Should stop mods claiming to own water or lava (depending on who accessed - FluidRegistry first) - - v8.99.136 Actually rebuild the fluidNames each rebuild, don't just try and force changes in. Should fix #1973 - - v8.99.135 Fix placing signs with NBT prompting for text - - v8.99.134 - - v8.99.133 Merge pull request #1978 from RainWarrior/model-rotation - Custom transformations in forge blockstate json. - - v8.99.132 Custom transformations in forge blockstate json. - - v8.99.131 updated installed gradle. not finished - - v8.99.130 fixed local-building fail with changelog - - v8.99.129 added jenkins compat tasks - - v8.99.128 Added FG2 buildscript + updated for Gradle 2.4 - - v8.99.127 removed old unnecessary stuff - - v8.99.126 DeobfuscationData no longer required at dev time - - v8.99.125 added hardcoded fml version file - - v8.99.124 removed broken and duplicate AT lines - - v8.99.123 Fixed ItemMonsterPlacer.getEggInfo missing return. Closes #1975 - - v8.99.122 Merge pull request #1974 from Lunatrius/white-screen-fix - Fixed error GUIs showing a white screen - - v8.99.121 Fixed error GUIs showing a white screen and replaced a rogue direct GL call. - - v8.99.120 Fix particle texture of the generated item models. - - v8.99.119 Merge pull request #1972 from bonii-xx/StateMapDomainFix - Fix StateMap always mapping properties to the "minecraft" domain - - v8.99.118 Add debug for max texture size and output when Texture Atlas can not stitch all textures. - - v8.99.117 Fix StateMap always mapping properties to the "minecraft" domain instead of the mods, causing it to not find BlockState definitions. - - v8.99.116 ObjectHolder works great, but it should be a lot less spammy about failed lookups. They're usually mod options. - - v8.99.115 Re-introduce RenderBlockOverlayEvent, seems to have been missed during 1.8 update - - v8.99.114 Fix harvest logic running in addition to shearable logic - - v8.99.113 More descripotive error if Patcher is passed invalid data for vanilla classes. - - v8.99.112 There's no Map.getOrDefault in java6. - - v8.99.111 Vanilla models can now use custom textures. Fixes #1962 - - v8.99.110 Fixed perspective transformations for item models. - - v8.99.109 Fix AT for Block constructor. - - v8.99.108 Added ItemLayerModel - less awkward, simpler and faster version of ItemModelGenerator. - - v8.99.107 Merge remote-tracking branch 'origin/master' - - v8.99.106 Merge branch '1.7.10' - Conflicts: - fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch - fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch - fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch - fml/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java - patches/minecraft/net/minecraft/client/Minecraft.java.patch - patches/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java.patch - patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch - src/main/java/net/minecraftforge/client/model/obj/WavefrontObject.java - - v8.99.105 Merge pull request #1858 from FlansMods/master - Hook for Camera Angles, Including Roll - - v8.99.104 Mods that are extracted to the mods dir by unzipping or whatever will now cause the game to crash. Too much info is in the META-INF now, - and more will be being added. Extracting to the mods dir just completely breaks that. - - v8.99.103 Merge pull request #1956 from lawremi/mesadictfix - fix logic for guessing mesa tag in biome dict - - v8.99.102 fix logic for guessing mesa tag in biome dict - - v8.99.101 Time each bar in the loading screen and print it to the log, useful information to see where most time is spent in loading. - - v8.99.100 Add TextureManager to loading screen. - - v8.99.99 Make TextureMap for items and blocks skip the first pass of loading/stitching textures. - Should decrease loading times for large packs. - May cause issues with some mods so use -Dfml.skipFirstTextureLoad=false to disable. - - v8.99.98 Add the stitching allocation stage to loading screen. - - v8.99.97 Create config folder in SplashProgress if it does not exist. - - v8.99.96 New system in EntityRegistry to allow modders to register spawn eggs. - For entites that do not use the global ID system. - {Which no mod entity should} - Vanilla spawn eggs will now detect a 'entity_name' entry in it's NBT data and use that for spawning/rendering. - - v8.99.95 Patch line number update. Ignore this. - - v8.99.94 Merge pull request #1952 from ganymedes01/master - Change permission levels on ore recipes parameters - - v8.99.93 Merge pull request #1953 from ganymedes01/patch-1 - Fixed NPE when calling canBrew - - v8.99.92 Use Guava instead of Nio for J6 compatibility. - - v8.99.91 Fixed NPE when calling canBrew - Oversight on my part, - If the ingredient doesn't return true in Item.isPotionIngredient, Items.potionitem.getEffects(stack) returns null, causing an NPE to be thrown later on. - This invalidates #1947. - - v8.99.90 Change permission levels on ore recipes parameters - - v8.99.89 Merge pull request #1922 from RainWarrior/model-fluid2 - 1.8 model fluid renderer - - v8.99.88 Added fluid renderer. - - v8.99.87 Make Item.shouldCauseReequipAnimation is bit more precise and copy over the new item for rendering even if the animation is diabled. - - v8.99.86 Add vanilla block rotation support back in for certain blocks that were missed in 1.8 update. Closes #1903 - - v8.99.85 Merge pull request #1941 from xxmicloxx/xxmicloxx-patch-b3dloader - Bugfix for B3DLoader - - v8.99.84 Merge pull request #1932 from cheeserolls/patch-1 - Fix incorrect block position in BlockReed canPlaceBlockAt - - v8.99.83 Merge pull request #1506 from mezz/GuiScreenInputEvents - Add GuiScreenEvents for keyboard and mouse input - - v8.99.82 Merge pull request #1781 from ShetiPhian/Block.getPickBlock - Player sensitive version of Block.getPickBlock - - v8.99.81 Add Item.shouldCauseReequipAnimation to allow modders more control over the 'Reequip' animation. - - v8.99.80 Fixed compile issues with irtimaled's PR. - - v8.99.79 Fixed Wavefront Object Importer reading files with integer values. Closes #1651, #1654 - - v8.99.78 Make FML Gui classes use GlStateManager. Closes FML#615 - - v8.99.77 Merge pull request #1749 from irtimaled/master - Copy fortress.dat from the overworld to the Nether. Fixes #1747 - - v8.99.76 Bugfix for B3DLoader - - v8.99.75 Fixup model loading errors not being printed by making ICustomModelLoader.loadModel propogate IOExceptions as needed. - - v8.99.74 Cleanup code format in LayerBreakingTest. - - v8.99.73 Include the thread state in the potential error handleing for SplashProgress. - - v8.99.72 Throw more descriptive errors when mods attempt to register invalid global entity IDs. - - v8.99.71 Merge branch '1.7.10' - Conflicts: - fml/src/main/java/net/minecraftforge/fml/common/MinecraftDummyContainer.java - fml/src/main/java/net/minecraftforge/fml/common/registry/FMLControlledNamespacedRegistry.java - fml/src/main/java/net/minecraftforge/fml/common/registry/LanguageRegistry.java - - v8.99.70 Merge pull request #1935 from superckl/master - Fixed two exceptions in BiomeDictionary related to adding new Biome Types. - - v8.99.69 Fixing two IndexOutBoundsExceptions from the BiomeDictionary - - v8.99.68 Fix incorrect block position in BlockReed canPlaceBlockAt - block.canSustainPlant is called on the wrong block position. It should be called on the block below (the 'soil' block). - - v8.99.67 Cleanup mod state dump to be easier to read by displaying the states in abreviation and placing them before the mod info. - - v8.99.66 Cleanup mod signature data table. Easily seperating those mods with signatures vs those with none. - - v8.99.65 Quiet CrashReport class pre-loading debug, no flag to re-enable. - - v8.99.64 Quiet FMLControlledNamespacedRegistry debug spam by default. Reenable using -Dfml.debugRegistryEntries=true. - - v8.99.63 Quiet ClassPatchManager debug spam by default. Reenable using -Dfml.debugClassPatchManager=true. - - v8.99.62 Cleanup some spammy output. - - v8.99.61 Bump version for new RB - - v8.99.60 Copy over parent's modelSet value in variants as well. - - v8.99.59 Bump version for new RB. - - v8.99.58 Merge branch '1.7.10' - - v8.99.57 Merge pull request #1795 from lumien231/ExperienceEvent - Added LivingExperienceDropsEvent to change how much experience an entity drops - - v8.99.56 Merge pull request #1907 from johnjohn/master - Added ItemMap type check to item frames and ItemRenderer, enabling vanilla style rendering for custom ItemMaps - - v8.99.55 Redefine removal value in IRetextureableModel from null to empty string {""} due to ImmutibleMap not allowing null Values. Closes #1927 - - v8.99.54 Merge pull request #1881 from ganymedes01/master - Added a brewing recipe registry system - - v8.99.53 Added ItemMap type check to item frames and ItemRenderer, enabling vanilla style rendering for custom maps - - v8.99.52 Added a brewing registry system - - v8.99.51 Missed patch for sign fix. - - v8.99.50 Remove worlds from WorldBorder when unloaded tol prevent memory leak, Closes #1923 - - v8.99.49 Limit Sign text to 384 json characters and strip control codes. This is 1.8.7's Sign fix. Thanks Searge. - - v8.99.48 Attempt to synchronize the state for vanilla client completions and quit the handler if the vanilla - thread has already setup the connection. Should fix #1924 - - v8.99.47 Change custom payload lock to be buffer itself incase multiple packets use the same backend buffer. Closes #1908 - - v8.99.46 Merge pull request #1868 from fuami/ISmartBlockModel_Damage - Add Block Breaking Animation for ISmartBlockModels - - v8.99.45 Added Breaking Animation for Smart Models, Checking each layer. - Added Layered Smart Render Test. - - v8.99.44 Update README.txt - - v8.99.43 B3D Improvements - - fixed keyframe transformation application - - textures are now resolved the same way as in vanilla models - - added the ability to use forge blockstate texture information - - removed unused code from the B3D example - - v8.99.42 fixed AT missing for getModelBlockDefinition - - v8.99.41 Fixed missing variant logging; added the possibility to specify the item variant in the blockstate json. - - v8.99.40 Fixed partial variant detection in the forge blockstate loader. - - v8.99.39 Mitigate potential issue with users requesting lots of server status information by caching ServerStatus json. - - v8.99.38 Merge pull request #1912 from clienthax/master - Add missing forge patch from 1.8 port - - v8.99.37 Add missing forge patch from 1.8 port - https://github.com/MinecraftForge/MinecraftForge/blob/1.7.10/patches/minecraft/net/minecraft/client/Minecraft.java.patch#L88 - - v8.99.36 Fix up the client/server fluid race condition that could cause the game to bail when an SSP game connects. - There's still a teeny gap, but it's MUCH less prominent than it was before. - - v8.99.35 Merge pull request #1885 from LexManos/EnhanvedBlockStateJson - Hook BlockState's Json loading to add support for simplified Forge format. - - v8.99.34 Hook BlockState's Json loading to add support for simplified Forge format. - See https://github.com/MinecraftForge/MinecraftForge/pull/1885 for more details. - - v8.99.33 Fixed missing import in last merge. - - v8.99.32 Merge branch '1.7.10' - Conflicts: - fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch - fml/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java - fml/src/main/java/net/minecraftforge/fml/client/SplashProgress.java - - v8.99.31 So we can't print a lot of unicode in the splash screen, so restrict to a hard subset we know we CAN print, closes #1910 - - v8.99.30 Merge pull request #1911 from AlgorithmX2/ItemFramesOnSolidSurfaces - Allow placing item frames on Solid Block Faces (isSideSolid) - - v8.99.29 Allow placing item frames on Solid Block Faces (isSideSolid) - - v8.99.28 Finish loading screen before going fullscreen. Closes MinecraftForge/FML#662 - (cherry picked from commit 19d7e16fa6a28c5665de1ed6e50d8699e865bff2) - Conflicts: - fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch - - v8.99.27 Attempt to disable the new splash screen if there are errors detected finishing up. Print a slightly more helpful error message. - (cherry picked from commit e3211eec0469dc6717943010d584207b7abdb1e0) - Conflicts: - fml/src/main/java/cpw/mods/fml/client/SplashProgress.java - - v8.99.26 Bump minor version # to 2 because of the fluid changes (mirroring what happening in 1.7.10) - - v8.99.25 Merge branch '1.7.10' - imports all the fluid fixups and other stuff from 1.7 into 1.8 - Conflicts: - fml/src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java - fml/src/main/java/net/minecraftforge/fml/common/Loader.java - patches/minecraft/net/minecraft/client/Minecraft.java.patch - patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch - patches/minecraft/net/minecraft/item/ItemArmor.java.patch - patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch - patches/minecraft/net/minecraft/nbt/NBTTagCompound.java.patch - patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch - patches/minecraft/net/minecraft/world/World.java.patch - patches/minecraft/net/minecraft/world/WorldProvider.java.patch - src/main/java/net/minecraftforge/common/ForgeVersion.java - src/main/java/net/minecraftforge/common/network/ForgeMessage.java - src/main/java/net/minecraftforge/fluids/BlockFluidBase.java - src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java - src/main/java/net/minecraftforge/fluids/FluidRegistry.java - src/main/java/net/minecraftforge/oredict/OreDictionary.java - - v8.99.24 Add in an ItemStackHolder - a way to inject ItemStacks without having to have complex lookup code everywhere. - Example: https://gist.github.com/cpw/9af398451a20459ac263 - - v8.99.23 Fixed damage reduction rate of vanilla armor incorrectly scaling with armor's current durability. - - v8.99.22 Merge pull request #1892 from AlgorithmX2/vanilla_lighting_bug - Fix Vanilla Lighting Bug - Fixes Top/Bottom Faces interpolation. - - v8.99.21 Force netty downgrade on dedicated server to match client. Netty bug: https://github.com/netty/netty/issues/2302 Closes #1848 - - v8.99.20 Fix Partial Face Lighting on Top/Bottom Faces ; Vanilla MC-80148 - - v8.99.19 Fixed command exploit with C12 - - v8.99.18 Fixes MC-75630 - Exploit with signs and command blocks - - v8.99.17 Finish loading screen before going fullscreen. Closes MinecraftForge/FML#662 - - v8.99.16 Attempt to disable the new splash screen if there are errors detected finishing up. Print a slightly more helpful error message. - - v8.99.15 Cleanup a lot of spammy output. Everything hidden behind environment flags now. Scale anvil image down 50% - - v8.99.14 Loosen up ServerChatEvent to support IChatComponent Closes #1893 - - v8.99.13 Merge pull request #1804 from Prototik/font - Add true support for unicode fonts - - v8.99.12 Add true support for unicode fonts - - v8.99.11 Merge pull request #1886 from diesieben07/texture-load-crash - Fix crash when texture loading throws RuntimeException without message - - v8.99.10 Fix crash when texture loading throws RuntimeException without message - - v8.99.9 Added CameraSetup sub-event for camera angles - Allows players to alter yaw and pitch of renderViewEntity, but more importantly, adds the ability to roll the view. - Added camera roll hook - - v8.99.8 Merge pull request #1882 from t1g3l/master - Changed forge command tab completion to use getListOfStringsMatchingL… - - v8.99.7 Changed forge command tab completion to use getListOfStringsMatchingLastWord() - - v8.99.6 Merge pull request #1878 from t1g3l/master - Added tab completion to /forge command. - - v8.99.5 Clean up transformers a bit. Can't use COMPUTE_FRAMES even though it's required - the game refuses to even - run if I do. Note for j8: when we force Java8 classes, all coremods will need a thorough overhaul - the - current way we do things is not sustainable when Java8 becomes the universal norm. - - v8.99.4 Strip control codes in progress bar messages. They cause crashes sometimes. - - v8.99.3 Added tab completion - - v8.99.2 Hardcode the FML version in-game as a specific value. - - v8.99.1 Attempt to fix the slow loading problem. Instead of forcing the main thread to wait around - on every call to processWindowMessages, we will simply skip it, if the mutex is already - claimed by the display thread. This should fix slow loading issues seen by some with - the new loading screen. - - v8.99.0 Fix patches after last fml merge. - -v7.99 -===== - - v7.99.0 Merged FML @ 1.7.10 - -v99.99 -====== - - v99.99.0 Merged FML - -v99.99-pre -========== - - v99.99-pre-4302 Merge branch '1.7.10' - Conflicts: - patches/minecraft/net/minecraft/client/Minecraft.java.patch - src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java - src/main/java/net/minecraftforge/fml/client/FMLFileResourcePack.java - src/main/java/net/minecraftforge/fml/client/FMLFolderResourcePack.java - src/main/java/net/minecraftforge/fml/common/FMLCommonHandler.java - src/main/java/net/minecraftforge/fml/common/IFMLSidedHandler.java - src/main/java/net/minecraftforge/fml/common/LoadController.java - src/main/java/net/minecraftforge/fml/common/Loader.java - src/main/java/net/minecraftforge/fml/common/asm/transformers/EventSubscriptionTransformer.java - src/main/java/net/minecraftforge/fml/server/FMLServerHandler.java - src/main/resources/fml_at.cfg - - v99.99-pre-4301 Merge pull request #1863 from Tmtravlr/master - Initialized the Nether Fortress chest loot - - v99.99-pre-4300 Initialized the Nether Fortress chest loot - Forced the nether fortress chest loot to initialize in ChestGenHooks - like the other types. - Changed tabs to spaces. Silly Eclipse. - - v99.99-pre-4299 Update current json - - v99.99-pre-4298 MinecraftForge/FML@0b84b6aa297bdf6ab9f010e340f286442cb242dc Expose the state of the loader - - v99.99-pre-4297 Merge branch '1710ls' into 1.7.10 - - v99.99-pre-4296 Expose the state of the loader - - v99.99-pre-4295 Merge pull request #1853 from Silfadur/master - Added hook for IPerspectiveAwareModel in RenderItem.renderItemIntoGUI f... - - v99.99-pre-4294 Added hook for IPerspectiveAwareModel in RenderItem.renderItemIntoGUI for ItemCameraTransforms.TransformType.GUI - - v99.99-pre-4293 Updated FML: - MinecraftForge/FML@2ed00c4da0ee76eb15e28eb8ee2c07a3096155c2 Splash progress screen will not load in the presence of optifine anymore. - MinecraftForge/FML@adcf2247c69f68415033a3c0b2c527053733514c Loading screen: moved config file to the standard config directory; added the option to load textures from the custom resource pack - MinecraftForge/FML@91338433fa74e782e237643632de2cc5e17ee280 Add classloader exclusion for ASM - MinecraftForge/FML@7c10b93a2ded2799d41b73b67a2766c31e992d8a Synchronize the available libraries. Turns out we've been forcing a newer apache commons-lang(3.2.1) for a long time, also sync the dev guava - we've been forcing 17 for a long time too. Bumping commons-lang to 3.3.2 since that's what Mojang are shipping with 1.8. It has no observable ill effects Closes MinecraftForge/FML#651 - MinecraftForge/FML@8ccfa24764a3f4854f5334c0da1224286175e13b Merge pull request MinecraftForge/FML#650 from luacs1998/1.7.10 - MinecraftForge/FML@b2650a0bdb7d69010a55de518e76591a6c417e87 Optifine can tell us when they're ready for the new splash screen. - MinecraftForge/FML@02a5a58a1cbb25cd3baecf1535950e4780b7810f Fix the ordering of the messages, so they make sense now. - MinecraftForge/FML@dda431353953457608c38aacb060ef82ddc88883 Revert "Merge pull request MinecraftForge/FML#650 from luacs1998/1.7.10" This undoes the seriously broken change from Sponge to support Mixins, that breaks a wide variety of coremods. Given the widespread incompatibility it introduces, it won't be re-added at 1.7.10. - MinecraftForge/FML@5dbb481732bf4bcf8b0c5c02806051a933e6587e Eliminated texture name allocation race condition - MinecraftForge/FML@450b82ca0e13cf889a42eeb198b67115a4851031 Updated default forge logo to animated gif; reverted config folder resolution to Minecraft class due to Loader not being initialized at the point it's needed - - v99.99-pre-4292 Updated default forge logo to animated gif; reverted config folder resolution to Minecraft class due to Loader not being initialized at the point it's needed - - v99.99-pre-4291 Eliminated texture name allocation race condition - - v99.99-pre-4290 MinecraftForge/FML@dda431353953457608c38aacb060ef82ddc88883 Revert "Merge pull request #650 from luacs1998/1.7.10" This undoes the seriously broken change from Sponge to support Mixins, that breaks a wide variety of coremods. Given the widespread incompatibility it introduces, it won't be re-added at 1.7.10. - - v99.99-pre-4289 Revert "Merge pull request #650 from luacs1998/1.7.10" - This undoes the seriously broken change from Sponge to support Mixins, that breaks - a wide variety of coremods. Given the widespread incompatibility it introduces, it - won't be re-added at 1.7.10. - This reverts commit 8ccfa24764a3f4854f5334c0da1224286175e13b, reversing - changes made to 7c10b93a2ded2799d41b73b67a2766c31e992d8a. - - v99.99-pre-4288 MinecraftForge/FML@adcf2247c69f68415033a3c0b2c527053733514c Loading screen: moved config file to the standard config directory; added the option to load textures from the custom resource pack - MinecraftForge/FML@91338433fa74e782e237643632de2cc5e17ee280 Add classloader exclusion for ASM - MinecraftForge/FML@7c10b93a2ded2799d41b73b67a2766c31e992d8a Synchronize the available libraries. Turns out we've been forcing a newer apache commons-lang(3.2.1) for a long time, also sync the dev guava - we've been forcing 17 for a long time too. Bumping commons-lang to 3.3.2 since that's what Mojang are shipping with 1.8. It has no observable ill effects Closes #651 - MinecraftForge/FML@8ccfa24764a3f4854f5334c0da1224286175e13b Merge pull request #650 from luacs1998/1.7.10 - MinecraftForge/FML@b2650a0bdb7d69010a55de518e76591a6c417e87 Optifine can tell us when they're ready for the new splash screen. - MinecraftForge/FML@02a5a58a1cbb25cd3baecf1535950e4780b7810f Fix the ordering of the messages, so they make sense now. - - v99.99-pre-4287 Fix the ordering of the messages, so they make sense now. - - v99.99-pre-4286 Merge pull request #1843 from Zaggy1024/getlightvaluefix - Make World.setBlockState check whether the light value from getLightValue(IBlockAccess, BlockPos) has changed. - - v99.99-pre-4285 Fixed a bug which caused the light level not to update when a block implements Block.getLightValue(IBlockAccess, BlockPos) to change the light value for different block states. - - v99.99-pre-4284 Merge pull request #652 from AbrarSyed/patch-2 - remapped parameters and added ending newlines - - v99.99-pre-4283 remapped parameters and added ending newlines - - v99.99-pre-4282 Optifine can tell us when they're ready for the new splash screen. - - v99.99-pre-4281 Merge pull request #650 from luacs1998/1.7.10 - Add classloader exclusion for ASM - - v99.99-pre-4280 Merge pull request #649 from luacs1998/master - Add classloader exclusion for ASM - - v99.99-pre-4279 Synchronize the available libraries. Turns out we've been forcing a newer apache commons-lang(3.2.1) - for a long time, also sync the dev guava - we've been forcing 17 for a long time too. Bumping - commons-lang to 3.3.2 since that's what Mojang are shipping with 1.8. It has no observable ill effects - Closes #651 - - v99.99-pre-4278 Add classloader exclusion for ASM - - v99.99-pre-4277 Add classloader exclusion for ASM - - v99.99-pre-4276 Merge pull request #1832 from Parker8283/lhsf-1.8 - [1.8] Fixes MC-52974: Host's skin doesn't load in LAN - - v99.99-pre-4275 Merge pull request #1831 from Zaggy1024/clientonlyrenderinlayer - Removed @SideOnly(Side.CLIENT) from EnumWorldBlockLayer. - - v99.99-pre-4274 Fixes MC-52974: Host's skin doesn't load in LAN - - v99.99-pre-4273 Removed @SideOnly(Side.CLIENT) from EnumWorldBlockLayer. - - v99.99-pre-4272 Loading screen: moved config file to the standard config directory; added the option to load textures from the custom resource pack - - v99.99-pre-4271 MinecraftForge/FML@2ed00c4da0ee76eb15e28eb8ee2c07a3096155c2 Splash progress screen will not load in the presence of optifine anymore. - - v99.99-pre-4270 Splash progress screen will not load in the presence of optifine anymore. - - v99.99-pre-4269 MinecraftForge/FML@94821fac98e64d9b8ad7434ed23a621850a8e11c Add a config file that lets you add additional soft dependencies at runtime - injectedDependencies.json - - v99.99-pre-4268 Add a config file that lets you add additional soft dependencies at runtime - injectedDependencies.json - Example here: https://gist.github.com/cpw/d3edc292631708f2d454 - - v99.99-pre-4267 MinecraftForge/FML@4fe7b469b5ba156d4a786cd9e105b18cca7c271a Loading screen: logo rotation is now optional; initial support for animated textures - animation rate is fixed for now. - MinecraftForge/FML@31ae43590a2ba771d69b6c6513bcd5fe87ae8f8f Fix trying to close the screen during error. - - v99.99-pre-4266 Fix trying to close the screen during error. - - v99.99-pre-4265 Loading screen: logo rotation is now optional; initial support for animated textures - animation rate is fixed for now. - - v99.99-pre-4264 MinecraftForge/FML@36688e781aae67fb1e4e7047acf689edeeac7ddb Add in resource reloading to the bar. Tidy up some of the labels a bit. - MinecraftForge/FML@a1dc465a55612ecdd44e6cde3adc0f1d53c6d97b More progress bar action! - MinecraftForge/FML@bfcbf4ef4366fd3d8bfd20adafb63a857bb0dd53 More progress bar hooks - MinecraftForge/FML@a6670c415ee97e771020921e00773c4c15e7512e Thread errors should be correctly displayed in the crash report now - MinecraftForge/FML@9a16d26186d27029cae32a19c09ddf48f7cba22e fixed bar text positioning - MinecraftForge/FML@0059c630281b7105c0532d2dba1bec27cf0323b2 Track mipmaps and texture upload - MinecraftForge/FML@ef5f809752e87e369235e98a63027e9347185cd9 Fix broken log message in vanilla. - - v99.99-pre-4263 Fix broken log message in vanilla. - - v99.99-pre-4262 Track mipmaps and texture upload - - v99.99-pre-4261 fixed bar text positioning - - v99.99-pre-4260 Thread errors should be correctly displayed in the crash report now - - v99.99-pre-4259 More progress bar hooks - - v99.99-pre-4258 More progress bar action! - - v99.99-pre-4257 Add in resource reloading to the bar. Tidy up some of the labels a bit. - - v99.99-pre-4256 Cleanup RenderEntityItem patch, fixes Z-fighting issue in EntityItems. Closes #1824 - - v99.99-pre-4255 MinecraftForge/FML@5785a9c9e8d76b91a03ed1f9791aeee1cb7ea00b Fix up multiple injections of cmdline files via versionspecificmoddir. Closes #645 - MinecraftForge/FML@bd117be9c3e3919f3c29538cde80e3eb8fa48368 Correctly track exceptions thrown in the loading screen rendering thread - - v99.99-pre-4254 Correctly track exceptions thrown in the loading screen rendering thread - - v99.99-pre-4253 Merge pull request #647 from AbrarSyed/patch-1 - Fixed scala module libs in dev json - - v99.99-pre-4252 fixed scala module libs in jsons - - v99.99-pre-4251 Merge pull request #1814 from Lunatrius/block-dispatcher - Extracted the creation of RegionRenderCache into a method for extendability - - v99.99-pre-4250 Extracted the creation of RegionRenderCache into a method. - Classes extending RegionRenderCache can change the behavior of the cache, allowing to visually change blocks (schematics etc). - - v99.99-pre-4249 Fix up multiple injections of cmdline files via versionspecificmoddir. - Closes #645 - - v99.99-pre-4248 MinecraftForge/FML@a39482c4b7ac2883f821619b47ff31e0b6e74b29 Splash screen implementation - MinecraftForge/FML@01fea095cdcd80c2ae9f0ebfd1c72242b3f2dbf8 Merge branch '1.7.10-load-progress' of github.com:RainWarrior/FML into 1.7.10 - MinecraftForge/FML@364b4bbbb0d4d168f9a63fa62a09e4e2fa213039 Call some loader stuffs - MinecraftForge/FML@61a891280d15f9f17e28bf86a427f32de5a8983e Make sure to close the splash screen if there's gonna be an error display - - v99.99-pre-4247 Make sure to close the splash screen if there's gonna be an error display - - v99.99-pre-4246 Call some loader stuffs - - v99.99-pre-4245 Merge branch '1.7.10-load-progress' of github.com:RainWarrior/FML into 1.7.10 - - v99.99-pre-4244 Splash screen implementation - - v99.99-pre-4243 MinecraftForge/FML@d14d1a8fea4c9242c944079ab8e4cdd516dfce4c Update to use the inherited jar format. Simplifies a lot.. - - v99.99-pre-4242 Update to use the inherited jar format. Simplifies a lot.. - - v99.99-pre-4241 Expose the fluid that a block was constructed with, useful for 'non-default' - configuration of fluidblocks. Shouldn't be used outside of this purpose. - - v99.99-pre-4240 Replace the OLD fluid in the fluidID map, not the new one.. - - v99.99-pre-4239 Fix static initializer derp. - - v99.99-pre-4238 Make FluidStack hold a delegate for the fluid. This can then float based on what is "live" at present. - - v99.99-pre-4237 Reformat ItemArmor$ArmorMaterial.getBaseItem to use an if/then/else structure. The switch - causes the generation of an internal class which may derp custom armor addition. - Closes #1799 - - v99.99-pre-4236 Actually use the override constraint in ticket requests. Closes #1802 - - v99.99-pre-4235 Change logging to avoid the String.format bug. Closes #1809 - - v99.99-pre-4234 MinecraftForge/FML@8f9e3a7e30c8cc436dcb8d94b18b4634e0376339 Exceptions during construction phase should not propogate and cause an immediate crash. Closes #638 - - v99.99-pre-4233 Exceptions during construction phase should not propogate and cause an immediate crash. Closes #638 - - v99.99-pre-4232 Verify that the fluid registry doesn't contain "junk" fluids thru reflection. - - v99.99-pre-4231 Fixed NBTSizeTracker missing a lot of data being read. Also made new NBT object allocation claim 32-bits in the size tracker. - (cherry picked from commit de066a86da281d381b0e3ab9e83682720327049c) - Conflicts: - patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch - patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch - - v99.99-pre-4230 Fixed NBTSizeTracker missing a lot of data being read. Also made new NBT object allocation claim 32-bits in the size tracker. - - v99.99-pre-4229 Merge pull request #1805 from KingLemming/1.7.10 - OreDict functionality updates. - - v99.99-pre-4228 Adds some new Ore querying functionality. - Also attempts to size initial Hashmaps in a logical manner. - - v99.99-pre-4227 Added LivingExperienceDropsEvent to change the amount of experience an entity drops - - v99.99-pre-4226 Dissallow color codes in mod names displayed in Mod gui list. And code formatting. - - v99.99-pre-4225 Revert KL's change, requesting a ore WILL register it. - Registering like this and returning a new empty list allows for modders to register their recipes and such without requiring to be executed after someone actually adds an item. If handled properly this allows for more flexible load orders, and more responsive code. - - v99.99-pre-4224 Merge pull request #1796 from KingLemming/1.7.10 - Adjusts OreDictionary to prevent invalid registrations. - - v99.99-pre-4223 Adjusts OreDictionary to prevent invalid registrations. - Getting Ore Names for a non-existent ore will no longer automatically add that Name to the list nor generate an ID. - Tweaks a warning message in the FluidContainerRegistry. No functionality change. - - v99.99-pre-4222 Merge pull request #636 from tterrag1098/betterModList - Fix control codes being used for mod list sort. Clean up sorting code. - - v99.99-pre-4221 Fix control codes being used for mod list sort. Clean up sorting code and fix a bug with right click clearing. - - v99.99-pre-4220 MinecraftForge/FML@888e489394e52abdfb349fbfbd7f8e153b5af124 Allow registering custom language adapters. - MinecraftForge/FML@906f94ca143f756f40404fde38af32b2481d0673 Some tidyup of the PR - MinecraftForge/FML@1c025f18433df868859022eea8e6d198444736de Patch TracingPrintStream to handle Kotlin IO. - - v99.99-pre-4219 MinecraftForge/FML@dfce4cd8d023a546c4c21405db182b8ddcd38633 Allow registering custom language adapters. - MinecraftForge/FML@9fecd72cf0bd483ae7bc2ce821ae6b2f5e5b9c65 Some tidyup of the PR - MinecraftForge/FML@10ac2a4fd972e923a60d23d10e8f297b8584f565 Fix itemCtorArgs javadoc in registerBlock - MinecraftForge/FML@86f70d37a40bbeaf7c389a14adcd8311ba5584df Patch TracingPrintStream to handle Kotlin IO. - - v99.99-pre-4218 Patch TracingPrintStream to handle Kotlin IO. - Kotlins internal IO suite wraps the old System.out style, so descend - deeper in the stack when kotlin.io is detected. - - v99.99-pre-4217 Patch TracingPrintStream to handle Kotlin IO. - Kotlins internal IO suite wraps the old System.out style, so descend - deeper in the stack when kotlin.io is detected. - - v99.99-pre-4216 Fix itemCtorArgs javadoc in registerBlock - - v99.99-pre-4215 Some tidyup of the PR - - v99.99-pre-4214 Allow registering custom language adapters. - Allows external mods/library jars to provide language adapters for - languages not supported in native Forge. - - v99.99-pre-4213 Some tidyup of the PR - - v99.99-pre-4212 And handle the null case in the constructor itself. Closes #1794 (again) - - v99.99-pre-4211 Fix NPE - Closes #1794 - - v99.99-pre-4210 Fluids are now tracked internally by mod. This allows for the server and the world to specify a "default" - in the case of a possible alternative fluid implementation. If you always called registerFluid, things - should work pretty seamlessly, but if you didn't (gating with an isFluidRegistered check for example) - you should change to register anyway. This way, even if you're not default in the overall instance, you may - become default if you're the only mod present on a server, for example, or in a world save. - This should radically decrease the mixups caused by mod load ordering problems, and other issues around fluid - tracking. - - v99.99-pre-4209 Allow registering custom language adapters. - Allows external mods/library jars to provide language adapters for - languages not supported in native Forge. - - v99.99-pre-4208 MinecraftForge/FML@0da1263ff9ede99267c03728a1c823b8056d5e44 Enhance error output for bad textures a bit more and try and capture more types of error.. - - v99.99-pre-4207 Enhance error output for bad textures a bit more and try and capture more types of error.. - - v99.99-pre-4206 MinecraftForge/FML@be5ec06e3144d55a03d125f3ce364eade3771f4f Cleaning up the missing resource stack spam, and condensing the information into a usefully understandable format. - - v99.99-pre-4205 Cleaning up the missing resource stack spam, and condensing the information into a usefully understandable - format. - - v99.99-pre-4204 MinecraftForge/FML@ce791cb1f2cf983ef77b1e5c4028ddefab394062 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. - MinecraftForge/FML@852710962a9b6d7c8e2ca188c715eebb2da44c2a Clean up some dead code - - v99.99-pre-4203 Clean up some dead code - - v99.99-pre-4202 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. - - v99.99-pre-4201 Merge pull request #1791 from KingLemming/1.7.10-fluid - FCR Warning + Denial - - v99.99-pre-4200 Adds a warning to the FluidContainerRegistry when a mod does something stupid! Also denies the registration. - - v99.99-pre-4199 Merge pull request #1789 from KingLemming/1.7.10-fluid - 1.7.10 fluid - - v99.99-pre-4198 Fixes FluidContainerRegistry properly - no more corner case where client/server mods disagree. - Also clarifies the 2x Fluid registration error message somewhat. - - v99.99-pre-4197 Merge pull request #4 from MinecraftForge/1.7.10 - 1.7.10 - - v99.99-pre-4196 MinecraftForge/FML@4a753227adb805d29f3bf245c3f8427193c35544 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. - - v99.99-pre-4195 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. - - v99.99-pre-4194 Merge pull request #1784 from KingLemming/1.7.10-fluid - Change to FluidContainerRegistry - - v99.99-pre-4193 Fixes #1782 - - v99.99-pre-4192 Merge pull request #2 from MinecraftForge/1.7.10 - 1.7.10 - - v99.99-pre-4191 Merge pull request #1752 from AbrarSyed/patch1 - changed run configs to GradleStarts - - v99.99-pre-4190 Player sensitive version of Block.getPickBlock - Block.getPickBlock was patched in 1.7 but was overlooked in 1.8. - Closes: https://github.com/MinecraftForge/MinecraftForge/issues/1709 - - v99.99-pre-4189 Merge pull request #1775 from Prototik/patch-1 - [1.7.10] Fix FluidRegsitry.registerFluid - - v99.99-pre-4188 Fix FluidRegsitry.registerFluid - FluidRegistry: - ```java - static BiMap fluids = HashBiMap.create(); - static BiMap fluidIDs = HashBiMap.create(); - ... - public static boolean registerFluid(Fluid fluid) - { - if (fluidIDs.containsKey(fluid.getName())) - ^^^^^^^ - ``` - There is definitely should be fluids instead fluidIDs. This mistake broke many mods. - - v99.99-pre-4187 Updated FML: - MinecraftForge/FML@c8160311d580f2dfccdf796a5243e16844787cb6 Stop IllegalFormatConversionException thrown if @Mod has flagged client-only or server-only - MinecraftForge/FML@9a894952afb526436649f608f7af5992b97f044c Merge pull request #627 from GotoLink/patch-1 - MinecraftForge/FML@40faac64520d1a197f08eaa9a0f850e7df43359a Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. - - v99.99-pre-4186 Restore binary compatibility issues in FluidRegistry caused by recent changes. - - v99.99-pre-4185 MinecraftForge/FML@31cf2a9cab6d1977d31436220d9612eaa13d4e0f Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. - - v99.99-pre-4184 Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. - - v99.99-pre-4183 Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. - - v99.99-pre-4182 Copy fortress.dat from vanilla location - Fixes #1747 - If the dat file isn't in the dimension specific folder but is present in the vanilla data folder then copy it over. - - v99.99-pre-4181 You shouldn't be creating FluidStacks from unregistered Fluids. Warn clearly on failed registrations, and make a useful log message for failed fluidstack - creations. Should help a lot with tracking down broken mods that are doing this wrongly. - - v99.99-pre-4180 Allow for duplicate Fluid Blocks. It's annoying to be sure but just as with the OreDictionary, we'll have to handle it. - - v99.99-pre-4179 Fix formatting - - v99.99-pre-4178 Add in a fluidid transformer - - v99.99-pre-4177 Removed fluidID from ItemStack. - This fixes a rather huge issue where FluidStacks on the client could be desynced if a modder was unaware of it. - This is a breaking change but can be mitigated with a transformer to the getter getFluidID(). - - v99.99-pre-4176 Merge pull request #1771 from iChun/master - Readded but deprecated the old RenderPlayerEvent that were deleted. Sorry, Lex. - - v99.99-pre-4175 Readded but deprecated the old RenderPlayerEvent that were deleted. Sorry, Lex. - - v99.99-pre-4174 Merge pull request #1770 from iChun/master - Reimplement RenderPlayerEvent that was removed in the port to 1.8 from 1.7.10. - - v99.99-pre-4173 Reimplement RenderPlayerEvent that was removed in the port to 1.8 from 1.7.10. - RenderPlayerEvent.Specials was removed because the special effects are done in the LayerRenderer now. - - v99.99-pre-4172 Forge really should have always supported the concept of an "exact spawn". Individual world providers can still - change this behaviour of course, but for default maps it makes sense to support it as a config option. - - v99.99-pre-4171 MinecraftForge/FML@12ccf9cf49b76140841cdc5a459422ae4781de1a Rather than try to fall back to the backup level.dat in case of weirdness in the ID map, just fail hard. There is probably a serious modder derp in this case and there's nothing FML can do to recover the situation except avoid making it worse. - MinecraftForge/FML@e8cd368da30661ed2898fff232e2db787edcbdcc It's an IllegalState not an IllegalArgument *sigh* - MinecraftForge/FML@2be9c743424c92f8799a6af1d59d60edd65e6bf0 And fix itemblocks being removed, leaving behind a residual block. This is a legitimate action - use the missing mapping event to let the mod tell us about it - MinecraftForge/FML@7d8804cf656081d1570068f52e9bfc7140b21a65 You can't setAction to BLOCKONLY - MinecraftForge/FML@c73861efe67594ee9995bc93744cab06bd6647d1 Cherry-pick 01aaa7dc97480b381ca0d192ec65016d7baeb747 Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 - MinecraftForge/FML@94c45b48c1265e7c4f60f591d413fa545787d354 Fix json cache crash, handle the file much more cleanly. Probably an MC JIRA since it's a vanilla bug. Closes #619 - - v99.99-pre-4170 Merge pull request #627 from GotoLink/patch-1 - Stop IllegalFormatConversionException thrown - - v99.99-pre-4169 Fix json cache crash, handle the file much more cleanly. Probably an MC JIRA since - it's a vanilla bug. Closes #619 - - v99.99-pre-4168 Stop IllegalFormatConversionException thrown if @Mod has flagged client-only or server-only - %d is not a valid format for getModId(), which returns String. - - v99.99-pre-4167 Cherry-pick 01aaa7dc97480b381ca0d192ec65016d7baeb747 - Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 - - v99.99-pre-4166 Update FML - merge the 1.7.10 changes in to forge @ 1.8. Wow git is (sorta) AWESOME! - MinecraftForge/FML@6b0ae369eb9b8cf89eb9d53fe997a6e5ef222093 Try and improve performance of the registry by avoiding superType.cast. - MinecraftForge/FML@dfebcafd49550b8c3f90c6c028ef0d7f3a13e607 Something I meant to add a long time ago, but it got overlooked. My apologies. Presend the (int) dimension ID in the serverhello packet. This should be 100% backward compatible with existing servers but bumping a server to this version will allow clients with this version as well to now login in dimensions outside the byte range. Probably fixes a bunch of mods that add dimensions. - MinecraftForge/FML@6011419fa055c1375d05189f9bf0d86705c9c0ec Clean up my patch. Terrible person I am.. - MinecraftForge/FML@c6bbd0e82de3d8f7993d70aa7be3f883b3afbc47 Forgot that I need a noarg ctor. I'm so rusty. - MinecraftForge/FML@6edc1635de163c41b6b5dfe02bee13d6a9c5aa4d Need to load the dimension from disk - do it without filling out the player so that the normal player loading (including events) works properly - MinecraftForge/FML@4ca6f6e19f3c3147fcf48c58669f55478a9a1345 What a dumb oversight. One needs to copy the active substitution set to the active gamedata. Doesn't work well otherwise. - MinecraftForge/FML@6f6cec96be73b4c94999cf60dc00741f3f3c2cc2 Substitutions need to be activated when they're registered, otherwise they won't appear in world, ever. - MinecraftForge/FML@13ac015f0c36b8e2091ae332c556be315429f4c8 Change iterator behaviour for the registry - include substitutions in the standard iterator, so that vanilla MC methods visit them (so they can get textures etc). The fml special one only visits the absolute set, used mostly for sanity checking and serialization. - MinecraftForge/FML@24cb4a42c4e4bddde95c0e49d1f8b8bcc20c626d Enhance output of common FML errors in crash reports and server GUI. - MinecraftForge/FML@12ccf9cf49b76140841cdc5a459422ae4781de1a Rather than try to fall back to the backup level.dat in case of weirdness in the ID map, just fail hard. There is probably a serious modder derp in this case and there's nothing FML can do to recover the situation except avoid making it worse. - MinecraftForge/FML@e8cd368da30661ed2898fff232e2db787edcbdcc It's an IllegalState not an IllegalArgument *sigh* - MinecraftForge/FML@2be9c743424c92f8799a6af1d59d60edd65e6bf0 And fix itemblocks being removed, leaving behind a residual block. This is a legitimate action - use the missing mapping event to let the mod tell us about it - MinecraftForge/FML@7d8804cf656081d1570068f52e9bfc7140b21a65 You can't setAction to BLOCKONLY - MinecraftForge/FML@13df640d9d4516219b07778edd76efd2643019f6 Pull in a lot of the FML tweaks from 1.7 to 1.8 - MinecraftForge/FML@447beaa99ec828fb83796185d07c72ea28b056c9 Merge remote-tracking branch 'origin/1.7.10' - - v99.99-pre-4165 Merge remote-tracking branch 'origin/1.7.10' - Conflicts: - fml - - v99.99-pre-4164 Merge remote-tracking branch 'origin/1.7.10' - - v99.99-pre-4163 Pull in a lot of the FML tweaks from 1.7 to 1.8 - Merge remote-tracking branch 'origin/1.7.10' - Conflicts: - src/main/java/cpw/mods/fml/common/MissingModsException.java - - v99.99-pre-4162 MinecraftForge/FML@2afd55ab825fad3b07073c474cdb96b348701084 Fix scala mods, Closes #621 - MinecraftForge/FML@c541b08ef68161f437eeb7b22eabe27b20eebf55 Merge pull request #622 from diesieben07/scala-fix - MinecraftForge/FML@d5021417dd10f36dc3d1b68e4975eb91f7f46e68 Forgot the register handling bit. Registration should work now.. - MinecraftForge/FML@5a65c6568699acaade8243040d8552b1f2e2e28f OK, this is finally actually working, I think... - - v99.99-pre-4161 OK, this is finally actually working, I think... - - v99.99-pre-4160 Fixed mipmapping not being enabled by expanding 1x1 texture - - v99.99-pre-4159 Comment on previous commit fix - it worked. Thanks to skyboy and tterrag for investigating and verifying. - A chest as an acheivement icon will recreate the original problem, for note. - - v99.99-pre-4158 Experimental "fix" for the weird rendering in the Acheivements screen. Thanks skyboy for spotting this. - - v99.99-pre-4157 You can't setAction to BLOCKONLY - - v99.99-pre-4156 And fix itemblocks being removed, leaving behind a residual block. This - is a legitimate action - use the missing mapping event to let the mod - tell us about it - - v99.99-pre-4155 It's an IllegalState not an IllegalArgument *sigh* - - v99.99-pre-4154 Rather than try to fall back to the backup level.dat in case of weirdness - in the ID map, just fail hard. There is probably a serious modder derp in this - case and there's nothing FML can do to recover the situation except avoid - making it worse. - - v99.99-pre-4153 Forgot the register handling bit. Registration should work now.. - - v99.99-pre-4152 Merge pull request #622 from diesieben07/scala-fix - Fix scala mods, Closes #621 - - v99.99-pre-4151 Fix scala mods, Closes #621 - - v99.99-pre-4150 Updated FML: - MinecraftForge/FML@2a268cd5664b6562a4bf2a953a6a93fd8e111bd2 Improve mod list GUI, add sort and search - MinecraftForge/FML@951fc2d9fd7e7970c86accb1be095a24f7bfaf18 First attempt at making FMLControlledRegistry something a bit more generic than just blocks/items. - MinecraftForge/FML@410582222d9ba15d42dc47db0d3d6a84aeac2d22 Merge pull request #614 from tterrag1098/betterModList - MinecraftForge/FML@ba0b176430cdbc3573643a6e21d47013cfd1f0e0 Fix ModDiscoverer ignoring inner classes. - MinecraftForge/FML@9cc313eab9939724786f833f511a87c9957dbc72 Merge pull request #617 from diesieben07/innerclass-disc - MinecraftForge/FML@01aaa7dc97480b381ca0d192ec65016d7baeb747 Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 - MinecraftForge/FML@8cecc47b85db68e8e69f45641b1d843509dbe71d Merge pull request #620 from killjoy1221/extra-coremod-fix - MinecraftForge/FML@38d9a5f444815810dec3607f5b3b7ff1ac513d4c Enhance output of common FML errors in crash reports and server - Force load anonymous minecraft classes used in crash reports. This prevents some crashes being hiddedn behind class definiton exceptions.GUI. - - v99.99-pre-4149 MinecraftForge/FML@24cb4a42c4e4bddde95c0e49d1f8b8bcc20c626d Enhance output of common FML errors in crash reports and server GUI. - Force load anonymous minecraft classes used in crash reports. This prevents some crashes being hiddedn behind class definiton exceptions. - - v99.99-pre-4148 Enhance output of common FML errors in crash reports and server GUI. - - v99.99-pre-4147 Enhance output of common FML errors in crash reports and server GUI. - - v99.99-pre-4146 Merge pull request #620 from killjoy1221/extra-coremod-fix - Fixed typo causing coremods to be missed in certain situations. - - v99.99-pre-4145 Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 - - v99.99-pre-4144 MinecraftForge/FML@4ca6f6e19f3c3147fcf48c58669f55478a9a1345 What a dumb oversight. One needs to copy the active substitution set to the active gamedata. Doesn't work well otherwise. - MinecraftForge/FML@6f6cec96be73b4c94999cf60dc00741f3f3c2cc2 Substitutions need to be activated when they're registered, otherwise they won't appear in world, ever. - MinecraftForge/FML@13ac015f0c36b8e2091ae332c556be315429f4c8 Change iterator behaviour for the registry - include substitutions in the standard iterator, so that vanilla MC methods visit them (so they can get textures etc). The fml special one only visits the absolute set, used mostly for sanity checking and serialization. - - v99.99-pre-4143 Change iterator behaviour for the registry - include substitutions in the standard iterator, so that - vanilla MC methods visit them (so they can get textures etc). The fml special one only visits the - absolute set, used mostly for sanity checking and serialization. - Closes #618 - - v99.99-pre-4142 Substitutions need to be activated when they're registered, otherwise they won't appear in world, ever. - - v99.99-pre-4141 What a dumb oversight. One needs to copy the active substitution set to the active gamedata. Doesn't work well otherwise. - Closes #616 - - v99.99-pre-4140 Merge pull request #617 from diesieben07/innerclass-disc - Fix ModDiscoverer ignoring inner classes. - - v99.99-pre-4139 Merge pull request #1755 from simon816/custom-tileentity-data - Add getTileData() to TileEntity - - v99.99-pre-4138 Fix ModDiscoverer ignoring inner classes. - - v99.99-pre-4137 Add getTileData() to TileEntity - - The same idea as Entity.getEntityData() - - v99.99-pre-4136 MinecraftForge/FML@6b0ae369eb9b8cf89eb9d53fe997a6e5ef222093 Try and improve performance of the registry by avoiding superType.cast. - MinecraftForge/FML@dfebcafd49550b8c3f90c6c028ef0d7f3a13e607 Something I meant to add a long time ago, but it got overlooked. My apologies. Presend the (int) dimension ID in the serverhello packet. This should be 100% backward compatible with existing servers but bumping a server to this version will allow clients with this version as well to now login in dimensions outside the byte range. Probably fixes a bunch of mods that add dimensions. - MinecraftForge/FML@6011419fa055c1375d05189f9bf0d86705c9c0ec Clean up my patch. Terrible person I am.. - MinecraftForge/FML@c6bbd0e82de3d8f7993d70aa7be3f883b3afbc47 Forgot that I need a noarg ctor. I'm so rusty. - MinecraftForge/FML@6edc1635de163c41b6b5dfe02bee13d6a9c5aa4d Need to load the dimension from disk - do it without filling out the player so that the normal player loading (including events) works properly - - v99.99-pre-4135 Need to load the dimension from disk - do it without filling out the player so that the normal player loading (including events) - works properly - - v99.99-pre-4134 Forgot that I need a noarg ctor. I'm so rusty. - - v99.99-pre-4133 Clean up my patch. Terrible person I am.. - - v99.99-pre-4132 Something I meant to add a long time ago, but it got overlooked. My apologies. Presend the (int) - dimension ID in the serverhello packet. This should be 100% backward compatible with existing servers - but bumping a server to this version will allow clients with this version as well to now login in - dimensions outside the byte range. Probably fixes a bunch of mods that add dimensions. - - v99.99-pre-4131 Merge pull request #1754 from JamiesWhiteShirt/master - Added newVolume and newPitch to PlaySoundAtEntityEvent. - - v99.99-pre-4130 Added newVolume and newPitch to PlaySoundAtEntityEvent. Deprecated ForgeEventFactory.onPlaySoundAt, added replacement ForgeEventFactory.onPlaySoundAtEntity. - - v99.99-pre-4129 changed run configs to GradleStarts - - v99.99-pre-4128 Merge pull request #1723 from Geforce132/master - Add an EntityMountEvent. - - v99.99-pre-4127 Merge pull request #614 from tterrag1098/betterModList - Improve mod list GUI, adds sort buttons and a search bar - - v99.99-pre-4126 First attempt at making FMLControlledRegistry something a bit more generic than just blocks/items. - It probably doesn't work yet though. - - v99.99-pre-4125 Try and improve performance of the registry by avoiding superType.cast. - - v99.99-pre-4124 -Added EntityMountEvent. - - v99.99-pre-4123 Improve mod list GUI, add sort and search - - v99.99-pre-4122 Merge pull request #1745 from diesieben07/ingamegui-fix - Fix jukebox message being too low - - v99.99-pre-4121 Fix jukebox message being too low with forge - - v99.99-pre-4120 Updated FML: - MinecraftForge/FML@3e7ae47f8f5d642b256adbe8b3395bb40daf85da Fix Event Bus Access Issues - MinecraftForge/FML@c8e2a5f377ddf8a35cceda6a14697dbe8cad4ca8 Fixed WorldInfo properties not loaded - MinecraftForge/FML@7f96b2c69ab8a2ed07b5b786b3d679ea4c509121 Fix Debug packet logger on local memory connections. - - v99.99-pre-4119 Fix Debug packet logger on local memory connections. - - v99.99-pre-4118 Merge pull request #1739 from robin4002/master - Remove translation and add a note for contributors - - v99.99-pre-4117 remove translation and add a note for contributors - - v99.99-pre-4116 Merge pull request #610 from Zot201/1.8 - Fixed WorldInfo properties not loaded - - v99.99-pre-4115 Fixed WorldInfo properties not loaded - - v99.99-pre-4114 Merge pull request #609 from Zot201/1.8 - Add transformer to allow protected/private classes to use the event bus. - - v99.99-pre-4113 Merge pull request #1733 from Zot201/enchantment-fix - Fixed enchanting table applying secondary enchs. Closes #1428 - - v99.99-pre-4112 Fixed enchanting table applying secondary enchs. - - v99.99-pre-4111 Merge pull request #1721 from me4502/update-event - Added NeighborNotifyEvent fired on server side only, allows for monitoring and disabling world 'physics' updates. - - v99.99-pre-4110 Add NeighborNotiftyEvent. - - v99.99-pre-4109 Fix Event Bus Access Issues - 1) Allow overriding methods in subclass without extra SubscribeEvent annotations - 2) Transform event subscribers to have public method/class - - v99.99-pre-4108 Fix compile error in ClientHax's PR. - - v99.99-pre-4107 Merge pull request #1729 from clienthax/master - Add method to set entity placement type. - - v99.99-pre-4106 Current spawner implementation checks the EntitySpawnPlacementRegistry hashmap to check where a entity should spawn - as there is no way to modify this without the use of reflection or a AT, you can not specify where you want your entity to spawn - adding this helper method will allow developers to specify where they want their entity to spawn. - Update EntitySpawnPlacementRegistry.java.patch - - v99.99-pre-4105 Merge pull request #1730 from Tmtravlr/master - Added Nether Fortress chest to the ChestGenHooks - - v99.99-pre-4104 Added Nether Fortress chest to the ChestGenHooks - I tried to follow the directions on - https://github.com/MinecraftForge/MinecraftForge/wiki/If-you-want-to-contribute-to-Forge - as best as I could. =) - If anything is wrong, let me know and I'll change it! - - v99.99-pre-4103 Hopefully fix NPE during baking of empty vanilla item models - - v99.99-pre-4102 Fire WorldEvent.Load for Client worlds. Closes #1719 - - v99.99-pre-4101 Make Container.mergeItemStack respect Slot.isValidItem Closes #1630 - - v99.99-pre-4100 Fix JukeBoxes not storing the inserted record. All TE's in minecraft are in net.minecraft.tileentity EXCEPT JukeBoxes. Closes #1633 Closes #1714 - - v99.99-pre-4099 Fix NPEs in last commit. - - v99.99-pre-4098 Fix NPEs in mlast commit. - - v99.99-pre-4097 Updated FML: - MinecraftForge/FML@c9cf3136c265b2e8e46eab102b2310a9312b8cfb New @Mod properties to define which environment to load the mod on. - clientSideOnly will only be loaded in the Client environment. - serverSideOnly will only be loaded in the Dedicated server environment. - Combine with acceptedMinecraftVersions to prevent users from loading the mod in the incorrect environment. - - v99.99-pre-4096 New @Mod properties to define which environment to load the mod on. - clientSideOnly will only be loaded in the Client environment. - serverSideOnly will only be loaded in the Dedicated server environment. - Combine with acceptedMinecraftVersions to prevent users from loading the mod in the incorrect environment. - - v99.99-pre-4095 Updated FML: - MinecraftForge/FML@5eff40897545c9e6f597a202bc9e86c3b07761ad Filter more known libraries from potential mod canidates. - MinecraftForge/FML@feb4c436db27a249dd5190023edd38cb5884e90b Quiet ClassPatchManager debug spam by default. Reenable using -Dfml.debugClassPatchManager=true. - MinecraftForge/FML@41e806fa950839bf901ebf9c18d0c632a7c5538c Fix double decoding of UTF8 characters in lang files. - - v99.99-pre-4094 Fix double decoding of UTF8 characters in lang files. - - v99.99-pre-4093 Fixed using items on the wrong block client side caused by iChuns eyeheight update. - - v99.99-pre-4092 Merge pull request #1718 from iChun/master - Reimplement variable eyeHeight for players which was removed in the 1.7 to 1.8 port. - - v99.99-pre-4091 Reimplement variable eyeHeight for players which was removed in the 1.7 to 1.8 port. - - v99.99-pre-4090 Removed event bus call from the ModelLoader - - v99.99-pre-4089 Merge pull request #1708 from matthewprenger/PR-1 - Ability to add prefixes and suffixes to the player's display name - - v99.99-pre-4088 Add safty to URL detection in chat. Closes #1712 - - v99.99-pre-4087 RenderItem can now use baked quad color - - v99.99-pre-4086 Added a default white texture; Fixed B3DLoader crashing when the brush has empty texture specified - - v99.99-pre-4085 Merge pull request #1711 from Parker8283/patch-1 - Added ATs for EnumFacing - - v99.99-pre-4084 Added ATs for EnumFacing - This publics the VALUES array and HORIZONTALS array in EnumFacing, thus giving modders access to these arrays, much like ForgeDirection had. - - v99.99-pre-4083 Quiet ClassPatchManager debug spam by default. Reenable using -Dfml.debugClassPatchManager=true. - - v99.99-pre-4082 Filter more known libraries from potential mod canidates. - - v99.99-pre-4081 Attributes.put (de)normalization now works as intended - - v99.99-pre-4080 Add the ability to add prefixes and suffixes to the player's display name. - - v99.99-pre-4079 Hold a weak reference to the Minecraft fake player object. Closes #1705 - - v99.99-pre-4078 Merge pull request #1689 from matthewprenger/master - Minor tweak to UsernameCache to also cache usernames of offline players - - v99.99-pre-4077 Updated FML - - v99.99-pre-4076 Moved transformer wrappers to a separate package (should fix signing errors), fixed debug mods not loading in forgedev (string comparison). - - v99.99-pre-4075 ModelRotation.getMatrix() now returns the correct matrix; fixed the application of custom transformations to vanilla models; fixed application of transformations to B3D models; fixed the culling of rotated vanilla models - - v99.99-pre-4074 Merge pull request #599 from diesieben07/master - Handle empty lines in language files gracefully - - v99.99-pre-4073 Alternative models work once again - - v99.99-pre-4072 Handle empty lines in language files gracefully - - v99.99-pre-4071 Updated FML - - v99.99-pre-4070 Merge pull request #597 from RainWarrior/blame - Added blaming of coremods and mods not targetting Java 6 - - v99.99-pre-4069 Added blaming of coremods and mods not targetting Java 6 - - v99.99-pre-4068 fix ModelLoader.setCustomModelResourceLocation not storing same item with different metadata values - - v99.99-pre-4067 Try a maven mirrior to fix build issues. - - v99.99-pre-4066 made renderLayer ThreadLocal, now it should hold correct value for use inside custom baked models - - v99.99-pre-4065 Reworked vanilla texture resolution, hopefully fixes NPE bug in FaceBakery - - v99.99-pre-4064 fixed NPE during loading of B3D models without textures/brushes. - changed default B3D color to have full opacity. - - v99.99-pre-4063 Minor tweak to UsernameCache to also cache usernames of offline players. - - v99.99-pre-4062 Fixed being kicked from the server while swimming. - - v99.99-pre-4061 Fixed debugging Dedicated server in Forge Dev workspace. - - v99.99-pre-4060 Fixed potential NPEs in Structure code caused by componenets not being able to load. - - v99.99-pre-4059 Fixed potential NPEs in Structure code caused by componenets not being able to load. Closes #1686 - - v99.99-pre-4058 Added ability for language files to opt-in to loading using normal Java properties format. - This allows for escape characters, as well as keeping %d and %f replacements in tact. - To opt-in, the lang file must have this comment line: - # PARSE_ESCAPES - As this is opt-in, any errors resulting from misused format strings is on the modder/end user. - - v99.99-pre-4057 Fixed BlockBush and BlockCrops not respecting custom soils. Closes #1683 - - v99.99-pre-4056 Fixed InitMapGenEvent's fire order so values are used. And added OCEAN_MONUMENT type. Closes #1681 - - v99.99-pre-4055 Restore binary backwards compatibility - - v99.99-pre-4054 ModelBakeEvent now has ModelLoader as an argument instead of ModelBakery; Added various static hooks to ModelLoader to allow registering model-related information before it's needed (prevents file-not-found errors on first baking pass); ModelLoader waits until ModelBakeEvent is done before showing any missing model exceptions; It's now possible to define models completely in-code (as illustrated by ModelBakeEventDebug). - - v99.99-pre-4053 Bump version to 11.14.1 for next development cycle. - - v99.99-pre-4052 Updated FML: - MinecraftForge/FML@1de3bf733aef754f15de55006b1750376871feb0 Fix FML's package for net.miencraftforge on maven. Fixes uploading of new builds. Note: 1.7.10 builds are bug fixes only while FML/Forge for 1.8 stabelizes. - MinecraftForge/FML@05ecefb53857ecc1dc52d4a577ed593c26da9659 Update to ASM5 for Java 8 support - MinecraftForge/FML@1112c455b9758c38eab385f48578bad17c0180f9 Merge pull request #595 from Grinch/master - - v99.99-pre-4051 Fixed tracking of UV locking state. Closes #1679 - - v99.99-pre-4050 Updated FML: MinecraftForge/FML@22c9656196dbbea8ed983663d536c3ca272d7282 Reset S->C CustomPayload data after Write, allowing the same packet to be written multiple times. - - v99.99-pre-4049 Fixed ItemFrames not having a model. Closes #1678 - - v99.99-pre-4048 Reset S->C CustomPayload data after Write, allowing the same packet to be written multiple times. Closes #588 - - v99.99-pre-4047 Fixed Buttons not dropping anything when broken. Closes #1676 - - v99.99-pre-4046 Fixed domain support in ArmorMaterial texture name. Closes #1675 - - v99.99-pre-4045 Updated FML: - MinecraftForge/FML@d00feb58c762b0bbc506d79faf1ce40bc96732e9 Remove debug code that was causing console spam in Forge. - MinecraftForge/FML@1de3bf733aef754f15de55006b1750376871feb0 Fix FML's package for net.miencraftforge on maven. Fixes uploading of new builds. Note: 1.7.10 builds are bug fixes only while FML/Forge for 1.8 stabelizes. - MinecraftForge/FML@05ecefb53857ecc1dc52d4a577ed593c26da9659 Update to ASM5 for Java 8 support - MinecraftForge/FML@1112c455b9758c38eab385f48578bad17c0180f9 Merge pull request #595 from Grinch/master - MinecraftForge/FML@9c3013e02af1bd2f724d34a30e0b880b6e131645 Merge remote-tracking branch 'origin/1.8' - - v99.99-pre-4044 Merge remote-tracking branch 'origin/1.8' - - v99.99-pre-4043 Merge remote-tracking branch 'origin/1.8' - - v99.99-pre-4042 Merge pull request #595 from Grinch/master - Update to ASM5 for Java 8 support, IF ANYONE MAKES A MOD THAT REQUIRES JAVA8 BEFORE MINECRAFT FORCES IT ALL USERS REQUESTING SUPPORT WILL BE BANNED FROM ALL FORGE RELATED SERVICES. - - v99.99-pre-4041 Removed leftover debug messages - - v99.99-pre-4040 Merge pull request #1666 from TechStack/1.8 - Fixes issue #1552 Where the flowIntoBlock method was not setting the Block to the fluid and causing crashes - - v99.99-pre-4039 Merge pull request #1664 from Lunatrius/fix-debug - Fixed debug text rendering one line to low. - - v99.99-pre-4038 Closes #1552 - Set the destination block the to the fluid. - In the previous code the destination block was still Air and would would - cause a crash because air doesn't have a property for LEVEL - - v99.99-pre-4037 Merge pull request #1521 from RainWarrior/model-system - Model loader registry - - v99.99-pre-4036 Added model loader registry - Entry point: ModelLoaderRegistry - loader interface: ICustomModelLoader - custom model: IModel - ModelLoader is responsible for splicing into vanilla model system. - (you probably don't need to use it directly) - Interop with vanilla models isn't great yet - (vanilla models can't refer to custom ones as parents), will improve in - the future. - Includes loader for B3D models, with animation support - (net.minecraftforge.client.model.b3d). - Blender export plugin with compatible coordinate system: - https://github.com/RainWarrior/B3DExport - OBJ loader is being written, will be included at some point in the - future. For now you can convert OBJ to B3D via blender, or wait. - - v99.99-pre-4035 Update to ASM5 for Java 8 support - SpecialSource updated ASM5 and ForgeGradle supports ASM5 as well but - neither FML or Forge were actually updated to support ASM5 opcodes. This - commit resolves this. - - v99.99-pre-4034 Don't skip the first line when rendering (debug) text. - - v99.99-pre-4033 Merge pull request #1646 from Ivorforce/patch-1 - Fix fluid tanks incorrectly reading NBT when empty - - v99.99-pre-4032 Updated FML: - MinecraftForge/FML@a55e4124531119f1c9c023cff74cfa09b49ef0e0 Save the mod list of players in their NetworkDispatcher (Make it accessable for mods) - MinecraftForge/FML@69d479d46ae658c5a5c2c00081be3df38e38c748 Fixed getEffectiveSide() for Netty Server threads - MinecraftForge/FML@0f9a33cf14165ddd424a7d82c2178cf5854bf32f Exclude only log4j2 queue from class loader - - v99.99-pre-4031 Merge pull request #591 from Minecrell/patch-1 - Exclude only log4j2 queue from class loader - - v99.99-pre-4030 Fix fluid tanks incorrectly reading NBT when empty - If the Empty flag was set, the tank would not correctly read the data, keeping the outdated FluidStack instead. This is especially relevant with updatable TileFluidHandler TEs. - - v99.99-pre-4029 Merge pull request #1647 from Parker8283/fluid-icons - Re-enabled Icon setting for Fluids - - v99.99-pre-4028 Merge pull request #1645 from Lunatrius/chat-npe-fix - Fixed NPE when canceling ClientChatRecievedEvent. Fixes #1644 - - v99.99-pre-4027 Merge pull request #575 from lumien231/1.8 - Save the mod list of players in their NetworkDispatcher - - v99.99-pre-4026 Re-enabled Icon setting for Fluids - - v99.99-pre-4025 Exclude only log4j2 queue from class loader - Right now the complete com.mojang package is excluded from the LaunchClassLoader on the server. This means mods can't transform authlib for example which doesn't need to be excluded for the UI to work. By excluding only the specific log4j2 QueueLogAppender, mods can also transform the classes in the com.mojang.authlib package. - - v99.99-pre-4024 Fixed NPE when canceling ClientChatRecievedEvent. Fixes #1644 - - v99.99-pre-4023 Silently eat exceptions when getting a TE's rendering bounding box, this 'fixes' Bukkit servers screwing up world data and causing clients to crash. - - v99.99-pre-4022 Merge pull request #1635 from asiekierka/master - Fix shouldRefresh being too broad in tile entity update - - v99.99-pre-4021 fix shouldRefresh being too broad in tile entity update - - v99.99-pre-4020 Merge pull request #1602 from Chicken-Bones/1.8 - Allow blocks to render in multiple layers - - v99.99-pre-4019 Merge pull request #1615 from lumien231/master - Fix versionCheck config option - - v99.99-pre-4018 Merge pull request #1627 from CovertJaguar/tile-refresh - Bulk Chunk Data packets should also check TileEntity.shouldRefresh(). - - v99.99-pre-4017 Fix value passed for Item.getModel useRemaining argument. Closes #1623 - - v99.99-pre-4016 Made Chunk.fillBlock respect TileEntity.shouldRefresh. - - v99.99-pre-4015 Call World.init from DimensionManager.initDimension Closes #1551 - - v99.99-pre-4014 Fix potential NPE when loading a single player world where you were saved in a unloaded dimension. Closes #1575 - - v99.99-pre-4013 Bulk Chunk Data packets should also check TileEntity.shouldRefresh(). - - v99.99-pre-4012 Fix versionCheck config option - - v99.99-pre-4011 Merge pull request #1609 from lumien231/1.8 - Fixes #1603: Moving the start of the update thread to the pre init of the forge mod container - - v99.99-pre-4010 Fixes #1603: Moving the start of the update thread to the pre init of the forge mod container - - v99.99-pre-4009 Allow blocks to render in multiple layers - - v99.99-pre-4008 Fix recipies for stone variants. - - v99.99-pre-4007 Merge pull request #1592 from palechip/1.8 - Fix Scoreboard rendering for the sidebar. - - v99.99-pre-4006 Fix MC-30864 (sending web links in chat) - - v99.99-pre-4005 Merge pull request #1491 from killjoy1221/master - Fix MC-30864 (sending web links in chat) - - v99.99-pre-4004 Merge pull request #578 from HEmile/1.8 - Fixed getEffectiveSide() for Netty Server threads - - v99.99-pre-4003 Fix crafting of non-oak fences/gates. - - v99.99-pre-4002 Merge pull request #1338 from MinestrapTeam/renderpane - Fix Stained Glass pane rendering issues - - v99.99-pre-4001 Added chests to the ore dictionary. - - v99.99-pre-4000 Removed exclusion of white stained glass recipes in ore dictionary. - - v99.99-pre-3999 Merge pull request #1503 from Kittychanley/master - Removed exclusion of white stained glass recipes in ore dictionary. - - v99.99-pre-3998 Fixed getEffectiveSide() for Netty Server threads - - v99.99-pre-3997 Fix Scoreboard rendering for the sidebar. - - v99.99-pre-3996 Fix BlockSnapshots not firing correctly due to patch mixup in 1.8 update. Closes #1591 - - v99.99-pre-3995 Merge pull request #1586 from Lunatrius/fix-chat-1.8 - [1.8] Fixed messages not being added to the chat history - - v99.99-pre-3994 Fixed messages not being added to the chat history and ClientCommandHandler not being called when sleeping. - - v99.99-pre-3993 Merge pull request #1581 from Lunatrius/fix-chat - Fixed messages not being added to the chat history - - v99.99-pre-3992 MinecraftForge/FML@5a4d362293fe70e1421d1f22c4a195944731d6ba Finish removing marker in mapping entry names. FMLMissingMappingsEvent/FMLModIdMappingEvent should fire with correct names now. - - v99.99-pre-3991 Fix incorrect logic in world change clumping. - - v99.99-pre-3990 Fix incorrect logic in world change clumping. - - v99.99-pre-3989 Remove our changes to Stitcher slot allocation. - - v99.99-pre-3988 Fixed messages not being added to the chat history and ClientCommandHandler not being called when sleeping. - - v99.99-pre-3987 Finish removing marker in mapping entry names. FMLMissingMappingsEvent/FMLModIdMappingEvent should fire with correct names now. - - v99.99-pre-3986 Remove our changes to Stitcher slot allocation. - - v99.99-pre-3985 MinecraftForge/FML@e3785c28930a218cf9374458c67c34e7fba17922 Ensure that EntitySpawn and OpenGUI packets are handled in the world thread. Also log all errors that are thrown in FutureTasks. - - v99.99-pre-3984 Ensure that EntitySpawn and OpenGUI packets are handled in the world thread. - Also log all errors that are thrown in FutureTasks. - - v99.99-pre-3983 Fix userdev for new BlockState change. - - v99.99-pre-3982 Merge pull request #1518 from RainWarrior/model-event - Added model bake event, ISmartBlock/itemModel, Block.getExtendedState, IExtendedState and IUnlistedProperty - - v99.99-pre-3981 Untie ItemModelMesher from using Item Ids internally by implementing our own simple mechanics using Trove. - - v99.99-pre-3980 Fix EnumHelper for new ArmorTexture argument. - - v99.99-pre-3979 Fix texture stitcher not using all avalible spaces. - - v99.99-pre-3978 Fix texture stitcher not using all avalible spaces. Closes #1557 - - v99.99-pre-3977 Fixed NPE thrown when brewing event is fired and not all slots are filled. - - v99.99-pre-3976 Fixed log spam when breaking DoublePlants. Closes #1555 - - v99.99-pre-3975 Fix missed patch causing Dispensed Armor to go into the wrong slot. Closes #1560 - - v99.99-pre-3974 Make daylight sensor recipe use ore dictionary wooden slabs Closes #1565 - - v99.99-pre-3973 Fixed NPE thrown when brewing event is fired and not all slots are filled. Closes #1564 - - v99.99-pre-3972 Unbind Shaped/Shapeless Ore Recipies from Array list to normal List. - - v99.99-pre-3971 Expand PlayerWakupEvent to expose the three parameters passed into EntityPlayer.wakeUp. - - v99.99-pre-3970 Expand PlayerWakupEvent to expose the three parameters passed into EntityPlayer.wakeUp. Closes #1486 - - v99.99-pre-3969 Improved Control of Enchantment.canApplyTogether() in Mod Enchantments, allowing both enchantments to determine if they can apply together. Closes #1434 - - v99.99-pre-3968 Improved Control of Enchantment.canApplyTogether() in Mod Enchantments, allowing both enchantments to determine if they can apply together. - - v99.99-pre-3967 Changed ToolMaterial's repair material to ItemStack version to allow metadata sensitive versions. - - v99.99-pre-3966 Changed ToolMaterial's repair material to ItemStack version to allow metadata sensitive versions. Closes #1355 - - v99.99-pre-3965 Fix invalid argument being passed to Block.isNormalCube from World.updateNeighbors. Closes #1339 and Closes #1346 - - v99.99-pre-3964 Add quartz_ore tool init, more mojang special casing -.- Closes #1333 and Closes #1335 - - v99.99-pre-3963 Add quartz_ore tool init, more mojang special casing -.- - - v99.99-pre-3962 Added PotionBrewEvent.Pre/Post. To allow for modification and cancelation of Brewing. Closes #1248 - - v99.99-pre-3961 Added PotionBrewEvent.Pre/Post. To allow for modification and cancelation of Brewing. - - v99.99-pre-3960 Add LivingHealEvent called from EntityLivingBase.heal() Closes #1282 - - v99.99-pre-3959 Add LivingHealEvent called from EntityLivingBase.heal() - - v99.99-pre-3958 Added CreateSpawnPosition event. - - v99.99-pre-3957 Added CreateSpawnPosition event Closes #1053 - - v99.99-pre-3956 Cleanup deprecated code, and TODOs in OreDictionary. Down-typed things from ArrayList to List. Asking for the ores with a null stack will now throw an Exception. - - v99.99-pre-3955 Add "sand" to the OreDictionary - - v99.99-pre-3954 Add "sand" to the OreDictionary Closes #1487 - - v99.99-pre-3953 Fixed bug in ServerConfigurationManager.transferPlayerToDimension where it would send the old dimension's information. Closes #1548 - - v99.99-pre-3952 Fixed bug in ServerConfigurationManager.transferPlayerToDimension where it would send the old dimension's information. - - v99.99-pre-3951 Added Explosion Start and Detonate events to control explosion. - - v99.99-pre-3950 Added Explosion Start and Detonate events to control explosion. Closes #1469 - - v99.99-pre-3949 Merge pull request #1547 from Draco18s/patch-1 - Added tessellator calls to render the block's back faces, so that the liquid properly renders when the player is immersed in the fluid. - - v99.99-pre-3948 Add GuiScreenEvents for keyboard and mouse input - - v99.99-pre-3947 Save the mod list of players in their NetworkDispatcher (Make it accessable for mods) - - v99.99-pre-3946 Update RenderBlockFluid.java - Added tessellator calls to render the block's back faces, so that the liquid properly renders when the player is immersed in the fluid. - - v99.99-pre-3945 Added model bake event (allows mods to insert custom baked models, much like TextureStitchEvent allows to load custom textures), ISmartBlock/ItemModel (ability form models to react to block/item states), Block.getExtendedState, support for unlisted properties in block states. Includes example implementation of http://imgur.com/a/FyyJX - - v99.99-pre-3944 Only call blockBreak when block itself changes, not just meta. Fixes bottles poping out of brewing stands. - - v99.99-pre-3943 Fix finding of spawn location for mobs. Closes #1546 - - v99.99-pre-3942 Remove debug patch I left in. - - v99.99-pre-3941 Updated FML: - MinecraftForge/FML@9c8ca4a4e3c4acc4980535e5c60da169b75a7810 Unlink banner block and item id. Mojang should of matched these up but they didn't -.- - MinecraftForge/FML@84a101f344b8fc21de1201fde717fbcbcba2aa79 Update Dev mcp mappings to 11-30 snapshot. - - v99.99-pre-3940 Update Dev mcp mappings to 11-30 snapshot. - - v99.99-pre-3939 Unlink banner block and item id. Mojang should of matched these up but they didn't -.- - - v99.99-pre-3938 Fix stickey pistons not retracting properly. - - v99.99-pre-3937 Fixed blocks not breaking properly when instantly destroied. - - v99.99-pre-3936 Fixed vanilla issue where exceptions in World tasks would not be logged. - - v99.99-pre-3935 Fix NPE with BlockSnapshots that caused items with TileEntities to be used up in creative mode. - - v99.99-pre-3934 Fixed vanilla bug where top part of double plants would flicker a tifferent texture before dissapearing. - - v99.99-pre-3933 Fix BlockPane's connection detection. - - v99.99-pre-3932 Fixed snow layers not being able to stack more then twice. Closes #1534 - - v99.99-pre-3931 Fixed Entities not being able to climb ladders, Closes #1535 - - v99.99-pre-3930 Fixed Entity extended properties init order. Closes #1532 - - v99.99-pre-3929 Fix interacting with entities. - - v99.99-pre-3928 Updated FML: - MinecraftForge/FML@36644e97714b46dbbb24416febdde1332a3e753c Finalize modded handshakes in the World tick thread. Prevents potential CMEs when login event takes to long to fire. - - v99.99-pre-3927 Fix not being able to place blocks in liquids, and related issues. - - v99.99-pre-3926 Fix debug screen not showing grey background. Closes #1529 - - v99.99-pre-3925 Finalize modded handshakes in the World tick thread. Prevents potential CMEs when login event takes to long to fire. - - v99.99-pre-3924 Fix destroy particles not being added. Closes #1528 - - v99.99-pre-3923 Update RecipeSorter for new 1.8 recipies. - - v99.99-pre-3922 Fix potential NPE in Block.isToolEffective - - v99.99-pre-3921 Fix wrong state being passed to Block.getDrops - - v99.99-pre-3920 Fix Entityies not taking damage correctly. Closes #1511 - - v99.99-pre-3919 Fix inverted logic preventing blocks from breaking. - - v99.99-pre-3918 Fixed crash with caomparators due to wrong position. Closes #1512 - - v99.99-pre-3917 Fix creative picking a CommandBlock minecart returning wrong item. Closes #1523 - - v99.99-pre-3916 Fix creative picking a CommandBlock minecart returning wrong item. Closes #1523 - - v99.99-pre-3915 Fix acedential inversion causing some tress to not have leaves. Closes #1522 - - v99.99-pre-3914 Fix fog colors, Closes #1524 - - v99.99-pre-3913 Fix local variable conflict in Forge patch and latest MCP mappings. - - v99.99-pre-3912 Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8. - Some notes: - Almost all int x, int y, int z parameters have been changed to BlockPos class - ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing. - All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml - Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it. - Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated. - As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format. - Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata. - Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits. - - v99.99-pre-3911 Removed exclusion of white stained glass recipes in ore dictionary. Closes #1502 & #1481 - - v99.99-pre-3910 Merge pull request #1492 from XCompWiz/clientrain - Fixes client-side fake rain - - v99.99-pre-3909 Fixes client-side fake rain - Changes the updateWeather function in WorldServer to only send the - weather info to players in the correct dimension, rather than all - players on the server. This is what causes the client-side rain, as the - client believes that it has started raining locally, rather than in - another dimension. - - v99.99-pre-3908 Fix MC-30864 (sending web links in chat) - - v99.99-pre-3907 Add details message to MissingModsException and WrongMinecraftVersionException to make the Crash logs more useful. - - v99.99-pre-3906 Add duplicate protection to ModDiscoverer, do not process files in the mods directory if we already found them in the classpath. {Such as if LiteLoader is installed and added it} Closes #557 - - v99.99-pre-3905 Merge pull request #1376 from founderio/patch-1 - Modify WavefrontObject to allow '.' in group object names - - v99.99-pre-3904 Player sensitive version of Block.getPickBlock Closes #1348 - - v99.99-pre-3903 Fix slots being black due to vanilla blending leakage Forge fixes. Closes #1325 & #1242 - - v99.99-pre-3902 Merge pull request #1005 from luacs1998/patch-1 - Create CONTRIBUTING.md - - v99.99-pre-3901 Merge pull request #547 from Parker8283/1.8 - Re-enabled Entity-Render registration - - v99.99-pre-3900 Re-enabled Entity-Render registration - - v99.99-pre-3899 Merge pull request #1450 from Adubbz/master - Fixed desert list initialization. Fixes #1447 - - v99.99-pre-3898 Bump version for new RB. - - v99.99-pre-3897 Fix logic error in Blodd's Snapshot capture that caused blocks to not be updated to the client. Closes #1451 - - v99.99-pre-3896 Merge pull request #1461 from Azanor/master - Fix for biome weights under 10 - - v99.99-pre-3895 Fix for biome weights under 10 - This solves the problem where custom mod biomes with weights under 10 - not being generated in the world. - Cleaned up the code and made the patch smaller - - v99.99-pre-3894 Merge pull request #1368 from matthewprenger/patch-1 - Added username cache - - v99.99-pre-3893 Add username cache for determining a player's last known username - - v99.99-pre-3892 Merge pull request #1457 from AbrarSyed/master - implemented crowdin support - - v99.99-pre-3891 Merge pull request #545 from bspkrs/1.8 - changed pass-thru method name to fix MCP name conflict - - v99.99-pre-3890 changed pass-thru method name to fix MCP name conflict - fixed a few old javadoc object name mistakes - - v99.99-pre-3889 implemented crowdin support - - v99.99-pre-3888 Add the ability to register custom variant names in ModelBakery. - - v99.99-pre-3887 Compleetly disable stencil bits unless told not to by using the -Dforge.forceDisplayStencil=true flag. Should solve the 'menu in bottom corner' issue with Intel Integrated graphics cards. - - v99.99-pre-3886 Merge pull request #1418 from Parker8283/wakeupevent - Added PlayerWakeUpEvent - - v99.99-pre-3885 Added PlayerWakeUpEvent - - v99.99-pre-3884 Fixed desert list initialization. Fixes #1447 - - v99.99-pre-3883 Removed unneeded rebuild, was toying with where to put it. - - v99.99-pre-3882 Automatically register BlockStates when block is initally registered, and clear the list when new snapshots are injected. Modders DO NOT touch the registry in Block directly. Closes #537 - - v99.99-pre-3881 Merge pull request #1364 from Adubbz/master - Fixed biome weights not working with non multiples of 10 - - v99.99-pre-3880 Fix vanilla lighting issue and blending issues in achievements gui. Closes #1445 - - v99.99-pre-3879 Fix FML's package for net.miencraftforge on maven. Fixes uploading of new builds. - Note: 1.7.10 builds are bug fixes only while FML/Forge for 1.8 stabelizes. - - v99.99-pre-3878 MinecraftForge/FML@d00feb58c762b0bbc506d79faf1ce40bc96732e9 Remove debug code that was causing console spam in Forge. - - v99.99-pre-3877 Remove debug code that was causing console spam in Forge. - - v99.99-pre-3876 Disable by default the Display Stencil bits. Keep FBO bits. Acording to Mumfery and ChickenBones, it should not be nessasary and should solve the 1/4 main menu issue. Use -Dforge.forceDisplayStencil=true to enable old behavior. - - v99.99-pre-3875 Merge pull request #1219 from Lunatrius/master - Prevent client only commands from bleeding through to the server. - - v99.99-pre-3874 Update TerminalTransformer for new FML package. Closes #535 - - v99.99-pre-3873 General class name cleanup, spelling mistakes and FF decompile issues. - - v99.99-pre-3872 Take control over Item.BLOCK_TO_ITEM map and register Block's to this map from GameRegistry. - - v99.99-pre-3871 Renamed TileEntityRendererChestHelper -> TileEntityItemStackRenderer - This class is used to render any tile entities in a non-location specific major - Such as EntityItems, In minecarts, Held by entities, anyhting that isn't in world. - Switched the class names for BiomeGenForest $1 and $2 as Fernflower decompiled - them in oposite order. - - v99.99-pre-3870 Merge pull request #533 from AbrarSyed/patch-2 - Added mappings to default build.gradle - - v99.99-pre-3869 added mappings to default build.gradle - - v99.99-pre-3868 Merge pull request #1367 from bloodmc/blockplace - Added PlaceEvent and MultiPlaceEvent which fires before placing a block. - - v99.99-pre-3867 Added PlaceEvent and MultiPlaceEvent which fires before placing a block. - Before calling "ItemStack.tryPlaceItemInWorld", a recording flag is turned on for - setBlock to capture a blocksnapshot for each block that attempts to be placed. - If 1 block is captured, a "BlockEvent.PlaceEvent" is fired to notify mods. - If 2 or more blocks are captured, a "BlockEvent.PlaceEvent" is fired first with the first block - captured followed by a "BlockEvent.MultiPlaceEvent" with all captured blocks. This extra event - is required for items that have the ability to place 2 or more blocks such as a BlockBed. - If either event is cancelled, the recorded block snapshot(s), item stacksize, and item meta will - revert back to the captured snapshot(s). - If the events are not cancelled, a notification will be sent to clients and block physics will be updated. - What this means for mods is Forge will be able to capture all player block placement automatically and fire - a PlaceEvent and/or MultiPlaceEvent. - If for whatever reason your mod does not use the standard placement methods then you will need to fire the - appropriate placement events in order to notify mods/servers. - This commit also includes a new utility class called BlockSnapshot which is serializable. This new class is used in conjunction with - both PlaceEvent and MultiPlaceEvent in order to record a snapshot of block space before it is altered. This - allows us to restore the block(s) if an event is cancelled. The class also provides the ability to restore a snapshot - to any location using the restoreToLocation method. This should be helpful to many mods that are looking to be able - to capture block data then restore it to back to any location required. - - v99.99-pre-3866 Add joptsimple as a server required library. Closes #531 - - v99.99-pre-3865 Restructure block and item mapping data in world save and network to potentially expand to custom mod ID registry syncing. Tip: ONLY use those functions in GameData that are marked as public API as internal API may change in 1.8. - - v99.99-pre-3864 Merge pull request #527 from bspkrs/1.8 - Update Config Gui stuff for 1.8 - - v99.99-pre-3863 Update Config Gui stuff for 1.8 - updated mappings to snapshot 20140930 - got rid of derpy generics code - - v99.99-pre-3862 Move FML to net.minecraft.fml package. - - v99.99-pre-3861 Move vanilla trades to inner class to prevent initilizer order issues. - - v99.99-pre-3860 Preliminary network protocol re-work. vanilla clients can now connect. Further cleanup needed. - - v99.99-pre-3859 Inital 1.8 patch update. 'It compiles!' - - v99.99-pre-3858 1.8 Conf update. Uses MCPData Snapshots now. - - v99.99-pre-3857 Prevent client only commands from bleeding through to the server. - - v99.99-pre-3856 Merge branch 'new' - - v99.99-pre-3855 MinecraftForge/FML@63b64482e6dd4c3e2226ec002ceee549045c35ed Add jsr305 dev-time dependancy for Nullable/Nonnull annotations. Unneeded at runtime. - MinecraftForge/FML@5365f5ea3e90ec85552bdb7f1f1237c51b4ea493 Add IEventExceptionHandler for EventBus to allow special handeling exceptions that are fired while running an event. Events now track what 'phase' they are in during the execution process. Each EventPriority is a 'phase'. An exception is thrown if the event attempts to set its phase to a previous one. - - v99.99-pre-3854 Merge pull request #1402 from nekosune/new - Fixed Clientside GameProfile UUID being null on offline mode - - v99.99-pre-3853 Fixed Clientside GameProfile UUID being null on offline mode - - v99.99-pre-3852 Merge pull request #1395 from lawremi/rendergasfix - Fix rendering height of non-liquid fluids - - v99.99-pre-3851 Add IEventExceptionHandler for EventBus to allow special handeling exceptions that are fired while running an event. - Events now track what 'phase' they are in during the execution process. Each EventPriority is a 'phase'. - An exception is thrown if the event attempts to set its phase to a previous one. - - v99.99-pre-3850 Add jsr305 dev-time dependancy for Nullable/Nonnull annotations. Unneeded at runtime. - - v99.99-pre-3849 check for IFluidBlock (in addition to Material.liquid) when - determining render height so that non-liquids (gases) render correctly - - v99.99-pre-3848 MinecraftForge/FML@7ab69aff2e19b349e457c1b5fcab8b3b01d22af2 Clean up import - MinecraftForge/FML@c5a90bd456230b201522c268dd9bc5e80a0b57be Is vanilla possible with this mod load, side tests. - MinecraftForge/FML@cad11f3165505e6d725411a9fc2c2ee8362f5827 Allow injecting alternative container types. This is the core support code for allowing sponge plugins! - - v99.99-pre-3847 Allow injecting alternative container types. This is the core support code for allowing sponge plugins! - - v99.99-pre-3846 Is vanilla possible with this mod load, side tests. - - v99.99-pre-3845 Clean up import - - v99.99-pre-3844 Merge pull request #1390 from diesieben07/beacon-items - Added Item#isBeaconpayment - - v99.99-pre-3843 Added Item#isBeaconpayment - - v99.99-pre-3842 Modify WavefrontObject to allow '.' in group object names - Blender names objects with .001 ir .002 when separating vertices or duplicating objects and the importer would crash on them. This fixes the regex to allow dots in the name. - - v99.99-pre-3841 MinecraftForge/FML@dc02d56195606d3ba2f1c5036fc8c0ddb67c843f Fix derp with ModType annotation. mods should load again now.. - - v99.99-pre-3840 Fix derp with ModType annotation. mods should load again now.. - - v99.99-pre-3839 MinecraftForge/FML@4ce3e73bfe36c02b10f504f93eff1bc94d640e32 Add overloaded version of SimpleNetworkWrapper#registerMessage that takes the MessageHandler instance directly, allowing to specify the same handler for multiple messages. - MinecraftForge/FML@cbe2ccbda461ec0ecf4d776fcd19ab31930cc3f1 Add in ModType to the jar manifest. If it's present, and doesn't have value "FML" it will be skipped from the modloading cycle. This should let liteloader mods have a .jar extension. - MinecraftForge/FML@37cf0174fc62a842d132b2c2cc31e477acfba205 OK, lets make that a csv list. It'll let you be liteloader and fml in one jar file! - MinecraftForge/FML@0475b15eb1a7c35bf4959f1af40606e6ee8a9d03 Change the mods and modListFile argument handling a bit. Other tweakers will get a chance at looking at them now - they're only removed right before launch. - MinecraftForge/FML@abeac06a2e9bf8825b058fa35291165b4d1f1fb3 Two new features. ModLists can have a "parent" mod list. Circularity will result in a crash, so be careful. Mods specified in a child will override ones from a parent (using the maven group:name:classifier triple to identify - ignoring the version component) - MinecraftForge/FML@7fcfedcfef9b5fd85cd1c17aa2013fca1bacd871 Canonicalized file paths in modListFile handling with the minecraftDirectory. - MinecraftForge/FML@633fce19d4b367aed56d79e916f17296842f675c Make Keyevent also fire for key releases - MinecraftForge/FML@57ba2339b630afa22c0fdf060bf28edbf7b34d0f Merge branch 'keyup-event' of github.com:diesieben07/FML - MinecraftForge/FML@1ff048062c7f122731619258a9e5a68a6111d5dd Merge branch 'simple-netw-improve' of github.com:diesieben07/FML - - v99.99-pre-3838 Merge branch 'simple-netw-improve' of github.com:diesieben07/FML - - v99.99-pre-3837 Merge branch 'keyup-event' of github.com:diesieben07/FML - - v99.99-pre-3836 Make Keyevent also fire for key releases - - v99.99-pre-3835 Canonicalized file paths in modListFile handling with the minecraftDirectory. - - v99.99-pre-3834 Two new features. ModLists can have a "parent" mod list. Circularity will - result in a crash, so be careful. Mods specified in a child will override - ones from a parent (using the maven group:name:classifier triple to identify - - ignoring the version component) - Finally, ModSide is now doable in MANIFEST.MF. If you have this, it can tell - a mod to only load on a client, or on a dedicated server (though I'd watch out - before using the dediserver one, you'll never load in integrated servers then). - The default value is BOTH, which means you'll load both sides, other values are - CLIENT and SERVER, obviously. Perhaps, also, CAULDRON might be possible? - - v99.99-pre-3833 Change the mods and modListFile argument handling a bit. Other tweakers will get a chance at looking - at them now - they're only removed right before launch. - - v99.99-pre-3832 OK, lets make that a csv list. It'll let you be liteloader and fml in one jar file! - - v99.99-pre-3831 Add in ModType to the jar manifest. If it's present, and doesn't have value "FML" - it will be skipped from the modloading cycle. This should let liteloader mods have a .jar extension. - - v99.99-pre-3830 GIANT FML UPDATE! Bump forge revision number, and fix patches for ItemStack changes. More to come on this branch I expect. - MinecraftForge/FML@7c5cf219042581545b6073de4e947448ffa10879 Implement STDOUT/STDERR redirection. - MinecraftForge/FML@bc78e31cb7ad4eda6e5faa173cd6b21e70a2c444 added support for \n in tooltip strings added \n test tooltip localization fixed int/double conversion error in slider entry added test slider scenario that highlighted conversion error - MinecraftForge/FML@a2908e5c596bb5502bf455d468d2b1ead0520f55 Clean up a bunch of compiler warnings. - MinecraftForge/FML@7f67523d870ae150071c67b002597542eb206725 Update realms to 1.3.2 - MinecraftForge/FML@73f23c24b85240458f352f248e885684aaff4743 Merge branch 'std-redir' of github.com:Emberwalker/FML - MinecraftForge/FML@1c6b25df740a64c94d9ba05dd7e4412515abf5bb If an IO exception comes from the datawatcher, spew it all over the console don't discard it silently. Should stop pixelmon blaming forge for their mistakes. - MinecraftForge/FML@e77da9eb2f5c58a494ed100dd4c1dd1a0c341dbf And fix the read side too, incase someone is trying to bitbang and failing. - MinecraftForge/FML@305d8950c9332c7a7f290db05e6f18ef328016e2 Make LogContext optional. This can be useful for debugging mod issues, but Apache's implementation in log4j2 is responsible for a very significant % of the overall runtime. Quite frankly this is shockingly bad performance from what is supposed to be a high performance logging framework. Anyway, until we can figure out if we can fix it, we're turning it off by default. - MinecraftForge/FML@bdfca1c8ed463a6053526c7a46a990007711e3d0 Make more noise when people screw up mod downloading and put .jar.zip in their mod folders. - MinecraftForge/FML@21084941127fc882d9968316a8f0669531e484df Add a custom version range factory method. Should hush skyboy's complaints. Closes #486 - MinecraftForge/FML@7c1e6aaa40704001231e602ceaedfa21a5df1edf Add a delegate to every item and block. this should help with renaming fun stuffs. Also, fix all the tabs from my previous commits. *sigh* - MinecraftForge/FML@61fcb4df06dc968fcc31d3e4e524e574acfdbb3b Tweak Itemstack patch to always delegate to the method call. Set the field, so it's in sync. - MinecraftForge/FML@eb8c5ab146f2eb3ad3833d40607da97831278ffb Fix nested directory for language resources. Closes MinecraftForge#1264 - MinecraftForge/FML@7c05e5f70d5387512d0bee33ef99510ee5aac739 Default collections, so that we don't crash if useDependencyInfo is true. Closes #485 - MinecraftForge/FML@9729fe23326a3d4f6b03e60b5cdaf78a484b3657 Kill net.minecraft.src warning. It hasn't served a purpose in a long time now. Closes #313 - MinecraftForge/FML@21e875ef22eef6068ccd6df1bd71cf58cba48eed AllowPlayerLogins only after the server has completed the core init tasks. Closes #372 - MinecraftForge/FML@46cfeade80ae60ad2d8cdb40c5fdfdaeeaf16d00 Add a constructor to CustomModLoadingDisplayException. Closes #387 - MinecraftForge/FML@a6eab2683a15a0cceca7a0ded6095b746cdd017b Update README.txt - MinecraftForge/FML@f75838461cf6d9c5010cbfd2d9ef5ceec03268d7 Last part is the itemstack transformer. Itemstacks should now only be loosely coupled with the items within. - MinecraftForge/FML@51f24e9e6d1bee371cf23cdfd0071de7c5175417 First draft of add alias. It is probably not properly persistent atm. - MinecraftForge/FML@2a4c6424709b20ce1e9bda0d85ce7fac47d157c2 Finally fix stupid NPE error caused by FML trying to parse the super of Object in IDEA envs. - MinecraftForge/FML@c1b1417ee168523154a0edae68c3180814eab1c7 FML now supports passing a json formatted modlist as an argument, as well as a comma separated argument list. These facilitate modpacks mostly, by meaning you don't need to duplicate mods. The modlist is arranged in the maven style, with mods referenced maven-like. - MinecraftForge/FML@3d42cda2a2cf5b24e7a25537d883260857b2107a Build.Gradle Patch - MinecraftForge/FML@20c7add8455cd16a4551ed13336a9ad4f9770cd1 Merge pull request #484 from bspkrs/master - MinecraftForge/FML@26ed4b992eb6341d52d12fb6735415ab8e3c501d Clear button list on FML fatal error screens. The hidden cancel button should not be there. Closes #497 - MinecraftForge/FML@ebe4f5c5e297d5d59ce57138810627a9c7a1b412 Merge pull request #494 from AntonBoch1244/patch-1 - MinecraftForge/FML@ad0da05f5c78d7f3c35a331e993dd6e679fc7ac9 Fix the ItemStack transformer to find the method and field so it works with srg and mcp naming. - MinecraftForge/FML@65d380181a84d35a78791e1bc3c7712cd90506f6 Extend timeout for client to 5 seconds. Should fix Forge #1322 - MinecraftForge/FML@45486a0b6dfca65c4d1dd23176d4c9d13d46b6f5 Fix almost invisible NPE in TerminalTransformer when loading a non-existant class - MinecraftForge/FML@13da3efce07653732971837709ccf4de7e4c5c8e Allow a clean way to exit the game without big ugly warnings, but with logging information available if needed. Closes #496 - MinecraftForge/FML@fda305edfea15ba2015cede72327703f273f74e3 Some more tidying up of the exit handling - MinecraftForge/FML@b087f60c3379d0767247e51cbc3f7c631fe97a08 More cleanup of exit handling, also add a couple more noise classes to the list of things ignored. - MinecraftForge/FML@d6358a466b4614cfc35b403d756fe3ef550ebf50 Cleanup override warnings - MinecraftForge/FML@af7a58b9e50dbacf63cf4b5009abc52301609e1f Update to legacylauncher 1.10 and asm 5.0.3 - MinecraftForge/FML@e6d00440a612c235013f3f92f1756811139a6de0 ItemStack swapping - MinecraftForge/FML@8597e45a0e417948db483006aa54e899f28b05ac Fix NPE from a boolean - MinecraftForge/FML@b9b9daa8a9d1cac8550561f31f118589abc0c30a Fix ups from feedback. - MinecraftForge/FML@d89165021f33fbffb4563d86b30bd261506c6ea6 Mark the promise a success in the outbound handler. - MinecraftForge/FML@2e5ccf7988385d38b964c615776f23a1718f5c27 Update for launchwrapper 1.11. Fixes java 6 compatibility. - MinecraftForge/FML@641250d8536bad3af5a036b70dae94097176b420 Fix java 8u20. Closes #501 and a bunch of other bugs too. - MinecraftForge/FML@292be72639feded03ced26d9a06a98159f7a95b7 Allow client handshake to be reset by server to support BungeeCord. - MinecraftForge/FML@092873fbe5baaee53bee67d26d2fc6d3d003f095 Merge branch 'bungeecord' of github.com:bloodmc/FML - MinecraftForge/FML@134f2f8e8865a91292386a3738bb45bad0477a4b Fix bug with entityspawn - if the entity doesn't extend livingbase, it fails to write a headyaw byte, and everything will be derped for that packet. - MinecraftForge/FML@4852de81e02e2b6c6d006abe20d8497499fdf51f Wrap the server description box a little bit shorter. Stops the overlapping. Closes #489 - - v99.99-pre-3829 Wrap the server description box a little bit shorter. Stops the overlapping. Closes #489 - - v99.99-pre-3828 Fix bug with entityspawn - if the entity doesn't extend livingbase, it fails - to write a headyaw byte, and everything will be derped for that packet. - Fixes #499, but probably a bunch of others. - - v99.99-pre-3827 Merge branch 'bungeecord' of github.com:bloodmc/FML - - v99.99-pre-3826 Fixed biome weights not working with non multiples of 10 - - v99.99-pre-3825 Allow client handshake to be reset by server to support BungeeCord. - - v99.99-pre-3824 Fix java 8u20. Closes #501 and a bunch of other bugs too. - - v99.99-pre-3823 Update for launchwrapper 1.11. Fixes java 6 compatibility. - - v99.99-pre-3822 Mark the promise a success in the outbound handler. - - v99.99-pre-3821 Fix ups from feedback. - - v99.99-pre-3820 Merge pull request #1300 from zlyfire/patch-1 - Update README.txt - - v99.99-pre-3819 Fix NPE from a boolean - - v99.99-pre-3818 ItemStack swapping - - v99.99-pre-3817 Fix Stained Glass pane rendering issues - - v99.99-pre-3816 Update to legacylauncher 1.10 and asm 5.0.3 - - v99.99-pre-3815 Cleanup override warnings - - v99.99-pre-3814 More cleanup of exit handling, also add a couple more noise classes to the list of things ignored. - - v99.99-pre-3813 Some more tidying up of the exit handling - - v99.99-pre-3812 Merge pull request #1330 from bonii-xx/master - Write the correct default value for StringList comments in the config - - v99.99-pre-3811 Allow a clean way to exit the game without big ugly warnings, but with logging information available if needed. Closes #496 - - v99.99-pre-3810 Fix almost invisible NPE in TerminalTransformer when loading a non-existant class - - v99.99-pre-3809 Write the correct default value for StringList comments in the config - - v99.99-pre-3808 Fix AIOOB in BiomeDictionary. Closes #1326 - - v99.99-pre-3807 Extend timeout for client to 5 seconds. Should fix Forge #1322 - - v99.99-pre-3806 Attempt to properly resolve this daft metadata and TE nonsense. This might be mod impacting, if you maintain a reference to a TE via neighbour update calls - you - might see two TEs for a single setblock where previously you saw one. This is a phantom TE being created by badly written neighbour triggers - I'm looking at you - redstone. - Anyway, with luck, this'll close a slew of bugs across Forge, IC2, MFR, TE, RC. Yeah, fun times. Thanks to LexManos, skyboy and KingLemming for helping figure this - issue out. Quite frankly, from now on, issues with phantom TEs will be mods behaving badly. Modders will need to adapt. - - v99.99-pre-3805 Fix the ItemStack transformer to find the method and field so it works with srg and mcp naming. - - v99.99-pre-3804 Fix invalid math in GuiContainerCreative. - - v99.99-pre-3803 Merge pull request #494 from AntonBoch1244/patch-1 - Build.Gradle Patch - - v99.99-pre-3802 Merge pull request #1316 from GUIpsp/master - Add ItemStack sensitive version of getItemEnchantability - - v99.99-pre-3801 Add ItemStack sensitive version of getItemEnchantability - - v99.99-pre-3800 Clear button list on FML fatal error screens. The hidden cancel button should not be - there. - Closes #497 - - v99.99-pre-3799 Add ability for creative tabs that have search bars to customize the text box's width, and prevent the default set of enchanted books from being displayed in those tabs. Closes #1303 Closes #1301 - - v99.99-pre-3798 Merge pull request #1187 from Abastro/skylight - Skylight Hooks for Minecraft Forge - - v99.99-pre-3797 Skylight Hooks for Minecraft Forge - Mainly for solar/lunar eclipse. - - v99.99-pre-3796 Merge pull request #1217 from Glassmaker/patch-1 - Adds getLocalizedName and getUnlocalizedName to FluidStack - - v99.99-pre-3795 Merge pull request #484 from bspkrs/master - Added support for \n in GuiConfig tooltip strings + a slider fix - - v99.99-pre-3794 Update README.txt - Add in reference to running setupDecompWorkspace to get decompiled classes - - v99.99-pre-3793 Merge pull request #1297 from ShetiPhian/patch-1 - Legacy Liquid Load Fix - - v99.99-pre-3792 Legacy Liquid Load Fix - nbt.getString("FluidName") no longer returns null, it returns an empty string. - This patch allows legacy liquids to be resolved once again. - - v99.99-pre-3791 Fix metadata for every permutation -.- Closes #1294 - - v99.99-pre-3790 Fix patch screwup in Skyboy's Fishing PR -.- - - v99.99-pre-3789 Merge pull request #1296 from Vazkii/patch-3 - Fixed items with more than 2 render passes rendering wrong in first person - - v99.99-pre-3788 Fixed items with more than 2 render passes rendering weird in first person - - v99.99-pre-3787 Build.Gradle Patch - Changing assetDir to runDir and set runDir to "eclipse" - - v99.99-pre-3786 Merge pull request #1292 from DemoXinMC/master - New PlayerRepairEvent and AnvilUpdateEvent - - v99.99-pre-3785 * Added AT for ContainerRepair.stackSizeToBeUsedInRepair (Now public) - * Added ability to AnvilUpdateEvent to alter stackSizeToBeUsedInRepair (vanilla behavior is now reproducable) - * Added AnvilRepairEvent, fired when the player removes an ItemStack from the output slot of ContainerRepair, and allows the chance to damage the anvil to be altered. - - v99.99-pre-3784 Merge pull request #1288 from skyboy/master - Add EntityFishHook AT - - v99.99-pre-3783 Add EntityFishHook AT - - v99.99-pre-3782 Merge pull request #1128 from skyboy/patch-fishingapi - Add API for fishing results, I'm tired of this, If shit breaks, Blame Skyboy and King_Lemming. - - v99.99-pre-3781 Merge pull request #1272 from rwtema/master - Fixed ItemFluidContainer always draining the maximum amount, regardless ... - - v99.99-pre-3780 Closes #1280 - - v99.99-pre-3779 Fixed bug that allowed duplication of Fluids with redstone dust. Closes #1279 - - v99.99-pre-3778 FML now supports passing a json formatted modlist as an argument, as well as a comma separated argument list. - These facilitate modpacks mostly, by meaning you don't need to duplicate mods. The modlist is arranged in the - maven style, with mods referenced maven-like. - - v99.99-pre-3777 Finally fix stupid NPE error caused by FML trying to parse the super of Object in IDEA envs. - - v99.99-pre-3776 First draft of add alias. It is probably not properly persistent atm. - - v99.99-pre-3775 Last part is the itemstack transformer. Itemstacks should now only be loosely coupled with the items within. - - v99.99-pre-3774 Fixed ItemFluidContainer always draining the maximum amount, regardless of the amount remaining. - - v99.99-pre-3773 Update README.txt - - v99.99-pre-3772 Add a constructor to CustomModLoadingDisplayException. Closes #387 - - v99.99-pre-3771 AllowPlayerLogins only after the server has completed the core init tasks. Closes #372 - - v99.99-pre-3770 Kill net.minecraft.src warning. It hasn't served a purpose in a long time now. Closes #313 - - v99.99-pre-3769 Default collections, so that we don't crash if useDependencyInfo is true. Closes #485 - - v99.99-pre-3768 Fix nested directory for language resources. Closes MinecraftForge#1264 - - v99.99-pre-3767 Tweak Itemstack patch to always delegate to the method call. Set the field, so it's in sync. - - v99.99-pre-3766 Add a delegate to every item and block. this should help with renaming fun stuffs. Also, fix all the tabs from my previous commits. *sigh* - - v99.99-pre-3765 Merge pull request #1263 from Zarathul/master - Added drainFluidContainer() and getContainerCapacity() helper methods to FluidContainerRegistry. - - v99.99-pre-3764 Add a custom version range factory method. Should hush skyboy's complaints. Closes #486 - - v99.99-pre-3763 Make more noise when people screw up mod downloading and put .jar.zip in their mod folders. - - v99.99-pre-3762 - Added drainFluidContainer() and getContainerCapacity() helper methods. - - v99.99-pre-3761 Make LogContext optional. This can be useful for debugging mod issues, but - Apache's implementation in log4j2 is responsible for a very significant % of - the overall runtime. Quite frankly this is shockingly bad performance from - what is supposed to be a high performance logging framework. Anyway, until we - can figure out if we can fix it, we're turning it off by default. - - v99.99-pre-3760 And fix the read side too, incase someone is trying to bitbang and failing. - - v99.99-pre-3759 If an IO exception comes from the datawatcher, spew it all over the console - don't discard it silently. Should stop pixelmon blaming forge for their mistakes. - - v99.99-pre-3758 Merge branch 'std-redir' of github.com:Emberwalker/FML - - v99.99-pre-3757 Update realms to 1.3.2 - - v99.99-pre-3756 Clean up a bunch of compiler warnings. - - v99.99-pre-3755 Merge pull request #1254 from Adubbz/master - Added a RenderFogEvent - - v99.99-pre-3754 Added an event for fog rendering - - v99.99-pre-3753 Update FishingHooks - - v99.99-pre-3752 MinecraftForge/FML@3231db9376766d619f942b6a526718daa3c68038 Sorta revert 908491d5e7ac26becdac938f38cc90d6b9d73ce1 but merge assets into the map, rather than force overwriting. Fixes skyboy's comment. - - v99.99-pre-3751 Revert old light amortization patch. It seems to be breaking chunk sending pretty badly when more - than a couple of people are online. Tests indicate it is not useful anymore. - - v99.99-pre-3750 added support for \n in tooltip strings - added \n test tooltip localization - fixed int/double conversion error in slider entry - added test slider scenario that highlighted conversion error - - v99.99-pre-3749 Add FishingHooks - - v99.99-pre-3748 Sorta revert 908491d5e7ac26becdac938f38cc90d6b9d73ce1 but merge assets - into the map, rather than force overwriting. Fixes skyboy's comment. - - v99.99-pre-3747 Updated FML: - MinecraftForge/FML@53887ac59cec8f747e21fd251f94d5a438a69114 Hacky interm solution to #1207 to buy me time to re-write FML's network protocol. - - v99.99-pre-3746 Hacky interm solution to #475 to buy me time to re-write FML's network protocol. - - v99.99-pre-3745 Made skulls respect Block.isReplaceable when placing, also prevented them from deleting blocks when placed at certain angels. Closes #1233 - - v99.99-pre-3744 Fixed NPE that happens sometimes when exiting the game witout fully loading a world {main a dev-time thing} - - v99.99-pre-3743 Updated FML: - MinecraftForge/FML@9d40b761974f10ec2b5868a992260792f8a98e5d Don't scan ObjectHolders if there was an error already, derpitude will ensure. - MinecraftForge/FML@76538c1781d6d6a1e4134fb317af99e6f13b46cc Add a terminal transformer and tweaker. - MinecraftForge/FML@aec9228845e50107112bd1f8693f9b4729694c8b Add ExitVisitor to the TerminalTransformer that finds and intercepts any calls to Runtime.exit or System.exit. - MinecraftForge/FML@908491d5e7ac26becdac938f38cc90d6b9d73ce1 Move LaunguageRegistry call above normal asset loading to allow resource packs to override mod's language systems. - MinecraftForge/FML@d13295e28113a1c310d5bbb90ebfe241fefabe02 Fix FMLAT manifest AccessTransformers, class loader fun! - - v99.99-pre-3742 Merge pull request #1235 from darkhax/master - Changed exception message for duplicate enchantment ids - - v99.99-pre-3741 Changed exception message for duplicate enchantment ids to contain the - class path for both enchantments along with the enchantmnet id that has - been duplicated. - - v99.99-pre-3740 Fix FMLAT manifest AccessTransformers, class loader fun! Closes #477 - - v99.99-pre-3739 Merge pull request #1232 from bspkrs/patch-3 - Fixed missing assignment of constructor arg (thanks @Lunatrius) - - v99.99-pre-3738 Fixed missing assignment of constructor arg (thanks @Lunatrius) - I must have edited this out when I was cleaning up my formatting commit spam. - - v99.99-pre-3737 Merge pull request #1226 from williewillus/xporb - Fix experience orbs spawning at 32x coordinates clientside - - v99.99-pre-3736 Fix comment derp (+1 squashed commits) - Squashed commits: - [52c40bc] Fix experience orbs spawning at 32x coordinates clientside - Add // FORGE comment - Add // FORGE comment to clarify the purpose of the change - - v99.99-pre-3735 Move LaunguageRegistry call above normal asset loading to allow resource packs to override mod's language systems. - - v99.99-pre-3734 Merge pull request #1225 from williewillus/master - Fix chat opacity - - v99.99-pre-3733 Fix chat opacity - Add // FORGE comment - As per convention, add // FORGE comment to clarify the purpose of the change - - v99.99-pre-3732 Add ExitVisitor to the TerminalTransformer that finds and intercepts any calls to Runtime.exit or System.exit. - - v99.99-pre-3731 Add a terminal transformer and tweaker. - - v99.99-pre-3730 Don't scan ObjectHolders if there was an error already, derpitude will ensure. - - v99.99-pre-3729 Updated FML: - MinecraftForge/FML@ab52901b8b47a525e2719cf280327e97bad7f91e Force preferIPv4Stack to true early in the load chain to combat netty loopback issues. - MinecraftForge/FML@11893fbbb76569417a415ae794494b8c1150a716 Add system property to skip doing world backups when game registry changes. This is SEVERLY ill-advised, if you do this DO NOT ask for any support. - MinecraftForge/FML@fdb6b34b8fc3f1e0c6beb7bfb940a01a309f1603 Update authlib and realms to latest json data. - MinecraftForge/FML@b3a74882b4d0d704d7061b9d896febb59ab0c269 added slider controls for numerics. default control is textbox, but slider can be used as a custom list entry class. fixed constructor javadocs in GuiConfig - MinecraftForge/FML@7c6d1f7568885ff677e34692ff87b1f0826dfd48 Merge pull request #468 from bspkrs/master - MinecraftForge/FML@692d955c1a5b6d0b8601ae88632ef42136d37393 Update tweaker login to use authlib. - MinecraftForge/FML@c2119eb1c1246ba37304d9e565b4430ed7056db1 Update realms library to 1.3.1, and implement network latch when connecting to Realms. Tested and working. - - v99.99-pre-3728 Update realms library to 1.3.1, and implement network latch when connecting to Realms. Tested and working. - - v99.99-pre-3727 Update tweaker login to use authlib. - - v99.99-pre-3726 Adds getLocalizedName and getUnlocalizedName to FluidStack - - v99.99-pre-3725 Add a system property for the stencil, in case config is not available.. - - v99.99-pre-3724 Merge pull request #1213 from TheCountryGamer/master - RenderBlockOverlayEvent patch - - v99.99-pre-3723 RenderBlockOverlayEvent patch - Fixes skewed XYZ parameters - - v99.99-pre-3722 Fixed Enchantment.addToBookList Closes #1160 - - v99.99-pre-3721 Add ability for modders to designate custom biome types. And remove note about automatically registering. Closes #1167 - - v99.99-pre-3720 Merge pull request #468 from bspkrs/master - Added slider controls for numerics. Default control is textbox, but slider can be used as a custom list entry class. - - v99.99-pre-3719 added slider controls for numerics. default control is textbox, but slider can be used as a custom list entry class. - fixed constructor javadocs in GuiConfig - - v99.99-pre-3718 Merge pull request #1194 from diesieben07/potion-icon - Added hook for potion inventory icons - - v99.99-pre-3717 Merge pull request #1199 from Adubbz/master - Enhanced the Biome Dictionary - - v99.99-pre-3716 Merge pull request #1163 from TheCountryGamer/master - Added RenderBlockOverlayEvent - - v99.99-pre-3715 Added World to ChunkProviderEvent.ReplaceBiomeBlocks, and exposed metadata to End and Nether generation events. Close #1201 - - v99.99-pre-3714 Enhanced the Biome Dictionary with tags based on temperature, vegetation, moisture, trees and others - - v99.99-pre-3713 Made EmeraldOre respect isReplaceableOreGen. Closes #1157 - - v99.99-pre-3712 Added RenderBlockOverlayEvent.java - Adds a Forge event which controls whether an overlay is rendered. - Overlays include: First-person fire, Block (when inside a block) - and water when a player is inside a water block. - Patched for easier manipulation of event - Fixed for Lex - To be squashed - Removed Contructor - Added block XYZ parameters - TODO, the second block overlay event’s XYZ might not be correct - - v99.99-pre-3711 Merge pull request #1200 from tterrag1098/master - Add AchievementEvent - - v99.99-pre-3710 Update authlib and realms to latest json data. - - v99.99-pre-3709 Add system property to skip doing world backups when game registry changes. This is SEVERLY ill-advised, if you do this DO NOT ask for any support. - - v99.99-pre-3708 Force preferIPv4Stack to true early in the load chain to combat netty loopback issues. - - v99.99-pre-3707 STENCIL buffer and DEPTH buffer, attempt a fix for GL errors. - - v99.99-pre-3706 Merge pull request #1210 from Ghosrec35/master - Added Javadoc comments for Forge Event documentation. - - v99.99-pre-3705 MinecraftForge/FML@ac994e178a3533aa3c2ad8359aef9e5852c27a72 Scala people test your shit. - - v99.99-pre-3704 Scala people test your shit. - - v99.99-pre-3703 Remove the BLEND enable in rendering damage bars. And exclicitly fix blend states in some GUI elements. - - v99.99-pre-3702 Added Javadoc comments for Forge Event documentation. - - v99.99-pre-3701 MinecraftForge/FML@3ee86d0f3e47249030ba2309386f9120025e95c1 updated gradle wrapper to gradle 2.0 - MinecraftForge/FML@627ae73ea655277617912df48b03288ecc79ffea Merge pull request #464 from AbrarSyed/upgradle - MinecraftForge/FML@ee38c1b3f4642c567612f88070d7f9d651994aab Fix unneeded cast causing crash in new Config GUI system. - MinecraftForge/FML@eb92c35a2fa49a0fbe35a33e31cfb58e0674f78e updated run configs for GradleStart/Server classes - MinecraftForge/FML@70dcf80410a6d12c00300c00522582ee49ac4cc8 Merge pull request #465 from AbrarSyed/upgradle - MinecraftForge/FML@0ebdbe77a2b3503db43d36aec50c98ffb8366e20 Updated Scala to latest stable - MinecraftForge/FML@ddba18e6e33a9d9c5b113b1bfc0bfc82803b2607 Merge branch 'patch-1' of github.com:Soaryn/FML into scalaupdate - MinecraftForge/FML@220a37660b2656136c634b435afee6a915fc88fe Update realms to 1.2.9 - MinecraftForge/FML@abd7d0969bed5ce3d766f52b921c2b44e8ba87d2 Merge branch 'scalaupdate' - - v99.99-pre-3700 Merge pull request #1159 from ganymedes01/master - Added FluidStack sensitive version for Fluid's localised name - - v99.99-pre-3699 Merge branch 'scalaupdate' - - v99.99-pre-3698 Update realms to 1.2.9 - - v99.99-pre-3697 Merge branch 'patch-1' of github.com:Soaryn/FML into scalaupdate - - v99.99-pre-3696 Updated Scala to latest stable - Updates the -dev portion of the json files for 1.7.10 for scala 2.11.1 - Updates the -rel portion of the json files for 1.7.10 for scala 2.11.1 - - v99.99-pre-3695 Merge pull request #465 from AbrarSyed/upgradle - fix run configs to use new GradleStart class - - v99.99-pre-3694 updated run configs for GradleStart/Server classes - - v99.99-pre-3693 Fix unneeded cast causing crash in new Config GUI system. - - v99.99-pre-3692 Add AchievementEvent - Allows modders to react to players receiving achievements, and cancel - them. - Fix indentation - More shortening - Down to one line... - Remove newline - - v99.99-pre-3691 Merge pull request #464 from AbrarSyed/upgradle - updated gradle wrapper to gradle 2.0 - - v99.99-pre-3690 updated gradle wrapper to gradle 2.0 - - v99.99-pre-3689 Merge pull request #1197 from MrIbby/patch-1 - Add RenderItemInFrameEvent - - v99.99-pre-3688 Add RenderItemInFrameEvent - - v99.99-pre-3687 Fixed issue where Fire's 'fizz' would not play for the person who extinguished the fire. - - v99.99-pre-3686 Merge pull request #1195 from iChun/patch-1 - Fixed inverted params in FogDensity use - - v99.99-pre-3685 Fixed inverted params in FogDensity use - - v99.99-pre-3684 Add config option to specify the default spawn fuzz factor for the overworld. Closes #1190 - - v99.99-pre-3683 Add config option to disable attempting to creat screen with Stencil Bits. - - v99.99-pre-3682 Added hook for custom PotionEffect rendering in the inventory - - v99.99-pre-3681 Fix creative inventory tabs not blending base don items rendered. Closes #1179 - - v99.99-pre-3680 Add overloaded version of SimpleNetworkWrapper#registerMessage that takes the MessageHandler instance directly, allowing to specify the same handler for multiple messages. - - v99.99-pre-3679 Merge pull request #1191 from bloodmc/chunkasync - Fixed wrong method call in ChunkIOProvider. - - v99.99-pre-3678 Fixed wrong method call in ChunkIOProvider. - When a chunk fails to load async, we fallback to the original sync method. - In this case, it was calling the async method twice which ended up causing - a stackoverflow. - - v99.99-pre-3677 MinecraftForge/FML@db219fb287b14fea5148ecdbf07d8ff08704c66a API is now able to "provide" and "own" itself. Useful for libraries without a Mod in them. To go along with this, you can now require an API, with a version, in your mod dependency string - - v99.99-pre-3676 API is now able to "provide" and "own" itself. Useful for libraries without a Mod in them. - To go along with this, you can now require an API, with a version, in your mod dependency string - - v99.99-pre-3675 Merge pull request #1183 from bspkrs/master - fixed dupe quotes issue with category names that require quotes when save is called more than once - - v99.99-pre-3674 fixed compounding quotes issue with category names that require quotes when save is called more than once - - v99.99-pre-3673 Update to MC 1.7.10, bump to 10.13.0 - MinecraftForge/FML@bc420dcb0b086899e2aaa218a6f5bd7e91091a90 Fix Eclipse launching attribute - MinecraftForge/FML@1e0134a1ca97a1107ebbe604e5318e6f350fe9c4 Merge pull request #455 from rumickon/feature - MinecraftForge/FML@1c5db211afc9962fedb7fd8450abc45d07807634 Update for release 1.7.10 - MinecraftForge/FML@79a0c5e55905f0f08471d026b744a563ea421236 Merge branch 'mc179' - - v99.99-pre-3672 Merge branch 'prerelease' - - v99.99-pre-3671 Merge branch 'mc179' - - v99.99-pre-3670 Update for release 1.7.10 - - v99.99-pre-3669 Fix API incompatibilities. Should mean mods will work with new config changes. - - v99.99-pre-3668 Merge pull request #455 from rumickon/feature - Fix Eclipse launching attribute - - v99.99-pre-3667 Merge pull request #1180 from luacs1998/patch-2 - Update mc version string - - v99.99-pre-3666 Update mc version string - Or was I not supposed to? - - v99.99-pre-3665 Fix API incompatibilities. Should mean mods will work with new config changes. - - v99.99-pre-3664 Fix mcp release number - - v99.99-pre-3663 Merge branch 'master' into prerelease - - v99.99-pre-3662 Merge branch 'bspkrsgui' - - v99.99-pre-3661 MinecraftForge/FML@701d98eafa4d55144b166d26030818baa9b2f680 Added config GUI system - MinecraftForge/FML@50164db5c13c85636c7fda0e13bae1fc0aedc745 Merge branch 'master' of github.com:bspkrs/FML into bspkrsgui - MinecraftForge/FML@7eb36a1481aea9f68fa46bc199195769b27d904b Merge branch 'bspkrsgui' - - v99.99-pre-3660 Merge branch 'master' of github.com:bspkrs/MinecraftForge into bspkrsgui - Conflicts: - src/main/resources/assets/forge/lang/en_US.lang - - v99.99-pre-3659 Clean patch cruft. - - v99.99-pre-3658 Fix new method with Side.CLIENT when it shouldn't have it. Closes a bunch of reports of problems. - - v99.99-pre-3657 MinecraftForge/FML@701d98eafa4d55144b166d26030818baa9b2f680 Added config GUI system - MinecraftForge/FML@50164db5c13c85636c7fda0e13bae1fc0aedc745 Merge branch 'master' of github.com:bspkrs/FML into bspkrsgui - MinecraftForge/FML@7eb36a1481aea9f68fa46bc199195769b27d904b Merge branch 'bspkrsgui' - MinecraftForge/FML@96a7e14a45404449fb72af6d2d5e1efd30003318 Merge branch 'master' into mc179 - MinecraftForge/FML@f45f18b1d71e1c1d12582faa337a19e73ed5fb18 Fix accessing guava from transformers - MinecraftForge/FML@8f7adced471951c798cfa6844b0abc176c93d19b Fix library issue. mojang auth requests newer libs, so we get them at dev time. But the mojang json doesn't refer them at runtime. So there's a lib mismatch. Fortunately all are available at mojang, so we can update the json. - - v99.99-pre-3656 Fix library issue. mojang auth requests newer libs, so we get them at dev time. But the - mojang json doesn't refer them at runtime. So there's a lib mismatch. Fortunately all are - available at mojang, so we can update the json. - - v99.99-pre-3655 Fix accessing guava from transformers - - v99.99-pre-3654 Merge branch 'master' into mc179 - - v99.99-pre-3653 Merge branch 'bspkrsgui' - - v99.99-pre-3652 Fix Eclipse launching attribute - - v99.99-pre-3651 Merge branch 'master' of github.com:bspkrs/FML into bspkrsgui - - v99.99-pre-3650 MinecraftForge/FML@5d6dc5dce37e488188d6fc468c16e8a6183a3610 Fix up other exit points. Should stop process hangs for clean exits. - MinecraftForge/FML@8a240ec3c7e4cf4c57beabdfe9bd408e57de1bdc Merge branch 'master' into mc179 - MinecraftForge/FML@0cd5ef6bb71cda1ef6add892d1247148bf1ecc15 Fix NPE when no FMLAT is defined - - v99.99-pre-3649 Fix NPE when no FMLAT is defined - - v99.99-pre-3648 Merge branch 'master' into mc179 - Conflicts: - src/main/java/cpw/mods/fml/relauncher/FMLSecurityManager.java - - v99.99-pre-3647 MinecraftForge/FML@5d6dc5dce37e488188d6fc468c16e8a6183a3610 Fix up other exit points. Should stop process hangs for clean exits. - - v99.99-pre-3646 Fix up other exit points. Should stop process hangs for clean exits. - - v99.99-pre-3645 MinecraftForge/FML@e1529845384f4935b7c11d4d36d25db51c0b9a31 Add support for mod access transformers without a coremod requirement. Use the "FMLAT" manifest attribute, with a space separate list of files that live in the 'META-INF' directory. They should conform to standard AT formatting. - - v99.99-pre-3644 Add support for mod access transformers without a coremod requirement. - Use the "FMLAT" manifest attribute, with a space separate list of files - that live in the 'META-INF' directory. They should conform to standard AT - formatting. - - v99.99-pre-3643 MinecraftForge/FML@06ab104c9ab798af6d2726e02a238211ff8124e1 Force the descriptors to the right type for the field they're referencing. Fixes the sand issue - - v99.99-pre-3642 Force the descriptors to the right type for the field they're referencing. Fixes - the sand issue - - v99.99-pre-3641 Fix flower pots not droping the items that are inside them. - - v99.99-pre-3640 Update to 1.7.10-pre4. - - v99.99-pre-3639 Null check the Item in the supplied stack as well as the stack itself. - - v99.99-pre-3638 And fix firing for single player loading. - - v99.99-pre-3637 Fix derpity derp. - - v99.99-pre-3636 Harden the security manager and make it less spammy. Clean up a bunch of deprecation warnings from guava. - - v99.99-pre-3635 remove the deprecation patches. The methods are gone now - - v99.99-pre-3634 Merge branch 'master' into mc179 - - v99.99-pre-3633 Fix server side to write properly - - v99.99-pre-3632 Pre4 update - - v99.99-pre-3631 Fire an event when a player loads or saves from disk. Mods that want to load an additional - player related file from the players dir can now do so in that event. - - v99.99-pre-3630 Some patch offsets - MinecraftForge/FML@7219061b05db73d245405ef777b412d0787398b6 Also patch in warnings for Vec3Pool - similarly removed. - MinecraftForge/FML@dff22045587b37282adeb2167486a572f51f1f16 FML now sets a security manager (FINALLY!). It's primary purpose at this point is to catch rogue calls to System.exit so that they can cause a proper crash report, rather than silently abandoning the game. - - v99.99-pre-3629 Fix up some patching bugs. Fully functional @ pre3 - - v99.99-pre-3628 Merge pull request #1164 from lumien231/Fix-DimensionCrash - Fixes a server crash caused by a player joining that is in a non existen... - - v99.99-pre-3627 Fixes a server crash caused by a player joining that is in a non existent dimension - - v99.99-pre-3626 Merge pull request #1162 from Thog92/1.7-biome - Add missing 1.7 biomes to BiomeDictionary - - v99.99-pre-3625 Add missing 1.7 biomes to BiomeDictionary - - v99.99-pre-3624 Added FluidStack sensitive version for Fluid's localised name - Would be helpful for determining names for more complex FluidStacks (with tag compounds for example) - - v99.99-pre-3623 Merge pull request #1155 from Zarathul/master - Added soft return for modders passing invalid negative ids to OreDictionary.getOreName. Warning: WILL Error in 1.8+ - - v99.99-pre-3622 Fixed ArrayIndexOutOfBoundsException in getOreName - Added sanity check to prevent ArrayIndexOutOfBoundsException in getOreName for negative ids. - - v99.99-pre-3621 FML now sets a security manager (FINALLY!). It's primary purpose at this point is to catch - rogue calls to System.exit so that they can cause a proper crash report, rather than - silently abandoning the game. - - v99.99-pre-3620 Fixed vines generation for hanging off of trees. - - v99.99-pre-3619 Also patch in warnings for Vec3Pool - similarly removed. - - v99.99-pre-3618 Merge pull request #1147 from bloodmc/chunkasync - Don't call ChunkDataEvent.Load async - - v99.99-pre-3617 Don't call ChunkDataEvent.Load async - ChunkDataEvent.Load must be called after TE's are loaded since this is - what mods expect. The event is handled by ChunkIOProvider during - callStage2. - - v99.99-pre-3616 Checking in pre3 work - - v99.99-pre-3615 Merge pull request #938 from bloodmc/chunkasync - Load chunks asynchronously for players. - - v99.99-pre-3614 Merge pull request #1125 from alucas/addmissingjumpevent - Add missing onLivingJump calls - - v99.99-pre-3613 Pop version for new Recomended build. - - v99.99-pre-3612 Load chunks asynchronously for players. - When a player triggers a chunk load via walking around or teleporting - there is no need to stop everything and get this chunk on the main thread. - The client is used to having to wait some time for this chunk and the - server doesn't immediately do anything with it except send it to the - player. At the same time chunk loading is the last major source of file IO - that still runs on the main thread. - These two facts make it possible to offload chunks loaded for this reason - to another thread. However, not all parts of chunk loading can happen off - the main thread. For this we use the new AsynchronousExecutor system to - split chunk loading in to three pieces. The first is loading data from - disk, decompressing it, and parsing it in to an NBT structure. The second - piece is creating entities and tile entities in the chunk and adding them - to the world, this is still done on the main thread. The third piece is - informing everyone who requested a chunk load that the load is finished. - For this we register callbacks and then run them on the main thread once - the previous two stages are finished. - There are still cases where a chunk is needed immediately and these will - still trigger chunk loading entirely on the main thread. The most obvious - case is plugins using the API to request a chunk load. We also must load - the chunk immediately when something in the world tries to access it. In - these cases we ignore any possibly pending or in progress chunk loading - that is happening asynchronously as we will have the chunk loaded by the - time they are finished. - The hope is that overall this system will result in less CPU time and - pauses due to blocking file IO on the main thread thus giving more - consistent performance. Testing so far has shown that this also speeds up - chunk loading client side although some of this is likely to be because - we are sending less chunks at once for the client to process. - Thanks for ammaraskar for help with the implementation of this feature. - This commit is based off the following : - Bukkit/CraftBukkit@b8fc6ab2c12e9b4c8d7b5370e44f23cc838014b2 - Bukkit/CraftBukkit@85f5776df2a9c827565e799f150ae8a197086a98 - Bukkit/CraftBukkit@0714971ca2a31bc729bdd78ded8c69ffb2284813 - Bukkit/CraftBukkit@7f49722f457dcc31f8cac8e011871ff1b7fd3306 - Bukkit/CraftBukkit@53ad0cf1abe9c060ef411a86e9a16352f3e5197e - - v99.99-pre-3611 Implement STDOUT/STDERR redirection. - These streams now redirect to log4j2, with form '[class:method:line]: Original message'. - - v99.99-pre-3610 MinecraftForge/FML@1a99ec7db612f258983c6ac685da906bf7cde0a6 Deprecate getAABBPool so people can stop using it in mods. Failure to do so will result in 1.7.10 upgrade incompatibility. Use getBoundingBox instead. - - v99.99-pre-3609 Warn when chunks are being self-recursively loaded. This can cause serious issues. Modders should watch out. - - v99.99-pre-3608 Changed dustLapis to gemLapis to make OM SHUT THE HELL UP. - - v99.99-pre-3607 Fixed missed metadata offset, and now cache return values of getOres for speed. - - v99.99-pre-3606 Add missing onLivingJump calls - - v99.99-pre-3605 Merge pull request #1126 from Cojomax99/fog_customization - World fog color and density can now be controlled through an event - - v99.99-pre-3604 World fog color and density can now be controlled through an event - - v99.99-pre-3603 Merge pull request #1134 from diesieben07/ender-teleport - Fix EnderTeleportEvent for Ender Pearls. - - v99.99-pre-3602 Fixed inverted player parameters in PlayerEvent.Clone, Closes #1142 Closes #1140 - - v99.99-pre-3601 Changed EntityWolf to EntityTameable in EntityLivingBase.attackEntityFrom, to allow for more custom pets. Closes #1141 - - v99.99-pre-3600 Rework OreDictionary's internals to be a bit more speedy to help combat modders using it inapropriatly. Closes #1022 Closes #1131 - - v99.99-pre-3599 Deprecate getAABBPool so people can stop using it in mods. Failure to do so will result in 1.7.10 upgrade incompatibility. Use getBoundingBox instead. - - v99.99-pre-3598 Tweak bad packet warning some. Makes it a bit more log friendly. - - v99.99-pre-3597 Fix not being able to change target & attackDamage for EnderTeleportEvent. - - v99.99-pre-3596 MinecraftForge/FML@e3ce211cc798f4d86ca6f974d9ba8b4e389b4dc9 Nullcheck the dispatchers on players. Should stop some crashes when spamming connectivity. - MinecraftForge/FML@480bf2c1d078038bb59c4254a01a5af685c7cb22 Fix REPLY handling in SimpleNetworkWrapper. Closes #440 - - v99.99-pre-3595 Fix REPLY handling in SimpleNetworkWrapper. Closes #440 - - v99.99-pre-3594 Fix inverted parameters in OreDictionary.getOreID Closes #1123 - -.- Closes #1120 - - v99.99-pre-3593 Added support for new FML config GUI classes - refactored lots of stuff based on comments - added Configuration.load() exception handling and logging - - v99.99-pre-3592 Added config GUI system - - v99.99-pre-3591 Merge branch 'master' into mc179 - - v99.99-pre-3590 Nullcheck the dispatchers on players. Should stop some crashes when spamming connectivity. - - v99.99-pre-3589 Merge pull request #1034 from Adubbz/master - Greatly simplified the addition of new biomes to the default world. If this breaks things blame Adubbz. - - v99.99-pre-3588 Added Noteblock change and play events. Closes #1027 #1025 - - v99.99-pre-3587 Add target world to PlayerInteractEvent for potential 'cross dimension' interaction such as LittleBlocks. Closes #1071 - - v99.99-pre-3586 Add a couple of localizations to Forge added strings. Closes #1068 - - v99.99-pre-3585 Merge pull request #1095 from rwtema/master - Fixed setBlock not using the location version of getLightOpacity() - - v99.99-pre-3584 Filter all vanilla blocks that we missed through Forge's getDrops and BlockDrops events. As well as implemented IShearable for DoublePlants and DeadBushes. Mojang really should generic out some of this stuff instead of repeating logic all over the place! - - v99.99-pre-3583 Add comment to RotationHelper telling modders where to actually look, closes #1115 - - v99.99-pre-3582 Fixed GuiContainer calling button.mouseReleased. Closes #1116 - - v99.99-pre-3581 Fix patch fuzz - - v99.99-pre-3580 MinecraftForge/FML@585d3a91e15213da20fb1669b81cc6563ab4e780 If a packet is not handled by the channel, log it, and clear it. Could be spammy, but this is a serious bug and could cause a memory leak otherwise. - MinecraftForge/FML@cd715efca14604cd8c7b1bdb54c0796202d55e69 Log the queue as well - - v99.99-pre-3579 Merge pull request #1112 from diesieben07/entity-tracking - Add PlayerEvent.StartTracking and .StopTracking - - v99.99-pre-3578 Add PlayerEvent.StartTracking and .StopTracking & make trackedEntityIDs visible - & Update, as discussed on IRC (squash) - - v99.99-pre-3577 Merge pull request #1109 from Open-Code-Developers/finite-patch - Make finite fluid blocks drainable - - v99.99-pre-3576 Fix enum helpers for EnumRarity {moved to Commn and changed paramter} and EnumCreatureType {new parameter} and added junit test for them. Closes #1009 - - v99.99-pre-3575 Log the queue as well - - v99.99-pre-3574 If a packet is not handled by the channel, log it, and clear it. - Could be spammy, but this is a serious bug and could cause a memory leak - otherwise. - - v99.99-pre-3573 MinecraftForge/FML@1d41aa978d41267e4040ec449e10f49a20edd4fa Fix the side for the compatibility check. Should result in green ticks finally! - - v99.99-pre-3572 Fix the side for the compatibility check. Should result in green ticks finally! - - v99.99-pre-3571 Change IShearable JavaDoc by one line so Anti would shut up. Closes #1054 - - v99.99-pre-3570 MinecraftForge/FML@4512f8e5e316ddaf6a4fe35470f1f88dcdddae1a Warn when the objectholder finds nothing in the registry. Helps debug mismatched names. Also, actually make the scoping thing work with objectholder - - v99.99-pre-3569 Warn when the objectholder finds nothing in the registry. Helps debug mismatched names. - Also, actually make the scoping thing work with objectholder - Also handle Blocks.air as a special case. It should never be a valid block in the block registry. - Nothing can ever replace the default block registry block. It is disabled for replacement. - Air is properly skipped - - v99.99-pre-3568 Merge pull request #1089 from RainWarrior/render-events - Added world display list render events - - v99.99-pre-3567 Added world display list render events - - v99.99-pre-3566 Merge pull request #1103 from ganymedes01/patch-1 - Fix getOreIDs not using the wildcard value correctly - - v99.99-pre-3565 Fix getOreIDs not using the wildcard value correctly - You can see it's not working by requesting the ore IDs from lapis, and you'll see the name "dye" is missing (and that's the one registered using the wildcard). - Fixed it by inverting the order of the item stack parameters. - - v99.99-pre-3564 Prevent duplciates in registered Ores in the OreDictionary and clean up some of the code, add new function to return all ores the specified ItemStack satisfies. Closes #1102 - - v99.99-pre-3563 Merge pull request #1101 from Open-Code-Developers/master - Fix fluid blocks - - v99.99-pre-3562 Make finite fluid blocks drainable - - v99.99-pre-3561 Fix fluid blocks - For https://github.com/BuildCraft/BuildCraft/issues/1843 . - - v99.99-pre-3560 Updated FML: - MinecraftForge/FML@3aba56440aa7a95f6431efcdcb5c127ebafc8891 lastIndexOf, Note Don't code while sick. - - v99.99-pre-3559 lastIndexOf, Note Don't code while sick. - - v99.99-pre-3558 Updated FML: - MinecraftForge/FML@3a687f48b9606b4f9179d63ef0b831a25821ff8f -.- Save File First. My Bad. - - v99.99-pre-3557 -.- Save File First. My Bad. - - v99.99-pre-3556 Updated FML: - MinecraftForge/FML@c828bb63c57cb10c23d9b1c3a6934e9f9ddba37b Make AccessTransformer change INVOKESPECIAL to INVOKEVIRTUAL when making methods visible - MinecraftForge/FML@a9aa468457a1eeed3366505b93e36da654610f05 Merge pull request #431 from diesieben07/at-invokevirtual - MinecraftForge/FML@31d726abad0dec6d1b853e9adf6a01580aee2af4 Fix the null networkHandler in the MessageContext - MinecraftForge/FML@725d988e36a7b104b9f5d8ae2daf993ac12af5bd Add in the objectholder, autopopulated by FML based on simple rules. Allows for reference driven substitution of mod blocks and items based on their server running state. - MinecraftForge/FML@f07bf5cb30a20ca9f62337512e936cfefcfbf0c4 Fixed deobfusication of nested inner classes. And removed legacy ModLoader remaps. - - v99.99-pre-3555 Fixed deobfusication of nested inner classes. And removed legacy ModLoader remaps. - - v99.99-pre-3554 Add in the objectholder, autopopulated by FML based on simple rules. Allows - for reference driven substitution of mod blocks and items based on their - server running state. - - v99.99-pre-3553 Fix the null networkHandler in the MessageContext - - v99.99-pre-3552 Add Glass, Colored glass, ore storage blocks, alines, and a few others to ore dicitonary. Closes #1011 - - v99.99-pre-3551 Made WorldGenShrub respect Block.canSustainPlant, Closes #1096 - - v99.99-pre-3550 Add new PlayerEvent.Clone called when an EntityPlayer is cloned via dimension travil or respawn. - - v99.99-pre-3549 Fixed setBlock not using the location-specific version of getLightOpacity() - - v99.99-pre-3548 Merge pull request #431 from diesieben07/at-invokevirtual - Make ATs replace INVOKESPECIAL when needed - - v99.99-pre-3547 Merge pull request #1091 from Clashsoft/master - Don't render ItemStack tooltip twice - - v99.99-pre-3546 Update GuiScreen.java.patch - - v99.99-pre-3545 Make AccessTransformer change INVOKESPECIAL to INVOKEVIRTUAL when making methods visible - - v99.99-pre-3544 Merge pull request #1086 from WaDelma/master - Added amount that is being filled/drained to the FluidEvent - - v99.99-pre-3543 Fluid events now know how much fluid is moved - Added amount that is being filled/drained to the FluidEvent - Added constructors without amount to ensure backwards compability - Added deprecation to amountless constructors - - v99.99-pre-3542 Fixed Stems not droping a random number of seeds based on metadata, Closes #1087 - - v99.99-pre-3541 Merge pull request #1081 from XCompWiz/master - Bug Fixes to Biome Decoration and Chunk - - v99.99-pre-3540 Bug Fixes to Biome Decoration and Chunk - Fixes issue with biome decoration crashing on worlds with exposed void - Fixes same issue in JungleBiome decoration - Fixes forge bug in getting lighting from a block in chunk - - v99.99-pre-3539 First draft 1.7.9 support. - This is not modding minecraft. It's performing an update. Go away! - - v99.99-pre-3538 Added accessible instance to RenderBlocks and RenderItem for modders to use who don't wish to create there own instance. Warning: Other modders may influance the transient state of the instance, BE WEARY MODDERS. - - v99.99-pre-3537 Added Farmland to PLAINS type plants as that has changed in 1.7. Also made BlockTallGrass call it's super.canBlockStay to better support custom soils. Closes #1077 - - v99.99-pre-3536 In Flower Forest biome a Poppy should spawn instead of Blue Orchid Closes #1078 - - v99.99-pre-3535 MinecraftForge/FML@43e3ee1af1cab54db238dab4994076fdbe68bc6a Swap Listenerlist constructor around. Should fix parent resizing issue? - - v99.99-pre-3534 Swap Listenerlist constructor around. Should fix parent resizing issue? - - v99.99-pre-3533 MinecraftForge/FML@70570a863ffa6a3ba7e2dd30b471bb47615b8bf8 Fix up possible CME - - v99.99-pre-3532 Fix up possible CME - - v99.99-pre-3531 MinecraftForge/FML@503da3a2577a069b7847c158a27e8316c85ed852 Don't consider null NetworkDispatchers. This should fix a bunch of fakeplayer issues. - - v99.99-pre-3530 Don't consider null NetworkDispatchers. This should fix a bunch of fakeplayer issues. - Nothing to see here. No modding being done. - - v99.99-pre-3529 Fixed No Blue Orchids spawn in swamp when using bone meal Closes #1072 - - v99.99-pre-3528 Fully clear DimensionManager's DimensionID bitset when world is loaded. Closes #1074 - - v99.99-pre-3527 Fix forge validating strict versions on remote connections. - - v99.99-pre-3526 MinecraftForge/FML@a8cbef2321a8e1bdfac56476bdfb5b306f71d38b Finally hopefully fully kills the race condition causing a classcast on slow machines. - MinecraftForge/FML@8dbd1ae0a177a556d03630a059242a2ee7f45e55 Fix ObjectIntIdentityMap sporadically matching non-identical objects. - MinecraftForge/FML@42713c66e565a26e963099baa838800f250089c3 Merge pull request #426 from sfPlayer1/master - - v99.99-pre-3525 Merge pull request #426 from sfPlayer1/master - Fix ObjectIntIdentityMap sporadically matching non-identical objects. - - v99.99-pre-3524 Fix ObjectIntIdentityMap sporadically matching non-identical objects. - - v99.99-pre-3523 Finally hopefully fully kills the race condition causing a classcast - on slow machines. - This is me bugfixing. NOT MODDING! No! Stop it! I'm not! - - v99.99-pre-3522 Greatly simplified the addition of new biomes to the default world - - v99.99-pre-3521 MinecraftForge/FML@d8b6adb2598ce144568a0aaf26fa8b988c028b7c Add a helper for casting some common collection types into generic form - MinecraftForge/FML@5275cea844a6afacc0deb41d153f01c1c25bb924 Try and see if there is anything to the identityHashCode collision hypothesis. If you see this in your error messages, kindly let us know! - - v99.99-pre-3520 Try and see if there is anything to the identityHashCode collision hypothesis. If you see this in your error messages, kindly let us know! - - v99.99-pre-3519 Add a helper for casting some common collection types into generic form - - v99.99-pre-3518 Updated FML: - MinecraftForge/FML@a70308ef41f1e24074ea718f64caf75b8d6acba7 Update mcmod.info - MinecraftForge/FML@8555344eb33e4f0cc676defdb7391a24ebd5677d updated wrapper to gradle 1.12 - MinecraftForge/FML@1d5fc60f82e911c1abfbebbe781316126c02c987 Merge pull request #411 from matthewprenger/master - MinecraftForge/FML@3612ad0c25d103ba9bc81b32e8ecfef2dfc1cadc Attempt to fix another race condition related to reading NetClientHandler. - MinecraftForge/FML@c73a2076e3dd5d1f60c2fe2f589109cefa2dc6ce Fix potential rance condition in connecting to vanilla servers as well. And move latch into client side only. - MinecraftForge/FML@1436ac2f14fbdb48777c90b1b93378108c9cbf36 Fine use FMLCommonHandler. - MinecraftForge/FML@542e9acec1016c950c6f80af0c9da3190691359b documented dependencies - MinecraftForge/FML@ddc2cfbe864bd377232dbd1aa65df6e710d4639d Merge pull request #402 from AbrarSyed/patch-1 - MinecraftForge/FML@362ec8dee7ed2c291a8ed287c52eacdd80582eff Merge pull request #419 from Thog92/master - MinecraftForge/FML@b9de9ebc960bbf26e7aee570701aa4c226252fee Revert "Fix refreshResources not happening if an error occurs." - MinecraftForge/FML@738ce1d7cd5575269375066586d0a37881c536e2 Re-add removed genericiterable to clean a warning - MinecraftForge/FML@b0eb1ef7c6f4a63689898bf28f28e84d2dbae6e7 Split loadmods into loadmods and preinitmods, to allow resource loading to occur *always* between the two phases. This should fix mods not being able to access resources during preinit. - MinecraftForge/FML@de546bdf6cbeadb612cd6385bac8d54480073496 Clean up some missing generic info - MinecraftForge/FML@cd43eacbb25bc9cc0e81138844fa3aa7fd133037 Ensure that the loadcontroller is ready to preinit. - MinecraftForge/FML@f2fe80dc36972fe9db57e700380b6869abbc1832 Fixed default network mod checking to allow client side mods without the server side. Mods wishing to REQUIRE server side components must specify a custom check handler using @NetworkCheckHandler - MinecraftForge/FML@0c36868f92a3516c83ae363e13e5cb1db81236d1 Fix network disconnect with message on the client side in NetworkDispatcher. - - v99.99-pre-3517 Fix network disconnect with message on the client side in NetworkDispatcher. - - v99.99-pre-3516 Fixed default network mod checking to allow client side mods without the server side. Mods wishing to REQUIRE server side components must specify a custom check handler using @NetworkCheckHandler - - v99.99-pre-3515 Merge pull request #1064 from bspkrs/patch-2 - Fixed unforeseen NPE - - v99.99-pre-3514 Ensure that the loadcontroller is ready to preinit. - - v99.99-pre-3513 Clean up some missing generic info - PS: NOPE: still not modding. - - v99.99-pre-3512 Split loadmods into loadmods and preinitmods, to allow resource loading to occur *always* between the two phases. This should fix - mods not being able to access resources during preinit. - PS: I'm still not modding. - - v99.99-pre-3511 Fixed unforeseen NPE - - v99.99-pre-3510 Re-add removed genericiterable to clean a warning - - v99.99-pre-3509 Revert "Fix refreshResources not happening if an error occurs." - This reverts commit fff86ee9d35874bdf77a1eaabe77615441644064. - - v99.99-pre-3508 Revert "Implemented hashCode and equals in ItemStack, Closes #986" - This reverts commit 0b01545a03942abca7b7ea28030be81e2ebeaa59. - - v99.99-pre-3507 Merge pull request #419 from Thog92/master - updated wrapper to gradle 1.12 - - v99.99-pre-3506 Merge pull request #402 from AbrarSyed/patch-1 - Added dependency examples to the shipped example mod's build.gradle. - - v99.99-pre-3505 documented dependencies - - v99.99-pre-3504 Implemented hashCode and equals in ItemStack, Closes #986 - - v99.99-pre-3503 Fix extended entity properties being lost when leaving the end, This introduces the concept of calling IExtendedEntityProperties.init when entites/worlds change. Lets see if mods explode. - - v99.99-pre-3502 Fine use FMLCommonHandler. - - v99.99-pre-3501 Merge pull request #1062 from bspkrs/master - New GuiScreen events and a new ElementType DEBUG for RenderGameOverlayEvent - - v99.99-pre-3500 Fix potential rance condition in connecting to vanilla servers as well. And move latch into client side only. - - v99.99-pre-3499 New GuiScreen events and a new ElementType DEBUG for RenderGameOverlayEvent - - v99.99-pre-3498 Attempt to fix another race condition related to reading NetClientHandler. - - v99.99-pre-3497 Added new hook to WeightedRandom.getItem that allows for use of custom rnadom generators, prevents redundant code in mods. - - v99.99-pre-3496 Merge pull request #411 from matthewprenger/master - Update ExampleMod mcmod.info - - v99.99-pre-3495 Fixed hard references in WorldGenBigTree and ForgeCommand that caused worlds to leak in the client. - - v99.99-pre-3494 Updated FML: - MinecraftForge/FML@2c56c32c5aa8842cfadaf8c237396cdb75673909 Fix saving backups with the raw name. Fix air block not being assigned as the default. - MinecraftForge/FML@d0f8073fa51db7426d5ded373f3404fa60d722f0 Merge pull request #413 from sfPlayer1/master - MinecraftForge/FML@810b1f3075e6061ab189e1f6975bd77b20040d71 Clean some generic warnings up. Make a generic list handler. Helpful for others I think too. - MinecraftForge/FML@fff86ee9d35874bdf77a1eaabe77615441644064 Fix refreshResources not happening if an error occurs. - MinecraftForge/FML@76d8d0e870a4e389167634283984dc10abb08e84 Fix mod version checking - MinecraftForge/FML@b84d0760ae47832e5b1e4d50237b582b2d50d520 Fix display of mod status at the server - MinecraftForge/FML@251af1d09dfbf636e2fb3f323a5345c81cc07aea Fixed memory leak on the client caused by Netty holding references to the World. - - v99.99-pre-3493 Merge pull request #1060 from Azanor/master - Fix for Block.getExplosionResistance getting passed the wrong parameters - - v99.99-pre-3492 Fix for Block.getExplosionResistance getting passed the wrong parameters - It is being sent the x, x, y coordinates instead of x, y, z - - v99.99-pre-3491 updated wrapper to gradle 1.12 - - v99.99-pre-3490 Fixed memory leak on the client caused by Netty holding references to the World. Closes #415 #417 - - v99.99-pre-3489 Fix display of mod status at the server - - v99.99-pre-3488 Fix mod version checking - - v99.99-pre-3487 Fix refreshResources not happening if an error occurs. - - v99.99-pre-3486 Clean some generic warnings up. Make a generic list handler. Helpful for others I think too. - - v99.99-pre-3485 Merge pull request #413 from sfPlayer1/master - backup+default block use fix - - v99.99-pre-3484 Fix saving backups with the raw name. - Fix air block not being assigned as the default. - - v99.99-pre-3483 Merge pull request #1051 from Deadrik/ChunkProviderFixes - ReplaceBiomeBlocks Event changes - - v99.99-pre-3482 Adds a new ReplaceBiomeBlocks Event constructor that supplies the metadata array if applicable and updates the ChunkProviderGenerate class to pass in the metadata array. - - v99.99-pre-3481 Merge pull request #1050 from CovertJaguar/master - Flexible Rail return value was inverted between 1.6 and 1.7 - - v99.99-pre-3480 Fix issue with flexible rail return value - Between 1.6 and 1.7 the return value to BlockRailBase.isFlexibleRail() - was inverted. While this is not a huge deal and could be worked around - by simply inverting your return value, it does mean its no longer - consistent with the function name and javadocs. - - v99.99-pre-3479 Update mcmod.info - - v99.99-pre-3478 No, this is not me modding either. I'm doing this as a favour for Lex, who's a bit computerless at the minute. - MinecraftForge/FML@77c254a6d9658a38768d53425291e93557fddc85 I am not modding, I am fixing an annoyance. The MCP version has long since been 9.03. Also, the JSON from MC updated.. - MinecraftForge/FML@7f01cf549b88f8d5f4dfae7bc17d08f8c5e525c8 I'm still not modding. Player has contributed greatly to the 1.7 release of FML. He needs authorship credit. - MinecraftForge/FML@2b8d0f6680de6257583912f3159cce38ce2bf08c Fix SimpleNetworkWrapper - this is not me modding, I didn't realize it was broken until Pahimar told me. - MinecraftForge/FML@ddee7eb117a50d190d6e987d94076f53b3b6807b Fix vanilla bug causing integrated server saving from 2 threads concurrently after a crash - MinecraftForge/FML@59a5adfdb3ffdffe0df206109dd59a3d4d023afe Registry: Fix Block-before-ItemBlock allocation when loading 1.6 world saves, more validation - MinecraftForge/FML@d88b2aa0c5401c9b2b48cb451f1ab9bbee52bec1 prevent the world from getting saved twice at shutdown - MinecraftForge/FML@9b1cbab03b75fc15905c8ce02f401f48b174782c Registry: Crash earlier with conflicting name/object registrations. - MinecraftForge/FML@7ba167c500cbccc05ce5104e9b26eb6a799aaaa8 Registry: Misc tweaks - MinecraftForge/FML@78248da399c04a438586d1a5d7f36d6d752dd5c3 Registry: Treat all 1.6 entries as items. - - v99.99-pre-3477 Registry: Treat all 1.6 entries as items. - - v99.99-pre-3476 Registry: Misc tweaks - - v99.99-pre-3475 Registry: Crash earlier with conflicting name/object registrations. - - v99.99-pre-3474 prevent the world from getting saved twice at shutdown - - v99.99-pre-3473 Registry: Fix Block-before-ItemBlock allocation when loading 1.6 world saves, more validation - - v99.99-pre-3472 Fix vanilla bug causing integrated server saving from 2 threads concurrently after a crash - - v99.99-pre-3471 Fix SimpleNetworkWrapper - this is not me modding, - I didn't realize it was broken until Pahimar told me. - Put an example in the docs. - - v99.99-pre-3470 Merge pull request #1044 from bspkrs/patch-1 - Fixed typo in update checker - - v99.99-pre-3469 I'm still not modding. Player has contributed greatly to the 1.7 release of FML. He needs authorship credit. - - v99.99-pre-3468 I am not modding, I am fixing an annoyance. The MCP version has long since been 9.03. Also, the JSON from MC updated.. - - v99.99-pre-3467 get a spelling checker :P - - v99.99-pre-3466 Bump Forge version in prep for release. - - v99.99-pre-3465 Try and fix invalid framebuffer depth/stencil setup, Thanks Ivoforce. Closes #1032 - - v99.99-pre-3464 Merge pull request #1038 from planetguy32/master - Fix infinite loop in RecipeSorter - - v99.99-pre-3463 Fix infinite loop in RecipeSorter - If recipe is multiple levels of inheritance from Object and not categorized, cls=cls.getSuperclass(); needs to be repeated more than once. It must therefore be moved to inside the while loop. - - v99.99-pre-3462 Merge pull request #1029 from iChun/patch-1 - Fixes stencil buffers on platforms not supporting OpenGL 3.0 or higher. - - v99.99-pre-3461 Fixes stencil buffers on platforms not supporting OpenGL 3.0 or higher. - - v99.99-pre-3460 Small wording change in license to allow for specifc differnet licnense contributions. - Updated FML: - MinecraftForge/FML@e58562d3edfd1cd37fdc0a9e54181aed7433fdff Fix remaining issue with autoassigned Block and Item IDs overlapping. - MinecraftForge/FML@a82195772e539437911c25508168cb607659bc71 Registry: Block IDs after failing to find a mapping for them - MinecraftForge/FML@fd9389015fd5c6150155531bf1fffb38cfe9d551 Fix FMLMissingMappingsEvent.get - MinecraftForge/FML@5eebd4df718d65ac8426deba61e1ebb6ae2fde18 Registry: Implement support for remapping blocks/items to a new name. - MinecraftForge/FML@7325aa5033e7a5b5db79340777dd7a1c763315a0 Registry: cleanup, fix missing id error GUI formatting - MinecraftForge/FML@eb29d651ebda7086fe6d1f716295b087e2c17e6f Fix old 1.7 worlds with broken ID mappings - MinecraftForge/FML@6fd3c12a4a15a5cf38c421a94576a5cacd3fb7c1 Registry: allow handling missing blocks/items regardless of the mod id - MinecraftForge/FML@038fa17ad33aeba276db84ab170504fce884c1e7 Merge branch 'master' of https://github.com/MinecraftForge/FML - MinecraftForge/FML@49c623f59c440ba177adf2d76332ecee25e12236 initial attempt at a better way to ask the user in case of startup issues - MinecraftForge/FML@9be92dcfcb1c737025397c92b18ed027a6c7f4fa Registry: Complain about bogus registrations - MinecraftForge/FML@fd6d55afcc4f4c650c143ad43e09fbdc2cb9d850 Registry: Allow ignoring missing mods from the GUI, with confirm+backup - Registry: Add confirm+backup for automated corrupted id table fixup Require the user to confirm loading from a backup level.dat - MinecraftForge/FML@c47fc3b382434d435050b4ee02a02550b81f5717 Enable custom gui rendering only as required - MinecraftForge/FML@f77632df35dbf53fb31420fa86e6792f13257020 Remove unneeded entity spawn debug logging. - MinecraftForge/FML@c7adb42199a0684d8748451d39deb8326c0a2194 Registry: Repair mismatched ItemBlocks as well Fix a few misc issues - MinecraftForge/FML@c8a245a985779fd2545ee4b58a93270973aeb435 Registry: Fix debug info - MinecraftForge/FML@c8a0b72eba9265be608670424e1bd835a9d2f1e2 Registry: Complain about missing mods when repairing broken worlds Registry: Reduce console spam - MinecraftForge/FML@8e44006f432f1b36b826ff0469d99986a6051e4b Registry: Protect against putObject misuse, handle duplicate registrations better - MinecraftForge/FML@294c93212cd9f30c50b9d1a3b048a6141c45cdea Registry: Add support for registering ItemBlocks before their Blocks - MinecraftForge/FML@3b42b33b6ec4020b5032cae06760053ed135fae8 Merge pull request #400 from sfPlayer1/master - - v99.99-pre-3459 Merge pull request #400 from sfPlayer1/master - Fix various registry issues - - v99.99-pre-3458 Registry: Add support for registering ItemBlocks before their Blocks - - v99.99-pre-3457 Merge pull request #1028 from alexbegt/patch-1 - Small Fix: Held Items & Multiple Render Passes - - v99.99-pre-3456 Small Fix: Held Items & Multiple Render Passes - Passes beyond 1 now have the correct icon. - - v99.99-pre-3455 Registry: Protect against putObject misuse, handle duplicate registrations better - - v99.99-pre-3454 Registry: Complain about missing mods when repairing broken worlds - Registry: Reduce console spam - - v99.99-pre-3453 Registry: Fix debug info - - v99.99-pre-3452 Registry: Repair mismatched ItemBlocks as well - Fix a few misc issues - - v99.99-pre-3451 Fix line offset in Minecraft patch, and mix RenderPlayer looping once to many on multi-pass items. - - v99.99-pre-3450 Merge pull request #1024 from ShetiPhian/patch-1 - Add a variable for SoundCategory in PlaySoundEvent17 - - v99.99-pre-3449 Update PlaySoundEvent17.java - - v99.99-pre-3448 Remove unneeded entity spawn debug logging. - - v99.99-pre-3447 Enable custom gui rendering only as required - - v99.99-pre-3446 Finally do SoundSystem workup for 1.7, Closes #982 - - v99.99-pre-3445 Add NPE protection to GuiingameMenu.actionPerformed, Closes #961 - - v99.99-pre-3444 Update access transformer, Closes #951 and #1021 - - v99.99-pre-3443 Fix potential threading issue if FluidRegistry.loopupFluidForBlock is called from two threads at the same time before being setup. Closes #936 - - v99.99-pre-3442 Use BiomeGenBase's array size instead of hardcoding it in BiomeDictionary. Closes #871 - - v99.99-pre-3441 Add AnvilUpdateEvent which is fired when a user places a item in both input slots of a Anvil and allows modders to control the output. Closes #838 - - v99.99-pre-3440 Add ANIMALS tpe to PopulateChunkEvent.Populate Custom providers should call this function if they spawn animals curing population. Closes #790 - - v99.99-pre-3439 ItemStack sensitive version of Item.getAttributeModifiers, Closes #816 - - v99.99-pre-3438 New hook to truely seperate the display of the 'durability' bar from the current / max durability. Allowing modders to control that display easier. - - v99.99-pre-3437 Advanced Model Loader available server-side for data driven models. To be cleanuped and re-evaluated in 1.8. Closes #773 - - v99.99-pre-3436 Add position to BreakSpeed event. Closes #621 - - v99.99-pre-3435 Registry: Allow ignoring missing mods from the GUI, with confirm+backup - Registry: Add confirm+backup for automated corrupted id table fixup - Require the user to confirm loading from a backup level.dat - - v99.99-pre-3434 Registry: Complain about bogus registrations - - v99.99-pre-3433 initial attempt at a better way to ask the user in case of startup issues - - v99.99-pre-3432 Merge branch 'master' of https://github.com/MinecraftForge/FML - Conflicts: - src/main/java/cpw/mods/fml/client/FMLClientHandler.java - src/main/java/cpw/mods/fml/client/GuiModItemsMissing.java - src/main/java/cpw/mods/fml/common/FMLContainer.java - src/main/java/cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry.java - src/main/java/cpw/mods/fml/common/registry/GameData.java - - v99.99-pre-3431 Update patches for new Fixed FernFlower used in FG 1.2. - - v99.99-pre-3430 Merge pull request #1012 from AbrarSyed/master - Updated for ForgeGradle 1.2 - - v99.99-pre-3429 Update patches for Fixed FF in FG 1.2. - - v99.99-pre-3428 Registry: allow handling missing blocks/items regardless of the mod id - - v99.99-pre-3427 Fix old 1.7 worlds with broken ID mappings - - v99.99-pre-3426 fixed remaining noop patches and exc derp - - v99.99-pre-3425 updated FML to latest master - - v99.99-pre-3424 added .exe file.. fixed a bunch of patches - - v99.99-pre-3423 Registry: cleanup, fix missing id error GUI formatting - - v99.99-pre-3422 Merge pull request #392 from AbrarSyed/master - Updated to ForgeGradle 1.2 - - v99.99-pre-3421 updated wrapper to gradle 1.11 - - v99.99-pre-3420 updated example a little - - v99.99-pre-3419 updated for ForgeGradle 1.2 - - v99.99-pre-3418 COnverted patches to SRG names - - v99.99-pre-3417 Registry: Implement support for remapping blocks/items to a new name. - - v99.99-pre-3416 Fix FMLMissingMappingsEvent.get - - v99.99-pre-3415 Registry: Block IDs after failing to find a mapping for them - - v99.99-pre-3414 Fix remaining issue with autoassigned Block and Item IDs overlapping. - - v99.99-pre-3413 Update CONTRIBUTING.md - Add link to wiki page on contributing - - v99.99-pre-3412 Create CONTRIBUTING.md - Simple file (which github will show for those making PRs) containing guidelines for making PRs. - Feel free to comment if you want/need anything added. I can pull the same thing to FML too if you'd like, Lex. - - v99.99-pre-3411 updated for ForgeGradle 1.2 - - v99.99-pre-3410 Update README.txt - - v99.99-pre-3409 Fix network close events never getting called. Closes #381 #382 - - v99.99-pre-3408 Merge pull request #998 from Eurymachus/master - This correctly uses the world height less one block for placement of a door - - v99.99-pre-3407 This correctly uses the world height less one block for placement of a - Door. - Required for placing doors inside a littleblocks area. - - v99.99-pre-3406 Fix long standing deobf issue that caused announce-player-achievements property to have no effect on dedicated servers. - - v99.99-pre-3405 MinecraftForge/FML@ef07de4f65ea16e1db1467845e316cb4c7d01a1f Fix hard link to DedicatedSerever when opening a LAN connection causing stalls on connecting. - - v99.99-pre-3404 Fix hard link to DedicatedSerever when opening a LAN connection causing stalls on connecting. - - v99.99-pre-3403 -.- Both null combinations. - - v99.99-pre-3402 properly implement equals, sod off Player. - - v99.99-pre-3401 Implement simple hash based equals in Fluid ContainerKey. - - v99.99-pre-3400 Make StructureVillagePieces.Village public. - - v99.99-pre-3399 Merge pull request #995 from iChun/master - Fixes stencil bits not existing in Minecraft's framebuffer causing stencil test to not work. - - v99.99-pre-3398 Fixes stencil bits not existing in Minecraft's framebuffer causing stencil test to not work. - - v99.99-pre-3397 Updated FML: - MinecraftForge/FML@e8b60441ccca8cccdc130560b4c8bf400aebc605 Reload game settings after mod loading is finished to capture mod keybindings. Closes #378 - MinecraftForge/FML@399770e572c9177babfb65a27280253023db2d9e Kill the modEventTypes list, register anything that extends FMLEvent, Fixes MissingMappingEvent handler, and any futureevents added. - MinecraftForge/FML@b7ad532ab5eb3e00d77ffde946d25675c9f69cf7 Re-enable post initalize texture pack reloading to allow Icons to be registerd through any init phase. - - v99.99-pre-3396 Re-enable post initalize texture pack reloading to allow Icons to be registerd through any init phase. - - v99.99-pre-3395 Merge pull request #983 from DemoXinMC/master - Added Ore Dictionary entries and recipe replacements for Diamond, Emerald, Crops, Redstone, and Glowstone - - v99.99-pre-3394 Merge pull request #984 from ShetiPhian/item-renderer-fix - Small Fix: Held Items & Multiple Render Passes - - v99.99-pre-3393 * Fixed Items.glowstone to Items.glowstone_dust - - v99.99-pre-3392 Small Fix: Held Items & Multiple Render Passes - Passes beyond 1 now have the correct icon. - - v99.99-pre-3391 * Added Ore Dictionary entries and recipe replacements for Diamond, Emerald, Crops, Redstone, and Glowstone - - v99.99-pre-3390 Kill the modEventTypes list, register anything that extends FMLEvent, Fixes MissingMappingEvent handler, and any future events added. - - v99.99-pre-3389 Fixed hashcode in FluidContainerRegistry, still needs a redesign. Closes #967 - - v99.99-pre-3388 Reload game settings after mod loading is finished to capture mod keybindings. Closes #378 - - v99.99-pre-3387 Merge pull request #978 from iChun/master - Add cancelable RenderHandEvent. - - v99.99-pre-3386 Add cancelable RenderHandEvent. - - v99.99-pre-3385 Fix a typo in our tile entity fix causing it to be ineffective. - - v99.99-pre-3384 Fix items with color rendering incorrectly. - - v99.99-pre-3383 Update Forge for patch changes - MinecraftForge/FML@064b66af3d6c92b19821b88ec26cbb59577d68b4 Prevent players from logging in until server has finished starting. - MinecraftForge/FML@2aa73afa15908dadb0a033c49deb0ffefad2f265 Fix ExampleMod.java for build #1024+ - MinecraftForge/FML@c890206268da3c594d97198f5426b52ff6b8460c Try and handle removal of mods a bit better. Currently no way to allow a world which has missing blocks to load - but i have the code in place to allow it i think. - MinecraftForge/FML@995c204338cd601e118396d4b4ef8feb6e759037 Fix failing to load a world with missing mod blocks and items. There will be a way to force worlds to load when stuff is missing, but for right now, it will fail as this is "world safe". - MinecraftForge/FML@fa5f4c884272f415933329a9e914e0b7d052e31a Some argumentation - MinecraftForge/FML@45409bfa0c136078823a1aef1358396d92a269ee Prevent player dat files getting reset during disconnects. - MinecraftForge/FML@33100d6bab654a4bd59701b1ec2bf91caa3399da Merge pull request #371 from bl4ckscor3/patch-1 - MinecraftForge/FML@572d32358ab11e5916d91c4c7b9c04a70cfed2f6 Merge pull request #373 from bloodmc/master - MinecraftForge/FML@d0dd05a15c2eca9eabd308319c2ed85cb632922b FML expands S3F to support payloads up to 2 megs in size. Should be transparent - - v99.99-pre-3382 FML expands S3F to support payloads up to 2 megs in size. Should be transparent - - v99.99-pre-3381 Merge pull request #373 from bloodmc/master - Prevent player data getting reset during disconnects. - - v99.99-pre-3380 Merge pull request #371 from bl4ckscor3/patch-1 - Fix ExampleMod.java for build #1024+ - - v99.99-pre-3379 Prevent player dat files getting reset during disconnects. - Since FML nulls out the player's playerNetServerHandler during login, we need to - make sure that writePlayerData does not attempt to overwrite the player's dat file - if the player disconnects during the "Logging In" process. - - v99.99-pre-3378 Fixeed a missed -1 in SpawnerAnimals patch. Thanks Blood. - - v99.99-pre-3377 Cull FakePlayers when worlds are unloaded. - - v99.99-pre-3376 Use correct tag types when reading Forced Chunk data. Fixes ticket loading. Closes #964 - - v99.99-pre-3375 Fixed FluidContainerRegisry.contansFluid closes #845 - - v99.99-pre-3374 Some argumentation - - v99.99-pre-3373 Fix failing to load a world with missing mod blocks and items. There will be a way to force worlds to load - when stuff is missing, but for right now, it will fail as this is "world safe". - - v99.99-pre-3372 Try and handle removal of mods a bit better. Currently no way to allow a world which has missing - blocks to load - but i have the code in place to allow it i think. - - v99.99-pre-3371 Fix ExampleMod.java for build #1024+ - - v99.99-pre-3370 Fix AIOOB error with Endermen and blocks >256. Also better support for ID remapping. More to come later. - - v99.99-pre-3369 Prevent players from logging in until server has finished starting. - This improves server security as it guarantees no players will be - allowed to connect until the server has fully initialized. - - v99.99-pre-3368 Add the beginnings of a Constants class, to document/clean some of the magic numbers that are in the MC code base. - - v99.99-pre-3367 Updated FML: - MinecraftForge/FML@03fb1879d72fbd347badc140fed6c2c3191d2990 Fix obf error when right clicking a Empty Map. - MinecraftForge/FML@6bb9b8b9532b276450d03a3419e0da016aecead8 Clean up FMLEventChannel. Closes #367. - MinecraftForge/FML@b7b3450dcd123ab5df6b3693c9c2123bc3846b88 Update MCP mapping snapshot to latest crowdsourced names. - MinecraftForge/FML@8c9e8b52708bd0630303f8b5dc184ab60e2553a1 Fix isRemote, this is integral to so many parts of the code, everyone knows it by this name, People should not change it. - - v99.99-pre-3366 Fix isRemote, this is integral to so many parts of the code, everyone knows it by this name, People should not change it. - - v99.99-pre-3365 Update MCP mapping snapshot to latest crowdsourced names. - - v99.99-pre-3364 Clean up FMLEventChannel. Closes #367. - - v99.99-pre-3363 Fix obf error when right clicking a Empty Map. - - v99.99-pre-3362 Fix up the event handler so it knows it's owned by forge - - v99.99-pre-3361 Add a discriminator for fluididspacket. remove extraneous channel handler. - - v99.99-pre-3360 MinecraftForge/FML@d87822ad8519da1c808e48bcc0a1bf8eb15c0095 Bump gradle wrapper to 1.10 - MinecraftForge/FML@359ac3ca2a941d70709168fbbbc0725c861668dd Ensure we check both item and block registries when finding valid IDs. Should fix #365 - MinecraftForge/FML@cee0f0b81179d307059843f08401f8700fb3ddb2 Tweak so that writing to the context will automatically send a message back to the originator in handshakeestablished. - - v99.99-pre-3359 Tweak so that writing to the context will automatically send a message back to - the originator in handshakeestablished. - - v99.99-pre-3358 Ensure we check both item and block registries when finding valid IDs. Should fix #365 - - v99.99-pre-3357 Fixed missed parens causing trapdoors to fall off incorrectly. - - v99.99-pre-3356 Fixed issue where enchantment effects caused slight rendeirng issue. - - v99.99-pre-3355 Bump gradle wrapper to 1.10 - - v99.99-pre-3354 Uncomment aa few FluidRegistry entries. - - v99.99-pre-3353 Inital Fluid system update, untested. Still in progress. - - v99.99-pre-3352 Attempt a AIOOB error fix in tesselator when there are alot of transparent blocks in the rendering range. - - v99.99-pre-3351 Fix NPE when breaking ice. - - v99.99-pre-3350 MinecraftForge/FML@544320b8d239df4a5ee2b3a7ec331ce2ec0a2c09 Beginning of a saveinspectionhandler. - MinecraftForge/FML@ab199c5811fe2d831592601d4f77691fbf82d1b8 Try harder to find a mod container. - MinecraftForge/FML@8633d780c925ebb719c37ac52e2f3db5f9957895 And make a loud message if there isn't a modcontainer found, substitute Minecraft. In general, this can only happen for coremods not properly registering their code. Closes #363 - - v99.99-pre-3349 And make a loud message if there isn't a modcontainer found, substitute Minecraft. In general, this can only happen - for coremods not properly registering their code. Closes #363 - - v99.99-pre-3348 Try harder to find a mod container. - - v99.99-pre-3347 Fix imporerly efficient tools breaking blocks to fast. - - v99.99-pre-3346 Adds a WeatherRender in the style of SkyRender, Closes #844 - - v99.99-pre-3345 Fixed potential NPE in SlotCrafting, and added ItemStack sensitive version fo hasContainerItem. Closes #854 - - v99.99-pre-3344 Move change of metadata to immediatly after change of Block, should prevent any 'invalid' tile entities from breaking created. Reference: #897 - - v99.99-pre-3343 New PlayerUseItemEvents, Start, Stop, Tick and Finish. See PlayerUseItemEvent.java for more details. Closes #924 - - v99.99-pre-3342 Don't short circuit item icons for multiple render passes while being used. Closes #929 - - v99.99-pre-3341 Add the ability for custom records to have finer control over there sound resource location. Closes #933 - - v99.99-pre-3340 Exclude cobblestone slab recipe from ore dictification, closes #940 - - v99.99-pre-3339 Implement PlayerPickupXpEvent, fired when a player aquires XP from a EntityXPOrb. Closes #942 - - v99.99-pre-3338 Missing EntityAITasks.tasks and MapgGenStructreIO register ATs, Closes #949 - - v99.99-pre-3337 Make ItemBlock.field_150939_a public, closes #945 - - v99.99-pre-3336 Fix Furnace stopping on 63rd Item, Closes #947 - - v99.99-pre-3335 Beginning of a saveinspectionhandler. - - v99.99-pre-3334 MinecraftForge/FML@b6d95d704b65dd8232ec8ddd333de378db8fe161 Name the log files properly. fml-junk is an early startup annoyance I can't kill because log4j2. - MinecraftForge/FML@8692ca17d13eda036b5ef996ec8e8706e7707d80 Log4j2 logging context for things. This should help add context when things go wrong in mods. - MinecraftForge/FML@a7ca131a337b5f0d4fc6f438626ac2d5b7771b3c And don't spam NONE everywhere - MinecraftForge/FML@741e172ffe163f0dd3018e1474af46ef0696396a Log4j2 doesn't need debug level logging for itself anymore - - v99.99-pre-3333 Log4j2 doesn't need debug level logging for itself anymore - - v99.99-pre-3332 And don't spam NONE everywhere - - v99.99-pre-3331 Log4j2 logging context for things. This should help add context when things go wrong in mods. - - v99.99-pre-3330 Name the log files properly. fml-junk is an early startup annoyance I can't kill because log4j2. - - v99.99-pre-3329 MinecraftForge/FML@458b0620b43116c943549a0f060c7e8830c2d77a Log the bad packet in a prettier way. Also, don't show the authlib debug data in the log file. - - v99.99-pre-3328 Log the bad packet in a prettier way. Also, don't show the authlib debug data in the log file. - - v99.99-pre-3327 Add BookCloning to the recipe sorter. - - v99.99-pre-3326 MinecraftForge/FML@9a8d16b66e67691a4c83a9e1e236304e9f6d5139 Fix log4j2 config. Fix server gui to *show* logging. Fix log spamminess in the console. Fix bug in servergui that can cause deadlock. - MinecraftForge/FML@a355eecb2c14123964c6ae2402a0933d57ae9736 Add in error logging for outbound messages. Fix bug with indexedcodec NPE - MinecraftForge/FML@1c793abe0eef6846f681c9673019b0ebc49caaaf Fix derp with networkcheck - MinecraftForge/FML@675b5a07788ada17bc26a9c4f26598e77d2098cf And turn down some more logging, now we have useful logging back again.. - - v99.99-pre-3325 And turn down some more logging, now we have useful logging back again.. - - v99.99-pre-3324 Fix derp with networkcheck - - v99.99-pre-3323 Add in error logging for outbound messages. Fix bug with indexedcodec NPE - - v99.99-pre-3322 Fix log4j2 config. Fix server gui to *show* logging. Fix log spamminess in the console. Fix bug in servergui that can cause deadlock. - - v99.99-pre-3321 MinecraftForge/FML@4aa2416ce5dcd8e77761703c018d1e7d08464025 Propagate Optional method removal to trait implementation classes - MinecraftForge/FML@fc025a7b73d9b3f46ecf2257227657592f5506b5 Logging Changes - MinecraftForge/FML@f0132a6f3b47e746a1a7df3ef84f4be989f140dd changed fml log level to all - MinecraftForge/FML@f23eba4352c38fd21e04e81f3db72c6cafe65a36 put max number of FML log files to 3 - MinecraftForge/FML@449ac98b77025eba38a75d0242113fffe26a8cf9 SSP Worlds updating from 1.6 will now pop a warning message before loading, and will capture a timestamped zip file in the minecraft dir before starting to load. Allows for people to test updates. - MinecraftForge/FML@3557fe31c92ea8d76c90052f9b8b6da963300c4f Throw an exception when discriminator is not found - MinecraftForge/FML@25240457283ba40c32022c97fc982c2ff4408e46 Make NetworkEventFiringHandler sharable - MinecraftForge/FML@dfc0899ec66f87502b5727939ac2f0ad0fabf89f Merge pull request #357 from jk-5/sharable - MinecraftForge/FML@79d42fca8d6b9d73204890ef0edb9d73cf075d87 Merge pull request #355 from jk-5/errorhandling - MinecraftForge/FML@7907e16e96de21e8ba536906ae71adcf02bfa535 Add a type adapter for artifact version. Should fix #354 - MinecraftForge/FML@7ac5bddbc3c227e0ed9385904a2bd9621078e2de Allow indexed messages to validate themselves. Also, catch exceptions from an embedded channel, and cause them to close the connection. It's ugly, but it means that the client doesn't crash if it connects to a screwy bungycord that's trying a 1.6 handshake for some reason. - MinecraftForge/FML@5adacc3b336bacbe30aa06175ef80c3aac08a62a Check the mod, not it's container, in the check handler. Closes #358 - MinecraftForge/FML@3d26f28bcf3e79e1f5fe20fcf056c604487dc35b Allow connection when server is apparently offline. Might allow :NOFML circumvention though. Hmmm. Closes #359 - MinecraftForge/FML@a62374d4aceac1c4ab39b3c0bae624ccbca65b6b findBlock should now return null, not the default block, if the thing being looked for is not found. Closes #352 - MinecraftForge/FML@6a695c4348d062af50b8cf5208530fc5036eba17 Try and stop the epic channel closed spam at close time. Closes #353 - MinecraftForge/FML@35a38d7840a5d0cd842005822c4ec6a9d3b65b6a Make sidedproxy support non-public fields. Closes #344 - MinecraftForge/FML@9d2e089df692655df04315a3822f43140015f3af Merge branch 'logging' of github.com:AbrarSyed/FML into abrar-borked - MinecraftForge/FML@79b04898d43d354714e09ce7e66efb5357ebcf61 And restore suppressions. ABRAR, DON'T TIDY CODE!!!! - MinecraftForge/FML@3dfb54e066ab91e44405706233f2dfffee9add72 Merge branch 'trait-optional' of github.com:RainWarrior/FML - MinecraftForge/FML@32bb7315cc6beff84f186a33e73219cc5280821a Add in example assets dir. Closes #308 - MinecraftForge/FML@16d33d298953b41dbbe3e3b504e800f4f46a3e1b Clean up and document outbound handler a bit better. Add in dispatcher target. Closes #361 - MinecraftForge/FML@5719b9ec533b3e43213dbafcb448221884efd9e8 Fix reply handling. Make the proxy message available for subclasses of indexedcodec. Fire user events into the network event firing. - - v99.99-pre-3320 Fix reply handling. Make the proxy message available for subclasses of indexedcodec. Fire user events into the network - event firing. - - v99.99-pre-3319 Clean up and document outbound handler a bit better. Add in dispatcher target. Closes #361 - - v99.99-pre-3318 Add in example assets dir. Closes #308 - - v99.99-pre-3317 Merge branch 'trait-optional' of github.com:RainWarrior/FML - - v99.99-pre-3316 And restore suppressions. ABRAR, DON'T TIDY CODE!!!! - - v99.99-pre-3315 Merge branch 'logging' of github.com:AbrarSyed/FML into abrar-borked - - v99.99-pre-3314 Make sidedproxy support non-public fields. Closes #344 - - v99.99-pre-3313 Try and stop the epic channel closed spam at close time. Closes #353 - - v99.99-pre-3312 findBlock should now return null, not the default block, if the thing being looked for is not found. Closes #352 - - v99.99-pre-3311 Allow connection when server is apparently offline. Might allow :NOFML circumvention though. Hmmm. Closes #359 - - v99.99-pre-3310 Check the mod, not it's container, in the check handler. Closes #358 - - v99.99-pre-3309 Allow indexed messages to validate themselves. Also, catch exceptions from - an embedded channel, and cause them to close the connection. It's ugly, but - it means that the client doesn't crash if it connects to a screwy bungycord that's trying a 1.6 handshake for some reason. - - v99.99-pre-3308 Add a type adapter for artifact version. Should fix #354 - - v99.99-pre-3307 Merge pull request #355 from jk-5/errorhandling - Throw an exception when discriminator is not found - - v99.99-pre-3306 Merge pull request #357 from jk-5/sharable - Make NetworkEventFiringHandler sharable - - v99.99-pre-3305 Make NetworkEventFiringHandler sharable - Fixes #356 - - v99.99-pre-3304 Throw an exception when discriminator is not found - - v99.99-pre-3303 SSP Worlds updating from 1.6 will now pop a warning message before loading, and will capture a timestamped - zip file in the minecraft dir before starting to load. Allows for people to test updates. - - v99.99-pre-3302 put max number of FML log files to 3 - - v99.99-pre-3301 changed fml log level to all - - v99.99-pre-3300 Add support in Techne models for the TextureSize tag. Closes #856 - - v99.99-pre-3299 Fixed RenderWorldLastEvent never being called, was missed in 1.7 update. Closes #932 - - v99.99-pre-3298 Updated FML: MinecraftForge/FML@444a7d7fa1cf7fad7dda67f581fa0e3be36069b7 Move placement of single player world load hook to fix NPEs. - - v99.99-pre-3297 Move placement of single player world load hook to fix NPEs. - - v99.99-pre-3296 Fix flexible rails, Closes #944 - - v99.99-pre-3295 Updated FML: - MinecraftForge/FML@7c5d62704ac1d3e586f3bfe26265a534e5362c73 Make UniqueIdentifier final and add a hashCode. Closes #348 - MinecraftForge/FML@ff7b5845e7f6b300d413b917f57adc472a4ebcff Clean up some warnings about @Override - MinecraftForge/FML@275ccac6f14bc66b88c76b1040aa7167f995967c Fix NPE at startup - MinecraftForge/FML@2a5a8d0cd062d3feac9c4de234e3dab1ff4462e5 Fix memory leak?! - - v99.99-pre-3294 Fix warnings in Forge codebase. - - v99.99-pre-3293 Fix memory leak?! - - v99.99-pre-3292 Fix NPE at startup - - v99.99-pre-3291 Clean up some warnings about @Override - - v99.99-pre-3290 Make UniqueIdentifier final and add a hashCode. Closes #348 - Clean up language registry. It can be used to access all translations of mods on client or server. - Auto loads from assets files. - - v99.99-pre-3289 Add exception logging to forge channel handlers as well - MinecraftForge/FML@53557dcd0582e09f7f35eb3bc2fd130fba3be4a0 Put logging exception handlers on all channel inbounds. Fix problem with failure to login. Closes #350 - - v99.99-pre-3288 Put logging exception handlers on all channel inbounds. Fix problem with failure to login. Closes #350 - - v99.99-pre-3287 MinecraftForge/FML@9c96ca4402e4c231285f170281dd543bfffa191a Fire a custom packet channel registration/deregistration event, for any mods that care about that kind of thing - - v99.99-pre-3286 Fire a custom packet channel registration/deregistration event, for any mods that care about that - kind of thing - - v99.99-pre-3285 MinecraftForge/FML@e14efe786f6255a18e148c4137f560f5e2d2a38f Some fixes and tweaks - MinecraftForge/FML@c013870b1df5e63bd84d92545ebdd434db74b5d1 Merge branch 'simplenet' - MinecraftForge/FML@30882b0c1d2743afebbebc288d73f25696e0815c Clean up some warnings. Add in simple network impl - MinecraftForge/FML@9cab2ab36e7981c847e3e9ae8c3fbbb36531ba6d Add in some tests and examples for the "simple" network stuff - MinecraftForge/FML@a429e106dd00b34302ec5893e0a8fc97c8fc8019 Fix bug with SSP, and hook so we can do confirmation of world loading, as well as other things - - v99.99-pre-3284 Fix bug with SSP, and hook so we can do confirmation of world loading, as well as other things - - v99.99-pre-3283 Add in some tests and examples for the "simple" network stuff - - v99.99-pre-3282 Clean up some warnings. Add in simple network impl - - v99.99-pre-3281 MinecraftForge/FML@b362e8a2733eb3082975edfdf83c996f048b65d3 At the request of AbrarSyed. - MinecraftForge/FML@e344303ec7a5ed27c4378ff072a036df7a350902 Merge pull request #346 from Jezzadabomb338/master - MinecraftForge/FML@a4686b1261a9bad523b4efa8a36a4433a58897cc Added basic Mojang account authentication support for development time login. - MinecraftForge/FML@dd17979a2f6f02ac4a9dda09b52c96365cc5fec9 Fix bukkit connectivity issue. - - v99.99-pre-3280 Merge branch 'simplenet' - - v99.99-pre-3279 Fix bukkit connectivity issue. - - v99.99-pre-3278 Some fixes and tweaks - - v99.99-pre-3277 Updated FML: - MinecraftForge/FML@1db3daa0e82e67fc27ca3d535a09c806c1a54d67 added override toString method for getting full name. - MinecraftForge/FML@acf74a34032224a73c4c03280cafa0042c35cf5a changed the readme to reflect new setup task. - MinecraftForge/FML@96c19b35807fa078cb18b4ae50567d0360bcdb03 undid readme change - MinecraftForge/FML@a89939e57e9ff061df3d53cf1cb075b31de5de1b Merge pull request #336 from jadar/master - MinecraftForge/FML@717a8d694532bd9438eed8d9cf4b57318b2b4cfd Fix csv string vs list of strings. Thanks immibis. Closes #334 - MinecraftForge/FML@584c0f368bca1d5b0223b5b3611b366b9a00f7d7 Fix potential ordering issue, clean up some imports - MinecraftForge/FML@28293b29ea65c30fe80c49e85e2ae15a4db68933 Add in a simple(ish) event driven network handling system. Register using newEventDrivenChannel and you'll get a simple network handler that will fire events at the subscriber(s) of your choice, whenever a packet is received. You'll also get some convenience methods for sending to things. - MinecraftForge/FML@80b00dc7966d96111e2ce8643db8e0f544c2bc89 Fix openGui. Closes #342 - MinecraftForge/FML@fc69bcf2807dc2b85eb52681ba9531cb3e2f1945 Fix up privacy derp in TickEvent. Closes #343 - MinecraftForge/FML@10d056a494aac22137b644cff341a5958e8168fc Fix possible NPE derp - MinecraftForge/FML@5da6dcc7e3607e5f107f6a7d39a4b4e1eb7fb306 Divert connection through FML, so we can deny connections to servers that don't want us - - v99.99-pre-3276 Added basic Mojang account authentication support for development time login. - - v99.99-pre-3275 Merge pull request #346 from Jezzadabomb338/master - At the request of AbrarSyed. - - v99.99-pre-3274 At the request of AbrarSyed. - - v99.99-pre-3273 Divert connection through FML, so we can deny connections to servers that don't want us - - v99.99-pre-3272 Fix possible NPE derp - - v99.99-pre-3271 Fix up privacy derp in TickEvent. Closes #343 - - v99.99-pre-3270 Fix openGui. Closes #342 - - v99.99-pre-3269 Add in a simple(ish) event driven network handling system. Register using newEventDrivenChannel - and you'll get a simple network handler that will fire events at the subscriber(s) of your - choice, whenever a packet is received. You'll also get some convenience methods for sending - to things. - - v99.99-pre-3268 Fix potential ordering issue, clean up some imports - - v99.99-pre-3267 Merge pull request #926 from iChun/master - Fix erroneous position when getting player position with changed eye height. - - v99.99-pre-3266 Squash commits so Lex would stop whining. Fix erroneous position when getting player position with changed eye height. - - v99.99-pre-3265 Logging Changes - - v99.99-pre-3264 Propagate Optional method removal to trait implementation classes - - v99.99-pre-3263 Fix csv string vs list of strings. Thanks immibis. Closes #334 - - v99.99-pre-3262 Merge pull request #336 from jadar/master - added override toString method for getting full name. - - v99.99-pre-3261 Updated FML: - MinecraftForge/FML@d5bfd69e35b21f701390a8c4c4c58d7ec1fff1fc Fix problem with connecting to vanilla. SHOW what's modded and what's vanilla in the list. Hooks that make the blocking work to come - MinecraftForge/FML@dd098854b0b65b8509b8788422e02d989a991b87 Fix the keybinding array to the right one - MinecraftForge/FML@43068eb9862f280611f26f4107ff5ac2b42b08e4 Fix TargetPoint to be static - - v99.99-pre-3260 Fix TargetPoint to be static - - v99.99-pre-3259 Fix the keybinding array to the right one - - v99.99-pre-3258 Fix problem with connecting to vanilla. - SHOW what's modded and what's vanilla in the list. Hooks that make the blocking work to come - - v99.99-pre-3257 Attempt to prevent a NPE when MC renders a lot of things at once. - - v99.99-pre-3256 undid readme change - - v99.99-pre-3255 changed the readme to reflect new setup task. - - v99.99-pre-3254 added override toString method for getting full name. - - v99.99-pre-3253 Merge pull request #928 from Minalien/master - Fixed issue with forward-slashes in texture names when registering icons, fixed custom item renderer retrieval. - - v99.99-pre-3252 Fixed MinecraftForgeClient for custom Item Renderer implementations. Removed check for forward-slashes (/) in texture asset locations (but left check for backslash in place). - - v99.99-pre-3251 MinecraftForge/FML@0d810c01fab99ac491c2277097a4198518fe6c75 Mark jopt needed on the server, herp derp, blame Abrar! - - v99.99-pre-3250 Mark jopt needed on the server, herp derp, blame Abrar! - - v99.99-pre-3249 Fix DoublePlant placement, closes #921 - - v99.99-pre-3248 Deprecate BlockFire.func_149842_a, and throw exception if someone tries to set the burn properties for air. Should prevent 'The Air is on fire!' reports. - - v99.99-pre-3247 Merge pull request #919 from VeryBigBro/patch-2 - Create ru_RU.lang - - v99.99-pre-3246 Create ru_RU.lang - - v99.99-pre-3245 Updated FML: - MinecraftForge/FML@5317672631f30e1c9655f0bb28dd8b158deea2fb Add a utility method for finding the channel handler name based on type. Should fix naming weirdnesses. - MinecraftForge/FML@9de9a1553086ebeeb5d5fc0f6d96da8680e52df0 Fix stupid hardcoding derp - - v99.99-pre-3244 Fix stupid hardcoding derp - - v99.99-pre-3243 Add a utility method for finding the channel handler name based on type. Should fix naming weirdnesses. - - v99.99-pre-3242 Fixed pipeline naming issue in the ForgeNetworkHandler. - - v99.99-pre-3241 Merge pull request #882 from Vexatos/patch-2 - Create de_DE.lang - - v99.99-pre-3240 Fixed the run config for dev time server, Cloases #913 - - v99.99-pre-3239 Fix panes/iron bars not connecting correctly. Closes #904 - - v99.99-pre-3238 Models now load from resource packs - Models must now be loaded from resource packs using the standard resource pack reference. For example, to load a model named "assets/mymod/models/mymodel.obj", you would call AdvancedModelLoader.loadModel("mymod:models/mymodel.obj"); - Closes #670 - - v99.99-pre-3237 Fixing an infinite recursion case, Closes #916 - - v99.99-pre-3236 Merge pull request #915 from Adubbz/master - Made canBeReplacedByLeaves default to whether a block isn't opaque rathe... - - v99.99-pre-3235 Made canBeReplacedByLeaves default to whether a block isn't opaque rather than if it is, also uninverted the checks for canBeReplacedByLeaves in WorldGenBigMushroom, WorldGenSwamp, WorldGenTaiga1 and WorldGenTaiga2 - - v99.99-pre-3234 Fix inversion - - v99.99-pre-3233 Updated FML: - MinecraftForge/FML@6f1da6550e10164bd6c678829f111bb5de9383b6 Fix up mcpname derp in GuiScrollingList. - - v99.99-pre-3232 Fix up mcpname derp in GuiScrollingList. - - v99.99-pre-3231 Updated FML: - MinecraftForge/FML@21b13d63512ce399c82cbb6b9042eefa6dcdaacd Lots of network cleanup. Gui packets now work too! - MinecraftForge/FML@b3f98d1ee0416aa452f8611d458968afdf50775a Fix derpiness with Mods button when Realms is available - MinecraftForge/FML@cdd9d92a4f8cd199e2d8a34bb398ef32e5f1e275 Starting work on the actual GUI. Still work to do. Needs an API. - MinecraftForge/FML@ab5eb3ccfff7f9ccfd8720b23fcef3131e54d57d Fix button size for GuiModList - MinecraftForge/FML@3113138bd1377d71afe3b8290e18511bfb6e5e97 Tweak button positions. - MinecraftForge/FML@c5e29b574a315d48668ebc9189bcc497a0eae13e Avoiding redundant calls to LogManager - MinecraftForge/FML@fbc1f8f6f9effa4a538880f9fec0ce5010226d09 Config GUIs in the modlist now work. - MinecraftForge/FML@fa4f3015a0d7147cbde3edec7664e78e5bcacbb9 Added transparent background for GuiIngameModOptions as per cpw's request. May not compile due to manual de-mcp-fication. - MinecraftForge/FML@7bf119e1e54cadff690ec31a4bab93c0d1d0aad1 Fix up readmes and credits. We no longer support modloader. - MinecraftForge/FML@779cd05aa1ced720a63cc508b82e68cc6fc8daa9 Tweaks - MinecraftForge/FML@b51fb913551a5116cc3b9bb7583b1666f280c650 Merge branch 'patch-1' of github.com:airbreather/FML - - v99.99-pre-3230 Merge branch 'patch-1' of github.com:airbreather/FML - - v99.99-pre-3229 Tweaks - - v99.99-pre-3228 Fix up readmes and credits. We no longer support modloader. - - v99.99-pre-3227 Added transparent background for GuiIngameModOptions as per cpw's request. May not compile due to manual de-mcp-fication. - - v99.99-pre-3226 Config GUIs in the modlist now work. - - v99.99-pre-3225 Avoiding redundant calls to LogManager - - v99.99-pre-3224 Update de_DE.lang - - v99.99-pre-3223 Merge pull request #912 from Adubbz/master - Fixed sky colour transitions on a render distance of 16, fixed the World... - - v99.99-pre-3222 Fixed sky colour transitions on a render distance of 16, fixed the WorldGen of various things - - v99.99-pre-3221 Tweak button positions. - - v99.99-pre-3220 Fix button size for GuiModList - - v99.99-pre-3219 Starting work on the actual GUI. Still work to do. Needs an API. - - v99.99-pre-3218 Fix derpiness with Mods button when Realms is available - - v99.99-pre-3217 Lots of network cleanup. Gui packets now work too! - - v99.99-pre-3216 Merge pull request #908 from jk-5/patch-1 - Add constructors to DimensionRegisterMessage - - v99.99-pre-3215 Fix inverted login in BlockPistonBase causing blocks to break incorrectly. Closes #910 #909 - - v99.99-pre-3214 Update patches for AT changes. - - v99.99-pre-3213 Update for the FMLEmbeddedChannel change. - - v99.99-pre-3212 Updated FML: - MinecraftForge/FML@22ba6fda5ee2dbf29dc03ba93ff9c7707edeaeee Expose the nethandler in a few places, and pull out FMLEmbeddedChannel, exposing a utility method on it. More to come. - - v99.99-pre-3211 Expose the nethandler in a few places, and pull out FMLEmbeddedChannel, exposing a utility method on it. - More to come. - - v99.99-pre-3210 Added default constructor for reflection - - v99.99-pre-3209 Added a constructor and made the fields package-private - - v99.99-pre-3208 Update ForgeMessage.java - - v99.99-pre-3207 Fix build.gradle for tweakClass property - Updated FML: - MinecraftForge/FML@f36152398d1d287e7a55a31c77a2614cfb63e1b6 Add in the tweakclass, fix the json for lzma @ the server. - - v99.99-pre-3206 Add in the tweakclass, fix the json for lzma @ the server. - - v99.99-pre-3205 Updated FML: - MinecraftForge/FML@5d069629cf47cd04f2002b3b9a2c32b0ea73c26e Allow itemstacks for furnace recipe inputs. Allow passing extra arguments through registerblock into the itemblock constructor. - - v99.99-pre-3204 Allow itemstacks for furnace recipe inputs. Allow passing extra arguments through registerblock into the itemblock constructor. - - v99.99-pre-3203 Updated FML: - MinecraftForge/FML@061288909de0f0452adf51a5a9935fd09992c801 Fire simple network connect/disconnect gameevents. - - v99.99-pre-3202 Fire simple network connect/disconnect gameevents. - - v99.99-pre-3201 Merge branch 'master' of github.com:Adubbz/MinecraftForge - - v99.99-pre-3200 Fix the network handler for forge - - v99.99-pre-3199 Updated FML: - MinecraftForge/FML@34819c9303870f560232464a2d16eb46d152515c Make gradlew executable on linux - MinecraftForge/FML@53a1f9841421b41d543d7d1d51319b44c86a527e Attempt to load old pre-1.7 worlds. ENSURE YOU HAVE A BACKUP! - MinecraftForge/FML@6a5f9e135f88b662e4e01e8882f861448910ca90 Fix example mod code for 1.7 - - v99.99-pre-3198 Fix example mod code for 1.7 - - v99.99-pre-3197 Made BlockCrops.getDrops call its super method - - v99.99-pre-3196 Allow tools to override their material harvest levels. - - v99.99-pre-3195 Tidier implementation of previous commit. Should fix for subclasses of individual tools too - - v99.99-pre-3194 Add in harvesting abilities of the items, should fix effectiveness - - v99.99-pre-3193 Attempt to load old pre-1.7 worlds. ENSURE YOU HAVE A BACKUP! - - v99.99-pre-3192 Make gradlew executable on linux - - v99.99-pre-3191 Updated FML: - MinecraftForge/FML@f8d6213829d570501166d64d7c8bb4977567131f Update render registry - MinecraftForge/FML@ec316f113fefef12f6defed9eb68de368d7f4420 AT for renderblocks - - v99.99-pre-3190 AT for renderblocks - - v99.99-pre-3189 Update render registry - - v99.99-pre-3188 Updated FML: - MinecraftForge/FML@268bbabee6ae3fa1d596bd18e172298e26dc9ce4 Fix handling world reloads when new stuffs are added - - v99.99-pre-3187 Fix handling world reloads when new stuffs are added - - v99.99-pre-3186 Merge pull request #893 from iChun/master - Add render offset to event. - - v99.99-pre-3185 Add render offset to event. - - v99.99-pre-3184 Fix dig speed on redstone ore and obsidian. - - v99.99-pre-3183 Add a version check mechanic to startup, it is done in a seperate thread and has a config option to compleetly disable it. This allows us to notify users of new recomended builds. Hopefully stemming the flow of outdated help request. Also adds a warning to the main screen if you are running a 'Beta' Forge. Which means a Forge for a new version of Minecraft that we have not promoted a recomended build for yet. - - v99.99-pre-3182 Resize pending tile updates when it goes over the curent length. Fixed AIOOB error. - - v99.99-pre-3181 Forgot to regen patches... - - v99.99-pre-3180 Added constructor to WorldType, and delegated the BiomeLayer management to it. Also updated the access transformer for Item/Block classes. - - v99.99-pre-3179 MinecraftForge/FML@c180d9b15735ce89a38c497acd65fa3fab595f77 Add 1.7.2 base json, Gradle will automatically download updated versions of this. Keeping it in the repo allows us to se - e what base json we have built our jsons off of. And if it changes update accordingly. - - v99.99-pre-3178 Updated FML: - MinecraftForge/FML@156a9ae03a3c80bd1499a8e692c44a322ad9df62 Fix build script - MinecraftForge/FML@7d3b1250e8368886bed0e0da350a94abaa4b6247 Fix handshaking properly. Also, fix ID syncup. It now will completely freeze the idmap after preinit. This frozen map is used to inject "new" stuff into existing serverside worlds. Interesting sideeffect: remote servers lacking things will change the client, to also LACK ids for those things. watch for -1 ids in your remap events. Note: idmaps should be considered temporary per server instance. SERVERSTOPPED will restore "startup" state, as will client logout. - - v99.99-pre-3177 Add 1.7.2 base json, Gradle will automatically download updated versions of this. Keeping it in the repo allows us to see what base json we have built our jsons off of. And if it changes update accordingly. - - v99.99-pre-3176 Fix handshaking properly. Also, fix ID syncup. It now will completely freeze the idmap after preinit. - This frozen map is used to inject "new" stuff into existing serverside worlds. Interesting sideeffect: remote - servers lacking things will change the client, to also LACK ids for those things. watch for -1 ids in your remap - events. Note: idmaps should be considered temporary per server instance. SERVERSTOPPED will restore "startup" state, - as will client logout. - - v99.99-pre-3175 Fix items rendering on the GUI with invalid state due to glint rendering changing it. Thanks iChun. - - v99.99-pre-3174 Fixed accedential inverted logic that caused Potions to render incorrectly. Thanks iChun. - - v99.99-pre-3173 Move Grass {Flower} registry to BiomeGenBase as 1.7 made flowers Biome specifc, this means modders who wish to add global base flowers need to add them to all the biomes indavidually. - - v99.99-pre-3172 Temporary fix for items rendering with effects on one layer. Restores default vanilla rendering, which is considered a bug in modded community. - - v99.99-pre-3171 Fix debug HUD rendering semi-transparently. - - v99.99-pre-3170 Fix build script - - v99.99-pre-3169 Bump version to 10.12.0 to mark 1.7. - - v99.99-pre-3168 Updated FML: - MinecraftForge/FML@58132ccda3a575f10fc209c421fd5d80e01164cc Add new required --accessToken to launch specs. - - v99.99-pre-3167 Add new required --accessToken to launch specs. - - v99.99-pre-3166 Fix: - Block placement/interaction - Tesselator crash due to wrong mapping - Missing isreplaceable check in world.canPlaceAt - Small foratting/logging cleanup - Temporarly commented out efficancy changes till I implement it. - - v99.99-pre-3165 Fix MethodNotFound crash when shutting down internal server. - - v99.99-pre-3164 Forge uses the FORGE channel for packets. - - v99.99-pre-3163 Get object based on identity not name. - - v99.99-pre-3162 Merge pull request #890 from bloodmc/master - Refactored BiomeManager stronghold add/remove methods to support new MapGenStronghold dynamic biome changes. - - v99.99-pre-3161 Refactored BiomeManager stronghold add/remove methods to support new - MapGenStronghold dynamic biome changes. - Changed InitNoiseGensEvent to pass a NoiseGenerator array instead of - NoiseGeneratorOctaves due to new NoiseGeneratorPerlin in - ChunkProviderGenerate. - Fixed worldgen crash caused by wrong metadata in Chunk patch. - - v99.99-pre-3160 Updated FML: - MinecraftForge/FML@a17489172cd54ca955548b15fa0669c9f95d7f45 Code to disable mods at runtime, or other times. - MinecraftForge/FML@85516d9588ebfadbba25f21b2f973e4e81abbaa6 ICraftingHandler, IPickupHandler are now both events. - MinecraftForge/FML@e4b63a1801b453797f5e820eb3f5bd42e6d43948 IWorldGenerator now has an ordering at registration time. This means the order of worldgen should be much more stable. - MinecraftForge/FML@ef3856f9a34e82a05cb2b7715e3611f8fb1a9a6b Update patches for Gradle's rename rewrite: MinecraftForge/ForgeGradle@19e7acf2a27a6c6ae60f6e8ab38337defddc16d3 - MinecraftForge/FML@31ea100b29dfdb4fc907e212c3d49a5240ca72a9 Working on id missing handling - MinecraftForge/FML@3e76dfba34aaba4397fc3fb2bd28e0d1f0abe3e4 More tweaking on id stuffs at worldload - MinecraftForge/FML@f860c8ad3bc7537f885b27c7f045b5b1140c05f4 bump to legacy launcher 1.9 with logging unification stuffs. - - v99.99-pre-3159 Inital patch update for 1.7.2, Doesn't compile, not done yet. - - v99.99-pre-3158 bump to legacy launcher 1.9 with logging unification stuffs. - - v99.99-pre-3157 More tweaking on id stuffs at worldload - - v99.99-pre-3156 Working on id missing handling - - v99.99-pre-3155 Update patches for Gradle's rename rewrite: MinecraftForge/ForgeGradle@19e7acf2a27a6c6ae60f6e8ab38337defddc16d3 - - v99.99-pre-3154 IWorldGenerator now has an ordering at registration time. This means the order of worldgen should be much more stable. - - v99.99-pre-3153 ICraftingHandler, IPickupHandler are now both events. - - v99.99-pre-3152 Code to disable mods at runtime, or other times. - - v99.99-pre-3151 Updated FML: - MinecraftForge/FML@32561265fc935cd6639d5b2e086e879f375676fa Ticks, Player events, keybindings, all migrated to the new event driven system. - - v99.99-pre-3150 Ticks, Player events, keybindings, all migrated to the new event driven system. - - v99.99-pre-3149 Moved the core event handler parts to FML. Implemented the Forge network handler based on the new - netty strategy. - Updated FML: - MinecraftForge/FML@3b2994a3def35a2d3058960b71dc59dc48b802f9 Some patching touchups - MinecraftForge/FML@557357fe179529e0b44aab2f3fcef0c5adf981d5 Update for log4j2 - MinecraftForge/FML@a2b324beb2ef6ec73000678c9305fd70d4ec1643 Copy eventhandler from Forge into FML. It is going to replace a lot of the runtime event systems. - MinecraftForge/FML@4071ff38afe15fddf5db0be882f5627f503a37c6 Patch some GUIs. We're gonna add some basic mod gui config support. - MinecraftForge/FML@0b419ac79c307579f162d47e0388a9d75bcd0a6e Fire a user event down the channels when a handshake has occured. - - v99.99-pre-3148 Fire a user event down the channels when a handshake has occured. - - v99.99-pre-3147 Patch some GUIs. We're gonna add some basic mod gui config support. - - v99.99-pre-3146 Copy eventhandler from Forge into FML. It is going to replace a lot of the runtime event systems. - - v99.99-pre-3145 Update for log4j2 - - v99.99-pre-3144 Killed a few hundred compile errors. - - v99.99-pre-3143 Comment out fluids until King gets his hands on it - - v99.99-pre-3142 Updated FML: - MinecraftForge/FML@1d71c017f45aa7ed9d7d7c5ed5250a8d22477980 ID syncing. - MinecraftForge/FML@fd36f50d8210342f65cb0272bac56a3bcc42dd18 Cleanups - MinecraftForge/FML@89e4e483c204c11b6fdfed34893fc223a7d6a899 Add in a remapping event for mods to consume. - MinecraftForge/FML@cd417c6786256fa23f181ff0b76696bc6dfb0291 Fixed remote and local connections work with mods now. - MinecraftForge/FML@ef492407ef812bb6bbc7f0bd8efbd16d07efcafb Entity spawning works. - MinecraftForge/FML@d0d31d9575403eb2ec058898b86ffd99a9220f75 SpawnAdjustment packet. Clean up stuffs. No more compile errors. - MinecraftForge/FML@3e278acb71e4e3d0406e80f0fad5071c9215ed33 Fix stupid possible compiler error. - MinecraftForge/FML@009d4dee2328cc8d97b74177a2c5a3c359e6564a Fix the exc file. Fix the deobfremapper for handling inner classes. - MinecraftForge/FML@49cb893d12bd4f82b5d1b50d1e6517a256525d32 Fix exc this time *sigh* - MinecraftForge/FML@31efcfc3b2085f5d4e070ddab34a0be1481b4c6f Clean up patches for latest exc. - MinecraftForge/FML@7a4ceebf5efe5b3650080cf912e371d92fc70a55 Kill old patches and add rejects to ignore file. - MinecraftForge/FML@7ea571f593464ad4226ba845da27ff66161621b1 Fix AT, Fix exc. Almost works now! - MinecraftForge/FML@b852e302851cfaf77e1db6f86408e8d049703656 First functional release under reobfuscation. - MinecraftForge/FML@df870c1a3341d8e2e88d7fc3e2f3d9ed2507989f Update shiped ForgeGradle for 1.7 - MinecraftForge/FML@55aa337f952bc72c5a001a6ed661978b11822c63 Rename synthetic bridge methods, these methods are not decompiled, but need to reobf correctly cross the recompile boundary. - MinecraftForge/FML@0098c57f94808751062ee45f2ee267324bb42089 Merge pull request #316 from AbrarSyed/patch-4 - - v99.99-pre-3141 Some patching touchups - - v99.99-pre-3140 Merge pull request #316 from AbrarSyed/patch-4 - Update shiped ForgeGradle for 1.7 - - v99.99-pre-3139 Rename synthetic bridge methods, these methods are not decompiled, but need to reobf correctly cross the recompile boundary. - - v99.99-pre-3138 Update shiped ForgeGradle for 1.7 - - v99.99-pre-3137 First functional release under reobfuscation. - - v99.99-pre-3136 Fix AT, Fix exc. Almost works now! - - v99.99-pre-3135 Kill old patches and add rejects to ignore file. - - v99.99-pre-3134 Clean up patches for latest exc. - - v99.99-pre-3133 Fix exc this time *sigh* - - v99.99-pre-3132 Fix the exc file. Fix the deobfremapper for handling inner classes. - - v99.99-pre-3131 Fix stupid possible compiler error. - - v99.99-pre-3130 SpawnAdjustment packet. Clean up stuffs. No more compile errors. - - v99.99-pre-3129 Entity spawning works. - - v99.99-pre-3128 Fixed remote and local connections work with mods now. - - v99.99-pre-3127 Create de_DE.lang - - v99.99-pre-3126 Add in a remapping event for mods to consume. - - v99.99-pre-3125 Cleanups - - v99.99-pre-3124 ID syncing. - - v99.99-pre-3123 Updated FML: - MinecraftForge/FML@a30f17362764f3e4e594386e193f9e4368e6836e Add sonatype snapshots repo for SpecialSource snapshots. - MinecraftForge/FML@b2550b8a693315ccc205f5315eac67c5283d7af9 Add mappings for Items/Blocks fields. - MinecraftForge/FML@57f7f1d7abd304d3e9f42567f1d66c10122e4ec6 Update for fixed Enum cleaning and names. - MinecraftForge/FML@99c681ad8736e4976053718c3d453b2fb30eefe0 Did it manually, forgot it needed the end comma - - v99.99-pre-3122 Some work on 1.7, waiting for Abrar to fix a few things. - - v99.99-pre-3121 Did it manually, forgot it needed the end comma - - v99.99-pre-3120 Update for fixed Enum cleaning and names. - - v99.99-pre-3119 Add mappings for Items/Blocks fields. - - v99.99-pre-3118 Add sonatype snapshots repo for SpecialSource snapshots. - - v99.99-pre-3117 Bump data for 1.7 start. - - v99.99-pre-3116 Kill liquids finally. - - v99.99-pre-3115 MinecraftForge/FML@3714426e19f8f0edaaeda8c787993f8f3615a44d fix derp in example builscript - MinecraftForge/FML@01fb451b6918599de5e732d7ff30c761438ab930 Merge pull request #311 from AbrarSyed/patch-3 - MinecraftForge/FML@30d532f4fc6fc65ea7e79707a75ff4d6ea0ea031 Pass 1: Most patches are restored. - MinecraftForge/FML@53127eec308d3929d68d3d9fafabcfef37e95c37 Merge branch 'master' of github.com:MinecraftForge/FML - MinecraftForge/FML@7ab3c3a37ceb8ab945208206aec86739a2138329 Update gitignore - MinecraftForge/FML@38cec7a11fae7cf12bda3a8d16a50bb6136d8886 The basic network handshaking for FML is done. All scenarios seem to work. - MinecraftForge/FML@9f928963f20bc9bbfbe1391fb16c6f5ca5fd4344 A network design I like. It uses the netty embedded channel to allow mods to build channel pipelines on top of custom payload packets. - MinecraftForge/FML@58f7487cfaf4a25a8349021b9cca5ef4ba0b541c Check in patches. Add in some network timeout tweaking values so you can debug the network. - MinecraftForge/FML@e544adba5c7e9286f917342af2669e5888fa0a17 More cleanup. Bidirectional server <-> client network works for mods as well as FML|HS now. - MinecraftForge/FML@f5c38e2359c2e6eca13cd6606465ee36086a7113 OK, network channels appear to be working well for both dedi and integrated servers. The beginnings of the new mod structure too. - MinecraftForge/FML@9c96a0a10a5cbe34786be8fd41f9818b5ac929bc More network stuff, partially done id syncing. - MinecraftForge/FML@2aaaeba15eabdec189daa8662e9ffdf0b5a09dbe ID loading from the server save now works. - - v99.99-pre-3114 ID loading from the server save now works. - - v99.99-pre-3113 More network stuff, partially done id syncing. - - v99.99-pre-3112 OK, network channels appear to be working well for both dedi and integrated servers. - The beginnings of the new mod structure too. - - v99.99-pre-3111 More cleanup. Bidirectional server <-> client network works for mods as well as FML|HS now. - - v99.99-pre-3110 Check in patches. Add in some network timeout tweaking values so you can debug the network. - - v99.99-pre-3109 A network design I like. It uses the netty embedded channel to allow mods to build channel pipelines on top of - custom payload packets. - - v99.99-pre-3108 The basic network handshaking for FML is done. All scenarios seem to work. - - v99.99-pre-3107 Update gitignore - - v99.99-pre-3106 Merge branch 'master' of github.com:MinecraftForge/FML - Conflicts: - install/build.gradle - patches/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java.patch - patches/minecraft/net/minecraft/network/NetServerHandler.java.patch - - v99.99-pre-3105 Pass 1: Most patches are restored. - NOTES: 1. Network is completely broken. 2. GameRegistry is partially broken. 3. ID sync is not in. - - v99.99-pre-3104 Merge pull request #311 from AbrarSyed/patch-3 - fix derp in example builscript - - v99.99-pre-3103 fix derp in example builscript - - v99.99-pre-3102 Bump build for gradle fixes: - Now Builds for java 1.6 - Include version,json in universal - Fixed classpath issues in eclipse task. - - v99.99-pre-3101 Merge pull request #868 from luacs1998/patch-1 - Update readme for ForgeGradle - - v99.99-pre-3100 Updated FML: MinecraftForge/FML@c2b919d339e5f63271cfb67a77235c21c5c3b80e Don't validate signatures in dev env. - - v99.99-pre-3099 Don't validate signatures in dev env. - - v99.99-pre-3098 Update README.txt - - v99.99-pre-3097 Another update for eclipse users - - v99.99-pre-3096 Updated - - v99.99-pre-3095 Update readme for ForgeGradle - Let me know if there's anything else to add or change. - - v99.99-pre-3094 Fix build file pom closures. - - v99.99-pre-3093 Proper configuratuion name for jenkins. - - v99.99-pre-3092 Merge pull request #867 from GUIpsp/master - Fix gradle wrapper. - - v99.99-pre-3091 Make the gradle wrapper executable. - - v99.99-pre-3090 Merge pull request #859 from AbrarSyed/master - Gradlization - - v99.99-pre-3089 update build.gradle - - v99.99-pre-3088 Regenerate all patches, No functional change as added this is a formatting change only. - - v99.99-pre-3087 Updated FML: - MinecraftForge/FML@e9a7660cb8961660186c7c23e61ab35f9c2dfb81 updated samples - MinecraftForge/FML@30894f7afadf5d3f3c3d5a54c3f904413d5f2309 Merge pull request #307 from AbrarSyed/master - MinecraftForge/FML@c4b8a393f90b00ad7ee4992ea4341ffb6d676abb Make the working directory the root of the eclipse workspace. - - v99.99-pre-3086 Update run configs. - - v99.99-pre-3085 Make the working directory the root of the eclipse workspace. - - v99.99-pre-3084 Merge pull request #307 from AbrarSyed/master - updated samples - - v99.99-pre-3083 updated samples - - v99.99-pre-3082 Fix for new FML, and publish to maven local - - v99.99-pre-3081 Update forge - - v99.99-pre-3080 Merge pull request #306 from MinecraftForge/1.6.4 - Actually do it correctly. Should be more forge friendly now. - - v99.99-pre-3079 Fix NPE in FakePlayers when they are created in a purely client side environment. To remove in 1.7 as FakePlayers should be used for server side interaction with the world on a player's behalf, not for client rendering. - - v99.99-pre-3078 Fix NPE on specific tile entities when the block break event is canceled. Closes #863 - - v99.99-pre-3077 added buildSrc to the gitIgnore - - v99.99-pre-3076 Updated FML: - MinecraftForge/FML@23baf3a8ce58cb8306189401a60647957ccbb4c2 Actually fix the nethandler code - Update patches - - v99.99-pre-3075 Actually do it correctly. Should be more forge friendly now. - - v99.99-pre-3074 Merge branch '1.6.4' - - v99.99-pre-3073 Updated FML: - MinecraftForge/FML@da72640c7ef1f44c49f7f592fbdd193622a30b40 Way to go, missing import. *sigh* - - v99.99-pre-3072 Way to go, missing import. *sigh* - - v99.99-pre-3071 Updated FML: - MinecraftForge/FML@b7f34629c3c47b92ee89d72b0dc935b4997cb009 Don't try and open GUIs on the server. - - v99.99-pre-3070 Don't try and open GUIs on the server. - - v99.99-pre-3069 Don't send openGui commands from the fakeplayer. Fixes thaumcraft and probably others. - - v99.99-pre-3068 Updated FML: - MinecraftForge/FML@6af42bc656dfb98972d034363352affc9e777805 Add in null protection for client/server sides of handleChat - - v99.99-pre-3067 Merge branch '1.6.4' - - v99.99-pre-3066 Merge pull request #855 from CovertJaguar/patch-4 - Fix Water/Lava Fluid Localization - - v99.99-pre-3065 Fix Water/Lava Fluid Localization - - v99.99-pre-3064 Noop out FakePlayer.addStat. - - v99.99-pre-3063 Add in null protection for client/server sides of handleChat - - v99.99-pre-3062 Kill more references to modloader. - - v99.99-pre-3061 Remove all public all the time from Minecraft. It is unnecessary with ModLoader gone. DEAL WITH IT. File AT public requests, make a coremod, whatever. This needed to die. - - v99.99-pre-3060 Deprecation cleanup. Bye bye more modloader stuffs - - v99.99-pre-3059 First pass : kill modloader, clean up warnings - - v99.99-pre-3058 fixed versioning and stuff - - v99.99-pre-3057 Step 3: The Rebirth - - v99.99-pre-3056 Join the developers list in the pom and fix the client run configs in the workspace. - - v99.99-pre-3055 Merge pull request #302 from AbrarSyed/patch-1 - Update 1.6.4-rel.json - - v99.99-pre-3054 Update 1.6.4-rel.json - - v99.99-pre-3053 Change the build to capture an MCP version, also, tweak the sources so mavenLocal can be used for ForgeGradle - - v99.99-pre-3052 Step 2: The Reformation - - v99.99-pre-3051 update FML for gradle changes - - v99.99-pre-3050 Step 1: The Purge - - v99.99-pre-3049 Updated FML: - MinecraftForge/FML@3d25b4e793c59a9131a441d6c7a2d80cac9cd701 Add in the ability to strip interface references for specific interfaces - this is probably mostly useful for scala scenarios where sythetic methods are generated and is not a substitute for using Optional.Method where appropriate. Closes #300 - - v99.99-pre-3048 Fix license and naming - - v99.99-pre-3047 added src distribution gradle file - - v99.99-pre-3046 Move to install to not clutter root directory with the .bat and .sh files I know are coming. - - v99.99-pre-3045 Include eclipse template workspace, for packaging in src distro. - - v99.99-pre-3044 Add gradle wrapper - - v99.99-pre-3043 Publish to repo folder for local testing. - - v99.99-pre-3042 Step 3: The Rebirth - - v99.99-pre-3041 Step 2: The Reformation - - v99.99-pre-3040 Step 1: The Purge - - v99.99-pre-3039 Add in the ability to strip interface references for specific interfaces - this is probably mostly useful for - scala scenarios where sythetic methods are generated and is not a substitute for using Optional.Method where appropriate. - Closes #300 - - v99.99-pre-3038 Merge pull request #852 from MinecraftForge/breakevent - Merge BreakEvent branch, as nobody has told me that it breaks everything. And in prep from 1.7. - - v99.99-pre-3037 Updated FML: - MinecraftForge/FML@f4532410ec1dbf43ce15dfa78d07e5f7be408b08 Change a couple of warnings, as a prelude to 1.7- preinit is now required for all GameRegistry activity, and every item and block REQUIRES registration. - - v99.99-pre-3036 Change a couple of warnings, as a prelude to 1.7- preinit is now required for all GameRegistry activity, and every item and block REQUIRES registration. - - v99.99-pre-3035 Updated FML: - MinecraftForge/FML@8f87021b0f1ae5b277ad4d1891761b7a7ae1ab71 Fix derp with custom properties. They work now! - - v99.99-pre-3034 Fix derp with custom properties. They work now! - - v99.99-pre-3033 Updated FML: - MinecraftForge/FML@bc57ff9e83803d804e9d5374d76273fcd68611f4 Fix recursive API dependency resolution. Allows nested APIs, such as BuildCraft's - - v99.99-pre-3032 Fix recursive API dependency resolution. Allows nested APIs, such as BuildCraft's - - v99.99-pre-3031 Updated FML: - MinecraftForge/FML@de8ab934d8ae960ebc0dede16218ca1e9e488ebc Fix up duplicate entries - - v99.99-pre-3030 Fix up duplicate entries - - v99.99-pre-3029 Updated FML: - MinecraftForge/FML@81fe1c9682234297443402a54e4b852ef49d0ba8 Add in an API marker for API type packages. This does several things: 1. Packages marked as API will generate a new "modid" (the provides) that can be depended on. 2. Packages marked as API will be searched systemwide, and anything declaring that package (even without the API marker) will get an implicit dependency on the API package. 3. The API package itself will get a soft dependency on the "owner" package. - - v99.99-pre-3028 Add in an API marker for API type packages. - This does several things: - 1. Packages marked as API will generate a new "modid" (the provides) that can be depended on. - 2. Packages marked as API will be searched systemwide, and anything declaring that package (even without the API marker) - will get an implicit dependency on the API package. - 3. The API package itself will get a soft dependency on the "owner" package. - @Optional elements can refer to the API packages instead of a concrete mod as well. - - v99.99-pre-3027 Add new recipe sorter that is called after all mods are initalized. This is disabled by default in 1.6 to not break current worlds as it may change machine's recipy outputs. Will enable by default in 1.7. Players may enable it in the forge config. - - v99.99-pre-3026 Merge pull request #841 from XCompWiz/biomecheck - Adds a Check to prevent Biome Replacement - - v99.99-pre-3025 Adds a Check to prevent Biome Replacement - Splits the BiomeGenBase constructor to create one which takes a flag - that indicates whether to insert the biome object into the biomeList - array. The standard constructor calls the new one with the default of - true. This allows biome wrapper-objects to exist. - - v99.99-pre-3024 Format strings properly in MC's internal logger. Fixes resource pack case warnings. - - v99.99-pre-3023 Updated FML: - MinecraftForge/FML@dac7f590eabb326c4467dbc829b4aae1e4be2779 Modify ordering of networkmod registration and mod instantiation. This fixes VersionCheckHandler logging an incorrect failure message due to NPE. - MinecraftForge/FML@f0dc530b2833a1c89673208fe296dba5520671c1 Fix up documentation of VersionCheckHandler - it only ever accepted a String and only works on the NetworkMod annotated class - MinecraftForge/FML@243a21a353e6b7717f64008776928c7132110ddf Wrapping coremods as tweakers. Part 1. - MinecraftForge/FML@58a299aabcfadb4139f126a2d46b5247bede4185 Attempt to inject coremods as tweakers, so both can share a dependency ordering - - v99.99-pre-3022 Attempt to inject coremods as tweakers, so both can share a dependency ordering - - v99.99-pre-3021 Wrapping coremods as tweakers. Part 1. - - v99.99-pre-3020 Fix up documentation of VersionCheckHandler - it only ever accepted a String and only works on the NetworkMod annotated class - - v99.99-pre-3019 Modify ordering of networkmod registration and mod instantiation. This fixes VersionCheckHandler logging an incorrect failure message due - to NPE. - - v99.99-pre-3018 Fix null pointer exception in BiomeDictionary causing the ChunkManager's config to not load/save. - - v99.99-pre-3017 Updated FML: MinecraftForge/FML@bf54d4d66799f2e58944095826d0722ed0120b1f Make each mod's EventBus log a child of it's main logger. - - v99.99-pre-3016 Make each mod's EventBus log a child of it's main logger. - - v99.99-pre-3015 Add wildcard versions of OreDict replacements, Closes #827 - - v99.99-pre-3014 Updated FML: - MinecraftForge/FML@da4337efbfa07b35f5883107768f9ba2f1b24b9b Fix up handling the new method signature data for NetworkCheckHandlers - - v99.99-pre-3013 Fix up handling the new method signature data for NetworkCheckHandlers - - v99.99-pre-3012 Merge branch 'master' of github.com:OniBait/MinecraftForge into breakevent - - v99.99-pre-3011 Updated FML: - MinecraftForge/FML@f92962bbbbb90c19788a5dc2eafdc2eeefdd77ce Use null to empty, so missing values work. *sigh* - - v99.99-pre-3010 Use null to empty, so missing values work. *sigh* - - v99.99-pre-3009 And remember to make the event class static *sigh* - - v99.99-pre-3008 Add in an event for zombie summoning. Allows for mods to control summoning behaviour, as well as custom summoned mob. - - v99.99-pre-3007 And set the RIGHT variable *sigh* - - v99.99-pre-3006 And allow for tweaking baby chance as well. - - v99.99-pre-3005 Allow configuration of the zombie additional summoning mechanic. The vanilla mechanic is a little borked at times. - - v99.99-pre-3004 Updated FML: - MinecraftForge/FML@58577775d277a4408bda510534eb36841b08ced4 Very minor style fixes - MinecraftForge/FML@96be82343c25b83dd842ada8d6e8b66eb4e4ee00 Merge pull request #280 from mc10/patch-1 - MinecraftForge/FML@2714da10228020a6f2321f6c9a703f0d24fe1370 Primitive capability for tweakers to order. Add a "TweakOrder" integer property to your manifest, or accept the default of zero. - - v99.99-pre-3003 Prevent session from being printed to the console, also make sure the username is not empty. Causes a lot of bugs further down the line. - - v99.99-pre-3002 Primitive capability for tweakers to order. Add a "TweakOrder" integer - property to your manifest, or accept the default of zero. - - v99.99-pre-3001 Cleaned up patches to BlockOre and BlockRedstoneOre - Fixed trailing whitespace (it bugs me too) - - v99.99-pre-3000 Fixed formatting - - v99.99-pre-2999 Merge pull request #280 from mc10/patch-1 - Very minor style fixes - - v99.99-pre-2998 Very minor style fixes - Replacing tabs with spaces consistently, making brace styles consistent, etc. - - v99.99-pre-2997 Updated FML: - MinecraftForge/FML@fc3e7647d2aff01146b1f5bd2ab6b57ef8e833e5 Support, and fix up, interface lists for Optional - - v99.99-pre-2996 Support, and fix up, interface lists for Optional - - v99.99-pre-2995 Added some missing air checks to world gen features. - - v99.99-pre-2994 Merge branch 'upstream/master' - - v99.99-pre-2993 Add block break events based on @bloodmc's initial 1.5.2 Pull Request - - v99.99-pre-2992 Fix repeated argument in CleintCommands. - - v99.99-pre-2991 MinecraftForge/FML@a381874bb9c3bdeeb508bb81719b4d210eb29696 Delay sound system backend initalization to speed up startup and prevent race condition on some computers. - - v99.99-pre-2990 Delay sound system backend initalization to speed up startup and prevent race condition on some computers. - - v99.99-pre-2989 Merge pull request #792 from Eurymachus/opencontainer - Added PlayerOpenContainerEvent and added ForgeHooks.canInteractWith - - v99.99-pre-2988 Updated FML: - MinecraftForge/FML@bc64ceabef76b1f4667b22ca8241b72351b44338 Optional shouldn't be constructable itself. It's purely a wrapper thing. - MinecraftForge/FML@55525f6d2eb24f42c26a291b8ce98feb4d4498c9 ModLoader is officially deprecated. It will all cease to be with 1.7. - - v99.99-pre-2987 ModLoader is officially deprecated. It will all cease to be with 1.7. - - v99.99-pre-2986 Optional shouldn't be constructable itself. It's purely a wrapper thing. - - v99.99-pre-2985 Added PlayerOpenContainerEvent and added ForgeHooks.canInteractWith - - Used to override the canInteractWith during player tick - - setResult to ALLOW/DENY as required - - Defaults to Vanilla behaviour in any other instance. - Required for LittleBlocks Mod and to Assist Gullivers Mod - - v99.99-pre-2984 Updated FML: - MinecraftForge/FML@63ba3aa0099f43183315fb4e16f9e8e8007362f8 Add in support for Optional interfaces and methods. Be gone coremods! - - v99.99-pre-2983 Add in support for Optional interfaces and methods. Be gone coremods! - - v99.99-pre-2982 Add block break events based on @bloodmc's initial 1.5.2 Pull Request - - v99.99-pre-2981 Fix missing patch which caused per-world storage to not be saved. - - v99.99-pre-2980 Merge pull request #808 from rhilenova/player_list - Added pre/post to player list rendering in GuiIngameForge. - - v99.99-pre-2979 Merging in master. - - v99.99-pre-2978 Bump version number for todays changes. - - v99.99-pre-2977 Make isItemStackDamageable() pass the stack to getMaxDamage() to use the Forge version of getMaxDamage(). - Fixes display issues with mods using getMaxDamage(ItemStack) instead of the vanilla one. Closes #805 - - v99.99-pre-2976 Merge pull request #803 from benblank/block-power - Allow blocks to choose how they handle indirect power - - v99.99-pre-2975 Moved PLAYER_LIST event inside display check. - - v99.99-pre-2974 Merge pull request #793 from jrtc27/install-args - Pass arguments to install.sh and install.cmd to install.py - - v99.99-pre-2973 Add cancelable EntityStructByLightningEvent, Closes #789 - - v99.99-pre-2972 Stack sensitive version of Item.getItemStackLimit. Closes #771 - - v99.99-pre-2971 Merge pull request #772 from Lomeli12/master - Villager Trading GUI will now not open if Player is sneaking. Allowing for bypassing of the GUI. - - v99.99-pre-2970 Added all the vanilla records to the ore dictionary. Closes #731 - - v99.99-pre-2969 Direct canApplyAtEnchantingTable through canApply Closes #740 - - v99.99-pre-2968 Add pre and post event to rendering Chat, allowing for placement of the chat box. Closes #733 - - v99.99-pre-2967 Set densityDir in BlockFluidBase's constructor, closes #737 - - v99.99-pre-2966 Fix placement of snow cover over metadata 6. Closes #724 - - v99.99-pre-2965 Add the ability to register chat commands that only execute on the client. Works with autocomplete. - Client commands are gray when shown in the autocomplete list (when you press tab) - Closes #640 - - v99.99-pre-2964 move `shouldCheckWeakPower` to Forge section - - v99.99-pre-2963 Vanilla hopper should obey the IInventory contract, TileEntityHopper now takes into account IInventory.getInventoryStackLimit() when inserting items Closes #597. - - v99.99-pre-2962 Update workspace to point at launchwrapper 1.8 - - v99.99-pre-2961 Merge pull request #796 from HoBoS-TaCo/master - Added ItemTooltipEvent - - v99.99-pre-2960 Added ItemTooltipEvent - This event is fired at the end of ItemStack.getTooltip(EntityPlayer, boolean), which in turn is called from it's respective GUIContainer. It allows an itemstack's tooltip to be changed depending on the player, itemstack or whether the advanced information on item tooltips is being shown, toggled by F3+H. - - v99.99-pre-2959 Updated FML: - MinecraftForge/FML@5265e34a350adbb762264379f0134bfa40d33eaa Fix null killing the server - - v99.99-pre-2958 Fix null killing the server - - v99.99-pre-2957 Added pre/post to player list rendering in GuiIngameForge. - - v99.99-pre-2956 MinecraftForge/FML@35ab9f52b02d84592e4c7607feb6009710b2f7d9 Fix md5s for new checksums.sha1 in scala libraries. - - v99.99-pre-2955 Fix md5s for new checksums.sha1 in scala libraries. - - v99.99-pre-2954 allow blocks to choose how they handle indirect power - - v99.99-pre-2953 Updated FML: - MinecraftForge/FML@e356f4d713b1269825839954fe86f5312ede0fc6 Cross-modsystem compatibility fix with thanks to Mumfrey @ liteloader - MinecraftForge/FML@9b55f1f48f89a5348ac1d58622b71946f310316a Attempt at a shared modlist implementation - should allow visibility between liteloader and fml for "mod list display" - - v99.99-pre-2952 Attempt at a shared modlist implementation - should allow visibility between liteloader and fml for "mod list display" - - v99.99-pre-2951 Cross-modsystem compatibility fix with thanks to Mumfrey @ liteloader - - v99.99-pre-2950 Updated FML: - MinecraftForge/FML@bfc25bc5da1ff0f6fd0faf817b32a8f6d35dedc2 Add to both the classloader and the parent - - v99.99-pre-2949 Add to both the classloader and the parent - - v99.99-pre-2948 Updated FML: - MinecraftForge/FML@9f0f9e7288afc6cce9a425ad770a208af9e28648 Fix deobf tweaker - - v99.99-pre-2947 Fix deobf tweaker - - v99.99-pre-2946 Updated FML: - MinecraftForge/FML@ce6404fd5bb5e8e425af3bcafeaa285575bf39a3 TYPOS!!! - - v99.99-pre-2945 TYPOS!!! - - v99.99-pre-2944 Updated FML: - MinecraftForge/FML@8f18a3de9a02b003762dace891829ef64dfedf49 Separate deobf tweaker so it runs last. Should fix problems with cascaded tweakers expecting an obf environment. - - v99.99-pre-2943 Separate deobf tweaker so it runs last. Should fix problems with cascaded tweakers - expecting an obf environment. - - v99.99-pre-2942 Updated FML: - MinecraftForge/FML@8e26c99de3b44d272d2fdc398e0687db17bce3b7 Add debugging for deobfuscation - MinecraftForge/FML@1d902df5814b815959165e4aa69272003f002d25 Use the negative cache in latest legacylauncher. - MinecraftForge/FML@9815d8c3793182a08fcdbd29376a3f70bff464d0 Update for launchwrapper 1.8 - - v99.99-pre-2941 Add wrapper exception to the new Structure ID system to point to the correct Structure. - - v99.99-pre-2940 Update for launchwrapper 1.8 - - v99.99-pre-2939 Use the negative cache in latest legacylauncher. - - v99.99-pre-2938 Add debugging for deobfuscation - Add negative caching for field and method maps. Should shortcut some work - Fix handling the case where a class doesn't exist, but still needs deobf - Ask the patch manager for the bytes for the class, not the classLoader - Fix up some more places where we should look for a patched class - Fix problem with empty source classes and runtime deobfuscation - - v99.99-pre-2937 Updated FML: - MinecraftForge/FML@fc8c3bef0380d59c0842a252e4f0bd29127ee78b Update to new installer that uses xz compression and better support for non-standard jvms - - v99.99-pre-2936 Update to new installer that uses xz compression and better support for non-standard jvms - - v99.99-pre-2935 Fixed typo in bounding box based ladder checks that caused potential infinite loops with entities in certian positions. Thanks Overmind for reporting it. - - v99.99-pre-2934 Remove some side onlys on BiomeEvents that don't need them. - - v99.99-pre-2933 Update dev workspace for 1.6.4 .. - - v99.99-pre-2932 Updated FML: - MinecraftForge/FML@a4de22c1addf0a6b95d38e467a96f2af417c86d5 And use the parent that's actually going to be valid. *sigh* - - v99.99-pre-2931 And use the parent that's actually going to be valid. *sigh* - - v99.99-pre-2930 Updated FML: - MinecraftForge/FML@70cffe6982b27df0ea7d8d4d8851a0c0043bb2cb Herpaderp. Make addURL accessible. *sigh* - - v99.99-pre-2929 Herpaderp. Make addURL accessible. *sigh* - - v99.99-pre-2928 Fluid Rarity should have a default - Oops. - - v99.99-pre-2927 Updated FML: - MinecraftForge/FML@4a94c2c71bb4cc9644caeb06011a189989b22f87 Fix NPE when loading second single-player world - MinecraftForge/FML@0e80fcb8f716cfef5b016a73ca32ff0e2f3c3c05 Merge pull request #284 from smcv/uninit - MinecraftForge/FML@39620f1e41464f53482277dc3bcb0b9eed8ca25c Fix injection of tweaker into system - - v99.99-pre-2926 Fix injection of tweaker into system - - v99.99-pre-2925 Merge pull request #284 from smcv/uninit - Fix NPE when loading second single-player world - - v99.99-pre-2924 Fix NPE when loading second single-player world - After leaving a single-player world, getServer() can return null, resulting - in the stack trace below, "Fatal errors were detected during the - transition from SERVER_STOPPING to SERVER_ABOUT_TO_START", - "The ForgeModLoader state engine has become corrupted" and the client - getting stuck forever. - Exception in thread "Server thread" java.lang.NullPointerException - at cpw.mods.fml.client.FMLClientHandler.serverStopped(FMLClientHandler.java:620) - at cpw.mods.fml.common.FMLCommonHandler.handleServerStopped(FMLCommonHandler.java:468) - at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) - at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583) - - v99.99-pre-2923 Updated FML: - MinecraftForge/FML@79c39f8b7c711377f7919abd1ee6a56a339d1062 Fix classpath for launchwrapper 1.7 - - v99.99-pre-2922 Fix classpath for launchwrapper 1.7 - - v99.99-pre-2921 Merge pull request #794 from alexbegt/master - Correcting SoundManager Transformer - - v99.99-pre-2920 Correcting SoundManager Transformer - - v99.99-pre-2919 Clean patch fuzz - - v99.99-pre-2918 Pass arguments to install.sh and install.cmd to install.py - - v99.99-pre-2917 Updated FML: - MinecraftForge/FML@f6190e8752013c0d6857090ffd42559cf83809ae Update workspaces for 1.6.4 - - v99.99-pre-2916 Update workspaces for 1.6.4 - - v99.99-pre-2915 Updated FML: - MinecraftForge/FML@25981706ef12654b6c2baccc80fa2298bb5afb4a Update for MC 1.6.4 - MinecraftForge/FML@0950b9fc8441a2d3b022ed876f17ee5ac0c47b9c Fix up a deep crash in the early server init hanging the client - - v99.99-pre-2914 Fix up a deep crash in the early server init hanging the client - - v99.99-pre-2913 Update for MC 1.6.4 - - v99.99-pre-2912 Move have handler creation up, to prevent NPE. - - v99.99-pre-2911 Remove duplicate access transformer - - v99.99-pre-2910 Updated FML: - MinecraftForge/FML@e7dd728f955aa4713fef45fea770b1f91246d712 Format the log messages through MessageFormat. Thanks CovertJaguar for the pointer. - MinecraftForge/FML@82d896a35e08be5712bdc15bdb93e5d4fc0ddd46 Make final transformers actually work on methods as well. - - v99.99-pre-2909 Make final transformers actually work on methods as well. - - v99.99-pre-2908 Format the log messages through MessageFormat. Thanks CovertJaguar for the pointer. Closes #282 - - v99.99-pre-2907 Move the Structure data save files to per-world data folders. Vanilla saves them to the global folder which will potentially cause conflicts if two worlds generate 'Villages'. Which in the modded world is highly likely. Refer back to the long standing vanilla issue where nether 'villages' would override the overworlds villages, it's the same situation. - - v99.99-pre-2906 Make MapGenStructureIO name registration functions public, Any mod that has anything extending StructureStart or StructureComponent must register there classes and create a default (no parameter) constructor. - - v99.99-pre-2905 Unfinalized Item.getIconIndex(ItemStack) - - v99.99-pre-2904 Actually push the submodule update -.- - - v99.99-pre-2903 Bump version for new MC version. - - v99.99-pre-2902 Updated FML: - MinecraftForge/FML@da70cdd35a378d02db47d2aa31fb9aac87beaedc Update tweaker for new Launcher API - MinecraftForge/FML@352117fd78eec745da6c80b8d354947c4dbbbb48 Update for new installer and thank you. - MinecraftForge/FML@40a34af43105ebcb5a63ce2351ca119da5a8158e Merge branch 'master' into newtweak - MinecraftForge/FML@e77d2547ad447025729ae7f3cccaaf343c4c86f9 Update for pre-ninja 1.6.3 update - MinecraftForge/FML@34493b0d99e2cf2bdca080ff226f2dfeedb1cf51 Update for real 1.6.3 update - MinecraftForge/FML@95afc95b248ecc69bc6ffcc5a95912820d8f4066 Update mcp mod info - MinecraftForge/FML@ff75416a325717770a5cf457c859bfb0abcbe281 Update mc_versions data and commands patch and eclipse workspace - MinecraftForge/FML@8f2e67558127f16d92399ea97cbcb0df46d52e19 Update the src distro's eclipse workspace. - - v99.99-pre-2901 Update the src distro's eclipse workspace. - - v99.99-pre-2900 Update mc_versions data and commands patch and eclipse workspace - - v99.99-pre-2899 Update mcp mod info - - v99.99-pre-2898 Update for real 1.6.3 update - - v99.99-pre-2897 Update for pre-ninja 1.6.3 update - - v99.99-pre-2896 Merge branch 'master' into newtweak - - v99.99-pre-2895 Update for new installer and thank you. - - v99.99-pre-2894 Updated FML: - MinecraftForge/FML@81328b6684c5127427153807b5e498c2efefb96b Add in support for using a mirror list and provide checksums for packed download of libs - - v99.99-pre-2893 Add in support for using a mirror list and provide checksums for packed download of libs - - v99.99-pre-2892 Revert "Added a RenderType that allows Map-style rendering w/o inheriting from" - This reverts commit eb4688bf5ea132cd8ddc802a7dad6d423ad50543. - Conflicts: - patches/minecraft/net/minecraft/client/renderer/ItemRenderer.java.patch - - v99.99-pre-2891 Fix broken PR from vilml. TEST! - - v99.99-pre-2890 Merge pull request #784 from viliml/patch-1 - Prevent NPE in fluid lookup for block - - v99.99-pre-2889 Prevent NPE in fluid lookup for block - - v99.99-pre-2888 Merge pull request #782 from CovertJaguar/patch-1 - Allow Fluids to have Rarities - - v99.99-pre-2887 Fix the divider - - v99.99-pre-2886 Allow Fluids to have Rarities - Used for tool tips. - - v99.99-pre-2885 Move stuff around a bit- also tie range and enabled to options. - - v99.99-pre-2884 Merge branch 'master' of github.com:Adubbz/MinecraftForge into Adubbz-master - - v99.99-pre-2883 Sky colours now smoothly transition - Made transitions even smoother - Sky colours now smoothly transition - - v99.99-pre-2882 Tweak patch comment - - v99.99-pre-2881 Merge branch 'mapStyle' of github.com:Matchlighter/MinecraftForge into Matchlighter-mapStyle - - v99.99-pre-2880 Merge branch 'master' of github.com:micdoodle8/MinecraftForge into micdoodle8-master - - v99.99-pre-2879 Allows proper raytracing from actual player eye position rather than hardcoded eye heights. - - v99.99-pre-2878 Merge branch 'fovhook' of github.com:MachineMuse/MinecraftForge into MachineMuse-fovhook - - v99.99-pre-2877 Updated FML: - MinecraftForge/FML@b5af446d7111730c7973c9f0d6b76e62b78b9131 Fix sidedness derp in LanguageRegistry. - - v99.99-pre-2876 Fix sidedness derp in LanguageRegistry. - - v99.99-pre-2875 Villager Trading GUI will not open if Player is sneaking. - - v99.99-pre-2874 Check if block is air instead of just ID zero when growing from stem block. - - v99.99-pre-2873 Added a RenderType that allows Map-style rendering w/o inheriting from - ItemMap. - - v99.99-pre-2872 The partial tick should be available for all render player events. Weird it wasn't. - - v99.99-pre-2871 Redo harvest event. This time with simpler logic, that should be less liable to weird "missing" stuff. - - v99.99-pre-2870 Reverting HarvestEvent, for new implementation - - v99.99-pre-2869 Fix bug where guis were not closed properly, resulting in signs not having there text set. - - v99.99-pre-2868 Change trigger calculation so entities get some time to age before refiring the event. - - v99.99-pre-2867 Create helper apply_patches script and add paramter to change patch output folder. - - v99.99-pre-2866 Change from Cancelable to using a Result. This means you can force despawn mobs you - don't want around anymore. Also, deferred check to once every 20 ticks. May tune it - down further or make it a config if this event is a lag issue. - - v99.99-pre-2865 Create es_ES.lang - - v99.99-pre-2864 Added fov hook - Small formatting changes (opening braces on new line) - - v99.99-pre-2863 Add a cancellable despawn event- allows mods to decide to prevent the despawning - of certain otherwise normally despawnable mobs. - - v99.99-pre-2862 Small formatting changes (opening braces on new line) - - v99.99-pre-2861 fixed merge - - v99.99-pre-2860 Added fov hook - - v99.99-pre-2859 Add some javadoc to the HarvestBlock event. - - v99.99-pre-2858 Clean up some formatting. - - v99.99-pre-2857 Use the dropchance from the event. - - v99.99-pre-2856 Merge branch 'sometweaks' - - v99.99-pre-2855 Add in a block reverse lookup for fluids. Closes #749 - - v99.99-pre-2854 Add a harvestblock event, to allow mods to intercept and change the drops for blocks. Don't abuse this, or we'll have to take safety measures. - Fires for both silktouch and non-silktouch harvesting, and provides the player. Note, you may need to - change your break overrides to pass on the player for best results. - - v99.99-pre-2853 Defer firing CreateDecorator until it's likely mods have had a chance to register their listener. Should close #759 - - v99.99-pre-2852 MachineMuse, remember, there's TWO model formats supported! - - v99.99-pre-2851 Merge branch 'master' of github.com:jk-5/MinecraftForge into sometweaks - Conflicts: - patches/minecraft/net/minecraft/client/Minecraft.java.patch - - v99.99-pre-2850 Merge branch 'master' of github.com:mhahn1976/MinecraftForge into sometweaks - - v99.99-pre-2849 Merge branch 'french' of github.com:robin4002/MinecraftForge into sometweaks - - v99.99-pre-2848 Add a bit of javadoc - - v99.99-pre-2847 Merge branch 'displayname' of github.com:MachineMuse/MinecraftForge into sometweaks - Conflicts: - patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch - - v99.99-pre-2846 Merge branch 'objTessellation' of github.com:MachineMuse/MinecraftForge into sometweaks - - v99.99-pre-2845 Fix patch for new MCP naming. - - v99.99-pre-2844 Merge branch 'mouseevent2' of github.com:MachineMuse/MinecraftForge into sometweaks - - v99.99-pre-2843 Reduce patch size significantly - - v99.99-pre-2842 Fix player push out of blocks clientside being hardcoded and not based on entity size. - Added player eyeHeight field to allow changeable eye heights of players rather than being hardcoded per player class as well as add a getDefaultEyeHeight function. - - v99.99-pre-2841 fixed logic error - - v99.99-pre-2840 inserted hook into Minecraft.java - - v99.99-pre-2839 Added mouse event - - v99.99-pre-2838 Memoization of display name result - - v99.99-pre-2837 Update version to 9.10.1 for mcp naming changes. - - v99.99-pre-2836 Update forge for MCP naming updates - Updated FML: - MinecraftForge/FML@d0c6e92900590f578b80d9a6c00fa28fd333d3bf Update MCP data - - v99.99-pre-2835 Update MCP data - - v99.99-pre-2834 Merge remote-tracking branch 'forge/master' into objTessellation - - v99.99-pre-2833 Added display name hook - - v99.99-pre-2832 Fix possible NPE in searching code. - - v99.99-pre-2831 Updated FML: - MinecraftForge/FML@2a9c485edc4cf3382154d5b3b9b600386f2ab8ae Remove @SideOnly from 70318 (getDistance) it makes no sense that it's not on the server. - - v99.99-pre-2830 Remove @SideOnly from 70318 (getDistance) it makes no sense that it's not on the server. - - v99.99-pre-2829 Updated FML: - MinecraftForge/FML@a13598b17ea9637c054d867a76298d6c080c5e32 Use java 1.6 compatible method of closing the zip file. Stops stupid compile error. - - v99.99-pre-2828 Use java 1.6 compatible method of closing the zip file. Stops stupid compile error. - - v99.99-pre-2827 Small fix to container registry. emptyContainer is not null, it's "NULL_EMPTYCONTAINER" now and won't match any valid container. - - v99.99-pre-2826 Tweak the release to add in assets to the distributable. *sigh* - - v99.99-pre-2825 create french localization - - v99.99-pre-2824 Add some starting work for a forge tps command. Also update coremod for new FML behaviour - - v99.99-pre-2823 Updated FML: - MinecraftForge/FML@1c9a853868f7df0daa5f67b99401dfab44ae18e6 Allow coremods to properly inject asset readers. - MinecraftForge/FML@40b54013b4c9b01686411cd47a7866eeb650ea2b Allow server side lang file injection, hopefully - - v99.99-pre-2822 Allow server side lang file injection, hopefully - - v99.99-pre-2821 Allow coremods to properly inject asset readers. - - v99.99-pre-2820 capacity was not respected - Updated to properly calculate the amount of free space in the tank - before checking that against the amount of the resource. - - v99.99-pre-2819 Added GuiOpenEvent - You can use this for a clean way to override guis, without needing an - TickHandler to check if the gui you want to override is open and show - your own gui - Proper close check - - v99.99-pre-2818 Update tweaker for new Launcher API - - v99.99-pre-2817 Updated FML: - MinecraftForge/FML@b993cf4a9825865b3a8a0c7b083c23d56dbd1d6f More exception handling for less derpiness. - - v99.99-pre-2816 More exception handling for less derpiness. - - v99.99-pre-2815 In the time honoured tradition of trying to fix vanilla, we today attempt to patch the pathfinding AI so that it doesn't lag when - there's a lot of entities. Basically, if the zombie can't reach the villager, backoff subsequent pathfinding attempts. Hopefully - should really help with lag caused by zombie swarms. - - v99.99-pre-2814 Allow multipass RenderItem rendering for terrain icons too. Should fix sengir's saplings. - - v99.99-pre-2813 Updated FML: - MinecraftForge/FML@913f6f6d36bd179db7c147db0485e99dee693933 Try and use the relaunch log, which should be classloaded.. - MinecraftForge/FML@ac065ff5f76b6c512b346366107efde66e9e1c88 Reset the IWorldGenerator seed for each mod, before calling. That should mean worldgen is consistent and not dependent on mod ordering, or mod sideeffects. - - v99.99-pre-2812 Reset the IWorldGenerator seed for each mod, before calling. That should mean worldgen is consistent - and not dependent on mod ordering, or mod sideeffects. - - v99.99-pre-2811 Try and use the relaunch log, which should be classloaded.. - - v99.99-pre-2810 Skipp toss event for null entity items. Closes #732 - - v99.99-pre-2809 Cache world on all render passes in case some mod disables the first pass. - - v99.99-pre-2808 Fix bug with custom Fluids. You can now drown in them! - - v99.99-pre-2807 Updated FML: - MinecraftForge/FML@9468e41bbf3ea425c50daa710cf3ada11c82b238 Fix up scala refs, for better results - - v99.99-pre-2806 Fix up scala refs, for better results - - v99.99-pre-2805 Merge pull request #730 from Soaryn/patch-1 - Adds Temperature to Lava - - v99.99-pre-2804 Updated FML: - MinecraftForge/FML@ffdd056a18eddb8f28b74435d40e69c956b9dd48 Check keys, not values *sigh* - - v99.99-pre-2803 Check keys, not values *sigh* - - v99.99-pre-2802 Updated FML: - MinecraftForge/FML@f157e7a6ecdeac2758fc0eaf547d3e8a763fb15b And more coremod logging - - v99.99-pre-2801 And more coremod logging - - v99.99-pre-2800 Updated FML: - MinecraftForge/FML@4a9d0f9bd522e543b76daaf9c49b6214443c595f Add in some log information - - v99.99-pre-2799 Add in some log information - - v99.99-pre-2798 Updated FML: - MinecraftForge/FML@03989166665956df03aa85472eb13dca2d74a38d And actually instantiate the collection *sigh* - - v99.99-pre-2797 And actually instantiate the collection *sigh* - - v99.99-pre-2796 Updated FML: - MinecraftForge/FML@dec9a3924d361bc016cb7f6b3e95764158cf5ae1 Add in "FMLCorePluginContainsMod" in the manifest. If this value is present, FML will attempt to parse your mod jar file as a normal mod file as well, instantiating mod containers there. - - v99.99-pre-2795 Add in "FMLCorePluginContainsMod" in the manifest. If this value is - present, FML will attempt to parse your mod jar file as a normal mod - file as well, instantiating mod containers there. - - v99.99-pre-2794 Updated FML: - MinecraftForge/FML@24701206808a43b9c7b10d7130c47b5d1e841bb6 Clean up a couple of resources. Also, don't parse jars just because they're in the mods dir - - v99.99-pre-2793 Clean up a couple of resources. Also, don't parse jars just because - they're in the mods dir - - v99.99-pre-2792 Updated FML: - MinecraftForge/FML@9a5e24e338c6172531efb086a4b584c26d4f1435 Fix stupid derp is stupid. Closes #275 and means sp614x can do his thing - MinecraftForge/FML@ba90b616070ce15793eb05e5afaed62a6f07c6e7 Make sure we only add args to the argument list if a tweaker hasn't already. Should fix LiteLoader compatibility issue. - - v99.99-pre-2791 Make sure we only add args to the argument list if a tweaker hasn't already. - Should fix LiteLoader compatibility issue. - - v99.99-pre-2790 Fix stupid derp is stupid. Closes #275 and means sp614x can do his thing - - v99.99-pre-2789 Adds Temperature to Lava - Missing lava temperature. Feel free to change it to any value. - 1300K is the typical max for Magma so wasn't sure what was desired. Regardless, better than the same temp as water at 295K :smile: - - v99.99-pre-2788 Fix NPE in enchangint books. - - v99.99-pre-2787 Fix inverted case, search works now. - - v99.99-pre-2786 Merge pull request #606 from Shukaro/master - Add stone and cobblestone to ore dictionary - - v99.99-pre-2785 Addition: Added isAllowedOnBooks hook to Enchantments Closes #589 - - v99.99-pre-2784 Deprecate Block.addCreativeItems, Kill in 1.6.3+ Closes #655 - - v99.99-pre-2783 Merge pull request #679 from Chicken-Bones/invchanged - Add onNeighborTileChange callback to block by generalizing func_96440_m ... - - v99.99-pre-2782 Merge pull request #702 from MrMasochism/master - Added new function for control over dismount underwater - - v99.99-pre-2781 Allow creative tabs to have a search box if they want to Closes #592 - - v99.99-pre-2780 Merge pull request #717 from tommy1019/patch-3 - Fixed Fluid Non-Solid Block Duplication - - v99.99-pre-2779 Add optional feature to check entire bounding box for ladders. Closes #709 - - v99.99-pre-2778 Fixed Classic Checking - - v99.99-pre-2777 Fixed Double Item Drop - - v99.99-pre-2776 Fixed Fluid Non-Solid Block Duplication - - v99.99-pre-2775 Only refresh vanilla tile entities when IDs change. - - v99.99-pre-2774 Updated FML: - MinecraftForge/FML@f275a24b43559cfdced243ff77e9848c9d458362 Add in some reverse lookup methods for game registry data - MinecraftForge/FML@cb05c8c4aa60a131de92f0a21c06697c8f8896a8 Add missing SideOnly in BaseMod - MinecraftForge/FML@1857064afa9ace796440c19f3275637a6e659375 Merge pull request #266 from grompe/patch-1 - MinecraftForge/FML@182aa9c0cbe61ac69b0d428ead1dc817dd2a2e71 Fixed install.sh not passing arguments to install.py - MinecraftForge/FML@f46a538b41157081c840f647f123513ac4c5a071 Merge pull request #268 from Bo98/sh-args-fix - MinecraftForge/FML@29ef3d5ab412dcabbd67695558880c45011ace82 Update installer. - - v99.99-pre-2773 Update installer. - - v99.99-pre-2772 Merge branch 'miscchanges' - - v99.99-pre-2771 Merge pull request #610 from purpleposeidon/patch-1 - Add an InputStream constructor to WavefrontObject - - v99.99-pre-2770 Merge pull request #704 from StormTiberius/master - Adds cloud height to WorldType - - v99.99-pre-2769 Merge pull request #268 from Bo98/sh-args-fix - Fixed install.sh not passing arguments to install.py - - v99.99-pre-2768 Merge pull request #706 from heldplayer/fluidRendering - Fix small derp - - v99.99-pre-2767 Merge pull request #705 from heldplayer/fluids - Fix render colour on bottom of fluids - - v99.99-pre-2766 Fix small derp - - v99.99-pre-2765 Fix render colour on bottom of fluids - - v99.99-pre-2764 Fixed install.sh not passing arguments to install.py - - v99.99-pre-2763 Add cloud height to WorldType - - v99.99-pre-2762 Merge pull request #266 from grompe/patch-1 - Add missing SideOnly in BaseMod - - v99.99-pre-2761 Merge branch 'master' of github.com:EnderShadow/MinecraftForge into miscchanges - - v99.99-pre-2760 Add missing SideOnly in BaseMod - NetClientHandler exists only on client side and thus method using it should be annotated with SideOnly. - - v99.99-pre-2759 added temperature to fluids - it could be useful for blocks that are affected by temperature - - v99.99-pre-2758 Added a new function to allow control over whether an entity is dismounted when the entity it is riding goes under water - - v99.99-pre-2757 Merge pull request #700 from iChun/miscchanges - Fix RenderLivingEvent.Pre/Post not being fired by most Renders. - - v99.99-pre-2756 Fix RenderLivingEvent.Pre/Post not being fired by most Renders. - - v99.99-pre-2755 Add in some reverse lookup methods for game registry data - - v99.99-pre-2754 Updated FML: - MinecraftForge/FML@57befa89bbbf2bc2fcc4a97b78e07b3f9e23ef9d Fix keybindings being derped - MinecraftForge/FML@1d84e8063e9d0dc73928dba006e6001201285cad Temporarily add a version of 'reobfuscate.py' that will resolve complex reobfuscation graph issues with specialsource. Copy it over 'reobfuscate.py' in the mcp runtime dir. Hopefully will have an MCP/specialsource fix in the coming days. - - v99.99-pre-2753 Temporarily add a version of 'reobfuscate.py' that will resolve complex - reobfuscation graph issues with specialsource. Copy it over 'reobfuscate.py' - in the mcp runtime dir. Hopefully will have an MCP/specialsource fix in - the coming days. - - v99.99-pre-2752 Fix keybindings being derped - - v99.99-pre-2751 Tweak setBlock in update tick - it should only send serverside updates for - source blocks. Experimental attempt to fix worldgen issues for fluid blocks - - v99.99-pre-2750 Fix formatting error in PR - - v99.99-pre-2749 Merge pull request #695 from tommy1019/master - Fluid Rendering Fixes - - v99.99-pre-2748 Fluid Rendering Fixes - - v99.99-pre-2747 Add a translation map for looking up legacy liquid names to convert - to new fluid names. - - v99.99-pre-2746 Add support for loading legacy liquid stacks as new fluid stacks. - Requires having been written with the "liquidname" code from forge 1.5.x - - v99.99-pre-2745 Merge branch 'master' of github.com:tommy1019/MinecraftForge into miscchanges - - v99.99-pre-2744 Fix names for water/lava fluids. Closes #689 - - v99.99-pre-2743 Merge branch 'master' of github.com:iChun/MinecraftForge into miscchanges - - v99.99-pre-2742 Add SneakClick bypass to client - - v99.99-pre-2741 Fixed fluids eating each other - Fluids check for other fluids density before flowing, if their density - is higher they can flow into the other fluid, if not they can't. - - v99.99-pre-2740 Update RendererLivingEntity.java.patch - - v99.99-pre-2739 if statement added - - v99.99-pre-2738 Add Pre and Post events firing for RendererLivingEntity - - v99.99-pre-2737 Add Pre and Post events for RenderLivingEvent - - v99.99-pre-2736 Fluid Render Fix - Formatting - - v99.99-pre-2735 Merge pull request #665 from copyboy/master - Fix getArmorTexture by passing it the subtype - - v99.99-pre-2734 Fix getArmorTexture by passing it the subtype - - v99.99-pre-2733 Re-added deprecated liquids system. To be removed next major MC versions after issues with Fluids are fixed. (reverse-merged from commit 9b5208fa308f22c24e295ce3be38dcafea2857ea) - This WILL be removed and should not be developed against aside for a temporary 1.6 release. - - v99.99-pre-2732 Remove SideOnly(Client) in IBlockAccess.isAirBlock - - v99.99-pre-2731 MinecraftForge/FML@10b16d32da4b7c32b15e69cf1c636505ebbe2540 Use json 2.9.1 nightly for OSX in release json like vanilla does. - - v99.99-pre-2730 Use json 2.9.1 nightly for OSX in release json like vanilla does. - - v99.99-pre-2729 General code cleanup of Fluid system. Made Fluid icons and associated functions non-sided. - - v99.99-pre-2728 MinecraftForge/FML@3f21a2c1b413e591f61f2906c3adbadd9c5b09e3 Stupid spaces and windows escaping -.- - - v99.99-pre-2727 Stupid spaces and windows escaping -.- - - v99.99-pre-2726 Package 'version.json' with universal jar for maunchers to use. It's the json used by the vanilla Minecraft launcher for Forge. - - v99.99-pre-2725 MinecraftForge/FML@b2958c9066db8c95bb4260893fbfe00103fc4ba1 Add quotes for paths with spaces -.- - - v99.99-pre-2724 Add quotes for paths with spaces -.- - - v99.99-pre-2723 MinecraftForge/FML@9520978b81d4cba5d8b0af0d5f155bd115023795 Use a temporary file for recompile's command line to combat command length to long issues. - - v99.99-pre-2722 Use a temporary file for recompile's command line to combat command length to long issues. - - v99.99-pre-2721 Add onNeighborTileChange callback to block by generalizing func_96440_m to all blocks rather than just comparators. - - v99.99-pre-2720 Updated FML: MinecraftForge/FML@4981aa3421262c3c1c4705468fe202df8198b9f0 Fix potential NPE in villager skin registry. Closes #678 - - v99.99-pre-2719 Fix potential NPE in villager skin registry. - - v99.99-pre-2718 Merge pull request #675 from Soaryn/patch-1 - Fixes Vanilla Fluid Still Icon Setters - - v99.99-pre-2717 Fixes Vanilla Fluid Still Icon Setters - Fixes null icons from being set for both the still water/lava icons, and sets the correct Icon. - - v99.99-pre-2716 Updated FML: MinecraftForge/FML@c48b48ee15f38d3e794b6eb3499c536226ca5a79 Fix server launching. - - v99.99-pre-2715 Fix server launching. - - v99.99-pre-2714 Fix for new location of mcp logo. - - v99.99-pre-2713 Updated FML: - MinecraftForge/FML@0378355c3720d587652b7792665a8b70bf104eb3 The server.classpath generates the runtime manifest, so it needs the non-debug asm jars. - MinecraftForge/FML@a3f48734ffbbb2eccffdafcd3cbe73824bd1afd6 Fix up jar sanity check code. FML validation of the jar works now and doesn't derp classloading. - MinecraftForge/FML@9947ba85036542a3231e25328d3300f2a5337370 Fix logo handling. no more NPE if the logo can't be found. Also, fix location of mcp logo now. - - v99.99-pre-2712 Fix logo handling. no more NPE if the logo can't be found. Also, fix location of mcp logo now. - - v99.99-pre-2711 Fix up jar sanity check code. FML validation of the jar works now and doesn't derp classloading. - - v99.99-pre-2710 The server.classpath generates the runtime manifest, so it needs the - non-debug asm jars. - - v99.99-pre-2709 Monkey patch to try and make print flush properly. - - v99.99-pre-2708 Update changelog generator to point to new jenkins. - - v99.99-pre-2707 MinecraftForge/FML@c625ef30093abb0755985c74d1f31e2c4cf6cfdd Update Forge signature for new private key - - v99.99-pre-2706 Update Forge signature for new private key - - v99.99-pre-2705 Updated FML: - MinecraftForge/FML@7348929819b0ae8ad35419ef5dbf66e66b442858 Kill release time scala libraries, to be re-evaluated after all movement is done and shit is fixed. May require manual instalation for mods that use scala. - MinecraftForge/FML@6de36d78f57f6f08ec586b67b684d0e5406cd436 Coremods now have a primitive dependency capability. Also, we search mods dir for special "TweakClass" manifests. These are using the vanilla tweak mechanism to inject into Minecraft. Helpful for other "platform" systems, when you don't want to have to deal with json changes! - MinecraftForge/FML@d4b30422b64a62a2f8a8c2cccd94cb0fd06154e0 Update build and eclipse workspaces for debug asm. - - v99.99-pre-2704 Update build and eclipse workspaces for debug asm. - - v99.99-pre-2703 Coremods now have a primitive dependency capability. Also, we search mods dir for special - "TweakClass" manifests. These are using the vanilla tweak mechanism to inject into - Minecraft. Helpful for other "platform" systems, when you don't want to have to deal - with json changes! - - v99.99-pre-2702 Kill release time scala libraries, to be re-evaluated after all movement is done and shit is fixed. May require manual instalation for mods that use scala. - - v99.99-pre-2701 MinecraftForge/FML@b9f4b02cb0b041594656f05de70225df702a8ddd Kill mcp's truncate method, for more useful logs. - - v99.99-pre-2700 Merge pull request #661 from Adubbz/master - Made eating particles compatible with metadata - - v99.99-pre-2699 Kill mcp's truncate method, for more useful logs. - - v99.99-pre-2698 Updated FML: - MinecraftForge/FML@e44e8b3112bd56c716a00c19d0be2f15d9128b70 Force a global asset scan prior to mod construction : you should be able to reference assets anywhere in your mod now. - MinecraftForge/FML@20e93a412ee13498babef02d404f57bf5e0fd919 Fix up logos in the mod screen. Clean up some unnecessary casts and suppressions, use the -debug asm library at dev time, since it contains full symbols and code in compiled form. - - v99.99-pre-2697 Fix up logos in the mod screen. Clean up some unnecessary casts and suppressions, use the -debug asm - library at dev time, since it contains full symbols and code in compiled form. - - v99.99-pre-2696 Made eating particles compatible with metadata - Removed extra spaces - Made eating particles compatible with metadata - - v99.99-pre-2695 Force a global asset scan prior to mod construction : you should be able to - reference assets anywhere in your mod now. - - v99.99-pre-2694 Re-add reverted patch AGAIN cpw check your commits -.- - - v99.99-pre-2693 Updated FML: - MinecraftForge/FML@bab4d87ce76baa40200939cc46780b1d3b2ff466 Update FML for new stealth update for 1.6.2 - - v99.99-pre-2692 Update FML for new stealth update for 1.6.2 - - v99.99-pre-2691 Remove forge ISidedInventory, deprecated since 1.5. - - v99.99-pre-2690 Allow optional rider interaction for entities, thanks for the suggestion Vswe. - Updated FML: - MinecraftForge/FML@7af5c21d74679d1a53550f9719bba22b2f28dd13 @InstanceFactory was set to look for Fields instead of methods - MinecraftForge/FML@bc9d1fe657c7a0953adc7d4c5ed81c575bdfb0f1 Merge pull request #254 from CaptainShadows/patch-1 - - v99.99-pre-2689 Merge pull request #254 from CaptainShadows/patch-1 - @InstanceFactory was set to look for Fields instead of methods - - v99.99-pre-2688 Updated FML: - MinecraftForge/FML@97269a5e3dc0a0e2e1a79183f9f5f2ee120e90bd Decode the file URL. Hopefully will make things work more.. - MinecraftForge/FML@d4d522c5978ecd7a9195977b3327b441901bb5b4 And don't forget to remove the test code - - v99.99-pre-2687 And don't forget to remove the test code - - v99.99-pre-2686 Decode the file URL. Hopefully will make things work more.. - - v99.99-pre-2685 MinecraftForge/FML@c913258ca38e662264bdf4aafbfbef86881c9290 Disable signature check of client for now, it's broken. - - v99.99-pre-2684 Disable signature check of client for now, it's broken. - - v99.99-pre-2683 Updated FML: - MinecraftForge/FML@dfa3a2665d6782b87713cea26dda558ac990a72a Add MC Version to installed version name. - MinecraftForge/FML@e91431fb707ce3e7e4296ccb8f3b2e5208b4dfac Don't validate signatures on servers, they are not signed. - MinecraftForge/FML@c7ab872c85dd057a4e44e12e34089dfd1a1184b6 Temporarily disable GuiModList's Mod logos. - - v99.99-pre-2682 Temporarily disable GuiModList's Mod logos. - - v99.99-pre-2681 Don't validate signatures on servers, they are not signed. - - v99.99-pre-2680 Add MC Version to installed version name. - - v99.99-pre-2679 Updated FML: - MinecraftForge/FML@c997f2adbc4c11cd8c2abe5f82ccd00b0e954b68 FML now verifies that the minecraft jar is correct and intact. This is intended to discourage those who think that modifying the minecraft jar is still acceptable. - MinecraftForge/FML@0db4624b27a5ecf59ed506ccfc26459ca26ee408 Don't initialize the server. - MinecraftForge/FML@4fa375683fdb7edff67c951fb371ab4a23435308 Fix NPE in new debug line when patch targets don't exist. - - v99.99-pre-2678 Fix NPE in new debug line when patch targets don't exist. - - v99.99-pre-2677 Don't initialize the server. - - v99.99-pre-2676 FML now verifies that the minecraft jar is correct and intact. This is intended to discourage those who think that - modifying the minecraft jar is still acceptable. - - v99.99-pre-2675 Proper return for getRegisteredFluidContainerData thanks Soaryn. Ref issue #634 - - v99.99-pre-2674 Fix accedential reverted patch. - - v99.99-pre-2673 Make resourcelocation the class available on the server. - - v99.99-pre-2672 Test server-siding ResourceLocation - - v99.99-pre-2671 Drop two domain related fixes that have been applied in vanilla. - Updated FML: - MinecraftForge/FML@c47d08c89dfcacb96e36c427593174e08dcb4224 Tweak debug data on patched classes - MinecraftForge/FML@dbf5fe38cee04288e92d57f8782114b452245bce We now generate an adler32 checksum for each patched file and verify at load time that they match. Mismatch won't crash, but will emit a big warning.. - MinecraftForge/FML@e88a0cd13f63904f7317e1a73880611f58820389 Update for stealth update. Thanks mojang! - MinecraftForge/FML@2336002f20e9412a7663781b23c51de0eff6a692 The game is going to exit in face of patch mismatch, unless you force it to run with fml.ignorePatchDiscrepancies in the system properties. - - v99.99-pre-2670 The game is going to exit in face of patch mismatch, unless you force it to run with fml.ignorePatchDiscrepancies in the system properties. - - v99.99-pre-2669 Update for stealth update. Thanks mojang! - - v99.99-pre-2668 We now generate an adler32 checksum for each patched file and verify at load time that they match. - Mismatch won't crash, but will emit a big warning.. - - v99.99-pre-2667 Tweak debug data on patched classes - - v99.99-pre-2666 @InstanceFactory was set to look for Fields instead of methods - "fix it" to now match the javadoc :P - if it was set like that so modders wouldn't use it, it might be better to just say so in the documentation - - v99.99-pre-2665 Bump version to 9.10 for new MC version and removal of Fluids. - - v99.99-pre-2664 Remove deprecated Liquids API, Use new Fluids system as replacement. - - v99.99-pre-2663 Updated FML: - MinecraftForge/FML@1d0384f8f664d7002019b865675a5fddf2963b3d Update for 1.6.2 and MCP 8.04 - MinecraftForge/FML@111b0216fdc55f56a8361a584141bca7c9c3f070 Add the jsons for 1.6.2 - MinecraftForge/FML@6f96d89e2bf9313b26eeb4c334a208bf3e1c9ad4 Update eclipse workspaces for 1.6.2 - - v99.99-pre-2662 Update eclipse workspaces for 1.6.2 - - v99.99-pre-2661 Add the jsons for 1.6.2 - - v99.99-pre-2660 Update for 1.6.2 and MCP 8.04 - - v99.99-pre-2659 Updated FML: - MinecraftForge/FML@c97ac284a5e7dbdbccbad2f7ccc95252c4aef239 Update ModLoaderFuelHelper.java - MinecraftForge/FML@3a200e901e34ade679e4485307f57bee725bbe94 Fix coremod injection into main system. Should stop double-dipping coremods. - MinecraftForge/FML@2676c8999cbede05b5475ba68bfc25467a67d4fc Update mcp data. fixes #248 - MinecraftForge/FML@5990e29af7b70e343dfd9cf38bb3e033e71a4489 Merge pull request #247 from jk-5/patch-1 - MinecraftForge/FML@adc89722770b7319884619cadc6f10cc9050df24 Add cascadedTweaks. This will allow simple coexistence for any other mod framework using the tweaker system as well. Hi Voxel and LiteLoader! - - v99.99-pre-2658 Add cascadedTweaks. This will allow simple coexistence for any other mod framework using - the tweaker system as well. Hi Voxel and LiteLoader! - - v99.99-pre-2657 Merge pull request #247 from jk-5/patch-1 - Pull request for #232 - - v99.99-pre-2656 Update mcp data. fixes #248 - - v99.99-pre-2655 Fix coremod injection into main system. Should stop double-dipping coremods. - - v99.99-pre-2654 Merge pull request #645 from XCompWiz/bedspawn - Makes player-specific spawnpoints dimension aware - - v99.99-pre-2653 Makes player-specific spawnpoints dimension aware - Makes ServerConfigurationManager correctly get player-specific spawn - point for the target dimension - Changes EntityPlayer to store and save a (bed) spawn point for every - dimension, as well as transfer them to respawn "clones" - - v99.99-pre-2652 Re-gather list of Icons when atlas textures are stitched, allows for addition/removal of blocks/items after the atlas's inital constrction. - - v99.99-pre-2651 Fix enchantment effect on single pass items. Closes #644 - - v99.99-pre-2650 Merge pull request #642 from MinecraftForge/newliquid - New liquid system - - v99.99-pre-2649 Mark old liquid system as deperated to be removed next Minecraft release. - - v99.99-pre-2648 Merge remote-tracking branch 'refs/remotes/origin/newliquid' into newliquid - - v99.99-pre-2647 Merge branch 'master' into newliquid - - v99.99-pre-2646 Update ModLoaderFuelHelper.java - - v99.99-pre-2645 Updated FML: MinecraftForge/FML@54e06e841d1c8df24fc30e1ec3a51def67f58858 Move Resource refreshing until affter postInit. - - v99.99-pre-2644 Move Resource refreshing until affter postInit. - - v99.99-pre-2643 Add missing air checks to WorldGenTrees and ChunkCache Closes #593 - - v99.99-pre-2642 Fix compile errors temporarily, dont use till updated to new system. - - v99.99-pre-2641 Merge pull request #539 from richardg867/techne-1 - Techne model importer - - v99.99-pre-2640 Render pass sensitive version of Item.hasEffect, Closes #517 - - v99.99-pre-2639 Fix lether item rendering colors. - - v99.99-pre-2638 Add hook for EntityWither trying to destroy a block. - - v99.99-pre-2637 Merge pull request #600 from Lunatrius/rotation - Added rotation support for all vanilla blocks that can be rotated. - - v99.99-pre-2636 Fix domain issue with SoundPool entries. - - v99.99-pre-2635 Updated FML: - MinecraftForge/FML@7ce84491d1d4eada442944e02fc0e50c51f8045c Fix missing argument and startclient/startserver support. - - v99.99-pre-2634 Fix missing argument and startclient/startserver support. - - v99.99-pre-2633 Updated FML: - MinecraftForge/FML@155e8468180c93f1886a64028628764b1b22dd58 Add in support for mods/ as a mod location. Also drop coremods as a location. They go in mods too now. - MinecraftForge/FML@3f4bf61ae6757605b27078c7321de9f640876836 Update key - MinecraftForge/FML@4545beb49d5348d8632e42965627b9837115525b Add deobf-data to setup env. - MinecraftForge/FML@e24f94951741709329208f738000b72933302a24 Fix eclipse workspaces and launch configurations. - MinecraftForge/FML@532bee7ce1c4392ee11f0389d98f0c2be6240aa0 Update to new MCP bugfix version, Fixes: Missing Armor/Item rendering, and Boss health mapping issues. - - v99.99-pre-2632 Update to new MCP bugfix version, Fixes: Missing Armor/Item rendering, and Boss health mapping issues. - - v99.99-pre-2631 Fix eclipse workspaces and launch configurations. - - v99.99-pre-2630 Add deobf-data to setup env. - - v99.99-pre-2629 Include MANIFEST file from FML's universal.jar, makes the jar runnable now! - - v99.99-pre-2628 TEMPORARY fix for MCP mapping issue. - - v99.99-pre-2627 Update dev worksapce: Proper natives location and new server launch profile. - - v99.99-pre-2626 Update key - - v99.99-pre-2625 Add in support for mods/ as a mod location. Also drop coremods as a location. They go in mods too now. - - v99.99-pre-2624 Updated FML: - MinecraftForge/FML@6f0eedc9a64e4e246c40335e91b4868ad7f5a9e2 Fixed ClassCastException when loading ModLoader mods - MinecraftForge/FML@8844554da6d5d15756d7b0a9da2f5924006b3190 Merge pull request #243 from jrtc27/modclassloader - MinecraftForge/FML@7aa7221756d62ea1fbc750d7cf7acfdb28d75f2e Fix transformer search - MinecraftForge/FML@5f7df5e742cbc21565cee0d25709b5cb5462127c Revert "Keep these on our servers until the launcher is actually fixed -.-" - MinecraftForge/FML@ad79b9ed86eaf8c2702d79505d78a931c1774560 Fix up some deprecation warnings, and clean up coremod code that's going away. - MinecraftForge/FML@ba3707af22376f8f18103f63db56e4614a9c37db More javadoc cleanup - - v99.99-pre-2623 More javadoc cleanup - - v99.99-pre-2622 Fix up some deprecation warnings, and clean up coremod code that's going - away. - - v99.99-pre-2621 Revert "Keep these on our servers until the launcher is actually fixed -.-" - This reverts commit f1b533ad87ea08d6e62259c59779bcec1636e2fe. - - v99.99-pre-2620 Fix transformer search - - v99.99-pre-2619 Merge pull request #243 from jrtc27/modclassloader - Fixed ClassCastException when loading ModLoader mods - - v99.99-pre-2618 Attempt to gather lastBuild information to fix ChangeLog's off-by-one issue. - - v99.99-pre-2617 Move resource location resolution down to TextureAtlasSprite and allow for sprites that are not stitched. - - v99.99-pre-2616 Fixed ClassCastException when loading ModLoader mods - - v99.99-pre-2615 Start: f1b533ad87ea08d6e62259c59779bcec1636e2fe - End: f21cd286ca8e974b75536224a38cc0dacaca8454 - Updated FML: - MinecraftForge/FML@f21cd286ca8e974b75536224a38cc0dacaca8454 Resource packs, part two. FML mods are now resource packs. Vanilla will scan anything under 'assets' and turn it into a resource prefix. Use resourcelocations to look stuff up. - - v99.99-pre-2614 Resource packs, part two. FML mods are now resource packs. Vanilla will scan anything under 'assets' - and turn it into a resource prefix. Use resourcelocations to look stuff up. - - v99.99-pre-2613 Update ChestGenHooks for new Dungeon chest strcture. - - v99.99-pre-2612 Fix resource domain when loading icon. Textures should be located in /assets/{domain}/textures/{block|item}/{name}.png Same strcutre as before except 'assets' instead of 'mods'. - - v99.99-pre-2611 Update filler block to prevent useless console warning. - - v99.99-pre-2610 Make Block.setIconName public - - v99.99-pre-2609 Fix bound texture in Controls screen, Closes #631 and #629 - - v99.99-pre-2608 Updated FML: - MinecraftForge/FML@5a97d183dfb13b0f831172a1afef7407347ea7bc Remember to update your patches!!!! - MinecraftForge/FML@f1b533ad87ea08d6e62259c59779bcec1636e2fe Keep these on our servers until the launcher is actually fixed -.- - - v99.99-pre-2607 Keep these on our servers until the launcher is actually fixed -.- - - v99.99-pre-2606 Remember to update your patches!!!! - - v99.99-pre-2605 Updated FML: - MinecraftForge/FML@91ecf711092e1610dd10e77cdd517c3324e62d8d Fix -rel json - MinecraftForge/FML@efc369ee83a7b62f605c13e16efad66b63b4bd8c Fix EventHandler annotation. - MinecraftForge/FML@fbd57b32641b540d609314d91fd64350d50b9013 Mods are now loaded as resource packs. Vanilla will scan for valid prefixes based on subdirs of 'ass - ets' which can then be referenced as ResourceLocations with the ":path" notation. - - v99.99-pre-2604 Mods are now loaded as resource packs. Vanilla will scan for valid prefixes based on subdirs of 'assets' which - can then be referenced as ResourceLocations with the ":path" notation. - - v99.99-pre-2603 Fix EventHandler annotation. - - v99.99-pre-2602 Fix -rel json - - v99.99-pre-2601 Fix installer unintended replace. - Updated FML: - MinecraftForge/FML@9b6525e80504ff72a1798cf5797bf148295db776 Point scala downloads to our servers, Launcher doesn't like standard maven repos. - - v99.99-pre-2600 Point scala downloads to our servers, Launcher doesn't like standard maven repos. - - v99.99-pre-2599 Updated FML: - MinecraftForge/FML@29d6c875d0675ffa14428c511bd6ebe9232a486c Add FML Installer logo crated by @ZaverSLO https://twitter.com/ZaverSLO/status/349947190300508162 - MinecraftForge/FML@3d17434510e890574b68c8a181b80c830b5d043a Build installer package for the new client launcher. - MinecraftForge/FML@bf38d947569911dab03319a8b0f1964f36b195b2 Update json samples - MinecraftForge/FML@7037184a4e724300001dfc1f8df2e76a0ec30368 Fix up release JSON - MinecraftForge/FML@dc7d02ebf6c9fc5965344a9aeca79f230a40afb4 Fix json syntax error. - - v99.99-pre-2598 Release will now build a installer jar and use the standard 'target' output folder. - - v99.99-pre-2597 Update ToolMaterial enum helper. - - v99.99-pre-2596 Fix json syntax error. - - v99.99-pre-2595 Fix up release JSON - - v99.99-pre-2594 Update json samples - - v99.99-pre-2593 Build installer package for the new client launcher. - - v99.99-pre-2592 Add FML Installer logo crated by @ZaverSLO https://twitter.com/ZaverSLO/status/349947190300508162 - - v99.99-pre-2591 Merge pull request #627 from MinecraftForge/1.6 - Merge 1.6 branch - - v99.99-pre-2590 Update src distro installer script. Source distro works now! - - v99.99-pre-2589 Updated FML: - MinecraftForge/FML@1229c4c4ea888f4f69272eed94ef5a53ce79ccda Fix src distrabution, and got rid of pesky common folder in eclipse workspace. src is now installable. - MinecraftForge/FML@902772ed0cb6c22c4cd7ad9b0ec7a02961b5e016 Revert common folder fix, Common folder does nothing, feel free to delete it after first load. - - v99.99-pre-2588 Revert common folder fix, Common folder does nothing, feel free to delete it after first load. - - v99.99-pre-2587 Fix src distrabution, and got rid of pesky common folder in eclipse workspace. src is now installable. - - v99.99-pre-2586 Merge pull request #626 from MinecraftForge/1.6 - 1.6.1 Branch Merge - - v99.99-pre-2585 Try absolute path, to not confuse jenkins. - - v99.99-pre-2584 MinecraftForge/FML@7fecf2ad6bdd918149a3c43453f6a78bd11e5404 Update mcp URL. - - v99.99-pre-2583 Update mcp URL. - - v99.99-pre-2582 Deprecation sweep and update version to 8.9 to reflect 1.6.1 update. - - v99.99-pre-2581 Update release script to generate binary patches and include deobf data. - - v99.99-pre-2580 Updated FML: - MinecraftForge/FML@c418da353f6a8420b095fa737e8b0eae270d31ae Cleanup coremod code, server side working now. - - v99.99-pre-2579 Update GuiIngameForge to reflect Mojang changes in 1.6.1 - - v99.99-pre-2578 Add new launch configs to dev workspace. - - v99.99-pre-2577 Cleanup coremod code, server side working now. - - v99.99-pre-2576 1.6.1 Update - - v99.99-pre-2575 Support dirty submodules in changelog script. - - v99.99-pre-2574 Updated FML: - MinecraftForge/FML@110cf372eb5aa85df20b248976f1acdefa85e102 Add deobf data to merge-common, workspace is now actually runnable! - - v99.99-pre-2573 Add deobf data to merge-common, worspace is now actually runnable! - - v99.99-pre-2572 Updated FML: - MinecraftForge/FML@8960f6869fbe30d358a40997c47999025c3eae68 Add windows lzma executable http://tukaani.org/xz/ He states that most things are under public domai - n, But I couldn't find an exact reference to this executable. I'm going to assume it under public domain and distribuiting it here is fine. If not someone pleas - e direct me to the apropriate license and I will act accordingly. - MinecraftForge/FML@70cfe24e67adf6872ef1501599e2115e420c2539 Fix wrong project name in distro eclipse launch. - MinecraftForge/FML@7a004087f79b94bc92f29d50eb71288b6c1c968c Add deobf data to src dist. Dont create deobf jar as we ship the lzma Added *.lzma to .gitignore - - v99.99-pre-2571 Add deobf data to src dist. - Dont create deobf jar as we ship the lzma - Added *.lzma to .gitignore - - v99.99-pre-2570 Fix wrong project name in distro eclipse launch. - - v99.99-pre-2569 Add windows lzma executable - http://tukaani.org/xz/ - He states that most things are under public domain, But I couldn't find an exact reference to this executable. - I'm going to assume it under public domain and distribuiting it here is fine. If not someone please direct me to the apropriate license and I will act accordingly. - - v99.99-pre-2568 Updated FML: - MinecraftForge/FML@6a318ddb784ca8b2bef0f6718089f7beb4d404e0 Fix typo in new packages. - MinecraftForge/FML@3711da9c456d20865a965734cc5aeaf7f5cb5e5d Another typo - MinecraftForge/FML@e35e4b16ff3d6dea547c41f02f2ca31ebe1f74aa More fixups - MinecraftForge/FML@18371bd8c9bd107f774289da35519f593ccc8ee7 Some fixes for updated mcp code - MinecraftForge/FML@ef646d3146e1f285d2cb8e79a74373beffa84774 Merge branch '16launch' - MinecraftForge/FML@7406b38d8ad1bc5c2c641c74f1614b946f246588 1.6.1 - MinecraftForge/FML@12c928c538c1c04d3a21255c747d15468328ace9 Tweak commands patch - MinecraftForge/FML@3f15cd54c2d776ea161aaedbecad9e188d66578f Functional client @ 1.6.1 - MinecraftForge/FML@71a92de5d95fccc4fe17cc39d0836891c6622f4d Client launch for eclipse - - v99.99-pre-2567 Small fixup, need to Update GuiIngameForge for new HUD changes. - - v99.99-pre-2566 Client launch for eclipse - - v99.99-pre-2565 Functional client @ 1.6.1 - - v99.99-pre-2564 Tweak commands patch - - v99.99-pre-2563 1.6.1 - - v99.99-pre-2562 Merge branch '16launch' - - v99.99-pre-2561 Some fixes for updated mcp code - - v99.99-pre-2560 More fixups - - v99.99-pre-2559 Initial patch update to 1.6, Does not compile, need to update references to the old TexturePack system. - - v99.99-pre-2558 Update FML to 16launch branch - - v99.99-pre-2557 Update workspace for new library structure. - - v99.99-pre-2556 Another typo - - v99.99-pre-2555 Fix typo in new packages. - - v99.99-pre-2554 Push conf folder for 1.6, Relied heavily on a yet-unreleased version of MCP. - - v99.99-pre-2553 Added more render methods to IModelCustom interface. - - v99.99-pre-2552 Fixed both RenderAllExcept behaviours - - v99.99-pre-2551 More fixes, binpatching works - - v99.99-pre-2550 First draft of 1.6 update - - v99.99-pre-2549 New mappings for marker - - v99.99-pre-2548 Tweak missing mapping - - v99.99-pre-2547 Added tessellation methods to obj model, for ISBRH-friendliness - - v99.99-pre-2546 Add support for alternative maven servers in libraries. - Also download sources for public libraries, and atach them in eclipse. DOCUMENTATION!! YAYA! - - v99.99-pre-2545 Base GenDiff off deobf data's class list instead of the merged jar. Add option to delete target files that generate patches. - - v99.99-pre-2544 Add Clean Server/Client launcher. Update Start.java to new Main class and login system. - - v99.99-pre-2543 Update eclipse projects for new libraries dependancies, and update packages for new 1.6 classes. - - v99.99-pre-2542 Add suggestions output if it can. - - v99.99-pre-2541 Fixed update_packages.py for new folder strcture. - - v99.99-pre-2540 Add missing argument - - v99.99-pre-2539 Re-wrote/orginized a lot of fml.py. Almost everything is re-written/moved. - This is done in preperation for MCP to roll out SpecialSource support and the new 1.6 structure. - Also done for my sanity while reading through the code. - Intruduced a new function. If there is a 'mcp_data' folder in the FML folder, it will be copied to the MCP work directory after MCP is extracted. - It DOES overwrite anything that already exists. - This is intended for places like BuildServer to place libraries/assets to prevent them from needing to be downloaded every version. - Introduced a dev-env json. Need to write the eclipse workspace references to the new libraries. - Out custom json includes asm and legacylauncher. - Added proper OptionParsing to decompile.py - - v99.99-pre-2538 Add a simple property annotation system for mods. - - v99.99-pre-2537 Changed to the EventHandler annotation universally, documentation and stuff. - - v99.99-pre-2536 Fixes, so it builds again.. - - v99.99-pre-2535 Ignore binpatch - - v99.99-pre-2534 Add filter support for MCPMerger, and filter out libraries from the server's 'fat jar'. - - v99.99-pre-2533 Upgraded minecraft downloader to work with new launcher's asset/library system - New parameter: - --no-assets: Disables the downloading of minecraft's asset tree, recomended that build servers supply this flag to prevent downloading of useless data. - - v99.99-pre-2532 Add an InputStream constructor to WavefrontObject - It is said that Resource Packs will return InputStreams. And I like putting my models into texture packs which, obviously, give InputStreams rather than URLs. - - v99.99-pre-2531 Update OreDictionary.java - - v99.99-pre-2530 Add air check to Flint and Steel Ref: #602 - - v99.99-pre-2529 Fic Chest content gneeration delegate call. Cloases #609 - - v99.99-pre-2528 Bump Forge revision and mark recomended. - - v99.99-pre-2527 No more debug please - - v99.99-pre-2526 Fix build script. Add a sample JSON file. You'll need the newest Launcher code to run this. - - v99.99-pre-2525 More fixups for new launcher model - - v99.99-pre-2524 Merge in binpatch and use launcher - - v99.99-pre-2523 Add air checks to BlockSand falling and Piston pushing. Please report any other issues with custom 'Air' blocks in issue #602 - - v99.99-pre-2522 Added EntityLiving to Block.isLadder arguments, deperacating older version. New parameter has the possibility of being null, so modders must take care. Closes #608 - - v99.99-pre-2521 Merge pull request #607 from heldplayer/tripwires - Fix tripwire patches for solid side checks - - v99.99-pre-2520 Fix tripwire patches for solid sides - - v99.99-pre-2519 More tweaks - - v99.99-pre-2518 Server side tested and working. Setup is complex atm. That will change. - - v99.99-pre-2517 First cut of runtime binary patching. Needs some work to actually test it in a real scenario.. - - v99.99-pre-2516 Add stone and cobblestone to Ore Dictionary - - v99.99-pre-2515 Fix server patch FML update - Updated FML: - MinecraftForge/FML@22738de028a9ba51d43d73857dfb8969985566f0 Attempt to properly fix deadlock if the internal server derps. It should never hang now. Damn you fast computer.. - MinecraftForge/FML@05a854cd2af53ca822ee8b249b0b3bbe44f94675 Small tweaks to the mcp data. Nothing major.. - - v99.99-pre-2514 Small tweaks to the mcp data. Nothing major.. - - v99.99-pre-2513 Attempt to properly fix deadlock if the internal server derps. It should never hang now. Damn you fast computer.. - - v99.99-pre-2512 Make glass panes and iron fences connect to block sides based on solidity. This does change IBlockAccess, so anything with a custom IBlockAccess may need to implement the new method. - - v99.99-pre-2511 Forgot most important side, release script. - - v99.99-pre-2510 Fixed changelog generation. - - v99.99-pre-2509 Fix AIOOB exception in crash reporting if exception does not have a stack. Possible, but odd. - - v99.99-pre-2508 Add NPE protection to refernce to MinecraftServer.worldServer - - v99.99-pre-2507 Fix hoes being able to till dirt under other blocks, and made it look for air type blocks. - - v99.99-pre-2506 Fix Air block check in BlockPortal. - - v99.99-pre-2505 Add NPE protection to ItemStack delegates. Closes #601 - Also cleaned up the names of said delegates, we do not have to follow MCP's crowdsourced names as they are very bad. - Redirected damage through setItemDamage to allow items to have finder control of breaking. - - v99.99-pre-2504 Added rotation support for all vanilla blocks that can be rotated. - - v99.99-pre-2503 Disable ImageIO's File based cache, should speed up texturepack loading/stitching. - - v99.99-pre-2502 Updated FML: - MinecraftForge/FML@24c405665105a789a0708a7e30c8bcb96899da6b Add in an optional modid identifier for @SidedProxy. It's main use is when both scala and java @Mods reside in the same package, and you want the @SidedProxy behaviour for a specific @Mod language type. In general it should not be needed otherwise. - MinecraftForge/FML@cd0466395a8f1af3ec44f124bf4088df2d318603 Fix sysout with trailing messages after a newline - - v99.99-pre-2501 Fix sysout with trailing messages after a newline - - v99.99-pre-2500 Add in an optional modid identifier for @SidedProxy. It's main use is when both scala and java @Mods reside in the - same package, and you want the @SidedProxy behaviour for a specific @Mod language type. In general it should not be needed otherwise. - - v99.99-pre-2499 Merge branch 'master' into newliquid - - v99.99-pre-2498 Updated FML: - MinecraftForge/FML@6f3da9736531153629fb4213e3b2cae776bfb50a Don't throw an exception if the scala adapter find a java proxy. I may add some distinguishers to @SidedProxy so you know which mod it's for. - MinecraftForge/FML@59fe905695421a5be9370b0009ef794abaaf75bb Don't continue trying to send events to mods that depend on errored mods. - - v99.99-pre-2497 Don't continue trying to send events to mods that depend on errored mods. - - v99.99-pre-2496 Don't throw an exception if the scala adapter find a java proxy. I may add some distinguishers to @SidedProxy so you know which mod it's for. - - v99.99-pre-2495 Merge pull request #560 from jk-5/master - RenderGameOverlayEvent.Post ALL is not called in GuiIngameForge - - v99.99-pre-2494 Ignore registration of a object that is already registered. Preventing duplicate callback invocations. Thanks King_Lemming for pointing this out. - - v99.99-pre-2493 Add cache for ASM Event Handler bridge classes, should not need to redefine a class to invoke the same method on different instances. - - v99.99-pre-2492 Make changelog generation non-fatal untill we get jenkins issue figured out. - - v99.99-pre-2491 Fix isAir check to see if a portal can light. Should fix w/Railcraft and others - - v99.99-pre-2490 Patch village distance checking to use floats instead of ints, to avoid int wrapping - - v99.99-pre-2489 Fix arbitrary GUIContainer text coloring by forcing lighting to be disabled. Closes #594 - - v99.99-pre-2488 Merge branch 'master' of github.com:KingLemming/MinecraftForge into newliquid - Conflicts: - common/net/minecraftforge/common/network/ForgePacket.java - - v99.99-pre-2487 Updated FML: - MinecraftForge/FML@843a13c1ab1e3901160082fa63c557243fb64675 Try and clean up cycle detection output a bit - MinecraftForge/FML@82e9de8641c6a559eec711ea6d1e940d99cbc98f More tweaks to the mod sorting code - MinecraftForge/FML@ac97370f94d10beee5f021795cddda827c4411d4 Add in a pretty sorting error screen - MinecraftForge/FML@f1d68ed4c82cd28e50ec6a0befc55ff0165bfe08 Throw the sorting exception - MinecraftForge/FML@edc1fb24e2cad9badd2dd18ccccd590d77156e18 Send the "suspect list", and print the suspect versions - - v99.99-pre-2486 Send the "suspect list", and print the suspect versions - - v99.99-pre-2485 Throw the sorting exception - - v99.99-pre-2484 Add in a pretty sorting error screen - - v99.99-pre-2483 More tweaks to the mod sorting code - - v99.99-pre-2482 Try and clean up cycle detection output a bit - - v99.99-pre-2481 Forge Fluid System! - - v99.99-pre-2480 Fix potential GL issue when atlas animations bind textures without informating RenderEngine. - - v99.99-pre-2479 Cleanup Dimension Registration packet, generate takes no arguments, and added fix to world to prevent providers from overwriting the dimension ID. - - v99.99-pre-2478 Merge pull request #590 from bloodmc/master - Add support for servers to register dimensions on client. - - v99.99-pre-2477 Add support for servers to register dimensions on client. - In order to support multi-worlds such as MultiVerse, the server needs the - ability to register dimensions on client or many forge mods such as IC2 - will not function correctly. This has been an issue for MCPC which - provides both Forge and Bukkit support to players. By adding the - DimensionRegisterPacket class, MCPC now has the ability to send the - required packet to client to register a dimension with DimensionManager. - - v99.99-pre-2476 Introduced the framework for Forge's packet handler system. Heavily based off FMLPacket. - Packet splitting and reconstruction is handled. - - v99.99-pre-2475 Updated FML: - MinecraftForge/FML@3bf50c4bbe82f0cc317dafcf2a569cb5210bc738 Fix server side derp with Forge network packet handler - - v99.99-pre-2474 Fix server side derp with Forge network packet handler - - v99.99-pre-2473 Fixed creative tab rendering with invalid color closes #588 - - v99.99-pre-2472 Fix type in biome list. - - v99.99-pre-2471 Add forge network handling support - Updated FML: - MinecraftForge/FML@4922e90d81d8b8b9374c4d04858a06c5bf03965c Separate network mod config from setup. Allows for Forge Packet Handler nicety - - v99.99-pre-2470 Separate network mod config from setup. Allows for Forge Packet Handler nicety - - v99.99-pre-2469 Merge pull request #584 from Chicken-Bones/hitinfo - Add hitInfo field to MovingObjectPosition for when an int doesn't suffice - - v99.99-pre-2468 Fixed render count for stacks of blocks 40+ and distrabution of items based on scale. Closes #579 - - v99.99-pre-2467 Fix another NPE when Items are in Block range with custom renderers, Modders keep your items out of the block range! Closes #581 - - v99.99-pre-2466 Add hitInfo field to MovingObjectPosition for when an int doesn't suffice - - v99.99-pre-2465 Remember x & z passed to getTopSolidOrLiquidBlock and use it for foliage tests. Fixes #575 - - v99.99-pre-2464 Fix blending on the hotbar. Closes #574 - - v99.99-pre-2463 Add in a very simple stencil bit registry to try and arbitrate between mods wanting to use stencil bits in rendering - - v99.99-pre-2462 Updated FML: - MinecraftForge/FML@23b070c7d02a8da44bf04c2f9ba2b485a44ad967 Alternative @SidedProxy setter for Scala. - MinecraftForge/FML@2cca7aa759b4b6c3a128ce43bbd924e4762c43c2 Some more Scala @SidedProxy adjustments. Now properly supporting pure singletons, i.e. object C { @SidedProxy(...) var proxy: P = null } Removed fallback, as all such singletons are properly handled by the new code now, and class implementations fall back to the code also used for plain Java mods. - MinecraftForge/FML@8517a824e5251c409e05999d42fc6d70497609f5 Merge declaration and initialization of a variable. - MinecraftForge/FML@a3a920437f3ede6841ae2c449a38975b02b28088 Merge pull request #230 from fnuecke/master - - v99.99-pre-2461 Merge pull request #563 from Asajz/master - Default Quartz Ore Dictionary - - v99.99-pre-2460 Merge pull request #568 from hitchh1k3r/master - Furnace XP bug fix (fixed) - - v99.99-pre-2459 Merge pull request #571 from odininon/master - Addition: ItemStack sensitive canHarvestBlock - - v99.99-pre-2458 Merge pull request #565 from CovertJaguar/patch-1 - Possible NPE if the liquid isn't in the LD - - v99.99-pre-2457 Fix NPE when rendering EntityItems that are not blocks but int he block range. - - v99.99-pre-2456 Created an ItemStack sensitive version of canHarvestBlock. - - v99.99-pre-2455 Prevent water from dropping snowballs. - - v99.99-pre-2454 updated FurnaceRecipes.java.patch - - v99.99-pre-2453 Merge pull request #230 from fnuecke/master - Alternative setter logic for @SidedProxy in Scala classes/mods. - - v99.99-pre-2452 Fire EntityJoinWorled event for forced entities {Players and there mounts} as well, just ignore the cancelled value. - - v99.99-pre-2451 MinecraftForge/FML@787c0c4a6af3af60928b3a90f383a305a17a4347 Don't spit error on LWJGL not supporting 4.3 just warning. - Make custom item renderers attempt to use EQUIPPED type when running first person. For backwards compatiblity, will be removed in 1.6. - And a small change to make the 1.6 check not print it's stack trace. - - v99.99-pre-2450 Don't spit error on LWJGL not supporting 4.3 just warning. - - v99.99-pre-2449 Merge pull request #564 from purpleposeidon/patch-1 - Fix render bounding box of trapped double chests - - v99.99-pre-2448 Merge pull request #566 from jampot5000/patch-1 - Make getStencilBits static - - v99.99-pre-2447 Make getStencilBits static - Made getStencilBits static so it can be called. - - v99.99-pre-2446 Possible NPE if the liquid isn't in the LD - https://github.com/BuildCraft/BuildCraft/issues/787 - - v99.99-pre-2445 Move Partical rendering down in the order, after everything else. Should fix particals rendering behind water, digging process, and selection. - - v99.99-pre-2444 Fix render bounding box of trapped double chests - - v99.99-pre-2443 Added oreQuartz - Gives a default quartz Ore Dictionary (I know of at least 3 used by different mods that use Nether Quartz as an equivalent). - - v99.99-pre-2442 RenderGameOverlayEvent.Post(ALL) is now called in GuiIngameForge - - v99.99-pre-2441 Fixed NPE in rendering dragged items. - - v99.99-pre-2440 Attempt to allocate a 8-bit stencil buffer when creating Minecraft's display context. If that throws an error it will revert back to it's default values. - Also contains a method for modders to rereive how many bits the context was created with. Closes #552 - - v99.99-pre-2439 New RenderPlayer and RenderLiving events. Closes #493 - - v99.99-pre-2438 Changed to just plane entity for flexability. - - v99.99-pre-2437 EntityPlayer sensitive version of Item.isValidArmor, deprecated older version. Closes #551 - - v99.99-pre-2436 Merge declaration and initialization of a variable. - - v99.99-pre-2435 Some more Scala @SidedProxy adjustments. Now properly supporting pure singletons, i.e. - object C { - @SidedProxy(...) - var proxy: P = null - } - Removed fallback, as all such singletons are properly handled by the new code now, and class implementations fall back to the code also used for plain Java mods. - - v99.99-pre-2434 Alternative @SidedProxy setter for Scala. - - v99.99-pre-2433 Merge pull request #557 from pahimar/master - Expose the EntityLiving's combat tracker - - v99.99-pre-2432 Merge pull request #556 from micdoodle8/master - Separate EQUIPPED and EQUIPPED_FIRST_PERSON Item Render Types - - v99.99-pre-2431 Update forge_at.cfg - - v99.99-pre-2430 Capture and fire the PlaySoundAtEntity event for The client entity. Minecraft does some odd bypasses for no good reason. Thanks iPixile for reporting this. - - v99.99-pre-2429 Separate EQUIPPED and EQUIPPED_FIRST_PERSON Item Render Types - - v99.99-pre-2428 Updated FML: - MinecraftForge/FML@99bb50d8f8d27217ba58a41c802a504213e99461 Improved Entity Spawn Error - MinecraftForge/FML@c0cca7f41d5b080e39dd8d3d6cfc329295c822e6 Merge pull request #227 from CovertJaguar/patch-1 - MinecraftForge/FML@49111e9c5cffab49ec35f965801c3f0496f6def6 Add version detection to astyle and print error if it doesnt detect version 2.0+ - Also fixed astyle's config for max-instatement-indent that sometimes caused crashes with certian versions of astyle. - - v99.99-pre-2427 Add version detection to astyle and print error if it doesnt detect version 2.0+ - Also fixed astyle's config for max-instatement-indent that sometimes caused crashes with certian versions of astyle. - - v99.99-pre-2426 Merge remote-tracking branch 'refs/remotes/origin/1.5.2' - Conflicts: - common/net/minecraftforge/common/ForgeVersion.java - - v99.99-pre-2425 Bump version number for 1.5.2 - - v99.99-pre-2424 Merge pull request #550 from cadyyan/master - Build Script Error Handling Error - - v99.99-pre-2423 Merge pull request #227 from CovertJaguar/patch-1 - Improved Entity Spawn Error - - v99.99-pre-2422 Improved Entity Spawn Error - - v99.99-pre-2421 Fixed build error handling using invalid Python syntax. - - v99.99-pre-2420 Fixed hardcoding of MC version in debug text. - - v99.99-pre-2419 Updated FML: - MinecraftForge/FML@00f00b17bf0da262e6fe3e327ca2deedf7146305 Fix scalac detection to actually use the located command instead of defaulting to 'scalac' - - v99.99-pre-2418 Fix scalac detection to actually use the located command instead of defaulting to 'scalac' - - v99.99-pre-2417 Changelog generator will now bundle failed builds with the next successful build. Should make it look better and prevent the version numbers from being confusing. - - v99.99-pre-2416 Bump version to 7.7.2 so I can make a release. - - v99.99-pre-2415 Update to 1.5.2 PR. - MinecraftForge/FML@f0bba74a4748935ef3a715ae2f45feb75cc20376 Update for minecraft 1.5.2 - MinecraftForge/FML@62fdbad74c2507d147ecab56f56029135d88c6f5 Update MCP's md5 for the fixed srg files. - - v99.99-pre-2414 Update MCP's md5 for the fixed srg files. - - v99.99-pre-2413 Update for minecraft 1.5.2 - - v99.99-pre-2412 Merge pull request #543 from Chimaine/master - Fix unregistering of event listener - - v99.99-pre-2411 Replaced derpy tabs with spaces - - v99.99-pre-2410 Fixed ListenerListInst not being rebuild after unregistering a listener, causing calls to unregistered event listeners. - - v99.99-pre-2409 Merge pull request #542 from KingLemming/master - OreDictionary additions + ItemStack maxDamage hook - - v99.99-pre-2408 -Add vanilla Ores to the Ore Dictionary. No recipe replacement required. - -Add NBT-sensitive getMaxDamage() for ItemStack. - - v99.99-pre-2407 Attempted a fix for the changelog generation, should print all builds back to 1 now. - - v99.99-pre-2406 Updated FML: - MinecraftForge/FML@cf9b5b445ba284d389c7e32a03d9c8ef43469042 Don't leave scala running in interactive mode. - - v99.99-pre-2405 Don't leave scala running in interactive mode. - - v99.99-pre-2404 Updated FML: - MinecraftForge/FML@aa200923f0fe0c548faa4f103d803ade2e49d19d Fix patch derp. - - v99.99-pre-2403 Fix patch derp. - - v99.99-pre-2402 Updated FML: - MinecraftForge/FML@ddadf93ca1d648d88fdb61c9625cd675c3650ccd Fix when an old scalac is present on the system to not fail the build - - v99.99-pre-2401 Fix when an old scalac is present on the system to not fail the build - - v99.99-pre-2400 Fix rotation issue with non-block items. - - v99.99-pre-2399 ItemStack delegation to Item for damage values. - - v99.99-pre-2398 Try and be less noisy about world leaks - - v99.99-pre-2397 Updated FML: - MinecraftForge/FML@cfda7fc738ce6079f625a3822ebff5e7e0db5669 Fix URL for MCP - MinecraftForge/FML@781c68121626321e0efddaf4c4db9f1b8b5911db Some fixups for scala compilation in MCP. Scala should now be compilable and reobfuscatable with srgnames in MCP. - - v99.99-pre-2396 Some fixups for scala compilation in MCP. Scala should now be compilable and reobfuscatable with srgnames in MCP. - - v99.99-pre-2395 Fix URL for MCP - - v99.99-pre-2394 Updated FML: - MinecraftForge/FML@dcf069ca52738a7bb7bde01f1c7ebd2e06cd0ac6 Attempt to reduce lines on the screen for id mismatch. Hopefully prevents game crashes. - MinecraftForge/FML@58ba24add2a96bf4c079d5919f2d90dcc2f380e4 Fix possible NPEs in GameData - - v99.99-pre-2393 Fix possible NPEs in GameData - - v99.99-pre-2392 Attempt to reduce lines on the screen for id mismatch. Hopefully prevents game crashes. - - v99.99-pre-2391 Complete it, got the bug figured out - - v99.99-pre-2390 Techne model loader (incomplete for debugging) - - v99.99-pre-2389 Add forge/FML data to the f3 screen. - - v99.99-pre-2388 Updated FML: - MinecraftForge/FML@a3b5eaacfdd9218ef68d3dc064bba729b797cb3d Fix a small modloader compatibility derp: closes #222 - MinecraftForge/FML@677a6e578e84109702365da4a784f9a57d8c9957 Fix scala supporting SidedProxy. It should work now. - MinecraftForge/FML@334a76de75f2b417f04c23526c7e66ceb48e0de2 Update FMLDeobfuscatingRemapper.java - MinecraftForge/FML@42f1d8795599e0d1a516a1fdd7488a09b77e4565 Merge pull request #224 from Glought/master - MinecraftForge/FML@2dcabe01232b48009acbca6724565598761f561b Add a to string to fmlmodcontainer: should mean less derpy cyclic dependency data - MinecraftForge/FML@11ac46daebe901a6012a09ba5f6fe44af5b1be06 Fixing the GameRegistry. Now it is possible to register a Block with a BlockItem using following code: MyBlock myBlock = new MyBlock(); GameRegistry.registerBlock(myBlock, MyBlockItem.class, "myBlock"); where MyBlockItem class has one constructor with signature: public MyBlockItem(int id, Block block) - MinecraftForge/FML@c3fda11d100f9db7c32ef212ac37eade3e35d701 Merge pull request #225 from MarcinSc/master - - v99.99-pre-2387 Merge pull request #225 from MarcinSc/master - Suggested fix for issue 221 - - v99.99-pre-2386 Fixing the GameRegistry. Now it is possible to register a Block with a BlockItem using following code: - MyBlock myBlock = new MyBlock(); - GameRegistry.registerBlock(myBlock, MyBlockItem.class, "myBlock"); - where MyBlockItem class has one constructor with signature: - public MyBlockItem(int id, Block block) - - v99.99-pre-2385 Add a to string to fmlmodcontainer: should mean less derpy cyclic dependency data - - v99.99-pre-2384 Merge remote-tracking branch 'refs/remotes/origin/GuiIngame' - Conflicts: - patches/minecraft/net/minecraft/client/Minecraft.java.patch - - v99.99-pre-2383 Merge pull request #224 from Glought/master - Fix for Issue #223 - - v99.99-pre-2382 Update FMLDeobfuscatingRemapper.java - Fixes a "Type mismath:cannot convert from element type Object to FieldNode" error at line 176. - - v99.99-pre-2381 Allow spawning of Bonemeal particles even if block is not set. - - v99.99-pre-2380 Fix scala supporting SidedProxy. It should work now. - - v99.99-pre-2379 Fix a small modloader compatibility derp: closes #222 - - v99.99-pre-2378 Restore world unload event for client worlds Closes #531 - - v99.99-pre-2377 Fix replaceable checks to work on blocks with a non-replacable material, Closes #532 - - v99.99-pre-2376 Fix the BLOCK_3D render helper for items that aren't an instance of ItemBlock Closes #533 - - v99.99-pre-2375 Fix logic issue in CrashReportCategory patch, blame Jadedcat for sloppy quick patch. - - v99.99-pre-2374 Merge pull request #530 from Azanor/master - Fix for BiomeDictionary.getTypesForBiome throwing a ClassCastException when called. - - v99.99-pre-2373 getBiomesForType will cause the same problem - - v99.99-pre-2372 Fix for ClassCastException when attempting to fetch Biome types from BiomeDictionary - Attempting to fetch the BiomeDictionary types linked to a biome throws a ClassCastException. This fixes that - - v99.99-pre-2371 Simple block recolouring API: closes #525 - Fix up documentation on "rotation" API: it is up to the mod to decide interpretation of "rotation" for the mod/block. - - v99.99-pre-2370 Updated FML: - MinecraftForge/FML@b3d4ea05ec633fb1898e97febf786f1a3e420986 Fix possible NPE in findItemStack, closes #218 - - v99.99-pre-2369 Adds a field to the player for maximum health. Player.dat additions are present, getMaxHealth() needs a magic number for spawning. Closes #527 - - v99.99-pre-2368 Fix return value of EnchantPower hook, closes #518 - - v99.99-pre-2367 Forge now takes control of GuiIngame's renderGameOverlay, and spits out a ton of events to give modders control of how the screen is rendered. - Inital draft for community feedback. - - v99.99-pre-2366 New hook to allow Items to render Helmet overlays like pumpkins do. - - v99.99-pre-2365 Fix possible NPE in findItemStack, closes #218 - - v99.99-pre-2364 Updated FML: - MinecraftForge/FML@394f424185a044afcd6b31f400e731478171dd18 Fix to output versions in crash logs - MinecraftForge/FML@8f35adca7a41c280a4b63d4787f042f615966cac Use more expressive language when a version specifier is a simple unbounded above condition - - v99.99-pre-2363 Use more expressive language when a version specifier is a simple unbounded above condition - - v99.99-pre-2362 Fix to output versions in crash logs - - v99.99-pre-2361 Updated FML: - MinecraftForge/FML@5673c1dd2966536000c2b3f17f85131204c4a291 Add srgname to registerTileEntityWithAlternatives - MinecraftForge/FML@7aea09f4ca2f087d59ff6cb0de1c8e3e8b9ea4df Add type info to properly deobfuscate overloaded fields. Fixes #210. - MinecraftForge/FML@edffd04ed2e89ece75189f76b92ae47643ec92f8 Add in some caching of the read field descriptions for efficiency - MinecraftForge/FML@0daf1a6df4203d97be65a76a46550f6ad22ccc79 Merge branch 'agaricusb-fix-deobf-field' - MinecraftForge/FML@ada52078c75fdfa506a4287c112d01d9af961d5a Merge pull request #216 from agaricusb/add-srgname - - v99.99-pre-2360 Merge pull request #216 from agaricusb/add-srgname - Add srgname to registerTileEntityWithAlternatives - - v99.99-pre-2359 Merge branch 'agaricusb-fix-deobf-field' - - v99.99-pre-2358 Add in some caching of the read field descriptions for efficiency - - v99.99-pre-2357 Merge pull request #521 from ProgrammerHero/master - Fixed a bug that prevented proper lava generation near bedrock - - v99.99-pre-2356 fixed a bug that prevented proper lava generation near bedrock - - v99.99-pre-2355 Fix AIOOB in crash report stack trimming. - - v99.99-pre-2354 Add type info to properly deobfuscate overloaded fields. Fixes #210. - - v99.99-pre-2353 Add srgname to registerTileEntityWithAlternatives - - v99.99-pre-2352 Merge pull request #515 from pahimar/master - Fixes parsing faces for faces that do not have texture coordinate data - - v99.99-pre-2351 Missed a bit - - v99.99-pre-2350 Fix a derp in that we provision the various arrays for a face, even if we are not going to parse data into it. Solves NPEs for when obj models that don't have texture coordinates attempt to render. - - v99.99-pre-2349 Cave and Ravine gen will now take into account the Biomes top and foller block, allowing them to break the surface in modded biomes. Beaches, MushroomIslands and Deserts are exempt from this check to preserve vanilla world gen functionality. Closes #491 - - v99.99-pre-2348 Fix offset in AdvancedModelLoader. *doh* - - v99.99-pre-2347 Added a small method in the Block.java to specify the amount of enchanting power it can supply to an enchanting table. Closes #508 - - v99.99-pre-2346 Added NBT data to liquid stacks. Closes #501 - - v99.99-pre-2345 Add Item 'swing' callback for use when playing the arm swing animation. Closes #505 - - v99.99-pre-2344 Item callback for EntityItem update tick. Closes #426 - - v99.99-pre-2343 Delete sneaky extra file - - v99.99-pre-2342 Add in a generic factory interface, allowing for additional model support - to be added at runtime. - - v99.99-pre-2341 More interface work - - v99.99-pre-2340 Adding interface for other custom model format importers to implement - - v99.99-pre-2339 Switch out String.matches in favour of Pattern/Matcher usage, and a tad more documentation. - Fixed a bug in texture coordinate parsing (can have 2-3 values per entry, instead of the 3-4 I had before) - - v99.99-pre-2338 Wavefront object importer. Imports Wavefront object and offers some simple render methods for rendering the models in game. Modders have complete access to all the data in the model to write their own rendering related code as well. - - v99.99-pre-2337 Update MCP names to recent published names - Updated FML: - MinecraftForge/FML@1774e2bf3073c3449d1f289399971ad93a5b6479 MCP names update - - v99.99-pre-2336 Re-add and mark deprecated the old signature for ForgeHooksClient.getArmorTexture. - - v99.99-pre-2335 Deprecate preloadTexture, make it a no-op. Should stop derpiness with new - texturing system performance tweaks. - - v99.99-pre-2334 Updated FML: MinecraftForge/FML@4836b3272a9b292c62816c1d1f9e845486753839 Re-worked the Texture patches, optifine helper function, and re-added support fo - r dynamically rotating the texture for mod authors who do things horribly wrong. - - v99.99-pre-2333 Updated FML: - MinecraftForge/FML@a31607ae7d0214101679a1ecf1ae8032a5257eda Fix compilation derp, and clean up rotation helper. - - v99.99-pre-2332 Fix performance of texture uploads - Updated FML: - MinecraftForge/FML@00c788308881a07a683e17e2e9382313f3719b45 Very significant improvement in performance by using glSubImage to upload data. Inspired by frequent complaints about performance of hires texture packs. They probably still need a beefy system but should work. Hopefully I can figure out why the subImage GL side copy isn't working properly for an even more significant speed boost. But this gets things started. - MinecraftForge/FML@57ad221cc6d9605b9d521f86620c2a31f922ac24 And add the patches *sigh* - - v99.99-pre-2331 Optimize Texture loops a bit for non-rotated textures. Should help the FPS loss on higher resolution texture packs. If it becomes a major issue we may have to look into a more optimized animation system. - https://mojang.atlassian.net/browse/MC-13206 - - v99.99-pre-2330 Small bugfix in Stitcher that was preventing ti from fully filling the possible texture space. Should lower the amount of empty space in textures. - - v99.99-pre-2329 Small optimization for usages of Minecraft.getGLMaximumTextureSize(), only need to calculate it once. - - v99.99-pre-2328 Fix scoreboard saving bug caused by our fix of vanilla map saves. - - v99.99-pre-2327 Deprecate long dead interface that moved to FML. remvoe next MC version. - - v99.99-pre-2326 Updated FML: MinecraftForge/FML@1de89525cc2265bdce8704d9bd0d31c57bca4d97 Fixed issue with instalation when java/javac commands had quotes. - - v99.99-pre-2325 Updated FML: MinecraftForge/FML@704a70902fca3de620375116a33dccd3d6d576d0 Sanitize input to isRemappedClass to use '/' as a package seperator like the srg files. - - v99.99-pre-2324 New hook to allow Items to provide there own armor models. Closes #487 - - v99.99-pre-2323 This allows the result of the explosion to take into account metadata, - tile entities, or even to cancel it altogether. - Allowed block exploding to take into account tile entity and metadata - - v99.99-pre-2322 Untag NBTTagList.removeTag as client side only, allowing simple removal ont he server side. Closes #477 - - v99.99-pre-2321 Fix item deletion in creative menu for items that are the same id/meta but differnet NBT's. Closes #479 - - v99.99-pre-2320 Allow items to provide there own FontRenderer for there tooltips. Added for #463 - - v99.99-pre-2319 Clarify Factory call and Event Functionality - - v99.99-pre-2318 Added maxCanSpawnInChunk event to allow overriding of creature chunk spawn cap - - v99.99-pre-2317 MCP names update - - v99.99-pre-2316 Re-worked the Texture patches, optifine helper function, and re-added support for dynamically rotating the texture for mod authors who do things horribly wrong. - - v99.99-pre-2315 Fix compilation derp, and clean up rotation helper. - - v99.99-pre-2314 And add the patches *sigh* - - v99.99-pre-2313 Very significant improvement in performance by using glSubImage to upload data. Inspired by frequent complaints about performance of hires - texture packs. They probably still need a beefy system but should work. Hopefully I can figure out why the subImage GL side copy isn't working - properly for an even more significant speed boost. But this gets things started. - - v99.99-pre-2312 Fixed issue with instalation when java/javac commands had quotes. - - v99.99-pre-2311 Sanitize input to isRemappedClass to use '/' as a package seperator like the srg files. - - v99.99-pre-2310 Add function to remove categories from a configuration, indavidual properties can be removed using ConfigCategory.remove() Closes #462 - - v99.99-pre-2309 Pulled Biome Tag System by Emasher, Closes #433 - An issue with biome adding mods which is becoming increasingly annoying for players, is that many mod authors that add biome specific world generation or mobs in their mods, for the most part, hard code them to work with vanilla biomes only. This becomes a huge problem when it's difficult to even find a vanilla biome, let alone a specific one, when biome mods are installed. - A simple solution to this problem is a tag system for biomes that allows mod authors to set up their world generators, or mobs to generate or spawn in biomes that have been registered with a specific tag such as "FOREST", or "FROZEN". I wrote such a system a few months ago, which I've been using with my own mods, and have made available to anyone who wants to use it. Since then, I've had requests from mod authors and players alike to try and get it, or at least similar functionality, into Forge, where other mod authors will be more comfortable using it. - Aside from the tags, it also includes a rule based system to classify biomes that have not already been registered with it when information is requested on them (You can opt out of this by registering a biome as type "NULL"). And additionally, the ability to register IWorldGenerators for specific biomes, or biome types (tags) to speed up chunk generation a little bit. - - v99.99-pre-2308 Deprecate IArmorTextureProvider, moved to Item. And exposed more information to the function. Closes #365 - - v99.99-pre-2307 Add checking for 'ENUM$VALUES' in EnumHelper. Eclipse uses it's own internal compiler which does not follow the java standard of making the values field names $VALUES and private. Instead its public and ENUM$VALUES. Closes #502 - - v99.99-pre-2306 Updated FML: MinecraftForge/FML@570faeb790745c35403c67fabab57651b71da576 Added the ability to save transformed classes to disc for debugging. - - v99.99-pre-2305 Added the ability to save transformed classes to disc for debugging. - - v99.99-pre-2304 Revert MinecraftForge/MinecraftForge@f594109b30c87f5a0996eee9e8c4513380733cee If concurancy issues arise we will reassess. The provided solution caused entities to be removed incorrectly and cause 'invisible' entities client side. - - v99.99-pre-2303 Fix EntityPlayer passed to Bonemeal event. - - v99.99-pre-2302 Removed index bounds checking in some chunk functions, if you error blame Grum. - - v99.99-pre-2301 Fix off-by-one in rotated textures. - - v99.99-pre-2300 Fix vanilla texture bug causing rotated textures to be placed wrong. - - v99.99-pre-2299 Updated FML: - MinecraftForge/FML@8b8837c9ff635d4988e0a1504fca38667825daf0 Fix NPE when branding isn't present - - v99.99-pre-2298 Fix NPE when branding isn't present - - v99.99-pre-2297 Merge pull request #496 from Krapht/master - Remove a SideOnly that crashes server - - v99.99-pre-2296 Remove unneeded SideOnly. ref: Buildcraft/Buildcraft#710 - - v99.99-pre-2295 Removed obsolete patches - Updated FML: - MinecraftForge/FML@26ccb9106e443e664b0fdc1b95c3600b90ab2bc5 Change snooper/crash report brand handling. fmlbranding now loads another string! - MinecraftForge/FML@eff464cf0e656d92dfedf16e79e5cd6c36b9fc76 And the core patches for that - - v99.99-pre-2294 And the core patches for that - - v99.99-pre-2293 Change snooper/crash report brand handling. fmlbranding now loads another string! - - v99.99-pre-2292 Sanity check the item ID for loaded liquid stacks better. - - v99.99-pre-2291 Add in persistence code for LiquidTank. Using it should protect against liquids that get removed f.e. Closes #395 - - v99.99-pre-2290 Make liquidstacks immutable in their type data. Sorry about this, but it makes things a lot easier. - - v99.99-pre-2289 Fix up liquidstack so it knows about the texture sheet for it's icon - - v99.99-pre-2288 Fix AT file - - v99.99-pre-2287 Fix possible NPE in ChunkManager. Closes #478 in reality - - v99.99-pre-2286 Fix up some liquid logic - - v99.99-pre-2285 fix bug #489 from #429 - - v99.99-pre-2284 made BlockFluid.theIcon protected - - v99.99-pre-2283 Updated FML: - MinecraftForge/FML@0d844874124649099dbcbb9ae2b36719e1dda25f Fix up derp in access transformer - - v99.99-pre-2282 Fix hashCode - - v99.99-pre-2281 Fix up derp in access transformer - - v99.99-pre-2280 Use the liquid name in liquid stack persistence. Closes #429 - - v99.99-pre-2279 Updated FML: - MinecraftForge/FML@2bc6a0666f8a54f6b1fbc3398c6e3a385ecd35b5 Attempt to make any "default package" class public. This might fix problems with certain modloader mods that ship changes to vanilla classes. - - v99.99-pre-2278 Attempt to make any "default package" class public. This might fix problems with certain modloader mods that ship changes to vanilla classes. - - v99.99-pre-2277 Bump version number for 1.5.1 Note: We really need to do this more... - - v99.99-pre-2276 Fix NPEs when modders stupidly register null texture names. - - v99.99-pre-2275 Fixed issue with Event.hasAnnotation ignoring it's parameter. And cached its values for potential performance gain. Closes #482 - - v99.99-pre-2274 Damn you python and your tab obsession! - - v99.99-pre-2273 Changelog fixup - - v99.99-pre-2272 Re-enable changelog? Hopefully... - - v99.99-pre-2271 Merge branch 'mithionchanges' - - v99.99-pre-2270 Update patches! - - v99.99-pre-2269 Merge branch 'mithionchanges' - - v99.99-pre-2268 Merge branch 'mithionchanges' of github.com:Mithion/MinecraftForge into mithionchanges - Fix up code for minecraftforge style. Clean up patches. - Conflicts: - common/forge_at.cfg - patches/minecraft/net/minecraft/block/Block.java.patch - - v99.99-pre-2267 Updated FML: - MinecraftForge/FML@82bc9f1b35f5d51a722d294dd252e6bab4d54fa4 Add some information, and a log message letting you know it worked - - v99.99-pre-2266 Add some information, and a log message letting you know it worked - - v99.99-pre-2265 Updated FML: - MinecraftForge/FML@ede93d438f2b5fab92cd6a459247ca158354e430 Validate supplied stack size - MinecraftForge/FML@d73ac867df775174dafdd2da193fabd7c3e7407e Add a mechanism to dump the registry- useful for mod developers. - - v99.99-pre-2264 Add a mechanism to dump the registry- useful for mod developers. - - v99.99-pre-2263 Validate supplied stack size - - v99.99-pre-2262 Updated FML: - MinecraftForge/FML@5e1949eb0e3a43d3ec6c710289532d93f6819934 Clone the itemstack, and allow for passing in a stacksize - - v99.99-pre-2261 Clone the itemstack, and allow for passing in a stacksize - - v99.99-pre-2260 Updated FML: - MinecraftForge/FML@2d368c4c2eb6b4e0bb60757b6e1679c23aaad9db Itemstacks in the GameRegistry (manual registration by mods) - - v99.99-pre-2259 Itemstacks in the GameRegistry (manual registration by mods) - - v99.99-pre-2258 quick bugfix in entityenderman - reversed boolean check on event result - - v99.99-pre-2257 Ender Teleport Changes - Renamed Ender Teleport Event and added it in to ender pearls. - - v99.99-pre-2256 Enderman attackEntityFrom changed - Changed so that if the teleport fails upon being attacked, Endermen will - take damage as normal. - - v99.99-pre-2255 Enderman Teleport Event - New event when an enderman teleports that allows the teleport location - to either be modified or completely cancelled. - - v99.99-pre-2254 Access Transformer Changes - AT changes and corresponding class changes. - Additions (all made public): - EntityLiving.targetTasks - PotionHelper.potionRequirements - PotionHelper.potionAmplifiers - PotionEffect.duration - Potion.setIconIndex - Item.setPotionEffect - Block.blockHardness - Block.blockResistance - - v99.99-pre-2253 Add in block rotation support. It supports most vanilla blocks (hopefully), logs should be added soon. - - v99.99-pre-2252 Fix itemframe render bug - - v99.99-pre-2251 Fix AT config for texturemap - - v99.99-pre-2250 Player Flyable Fall Event - Adds an event to EntityPlayer that is posted on player fall when the - player has flight capabilities. - - v99.99-pre-2249 Brewing Stand Changes - Added an event on potion ingredient applied. Event contains the item - stacks of each of the potions being brewed as well as any remaining - ingredients. - Changed TileEntityBrewingStand and SlotBrewingStandPotion to look for - instanceof ItemPotion rather than potion.itemID - - v99.99-pre-2248 Entity Extended Properties Changes - Adds IExtendedEntityProperties interface, which specifies three methods - that are needed: Init, Save, and Load. - Adds the EntityConstructing event, which is called during the - constructor of Entity. It is needed there so that the reference is in - place during the ReadNBT call. - Adds hooks into Entity that allow registration of - IExtendedEntityProperties classes, as well as saving and loading to NBT. - - v99.99-pre-2247 Allow itemstack sensitive damage computation for attacks. Should allow - storing data in the nbt :) - - v99.99-pre-2246 Allow items to decide if they can or cannot have book enchantments applied - - v99.99-pre-2245 Updated FML: - MinecraftForge/FML@d9db27275ea06d37ae75e201140019ca152314b0 Fix mismatch screen a bit. Should render more correctly now and at least not be blank in a lot of circumstances.. - - v99.99-pre-2244 Fix mismatch screen a bit. Should render more correctly now and - at least not be blank in a lot of circumstances.. - - v99.99-pre-2243 Updated FML: - MinecraftForge/FML@d1ff1967b50f2ff2edf0b60acdb6508c0a3eeb06 Fixed FMLRelaunchLog's Newline Handling - MinecraftForge/FML@591a25722b36d2d1b200a31278cb8da117363f6b Merge pull request #208 from jrtc27/patch-1 - - v99.99-pre-2242 Merge pull request #208 from jrtc27/patch-1 - Fixed FMLRelaunchLog's Newline Handling - - v99.99-pre-2241 Fixed FMLRelaunchLog's Newline Handling - System.out.println("\n") causes currentMessage to start with a newline character, which means idx will always be 0 from then on. Therefore if idx is 0 messages must still be logged, otherwise no more messages sent to stdout will be logged and they will just accumulate in currentMessage. - - v99.99-pre-2240 Updated FML: - MinecraftForge/FML@f709ce757984b13acb7208d6d8fbdeaa83d2928d Fix missing block world rendering - MinecraftForge/FML@748eece456e079a21112a77047d004d4f410b170 Merge pull request #206 from mDiyo/patch-1 - MinecraftForge/FML@012a755bb9ce9737c843b0dfd86473d143b637be Fix up patch properly. Also, fix md5s for the jars. - - v99.99-pre-2239 Fix up patch properly. Also, fix md5s for the jars. - - v99.99-pre-2238 Merge pull request #206 from mDiyo/patch-1 - Fix missing block world rendering - - v99.99-pre-2237 Fix missing block world rendering - - v99.99-pre-2236 Merge MC 1.5.1 branch to master. - - v99.99-pre-2235 Merge MC 1.5.1 branch to master. - - v99.99-pre-2234 Updated FML: - MinecraftForge/FML@625da6492dddcaca8133718aeee97f9981ced623 Fix install.py --mcp-dir option. Fixes #204. - MinecraftForge/FML@687d3c059d054c338c25a489be206a9f3dc63d81 Merge pull request #204 from agaricusb/fix-mcpdir - - v99.99-pre-2233 Merge pull request #204 from agaricusb/fix-mcpdir - Fix install.py --mcp-dir option - - v99.99-pre-2232 MinecraftForge/FML@aaf02ea2ac938d8cbaafdd2f59985c0604d648d7 Updated for new PR client jar. - - v99.99-pre-2231 Updated for new PR client jar. - - v99.99-pre-2230 Fix install.py --mcp-dir option. Fixes #204. - - v99.99-pre-2229 Update to 1.5.1 Pre-Release: - MinecraftForge/FML@9565529baf77de27ed8b75be2065da3ba08d16c8 Updated to latest MCP and Minecraft 1.5.1 Pre-release. - MinecraftForge/FML@a573faf92def5dd01af380b3ca86de877c1178a2 Someone derped up this function bad, revert name. - - v99.99-pre-2228 Someone derped up this function bad, revert name. - - v99.99-pre-2227 Updated to latest MCP and Minecraft 1.5.1 Pre-release. - - v99.99-pre-2226 Updated FML: - MinecraftForge/FML@3c346247e1c5de12d4548f6a99349157057e2de6 Fix NPE with CoreMods who do not have the new MCVersion annotation. - - v99.99-pre-2225 Fix NPE with CoreMods who do not have the new MCVersion annotation. - - v99.99-pre-2224 Change placement of ChunkDataEvent.Save call to apply before sending to worker thread. - - v99.99-pre-2223 Updated FML: - MinecraftForge/FML@5cc90f060caace93c0bf041d3cc37208f425f623 Fix the logger to treat newlines better, hopefully. Closes #199 - MinecraftForge/FML@5e3af8ac0e18cfa3a92f9ba726ec1a6b55e87d97 Use the relaunch log, for class circularity safety. - MinecraftForge/FML@ce949e6099fe2a63ee6774acd6e55aa55d3b3673 Support simple mc version test in coremods, only effective through jar loading. Also, log some more data about the environment. - - v99.99-pre-2222 Support simple mc version test in coremods, only effective through - jar loading. - Also, log some more data about the environment. - - v99.99-pre-2221 Use the relaunch log, for class circularity safety. - - v99.99-pre-2220 Fix the logger to treat newlines better, hopefully. Closes #199 - - v99.99-pre-2219 New TextureStitchEvents called before and after a TextureMap gathers and stitches textures together. - Also added a config option to diable the writing of resulting stitched textures to disc. Default disables the writing. - - v99.99-pre-2218 Updated FML: - MinecraftForge/FML@24022ab6ba79e4babb57fc0db893c23d4aec85bc Added comments to note FML-only methods - MinecraftForge/FML@8905237306230a33e2a3bab7a2b6f7a8b42d94e4 Merge pull request #200 from bspkrs/patch-2 - MinecraftForge/FML@577b19c1cf12a354112e829fb5704c32fd6cd0a5 Fix potential NPE in class loading and add extra debug information. - - v99.99-pre-2217 Fix potential NPE in class loading and add extra debug information. - - v99.99-pre-2216 Fix placing of certian items on Redstone Blocks. - - v99.99-pre-2215 Fix equipment slots for items when right clicked, and dispensed using a dispensor. - - v99.99-pre-2214 Fix logic inversion that allowed SnowMen to create snow on hoppers. - - v99.99-pre-2213 Prevent pistons from generating snowballs. - - v99.99-pre-2212 Merge pull request #460 from LepkoQQ/master - Shaped Ore Recipe mirroring issue - - v99.99-pre-2211 Fix multipass item rendering so that it uses the right spritesheet for the item. - - v99.99-pre-2210 Fix ShapedOreRecipe checking mirrored recipes - - v99.99-pre-2209 Merge pull request #459 from ChildWalrus/sleep - Made some sleep-related fields public to allow fixing of sleeping bug in new dimensions - - v99.99-pre-2208 Fix Activator rails activating TNT carts, closes #458 - - v99.99-pre-2207 Merge pull request #455 from Corax/patch-1 - Update ForgeDummyContainer.java - - v99.99-pre-2206 Made WorldServer.allPlayersSleeping public - Made EntityPlayer.sleepTimer public - Sleep changes - - v99.99-pre-2205 Merge pull request #200 from bspkrs/patch-2 - Added comments to note FML-only methods - - v99.99-pre-2204 Updated FML: - MinecraftForge/FML@c5d5f4e5164111c5ae63e8de7ce97cc583d73e6e Fix AllPublic access transformer not affecting methods. Should fix modloader compatibility - - v99.99-pre-2203 Fix AllPublic access transformer not affecting methods. Should fix modloader - compatibility - - v99.99-pre-2202 Update ForgeDummyContainer.java - - v99.99-pre-2201 Added comments to note FML-only methods - - v99.99-pre-2200 Updated FML: - MinecraftForge/FML@4762d4d8ef00bd789ffb6bccbd12f7478b07da62 Allocate more ram {typically 256 is defailt} to fermflower, should fix decomplication issues on OSX - MinecraftForge/FML@6370c242f0e1cb8ec80c7dccc1133cb0d0607bae OS X's python 2.6.1 has a bug in zipfile.extractall that makes it unzip directories as regular files. So switch to extract - - v99.99-pre-2199 OS X's python 2.6.1 has a bug in zipfile.extractall that makes it unzip directories as regular files. So switch to extract - - v99.99-pre-2198 Allocate more ram {typically 256 is defailt} to fermflower, should fix decomplication issues on OSX - - v99.99-pre-2197 Remove the block if TE errors. - - v99.99-pre-2196 Add config toggle to atempt to remove TileEntities and Entities that error during there update without fully crashing the server, use at your own risk. Closes #424 - - v99.99-pre-2195 Updated FML: - MinecraftForge/FML@8f2dbf7046f52d836993edb946d7d310b399bf9d Fix up stupid derp in IMC code: actually reset the IMC list after each delivery. Fixes a bunch of mods. Sorry everyone. - - v99.99-pre-2194 Fix up stupid derp in IMC code: actually reset the IMC list after - each delivery. Fixes a bunch of mods. Sorry everyone. - - v99.99-pre-2193 Merge pull request #449 from iChun/patch-5 - [Bugfix] One should not assume an item would use the item spritesheet. - - v99.99-pre-2192 Fix for nether quartz not generating in the nether, Closes #454 - - v99.99-pre-2191 Fix RedstoneBlock power issues, Closes #452 - - v99.99-pre-2190 Fix bug with rendering one too many passes for ItemEntities Closes #450 - - v99.99-pre-2189 Deprecation Sweep in DungeonHooks and fixed wildcard in ChestGenHooks remove function. - - v99.99-pre-2188 [Bugfix] One should not assume an item would use the item spritesheet. - Item class has a func to return an int to use terrain.png or items.png. This makes forge take account of it. - - v99.99-pre-2187 Fix missed wildcard change in OreDictionary closes #448 - - v99.99-pre-2186 Add call to EntityLiving when counting entities for Spawning Cap. Closes #447 - - v99.99-pre-2185 Move the RenderWorldLastEvent back to before renderHand like it was in 1.4 Closes #444 - - v99.99-pre-2184 Fix RenderItem to work with items that use the terrain texture map that aren't in the block ID range. Close #443 - - v99.99-pre-2183 Fix crash when EnumHelper can't find $VALUES field, log info, and return gracefully. - - v99.99-pre-2182 Updated FML: - MinecraftForge/FML@23ea835fa7bc0cdb466d058814b5a0e0c67e8c9a Pass obfuscation status to coremods - - v99.99-pre-2181 Pass obfuscation status to coremods - - v99.99-pre-2180 Updated FML: - MinecraftForge/FML@d88db6c0cfd5484428b574889eae02d34535beae Fix up deep tree deobfuscation - - v99.99-pre-2179 Some tweaks to the liquid dictionary, to allow for canonical liquid stacks for things like rendering - - v99.99-pre-2178 Fix up deep tree deobfuscation - - v99.99-pre-2177 Updated FML: - MinecraftForge/FML@7b722bfcd6d4c6867d15492c293a455dfd50d272 Update MCP for latest PR silent update. - MinecraftForge/FML@c6dab815f4e036e25b8f56bef7b8ee63f838adb4 Missed joined.exc, must fix scripts. - - v99.99-pre-2176 Missed joined.exc, must fix scripts. - - v99.99-pre-2175 Update MCP for latest PR silent update. - - v99.99-pre-2174 Removed get/setTextureFile from Block, nolonger used. - - v99.99-pre-2173 Updated FML: - MinecraftForge/FML@a90504315e928915345c7b04972d912cdaa0bfdb Readjust size of mods button when Minecraft Realms button is enabled. - - v99.99-pre-2172 Readjust size of mods button when Minecraft Realms button is enabled. - - v99.99-pre-2171 Fix the oredictionary for the new recipe wildcard value of Short.MAX_VALUE. - - v99.99-pre-2170 Updated FML: - MinecraftForge/FML@3765ceb02d783ae5156976f3165bafdb6a3ddbb3 Update MCP, fixes the "broken texture packs" problem. - - v99.99-pre-2169 Update MCP, fixes the "broken texture packs" problem. - - v99.99-pre-2168 Updated FML: - MinecraftForge/FML@dab22f5b74f3f2a410e20583f811605dc8e3c05f Fix "0 mods" display when installed in forge. - - v99.99-pre-2167 Fix "0 mods" display when installed in forge. - - v99.99-pre-2166 Updated FML: - MinecraftForge/FML@179c504746910d4196eef3ee2d56f63cf585c983 Simplify logic in tick start/end - MinecraftForge/FML@29edd242cd7a1fadedf4fb874ea8bbd4e643bffa Fix coremods without a manifest crashing the game. Closes #181 - MinecraftForge/FML@ac16845fc4661fa046a252eda7f9a9a847940189 Fix demo mode crash. Closes #187 - MinecraftForge/FML@984291cee91f585a6f4300eedfed882c814843f8 Fix supertype parsing to handle null superclass (Hi Object!). Closes #160 - MinecraftForge/FML@f6479299936f0f94cfc43210dd9dd44b8b5350ef Merge branch 'master' of github.com:Uristqwerty/FML - MinecraftForge/FML@b301e8e4c1877be246fd4f0b45085b70773d8f2b Change type of connection queue to a concurrent linked queue. Much more efficient, hopefully. Closes #189 - - v99.99-pre-2165 Change type of connection queue to a concurrent linked queue. Much more efficient, hopefully. Closes #189 - - v99.99-pre-2164 Merge branch 'master' of github.com:Uristqwerty/FML - - v99.99-pre-2163 Fix supertype parsing to handle null superclass (Hi Object!). Closes #160 - - v99.99-pre-2162 Fix demo mode crash. Closes #187 - - v99.99-pre-2161 Fix coremods without a manifest crashing the game. Closes #181 - - v99.99-pre-2160 Updated FML: - MinecraftForge/FML@591e65fa1aa52d2a72dc527ad1c2ac53c8eb94c4 Revert "Use the reobfuscation maps in the reflection helper for field lookups: should help some reflection cases with the deobf." - MinecraftForge/FML@2a779ec3289f695b477ec6b0822a27801e2deba1 Try a different way of remapping the fields. Should work because it's userspace, not relauncher space - MinecraftForge/FML@ca2d8bd83475f37946b86cf6fabd8ff810f9c2bf Fix reflection helper: it needs to unmap the classname to find the field maps. - - v99.99-pre-2159 Fix reflection helper: it needs to unmap the classname to find the field maps. - - v99.99-pre-2158 Try a different way of remapping the fields. Should work because it's userspace, not relauncher space - - v99.99-pre-2157 Revert "Use the reobfuscation maps in the reflection helper for field lookups: should help some reflection cases with the deobf." - This reverts commit 485db6be2e6b54a9a523a2b06e0d886792b0826a. - - v99.99-pre-2156 Updated FML: - MinecraftForge/FML@485db6be2e6b54a9a523a2b06e0d886792b0826a Use the reobfuscation maps in the reflection helper for field lookups: should help some reflection cases with the deobf. - - v99.99-pre-2155 Use the reobfuscation maps in the reflection helper for field lookups: should help some reflection cases with the deobf. - - v99.99-pre-2154 Updated FML: - MinecraftForge/FML@25f3fcad4654d19637878bdfb2b70a9586fb3fc9 Fix up some relauncher stuff: the vanilla applet works now, as do other applets. Deobf data is resolveable for them too. - - v99.99-pre-2153 Fix up some relauncher stuff: the vanilla applet works now, as do other applets. Deobf data is resolveable for them too. - - v99.99-pre-2152 Updated FML: - MinecraftForge/FML@6bf7c9878cc959d5f5fa8ec0bf9d0d75037df882 Fixed srg name of minecraftDir for runtime deobf. - - v99.99-pre-2151 Fixed srg name of minecraftDir for runtime deobf. - - v99.99-pre-2150 Updated FML: - MinecraftForge/FML@95d0ff18cdca3b5a91b648c847c00f559f8ce6f2 Fix runtime deobfuscation for remapped inner classes - - v99.99-pre-2149 Fix runtime deobfuscation for remapped inner classes - - v99.99-pre-2148 Refresh patch - - v99.99-pre-2147 Updated FML: - MinecraftForge/FML@86a9c7d35953296f7c8bd3a2b1b43115ef0f9308 Fixup reobfusication of server code if present. - MinecraftForge/FML@8e7956397dd80902f7ca69c466e833047dfa5010 Just enable server side compile, and warn not to complain tous. - MinecraftForge/FML@889efc1c0a9216b55f6de275e4f4a279d977e60c Fixes GameRegistry.registerBlock - MinecraftForge/FML@fe1623a36a1bb8b0a046d833e896fd46d88898ef Merge pull request #195 from RainWarrior/snapshot15 - MinecraftForge/FML@62f5adf8e21d59408af409a88b2c81757fd3c587 Revert "Fix modlist to use the new texture binding functions, i think" - MinecraftForge/FML@58ee06ea8edf508daa4ab3920790c0153cf6660d Some fixes for the snapshot - MinecraftForge/FML@368a2245ef0071b0b7a35d3bd78ab1ae379f8faf Merge branch 'snapshot15' - MinecraftForge/FML@1eba1dfdc00edf12ca3d8586dc342563218fc717 Fix accidental commands.patch overwrite - MinecraftForge/FML@ebdb166ec87e63503f0071e557cdb44629a0e0c2 Merge branch 'snapshot15' - MinecraftForge/FML@450dd8313c2e9e46d173bbd242f84d48266af7c8 Fix up some small things, merging into mainline - MinecraftForge/FML@1642bad402efe819f4e763bf4b460d8c04194849 Fix Multi-part entity children ID issue, mobs with custom spawning must deal with child ids themselves. - - v99.99-pre-2146 Fix Multi-part entity children ID issue, mobs with custom spawning must deal with child ids themselves. - - v99.99-pre-2145 Merge remote-tracking branch 'origin/snapshot15' - - v99.99-pre-2144 Fix up some small things, merging into mainline - - v99.99-pre-2143 Merge branch 'snapshot15' - - v99.99-pre-2142 Fix accidental commands.patch overwrite - - v99.99-pre-2141 Merge branch 'snapshot15' - - v99.99-pre-2140 Some fixes for the snapshot - - v99.99-pre-2139 Revert "Fix modlist to use the new texture binding functions, i think" - This reverts commit 48544db690bf213a322954b7bd39cb3a8ca59bb1. - Conflicts: - client/cpw/mods/fml/client/GuiModList.java - - v99.99-pre-2138 Merge pull request #195 from RainWarrior/snapshot15 - Fixes GameRegistry.registerBlock - - v99.99-pre-2137 Fixes GameRegistry.registerBlock - - v99.99-pre-2136 Fix reobf call. - - v99.99-pre-2135 Early define CrashReport classes to combat invalid crash details. - - v99.99-pre-2134 Updated FML: - MinecraftForge/FML@f1c6bdd57d41a938cb3326d509042f6842e42396 Support the MCP format of partial reobfuscation for portability. Ensure modloader-like compatibility - MinecraftForge/FML@0419b9d9751ade4497343aefaf2ca43703eb479a Update MCP info for latest - - v99.99-pre-2133 Update MCP info for latest - - v99.99-pre-2132 Support the MCP format of partial reobfuscation for portability. Ensure modloader-like compatibility - - v99.99-pre-2131 Deprecated Forge's ISidedInventroy, there is a vanilla solution. Added temporary config option to legacy furnace slot orientation. - - v99.99-pre-2130 Fix typos. - - v99.99-pre-2129 Updated to 1.5 Pre-release - Updated FML: - MinecraftForge/FML@2d98835db8c6a7665ef55117d60ab4318876836b Scala support! It's still primitive, I hope that people will like it. I do :) - MinecraftForge/FML@5bfaf7c1700191b6ed8f4752c9a95bf8c25323ef Global object registry, also, support the new itemblockwithmetadata constructor - MinecraftForge/FML@80a40c03e644840d827eb7d67ff97f6558eaa2e4 Update to MCP 1.5 and minecraft 1.5. - MinecraftForge/FML@b3e854a15d7c50b4967be8237df5fdace95a15ee Update for new MCP with srg reobf. - - v99.99-pre-2128 Update for new MCP with srg reobf. - - v99.99-pre-2127 Update to MCP 1.5 and minecraft 1.5. - - v99.99-pre-2126 Global object registry, also, support the new itemblockwithmetadata constructor - - v99.99-pre-2125 Scala support! - It's still primitive, I hope that people will like it. I do :) - - v99.99-pre-2124 Updated FML: - MinecraftForge/FML@e9ff699c2dcd787a3e0ebaa427c625a48de4c9fb Refresh the renderengine after modloading is complete. Should fix issues with out-of-place texture registration by mods. - MinecraftForge/FML@a723aa68606d57b0ee5bac8b1d1905abef440b54 Refresh copyright notices on everything - MinecraftForge/FML@c42a2101408b21799728c88e2d02c718c3b0dd36 Strip deprecated code - MinecraftForge/FML@6eeae8c49ff4359dc21c44eb73e4e043285cd8bf Fix up state transition derp when the server crashes with an error- it shouldn't double-derp - MinecraftForge/FML@81c6421f84c1bff359dfe927974e8730b348806a Tweak license text- any osi licensed project can use the asm transformer code - - v99.99-pre-2123 Clean up Access Transformer mapping data - - v99.99-pre-2122 Tweak license text- any osi licensed project can use the asm transformer code - - v99.99-pre-2121 Fix up state transition derp when the server crashes with an error- it shouldn't double-derp - - v99.99-pre-2120 Strip deprecated code - - v99.99-pre-2119 Refresh copyright notices on everything - - v99.99-pre-2118 Refresh the renderengine after modloading is complete. Should fix issues with out-of-place texture registration by mods. - - v99.99-pre-2117 Make release quit on compile error. - - v99.99-pre-2116 Fix compile error, forget to flush to disc. - - v99.99-pre-2115 Readd second render pass to TileEntities and Entities, patches were missed when merging in master branch. As note, CB can DIAF. - - v99.99-pre-2114 Add an Icon to the LiquidStack, for rendering the liquid in various ways - - v99.99-pre-2113 Updated FML: - MinecraftForge/FML@abe4f73a9a3158f6f9d1ea2334798f54a25817bf FIX massive performance issue with FML. Thanks to @sfPlayer1 for finding this epic derp on my part! - - v99.99-pre-2112 FIX massive performance issue with FML. Thanks to @sfPlayer1 for finding - this epic derp on my part! - - v99.99-pre-2111 let's do it right this time. Hmmm - - v99.99-pre-2110 Call stitcher for non-existent textures as well. Probably allows - for generated textures. Hmmm - - v99.99-pre-2109 Updated FML: - MinecraftForge/FML@debbdc00be8ea1a261cdff83785ddc7100419a74 Capture Minecraft logs into FML logging - MinecraftForge/FML@74fffc6fdc2eda8caa9a7feb0826d7babb84751a Update next render to 40 - - v99.99-pre-2108 Fix ItemSeedFood respecting custom soils. - - v99.99-pre-2107 Removed erroring imports and update build function to die on errors. - - v99.99-pre-2106 New world event for controlling potential entity spawnlists. For #430 - - v99.99-pre-2105 Update next render to 40 - - v99.99-pre-2104 Capture Minecraft logs into FML logging - - v99.99-pre-2103 Add callback on TextureStitched to control texture loading. - - v99.99-pre-2102 Add helper functions for deling with custom TextureStitched - - v99.99-pre-2101 Fix animation location for textures with domains - - v99.99-pre-2100 Updated FML: - MinecraftForge/FML@aed2cc446ad8d5882890c5f218eb894ea7bd2577 Force file name encoding to UTF-8, caused different zips on different systems. - - v99.99-pre-2099 Force file name encoding to UTF-8, caused different zips on different systems. - - v99.99-pre-2098 Fixed new python changes. - - v99.99-pre-2097 Rework configuration, configs should now use Config.hasChanged to deterne if thehould call save(), also re-worked the saving to not use String.format as much. - - v99.99-pre-2096 Copy over some needed files for debugging. - - v99.99-pre-2095 Update submodule - - v99.99-pre-2094 Change FML module to read-only connection. - - v99.99-pre-2093 Update python scripts to reflect that FML is now a submodule. Delete updateasmdata as it's in /fml/ now. Build should work once again. - - v99.99-pre-2092 Remove window helper batch files. - - v99.99-pre-2091 Removed GNUWin32 files and uneeded files seince FML is now a submodule. - - v99.99-pre-2090 Added submodule changelog ganerator: - Updated FML: - MinecraftForge/FML@e74087ee430633475c3ca058e54e3ef242a9d6aa Ignore again, testing submodule. - - v99.99-pre-2089 Testing selective commit of submodule. - - v99.99-pre-2088 Ignore again, testing submodule. - - v99.99-pre-2087 Ignore this commit. - - v99.99-pre-2086 Add in simple texture management for mods using the stitcher. Scope with "{domain}:{texture}" to - get textures that are not at /textures//{texture}.png but /mods/{domain}/textures//{texture}.png - instead - - v99.99-pre-2085 Fix up patches for FML, also, add in FML as a submodule rather than a zip - - v99.99-pre-2084 Ignore deobf data - - v99.99-pre-2083 Force the joined.srg timestamp to zero- avoids annoying sha1 differences - - v99.99-pre-2082 Don't enforce signatures on minecraft classes - - v99.99-pre-2081 Update MCP URL for snapshot - - v99.99-pre-2080 Fix up runtime deobfuscation. Working well now. - - v99.99-pre-2079 Build, and use, MC versioned deobfuscation data - - v99.99-pre-2078 Merge branch 'runtimedeobf' into snapshot15 - - v99.99-pre-2077 Add in build for deobf data zip file, update for official mcp 7.39 - - v99.99-pre-2076 Updated Forge to s13w09c - - v99.99-pre-2075 Fix exc for renamed Behavior classes. - - v99.99-pre-2074 Actually remove classes from the csv when removed, and moved All EntityMinecart entities to net.minecraft.entity.item - - v99.99-pre-2073 Delete unneeded patch - - v99.99-pre-2072 Readd ignore for argo and bouncycastle, needed for our replacement to work properly. - - v99.99-pre-2071 Update FML to 1.5 snapshot 13w09c - - v99.99-pre-2070 Tweaks to runtime deobf - - v99.99-pre-2069 Update distribuited eclipse's classpath for updated libraries. - - v99.99-pre-2068 Not supposed to have debug stuff... - - v99.99-pre-2067 Sync up with FML, Will not run nativly as you need deobfusication_data.zip in your libs folder. - We have not setup the download for that yet, to make it yourself just zip joined.srg name it deobfusication_data.zip and put it in lib - - v99.99-pre-2066 Fix crash in GuiModList for mod logo files, logo is not rendering for unknow reason. - - v99.99-pre-2065 Fix bug in rename_vars where certian items would fail to be renamed. - - v99.99-pre-2064 Merge branch 'master' into snapshot15 - Conflicts: - fml-src-1.4.7-4.7.22.539-master.zip - fml-src-1.4.7-4.7.35.556-master.zip - fml-src-13w02b-4.99.16.541-snapshot15.zip - - v99.99-pre-2063 Merge commit '695b080197bd577cc34fe6dbc72b74f4a74b2d5c' into snapshot15 - Testing cherry picking. - - v99.99-pre-2062 Just enable server side compile, and warn not to cmplain to us. - - v99.99-pre-2061 Fixup reobfusication of server code if present. - - v99.99-pre-2060 Tweak IASM hook api. You can return multiple classes now. - - v99.99-pre-2059 Merge branch 'runtimedeobf' into snapshot15 - - v99.99-pre-2058 Change readFully to actually read a bunch of bytes at once now. Thanks to nallar and aartbluestoke for the suggestion to - revisit this.. - - v99.99-pre-2057 Clean up more junk - - v99.99-pre-2056 Update libs for 1.5. Lots of new libs. - - v99.99-pre-2055 Fix renderengine patch *sigh* - - v99.99-pre-2054 Merge branch 'master' into snapshot15 - Conflicts: - patches/minecraft/net/minecraft/client/renderer/RenderEngine.java.patch - - v99.99-pre-2053 Merge branch 'master' into snapshot15 - Conflicts: - client/cpw/mods/fml/client/TextureFXManager.java - - v99.99-pre-2052 Fix TESR culling for beacons, and implement a good enough measure for Chests. - - v99.99-pre-2051 Bump version to 6.6.2, declaring Forge for MC 1.4.7 feature complete, as 1.5 is on the horizon, only bug fixes from this point on. Unless something major happens on Mojang's end. - - v99.99-pre-2050 Add water and lava to liquid dictionary by default, closes #419 - - v99.99-pre-2049 Store the glMultiTexCoord lightmap for later use with glDrawArrays closes #406 - - v99.99-pre-2048 Added unload event for client worlds Closes #405 - - v99.99-pre-2047 WorldGen*Trees shoud not respect custom soils. Closes #355 - - v99.99-pre-2046 ItemStack sensitive versions of Item.getPotionEffect and Item.isPotionIngredient Closes #321 - - v99.99-pre-2045 clarify what the size is measured in for the dormant chunk cache. -.- - - v99.99-pre-2044 Fix movement speed check, closes #420 - - v99.99-pre-2043 Change usage of ketSet/get to entrySet in OreDictionary, closes #422 - - v99.99-pre-2042 Fixed entity colision above max world height, and below 0. Closes #400 - - v99.99-pre-2041 Disable automatic equiti of pcke dup items for players, and fixed index issues in Player.setCurrentItemOrArmor. - - v99.99-pre-2040 Merge pull request #188 from immibis/master - Console log thread should be a daemon thread. - - v99.99-pre-2039 Console log thread should be a daemon thread. - - v99.99-pre-2038 Update FML to 556: - b6d6f235 Fix sprite map issue. - 1158aa46 Fix Language Registry, closes #FML 163 - 50ce6fb3 Option to disable renaming for srgnames. - - v99.99-pre-2037 Fix sprite map issue. - - v99.99-pre-2036 Merge branch 'master' into runtimedeobf - - v99.99-pre-2035 Fix Language Registry, closes #163 - - v99.99-pre-2034 Fix Language Registry, closes #163 - - v99.99-pre-2033 Merge branch 'master' into runtimedeobf - - v99.99-pre-2032 Jenkins needs this script, *pokes Overmind* -.- - - v99.99-pre-2031 Fix profiler issue with RenderGlobal patch. Closes #414 - - v99.99-pre-2030 Fix EventTransformer throwing an NPE when transforming a class that doesn't exist. Closes #413 - - v99.99-pre-2029 Fix fortune modifier always passed as 0 to idDropped closes #412 - - v99.99-pre-2028 Fixes comparison for items in creative inventory, closes #411 - - v99.99-pre-2027 Added a hook into SlotArmor so Items can control if they are classified as a Armor type. Closes #408 - - v99.99-pre-2026 Add item frame transformations to the EntityItem render helper Closes #407 - - v99.99-pre-2025 Made LiquidStack.isLiquidEqual(ItemStack) properly check the contained liquid, in addition to obvious id/meta closes #399 and closes #403 - - v99.99-pre-2024 Kill .sh wrappers until someone writes more robust versions, closes #392 and closes #402 - - v99.99-pre-2023 Actually use the line parameter in ServerChatEvent, closes #401 - - v99.99-pre-2022 Kill generated timestamp in config files, if you want to retreive this information, usethe file's modified time. Closes #404 - - v99.99-pre-2021 Option to disable renaming for srgnames. - - v99.99-pre-2020 Fix ServerBrand retriever- forge is now forge,fml! - Update FML: cd96718 - cd96718 Fix HD mob skins, FINALLY!!! Stupid eyes are stupid. - - v99.99-pre-2019 Fix HD mob skins, FINALLY!!! - Stupid eyes are stupid. - - v99.99-pre-2018 Remove the single use interface ITickingArmor, and apply to Item directly. - - v99.99-pre-2017 Fix possible null case for collision bounding box. - - v99.99-pre-2016 Fix TESR rendering for double chests - - v99.99-pre-2015 Merge branch 'TESRculling' - - v99.99-pre-2014 Add in "armor ticking"- implement the interface and the armor piece will tick. - Update FML:22dbe41 - 22dbe41 Fix up mistake that broke all modloading. Nice. - - v99.99-pre-2013 Fix up mistake that broke all modloading. Nice. - - v99.99-pre-2012 Fix some class naming and packaging issues, pending an MCP update - for the same - - v99.99-pre-2011 Update for MCP 7.34 and MC 13w05b - - v99.99-pre-2010 MCP compilation works - - v99.99-pre-2009 Update FML:549b6fd - 549b6fd IMC tweaks: runtimeMessages now work (thanks for all that testing for this much requested feature!) and IMCEvent will no longer rem - 9fafdc1 More logging tweaks. You can probably configure individual mod log files if you wish now - f169f7c A log of logging cleanup. FML will now read logging.properties to configure logging channels a couple of times during startup. You - 3ac891f Try and handle "death on startup" a bit cleaner - 2dc0189 Deprecate the old GUI ticktype. They're dead and have been for some time. - dd98784 Tweak a method signature - 1c9a510 Add parameters to FML install to enable/disable certian aspects. Applying patches, running transformer/merger, and decompiling serv - 1bd6847 Fix up packages.csv ordering for easier diffing - - v99.99-pre-2008 Fix small derp in TE - - v99.99-pre-2007 IMC tweaks: runtimeMessages now work (thanks for all that testing for this much requested feature!) - and IMCEvent will no longer remove messages if no one gets them, so you can do - just manual runtime polling, if you wish. - - v99.99-pre-2006 More logging tweaks. You can probably configure individual mod log files if you wish now - - v99.99-pre-2005 A log of logging cleanup. FML will now read logging.properties to configure logging channels a couple of times during startup. - You should be able to filter a lot of messages based on things like modid and certain FML related features that can be noisy - like item tracking. - Should close #175 - - v99.99-pre-2004 Merge branch 'master' into TESRculling - - v99.99-pre-2003 Fix initalization issue with the clamping threshold config value. And remove vanilla console spam related to it. - - v99.99-pre-2002 Change WorldServer.allPlayersSleeping to public, and remove the SideOnly annotation on EntityPlayer.getSleepTimer() Closes #393 - - v99.99-pre-2001 Change access of upper and lower chest fields of InventoryLargeChest to public. Closes #387 - - v99.99-pre-2000 Added catch to TileEntityChestRenderer for potential crash when modders do bad things -.- Closes #389 - - v99.99-pre-1999 Rework canSilkHarvest hook to try and honor vanilla overrides, should close #391 - - v99.99-pre-1998 Added input getters for Ore recipies, and javadoc warning for modders, #390 - - v99.99-pre-1997 Add DimensionManager.unregisterProviderType for PR #388 - - v99.99-pre-1996 Fixup a resource leak warning. - - v99.99-pre-1995 Forge Additions: Exposed ChunkCache.worldObj to public PR #383 - - v99.99-pre-1994 Moved warning logic down, so that no more tickets are isues if the mod is over it's alotment. Fixes #378 - - v99.99-pre-1993 Final part of the deobfuscation data setup- fields are now deobfuscated as well. - All that remains, is to figure out what and how to distribute the deobfuscation data itself. - - v99.99-pre-1992 Read the joined.srg file directly from lib/deobfuscation_data.zip now. Still debating distribution method. - - v99.99-pre-1991 Now actually works for mods, somewhat. It currently generates access violations for - ModLoader mods that presume access to fields that are not actually accessible from - a different package. - - v99.99-pre-1990 Method deobfuscation now works - - v99.99-pre-1989 Working to read class names and remap them at runtime. - - v99.99-pre-1988 First draft runtime deobf - - v99.99-pre-1987 Try and handle "death on startup" a bit cleaner - - v99.99-pre-1986 We try and log a message if we detect a world leak: it's probably not infallible, but it should - help mod developers- if you see this when testing your mod with, say, mystcraft, you're probably - keeping a hold of an invalid handle to the World (either directly, or indirectly via Entity or TileEntity) - and you should look to refactor to wrap those handles in WeakReferences - - v99.99-pre-1985 Add in a mechanism for explicit subclassing of WeightedRandomChestItem to allow for - generational style chest content generation rather than static. Cleans up some old code nicely - - v99.99-pre-1984 Bump the revision number for the TESR and renderpass changes - - v99.99-pre-1983 Merge branch 'renderpass' of https://github.com/Chicken-Bones/MinecraftForge into TESRculling - Conflicts: - patches/minecraft/net/minecraft/client/renderer/RenderGlobal.java.patch - patches/minecraft/net/minecraft/entity/Entity.java.patch - patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch - - v99.99-pre-1982 Add in TESR culling, and a new TileEntity method to allow for differential sizing of the - TESR view culling vs the TE collision bounding box (the former defaults to the latter) - Checked into a branch because it's likely to break expanded TileEntities. - - v99.99-pre-1981 Fix NPE causing issue with the cache. Derpy derp. - - v99.99-pre-1980 Fix a potential problem with "Entity already added" when using the dormant - chunk cache capability. The entities in the dormant chunk cache will get new - IDs prior to the cached chunk returning. - - v99.99-pre-1979 Deprecate the old GUI ticktype. They're dead and have been for some time. - - v99.99-pre-1978 Tweak a method signature - - v99.99-pre-1977 Add parameters to FML install to enable/disable certian aspects. Applying patches, running transformer/merger, and decompiling server. - - v99.99-pre-1976 Attempt to fix a possible NPE in the face of ChickenBones' hackery. ChickenBones. stop it! - - v99.99-pre-1975 Merge remote-tracking branch 'origin/master' into snapshot15 and fix patches - Conflicts: - fml-src-1.4.7-4.7.22.539-master.zip - fml-src-1.4.7-4.7.4.520-master.zip - fml-src-13w02b-4.99.16.541-snapshot15.zip - patches/minecraft/net/minecraft/client/renderer/entity/RenderItem.java.patch - patches/minecraft/net/minecraft/entity/item/EntityItem.java.patch - patches/minecraft/net/minecraft/entity/item/EntityMinecart.java.patch - patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch - patches/minecraft/net/minecraft/item/crafting/RecipeFireworks.java.patch - patches/minecraft/net/minecraft/server/gui/GuiStatsComponent.java.patch - patches/minecraft/net/minecraft/server/management/PlayerInstance.java.patch - patches/minecraft/net/minecraft/server/management/ServerConfigurationManager.java.patch - patches/minecraft/net/minecraft/world/World.java.patch - patches/minecraft/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch - patches/minecraft/net/minecraft/world/gen/structure/ComponentMineshaftCorridor.java.patch - patches/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeatureDesertPyramid.java.patch - - v99.99-pre-1974 Fix a couple of forge patches - Update FML: d075daf - d075daf Merge branch 'master' into snapshot15 Fix up compilation and patching errors - 1bd6847 Fix up packages.csv ordering for easier diffing - dd832f2 Update for MCP7.30c - fixes redstone rendering issues - aebf6eb Add in a registry method to allow for alternative TileEntity names- they will be used to support loading maps containing the older definiti - 8921cfe Remember to add the new patches! - cd67596 The "ServerStarting" event should now properly crash the server if it fails, so the client will properly exit. Also, added in a "pre-server - e1c6630 Javadoc cleanup - 5ce4e31 Fix breaking change - a99c488 Merge branch 'patch-1' of https://github.com/bspkrs/FML into gh-updates - 94282c5 Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates - 7ad8529 Update MCP to MCP7.26a and refresh MCP names - 15534ed Update address of the FML repository to the new location in all the files - aa822e3 Fix logical error in comment text - a14ab91 Update license text to make clear that FML is not a way to sidestep MCP licensing. - 0165742 Fix mcp conf md5 signatures for the snapshot - 26a5b31 FMLLogFormatter: dynamic log level name - - v99.99-pre-1973 Merge branch 'master' into snapshot15 - Fix up compilation and patching errors - Conflicts: - common/cpw/mods/fml/common/registry/GameRegistry.java - conf/joined.srg - conf/params.csv - conf/version.cfg - patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch - - v99.99-pre-1972 Fix up packages.csv ordering for easier diffing - - v99.99-pre-1971 Update for MCP7.30c - fixes redstone rendering issues - - v99.99-pre-1970 Update FML:aebf6eb - aebf6eb Add in a registry method to allow for alternative TileEntity names- they will be used to support loading maps containing the older definiti - - v99.99-pre-1969 Add in a registry method to allow for alternative TileEntity names- they will be used to support - loading maps containing the older definitions. - - v99.99-pre-1968 Gave entities and tile entities access to the second render pass for translucency. - - v99.99-pre-1967 Change DimensionManager.getCurrentSaveRootDirectory() to try and work even for the new server about to start event - Update FML:8921cfe - 8921cfe Remember to add the new patches! - cd67596 The "ServerStarting" event should now properly crash the server if it fails, so the client will properly exit. A - - v99.99-pre-1966 Remember to add the new patches! - - v99.99-pre-1965 The "ServerStarting" event should now properly crash the server if it fails, - so the client will properly exit. Also, added in a "pre-server-start" event - that fires before the worlds are loaded for a save, just for you immibis. - - v99.99-pre-1964 Some javadoc fixes - - v99.99-pre-1963 Javadoc cleanup - - v99.99-pre-1962 Add in patch to change how playerinstance sends TE chunk updates. It should always send just the TEs - that changed now, and not "ALL" TEs. Also, added configuration value to change the 64 threshold to a - configurable number - - v99.99-pre-1961 Update FML: 5ce4e31 - 5ce4e31 Fix breaking change - - v99.99-pre-1960 Fix breaking change - - v99.99-pre-1959 Merge branch 'worldtype_customize' of https://github.com/ExtrabiomesXL/forge into gh-updates - - v99.99-pre-1958 Merge branch 'master' of https://github.com/CovertJaguar/MinecraftForge into gh-updates - - v99.99-pre-1957 Merge part of PR #375 related to ChunkEvent.Load for the client side - - v99.99-pre-1956 Update FML: a99c488 - a99c488 Merge branch 'patch-1' of https://github.com/bspkrs/FML into gh-updates - 94282c5 Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates - aa822e3 Fix logical error in comment text - 26a5b31 FMLLogFormatter: dynamic log level name - - v99.99-pre-1955 Merge branch 'patch-1' of https://github.com/bspkrs/FML into gh-updates - - v99.99-pre-1954 Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates - - v99.99-pre-1953 Update licencing information to make clear that forge is allowed to redistribute and automatically - download parts of MCP, but this permission is not transitive to people distributing MinecraftForge - source independently of the MinecraftForge project. - Update MCP to 7.26a and FML: 7ad8529 - 7ad8529 Update MCP to MCP7.26a and refresh MCP names - 15534ed Update address of the FML repository to the new location in all the files - a14ab91 Update license text to make clear that FML is not a way to sidestep MCP licensing. - - v99.99-pre-1952 Update MCP to MCP7.26a and refresh MCP names - - v99.99-pre-1951 Update address of the FML repository to the new location in all the files - - v99.99-pre-1950 Fixed render passes for EntityItems - Should be < instead of <= - - v99.99-pre-1949 Fix logical error in comment text - - v99.99-pre-1948 Update license text to make clear that FML is not a way to sidestep - MCP licensing. - - v99.99-pre-1947 Bump major and minor version numbers to mark 1.5, it's gunna break everything. Should be a compileable 1.5 build. - - v99.99-pre-1946 Fix check in getItem() to allow lowest item ID #361 - - v99.99-pre-1945 Update FML: - New scripts for signing jars, and repackging source folders. - Fix LanguageRegistry loading files in UTF-8 format. loadLocalization should work for non-xml in all languages now (assumes UTF-8) - Fix incorrect end length calculation. Closes #161 Thanks BStramke! - - v99.99-pre-1944 Merge pull request #370 from CovertJaguar/snapshot15 - MCL Update - - v99.99-pre-1943 Fix mcp conf md5 signatures for the snapshot - - v99.99-pre-1942 MCL Update - - v99.99-pre-1941 Removed some dead code, We don't bind custom tessellators - - v99.99-pre-1940 First patches updae to 1.5, Many rendeirng related changes, most notibly removed Item/Block's getTextureFile() functions. - - v99.99-pre-1939 Updated FML and at config for 1.5 snapshot - - v99.99-pre-1938 Update patche for jad-style names. - - v99.99-pre-1937 FMLLogFormatter: dynamic log level name - FMLLogFormatter now uses getLocalizedName or getName for log level name - Changes to be committed: - modified: common/cpw/mods/fml/relauncher/FMLLogFormatter.java - - v99.99-pre-1936 Temporary hosting - - v99.99-pre-1935 Another packaging update. I think we're done now. - - v99.99-pre-1934 Fix modlist to use the new texture binding functions, i think - - v99.99-pre-1933 A couple of packaging tweaks, clean up more junk. It may come back but for now it's gone - - v99.99-pre-1932 Delete old patches not needed anymore - - v99.99-pre-1931 Initial patch update for snapshot - - v99.99-pre-1930 Initial setup for snapshot- the client compiles, but patches fail to apply. - - v99.99-pre-1929 Updated patches for new JAD style names. - - v99.99-pre-1928 FML will now rename local variables to have JAD-style names instead of FernFlower var## names. New script to do this, to allow for modders to run it over there own code: python rename_vars.py -mcp [folders to rename]... - - v99.99-pre-1927 Fix incorrect end length calculation. Closes #161 Thanks BStramke! - - v99.99-pre-1926 Fix LanguageRegistry loading files in UTF-8 format. loadLocalization should work for non-xml in - all languages now (assumes UTF-8) - - v99.99-pre-1925 Merge pull request #158 from CovertJaguar/patch-2 - Added an accessor for villagers - - v99.99-pre-1924 Added an accessor for villagers - - v99.99-pre-1923 New python script to update java files for new package names. Usage: paython update_packages.py --mcp-dir [Folders To Repackage] - - v99.99-pre-1922 New python script for signing partial jar files. See comments inside for details. - - v99.99-pre-1921 Added event hooks to control to allow mod control of mob spawning. PR: #337 - Deprecated LivingSpecialSpawnEvent in favor of new LivingSpawnEvent.SpecialSpawn - - v99.99-pre-1920 Fixed incorrect lighting in some cases. Closes issue #349 - - v99.99-pre-1919 Added getter for Metadata smelting list, because, why not.. PR: #352 - - v99.99-pre-1918 Some small code cleanups. - - v99.99-pre-1917 Fixed issue where ChunkPriderEvent.InitNoiseField used the wrong sizeY value. - - v99.99-pre-1916 Fix issue where dungeon loot table had wrong values. - - v99.99-pre-1915 Update FML:6f1b762 - 6f1b762 Move server stopped *after* the server has actually stopped. *sigh* - - v99.99-pre-1914 Move server stopped *after* the server has actually stopped. *sigh* - - v99.99-pre-1913 Update FML:d9bfb29 - d9bfb29 Add in a "server stopped" event - - v99.99-pre-1912 Add in a "server stopped" event - - v99.99-pre-1911 Attempt to resolve the entity concurrency issue, by simply deferring unload - to the next tick - - v99.99-pre-1910 Update FML:6fc7bc4 - 6fc7bc4 Add in some classloader debugging information: use fml.debugClassLoading=true as a system property to track down prob - - v99.99-pre-1909 Add in some classloader debugging information: use fml.debugClassLoading=true as a system property - to track down problems with classes not being found or loading erratically. - - v99.99-pre-1908 Fix noisy exception logging - - v99.99-pre-1907 Fix a missed patch and cleaned up other patches - Rollback a method name change that breaks a lot of mods - Update FML: fb701cd - fb701cd Revert MCP name change for canConnectRedstone - it conflicts with a forge method of the same name and breaks 1 - - v99.99-pre-1906 Revert MCP name change for canConnectRedstone - it conflicts with a forge method of the same name and breaks 1.4.6 to 1.4.7 compatibility - - v99.99-pre-1905 Update for MC 1.4.7 - Update FML: f7cc50b - - v99.99-pre-1904 Update for MC 1.4.7 - - v99.99-pre-1903 Attempt a fix for the new chunk compression changes. - - v99.99-pre-1902 Update FML:1a232cf - 1a232cf Fix multiple GUI containers for ML containers. Sorry ultimatechest that this fix took so long, a bug report at - 853f54b Log if there's a problem reading the class bytes - - v99.99-pre-1901 Fix multiple GUI containers for ML containers. Sorry ultimatechest that - this fix took so long, a bug report at github.com/cpw/FML would help, - next time ;) - - v99.99-pre-1900 Log if there's a problem reading the class bytes - - v99.99-pre-1899 Fix mobs spawning on inverted slabs/stairs. - - v99.99-pre-1898 Add ability to WorldTypes to display the 'Customize' button and react to it - - v99.99-pre-1897 Fixed order <.< you saw nothing. - - v99.99-pre-1896 Use nanoTime instead of currentTimeMillis for potential performance increase. - - v99.99-pre-1895 Fixed typo in dungeon loot - - v99.99-pre-1894 Fixed EntityMinecard missed patch, Issue #338 - - v99.99-pre-1893 Fixed issue with Efficancy enchatment when connected to vanilla servers. - - v99.99-pre-1892 Merge branch 'Uristqwerty-master' - - v99.99-pre-1891 Merge branch 'master' of https://github.com/Uristqwerty/MinecraftForge into Uristqwerty-master - - v99.99-pre-1890 Protect deflation with a simple semaphore. Should close #336 - - v99.99-pre-1889 Update FML: Fix NPE in fingerprint loading, and pass expectged fingerprint to FMLFingerprintViolationEvent - - v99.99-pre-1888 Fix NPE in fingerprint loading, and pass expectged fingerprint to FMLFingerprintViolationEvent - - v99.99-pre-1887 Force parent ListenerListInsts to rebuild. - Without this change, it is possible (and, in fact, nearly guaranteed) for lists to rebuild endlessly if a parent list is marked as needing a rebuild but never actually read. This change forces the parent list(s) to rebuild as well, resulting in a significant performance increase and smoother framerate due to greatly reduced GC activity. - - v99.99-pre-1886 Update FML: 7e6456d - 7e6456d Fix a message delivery issue in IMC - 664ebda Some tweaks for signing and ID matching - - v99.99-pre-1885 Fix a message delivery issue in IMC - - v99.99-pre-1884 Fixes a vanilla bug where the player view would dip when stepping between certain blocks - https://mojang.atlassian.net/browse/MC-1594 - Issue #318, let me know if you notice any issue. - - v99.99-pre-1883 Fixed parameter ordering u.u - - v99.99-pre-1882 Re-write/Deprecated DungeonHooks loot tables, now uses ChestGenHooks like the rest of the world gen. Also fixes issue #330 by adding in enchanted books. - Should be API compatible. - - v99.99-pre-1881 Move chunk compression to the network thread in Packet 51 and 56 - This will reduce the server load considerably by doing the chunk data compression in writePacketData, which will be run from the network thread. - The chunk compression can easily use 1/4th of the overall server thread CPU time if someone is exploring much, especially when moving quickly (e.g. with quantum leggings). - Player, this is how it's properly done. - - v99.99-pre-1880 Explicitly check if useItem is not denied, allows for denying the item without denying the block - - v99.99-pre-1879 Fix missed patch in EntityMinecart, #334 - - v99.99-pre-1878 Delete unneeded patch. - - v99.99-pre-1877 Some tweaks for signing and ID matching - - v99.99-pre-1876 Some access transformations to allow mystcraft to work again. Closes #331 - - v99.99-pre-1875 Fix Fireworks to always work in SMP - - v99.99-pre-1874 Fix up enchantment at the enchanting table vs via a book. Adds in a method - that previously exists under a new name: canApplyAtEnchantingTable() - to determine enchantments that can apply at the enchanting table (a smaller - subset of all possible enchantments for an item, now). Also, add your - enchantments to the anvil book application list, if neccessary. - - v99.99-pre-1873 Tweak packet56 to see if this resolves the apparent worldgen derpiness - - v99.99-pre-1872 Server side only item callback: allow a held item to decide if it wants to pass sneak-clicks through - to a block, or not. Defaults false- the same as the new vanilla behaviour (sneak clicks with an item - in hand don't activateBlock anymore). - - v99.99-pre-1871 Move another patch up a bit - should actually close #329 - - v99.99-pre-1870 Add IPlantable to itemseedfood. Potato and carrot support! - - v99.99-pre-1869 Fixed cpw's derp in the PlayerInteractEvent logic. - - v99.99-pre-1868 Updated NetClientHandler for onConnectionClosed placement fix. - - v99.99-pre-1867 Update FML: - Fixed issue with users who don't have the JDK installed in there path - MCP will now output bfusicated files with windows reserved names to _name.class and FML will prioritize those names. - Fixed placement of onConnectionClosed callback - - v99.99-pre-1866 Remove unneeded file - - v99.99-pre-1865 Fixed placement of onConnectionClosed callback. - - v99.99-pre-1864 Fix ItemInWorldManager so that itemUseFirst works, and the playerinteractevent works. Minor patching mis hit. Apologies. - - v99.99-pre-1863 OK. AT the right thing, and add in a call to always get the right thing. Clean up patch fuzz too. - - v99.99-pre-1862 Access Transform a couple of methods - - v99.99-pre-1861 MCP will reobf classes with reserved names in windows to a legal file name. And FML will try to read these classes over the default ones. - - v99.99-pre-1860 Output obfed files with reserved windows names to _NAME.class - - v99.99-pre-1859 Merge remote-tracking branch 'origin/master' - - v99.99-pre-1858 Fixe BiomeDecorator AT entry. - - v99.99-pre-1857 Add quotes around javac command. - - v99.99-pre-1856 Drop the item in onBlockHarvested, not breakBlock - - v99.99-pre-1855 Fix up block drops for skulls and cocoa - - v99.99-pre-1854 And fix up the other equals - - v99.99-pre-1853 Fix comparing ItemStack tags for equality - - v99.99-pre-1852 Update FML: 40e57a2 - 40e57a2 Update MCP to newer version Fix fingerprint fire - - v99.99-pre-1851 Update MCP to newer version - Fix fingerprint fire - - v99.99-pre-1850 Fix accidentally removed not-deprecated methods. - Update FML: d604e44 - d604e44 InterModComms now supports a runtime polling based model for inter-mod comms at runtime. Deprecate method that shouldn't be used. COPY it's content to your mod. Don't CALL it. - 8b7778c Don't be as alarming about item overwrites. - - v99.99-pre-1849 InterModComms now supports a runtime polling based model for inter-mod comms at - runtime. - Deprecate method that shouldn't be used. COPY it's content to your mod. Don't CALL it. - - v99.99-pre-1848 Fix binding the texture for multiple render passes. Thanks mdiyo! Closes #320 - - v99.99-pre-1847 Allow RenderItem to be easily overridden for things that need to render entityitems. IronChest, BuildCraft, RP2, whatever... - - v99.99-pre-1846 Fixed items dieing improperly due to new EntityItem sync changes, also made items render offset when rendered in 3d. - - v99.99-pre-1845 Fix RenderItem so that forge textures load for it - - v99.99-pre-1844 Don't be as alarming about item overwrites. - - v99.99-pre-1843 Updated FML: - Fixes startclient/startserver - Added configuration file which allows modids to ignore ID validation checking. IT WILL CRASH YOUR GAME in 99.999% of cases. - Immibis is a whingy ass. And TinyTimRob too. Now STFU and GTFO. closes fml/#510 for ever. - - v99.99-pre-1842 Removed all functions marked as deperacted for the new MC version - - v99.99-pre-1841 Added configuration file which allows modids to ignore ID validation checking. IT WILL CRASH YOUR GAME in 99.999% of cases. - Immibis is a whingy ass. And TinyTimRob too. Now STFU and GTFO. closes #510 for ever. - - v99.99-pre-1840 Dixed ev eclipse worksapce, now references BC. - - v99.99-pre-1839 Added client src folder to classpath for startclient/startserver. - - v99.99-pre-1838 Removed hardcoded additions - - v99.99-pre-1837 Try and print error while signing jar - - v99.99-pre-1836 Added jar signing to forge, we sign cpw/* and net/minecraftforge/* - - v99.99-pre-1835 Inital update to 1.4.6, Version bumped to 6.5 - - v99.99-pre-1834 Update to MC 1.4.6 - - v99.99-pre-1833 Fix build script - - v99.99-pre-1832 more 1.4.6 tweaks - - v99.99-pre-1831 More work - - v99.99-pre-1830 Merge branch 'securityupdate' - - v99.99-pre-1829 Merge branch 'master' into securityupdate - - v99.99-pre-1828 Update FML: e98c311 - e98c311 Fix up handling null names. *sigh* - - v99.99-pre-1827 Fix up handling null names. *sigh* - - v99.99-pre-1826 Update FML: 293edb3 - 293edb3 Some tweaks to item identification. The GameRegistry methods are deprecated to encourage you to use the new named ones instead. These will force a name on the item/block, allowing for stronger matching t - 9266ff3 Updated MCP download mirriors upon Searge's request. - 31695d5 Fix var name messup - bfb3020 Update released eclipse project to link BouncyCastle - 22a88ea Change ID management slightly. IDs are tracked by block type for itemblock items now. This means servers will need to update. Also, ordinal rearrangements within a mod will no longer trigger server disco - - v99.99-pre-1825 Some tweaks to item identification. The GameRegistry methods are deprecated - to encourage you to use the new named ones instead. These will force a - name on the item/block, allowing for stronger matching than "sequential guessing" - - v99.99-pre-1824 More fixes - - v99.99-pre-1823 Remove erronious double call to PlayerDestroyItemEvent - - v99.99-pre-1822 Make PlaySoundAtEntityEvent fire for players as well - - v99.99-pre-1821 Updated MCP download mirriors upon Searge's request. - - v99.99-pre-1820 Move Side and SideOnly to relauncher package - - v99.99-pre-1819 Fix newline fun - - v99.99-pre-1818 More stuff for the thingy - - v99.99-pre-1817 Remove old NEI/CCC compatibility code and other classloading tweaks - - v99.99-pre-1816 Simplify logic in tick start/end - Change the EnumSet equivalent of "A &= ~ new(~B)" to "A &= B". - This eliminates the need for one temporary object in a frequently called loop, and reduces the number of methods that need to be invoked. - - v99.99-pre-1815 Update FML to fix a typo - - v99.99-pre-1814 Fix var name messup - - v99.99-pre-1813 Update FML: Fixed the eclipse workspace to reference BouncyCastle library. - - v99.99-pre-1812 Update AT for repackage - - v99.99-pre-1811 Update patches for repackage. - - v99.99-pre-1810 Update released eclipse project to link BouncyCastle - - v99.99-pre-1809 Updated python scripts for removal of common folder - - v99.99-pre-1808 Update FML: - Minecraft is now decompiled into sane package names. - Got rid of the src/common folder as the only folder that exists is src/mincraft, because the client and server codebase is merged. - ID Map generation/validation fixes - - v99.99-pre-1807 Manual import fixes - - v99.99-pre-1806 Fixup workspace for BC replacement - - v99.99-pre-1805 Automatically resolved imports. - - v99.99-pre-1804 Bump version to 6.4.2 to mark the merge of TerrainGen branch. - - v99.99-pre-1803 Merge branch 'terraingen' - - v99.99-pre-1802 Derp, imported the repackaged names not old names. - - v99.99-pre-1801 Update FML: - 2f34290e: Fix possible escape leakage.. - 83deece6: Change ID management slightly. IDs are tracked by block type for ItemBlock items now. This means servers will need to update. - Also, ordinal rearrangements within a mod will no longer trigger server disconnection, though a warning will still be logged. - - v99.99-pre-1800 Change ID management slightly. IDs are tracked by block type for itemblock items now. This means servers will need to update. - Also, ordinal rearrangements within a mod will no longer trigger server disconnection, though a warning will still be logged. - - v99.99-pre-1799 Fix possible escape leakage.. - - v99.99-pre-1798 More robust eclipse workspace replacement - - v99.99-pre-1797 Update readme to reflect the fact that we now download MCP. - - v99.99-pre-1796 Make BlockButton.sensible protected and non-final - - v99.99-pre-1795 Expose BiomeDecorator fields for custom Biome information, Issue: #239 - - v99.99-pre-1794 Fix shouldRiderSit() to properly determine if rider is sitting. - - v99.99-pre-1793 Fixes crash when mods add TreeMaps to the Configuration map, thanks AtomicStryker, PR: #282 - - v99.99-pre-1792 Fix type in ForgeChunkManager.ticketCountAvaILableFor, thanks iChun PR: #285 - - v99.99-pre-1791 Creative GUI will now remember what tab page you were on, thanks Matchlighter PR #290 - - v99.99-pre-1790 Pistons now respect world height a little better, for PR #286, will review Rotation event later. - - v99.99-pre-1789 New TileEntity function to determine if the TE should be destroied when Block/Meta changes, For Issue #300 - - v99.99-pre-1788 Add CloudRenderer for PR #304 - - v99.99-pre-1787 Add .DS_Store to the gitignore for mac users - - v99.99-pre-1786 Moved check if map cursor should 'spin' and which world a player respawns in to WorldProvider for PR #308 - - v99.99-pre-1785 Made BlockButton.func_82535_o overrideable for issue #311 - - v99.99-pre-1784 Made GuiContainer.drawSlotInventory overrideable for issue #312 - - v99.99-pre-1783 Fix ForgeDirection.ROTATION_MATRIX for issue #313 - - v99.99-pre-1782 Kill decompile if astyle is not found and set execution bits on mcp .sh files and astyle-osx - - v99.99-pre-1781 Fix for FML Fixes eclipse workspace, now sets execution bits on astyle-osx, and mcp .sh files. Also now kills install if astyle is not found. - - v99.99-pre-1780 Change to download bouncy castle as well. We also finally properly use the downloaded libs - even in vanilla code! - - v99.99-pre-1779 Remove extraneous patch file - - v99.99-pre-1778 Merge branch 'repackage' - Conflicts: - build.xml - client/cpw/mods/fml/client/FMLClientHandler.java - client/cpw/mods/fml/client/GuiIdMismatchScreen.java - common/cpw/mods/fml/common/FMLCommonHandler.java - common/cpw/mods/fml/common/IFMLSidedHandler.java - common/cpw/mods/fml/common/network/ModIdMapPacket.java - common/cpw/mods/fml/common/network/ModListResponsePacket.java - common/cpw/mods/fml/common/registry/GameData.java - common/cpw/mods/fml/common/registry/GameRegistry.java - common/cpw/mods/fml/common/registry/ItemData.java - common/cpw/mods/fml/common/registry/LanguageRegistry.java - common/cpw/mods/fml/server/FMLServerHandler.java - install/fml.py - patches/minecraft/net/minecraft/client/Minecraft.java.patch - patches/minecraft/net/minecraft/server/MinecraftServer.java.patch - patches/minecraft/net/minecraft/world/storage/SaveHandler.java.patch - - v99.99-pre-1777 Merge branch 'repackage' of github.com:cpw/FML into repackage - Conflicts: - common/cpw/mods/fml/common/registry/GameData.java - - v99.99-pre-1776 Merge pull request #145 from pahimar/master - More logging of loading files in LanguageRegistry - - v99.99-pre-1775 Update common/cpw/mods/fml/common/registry/LanguageRegistry.java - Add in logging of what file failed to be loaded - - v99.99-pre-1774 Updated FML to 486: - 02b54ca8: Add a modid on the mods list, should make it easier to do things like forge chunkloading config - 70670f2f: Fix build eclipse extractor task - b9fa3fc9: Add in storage, detection and validation of the ItemID array between client and server - 5e5d8206: Fixing id map generation - should validate correctly now - f9fc06a8: Remade python dist as 32-bit. - 93d47a1c: Reenabled replacement of the eclipse folder. - - v99.99-pre-1773 Fixed install --mcp-dir - - v99.99-pre-1772 Fixed release -skipchangelog - - v99.99-pre-1771 Fix patches, rebased with HEAD - - v99.99-pre-1770 Remade python dist as 32-bit. - - v99.99-pre-1769 Fixing id map generation - should validate correctly now - - v99.99-pre-1768 Reenabled replacement of the eclipse folder. - - v99.99-pre-1767 Remade python dist as 32-bit. - - v99.99-pre-1766 Fixing id map generation - should validate correctly now - - v99.99-pre-1765 Fix up idmap code - - v99.99-pre-1764 And finally, fix up the release install script to have a parameter to specity the MCP directory. - - v99.99-pre-1763 Fix Forge install script to use python shipped with FML. - - v99.99-pre-1762 Push didn't get all of eclipse.... - - v99.99-pre-1761 Cleaned up eclipse workspace and moved it to a zip file. - Setup will extract it if it doesn't already exist. - - v99.99-pre-1760 Some derp protection in the workspace copy. - - v99.99-pre-1759 Removed remaining references to src/common - Fixed eclipse workspace replacemnt on source dist - Cleanup some outputs - - v99.99-pre-1758 Updated build script to not use the mcp common directory as it doesn't exist anymore. - - v99.99-pre-1757 Fished moving out the rest of the default packaged classes to aproperiate packages. Updated patches and code to reflect. - - v99.99-pre-1756 Updated the update_packages script to support different mcp locations - - v99.99-pre-1755 Update fml_marker.cfg, Minecraft is now runnable! - - v99.99-pre-1754 Update all imports for repackaging. Branch is compileable. - - v99.99-pre-1753 Some stragler patches - - v99.99-pre-1752 Updated patches to new packages. - - v99.99-pre-1751 Give new classes a distinct package to be moved from. - - v99.99-pre-1750 Fixed 0.tree to actually refresh the workspace. - - v99.99-pre-1749 Remerged branch, and updated dev eclipse workspace. - - v99.99-pre-1748 Add in storage, detection and validation of the ItemID array between client and server - and also for world saves. May help with item configuration issues. - - v99.99-pre-1747 Add a modid on the mods list, should make it easier to do things like forge chunkloading config - - v99.99-pre-1746 Fix build eclipse extractor task - - v99.99-pre-1745 Fix RenderBlocks patch, touch branch - - v99.99-pre-1744 For @XCompWiz, added a hook to allow mods to dynamically change the color that water is rendered. - - v99.99-pre-1743 Readded unchanged version - - v99.99-pre-1742 Removed unchanged file - - v99.99-pre-1741 Added terrain gen events - Added biome color events for @XCompWiz - - v99.99-pre-1740 Fix release script for new forge job name. Add in skip changelog option for local builds - - v99.99-pre-1739 Remove MCP from released src distro.. whops. - - v99.99-pre-1738 Add in storage, detection and validation of the ItemID array between client and server - and also for world saves. May help with item configuration issues. - - v99.99-pre-1737 Fix static method, closes #271 - Don't spam the log if a mod requests a ticket beyond their maximum. A single message is fine. - - v99.99-pre-1736 Add Chunk Watch and UnWatch events. - - v99.99-pre-1735 fix List configs - - v99.99-pre-1734 Fix typo in chunkmanager config - - v99.99-pre-1733 Tweak release.py script: HEAD==master in general - Update FML: 26a2ef5 - 26a2ef5 Add a modid on the mods list, should make it easier to do things like fo - b4e3490 Fix build eclipse extractor task - 828341f Fix typo - 7a8dae5 Try and make branch non-derpy - d3c0e1f Try defaulting branch differently - 9c77d3f Remove old eclipse workspace and ship/extract as a zip file (use ant set - 6371e9b Assume Forge is the parent directory when checking for AT configs. - 516954e Name both zips the same format - 1151d5c Last part of branch name only please - 25f1dda Try and get a valid branch name on jenkins - 39a146f Clean up build.xml script- support outputting a branched jar file - 037dcae Small derp in install.py - 01d6da3 Try marking python as binary. - 8b26659 FML will now attempt to download MCP as part of the install process Now - 42b3e6a Windows Python distrabution created using py2exe, thanks Fesh0r for the - e709ab8 Marked more spots in gui/items bitmask as being free. - - v99.99-pre-1732 Add a modid on the mods list, should make it easier to do things like forge chunkloading config - - v99.99-pre-1731 Fix build eclipse extractor task - - v99.99-pre-1730 Fix issue with DimensionManager.shouldLoadSpawn - - v99.99-pre-1729 Fix typo - - v99.99-pre-1728 Merge branch 'master' into repackage - Conflicts: - eclipse/Clean/.classpath - eclipse/Clean/.project - eclipse/FML/.classpath - eclipse/FML/.project - install/fml.py - - v99.99-pre-1727 Try and make branch non-derpy - - v99.99-pre-1726 Try defaulting branch differently - - v99.99-pre-1725 Update python files to add support for specifying MCP directory and FML downloading MCP on the fly. - - v99.99-pre-1724 Update FML, now includes python, and will download MCP for you - - v99.99-pre-1723 Add wget and unzip from GnuWin32 for use in the setup scripts. - - v99.99-pre-1722 Remove old eclipse workspace and ship/extract as a zip file (use ant setupenvironment) - Fix up install.py for forge multibranch changes - - v99.99-pre-1721 Assume Forge is the parent directory when checking for AT configs. - - v99.99-pre-1720 Merge branch 'master' into repackage - Conflicts: - patches/minecraft/net/minecraft/client/EntityFX.java.patch - - v99.99-pre-1719 Name both zips the same format - - v99.99-pre-1718 Last part of branch name only please - - v99.99-pre-1717 Try and get a valid branch name on jenkins - - v99.99-pre-1716 Clean up build.xml script- support outputting a branched jar file - - v99.99-pre-1715 Small derp in install.py - - v99.99-pre-1714 Try marking python as binary. - - v99.99-pre-1713 FML will now attempt to download MCP as part of the install process - Now shipping a py2exe version of python for windows. - Linux/Macs should come with python pre-installed so they do not have a distrabution here. - - v99.99-pre-1712 Windows Python distrabution created using py2exe, thanks Fesh0r for the script. - - v99.99-pre-1711 Fix #289 - - v99.99-pre-1710 Add in some additional ticket loading callbacks for ChickenBones. Closes #284 - Add in a call to determine if there are possible chunktickets for a world. This should let - Mystcraft and other dynamic world generating mods check if they should immediately load - a world based on existing chunk tickets. - - v99.99-pre-1709 Fix issue where non-BlockContainer TEs would not be removed properly. - - v99.99-pre-1708 Fix issue where worlds were potentially unloaded improperly on server shutdown. - - v99.99-pre-1707 Fix logic issue in ForgeChunkManager.ticketCountAvaliableFor(username) PR - - v99.99-pre-1706 Small change to fix loading configs. - - v99.99-pre-1705 Added section of the EntityData NBT that will be persisted for players across respawning. - - v99.99-pre-1704 Fix potential NPE in EntityJoin handler and print warning. - - v99.99-pre-1703 Exposed some ChunkLoader information for PR #278 - - v99.99-pre-1702 Small tweak to config to use Treemap - - v99.99-pre-1701 Merge pull request #269 from XCompWiz/chunkcon - Adds a more intelligent chunk constructor - - v99.99-pre-1700 Fixed AIOOB issue with new sanity check in getBlock - - v99.99-pre-1699 Fix potential NPE in saving a property that didn't define a type. - - v99.99-pre-1698 Added new functions to the Config class to allow for specification of comments when getting properties. - Added new getTerrainBlock whihc will limit the resuling ID to < 256, useful for world gen. - Calls to getBlock with IDs less then 256 will be assigned values above 256 {Thus freeing up terrain gen slots} - Made ConfigCategory implement Map should fix compatibility with most mods that broke two builds ago. - - v99.99-pre-1697 Merge pull request #277 from Xhamolk/patch-1 - OreDictionary addition: getOreID(ItemStack) - - v99.99-pre-1696 New nested configuration category support, for PR #258 - - v99.99-pre-1695 Fixed random chest items not generating to there max stack sizes. - - v99.99-pre-1694 Fixed issue with abandoned chunks. - - v99.99-pre-1693 OreDictionary addition: getOreID(ItemStack) - Allow getting the oreID from a ItemStack, as an alternative from getOreID(String). - Now is easier to exchange items for their equivalencies through the OreDictionary. - - v99.99-pre-1692 Merge pull request #274 from iChun/patch-2 - Add check that Entity saves to disk before saving entity to saved chunkloading data. - - v99.99-pre-1691 Add check that Entity saves to disk before saving entity to saved chunkloading data. - Returning false to addEntityID prevents the entity from being saved (cred to LexManos) - Entities which do not save to disk but are chunkloaders causes errors the next time the world loads. This ought to fix it. - - v99.99-pre-1690 Updated FML, proper free-sprite list for /gui/items.png, and fixed MCP version. - - v99.99-pre-1689 Marked more spots in gui/items bitmask as being free. - - v99.99-pre-1688 Fixes ordering for z & x loops (proper array increment order) - The ordering before would skip about in the ids and metadata arrays. This runs linearly and should improve performance. - Done live on github - - v99.99-pre-1687 Fixes some weird formatting - - v99.99-pre-1686 Adds a more intelligent chunk constructor - Adds a chunk constructor with full block id range, that's metadata - sensitive, has intelligent coord ordering, and which allows for - generation at greater heights than 127. - - v99.99-pre-1685 Delete duplicate file - - v99.99-pre-1684 Finished repackaging net.minecraft.* net.minecraft.client is left - - v99.99-pre-1683 More re-packaging, got most classes out of the default package. - - v99.99-pre-1682 Move server specific patch back to common from minecraft. - Update FML: 1f5c58b - 1f5c58b Fix up MCP version - 61e4db2 Merge joined.exc add update howto - 5efc1eb Revert "Fix MC-2497 - derpy torch flames. Moved from forge. Everyone sho - 3b3600d Modified merger to just consider all server classes as common. And moved - edcc5ca Forgot mcp.cfg - ca79dfe Updated to 1.4.5b - 5945279 Fix python error - 57bf643 Modified decompile so that we do not have to decompile the server, saves - d9d0a46 Cleaned up some tabs - 2fac644 Change usage of ZipFile, fixes issues with Mac's default instation of py - - v99.99-pre-1681 Fix up MCP version - - v99.99-pre-1680 Merge joined.exc add update howto - - v99.99-pre-1679 Revert "Fix MC-2497 - derpy torch flames. Moved from forge. Everyone should benefit." - This reverts commit fa567014a54b3273002fe9cf424ab4cf3ec54c3a. - - v99.99-pre-1678 Remove common folder from projects - - v99.99-pre-1677 Move IBossDisplayData to shared - - v99.99-pre-1676 First half of new patches - - v99.99-pre-1675 Update FML imports - - v99.99-pre-1674 Inital script side commit for MC source repackaging done. - - v99.99-pre-1673 Fix TE Issue - - v99.99-pre-1672 Modified merger to just consider all server classes as common. And moved the defnition of CodecMus to the config. - - v99.99-pre-1671 Updated to MC 1.4.5b - - v99.99-pre-1670 Forgot mcp.cfg - - v99.99-pre-1669 Updated to 1.4.5b - - v99.99-pre-1668 Fix python error - - v99.99-pre-1667 Modified decompile so that we do not have to decompile the server, saves time. - - v99.99-pre-1666 Cleaned up some tabs - - v99.99-pre-1665 Change usage of ZipFile, fixes issues with Mac's default instation of python. Also cleaned the python a little bit. - - v99.99-pre-1664 Removed GnuWin32 programs, should no longer be needed as we've moved to python. - - v99.99-pre-1663 Update FML: 570592b - 570592b Attempt to fix a possible comodification risk - - v99.99-pre-1662 Attempt to fix a possible comodification risk - - v99.99-pre-1661 Stupid eclipse resetting preferences. Spaces, not tabs!!! - - v99.99-pre-1660 Add in events when forcing and unforcing chunks. Hope this works for you ChickenBones! - - v99.99-pre-1659 Update FML: fde9414 - fde9414 Change texturebinding to use the textureId directly rather than iconInde - - v99.99-pre-1658 Change texturebinding to use the textureId directly rather than iconIndex - to determine if it needs to rebind the texture sheet - - v99.99-pre-1657 Fixed custom soil checks for NetherStalk and Reeds - - v99.99-pre-1656 Fixed issue with default implementation of Beach plant type check - - v99.99-pre-1655 Release script will now include the Minecraft version in the arcive names. - - v99.99-pre-1654 Update FML: f348496 - f348496 Fix mod display list. Shouldn't be derpy anymore. - a5c31b5 Fix World patch- workaround no longer required and leftovers are bad. - 2dc3f0d Cleaned up the AT config updater, should work for any setup of the MCP w - - v99.99-pre-1653 Fix mod display list. Shouldn't be derpy anymore. - - v99.99-pre-1652 Fix World patch- workaround no longer required and leftovers are bad. - - v99.99-pre-1651 Cleaned up the AT config updater, should work for any setup of the MCP workspace now. - - v99.99-pre-1650 Fixed beds not working properly when respawning. - - v99.99-pre-1649 Remove EntityFX patch - moved to FML. Patch SuspiciousClasses to add "forge" - Update FML: fa56701 - fa56701 Fix MC-2497 - derpy torch flames. Moved from forge. Everyone should benefit. - 96935bb Fix an NPE in TileEntity trying to generate a crash report. Make suspicious classes just return the obvious. Fix NPE for FML crash report on server. Clean up dead pa - - v99.99-pre-1648 Fix MC-2497 - derpy torch flames. Moved from forge. Everyone should benefit. - - v99.99-pre-1647 Fix an NPE in TileEntity trying to generate a crash report. Make suspicious classes just return the obvious. - Fix NPE for FML crash report on server. Clean up dead patches. - - v99.99-pre-1646 Fix the derpy torch flames properly. Closes MC-2497 properly ;) - - v99.99-pre-1645 Update to MC 1.4.5 - Update FML: 43d3042 - 43d3042 Clean up a patch - fec221f Update FML for MC 1.4.5 - b0f0635 Fix for ModLoader static overrides not displaying. - 23a2513 Fix up derpy file name handling: closes #127 Fix up duping childmods: cl - a6eaa2b Fix spelling issue. - c6a0741 FML setup should now download and verify all the minecraft files needed - 5a1930e Small fix to some MCP metadata for pre2 - 418deba Update to MC 1.4.4 - 4ff2cff Fix bug when a modloader mod is run on a dedicated server and has a conn - - v99.99-pre-1644 Clean up a patch - - v99.99-pre-1643 Update FML for MC 1.4.5 - - v99.99-pre-1642 Some liquid events. Non-API breaking. Add them at your leisure. This helps liquids know - what's happening to them. In case they're volatile or something ;) - - v99.99-pre-1641 Another difference - - v99.99-pre-1640 Fix fillLiquidContainer - return null, not the empty container for - previous API compatibility - - v99.99-pre-1639 Merge remote-tracking branch 'origin/master' - - v99.99-pre-1638 Update FML to fix ModLoader/addOverride functionality. - - v99.99-pre-1637 Fix for ModLoader static overrides not displaying. - - v99.99-pre-1636 Merge branch 'KingLemming-master' - - v99.99-pre-1635 Change name to LiquidContainerRegistry. Fix up missing API. This better be it now! - - v99.99-pre-1634 Fixed oversights in liquid registry, added functionality for instant checks as requested by CJ. - Liquid list return is now secure. - - v99.99-pre-1633 Merge branch 'KingLemming-master' - - v99.99-pre-1632 Rename some liquid stuff for more sensible naming. Tweak API slightly. - - v99.99-pre-1631 Liquid Manager Rewrite - slightly more memory usage, loads more efficient at runtime. - Added default Lava and Water registrations to Liquid Manager. - Removed method which relied on flawed assumption that a given liquid only had a single type of container. - - v99.99-pre-1630 Add in the basic IBlockLiquid interface. The actual block implementation - will follow. - - v99.99-pre-1629 Add an ItemStack sensitive version of getIconForRenderPass, defers to - existing by default. Should allow NBT data to affect multipass icon rendering. - - v99.99-pre-1628 Change getLeft to getRotation, around any axis. - - v99.99-pre-1627 Some new stuff on the liquid API for better RP2 interaction. Coming soon: blocks! - - v99.99-pre-1626 Tweak liquidcontainer API for sidedness capability - - v99.99-pre-1625 Fix breaking despite cancel in creative mode for PlayerInteractEvent OR #247 - - v99.99-pre-1624 Allow for modders to decide whether or not players are positioned on ridingEntities similarly to pigs PR #244 - - v99.99-pre-1623 Fix issue where players would spawn in the ground. - - v99.99-pre-1622 Mods can use custom textures for Slot background overlay, instead of only items.png PR #245 and #246 - - v99.99-pre-1621 Added saplings and leaves to the ore dict. PR: #242 - - v99.99-pre-1620 Updated FML, Fixed spelling issues in logs, and file name issues. - - v99.99-pre-1619 Fix up derpy file name handling: closes #127 - Fix up duping childmods: closes #126 - FMLPreinitializationEvent now offers a getLogger() that'll return your mod a personalized logger instance - - v99.99-pre-1618 As agreed, liquid API from BuildCraft has been migrated to minecraft forge. There will be cleanups to follow, - including sided handling and client rendering tweaks. Stay tuned! - Tweak forgedirection for a couple of naming constants - - v99.99-pre-1617 Add toLeft rotational data to ForgeDirection - - v99.99-pre-1616 New field in ForgeDirection to hold just the valid directions. And made getOrientation a bit more efficient. - - v99.99-pre-1615 Fix crops not droping seeds properly. - - v99.99-pre-1614 Fix entity items rendering on the ground. - - v99.99-pre-1613 Fix spelling issue. - - v99.99-pre-1612 Bumped version number for 1.4.4 - - v99.99-pre-1611 Update to 1.4.4 - - v99.99-pre-1610 FML setup should now download and verify all the minecraft files needed to run MCP. - - v99.99-pre-1609 Small fix to some MCP metadata for pre2 - - v99.99-pre-1608 Update to MC 1.4.4 - - v99.99-pre-1607 Ore Dictionary Improvements, replaces vanilla recipes with OreDict recipes for some vanilla items. Thanks Covert. - - v99.99-pre-1606 Made Item constructor public, and made setTextureFile chainable, requires mods to recompile, but as this is for 1.4.3 i'm not concerned. - - v99.99-pre-1605 Fix bug when a modloader mod is run on a dedicated server and has a - connection handler assigned to it. Hi SmartMoving! Perhaps you should try - @Mod instead of BaseMod? - - v99.99-pre-1604 Merge branch 'mc143pre' - Update to minecraft 1.4.3 prerelease - - v99.99-pre-1603 Readdaed teleporter sensitive versions of the teleport function - Added per-world list of custom teleporters, Modders, use World.Load to populate this list. - Changed the definition of our version schemes. - - v99.99-pre-1602 Temporary update for 1.4.3 - Update FML: bd2123c - bd2123c Clean up some patch fuzz - c2a603c Update joined.exc file from latest conf - db12af4 Update to 1.4.3 - - v99.99-pre-1601 Clean up some patch fuzz - - v99.99-pre-1600 Update joined.exc file from latest conf - - v99.99-pre-1599 Update FML: 8356fe9 - 8356fe9 FUUUUUU! Stupid ticking. STOP REGISTERING TICK HANDLERS IN YOUR CONSTRUC - 6edce8b Patch a file handle leak in RegionFileCache handling when under memory p - ca2bbe0 Update MCP mapings again, yay bad syncs. - c8941a7 Updated MCP mapings. - 5e20c03 StartServer is now useable in merged code base. - - v99.99-pre-1598 Update to 1.4.3 - - v99.99-pre-1597 A useful tool for performing updates - - v99.99-pre-1596 FUUUUUU! Stupid ticking. STOP REGISTERING TICK HANDLERS IN YOUR CONSTRUCTORS. - I'm looking at you Rei's! - - v99.99-pre-1595 Patch a file handle leak in RegionFileCache handling when under memory pressure. - - v99.99-pre-1594 Update FML: Updated MCP mapings, and fixed StartServer - - v99.99-pre-1593 Update MCP mapings again, yay bad syncs. - - v99.99-pre-1592 Updated MCP mapings. - - v99.99-pre-1591 StartServer is now useable in merged code base. - - v99.99-pre-1590 Update FML: b19e882 - b19e882 Remove some debug, closes #123 - 9d7d32a Fix up tick management outside of mod loading phases for ModLoader mods. - d512539 Negatively cache failed class lookups, should help with @SideOnly performance issues. - - v99.99-pre-1589 Remove some debug, closes #123 - - v99.99-pre-1588 Fix up tick management outside of mod loading phases for ModLoader mods. - - v99.99-pre-1587 Negatively cache failed class lookups, should help with @SideOnly performance issues. - - v99.99-pre-1586 This update fixes some world corrupting vanilla error handling, mostly caused by - mods doing something derpy. Hopefully, your world saves will thank me. - Note that if the mod does derp, it's data is lost. It's not FML or Minecraft Forge's - responsibility if "DirtChest 2000 Mk5" can't write their TileEntity method correctly - and you lose your 100000 diamonds. - Update FML: a3a93f3 - a3a93f3 Fix some whitespace issues, handle possibly bugged entities as well - a7eb5dc Vanilla/mod bug fixes: CME on entity processing, TileEntity resetting chunk on save/load. - - v99.99-pre-1585 Fix some whitespace issues, handle possibly bugged entities as well - - v99.99-pre-1584 Vanilla/mod bug fixes: CME on entity processing, TileEntity resetting chunk on save/load. - - v99.99-pre-1583 Cleanup some debug in the script, and fix version number for the current build. - - v99.99-pre-1582 Fix a vanilla bug related to certian seeds and stronholds. - - v99.99-pre-1581 Fix cast issue when mods attempt to make fake worlds. - - v99.99-pre-1580 Change logs should now be bundled with downloads, as well as avalible on files.minecraftforge.net - - v99.99-pre-1579 Update FML:b23081d - b23081d Support for ModLoader 1.4.2. Good job Risu! - 66db4ec Add in an exclusion list tag for @Mod. The backend code isn't yet implemented, but shows the basic idea. - - v99.99-pre-1578 Support for ModLoader 1.4.2. Good job Risu! - - v99.99-pre-1577 Fix compile issue. - - v99.99-pre-1576 Merge pull request #232 from CovertJaguar/patch-7 - Added vanilla wood + dye to the Ore Dict - - v99.99-pre-1575 Added Stonghold, Village, and Spawn biome management helpers for PR 207 - - v99.99-pre-1574 Added vanilla wood + dye to the Ore Dict - Should help simplify interaction between mods that add similar items. - - v99.99-pre-1573 New hook to allow for custom beacon support blocks. - - v99.99-pre-1572 Exposed functions for adding superflat presets. - - v99.99-pre-1571 Added metadata sensitve experience to furnace recipies and added Item callback to determine experience gain. - - v99.99-pre-1570 Fix issue where scroll bar would not render when switching tab pages. - - v99.99-pre-1569 New hook to allow items to be on multiple creative tabs PR 176 - - v99.99-pre-1568 Remove some debug code - - v99.99-pre-1567 Changeable name tag render distance for PR: 174 - - v99.99-pre-1566 EntityLiving.experianceValue private->public for Issue #225 - - v99.99-pre-1565 Merge pull request #231 from ShadwDrgn/master - ServerChatEvent - - v99.99-pre-1564 Add event to cancel or change chat messages sent from server - - v99.99-pre-1563 Add event to cancel or change chat messages sent from server - - v99.99-pre-1562 Added system to place all configs that use Forge's Configuration function into a single file on disc. Optional config to enable this. Blame MattaBase for this idea.. - - v99.99-pre-1561 Pickblock will new compare NBT data, should allow mods to refine there result better. - - v99.99-pre-1560 Add in an exclusion list tag for @Mod. The backend code isn't yet implemented, but shows the basic idea. - - v99.99-pre-1559 Fix ItemSeed placement to take into account the IPlantable interface. - - v99.99-pre-1558 Added a per-world MapStorage feature that provides a method to store data files associated with a specific world, as well as fixes the issue with villagers loosing there village. {Where villagers wouldn't go inside at night} - - v99.99-pre-1557 Fix the accessor and type on World.getPersistentChunksFor() - Update FML: 8bd98c3 - 8bd98c3 Fix a small problem with the new MCP container- it can cause NPEs. Nice. - 34cc42d Fix up some javadoc complaints - - v99.99-pre-1556 Merge pull request #228 from pahimar/master - SlotCrafting fix for damageable container items - - v99.99-pre-1555 Update patches/common/net/minecraft/src/SlotCrafting.java.patch - - v99.99-pre-1554 Fix a small problem with the new MCP container- it can cause NPEs. Nice. - - v99.99-pre-1553 Fix up some javadoc complaints - - v99.99-pre-1552 MCP information is now included in Minecraft Forge. They deserve the credit :) - Update FML: 09eade4 - 09eade4 Update build - include MCP information in the source pack - 9bfe7df MCP deserves lots of credit. So here it is. - - v99.99-pre-1551 Update build - include MCP information in the source pack - - v99.99-pre-1550 MCP deserves lots of credit. So here it is. - - v99.99-pre-1549 Update FML: 8006b77 - 8006b77 Fix instantiation bug - 7cc91cf Simple InterMod comms. Send a message using FMLInterModComms.sendMessage(). Receive messages through an @IMCCallback - 24d7285 Update for MC 1.4.2 - cedf3d5 Duplicate Mod display screen. - - v99.99-pre-1548 Fix instantiation bug - - v99.99-pre-1547 Downgrade to FML 415, issue with new IMC system. - - v99.99-pre-1546 Update to 1.4.2, obf stayed the same, so only small revision. - - v99.99-pre-1545 Simple InterMod comms. Send a message using FMLInterModComms.sendMessage(). Receive messages through an @IMCCallback - - v99.99-pre-1544 Update for MC 1.4.2 - - v99.99-pre-1543 Duplicate Mod display screen. - - v99.99-pre-1542 Update World patch to fix map provider issue. - - v99.99-pre-1541 Add an access transform for Block.setBlockBounds - should help a lot of code that uses this. - Update FML: d915f39 - d915f39 Fix typo in access transformer - 346691c Fix the merge for forge - 6dadc1d Fix up references to minecraftDir in obf code - 8a55f68 Update FML for Minecraft 1.4.1 - 5645fa5 First update to 1.4.1, patches need updating. - ff0f00f Add some null checks, and throw descriptive exception when SideTransformer prevents a class from loading. - - v99.99-pre-1540 Fix typo in access transformer - - v99.99-pre-1539 Update to MC 1.4.1 and Forge 6.0.0 - - v99.99-pre-1538 Fix the merge for forge - - v99.99-pre-1537 Fix up references to minecraftDir in obf code - - v99.99-pre-1536 Update FML for Minecraft 1.4.1 - - v99.99-pre-1535 First update to 1.4.1, patches need updating. - - v99.99-pre-1534 Add some null checks, and throw descriptive exception when SideTransformer prevents a class from loading. - - v99.99-pre-1533 Fix color issues with Dyed Leather armor. - - v99.99-pre-1532 Fix up the setHandeled/setHandled for events, it is now a generalized setResult, the meaning of which is defined by each event. - - v99.99-pre-1531 Cleanup mirrored things in ShapedOreRecipe to address issue 208 and issue 210 - - v99.99-pre-1530 Remove deprecated code. - - v99.99-pre-1529 Fix NPE issue when mods add null EntityFX's to be rendererd. - - v99.99-pre-1528 Update FML: 7a34246 - 7a34246 Ship a client only class so the merge works both sides. - - v99.99-pre-1527 Ship a client only class so the merge works both sides. - - v99.99-pre-1526 Fix install.py so it can be installed properly from src distribution - - v99.99-pre-1525 Update FML (entire change log since last by me): 62a6b52 - 62a6b52 Fix RenderRegistry render ID - now at 36 Fix SpriteMaps - they're running out fast! Switch to forge if you can! RenderBiped now has an armo - b845cde Fix up FML python script for forge - 2c36dfb Update to MCP pre 3. Fixes some weirdnesses with explosions. - acd880d Merge branch '1.4' - e6f57e5 Update for MCP release - b1de0fc Remove fuzz from patches for INetworkManager change - ad44619 Fix for new names INetworkManager and ITexturePack. I also provide refactoring scripts for both, for your use... - 3a94211 Add a script to ignore git complaining about the eclipse workspace changing - run when you first open the eclipse workspace - 9386e23 Update gitignore - ignore the files that will change or be deleted - 10b318c Add in "starter" image for eclipse workspace - 995d5b7 Eclipse workspace fixup 2? - bbb12c8 Clean up eclipse workspace- part 1 - b50058e Clean up a bit of patch fuzz - 4a0bfa9 Fix CommonHandler for rename of the server thread class - 4d1ec66 Update with RC2 MCP. Use the joined.exc file directly since MCP now provides it. - b52e3d0 Fix exception for CodecMus - a1011c9 Fix some compilation issues. Requires resolving the worldclient abstract method - 0ebd4f3 Inital patch update to 1.4 - 89c68c4 Moved into EntityVillager - e4702cb Fix line ending detection during checkout. - 6e64fd7 We don't need logging here... - 014b3f4 remove useless -Server projects - 7628c67 Updated the AT config and Marker config for 1.4 obf - 54a322c Updae build to copy files that may decompile differently but are actually the same, and updated for 1.4 values. - aadf396 Update MCP Merge config. - 81e1855 Pull in MCP's 1.4 conf files. - 5686fd4 Fix error in merging of exec's - - v99.99-pre-1524 Update release script for mcp changes, releases now build. - - v99.99-pre-1523 Updated Forge version to 5.0.0, for 1.4 - - v99.99-pre-1522 Updated World patch, there are a lot of new things happening int he constructor, xcomp should probably vet this. - - v99.99-pre-1521 Teleporting has a new function (func_82448_a), made it so that you can supply your own teleporter to that function, and so it works with dimension movement factors. - - v99.99-pre-1520 Removed Forge's TileEntity.getRenderDistance, now a vanilla feature: TileEntity.func_82115_m - - v99.99-pre-1519 BlockCrops is now the parent class of multiple types of crops, Wheat, Potatoes, and Carrots, updated getBlockDropped patch to reflect. - - v99.99-pre-1518 Patches removing forge spawn protection, now a vanilla feature. - - v99.99-pre-1517 Entities have a new function to determine explosion strength that they create, and implemented Item frame pickblock. - - v99.99-pre-1516 BlockSnow now pretty much just passes harvestBlock to it's super. - - v99.99-pre-1515 Updated Render patches, Bipeds now have the ability to have helmets, of either blocks, or the new 'heads' - - v99.99-pre-1514 Patches that applied with little to no functional changes. - - v99.99-pre-1513 Forge spawn protection removed, now a vanilla feature. - - v99.99-pre-1512 No longer needed, getRenderDistance removed because Vanilla has it now, TileEntity.func_82115_m - - v99.99-pre-1511 Moved to common where it should be - - v99.99-pre-1510 Remove final from 'villageCollectionObj' to allow for delayed setup of Map source objects. - - v99.99-pre-1509 Update for new names in 1.4 - - v99.99-pre-1508 Fix RenderRegistry render ID - now at 36 - Fix SpriteMaps - they're running out fast! Switch to forge if you can! - RenderBiped now has an armorlist- so armortypes add to it as well - - v99.99-pre-1507 Update Forge's AT for 1.4 names. - - v99.99-pre-1506 Fix recompile call for 1.4 MCP change - - v99.99-pre-1505 FML Update for 1.4 - - v99.99-pre-1504 Fix up FML python script for forge - - v99.99-pre-1503 Update to MCP pre 3. Fixes some weirdnesses with explosions. - - v99.99-pre-1502 Merge branch '1.4' - - v99.99-pre-1501 Update for MCP release - - v99.99-pre-1500 Remove fuzz from patches for INetworkManager change - - v99.99-pre-1499 Fix for new names INetworkManager and ITexturePack. I also provide refactoring scripts for both, for your use... - - v99.99-pre-1498 Add a script to ignore git complaining about the eclipse workspace changing - run when you first open the eclipse workspace - - v99.99-pre-1497 Update gitignore - ignore the files that will change or be deleted - - v99.99-pre-1496 Add in "starter" image for eclipse workspace - - v99.99-pre-1495 Eclipse workspace fixup 2? - - v99.99-pre-1494 Clean up eclipse workspace- part 1 - - v99.99-pre-1493 Clean up a bit of patch fuzz - - v99.99-pre-1492 Fix CommonHandler for rename of the server thread class - - v99.99-pre-1491 Update with RC2 MCP. Use the joined.exc file directly since MCP now provides it. - - v99.99-pre-1490 Fix exception for CodecMus - - v99.99-pre-1489 Fix some compilation issues. Requires resolving the worldclient abstract method - - v99.99-pre-1488 Inital patch update to 1.4 - - v99.99-pre-1487 Moved into EntityVillager - - v99.99-pre-1486 Fix line ending detection during checkout. - - v99.99-pre-1485 We don't need logging here... - - v99.99-pre-1484 remove useless -Server projects - - v99.99-pre-1483 Updated the AT config and Marker config for 1.4 obf - - v99.99-pre-1482 Updae build to copy files that may decompile differently but are actually the same, and updated for 1.4 values. - - v99.99-pre-1481 Update MCP Merge config. - - v99.99-pre-1480 Pull in MCP's 1.4 conf files. - - v99.99-pre-1479 Fix error in merging of exec's - - v99.99-pre-1478 Bump version to 4.3, final for 1.3.2 - - v99.99-pre-1477 Remove some test code. - - v99.99-pre-1476 Added ability for mods to cleanly define and display new creative tabs. - - v99.99-pre-1475 Fix classloading issue preventing JRockit from running forge - - v99.99-pre-1474 Forge build change: the universal jar, if installed alongside a server jar file, can be executed to load forge. No server side merging required! - Update FML: 989ab3e - 989ab3e Update build.xml - add a classpath to the manifest. This means the universal jar is now a server side launche - 88f1dc9 Typos! - - v99.99-pre-1473 Update build.xml - add a classpath to the manifest. This means the universal jar is now a server side launcher. - - v99.99-pre-1472 Typos! - - v99.99-pre-1471 Update FML: 470a185 - 470a185 Try and avoid an NPE in crash reports - 0029518 Fix logging problems- log death messages and re-route the server through FML logs properly. - fe7a832 Fix the test mod - a2bc30b Coremods can be specified via the command line: fml.coreMod.load= This will help with developing coremods - bae1f74 Fix classpath for server - 887aa27 Add in the ability for a client to throw a custom exception that displays a custom gui instead of the default error message. - e17f267 Update FML internal classpath. Helpful for coremod devs - 3b9972a Don't use File to separate the last element of the path. It's a URL, they're always separated by '/' - 5c96afe Changed RelauchLibraryManager so that files with different paths on the same baseURL can be implemented in one ILibrarySet. - 1bca393 FML as a whole is now subject to transformers. - 27cf731 Bonus extra character. thanks randomitter! - 94c84cd Merge pull request #116 from Vazkii/patch-1 - c2d3195 Add Null check to FMLClientHandler.sendPacket - - v99.99-pre-1470 Make Item.createEntity only call when its specifically a EntityItem, not a subclass of it. - - v99.99-pre-1469 Try and avoid an NPE in crash reports - - v99.99-pre-1468 Fix logging problems- log death messages and re-route the server through FML logs properly. - - v99.99-pre-1467 Fix the test mod - - v99.99-pre-1466 Coremods can be specified via the command line: fml.coreMod.load= This will help with developing coremods - - v99.99-pre-1465 Fix classpath for server - - v99.99-pre-1464 Add in the ability for a client to throw a custom exception that displays a custom gui instead of the default error message. - - v99.99-pre-1463 Update FML internal classpath. Helpful for coremod devs - - v99.99-pre-1462 Don't use File to separate the last element of the path. It's a URL, they're always separated by '/' - - v99.99-pre-1461 Changed RelauchLibraryManager so that files with different paths on the - same baseURL can be implemented in one ILibrarySet. - - v99.99-pre-1460 FML as a whole is now subject to transformers. - - v99.99-pre-1459 Bonus extra character. thanks randomitter! - - v99.99-pre-1458 Dll files are binary as well. - - v99.99-pre-1457 Ship forgeversion.properties with release zips. Same format as fmlversion.properties. - - v99.99-pre-1456 New Block hook to determine if it can be destroied by the ender dragon, for PR 199 - - v99.99-pre-1455 Allow hook into GuiSlot for background rendering for PR #203 - - v99.99-pre-1454 Change the Crafting damage check to be the same as the usage damage check. (>= -> >) - - v99.99-pre-1453 Fill out the .gitattributes to help with line endings how they should be. - - v99.99-pre-1452 Reorganize the forced chunks a bit- offload the cost of immutable map building to the mods, rather than the chunk tick - - v99.99-pre-1451 Remove @SideOnly from removePotionEffect. Hi RichardG! - - v99.99-pre-1450 Add some accessors to teh ChunkLoader tickets. - - v99.99-pre-1449 Merge pull request #198 from iChun/patch-1 - Fix not passing right render pass to Item class. - - v99.99-pre-1448 Merge pull request #116 from Vazkii/patch-1 - Add Null check to FMLClientHandler.sendPacket - - v99.99-pre-1447 Fix bounds checking on chunkcache. Should fix a bunch of rp2 and maybe other extended tile entity code - - v99.99-pre-1446 Use weak references to the worlds in our maps. WorldClient would otherwise - leak all over the show. - - v99.99-pre-1445 Add Null check to FMLClientHandler.sendPacket - - v99.99-pre-1444 Expose RenderGlobal.field_72738_E (breakingBlocks) and fire OnBreak for items broken in itemUseFirst on the server. Both for Elo - - v99.99-pre-1443 Fix problem with spawning custom entities in hotloaded dimensions. - - v99.99-pre-1442 Fix not passing right render pass to Item class. - - v99.99-pre-1441 Fix a problem with re-entering worlds too quickly- the worlds will now *always* save before the menu re-appears. - - v99.99-pre-1440 Update forge to 4.2 - - v99.99-pre-1439 Merge branch 'master' of git://github.com/Chicken-Bones/MinecraftForge into Chicken-Bones-master - - v99.99-pre-1438 Remove dead WorldInfo patch. Tweak dimension code a bit for better naming, and use the new FML world loading facilities - Update FML: d0e7c9e - d0e7c9e Update patches *sigh* - f3e1cac Add in a savehandler strategy for reading and writing data to the world save. This service is only available to coremods via the WorldAccessConta - 51fb513 Add in some bukkit supporting code. Most of this is unimplemented until the bukkit coremod is complete. - 65c9fdd New stuff on the ModLoader! Risu has been busy. Closes #114 - c1d4458 Mods can now declare a range of minecraft versions they will run against - - v99.99-pre-1437 Update patches *sigh* - - v99.99-pre-1436 Add in a savehandler strategy for reading and writing data to the - world save. This service is only available to coremods via the - WorldAccessContainer interface on the mod wrapper. This is deliberate - and will not change. - - v99.99-pre-1435 Add in some bukkit supporting code. Most of this is unimplemented - until the bukkit coremod is complete. - - v99.99-pre-1434 Merge branch 'XCompWiz-mystcraft' - Merge in mystcraft base edits for a base clean mystcraft. Adds in a lot of extra capabilities - - v99.99-pre-1433 Server player concurrency fix - Fixes an issue where the server can move a player while the player is - moving, process the player's last move (putting the player back where - they were before the teleport), and then complain about the player - moving too fast when the client catches up to it's new position. Also - fixes this issue while riding an entity. Only affects player - client/server movement sync. - - v99.99-pre-1432 Lighting Time fix - score_under's lighting fix that limits and fairly distributes the amount - of time spent on recalculating lighting - - v99.99-pre-1431 MapStorage Fix - Fixes setting and timing of map storage object to allow for the - WorldProvider to use it during initialization - Forces single instance of map storage object (per side) - Moves setting of spawn to after provider setup - - v99.99-pre-1430 Adds world unloading and hotloading calls - Adds world unloaded message to MinecraftServer on save. - Adds world unloading calls to chunk provider/manager when all chunks are - unloaded. - Adds call in MinecraftServer getWorld to hotload world if it isn't - loaded. - - v99.99-pre-1429 Improves DimensionManager - Adds handling for unloading and hotloading of worlds, fixes some typos, - allows for dimensions to be unregistered (allowing save specific - dimension registrations), general changes to match these features. - - v99.99-pre-1428 New stuff on the ModLoader! Risu has been busy. Closes #114 - - v99.99-pre-1427 Mods can now declare a range of minecraft versions they will run against - - v99.99-pre-1426 Fix issue where mushrooms would not check the proper soil block. - - v99.99-pre-1425 Fix issue where light would not properly recalculate. - - v99.99-pre-1424 Add some of the model subsystem to the server. The part that doesn't require openGL. This allows for systems that dual models as collision/selection boxes etc. - - v99.99-pre-1423 Expanded DungeonHooks to allow for adding of custom DungeonLoot values directly, allowing for better control over the generated items. - - v99.99-pre-1422 Made PlayerEvent.BreakSpeed fire when a player cannot harvest the block. Issues #191 and #188 - - v99.99-pre-1421 Update FML: ca1ca4f - ca1ca4f Fix maps supporting greater than byte() dimension sizing - 15ee8bf Fix language registry additions, closes #113 - a08b5b1 Merge pull request #112 from pahimar/master - 8dac58f Added ability to query the Language Registry by key and language for specific localized text, as well as loading in localization text f - - v99.99-pre-1420 Fix maps supporting greater than byte() dimension sizing - - v99.99-pre-1419 Fix language registry additions, closes #113 - - v99.99-pre-1418 Dormant chunk cache might actually work now, and not mix chunks across worlds - - v99.99-pre-1417 Forgot comment, you see nothing... - - v99.99-pre-1416 Fix vanilla bug where the player would load chunks outside its range that would be 'abandoned' and never unloaded. - - v99.99-pre-1415 Fix buckets, need to rethink for bukkit compatibility. - - v99.99-pre-1414 A few requested features of ForgeChunkManager. Mods can specify a - chunkloading config directly in the config file, including chunk - loading overrides if they wish (and the config allows them). - Also added "player" tied tickets that bind to the player and not the - mod's quota. - - v99.99-pre-1413 Location aware version og Block.lightOpacity for PR #169 - - v99.99-pre-1412 Missing updates from last commit - - v99.99-pre-1411 Merge pull request #112 from pahimar/master - Additonal Language Registry functionality - - v99.99-pre-1410 Added preliminarty Player Interact event heavily based on the bukkit event. - - v99.99-pre-1409 Fix bug in last commit that caused block to not break. - - v99.99-pre-1408 Add PlayerEvent.HarvestCheck and PlayerEvent.BreakSpeed for dealing with things related to a player harvesting a block. - - v99.99-pre-1407 Added ability to query the Language Registry by key and language for specific localized text, as well as loading in localization text from a specific file/URL - - v99.99-pre-1406 Fix bug where breaking texture would not apply to top/bottom of beds. - - v99.99-pre-1405 Add in an "EntityEvent.EnteringChunk" event. Useful for your entity chunkloading stuff. - - v99.99-pre-1404 Merge remote-tracking branch 'origin/master' - - v99.99-pre-1403 Support for no BOM. - - v99.99-pre-1402 Update FML: f083707 - f083707 Extreme headless mode is back! - - v99.99-pre-1401 Extreme headless mode is back! - - v99.99-pre-1400 Some more tweaks to the chunkloading code. The world.load event fires slightly later- once the entity watcher is - set up, so entities can actually load into the server world. Also, tickets actually save and load properly - and null entities don't break the server - - v99.99-pre-1399 Update FML: dd39ae5 - dd7502a Fix parent child counts showing properly. Closes #107 thanks scott! - b36d447 It's useMetadata, not usesMetadata. thanks myrathi and psx. closes #110 - efb1066 Fix random shuffling when manipulating biomes by using a LinkedHashSet to preserve iteration order. Closes #111 - - v99.99-pre-1398 Fix parent child counts showing properly. Closes #107 thanks scott! - - v99.99-pre-1397 It's useMetadata, not usesMetadata. thanks myrathi and psx. closes #110 - - v99.99-pre-1396 Fix random shuffling when manipulating biomes by using a LinkedHashSet to preserve iteration order. Closes #111 - - v99.99-pre-1395 > != >= - - v99.99-pre-1394 Fix Configuration.getItem to return pre-shifted values suitible to pass into Item constructors. - - v99.99-pre-1393 Fire off PlayerDestroyItemEvent for crafting contianer items that get damaged to much. PR #183 - - v99.99-pre-1392 Changed Configuration to use overloaded methods, and changed the order of arguments to be Category, Key, Value instead of Key, Category, Value to hopefully help cleanup some peopels code. - Added function to get a free Item id. Will only accept values that are not in the block space. Needs testing. - Marked all the old getOrCreate* functions as deprecated. - - v99.99-pre-1391 Configuration will now attempt to detect the encoding of the file using the Byte Order Mark. - - v99.99-pre-1390 Fix up some config file handling to be even more resilient. - - v99.99-pre-1389 Support quoting in property and category names for almost all possible characters allowed - - v99.99-pre-1388 Fix some errors if the config is unparseable. It should log an exception and carry on with defaults. - - v99.99-pre-1387 More modifications to the ticket callback handling system. There are up to two callbacks during world loading now. One to allow - selective preference for ticket types. The other to actually allow the mod to force chunks. - - v99.99-pre-1386 Some changes to the ForgeChunkManager. - Null modData is allowed now. - The entity id is actually properly persisted in the ticket now. - There is a new "orderedLoadingCallback" that allows you to provide a preferred ticket loading order in case of "excess tickets". Also, tickets - that are not in the returned list are now unregistered. - There is a way to resort the chunks in the forced chunklist on a ticket now. - Log the dormant cache configuration - - v99.99-pre-1385 Update FML: dd39ae5 - dd39ae5 Try and fix the newline capture so consoles show on the server on windows again - b39f808 Readd ancient searge name so dan200 and computercraft can run again. REMOVE THAT CODE DAN. - - v99.99-pre-1384 Try and fix the newline capture so consoles show on the server on windows again - - v99.99-pre-1383 Readd ancient searge name so dan200 and computercraft can run again. REMOVE THAT CODE DAN. - - v99.99-pre-1382 Update FML: a2c059e - a2c059e Fix missing import. Thanks ichun :( - 19316a0 Version file searching should work for directories too - fbc7a5c Fix bug causing NPE if non-whitelisted player joins an FML server without FML installed - e9cfd10 Merge pull request #103 from iChun/patch-2 - 1424883 Fixed ModTextureAnimation not updating and not binding to correct image. - - v99.99-pre-1381 Some more fixes for chunkloading code. Works very reliably now. - - v99.99-pre-1380 Delete some debug code - - v99.99-pre-1379 Simple chunk caching capability for the chunkloader. This will store "dormant" chunks in a - configurable cache, potentially saving the cost of reloading them from disk. - - v99.99-pre-1378 And a concurrentmodificationexception in the same code - - v99.99-pre-1377 Fix NPE in ForgeChunkManager - - v99.99-pre-1376 Remove @SideOnly flag for function now required on the server - - v99.99-pre-1375 A lot of tweaks to the chunkloading for entity behaviour. Entities are now bound by a new - persistent id they *all* have, on the server side. - - v99.99-pre-1374 Working cross dimensional implementation of chunkloading for Forge. - - v99.99-pre-1373 Simple chunkloading implementation - - v99.99-pre-1372 Fix patch errors in merge of last PR -.- - - v99.99-pre-1371 Merge pull request #181 from micdoodle8/patch-1 - Fixed WorldProvider.setDimension() setting the wrong variable. - - v99.99-pre-1370 Update patches/common/net/minecraft/src/WorldProvider.java.patch - Fixed WorldProvider.setDimension() setting the wrong variable. - - v99.99-pre-1369 Fix missing import. Thanks ichun :( - - v99.99-pre-1368 Version file searching should work for directories too - - v99.99-pre-1367 Fix bug causing NPE if non-whitelisted player joins an FML server without FML installed - - v99.99-pre-1366 Fix accedental doubling of shift, Fixes saplings/flowers planting a space above where they should - - v99.99-pre-1365 New Plant API that allows for custom plants/soils. - - v99.99-pre-1364 Added new hooks for modifying the items generated in chests during world gen. - - v99.99-pre-1363 Merge pull request #103 from iChun/patch-2 - Fixed ModTextureAnimation not updating and not binding to correct image. - - v99.99-pre-1362 Redirect a lot of functions through WorldProvider for Mystcraft, allowing them to be overriden by the provider. - - v99.99-pre-1361 Merge pull request #173 from CovertJaguar/patch-5 - Fixed Entity Item render helper - - v99.99-pre-1360 Merge pull request #175 from iChun/patch-2 - Fix pick block key giving invalid spawn eggs - - v99.99-pre-1359 Added side sensitivity to standard EntityDiggingFX, added Block functions to override spawning of digging and breaking effects. - - v99.99-pre-1358 Logic derp (again) - - v99.99-pre-1357 Logic derped - - v99.99-pre-1356 Fix pick block key giving invalid spawn eggs - - v99.99-pre-1355 Fixed ModTextureAnimation not updating and not binding to correct image. - - v99.99-pre-1354 Fix potential NPE in Custom item entity span code caused by item id misconfigurations. - - v99.99-pre-1353 Fix recursion issue with new special item entity code. - - v99.99-pre-1352 Fixed Entity Item render helper - - v99.99-pre-1351 Update FML: 6c746ec - 6c746ec Tidy code - aacbfeb Change version.properties search slightly, allow access to found file from the preinit event - 1513b36 Add in the capability to read an internal version as .version from a file in the zip call versi - 35852a6 Fix up reversed assignment for version fallback - - v99.99-pre-1350 Tidy code - - v99.99-pre-1349 Change version.properties search slightly, allow access to found file from the preinit event - - v99.99-pre-1348 Add in the capability to read an internal version as .version from a file - in the zip call version.properties. Handy for autobuilding scripts. - - v99.99-pre-1347 Fix up reversed assignment for version fallback - - v99.99-pre-1346 Readd reverted EntityLiving patch - - v99.99-pre-1345 Merge remote-tracking branch 'origin/master' - - v99.99-pre-1344 96537dc - Fixup Item in hand rendering of textures > 16x - e88ddc5 - Make the exception print for headless servers if the Downloader cant initalize. - f24ff07 - Remove a bunch of warning about javadoc, not a real fix, but no more warning. - 3420ea7 - Update MCP Mapings - 87104f0 - Makes GetModSrc check the common folder when attempting to extract source files - 640446b - Tie parent/child containers together again. Should close #96 - 2cf4917 - Village mating produces added villagers, and the egg should place added villagers too. Closes #97. - 6394ee8 - Clean up stale references to the Player stored in the NetworkRegistry, closes #100 - 7299e05 - Merge pull request #99 from CovertJaguar/patch-1 - c4bd040 - More readable init logs - - v99.99-pre-1343 Fixup Item in hand rendering of textures > 16x - - v99.99-pre-1342 Make the exception print for headless servers if the Downloader cant initalize. - - v99.99-pre-1341 Remove a bunch of warning about javadoc, not a real fix, but no more warning. - - v99.99-pre-1340 Update MCP Mapings - - v99.99-pre-1339 Makes GetModSrc check the common folder when attempting to extract source files - - v99.99-pre-1338 Tie parent/child containers together again. Should close #96 - - v99.99-pre-1337 Village mating produces added villagers, and the egg should place - added villagers too. Closes #97. - - v99.99-pre-1336 Clean up stale references to the Player stored in the NetworkRegistry, - closes #100 - - v99.99-pre-1335 Merge pull request #99 from CovertJaguar/patch-1 - More readable state event logs - - v99.99-pre-1334 More readable init logs - - v99.99-pre-1333 Package all of paulscode/ with the universal jar to help mac users who cant understand how to merge folders -.- - - v99.99-pre-1332 Bump version to 4.1.2 to mark the end of todays changes. - - v99.99-pre-1331 Move spawn fuzz to WorldProvider/WorldType, useful for VoidWorld types. - - v99.99-pre-1330 Allow for respawning in different dimensions. - - v99.99-pre-1329 Read/Write config files as UTF-8 instead of ANSII, should fix issue with Turkish people. - - v99.99-pre-1328 Fix potential issue with custom events where the constructor is not visible from the EventBus class, Should never arise but meh. - - v99.99-pre-1327 Add ability for Items to create custom Entities for themselves when added to the world, PR: #151 - - v99.99-pre-1326 Move Forge init message to MinecraftForge.initalize - - v99.99-pre-1325 Make EntityJoinWorldEvent Cancelable properly - - v99.99-pre-1324 Merge pull request #146 from dries007/Fly - Allow flight permissions to be player sensitive - - v99.99-pre-1323 Implemented isBlockFoliage for pull #141 - - v99.99-pre-1322 Fix a few patch fuzzes - - v99.99-pre-1321 New EntityItem related events - Fixed player death event in SMP - Added Player specific drops event - Added generic EntityJoinWorldEvent - - v99.99-pre-1320 Clean up some javadoc warnings. - - v99.99-pre-1319 EntityLiving variation of drawBlockDamageTexture to allow for Non-player viewports. - - v99.99-pre-1318 Fix FillBucketEvent to work with stacked buckets. New change in 1.3 - - v99.99-pre-1317 Update FML: 89b8236 - 89b8236 Fix onConnectionClosed not being called on the client side of a connection - - v99.99-pre-1316 Fix onConnectionClosed not being called on the client side of a connection - - v99.99-pre-1315 Remove all references to ModLoader - - v99.99-pre-1314 Bump version to 4.1.1 - - v99.99-pre-1313 Update FML: 70f55c5 - 70f55c5 Add in exclusion list for IFMLLoadingPlugin. - 1c1716d Remove debug cruft - d567f79 To properly align with packet9respawn, make packet1login's dimension an int as well - ecd4e46 Attempt to build some protocol negotiation, and fix packet1login so that the dimension is a short, matching packet9respawn - 16fe495 Compatibility level is now passed from server to client - and the client tracks it. This means certain packet changes can be made without b - 4f70d23 Fix dependency checking: you can depend on specific versions of FML - - v99.99-pre-1312 Add in exclusion list for IFMLLoadingPlugin. - - v99.99-pre-1311 Remove debug cruft - - v99.99-pre-1310 To properly align with packet9respawn, make packet1login's dimension an int as well - - v99.99-pre-1309 Attempt to build some protocol negotiation, and fix packet1login so that the dimension is a short, matching packet9respawn - - v99.99-pre-1308 Compatibility level is now passed from server to client - and - the client tracks it. This means certain packet changes can be made - without breaking comms, hopefully - - v99.99-pre-1307 Fix dependency checking: you can depend on specific versions of FML - - v99.99-pre-1306 Update FML: 290a3c9 - 290a3c9 Merge pull request #94 from iChun/patch-1 - 9485dc5 Fix handleTinyPacket using short instead of int. - - v99.99-pre-1305 Merge pull request #94 from iChun/patch-1 - Fix handleTinyPacket using short instead of int. - - v99.99-pre-1304 Fix handleTinyPacket using short instead of int. - Silly cpw :P - - v99.99-pre-1303 Update FML: e6abb69 - e6abb69 Fix up tiny packet handler to actually work - e862052 Allow javax to be shipped by mods. Should allow some more modloader mods to work unaltered - 4071ad1 Add in a little bit of protocol cleanup. Start work on allowing multiple protocol versions - 6061964 Give a way to build the packet131mapdata packet correctly populated - b818769 Capture and leverage Packet131MapData - - v99.99-pre-1302 Fix up tiny packet handler to actually work - - v99.99-pre-1301 Allow javax to be shipped by mods. Should allow some more modloader mods to work - unaltered - - v99.99-pre-1300 Add in a little bit of protocol cleanup. Start work on allowing multiple - protocol versions - - v99.99-pre-1299 Give a way to build the packet131mapdata packet correctly populated - - v99.99-pre-1298 Capture and leverage Packet131MapData - - v99.99-pre-1297 Fix placing torches and the like on inverted woden slabs. - - v99.99-pre-1296 Update FML: 12bc4ba - 12bc4ba Make console logging pass through a single logging thread to avoid concurrency problems with launchers and stuff - 8fccfa2 Overlooked chat message support *sigh*. Fixes wierd mods that communicate through custom chat messages rather than - a697d04 Rescan mod packages where there was a possible mod identified to try and make sure we load it. Fixes Matmos r16 - - v99.99-pre-1295 Make console logging pass through a single logging thread to avoid concurrency problems with launchers and stuff - - v99.99-pre-1294 Overlooked chat message support *sigh*. Fixes wierd mods that communicate through custom - chat messages rather than anything else. Hi Superior enchanting! - - v99.99-pre-1293 Rescan mod packages where there was a possible mod identified to try and make sure we load it. Fixes Matmos r16 - - v99.99-pre-1292 Update FML: 9d812f1 - 9d812f1 And handle the other way to globally register an entity - 869cf78 Fix up mods trying to register entities outside of modloading. Now you'll get a big fat warning for doing such a de - 186680c Fix CJB mod compatibilty for real. Gui container registration can now happen in the constructor. YUK! - 5aed6d9 Fix compatibility with ModLoader dispenser hook. Fixes a bug with IDispenseHandler too - though it means that inter - 3d7a665 Fix headless operation, hopefully - - v99.99-pre-1291 And handle the other way to globally register an entity - - v99.99-pre-1290 Fix up mods trying to register entities outside of modloading. Now you'll get a big fat warning for doing such a derpy thing. - - v99.99-pre-1289 Fix CJB mod compatibilty for real. Gui container registration can now happen in the constructor. YUK! - - v99.99-pre-1288 Fix compatibility with ModLoader dispenser hook. Fixes a bug with - IDispenseHandler too - though it means that interface is now - deprecated - - v99.99-pre-1287 Fix headless operation, hopefully - - v99.99-pre-1286 Update FML: 10a7169 - 10a7169 Fix up trying to re-add stuff to the classpath when it's already there - 0eb7180 Fix out of range entity id handling for ModLoader mods a bit more. Thanks Herobrine mod! - b1b4c61 Expose GuiMerchantButton - 359cfb5 Log a big fat warning for the developer in the case the network version is not acceptable to the mod itself. (This can happen because of a bad range specifier for example) - - v99.99-pre-1285 Fix up trying to re-add stuff to the classpath when it's already there - - v99.99-pre-1284 Fix out of range entity id handling for ModLoader mods a bit more. Thanks Herobrine mod! - - v99.99-pre-1283 Expose GuiMerchantButton - - v99.99-pre-1282 Log a big fat warning for the developer in the case the network version - is not acceptable to the mod itself. (This can happen because of a bad range - specifier for example) - - v99.99-pre-1281 Update FML: 8656fd5 - 8656fd5 Also, make missing entity not blow things up - 25a4dcb Fix entity tracker "update" packet not computing correctly. Should work now.. - - v99.99-pre-1280 Also, make missing entity not blow things up - - v99.99-pre-1279 Fix entity tracker "update" packet not computing correctly. Should work now.. - - v99.99-pre-1278 Update FML: c90a853 - c90a853 Fix up addRenderer to catch exceptions from the basemod, also, addrenderer now supplies a list of the default renderers from MC for editing and will note the - 18069d8 Change download location for FML libraries to files.minecraftforge.net, add an encoding param to the javac command line to force utf 8 - a40f4a7 Add in random jar/zip files to the classpath. UGH this is so fucking ugly it's not funny. - 5b6460b Use a null socket and try to prefer the result of getLocalHost in the broadcast data. - - v99.99-pre-1277 Fix up addRenderer to catch exceptions from the basemod, also, addrenderer now supplies a list of the - default renderers from MC for editing and will note the changes made. - - v99.99-pre-1276 Change download location for FML libraries to files.minecraftforge.net, add an encoding param to the javac command line to force utf 8 - - v99.99-pre-1275 Add in random jar/zip files to the classpath. UGH this is so fucking ugly it's not funny. - - v99.99-pre-1274 Allow flight,player sensitive - - v99.99-pre-1273 Use a null socket and try to prefer the result of getLocalHost in the broadcast data. - - v99.99-pre-1272 Update FML: c0d1348 - c0d1348 Add in an ItemRenderer null check so FML can run render adding mods - 482c163 Inverted boolean logic. Grrr. - 221d113 ModLoader mob spawns use packet 24- build a bypass system so that they can still use it - f19f426 Remove debug statements - - v99.99-pre-1271 Add in an ItemRenderer null check so FML can run render adding mods - - v99.99-pre-1270 Inverted boolean logic. Grrr. - - v99.99-pre-1269 ModLoader mob spawns use packet 24- build a bypass system so that - they can still use it - - v99.99-pre-1268 Remove debug statements - - v99.99-pre-1267 Update FML: 9dd9b6e - 9dd9b6e Fix keybindings not loading properly from gamesettings file after restart - - v99.99-pre-1266 Fix keybindings not loading properly from gamesettings file after restart - - v99.99-pre-1265 Fix silk touch on Ender Chests. - - v99.99-pre-1264 Merge pull request #142 from ShetiPhian/movecheck_override - Server mods can now use noClip to push players through solid blocks without is being an invalid move and resetting the players position. Useful for creating semi-solid blocks like quicksand. - - v99.99-pre-1263 Fix Issue #140: Custom items not properly having texture applied for partical effects. - - v99.99-pre-1262 Update FML: acb0b21 - acb0b21 Fix so we always send received packets to handlers. Renders 250 filtering useless unless i can figure a way to intercept - - v99.99-pre-1261 Fix so we always send received packets to handlers. - Renders 250 filtering useless unless i can figure a way to intercept *outbound* packets that isn't as messy as I'm - contemplating - - v99.99-pre-1260 Update FML: b17dd3c - b17dd3c Some tests - fa66ffa Fix trying to load the client side packet handler, when on the server, hopefully? - b106420 Fix up network negotiation - now it will disconnect with a nice error screen if there are missing mods on the client vs se - - v99.99-pre-1259 Some tests - - v99.99-pre-1258 Fix trying to load the client side packet handler, when on the server, hopefully? - - v99.99-pre-1257 Fix up network negotiation - now it will disconnect with a nice - error screen if there are missing mods on the client vs server - - v99.99-pre-1256 Update FML: c971adb - c971adb Fix missing addCommand call: thanks "spawnwolf test command" - d6326de Fix a couple of modloader mods. Thanks! - 483667c Some functionality fixes for @Instance injection. - 8bef512 Versions now have two flavours: the @Mod(version) which is the "programmatic version" and is used for all version relationship calculatio - 501009c Always for ML mods into "public" class accessibility - we don't call from the default package like ML does. - d3d4308 Add in a convenience method for getting a class instance based on existence of another Mod. Useful for soft dependencies. - - v99.99-pre-1255 Fix missing addCommand call: thanks "spawnwolf test command" - - v99.99-pre-1254 Fix a couple of modloader mods. Thanks! - - v99.99-pre-1253 Some functionality fixes for @Instance injection. - - v99.99-pre-1252 Versions now have two flavours: the @Mod(version) which is the "programmatic version" and - is used for all version relationship calculation. The "display version" as sourced from - mcmod.info is used for display purposes only and can be literally anything. Note: they fall back - to one another when they're missing, and to "1.0" if both are absent. - Also, changed @Instance. Now, you can inject *other* mods using @Instance as long as you depend - on them as a "before" or "dependency" relationship. Classes containing @Instance will only be - loaded if the Mod the @Instance refers is present. So you don't have to worry about runtime class - resolution. - - v99.99-pre-1251 Update patches/common/net/minecraft/src/NetServerHandler.java.patch - Update patches/common/net/minecraft/src/NetServerHandler.java.patch - Server mods can now use noClip to push players through solid blocks without is being an invalid move and resetting the players position. - Useful for creating semi-solid blocks like quicksand. - - v99.99-pre-1250 Always for ML mods into "public" class accessibility - we don't call from the default package like ML does. - - v99.99-pre-1249 Add in a convenience method for getting a class instance based on - existence of another Mod. Useful for soft dependencies. - - v99.99-pre-1248 Update FML: 2d9b88b - 2d9b88b And more mod sorting fixes. - 93d5934 Actually *use* the sorted mod list - - v99.99-pre-1247 Fix FillBucketEvent to actually fire. - - v99.99-pre-1246 Fix call to createTileEntity on blocks that extend BlockContainer. - - v99.99-pre-1245 And more mod sorting fixes. - - v99.99-pre-1244 Actually *use* the sorted mod list - - v99.99-pre-1243 Update FML: 180a279 - 180a279 Merge pull request #82 from Chicken-Bones/master - cf38461 The access transformer will now handle classes in packages. - 2c85539 Reverse the meaning of state in fml.modStates system property and fmlModState.properties - it was very derpy before. Now: true is enabled, false is disabled, as you would expect - d651189 Actually fix the corrupt JSON problem - f6a8cd5 Fix isModLoaded for "disabled" mods, and the toposort as well - 3bde961 A bit more information for dependency handling - 6396bea Fix up handing corrupt mcmod.info - 6bc6def Fix a problem with network ids - 7328610 Fix up version handling properly. Hopefully, and the error screen. - 9fcc452 Only active mods should have dependencies checked, and be sorted - 26302a6 Fix oddity with Screen, print a version out in the sorted list! - - v99.99-pre-1242 Merge pull request #82 from Chicken-Bones/master - The access transformer will now handle classes in packages. - - v99.99-pre-1241 The access transformer will now handle classes in packages. - Eg. - public net/minecraft/client/Minecraft.T #timer - - v99.99-pre-1240 Reverse the meaning of state in fml.modStates system property and fmlModState.properties - it was very - derpy before. Now: true is enabled, false is disabled, as you would expect - - v99.99-pre-1239 Actually fix the corrupt JSON problem - - v99.99-pre-1238 Fix isModLoaded for "disabled" mods, and the toposort as well - - v99.99-pre-1237 A bit more information for dependency handling - - v99.99-pre-1236 Fix up handing corrupt mcmod.info - - v99.99-pre-1235 Fix a problem with network ids - - v99.99-pre-1234 Fix up version handling properly. Hopefully, and the error screen. - - v99.99-pre-1233 Only active mods should have dependencies checked, and be sorted - - v99.99-pre-1232 Fix oddity with Screen, print a version out in the sorted list! - - v99.99-pre-1231 Update FML: 62dbfb3 - 62dbfb3 Fix metadata - - v99.99-pre-1230 Fix metadata - - v99.99-pre-1229 Update FML: b91cbe9 - b91cbe9 Fix up versioned dependencies so they work a lot better, also add in a missing mods screen - - v99.99-pre-1228 Fix up versioned dependencies so they work a lot better, also add in a missing mods screen - - v99.99-pre-1227 Update FML: 93b8ba9 - 93b8ba9 Fix missing serverSendPacket - 23fdbbd Trading support for ModLoader - thanks Herblore! - d7a74d8 Close the jar, for cleanliness sake - 58e6dd9 Fix authors - it'll read both "authors" and "authorList" from the json now - 907cf2d More ML compatibility - fix up dragon mounts, thanks! - ee48a36 Fix up loading mods that are grandchildren of BaseMod - c6f362b Fix entity handling for ModLoader mods, thanks parachute mod! - - v99.99-pre-1226 Fix missing serverSendPacket - - v99.99-pre-1225 Trading support for ModLoader - thanks Herblore! - - v99.99-pre-1224 Close the jar, for cleanliness sake - - v99.99-pre-1223 Fix authors - it'll read both "authors" and "authorList" from the json now - - v99.99-pre-1222 More ML compatibility - fix up dragon mounts, thanks! - - v99.99-pre-1221 Fix up loading mods that are grandchildren of BaseMod - - v99.99-pre-1220 Fix entity handling for ModLoader mods, thanks parachute mod! - - v99.99-pre-1219 Fix lighting issue for air related to 4096 fix. - - v99.99-pre-1218 Merge remote-tracking branch 'origin/master' - - v99.99-pre-1217 Removed deprecated ISpawnHandler, that never worked in 1.3.2 so noone should be using it. See FML's replacement. - - v99.99-pre-1216 Made helper hooks for EntityLiving and EntityRenderer hooks for Optifine - - v99.99-pre-1215 Update FML: 6e01c59 - 6e01c59 Merge ChickenBones pull into FML - adds player trackers - a0cbd37 More precise error handling when an invalid class is present - 12323e2 Fix textures not applying properly - 789a4a3 Fix up entity spawning - hopefully they won't warp anymore. - a87d045 Add in a helper on the server start event for adding commands to the server. - 82e9309 Move villager trading hook up a bit. thanks sengir. - 8deaa37 Fix LAN to try hard to find a real network interface, not just localhost most of the time - b5363e3 Update build to not bother building client jar. Universal is everything now. - - v99.99-pre-1214 Merge ChickenBones pull into FML - adds player trackers - - v99.99-pre-1213 Fix formatting - - v99.99-pre-1212 Tweak patches and hooks slightly - - v99.99-pre-1211 More precise error handling when an invalid class is present - - v99.99-pre-1210 Fix textures not applying properly - - v99.99-pre-1209 Fix up entity spawning - hopefully they won't warp anymore. - - v99.99-pre-1208 Add in a helper on the server start event for adding commands to - the server. - - v99.99-pre-1207 Move villager trading hook up a bit. thanks sengir. - - v99.99-pre-1206 Fix LAN to try hard to find a real network interface, not just localhost - most of the time - - v99.99-pre-1205 Update build to not bother building client jar. Universal is everything - now. - - v99.99-pre-1204 Null protection for ticks() -- probably should uses EnumSet.noneOf() but - you can also use null now to stop ticking. closes #77 - - v99.99-pre-1203 More precise error handling when an invalid class is present - - v99.99-pre-1202 Fix textures not applying properly - - v99.99-pre-1201 Pickblock now replaces the currently selected item if it could not find a empty space. - - v99.99-pre-1200 Merge pull request #135 from dvrabel/minecart-drag - Use original minecart drag co-efficients for regular carts. - - v99.99-pre-1199 FML will now search '/forge/accesstransformers' for user defined access transformer config files to be applied during forge setup - - v99.99-pre-1198 Added IPlayerTracker hooks - - v99.99-pre-1197 Fix up entity spawning - hopefully they won't warp anymore. - - v99.99-pre-1196 Add in a helper on the server start event for adding commands to - the server. - - v99.99-pre-1195 Move villager trading hook up a bit. thanks sengir. - - v99.99-pre-1194 Fix LAN to try hard to find a real network interface, not just localhost - most of the time - - v99.99-pre-1193 Update build to not bother building client jar. Universal is everything - now. - - v99.99-pre-1192 Update FML: 28a10ac - 28a10ac Null protection for ticks() -- probably should uses EnumSet.noneOf() but you can also use null now to stop ticking. closes #77 - c349d51 Automatic mod entity registration into the global entity list. This might break entity code out there, sorry, but this way for most entities you no longer need to manage the global mod entity stuff at all. just remove it. FML will take care of the rest (note, worlds won't load the old entities) - ef01745 Add in a utility function that *might* tell you the context you're running in on either client or server: FMLCommonHandler.getEffectiveSide - c97d6a6 Try and stop sendPacketToAllAround from being crashy - 2062273 Mods can add mod specific crash information to the crash report now Forge needs to implement MinecraftForge.getCrashCallable - 6e6436e Fix up dispenser handling, add in new params for the dispenser: breaks IDispenseHandler, sorry - 38f4a22 Fix up MLProp handling for null info - 3a8b047 GUIs working in FML for ML mods - 52483ee Support gui opening for Shelf mod - dce1cbc Updated MCPMerger to annotate unique classes with there sides, and SideTransformer to null out any class that is loaded on the wrong side. - - v99.99-pre-1191 Null protection for ticks() -- probably should uses EnumSet.noneOf() but - you can also use null now to stop ticking. closes #77 - - v99.99-pre-1190 Automatic mod entity registration into the global entity list. This might break - entity code out there, sorry, but this way for most entities you no longer - need to manage the global mod entity stuff at all. just remove it. FML will - take care of the rest (note, worlds won't load the old entities) - - v99.99-pre-1189 Add in a utility function that *might* tell you the context - you're running in on either client or server: FMLCommonHandler.getEffectiveSide - - v99.99-pre-1188 Try and stop sendPacketToAllAround from being crashy - - v99.99-pre-1187 Mods can add mod specific crash information to the crash report now - Forge needs to implement MinecraftForge.getCrashCallable - - v99.99-pre-1186 Update FML to 304: - Client side only classes are properly annotated, and denied loading on server side - Added missing client side only ModLoader.getContainerGUI function - Guis work for FML mods now. - Fixed MLProp handeling of null info - Fix up dispenser handling, add in new params for the dispenser: breaks IDispenseHandler, sorry - - v99.99-pre-1185 Fix up dispenser handling, add in new params for the dispenser: breaks IDispenseHandler, sorry - - v99.99-pre-1184 Fix up MLProp handling for null info - - v99.99-pre-1183 GUIs working in FML for ML mods - - v99.99-pre-1182 Support gui opening for Shelf mod - - v99.99-pre-1181 Use original minecart drag co-efficients for regular carts. - Since the amount of speed lost is 1 - co-eff, rounding 0.997 to 0.99 - makes a big difference to the distance a minecart will travel (less - than half of the distance in vanilla 1.25). - - v99.99-pre-1180 Updated MCPMerger to annotate unique classes with there sides, and SideTransformer to null out any class that is loaded on the wrong side. - - v99.99-pre-1179 Updated onItemUseFirst call to include the new hit vector information, and updated readme. - - v99.99-pre-1178 Added missing server side onBlockStartBreak hook, fixes Sheers. - - v99.99-pre-1177 Fixed Forge's 4096 block filler initalization. - - v99.99-pre-1176 Fix IndexOutOfBounds exception, Major derp. - - v99.99-pre-1175 Update FML: 46c563a - 46c563a Expose more of the village construction parts for building village piece - 1380c2e Allow access to the type "ComponentVillage" - 71a3818 Documentation and registration for villager stuff - e3a343c Fix javadoc derp - 195b1a0 Villager trading, manipulation and village enhancement. Still WIP but sh - 69e66c3 Fix exception based logging to actually log the exception! - - v99.99-pre-1174 Expose more of the village construction parts for building village - pieces - - v99.99-pre-1173 Allow access to the type "ComponentVillage" - - v99.99-pre-1172 Documentation and registration for villager stuff - - v99.99-pre-1171 Fix javadoc derp - - v99.99-pre-1170 Villager trading, manipulation and village enhancement. Still WIP but should be functional - - v99.99-pre-1169 Fix exception based logging to actually log the exception! - - v99.99-pre-1168 Update FML: - 885637c Fix up keyboard events for modloader - 90a7c8f Pickup notification - - v99.99-pre-1167 Fix up keyboard events for modloader - - v99.99-pre-1166 Pickup notification - - v99.99-pre-1165 Changed order in which EntityItemPickupEvent is called, it will no longer be called if the 'delay' on the item is still active. Also EntityItems that are in the world with invalid item stacks will now kill themselves. - - v99.99-pre-1164 Merge pull request #129 from heldplayer/skyRenderer - Re: Adds a SkyProvider class that can handle the rendering of the sky - - v99.99-pre-1163 Move and add a few AT for forge: rail and leaves stuff mostly - Update FML (reorg some AT for FML vs forge): - 2171c0c Update fml_at with new transforms - 924a6f9 Fix derp where client sided packet handler would be created on a dedi server env - ad4cffb Add in support for "dummy" keybindings- ones that are added to the list but never do anything so the mod can handle it all themselves. - cf77ffb Don't complain about minecraft source code being in "net.minecraft.src". Derp. - b2fdcd7 Fix ModLoader add XP Smelting - 094ce2a Actually register client/server packetspecs as their correct sides! fixes #71 - - v99.99-pre-1162 Update fml_at with new transforms - - v99.99-pre-1161 Fix derp where client sided packet handler would be created on a dedi server env - - v99.99-pre-1160 Adds a SkyProvider class that can handle the rendering of the sky - - v99.99-pre-1159 Add in support for "dummy" keybindings- ones that are added to the list but never do anything - so the mod can handle it all themselves. - - v99.99-pre-1158 Don't complain about minecraft source code being in "net.minecraft.src". Derp. - - v99.99-pre-1157 Fix ModLoader add XP Smelting - - v99.99-pre-1156 Actually register client/server packetspecs as their correct sides! fixes #71 - - v99.99-pre-1155 Fix MC packet bugs for remote servers that use blocks with ids > 256 - - v99.99-pre-1154 Fixed bug in EntityMinecart that would cause them to fall through the ground at the bottom of slopes. - - v99.99-pre-1153 Update FML: - e8cb2c1 Error if channel name is invalid - either too short, or too long - 9c6c56c Add a connect and read timeout for downloading libraries. This should really stop the "waiting forever" at startup screen. - 0d5affe GIANT FAT WARNINGS if you use any code in net.minecraft.src or any subpackage thereof. Get it out of there, now! - 13f210f Fix up ML GUI ticking. Thanks sharose! - - v99.99-pre-1152 Error if channel name is invalid - either too short, or too long - - v99.99-pre-1151 Update WorldProvider.path diff. - - v99.99-pre-1150 Added timeout to MC's download of sound resouces. - - v99.99-pre-1149 Fix EntityItemPickupEvent 'pop' sound spamming. - - v99.99-pre-1148 Fixed EntityEvent.CanUpdate - - v99.99-pre-1147 Add a connect and read timeout for downloading libraries. This should really stop the "waiting forever" at startup screen. - - v99.99-pre-1146 GIANT FAT WARNINGS if you use any code in net.minecraft.src or any subpackage thereof. Get it out of there, now! - - v99.99-pre-1145 Fix up ML GUI ticking. Thanks sharose! - - v99.99-pre-1144 Update fml: - c61ad51 Organize ALL the imports - c0842b0 Expose the server in serverstart event - 2851079 Fix up directory injection of log file locations - 5197524 Refer to FMLLog, not FMLRelaunchLog - 78efd1a Tidy up server launch - reflection not required anymore - eee0a99 Also, log what the directory discoverer finds for mcmod.info - 10c96c3 And log the exception if it has a problem reading the jar file - 07cc3fb Fix jar loader failing to inject any metadata at all if mcmod.info is not found. - e31f143 Change install.cmd to install.bat, why, cuz people are .... Updated readme to mention needing server and client. - - v99.99-pre-1143 Organize ALL the imports - - v99.99-pre-1142 Expose the server in serverstart event - - v99.99-pre-1141 Fix up directory injection of log file locations - - v99.99-pre-1140 Refer to FMLLog, not FMLRelaunchLog - - v99.99-pre-1139 Tidy up server launch - reflection not required anymore - - v99.99-pre-1138 Also, log what the directory discoverer finds for mcmod.info - - v99.99-pre-1137 And log the exception if it has a problem reading the jar file - - v99.99-pre-1136 Fix jar loader failing to inject any metadata at all if mcmod.info is not found. - - v99.99-pre-1135 Change install.cmd to install.bat, why, cuz people are .... Updated readme to mention needing server and client. - - v99.99-pre-1134 Update FML to include some ML compatibility fixes. Minimap should run, assuming he - recompiles against standard ML interfaces. - This updates to official MCP 7.2, so you'll need to rebuild your workspace (some - small but important patches to MCP went in) - - v99.99-pre-1133 Some compatibility fixes for Rei's minimap, and tidy up a couple of things - - v99.99-pre-1132 Fix Forge branding string call - - v99.99-pre-1131 Update FML for mcp 72 final, change download location for FML files, and make the stop button work. - Hello is NOT going to go away :) - - v99.99-pre-1130 Allow white space in the property name. - - v99.99-pre-1129 Update FML, make the .sh scripts executable - - v99.99-pre-1128 Fix critical bug in FML load controller that complains about injected mod containers - - v99.99-pre-1127 Update FML to 285 - - v99.99-pre-1126 Handle the case where a mod tries to do something stateful during constructor phase, and log a big - fat message about it. Don't do it! - - v99.99-pre-1125 Small fixes, including showing the FULL name of Forge Mod Loader - - v99.99-pre-1124 Fix up null array in keybinding handler - - v99.99-pre-1123 Actually add in the system property for the minecraft home, should fix multimc too - - v99.99-pre-1122 Merge pull request #121 from Draake/master-pr1 - Added additional sound events to allow for low level information. - - v99.99-pre-1121 Removed SoundSetListenerEvent implementation. - - v99.99-pre-1120 Add in support for setting the home dir via the applet launch, also a system property for forcing the home dir - - v99.99-pre-1119 Whops - - v99.99-pre-1118 Fix potential index exception in ForgeDirection - - v99.99-pre-1117 Rename Orientation to ForgeDirection {Damn MCP naming a class Direction already} - - v99.99-pre-1116 Update FML again for mod screen blending fix. - - v99.99-pre-1115 Cleanup fml.py a little, should fix double printing of 'patching file' - - v99.99-pre-1114 Wrap mod description rendering in BLEND calls https://github.com/MinecraftForge/MinecraftForge/issues/96 - - v99.99-pre-1113 Add render distance property to TileEntity. - - v99.99-pre-1112 Fix issue with default getContainerItemStack - - v99.99-pre-1111 New Command event. - - v99.99-pre-1110 Seperated block placmenet logic in ItemBlock as immibis requested: https://github.com/MinecraftForge/MinecraftForge/pull/110 - - v99.99-pre-1109 Fix ItemBlock placement, should fix RP Deployers placing blocks 1 tile down. - - v99.99-pre-1108 Updated Orientation with new helper functionality. - - v99.99-pre-1107 Updated FML, should fix the new included eclipse workspace. - - v99.99-pre-1106 Made getmodifiedsrc noop for server. - - v99.99-pre-1105 Fix new eclipse workspace to load the project properly from start. - - v99.99-pre-1104 Fixed bug in DimensionManager that would cause Index error for custom dimensions, also made WorldProviders aware of what dimension they are. - - v99.99-pre-1103 Updated patches to 1.3.2 - - v99.99-pre-1102 Cleaned up forge scripts, and updated AT config for 1.3.2, deleted any reference to server specific code. - - v99.99-pre-1101 Update FML to 278, MC 1.3.2 - - v99.99-pre-1100 Cleanup repo, delete old code - - v99.99-pre-1099 Merge branch 'minecraft132' - Yes, we are already on 1.3.2 - - v99.99-pre-1098 KeyBinding handler change: a handler now takes an array of keys and calls back with the - activated key. Sorry for the inconvenience but this improves the usability of this - API a lot - - v99.99-pre-1097 Fix renderer's not getting the rendermanager set on them at registration time - - v99.99-pre-1096 Finished update to MCP 7.2, MC 1.3.2 pre. - - v99.99-pre-1095 KeyBinding handler change: a handler now takes an array of keys and calls back with the - activated key. Sorry for the inconvenience but this improves the usability of this - API a lot - - v99.99-pre-1094 Fix renderer's not getting the rendermanager set on them at registration time - - v99.99-pre-1093 Fixup included workspace to have single project with client/server launches. - - v99.99-pre-1092 Start working on MC 1.3.2 - - v99.99-pre-1091 Add in a helper for code migrating from ML renderer stuff - - v99.99-pre-1090 Readded patch to allow for use of custom teleporter for transfering dimensions. - - v99.99-pre-1089 Merge pull request #62 from calclavia/patch-1 - Shortcut function for addNameForObject() - - v99.99-pre-1088 Shortcut function for addNameForObject() - Having that long line of code makes the code a bit ugly... Please make this shortcut function like ModLoader.addName() so I don't need to use ModLoader.addName(). :) - - v99.99-pre-1087 Handle mod duplicate detection much better. Default the name of a mod to it's id. - Fix up the block registry problem. Fix the packetsend from c->s actually being - "disconnect" :) - - v99.99-pre-1086 Update FML with entity spawning fixes - - v99.99-pre-1085 Fix entity spawn packets - - v99.99-pre-1084 Updated FML, should fix 'derp?' RuntimeError - - v99.99-pre-1083 Force a Jenkins build - - v99.99-pre-1082 Merge pull request #60 from remuladgryta/master - fixed 'derp' error on @NetworkMod - - v99.99-pre-1081 fixed java.lang.NoSuchMethodException - getServerHandlerSpecDefaultValue() and - getClientHandlerSpecDefaultValue() should no longer give derp exeption - - v99.99-pre-1080 Fix PickBlock 'ghost item' bug when picking with a item selected. - - v99.99-pre-1079 Update release script to create universal binary distro. - - v99.99-pre-1078 Update debug settings to use Client's internal MinecraftServer.main to debug dedi-server env. - - v99.99-pre-1077 Delete Forge server projects - - v99.99-pre-1076 Update FML, Tons of bug fixes and proper merging of client and server. - - v99.99-pre-1075 FML will skip gathering MD5s for classes in the cpw package during the the inital recompile {Make Side/SideOnly reobf properly} - - v99.99-pre-1074 Merge remote-tracking branch 'origin/master' - - v99.99-pre-1073 Updated FML install to provide better error output, Updated commands.py patch to disable recompile of server project. - - v99.99-pre-1072 Hopefully let build continue if server reobf fails, and fix derp in FMLNetworkHandler for entities - - v99.99-pre-1071 Fix up concurrent modification exception - ticks for players now occur on both sides - - v99.99-pre-1070 Merge the last bits of the server code into the common directory, and annotate ModLoader/BaseMod for sided use - This means the FML-Server project is now defunct as all code is either common, client or bukkit. - - v99.99-pre-1069 Actually fix the applet launch - it now launches properly *and* closes the window - - v99.99-pre-1068 Fix up relaunch of the applet - - v99.99-pre-1067 Added additional sound events to allow manipulation of a sound source at its creation. - - v99.99-pre-1066 Change language loading a bit - - v99.99-pre-1065 Update spritehelper bitmaps for items and terrain - - v99.99-pre-1064 Tidy up some APIs, expose the addOverride mechanism. This should be pluggable by forge - but may need work to allow for each mod to have it's own override set - - v99.99-pre-1063 Fix derp in LanguageRegistry - - v99.99-pre-1062 Merge pull request #116 from bloodandiron/bonemeal-fix - Bonemeal handler fix - - v99.99-pre-1061 FMLModcontainer should not complain about annotations it has no idea about. so stfu fmlmodcontainer - - v99.99-pre-1060 Fix derp with EntityRegistry- bimap is not the right type for the name->container list - - v99.99-pre-1059 Fix bug where default bonemeal behavior wouldn't trigger. Only return if the event was canceled. - - v99.99-pre-1058 Add in a sided variant of the packethandlers in the annotation - also, a bit more - explicit warning on when to register blocks - if you do it after pre-init, you'll - reset the achievements - - v99.99-pre-1057 Generate channel registration for client, also, do it before the login events so you can send packets - - v99.99-pre-1056 Capture server packet handling errors into the FML log file for diagnostics - - v99.99-pre-1055 one more change for the road :) - - v99.99-pre-1054 Update FML, new AT features, and error info. - - v99.99-pre-1053 Don't spit debug all over the floor - - v99.99-pre-1052 updated conf, commands patch (missing newline?) and capturing the actual running - MC version and validating it at relaunch time is the correct MC version. - - v99.99-pre-1051 Add in callableminecraftversion - - v99.99-pre-1050 Entity AI accessibility, also AccessTransformer can make certain classes public now - - v99.99-pre-1049 Update AT config to expose some block functions and a few extras. - - v99.99-pre-1048 Delete dead IGuiHandler - - v99.99-pre-1047 Updated FML - - v99.99-pre-1046 Fixed ItemRenderer not grabbing custom texture files properly for block items - - v99.99-pre-1045 Add in a simple packet dispatcher for sending packets around - - v99.99-pre-1044 Add in a sided packet registry so that client vs server can vary - - v99.99-pre-1043 Fix double forge init on server - - v99.99-pre-1042 Should fix commands.py patching not working properly first run. - - v99.99-pre-1041 Merge pull request #50 from Krapht/master - Fix for getNextAvailableRenderId() returning ids in use by vanilla - thanks krapht! - - v99.99-pre-1040 Fixed getNextAvailableRenderId() returning ids in use by vanilla - - v99.99-pre-1039 Updated FML, Should fix a lot of installing issues for MCP. - Made patches error and not apply if the target file is not found. - Updated Event Transformer to add a default constructor... - Fixed 4096 setup code in MinecraftForge.initalize() - - v99.99-pre-1038 Fix MCPMerger injecting Side/SideOnly when it already exists. - - v99.99-pre-1037 Added patch verification to commands.py patch, and made it so MCP will check the original jars for the server, to prevent it from saying modified when it started out clean. - - v99.99-pre-1036 Add DEBUG constant to Access/Side Transformers to remove spam when not needed. Also AccessTransformer and MCPMerger should return a error code when it can not process causing MCP to stop decompile. - - v99.99-pre-1035 Fix EntityRegistry - mods can specify update frequency, range and velocity data, and also - patch EntityTracker to actually track FML entities - - v99.99-pre-1034 Fix NPE with no channels - always register FML - - v99.99-pre-1033 Fix issue in install script for users with spaces in there paths. - - v99.99-pre-1032 Added missing quotes around compile command. - - v99.99-pre-1031 Updated FML, fixed custom tool hooks, and spawn protection/player reach hooks. - - v99.99-pre-1030 Fix up the network mod issue properly. Maintain a real cache of mod objects - - v99.99-pre-1029 Update FML, server should run now. Still issue with NPE with no mods installed. - - v99.99-pre-1028 Remove profiler stuff - it's been deeply reorged. I'll look at re-adding it later - - v99.99-pre-1027 Fix up command patch to actually work - - v99.99-pre-1026 Fix commands.py to always include the two side classes so the fml jars are valid. - - v99.99-pre-1025 Fix build script- put client in first - - v99.99-pre-1024 Put the marker on the server ML file too - - v99.99-pre-1023 Fix universal not to dupe entries in the jar, also add in the fml mod as "untransformable" - - v99.99-pre-1022 Fix up launch when obfuscated *sigh* - - v99.99-pre-1021 Update netclienthandler patch. - - v99.99-pre-1020 Fix NPE for server relaunch - - v99.99-pre-1019 Fix up Package.getPackage(), also fix up loadcontroller construction - - v99.99-pre-1018 Add in Package.getPackage() support for sengir - - v99.99-pre-1017 Lost of work to try and complete ML support - probably still bits missing, but mostly there - - v99.99-pre-1016 Fixed Diemsnion API related NPEs, and updated FML to 231. - - v99.99-pre-1015 Newlines in diff file - - v99.99-pre-1014 Add special case to add Side/SideOnly to difflist - - v99.99-pre-1013 Fix up some network related stuff and optimize mod lookup a bit - - v99.99-pre-1012 Fix up proxy injector to inject properly - - v99.99-pre-1011 Fix decompile - - v99.99-pre-1010 Updated FML, updated patches - - v99.99-pre-1009 Fix NPE on missing mods - still need to actually handle missing mods properly on client - - v99.99-pre-1008 New downloader UI and new downloader backend - should be more robust now - - v99.99-pre-1007 Added -no_gen_conf to jenkins build - - v99.99-pre-1006 Added some extra error prints, hopeully get something useful when installed in the client. - - v99.99-pre-1005 Updated conf merger script to just merge everything, and normalize the line endings so git doesn't complain. - - v99.99-pre-1004 Update fml, impelemnted Diemsnion API stuff. - - v99.99-pre-1003 SidedProxy should work again - anywhere. Make sure it's on a static field though - - v99.99-pre-1002 More ticking hooks, and some other bits of clean up. Very close to "done" now. - - v99.99-pre-1001 Fix up modloader and clean up junk method - - v99.99-pre-1000 A lot of missing patches to code re-added. Almost all functionality should now - be restored. - ModLoader compatibility is not yet assured, there are some wrapper classes that - need re-writing first - - v99.99-pre-999 Readded common folder to startclient/server. - - v99.99-pre-998 Add in a registration method for gui handlers - - v99.99-pre-997 Overwrote lex's command patch - - v99.99-pre-996 Fix up MCP merger - it definitely works now - the game runs and runs well. - Fix up a couple of small network related issues. - Fix up the server launching fml properly. - - v99.99-pre-995 Include Forge's AT config into redist zips. - - v99.99-pre-994 Added new pick block hook for blocks and entites to allow for better grained control of the result. - - v99.99-pre-993 Fix oreientation bug causing levers not being able to place. - - v99.99-pre-992 Moved over Configuration - - v99.99-pre-991 Added common folder support to startclient/startserver - - v99.99-pre-990 Added some missing quotes that caused issues if your workspace had a space in it. - - v99.99-pre-989 Update fml - - v99.99-pre-988 Add lib folder to installed eclipse - - v99.99-pre-987 Copy forge files over in install. - - v99.99-pre-986 Delete conf, server compile, update fml, and fix install script. - - v99.99-pre-985 Cleaned up some more, fixed infinite loop with cancelable annotation, Client now compiles and enters world just fine. - - v99.99-pre-984 Add in missing patch - also, launch FML properly from the server - - v99.99-pre-983 Entity spawn adjustment - tracker - - v99.99-pre-982 Nope, unneeded patch - - v99.99-pre-981 Updated Client side patches for the new Merged MCP workspace. - - v99.99-pre-980 Fix ModLoader compilation, and MCPmerger invocation for Forge. - - v99.99-pre-979 Include conf folder and merge config in source zip - - v99.99-pre-978 Entity spawning - done - - v99.99-pre-977 Generate a universal binary package since we can now :) - - v99.99-pre-976 Merge branch 'MergingClientServer' - - v99.99-pre-975 Reorganized all the current patches - - v99.99-pre-974 Fix up annotation parser to parse arrays and enums - - v99.99-pre-973 Added SideTransformer to strip side only functions/fields out. - - v99.99-pre-972 Stage 1 of merging the client and server for MCP. - Results: - Client: 362 - Server: 3 (Only due to issues of FF decompilation inconsistancies) - Common: 910 - Stage 2: Write runtime transformer to remove annotated fields/methods with invalid side annotation. - - v99.99-pre-971 Gui Handler ported from MC forge - - v99.99-pre-970 Revert dumb stuff with commands patch - lots of gfx patching - - v99.99-pre-969 Removed a lot of old files - - v99.99-pre-968 Almost finished basic network stuff now - - v99.99-pre-967 Update some patches- more network work - - v99.99-pre-966 Finished World and EntityMinecart patches. - - v99.99-pre-965 More conversions, added all the entity living events. - - v99.99-pre-964 More work, moved over packet stuff, need to change everything to use new NetworkMod system - - v99.99-pre-963 Bunch of hooks re-added : network is more complete now, lot of basemod cleanup, moving stuff into - the registry area - - v99.99-pre-962 Moved some files. - - v99.99-pre-961 A bulk of more patches converted, updated fml - - v99.99-pre-960 More patches converted. - Refactored some of the events to be a better hiarachy. - - v99.99-pre-959 Fix location of forge in common handler - also some tweaks to modloader and other stuff - - v99.99-pre-958 Network support - there's still some work to do and full id sync isn't done yet, but it has proper registration - semantics and hooks for 250 handling - - v99.99-pre-957 Add in a lot of network handler stuff - also, expose the asm harvested data - - v99.99-pre-956 Some more patch migration before bed. - - v99.99-pre-955 More progress on converting patches from 1.2.5 - - v99.99-pre-954 Implemeneted adding grass seeds, as well as IShearable for BlockTallGrass - - v99.99-pre-953 Implemented BonemealEvent (IBonemealHandler replacement), and bonemeal making grass. - - v99.99-pre-952 Renamed MinecraftForge.eventBus to EVENT_BUS as it's constant. - - v99.99-pre-951 Moved in OreDictionary stuff to new system. IOreHandler is replaced by OreDictionary.OreRegisterEvent - - v99.99-pre-950 Missed a file - - v99.99-pre-949 First push of some small patches and introduction of basic events. As well as the first cases for Forge's Access Transformer - - v99.99-pre-948 Remove some unneeded fields from the annotations - - v99.99-pre-947 Moved paulscode to new client folder - - v99.99-pre-946 Made empty constructor for ModMetadata public - - v99.99-pre-945 Updated update_patches.py, and made first patch! - - v99.99-pre-944 Moved logo to new client folder - Added blank Access Transformer config for Forge - Implemented version storage - Added basic dummy FML mod container to remove the need for mod metadata file - Added beggining work on Forge event system - Updated and moved EnumHelper - - v99.99-pre-943 Update FML - - v99.99-pre-942 Updated build.py - - v99.99-pre-941 Remove eclipse files from old eclipse projects - - v99.99-pre-940 Fix path trimming for copytree - - v99.99-pre-939 Added merging fields/methods/param csv files. And updated FML to 197 - - v99.99-pre-938 Change property name to fml.modStates not fml.disabledMods- it makes more sense that way - - v99.99-pre-937 Add in a bit of logging when events get sent to mod containers - - v99.99-pre-936 Allow coremods to inject a modcontainer and run code - this will mean that FML is deliberately and very obviously incompatible with a modloader installation. - Fix up worldtype so that the server can run. - - v99.99-pre-935 Patch commands.py to support side '2' as common, as well as fix a few small errors in the update_patches and fml scripts. - - v99.99-pre-934 Helper function grab all unique searge names that are shared client and server - - v99.99-pre-933 Add newids to that list - - v99.99-pre-932 Add the direct copied files from MCP conf - - v99.99-pre-931 Committing inital work on generating sanitized MCP conf data. - - v99.99-pre-930 New Start.java which allows the user to login using a legit account for testing on servers. - - v99.99-pre-929 Dump old mcp config - - v99.99-pre-928 inital push of updated setup script and cleaned up forge.py - - v99.99-pre-927 Added a better eclipse workspace for deving Forge - - v99.99-pre-926 Get rid of all old patches - - v99.99-pre-925 Merged transformers/ to /common and renamed the asm source download to align better with the asm bin file name. - - v99.99-pre-924 Change place commands.py backup is stored. - - v99.99-pre-923 FML finish won't updatemcp automatically, easier integration with forge. - - v99.99-pre-922 Fix packaging and install to not have the src/ folder, making it align better with the dev env. - - v99.99-pre-921 Bumped version to 3.4.9, final commit for 1.2.5. - - v99.99-pre-920 Moved setting up eclipse to setup_mcp - - v99.99-pre-919 Fixed ant script to support common folder building and add the new files to the dist archives. - - v99.99-pre-918 setup_fml's decompile will result in proper md5 files now {if there is no compiler issues} - - v99.99-pre-917 Removed FMLRegistry, and IMinecraftRegistry. - Updated server side to use the seperated registry classes like the client does. - Updated searge name references on server - Made StatBase.statName public using AccessTransformer - Server should compile now - - v99.99-pre-916 Fix MockBlock compile - - v99.99-pre-915 Download argo/guava source references in install, and updated eclipse workspaces to reference them. - - v99.99-pre-914 Cleaned up commands.patch, removed debug print in fml.py - - v99.99-pre-913 Remove clientdrop, old reference files. - - v99.99-pre-912 Delete some dead files - - v99.99-pre-911 Fix commands patch, WorldType patch and some ML compat stuff - - v99.99-pre-910 More fixes - - v99.99-pre-909 More build fixes for jenkins - - v99.99-pre-908 Try and fix the jenkins build - - v99.99-pre-907 Change some event names, hook up the event code for server events for FML - - v99.99-pre-906 Merge branch 'newfmlmod' - - v99.99-pre-905 Introduced patching of runtime/commands.py to allow for usage of the src/common folder. - - v99.99-pre-904 Change some stuff around - begin launching the server through the wrapper too. - A lot of patches went in - the client and server both launch and start up mods. - - v99.99-pre-903 Rebase - - v99.99-pre-902 Merge pull request #114 from cpw/master - Line endings - - v99.99-pre-901 Normalize the repo - - v99.99-pre-900 More stuff - - v99.99-pre-899 Fix classpath for Client, maybe? - - v99.99-pre-898 Line endings for this branch - - v99.99-pre-897 A load of transformer accesses- also a few tweaks to the transformer, and linux support in the fml python - - v99.99-pre-896 Rewrote patch generation and application to no longer need diff, and attempt to apply common patches on decompiles that don't have one side or the other. - - v99.99-pre-895 Updated eclipse projects to have src-common linked resources - - v99.99-pre-894 Modified the decompiler stage to: - Compile and run AccessTransformer during the pre-RG stage of decompilation. - Merge resulting sources that are identical to src/common - ToDo: - Finish the common intergration: - -update_patches - Add common folder support - -apply_patches: - --patch each side, also patch all common patches to each side incase they are not merged, only if file exists. - - v99.99-pre-893 Add temp AccessTransformer config for FML - - v99.99-pre-892 Discard old setup script - - v99.99-pre-891 Fixed AccessTransformer issue with trying to load files, instead of resources. - - v99.99-pre-890 Merge pull request #113 from someh4x0r/master - Fix BlockTrapDoor.disableValidation on server - - v99.99-pre-889 Fix BlockTrapDoor.disableValidation on server - - v99.99-pre-888 Commit the start of some pluggable transformers - - v99.99-pre-887 XP for smelting - - v99.99-pre-886 Beginning the 1.3.1 update - - v99.99-pre-885 Add in the ability to create versioned dependencies for mod relationships - BaseMod versions are loaded too late so will never work as a versioned - dependency requirement, but can have versioned deps of others - - v99.99-pre-884 Fix up coremods with relaunch, add in a sample "coremod" - - v99.99-pre-883 Add in events for the method pre/init/post annotations so we can add in extra data during the event phase - - v99.99-pre-882 Fix whitespace issue - - v99.99-pre-881 Fix window sticking around - it doesn't anymore - - v99.99-pre-880 Add in "transform excluded" classes that we still need to take loading responsibility for - - v99.99-pre-879 Added in some dialogs when things don't go so well - - v99.99-pre-878 New logging stuff, also the early plugin api for forge - - v99.99-pre-877 Merge branch 'minecraft1.3' into newfmlmod - - v99.99-pre-876 Fix up mod classloading delegation - - v99.99-pre-875 Some patches to go along with the other changes - - v99.99-pre-874 More stuff as I roll out the changes - - v99.99-pre-873 A bunch more fixes for FML mods - - v99.99-pre-872 Merge remote-tracking branch 'mainlap/newkeys' into newfmlmod - Conflicts: - client/cpw/mods/fml/client/FMLClientHandler.java - - v99.99-pre-871 New key handling - - v99.99-pre-870 Check in a lot of recent work - - v99.99-pre-869 Check in new fml mod work so far. Lots still to do. - - v99.99-pre-868 Cleaned up the install script for the source distrabution to setup the workspace properly, delete argo, and download all required dependancies. - - v99.99-pre-867 Added call to clean_source to build script to fix patch fuzz on windows. - - v99.99-pre-866 Fix Client-Clean project to use relative path to argo. - - v99.99-pre-865 Should fix NPE on older ISoundHandlers EXA: http://minecraftforge.net/forum/index.php/topic,759.html - - v99.99-pre-864 Merge pull request #104 from cpw/master - Update to fml 176 - fixes a subtle tick bug - - v99.99-pre-863 Update fml with recent tick fix - - v99.99-pre-862 Merge pull request #102 from TrueBrain/EntityTracker - -Add: sync serverPos[XYZ] on spawning of entity - - v99.99-pre-861 -Codechange: applied LexManos' request - - v99.99-pre-860 -Fix: check for null where needed - - v99.99-pre-859 Made WorldGenMinable metadata sensitive. - - v99.99-pre-858 Fixed a improper rounding in EntityMinecart - - v99.99-pre-857 -Add: sync serverPos[XYZ] on spawning of entity - This fixes the issue that, up to 400 ticks from getting in range, - entities have a wrong offset (because server and client don't agree on - the position to calculate relative updates from) - - v99.99-pre-856 Another bloody ticking fix. This should fix mods that use ML.setInGameHook(true,false) on the - server side to recieve ticks. - - v99.99-pre-855 Fix up mod classloading delegation - - v99.99-pre-854 Fixes - - v99.99-pre-853 Incorporate server patches into client - - v99.99-pre-852 Remove two places that are unpatchable now - - v99.99-pre-851 Server repatching - - v99.99-pre-850 Add a "checkpatches" target and check if your patches are up to date before running a repatch operation - - v99.99-pre-849 Launch through the applet launcher too - - v99.99-pre-848 Some patches for the server - - v99.99-pre-847 Lots of client patch fixup - - v99.99-pre-846 Update git ignore to ignore a fernflowerzip that's lying around - - v99.99-pre-845 And we have a brand, "fml". We're definitely modded :) - - v99.99-pre-844 UnexpectedThrowable is now the much more awesome CrashReport! - - v99.99-pre-843 Merge branch 'master' into minecraft1.3 - Bring some of the ticking fixes in - Conflicts: - client/cpw/mods/fml/client/FMLClientHandler.java - patches/minecraft_server/net/minecraft/server/MinecraftServer.java.patch - - v99.99-pre-842 Got the relauncher downloading and injecting library files - - v99.99-pre-841 Merge pull request #98 from cpw/master - Update to fml 175 - - v99.99-pre-840 Update fml to 175- fixes some weird ticking behaviours for ML mods, adds in new ticking behaviours for smart mods - - v99.99-pre-839 Tweak ticking YET AGAIN. Should fire a solitary GUILOAD tick right as the game screen loads. - Hopefully fixes worldload tick issue too - - v99.99-pre-838 FFS let this fix that bloody ticking mess that is ML compatibility. - - v99.99-pre-837 Separate gui ticking completely. send it as if it's a world tick. ML gui ticks are epically dumb. - Fix Worldload being filtered from the trigger arming. - Also, improve errors going to an error screen. There should be more information now. - - v99.99-pre-836 Change gui ticking and world load tick. Should close issue #40 and kill it deader - than a very very dead thing. *$^*(#% Modloader ticking b#%$hit - - v99.99-pre-835 Merge branch 'master' into minecraft1.3 - - v99.99-pre-834 Tweak build xml for more cleanliness - - v99.99-pre-833 Merge branch 'antscriptupdates' - - v99.99-pre-832 Update some stuff - - v99.99-pre-831 Merge branch 'antscriptupdates' into minecraft1.3 - - v99.99-pre-830 Add in more options for ant script and clean up needing to clean every time. - - v99.99-pre-829 Updated some remaining scripts to call there python versions. - - v99.99-pre-828 Removed symlink files, shouldn't be in the repo. - - v99.99-pre-827 Moved licenses and credits into install folder. - - v99.99-pre-826 Merge branch 'testrecover' - - v99.99-pre-825 Merge branch 'antscriptupdates' into minecraft1.3 - - v99.99-pre-824 Merge branch 'antscriptupdates' - - v99.99-pre-823 Some more fixes to the ant stuff: apply patches now happens at the right time, I grab fernflower as part of - setup and added an updatepatches call too - - v99.99-pre-822 Merge branch 'antscriptupdates' into minecraft1.3 - Conflicts: - build.xml - - v99.99-pre-821 Merge branch 'antscriptupdates' - - v99.99-pre-820 Add in a setupenvironment ant target specifically for setting up an FML environment from scratch - - v99.99-pre-819 Harvest MC version from MCP - - v99.99-pre-818 fix sided proxy bukkit test (not used so not a biggie) - - v99.99-pre-817 Harvest MC version from MCP - - v99.99-pre-816 Fix furnaces not smelting the proper number of results after the first one. Damn you tahg, fix this! Keeps falling through my cracks. - - v99.99-pre-815 Initial checkin. Some patches are probably missing, but client compiles. - - v99.99-pre-814 Merge pull request #94 from cpw/hastileentitybugfix - Fix server check "blockHasTileEntity" used to determine if getDescriptionPacket - - v99.99-pre-813 Fix server check "blockHasTileEntity" used to determine if getDescriptionPacket - is sent for the block to be metadata sensitive. Thanks iChun! - - v99.99-pre-812 Working simple scheduled ticking, Player ticks - - v99.99-pre-811 Support tick spacing through new IScheduledTickHandler - - v99.99-pre-810 Merge pull request #93 from cpw/fixghost4096 - Fix ghost players who appear if they don't have the 4096 fix installed - - v99.99-pre-809 Change TickType.WORLD to send the world as arg[0] to match the server. - - v99.99-pre-808 Fix ghost players who appear if they don't have the 4096 fix installed - - v99.99-pre-807 And there are not 1000 seconds in a second - - v99.99-pre-806 Seconds are 1000 milliseconds long. Not 1 millisecond long. - - v99.99-pre-805 Tweak profiler command on bukkit - - v99.99-pre-804 Fix up a derp in the timing command - - v99.99-pre-803 Fix container creative to not add Blocks above 256 unless it's told to. - - v99.99-pre-802 Merge pull request #91 from cpw/multiversefix - Fix world provider behaviour: WorldProvider.byDimension should always return a new instance- otherwise you can end up with worlds overwriting one another - - v99.99-pre-801 Fix world provider behaviour: WorldProvider.byDimension should always return - a new instance- otherwise you can end up with worlds overwriting one another - - v99.99-pre-800 Fix code to use guava 10 only. Stupid bukkit plugins and daft dependencies on guava 10! - - v99.99-pre-799 Tweak for end profiling - - v99.99-pre-798 Add in simple profiler for bukkit - - v99.99-pre-797 Add in a mechanism to get the modcontainer for a mod - so things can be programmatically changed - - v99.99-pre-796 Add in bukkit support for recipe change - - v99.99-pre-795 Add in a new recipe handler registry method for ease of adding recipes to MC - - v99.99-pre-794 Merge remote-tracking branch 'origin/master' - - v99.99-pre-793 Fixed isBlockReplaceable and placing ItemBlocks' - - v99.99-pre-792 Fucking spelling nazis - - v99.99-pre-791 Updated FML to build 153 - - v99.99-pre-790 Fix bitmask bug related to 4096 in multi-block change. - - v99.99-pre-789 Added configuration option to disable the darkroom mechanic. For servers who wish to not risk destruction at one broken pipe. - - v99.99-pre-788 Add option to randomize potential spawn locations to have a more randomly dispersed spawn patern, useful for games like FTB vs. - - v99.99-pre-787 Fix NPE related to server/client not having block ids synced properly. - - v99.99-pre-786 Update tester mod - - v99.99-pre-785 Fix ticking for GUI ticks too! - - v99.99-pre-784 Fix dependency string processing error - - v99.99-pre-783 ModSorting test case - - v99.99-pre-782 FML 150, more tick related work. - - v99.99-pre-781 Fix ticking properly - ML world ticks now fire once, properly - - v99.99-pre-780 Close inputstream - - v99.99-pre-779 More bugfixes related to portal generation. Should be all now. - - v99.99-pre-778 Fix Vanilla bug where nether portals would not work above 127 - - v99.99-pre-777 Updated to FML 149, should fix all ticking issues with ModLoader mods - - v99.99-pre-776 Some 4096 I missed in custom renderers. - - v99.99-pre-775 Added stupididty exception for common issue with getMinecraftLogger. - - v99.99-pre-774 Rename unused ML prop config files if they exist (to .bak) and - skip generating if not needed - - v99.99-pre-773 Update bukkit with changes - - v99.99-pre-772 Revert "Test failing build" - This reverts commit 744febc38e915a12c388fe01ba6715d31b6b6ee2. - - v99.99-pre-771 Revert "Revert "Fail the build when recompilation fails"" - This reverts commit c2d920d738a294462338fbe955c62a0f4034304c. - - v99.99-pre-770 Revert "Fail the build when recompilation fails" - This reverts commit 482e3be3c9a96df8cefad81d78c7a4e83ad898b4. - - v99.99-pre-769 Test failing build - - v99.99-pre-768 Fail the build when recompilation fails - - v99.99-pre-767 Fix huge bug/typo in basemodticker that stopped ticks getting sent - - v99.99-pre-766 Updated to FML build #142, fixed FML compilation issue causing missing files when reobfing. - - v99.99-pre-765 Fix compilation error, Protip: Don't use java7 things when compiling for java6, and Don't report successful build on compilation errors cpw. - - v99.99-pre-764 Updated release script to automatically inject version info into .info file. - - v99.99-pre-763 Updated to FML 141, should fix ticking issues with certian mods, and crash issue with TropiCraft - - v99.99-pre-762 Remove cr's from modinfo descriptions, they print oddly in Minecraft. - - v99.99-pre-761 Print mod metadata info errors if we are in MCP. - - v99.99-pre-760 Should fix concurent modification exceptions when using removeSpawns - - v99.99-pre-759 Remove some eclipse preference files - - v99.99-pre-758 Update gitignore to ignore some eclipse preference files. - - v99.99-pre-757 Merge pull request #29 from ScottKillen/master - Fixed WorldType to allow custom WorldTypes - - v99.99-pre-756 Bumped version number for new IEntityLiving interface. - - v99.99-pre-755 Merge pull request #88 from pahimar/master - Fixes typo in the new EntityLivingHandler code - - v99.99-pre-754 Typo in the new EntityLivingHandler code - - v99.99-pre-753 Implemented enchanced EntityLiving events. Thanks Atomic for parts of it. - - v99.99-pre-752 Made setFailsafeFieldValue public for Rob - - v99.99-pre-751 Added EntityRendererProxy class for compatibility with ModLoader mods that rely on it's existance. - - v99.99-pre-750 More ticking cleanup - - v99.99-pre-749 Remove WorldLoad tick from modloader mods- too early. *sigh* - - v99.99-pre-748 Make sure to reset the clock trigger - - v99.99-pre-747 Force all client modloader ticks to occur at render end - - v99.99-pre-746 Client - ====== - Added hook in GuiCreateWorld to allow WorldType to present GUI on world creation. - - v99.99-pre-745 **Client** - * Delegated World.func_46068_G() (getHorizon), which depends on WorldType, to the WorldType class per LexManos' suggestion - - v99.99-pre-744 Client - ====== - - Fixed WorldType to allow custom WorldTypes in world creation GUI. - - Deprecated client WorldType.getSeaLevel() and renamed it with the more accurate name of getMinimumSpawnHeight. - - Changed related reference WorldProvider. - Server - ====== - - Fixed WorldType to allow custom WorldTypes - - Added methods to WorldType giving it the exact abilities of client WorldType - - Adjusted WorldProvider so that it relies on WorldType the same way it does on client. - - v99.99-pre-743 Few more cases for 4096, thanks TrueBrain - - v99.99-pre-742 Forgot Configuration in 4096 change. - - v99.99-pre-741 Initial 4096 fix based of mDiyo's work. - - v99.99-pre-740 Configurable kick message when you don't have forge. - - v99.99-pre-739 Merge pull request #27 from TheNoid/master - Make FML logs use system line endings … - - v99.99-pre-738 Make FML logs use system line endings for consistency with Java stack traces in the logs. - - v99.99-pre-737 Fixed bug in new entity sound hook. - - v99.99-pre-736 Bumped version number to 3.3.7 for full release. - - v99.99-pre-735 New onChunkUnload event for TileEntities, for psxlover. - - v99.99-pre-734 Added new ISoundHandler.onPlaySoundAtEntity hook. Should be backwards compatible with any older ISoundHandler implementations. - - v99.99-pre-733 Updated to FML #135 {Fixed ModList rendering issue, and incorrect arument on crafting hook} - - v99.99-pre-732 Server side fix for invalid parameter to onCrafting - - v99.99-pre-731 Proper fix for scroll list not covering all of the hidden scroll items. - - v99.99-pre-730 Merge pull request #26 from GenuineSounds/patch-2 - Incorrectly passing the IInventory of the extraction slot instead of the... - - v99.99-pre-729 Merge pull request #25 from GenuineSounds/patch-1 - Having the string trimmed to 9 made most long strings show a couple of p... - - v99.99-pre-728 Incorrectly passing the IInventory of the extraction slot instead of the crafting matrix, get back to me on why it's doing this instead of the default behavior of ModLoader and Forge. - - v99.99-pre-727 Having the string trimmed to 9 made most long strings show a couple of pixels at the very top and very bottom. ie - https://dl.dropbox.com/u/79514/2012-06-13_13.25.35.png - - v99.99-pre-726 Fixed concurent modification exception in the ore registry. - - v99.99-pre-725 Fix for potential concurancy modification exceptions - - v99.99-pre-724 Fixed possible NPE when blocks havent fully initalized yet. - - v99.99-pre-723 Updated FML to 132, TextureFX fix, and bumped revision to 6. - - v99.99-pre-722 Fixed KeyBinding issue with ModLoader container, if you register a KeyBinding twice it will discard the old one. And fixed issue where getVersion() could return null causing NPE. - - v99.99-pre-721 Made it so it will attempt to scale any Texture Effects that return data for smaller texture resolutions. Made the size descrepancy only a error for ITextureFX texture effects. - - v99.99-pre-720 Added bouncer functions for functions we removed. Makes MagicLauncher shut up about missing functions {not actually missing}, and therefor makes users stop thinking its a life or death error. - - v99.99-pre-719 New Ore Dictionary recipies. Allows for simpler Ore Dictionary integration with recipies. IOreHandler should no longer be used. - - v99.99-pre-718 Added hackish workaround for Tessellator.textureID to provent crashing while we wait for Optifine to update. - - v99.99-pre-717 Updated to FML 130 - - v99.99-pre-716 Fix up "errored" mod states so they actually read as errors - - v99.99-pre-715 Fix up bukkit for biome code - - v99.99-pre-714 Fix up biome handling for client and server - - v99.99-pre-713 - Fixed client crash bug in add/remove Biome functionality. Arrays.asList() returns a fixed-sized list per java spec. Adding and removing biomes throws UnsupportedOperationException. - - Fixed same on server and added disabled removeBiome functionality. This touched a lot of classes as the nonWorking removeBiome seemed to be lots of places inconsistent with addBiome. - - v99.99-pre-712 Tweak error handling - report the exception that caused the bailout - - v99.99-pre-711 Fix parameter ordering in ticks - - v99.99-pre-710 Update bukkit for world gen tweaks - - v99.99-pre-709 Change world generation to expose a mod interface - - v99.99-pre-708 Update bukkit for early load change - - v99.99-pre-707 Attempt early initialization of Minecraft Forge - - v99.99-pre-706 Update bukkit handler - - v99.99-pre-705 Add in a server side WORLDLOAD tick - - v99.99-pre-704 Fix ticking- need to register the basemod tickhandler *sigh* - - v99.99-pre-703 Fix ticking for new name "GAME" vs "WORLD" - - v99.99-pre-702 Update bukkit handlers - - v99.99-pre-701 Reorganize basemod ticking to use ITickHandler. Introduce "GAME" tick vs "WORLD" tick for - mods that want to tick per world and "globally" - - v99.99-pre-700 Expose a "clean" ticking interface and fix server tick loop for world ticks - - v99.99-pre-699 Tweak width of description - - v99.99-pre-698 Server side of ITextureProvider for Block/Item for compilations sake. - - v99.99-pre-697 Backwards compatibility fix for ITextureProvider - - v99.99-pre-696 Updated FML to 121 to fix world tick issues. - - v99.99-pre-695 Fix for in game tick running when it shouldn't. Fixed some tabbing issue in crazy's PR. - - v99.99-pre-694 Tag each Tessellator with it's associated texture ID. - - v99.99-pre-693 All Items and Blocks now implement ITextureProvider, and have a setTextureFile(String) function, to support cleaner code in Mods and in Forge. - - v99.99-pre-692 Updated MCP mapings. Moved the bulk of custom logic from RenderItem to ForgeHooksClient. - - v99.99-pre-691 Merge remote-tracking branch 'origin/master' - - v99.99-pre-690 Added kick info to disconnect event, updated to FML 120, keybindings, better image rendering in ModList ui. - - v99.99-pre-689 Interm implementation of keyboardEvent for ModLoader. - - v99.99-pre-688 Add static log() functions to the RenderAccessLibrary, and fixed up the logo rendering to better display the images. - - v99.99-pre-687 Fix bug in cart functions where would always return null. - - v99.99-pre-686 Merge pull request #14 from crazyputje/master - onTickInGUI fix. Thanks crazyputje! - - v99.99-pre-685 removed 'if (client.theWorld != null)' so it also ticks in the main menu - - v99.99-pre-684 Fixed some inverted logic causing tress to not gen correctly. - - v99.99-pre-683 Update FML to 117 - - v99.99-pre-682 Also, new hook in last commit for blocks to determine if they are able to be replaced by ores, for any mod that adds new world gen. Bumped revision up. - - v99.99-pre-681 New Hooks addedf for custom tree/leaves. And better interaction with trees growing and rerplacing certain blocks. Should allow for ExtraBiomes to behave nicer, and RedPower to make there blocks un-breakable by trees. - - v99.99-pre-680 Helps to have a retention policy - - v99.99-pre-679 Helps to have a retention policy for runtime annotations - - v99.99-pre-678 Updated to FML 115, added Forge Logo to the client dist, and in-game ModInfo page. - - v99.99-pre-677 We now bundle CodexIBXM from PaulsCode. See http://paulscode.com http://www.paulscode.com/forum/index.php?topic=4.0 and the included license files for more info. - - v99.99-pre-676 Add in bukkit proxy handler - - v99.99-pre-675 More proxy code - - v99.99-pre-674 Introduce a proxy side loader for mod use - - v99.99-pre-673 Fixed GuiModList Logo rendering to allow for logos of different sizes to be rendered properly. Logos will render themselves full underneath the text, It is the modder's job to make it look good. - - v99.99-pre-672 Updated to FML build 114 - - v99.99-pre-671 Update credits information - - v99.99-pre-670 Update readme for the client side - - v99.99-pre-669 Update bukkit handler to inject names at startup - - v99.99-pre-668 Merge remote-tracking branch 'origin/master' - - v99.99-pre-667 Fix up optifine detection properly - - v99.99-pre-666 Update bukkit handler - - v99.99-pre-665 Slight reorganization of texture ticking - accomodate optifine - - v99.99-pre-664 Add in optifine visibility for the mod list. Will search for an "optifine_mod.info" file on the - class path if sp614x wants to add one to optifine. - - v99.99-pre-663 Fix ticking on bukkit server - - v99.99-pre-662 Fix ticking on the server - - v99.99-pre-661 Implement missing language load hook for server - - v99.99-pre-660 Tweaks to basemod setup - - v99.99-pre-659 Bukkitside fixup - - v99.99-pre-658 Merge branch 'bukkitreorg' - - v99.99-pre-657 Merge branch 'bukkit' - Conflicts: - common/cpw/mods/fml/common/IWorldGenerator.java - common/cpw/mods/fml/common/registry/FMLRegistry.java - common/cpw/mods/fml/common/registry/IMinecraftRegistry.java - common/net/minecraft/server/CommonRegistry.java - common/net/minecraft/server/IMinecraftRegistry.java - common/net/minecraft/src/CommonRegistry.java - common/net/minecraft/src/IMinecraftRegistry.java - - v99.99-pre-656 Fix copied code. Derpbag. - - v99.99-pre-655 Update FML with recent mainline changes - - v99.99-pre-654 Update bukkit with new mod fixes - - v99.99-pre-653 Damn you bukkit with your same names for different classes!!!! EntityPlayer->EntityHuman - - v99.99-pre-652 Fix chunk generators for bukkit - - v99.99-pre-651 Bukkit version - - v99.99-pre-650 Merge branch 'bukkit' - massive code reorganization for fml 2.0 - Conflicts: - common/cpw/mods/fml/common/IWorldGenerator.java - common/cpw/mods/fml/common/registry/FMLRegistry.java - common/cpw/mods/fml/common/registry/IMinecraftRegistry.java - common/net/minecraft/server/CommonRegistry.java - common/net/minecraft/server/IMinecraftRegistry.java - common/net/minecraft/src/CommonRegistry.java - common/net/minecraft/src/IMinecraftRegistry.java - - v99.99-pre-649 More tweaks for proper API - - v99.99-pre-648 Reorganize for bukkit integration - - v99.99-pre-647 Fix project, new gui layout with screenshot, thanks Sengir! - - v99.99-pre-646 Included fmlversion.properties in the release zips. - - v99.99-pre-645 Added FML ReadMe, Credits, and License to release zips - - v99.99-pre-644 Updated to FML Build 95 - - v99.99-pre-643 Updated patches for FML, moved some extranious code to Forge classes instead of patches. - - v99.99-pre-642 Updated MCP Mapings and patches. - - v99.99-pre-641 Added FML mod info file - - v99.99-pre-640 Add in missing hooks, add branding information to the crash report - - v99.99-pre-639 Cleaned up names for Minecraft Forge's text files so they dont clash with other mods. Fixed up the release script to include the license text, and executable permissions for install.sh. - - v99.99-pre-638 Added new source clean step to fix linux vs windows astyle issues. - - v99.99-pre-637 Update FML to 92, this include full client side support, ModLoader nolonger needed. - - v99.99-pre-636 Fixed regex issue in last push. - - v99.99-pre-635 Fixed up for newline before case bodies. - - v99.99-pre-634 Should fix windows {me} generating different patches then linux {cpw} - - v99.99-pre-633 Bump version number for official release. - - v99.99-pre-632 Move first tick to the real first tick - - v99.99-pre-631 Merge in the mod texture changes from Lex - - v99.99-pre-630 Fixed location refs to fmlversion.properties - - v99.99-pre-629 Add in a static render access class for optifine and other render editing mods to use - - v99.99-pre-628 Add in a "world load" tick fired just as the world completes loading. This SHOULD fix millinaire. - - v99.99-pre-627 Changing up the mod list data - - v99.99-pre-626 Fixed up ModTexture* classes to use the ITextureFX events to resize the image as needed. Also fixed ModTextureStatic's not being applied properly. - - v99.99-pre-625 Fix up two stupid overwrites in my mergeup from lex - - v99.99-pre-624 Fix derp in MTS - - v99.99-pre-623 Patch fixing - - v99.99-pre-622 Update some stuff for updated tweaks - - v99.99-pre-621 Update FMLClient with my changes - - v99.99-pre-620 my tweaks - - v99.99-pre-619 difflist should include server and client now. - - v99.99-pre-618 Some patch cleanup. - - v99.99-pre-617 Rewrote how HD Texture support worked, to make it easier for Optifine to integrate. - Fixed TextureFlamesFX for extramly large texture sizes. - Fixed the texture size sceme to allow for different sizes of textures in the same pack. - - v99.99-pre-616 Line number changed.. - - v99.99-pre-615 Fix up the watch - - v99.99-pre-614 And some tweaks to the texture handling - - v99.99-pre-613 Fix up some fubars in MTS and MTA - - v99.99-pre-612 Lots of error handling. - - v99.99-pre-611 Missed a patch *sigh* - - v99.99-pre-610 Add simple API to allow mods to let their textures be overriden by other mods - - v99.99-pre-609 Because, of course, I broke the first build... - - v99.99-pre-608 Some logging of texture overrides- also, only unregister if it's an actual ModTextureStatic, not if it's a subclass. - - v99.99-pre-607 Derpy exceptions derpy exception handling - - v99.99-pre-606 Remove the dependency in RenderEngine, decided on the simple API for texture FX - - v99.99-pre-605 Tweak the render patch- we won't fail if the updateTexture call fails - - v99.99-pre-604 Update patches: add in a setup for most of the texturefx classes - - v99.99-pre-603 Tweaking texture loading - - v99.99-pre-602 Fix tileSize -> iconTileSize. Stupid MCP - - v99.99-pre-601 Catch throwable (NoClassDefFoundError) and don't abort loading- it's probably a badly named class file. - - v99.99-pre-600 Fix some derpy - - v99.99-pre-599 Update patches for hd textures - - v99.99-pre-598 Change hd texture handling - - v99.99-pre-597 Refresh the renderengine patch- catch and log some texture pack reload errors - - v99.99-pre-596 More mod list fixes - - v99.99-pre-595 Lots of cleanup on the mod list, pretend we're the mcpatcher for mod HD detection. - - v99.99-pre-594 Fix up fubar in worldprovider. Add in obfuscation detection. Capture the exception that crashes minecraft in the log file. - - v99.99-pre-593 ModLoader worldtype hackery compatibility - - v99.99-pre-592 Fix derp - - v99.99-pre-591 Only log the warning once per texture - - v99.99-pre-590 push patches - - v99.99-pre-589 Fix millinaire support. Fix Portal eating rendering time. add in profile visibility for mod stuff. - - v99.99-pre-588 Fix the serverside. FUUUUUUUU! - - v99.99-pre-587 HD patching complete? Clean up mod info data, Dummy field for dummy mods - - v99.99-pre-586 Improving the scroll list, HD texture patches - - v99.99-pre-585 Actually pass in the mod name - - v99.99-pre-584 Fix up incorrect dependency handling - - v99.99-pre-583 Fix stupid problem with braces - - v99.99-pre-582 Tick only when there's a world - - v99.99-pre-581 Fix nulls in the mod list, start building the gui screen - - v99.99-pre-580 Gui related ticking - - v99.99-pre-579 Try always loading the language data - - v99.99-pre-578 Always load the "en_US" langpack into the translation table first, then the actual language. - - v99.99-pre-577 Derpy derp- fix stupid pointless cast - - v99.99-pre-576 Fix missing ml.sendpacket, call in renderers - - v99.99-pre-575 Actually mark the sprite as used when you allocate it! - - v99.99-pre-574 Helps to add the new hook! - - v99.99-pre-573 Hook texture pack changes and loads so we can register override textures - - v99.99-pre-572 Fix problem with nulls in getModList - Work on the meta information file - - v99.99-pre-571 More tweaks to stuff: mod list, branding, more hooks - - v99.99-pre-570 Tidying up and more hooks - - v99.99-pre-569 Tweak block rendering organization. Add in worldgen for client. - - v99.99-pre-568 Tidy up a lot of code- ModLoader and BaseMod are now almost identical client and server side - - v99.99-pre-567 Tweak ordering for sorting- should be a stable sort now - - v99.99-pre-566 Update git version capture - - v99.99-pre-565 Ignore jenkins tags - - v99.99-pre-564 Tweak some build stuff for versioning - - v99.99-pre-563 Update build to actually put Loader in... - - v99.99-pre-562 tweak location of build properties in src jar - - v99.99-pre-561 Lots of tweaks to mod output pretty printing. new versioning scheme. - - v99.99-pre-560 Inventroy rendering - - v99.99-pre-559 Fixed up the ModLoader render block hook, RP's blocks now render. - - v99.99-pre-558 Should fix colliding model ids with MC's internal IDs - - v99.99-pre-557 Fixes - - v99.99-pre-556 Fix up build script a bit, all modloader is public, and fix tile entity renderer - - v99.99-pre-555 Add in some more stuff for handling key bindings, rendering - - v99.99-pre-554 Reorganize ticking a bit - - v99.99-pre-553 Separate sprite handling, fix worldtype - - v99.99-pre-552 Working on the ticking stuff - - v99.99-pre-551 more client side hooks and Texture overrides/animations. - - v99.99-pre-550 Halfway through ticking- won't compile - - v99.99-pre-549 Fixed AudioMod compatibility with MultiMC style launchers. - - v99.99-pre-548 Bit masked the entity ID to change the range from -127-127 to 0-255 - - v99.99-pre-547 ModLoader moves forwards - - v99.99-pre-546 Let's get hooking! - - v99.99-pre-545 API is restored for client side. Implementation starting. - - v99.99-pre-544 And some patches for that - - v99.99-pre-543 The beginning - - v99.99-pre-542 Introduce the client side FML - - v99.99-pre-541 Implement addBiome, hopefully. Pushes biome list to the WorldType field. Sorry Bioxx. - - v99.99-pre-540 Check in some eclipse crapola. - - v99.99-pre-539 Updated MCP Mapings - - v99.99-pre-538 Added forge identifier to statistics collection. - - v99.99-pre-537 Fix for furnaces not smelting the final item in full stacks. - - v99.99-pre-536 Merge pull request #55 from CovertJaguar/patch-1 - Added getters for version vars. - - v99.99-pre-535 Fixed Levers droping off the backs of stairs client side. - - v99.99-pre-534 static final vars are inlined during the compile step, making the version variables useless at runtime. - - v99.99-pre-533 Fix copied code. Derpbag. - - v99.99-pre-532 Update FML with recent mainline changes - - v99.99-pre-531 Merge branch 'master' into bukkit - - v99.99-pre-530 New block hooks for creating custom beds. - - v99.99-pre-529 Merge pull request #54 from cpw/master - Update to fml 74- fix a problem with MLProp and primitives - - v99.99-pre-528 Update to FML 74: fixes an important issue with MLProp - - v99.99-pre-527 Fix a small issue with the build output script - Fix a significant issue with MLProp handling and primitives- they work now - - v99.99-pre-526 Bumped revision to 3 - - v99.99-pre-525 Fixed Vinella mob spawning bug that prevented mobs from spawning on the top most chunk. Added new Block function to determine if a Mob can naturally spawn on the block. Add new hook to allow for special case handeling on natural entity spawn. - - v99.99-pre-524 Fix for loading Minecart Entities in worlds that were last accessed before Forge was installed. - - v99.99-pre-523 Moved MLMP compatibility functions to ModCompatibilityClient, and fixed issue where no vehicles would be spawned. - - v99.99-pre-522 New ISoundHandler interface, useful for adding custom sounds and dealign with sound based events. - Includes basuic AudioMod compatibility. - - v99.99-pre-521 Fixed vinella bugs when trying to access chunk information with a y < 0 - - v99.99-pre-520 Added MLMP hook invocation for vehicle spawn and opening GUI's to provide compatibility for clients that have both ModLoaderMP and forge installed. - - v99.99-pre-519 Updated to FML build #73 - - v99.99-pre-518 More text fixup - - v99.99-pre-517 Typos - - v99.99-pre-516 Add in detection for MLMP and try to fail with a graceful message. - - v99.99-pre-515 Exposed TileEntityData packet to TileEntities. And added helper sender function. - - v99.99-pre-514 Added metadata sensitive Chunk constructor for Bioxx - - v99.99-pre-513 Added MinecraftApplet.clas to the force output list because users cant understand the concept of only replacing files they are told to. And bumped version to 3.1.2 - - v99.99-pre-512 Implemented a 'small' packet system for those mods that need to send rapid, small data packets and who are concered about the overhead of the 250 payload packet. It uses packet 131. - - v99.99-pre-511 Fixed shift-clicking issue with items that utilized the new ItemStack sensitive smelting system. - - v99.99-pre-510 Added generic packet sending function to MinecraftForge class. - - v99.99-pre-509 made the ID in PacketEntitySpawn unsigned. - - v99.99-pre-508 Update bukkit with new mod fixes - - v99.99-pre-507 Merge branch 'master', remote-tracking branch 'origin' into bukkit - - v99.99-pre-506 Tweak the loader a little bit to just use file names, not fully qualified directories when referring - to mods. - - v99.99-pre-505 Implemented RichardG's Paged Achivement list GUI modifications. - - v99.99-pre-504 Merge pull request #51 from ShetiPhian/patch-1 - Edits enable use of EntityPlayer.canHarvestBlock (for PlayerAPI) - - v99.99-pre-503 Respawning in dimensions should now properly set the dimension ID for the new player instance. - - v99.99-pre-502 MAX_ENTITY_RADIUS Now works on the Y axis - - v99.99-pre-501 Edits enable use of EntityPlayer.canHarvestBlock (for PlayerAPI) when the ToolClass has no rules for the block. - - v99.99-pre-500 Fix for vanilla crash for chunk generation with block ID's above 127. - - v99.99-pre-499 Damn you bukkit with your same names for different classes!!!! EntityPlayer->EntityHuman - - v99.99-pre-498 Fix chunk generators for bukkit - - v99.99-pre-497 Merge branch 'master' into bukkit - - v99.99-pre-496 Merge pull request #49 from cpw/master - Update to fml 68: fixes a ticking issue and soft vs hard dependencies - - v99.99-pre-495 Update fml to build 68: fixes a ticking issue and soft vs hard dependencies - - v99.99-pre-494 Changed entity Forge spawning code works to be more in line with normal spawning: - (World, double, double double) constructor is nolonger called, normal (World) constructor, and setPositionAndRotation is called afterwords. - yaw, pitch, and yawHead is sent (if the entity isn't a EntityLiving yawHead isn't used) - The datawatcher data is also sent like a normal Entity. - - v99.99-pre-493 Bukkit version - - v99.99-pre-492 Added variable entity radius to World, to be used if a mod make really large entities. - - v99.99-pre-491 Fixed bug in BlockFire's old fields. - - v99.99-pre-490 Fix "soft" dependencies so they can exist properly - - v99.99-pre-489 Fixed TileEntity bug that was causing Ghost tile entities. - - v99.99-pre-488 Multi-pass item rendering now uese proper render pass number. - - v99.99-pre-487 Added slope velocity hook for Covert - - v99.99-pre-486 Fixed bugs in the Dimension transfer code, Now displays proper join message, and respawning in dimensions other then 0 works. - - v99.99-pre-485 Try to fix jenkins build. - - v99.99-pre-484 Merge pull request #42 from CovertJaguar/patch-2 - Added a function for checking block harvest levels. - - v99.99-pre-483 Added a function for checking block harvest levels without having to resort to reflection. - - v99.99-pre-482 Fix server patch - - v99.99-pre-481 Merge in fixes from chickenbones for tick related problem - and straighten out variable naming in ModLoaderModContainer - - v99.99-pre-480 Added ItemStack sensitive burn time hook. - - v99.99-pre-479 Added new Item function to allow for multiple rendering passes. - Fixed a vinella bug where item layters would not line up for EntityItem's - Added new IItemRendere helper flag for 3d block translations. - - v99.99-pre-478 Rewrote IItemRenderer to be a more generic and expandable version, Breaks previous interfaces, but this should be the last time the interface changes. - Implemented the MapRender hook ChickenBones requested. - - v99.99-pre-477 Merge pull request #39 from cpw/master - Update to fml 62: adds in a couple of fixes - - v99.99-pre-476 Update FML for new hooks: onPlayerLogout and onPlayerDimensionChanged - - v99.99-pre-475 Push the patched file, as well - - v99.99-pre-474 Add in more "Player" related events. Fix up some MLProp stuff - - v99.99-pre-473 Fix regular expressions, thanks ChickenBones! - - v99.99-pre-472 Update fml to 62- provision a server console command and fix mod loading order - - v99.99-pre-471 Tweak Console handler patch so we're more friendly to forge - - v99.99-pre-470 A proper console command handler, also fix ordering of loaded mods - - v99.99-pre-469 Merge pull request #36 from cpw/master - Update to fml 58, separate the "register" and "announce to mods" phases of login - - v99.99-pre-468 Add in a console command handler so you can access the command console - - v99.99-pre-467 FML 59: don't send a zero length register packet, add mod channels - - v99.99-pre-466 Don't send a register unless I have channels. Add the channel to the mod channels list. - - v99.99-pre-465 Fix separated login/announce handler - - v99.99-pre-464 Split the packet salutation in two so we can work with or without forge - - v99.99-pre-463 Merge pull request #35 from cpw/master - Update to fml 57, fixes the fact FML wasn't calling it's onlogin hook - - v99.99-pre-462 Update to FML 57: fixes FML not calling it's login handler code - - v99.99-pre-461 Add the player object to the onLogin event so you don't need to dive internals for it during login - - v99.99-pre-460 Call my handleLogin hook from NetLoginHandler, tweak output in server gui and log file. - - v99.99-pre-459 Changed IGuiHandler's signature to be compatible with both sides. Took out ModLoaderMp reference in README. - - v99.99-pre-458 Couple of output fixups and added script to be executed by Jenkins during the build. First test build. - - v99.99-pre-457 Add server spawn protection config option as per someh4x0r's request. - - v99.99-pre-456 Implemented ISaveEventHandler as ChickenBones's requested. - - v99.99-pre-455 Updated patch for mapings - - v99.99-pre-454 Added ChickenBones's request ITextureLoadHandler hook - - v99.99-pre-453 Rewrote the login code to delay full login untill forge fnishes negotiating network IDs. Should fix entities not having proper ID mapings. - - v99.99-pre-452 Merge pull request #33 from cpw/master - FML tweaks and a fix to release.py - - v99.99-pre-451 Delete the old one too - - v99.99-pre-450 Add in recent fml with fixes - - v99.99-pre-449 Fix release script to import "inject_version" - - v99.99-pre-448 Fix subdirectory loading properly: mods will load inside eclipse.. - - v99.99-pre-447 Actually figure out the path for directory class loading - - v99.99-pre-446 regular expressions in java==fail - - v99.99-pre-445 Recurse into subdirectories found - - v99.99-pre-444 Try multiple "jar" sources- for eclipse testing - - v99.99-pre-443 it's addURL not addUrl dumbo - - v99.99-pre-442 it's getdeclaredmethod, dipstick - - v99.99-pre-441 Fix package private resolution of fields/methods from base minecraft by loading into minecraft's class loader not our own - - v99.99-pre-440 Add in a missing client side method to modloader stubbed for the server - - v99.99-pre-439 Update patches for FML fix. - - v99.99-pre-438 Add the hooks for crafting and smelting - - v99.99-pre-437 Finished up converting the source dist install scripts to python. Fixed a couple issues with the other scripts. - - v99.99-pre-436 Should load from whatever minecraft comes from now... - - v99.99-pre-435 Updated repo scripts to python, allowing more flexability and less code duplication. - - v99.99-pre-434 Fixed update_patches.py to now delete old patch files that have no working src relation - - v99.99-pre-433 Deleted patches - - v99.99-pre-432 Initial patch update to FML and MC 1.2.5 - - v99.99-pre-431 MCP Conf update for 1.2.5 - - v99.99-pre-430 Build should work now. Fix a stupid javadoc import. - - v99.99-pre-429 New build script- version the src dist as well - - v99.99-pre-428 Documentation: lots - Some eclipse workspace settings that might help? - - v99.99-pre-427 Handle the minecraft object registry better- now the client compiles too - Also a quickie astyle run over the code.. - - v99.99-pre-426 Update the patches and fix the shell script - - v99.99-pre-425 Reorganize the code a little bit- move some stuff that was on FMLHandler to the common handler. Add a delegate - into the common handler that delegates to the right sided handler - - v99.99-pre-424 Clean up extraneous print statements from the build - - v99.99-pre-423 Fix INSTALL-fml.txt file location in the server zip - - v99.99-pre-422 Append a .class to the diff file list. Now you should just be able to iterate it and read every file in it directly. - - v99.99-pre-421 Run Astyle over the FML code. Happy lex? - - v99.99-pre-420 OK. Now the script works - - v99.99-pre-419 Crap at writing good python apparently - - v99.99-pre-418 Tweak file list script to print obf names - - v99.99-pre-417 Merge remote-tracking branch 'origin/master' - - v99.99-pre-416 Rebuilt patches with new scripts. - - v99.99-pre-415 Cleaned up update_patches to fix a few bugs. Updated applypatches to normalize the patch file's line endings to make them work cross platform. Added download_firnflower and setup script. As well as added the GnuWin32's diff binary, so windows can create patches as well. http://gnuwin32.sourceforge.net/ - - v99.99-pre-414 Created eclipse workspace, should allow simple and quick access to working on FML - - v99.99-pre-413 Missed a couple of wording tweaks - - v99.99-pre-412 Tweak the build a bit, add some more data and generate the - touched file list for forge - - v99.99-pre-411 Tidy up some of the installation media - - v99.99-pre-410 links to implementation - - v99.99-pre-409 Channel validation - - v99.99-pre-408 NetworkHandler doesn't care about channel ownership - - v99.99-pre-407 Update patches for network handler - - v99.99-pre-406 Modloader complete - - v99.99-pre-405 Generic container - - v99.99-pre-404 Config dir handling - - v99.99-pre-403 MLProp - - v99.99-pre-402 Mod sorting - - v99.99-pre-401 Everything except ordering - - v99.99-pre-400 Fix build script for generating md5s - - v99.99-pre-399 Update to 1.2.5 and hopefully forge compatibility - - v99.99-pre-398 Implemented a chat event handler system to allow for manipulating and handeling the various chat/command events. - - v99.99-pre-397 Add IChunkLoadHandler.canEntityUpdate() function to allow entities to update while in custom loaded chunks. - - v99.99-pre-396 Some cleanups to update_patches, should run properly on any system now. - - v99.99-pre-395 Fix some shadowing warnings. - - v99.99-pre-394 Forge support - - v99.99-pre-393 Initial attempts to support forge stuff - - v99.99-pre-392 Fix NPE - - v99.99-pre-391 More logging and maybe fix default package mods - - v99.99-pre-390 Logging fun. Whee! - - v99.99-pre-389 Fail - - v99.99-pre-388 More logging - - v99.99-pre-387 Tweak class loader - - v99.99-pre-386 Add more patches - - v99.99-pre-385 Some implementation - - v99.99-pre-384 tweak MC server hook - - v99.99-pre-383 some build and logging tweaks - - v99.99-pre-382 Fix build - - v99.99-pre-381 Fix derpy - - v99.99-pre-380 Tweak loader a bit - - v99.99-pre-379 Fix patching - - v99.99-pre-378 More build stuff - - v99.99-pre-377 More building fun - - v99.99-pre-376 fix build script - - v99.99-pre-375 Add in more ignore stuff and a sample "fmlbuild.properties" file - - v99.99-pre-374 More build stuff, adding in readme etc copied from forge - - v99.99-pre-373 Move more stuff around - - v99.99-pre-372 Build system - - v99.99-pre-371 Start patching fun - - v99.99-pre-370 Ignore stuff - - v99.99-pre-369 We're Forge Mod Loader, not Forge ModLoader - - v99.99-pre-368 Tweak license to refer to github - - v99.99-pre-367 Add licenses reorganize code - - v99.99-pre-366 Starting to get somewhere - - v99.99-pre-365 Thoughts on how to do the modloading properly - - v99.99-pre-364 Tab cleanup - - v99.99-pre-363 Initial commit - - v99.99-pre-362 Fixed camelcasing in IConnectionHandler, ment to do during first upgrade. - - v99.99-pre-361 Changed update_patches script to use python for the bulk, Prevents making 1800 temporary useless files. - - v99.99-pre-360 Fixed typo bug in MinecraftForge.getEntityTrackerInfo - - v99.99-pre-359 Updated to MC: 1.2.4 MLMP: 1.2.4 v1 - Removed all code that was marked as deprecated, IE: ICustomItemRenderer, and the functions in Configuration - - v99.99-pre-358 Reworked EntityPlayerMP.openGui to hopefully be more compatible with PlayerAPI - - v99.99-pre-357 Cleanup the EffectRenderer patches, Allows custom food items to have the proper particals. Cleaned up special case class in favor of basic java generics. - - v99.99-pre-356 Added rider sit pull request. - - v99.99-pre-355 Fixed a couple of bugs in the Configuration categories pull request. - Added helper functions to Property for standard int/boolean usage. - - v99.99-pre-354 Merge pull request #22 from CovertJaguar/patch-5 - Added the ability to define custom categories for config files. - - v99.99-pre-353 Updated MCP mapings - - v99.99-pre-352 Removed createCategory() function and changed it to create categories as they are encountered. - - v99.99-pre-351 Added the ability to define custom categories for config files. - - v99.99-pre-350 Added MinecraftForge.isClient() function that returns true if you are in the Minecraft Client, (As defined as net.minecraft.client.Minecraft existing) false otherwise. - Fixed a typo on PacketEntitySpawn that caused speed to be assigned improperly. - A little code cleanup. - - v99.99-pre-349 Implemented Pheenixm pull request allowing for more control over the camera. - - v99.99-pre-348 Changed logic in Configuration to allow for extended block ID mods easier access to change that. Just use reflection to change Configuration.configBlocks to whatever length you want. - - v99.99-pre-347 Fixed NPE on CustomPayload packets with 0 data - - v99.99-pre-346 Fixed a few typos that CovertJaguire found in The Forge entity handeling code. And re-wrote the connection sequance so that clients get a list of mod ids before anything else. - - v99.99-pre-345 Readded the deprecated interface ICustomItemRenderer. Added method to enforce deprecation cross Minecraft versions. - - v99.99-pre-344 Bumped version number to 1.4.1 - - v99.99-pre-343 Merge pull request #15 from newthead/master - Improved Custom Item Render Interface - - v99.99-pre-342 Merge pull request #16 from CovertJaguar/patch-3 - Fix for network code. - - v99.99-pre-341 Fixed dyes showing twice in creative list - - v99.99-pre-340 Reverted vanilla texture binding to an explicit if() statement based on item ID - - v99.99-pre-339 Changed render hook checks to all use ItemStack instead of itemID - - v99.99-pre-338 Fixed tile entities not properly being removed for blocks that do not extend BlockContainer, or override BlockContainer.onBlockRemoval - - v99.99-pre-337 Fix for network code. - - v99.99-pre-336 Fixed a class to a deprecated method to fix tool effectiveness. - - v99.99-pre-335 Fixed excessive need for user interaction in the install script. - - v99.99-pre-334 Merged item rendering interfaces into a single IItemRenderer - - v99.99-pre-333 Fixed IOException not found error in CovertJaguires pull request. Updated scripts so that build should now be fixed - - v99.99-pre-332 Reworked the workspace scripts so the build should fail on compile errors. This build should fail as a test. - - v99.99-pre-331 Modified patches to use new item render hooks - - v99.99-pre-330 Updated render hooks and registration to use the IItemRenderer interface - - v99.99-pre-329 Merged item rendering interfaces into a single IItemRenderer - - v99.99-pre-328 Merge pull request #14 from CovertJaguar/patch-2 - Added throws clause to ISpawnHandler functions... - - v99.99-pre-327 Fixed onTakenFromCrafting hooks to be called once per stack taken. Sadly due to how shift-click is handled, the passed in item stack is not garenteed to be the stack that the result was added to. - - v99.99-pre-326 Added additional flag for rendering entity item bobbing - - v99.99-pre-325 Cleanup/fix item render hooks - - v99.99-pre-324 Added render code for inventory items and entity items. - - v99.99-pre-323 Added remaining item render hooks, and fixed a static method access - - v99.99-pre-322 Clarified render option for inventory items - - v99.99-pre-321 Added hook for rendering equipped items - - v99.99-pre-320 Added new item render interfaces to Forge client - - v99.99-pre-319 Added throws clause to ISpawnHandler functions to keep the functions consistent with similar functions and increase ease of use. Exceptions are already being caught everywhere these functions are called, so no further changes required. - - v99.99-pre-318 Made BlockStairs, BlockFarmland, and BlockStep have proper sided-solidity. Can now place torches on any solid side of those blocks. - - v99.99-pre-317 Proper fix for SDK's invalid bit shifts of parameters for chunk population - - v99.99-pre-316 Fixed type on patch conversion messing up tile entities - - v99.99-pre-315 Fixed sides of grass not getting biome colors - - v99.99-pre-314 New EntityInteract hook for handeling player vs entity interaction on the global level vs the item level. - - v99.99-pre-313 Fixed forgotten type identifier in clean_src - - v99.99-pre-312 Merge pull request #12 from cpw/fixworldgen - Fix worldgen doubleshifting in ModLoaderMP until SDK fixes it. - - v99.99-pre-311 Fix worldgen doubleshifting in ModLoaderMP until SDK fixes it. - This means mods can generate surface and nether in SMP again. - - v99.99-pre-310 New script to fix decompile differences between windows and linux/osx. - Removed the MLProp special case, no longer needed as MLProp decompiles fine. - Updated patches to work on all systems. - Added warning and exit if the user does not say yes to the cleanup. - - v99.99-pre-309 Fixed a merge error. - - v99.99-pre-308 MCP Update. Fixed a few small bugs in the linux scripts. - - v99.99-pre-307 Custom dimensions should now honor the canRespawnHere function for respawning. - - v99.99-pre-306 Fixed a wrong argument for dimensions, should fix entity tracking. - - v99.99-pre-305 Fixed the inverted logic in the missing mod check. - - v99.99-pre-304 Fix up Configuration ids to only work for 256 ids until Jeb finishes the 4096 conversion. - - v99.99-pre-303 Merge remote-tracking branch 'origin/master' - - v99.99-pre-302 Fixed a bug where vines were not shearable. - - v99.99-pre-301 Merge pull request #11 from CovertJaguar/patch-1 - Fixed a minor bug with the Minecart Dictionary. - - v99.99-pre-300 Fixed a minor bug with the Minecart Dictionary. - - v99.99-pre-299 1.4.0 official release. - - v99.99-pre-298 Updated to MLMPv3 - - v99.99-pre-297 Implemented ChickenBone's Chunk handler - - v99.99-pre-296 Hack-fix for players getting stuck during logins. Detailed fix when bug is actually tracked down. - - v99.99-pre-295 Updated to latest MCP - - v99.99-pre-294 Fixed client side bonemeal on grass only making flowers - - v99.99-pre-293 Removed improper tile entity negation - - v99.99-pre-292 Fixed a generic tile entity line i missed on the server side. - - v99.99-pre-291 Fixed MLMP thinking Network mods need a client side when they dont. - - v99.99-pre-290 Updated to SDK MLMP v2 - - v99.99-pre-289 Fixed missing double array in MLMP's packet server side. Also, fixed the creative code again, brain failed. - - v99.99-pre-288 Updated to SDK's 1.2.3 MLMP, Mush cleaner, no longer supporting Flan's. - - v99.99-pre-287 Got my comparitor turned around - - v99.99-pre-286 Updated gitignore, fixed digging particles, fixed creative container showing to many blocks, fixed wrong argument for custom renderers. - - v99.99-pre-285 ItemBlock now implements ITextureProvider so that blocks with custom textures will showup properly when being held. - - v99.99-pre-284 Updated MCP's patch files. Fixes hangs on running MC as applet. - - v99.99-pre-283 Cleanup of ModLoaderMP and proper update to the latest version of ModLoader - - v99.99-pre-282 Fixed directory issues in the setup script - - v99.99-pre-281 Fixed NPE in the login handler - - v99.99-pre-280 Updated MCP mapings files - - v99.99-pre-279 No longer mark forge packets as chunk packets. - - v99.99-pre-278 Fixed missing space in linux scripts - - v99.99-pre-277 Updated for MLMP 1.2.3 v1 - - v99.99-pre-276 Made the scripts forge updating md5s/mcp/names - - v99.99-pre-275 Missed damageCarryover on the server - - v99.99-pre-274 Small imports cleanup - - v99.99-pre-273 First push of server side patch updates for 1.2.3. MLMP is still not updated so it does not include those changes, and will not compile. - - v99.99-pre-272 Deleted unneeded server side patches, Packet250 bug was fixed. And the others got moved to AnvilSaveHandler - - v99.99-pre-271 Couple of things I missed client side - - v99.99-pre-270 Bit of a cleanup of the client patches - - v99.99-pre-269 Client side initial patch update to Fernflower and MC 1.2.3 - - v99.99-pre-268 No longer needed, bug was fixed - - v99.99-pre-267 Same patch diff, files. - - v99.99-pre-266 Conf for 1.2.3 - - v99.99-pre-265 Deleted EntityPigZombie patches, Who needed these? Why could you not do this via reflection? - - v99.99-pre-264 removed unneeded import, and fixed casing of args in IShearable - - v99.99-pre-263 Fixed unneeded imports in ForgePacket - - v99.99-pre-262 Made mod_MinecraftForge extend NetworkMod, and changed NetworkMod to extend BaseModMP server side. - - v99.99-pre-261 Updated The Json enum helper to point to the new packaged names. And fixed a casing change in ModLoader - - v99.99-pre-260 Updated eclipse project for MCP 1.2.3's inclusion of the Start folder in the src folder. - - v99.99-pre-259 Deleted modLoaderMP.patch, unneeded now that we use Fernflower - - v99.99-pre-258 Updated scripts so that we use Fernflower now. Added a small python script to download fernflower for the user. And the scripts exit out if it fails. - - v99.99-pre-257 Bumped version to 1.3.4, final commit for Minecraft v1.1 - - v99.99-pre-256 Fixed bug in build script that caused the Minecraft/MinecraftServer classes to not be included. - - v99.99-pre-255 Client side of the new Dimension support. - - v99.99-pre-254 Fixed compile error for the spelling pull request. - - v99.99-pre-253 Fixed ITextureprovider for multi-textured items when rendering on the GUI. - - v99.99-pre-252 Merge pull request #4 from Deveducer/master - Fix spelling error - - v99.99-pre-251 Fixed spelling mistake ('Frequancy') - - v99.99-pre-250 Merge commit - - v99.99-pre-249 Ran AStyle over forge code for uniform code formatting, and refactored old code a bit to have cleaner names. - - v99.99-pre-248 Deleted Deprecated interfaces. - - v99.99-pre-247 Fixed line endings in windows update_patches - - v99.99-pre-246 Fixed up Shearable blocks to play nicer with sub-classes. - - v99.99-pre-245 Merge pull request #3 from Deveducer/patch-1 - People may think the server needs the mods to continue and not the clien... - - v99.99-pre-244 People may think the server needs the mods to continue and not the client. - - v99.99-pre-243 Fixed a bug in update_patches that caused apostrphies to be removed. Causing the last patch to be generated incorrectly. - - v99.99-pre-242 Initial attempt at server side extra dimensions support. - Mods must register there dimensions on load, by calling DimensionManager.registerDimension(uniqueID, WorldProvier, boolean) - Mods are resposible for writing there own transporter blocks. - Initial commit, needs some more testing and design thoughts. - - v99.99-pre-241 Implemented a response to Methuselah96's Arrow hook request. See IArrowNockHandler and IArrowLooseHandler - - v99.99-pre-240 Added new Item.getIconIndex context sensitive version. - - v99.99-pre-239 Moved Client side EntityPlayer.openGui work code to EntityPlayer for compatibility between player API. - - v99.99-pre-238 Introduced some debugging info into Forge packets. And a debug flag in the client and server packet handlers. - - v99.99-pre-237 Marked forge packets as 'chunk' packets. Giving them a higher priority making the initial mod list check more reliable. - - v99.99-pre-236 Changed the layout of the missing mods gui a little. Still needs a lot of work to look good. - - v99.99-pre-235 Fixed linux scripts, fixed TE bug. - - v99.99-pre-234 Merge branch 'master' of github.com:MinecraftForge/MinecraftForge - - v99.99-pre-233 Linux scripts fixed, TE bug fix. - - v99.99-pre-232 Implemented a generic EntityPlayer.openGui system, and the network backend for it to work on server and client. - - v99.99-pre-231 Expanded the Mod check to test for missing mods and display a GUI screen for the client if it is missing any. - The client now downloads NetworkMod ID's from the server upon connecting. - - v99.99-pre-230 Introuduced NetworkMod, a BaseMod extension and replacement for BaseModMP. All mods that are designed to work in the server environment should extend this. - NetworkMods will be assigned unique ModIDs by the server, and those IDs will be sent to the client upon connection. - Refactored Forge packets to the net.minecraft.src.forge.packets package. And introduced the base ForgePacket class. - Added initial ModList request/response. - - v99.99-pre-229 Exposed getters for NetServerHandler.playerEntity and NetworkManager.netHandler - - v99.99-pre-228 Fixed up the install scripts. The linux script no longer needs sed. Should fix some issues on OSX's without gsed. - Also forge sources will only be copied to sides that were downloaded. - Also, install scripts now prompt for input to cleanup. - - v99.99-pre-227 Split mod_MinecraftForge so that Clients arnt required to have MLMP installed if they don't use a MP mod. - - v99.99-pre-226 Bumped version to 1.3.3 - - v99.99-pre-225 Small update to update_patches.bat, to skip patch reject files. - - v99.99-pre-224 Update MCP Mapings - - v99.99-pre-223 Refactored so that ISpecialArmor items do not see the factor of 25 on the damage. - The value returned form ISpecialArmor.getProperties is now copied, so mod items are free to re-use there return values. - - v99.99-pre-222 Reworked ISpecialArmor to provide better functionality as requested by IC2 devs. - Armor can now be prioritized over other armor. - It can deal with damaging it's own itemstacks. - Also impkemented the ISpecialArmor.getArmorDisplay - - v99.99-pre-221 Implimented a new IShearable system. This allows mods to create both new shear-like items/blocks. As well as new Entities/Blocks that work with other mod's shear-like items. - - v99.99-pre-220 Implemented item.onBlockStartBreak call for creative single player. - - v99.99-pre-219 Added Item.onLeftClickEntity hook. Used to intercept and cancel the 'attack' action within items. - - v99.99-pre-218 Fixed ITextureProvider support for items that have multiple colored overlays. - - v99.99-pre-217 Lowered the amount of build log spam, and fixed the inject_version script for use on other systems. - - v99.99-pre-216 Missed a caluse, ISpecialArmor should work as intended now. And not destroy Armor instanatly. - - v99.99-pre-215 Implmented Sengir's IPickupHandler. - http://www.mod-buildcraft.com/forums/topic/hook-intercept-item-pickups-by-player-entities/?view=all - - v99.99-pre-214 Merged in the change to ISpecialArmor to introduce the DamageSource argument. - As well as the concept of damage absorption vs reduction. - - v99.99-pre-213 Created a Entity tracking ans spawning system. - Mod creators should call MinecraftForge.registerEntity to register a entity. - All entity ID numbers are Mod Unique. Meaning two mods can have Entity #1. - Added client and server side packet handlers for the 'Forge' channel. For use in internal packets such as the new Spawn packet. - Updated the build scripts to copy over unique server source files now that there actually are some. - For modders: - If you have a entity that used MLMP's 'owner' system, you should have your entity implement IThrowableEntity - If you have a entity that implments MLMLP's ISpawnable, you should implement ISpawnHandler. - They provide the same functionality, just in a cleaner, more orginized way and will be the method used when we eventually drop MLMP. - - v99.99-pre-212 Fixed return value for un/registerChannel. Now returns properly indicate when un/register commands should be sent. - - v99.99-pre-211 Setup .gitignore for eclipse bin dirs. - Fixed line endings in install.sh - Added mod_MinecraftForge for simpler logging of minecraft version in crash reports - Added new hooks for connection events, See IConnectionHandler for more details. - Added Packet250CustomPayload handeling and channel registraction management, see MessageManager and IPacketHandler for more details. - Forge now uses unsed fields in C->S Packet1Login to identify itself. None Forge clients will get a graceful disconnect message instead of the 'Unknown packet 230' - - v99.99-pre-210 First official commit for GitHub. Using to test build automation system firing from final configuration. - - v99.99-pre-209 New parameter for setup script to skip the initial decompile. Used in the build system to speed things up. - - v99.99-pre-208 bumbed version number - - v99.99-pre-207 Potions are not armor. - - v99.99-pre-206 Reorganized SpecialArmor code to work properly. - - v99.99-pre-205 Some typo fixes - - v99.99-pre-204 Updated for MCP Mappings - - v99.99-pre-203 Streamlined the Setup, Build and Package scripts: - On windows they no longer need the user to press enter every step - Moved version info out to version.txt, This will only effect the svn. If you update the version do it in version.txt not in ForgeHooks.java. - Introduced the build number into the version string. - Cleaned up some extra echos in scripts. - - v99.99-pre-202 Reach and Rail bugfix - - v99.99-pre-201 bumped version number - - v99.99-pre-200 Install.cmd now tries to add the system folder to the current path. - - v99.99-pre-199 Disabled updatenames int he isntall scripts till MCP fixes the reobf issue. - Updated to MLMP 1.1v2, Which says it fixes bugs it doesn't But it does fix the packet bug. - Fixed a bug in Packet 250. - - v99.99-pre-198 Updated MCP mappings - - v99.99-pre-197 Fixed the Minecart Drop bug - - v99.99-pre-196 Fixed a bug that caused snowballs to drop incorrectly. - - v99.99-pre-195 Small update to ContainerCreative hook for better compatibility with mods that extend block IDs. - - v99.99-pre-194 Fixed getCartClassForItem and getCartTypeForItem - - v99.99-pre-193 Bug Fix for Chests staying open on MP Servers - Implemented reach distance variable - - v99.99-pre-192 Fixed a few accessors I missed: - Server RailLogic.getNAdjacentTracks public - Server TileEntityFurnace.getItemBurnTime static - New GUIControls change, Made it into a scroll panel instead of a static position window. - This just makes things look better when multiple mods with KeyBindings are installed - - v99.99-pre-191 Fixed a mapping issue with client side TileEntityFurnace patch - - v99.99-pre-190 added missing files - - v99.99-pre-189 removed files from previous version - - v99.99-pre-188 bumped version number - - v99.99-pre-187 merged with 1.1 branch - - v99.99-pre-186 Bumped version number - Added initialization to ModLoader's log - - v99.99-pre-185 Fixed an unroll from the MCL merge. Updated MCP mappings. - - v99.99-pre-184 Fixed NPE on some JVM's - - v99.99-pre-183 Merged in MCL branch - - v99.99-pre-182 Improved the ladder hook. Added a new hook for sustained-use items. - - v99.99-pre-181 Fixed MCP mappings again. Fixed the Entity NBT code. - Added a new hook to support custom enchantments. - - v99.99-pre-180 Updated MCP Mappings. - - v99.99-pre-179 Fixed faces for BlockFire - - v99.99-pre-178 Refactored a bit of the TileEntity code so that ANY block may now have a tile entity. - This is to allow modders the ability to extend blocks other then BlockContainer, and still be able to have a TileEntity. - Also added a NBTTagCompound to the base EntityClass, this allows any entity to be given arbitrary data that will persist across world saves. - This data is NOT sent over the wire in a MP situation, to have data sent over the wire automatically use the built in data watcher. - - v99.99-pre-177 bumbed version number - - v99.99-pre-176 Changed Block.setBurnRate to public and Block.setBurnProperties - Re-added bounce functions to BlockFire for non-forge mods. - Should fix Optifine compatibility. - - v99.99-pre-175 Fixed a re-name that somehow missed the commit. - Serverside chanceToEncourageFire -> getFireSpreadSpeed - - v99.99-pre-174 Fixed some rendering issues. - - v99.99-pre-173 Another mapping update. - - v99.99-pre-172 Updated mapping for last commit - - v99.99-pre-171 Mapping updates. - - v99.99-pre-170 Re-added BlockFire's properties, apparently some people access this by reflection. - - v99.99-pre-169 Bumping the version number. - - v99.99-pre-168 Fixed some strange behavior in snow blocks. Fixed a missing patch checkin. - - v99.99-pre-167 A minimalistic hook for rendering world effect overlays or other 3D overlay - data. - - v99.99-pre-166 Major rework of the rendering core. Added support for custom render context - handling. - - v99.99-pre-165 Added Item.onDroppedByPlayer hook - - v99.99-pre-164 Deprecated IUseItemFirst, and made onUseItemFirst work in Creative. - - v99.99-pre-163 Added server side prototypes for addCreativeItems()s They are unused, but declared for compiling compatibility. - - v99.99-pre-162 Added hooks to BlockFire for setting block flame interaction properties. - - v99.99-pre-161 Replaced dropBlockAsItemWithChance in BlockNetherStalk with getBlockDropped. - - v99.99-pre-160 Fixed a minor crop fortune bug. - - v99.99-pre-159 Commit of a hook for adding items into world dungeon generation. - Uses a weighted random selection scheme. - Also a hook for adding custom mobs to the dungeon generation list. - - v99.99-pre-158 Updated mappings - - v99.99-pre-157 Implemented ISidedInventory for Brewing Stands. - Top is input, 1 slot - All other sides are output, 3 slots. - - v99.99-pre-156 Added missing native library path to forge_client project. - Added harvest levels/effectiveness for Axes and Shovels. - - v99.99-pre-155 Fixed a zLevel bug with custom item renderers. - - v99.99-pre-154 bumped version numbers - - v99.99-pre-153 Fixed seeds/wheat not dropping from Crops/TallGrass. - All future Forge code should use proper annotations when Overriding. - - v99.99-pre-152 Small fix to decrease the number of glBindTexture calls that are immediately overridden. - - v99.99-pre-151 The install scripts will now only patch the client/server if they are there. - This allows for people to only worry about getting one side setup correctly if they don't care about the other. - - v99.99-pre-150 Fixed a infinite recursion loop in spacetoad's commit to Block.java.patch - Added @Deprecated annotations to the 'backwards compatible' functions spacetoad re-added. - Made changes to the install scripts: - -Will overwrite the current MCP mappings and use the ones that ship with forge, this - should eliminate all the issues of people not being able to install it because they updated there mcp.cfg - -Will now move fernflower.jar if it is found, so that MCP will not decompile using it. - Should fix the issues of people trying to use forge with fernflower installed. - -Will call updatemcp/updatenames so that users get the latest mappings for unmapped items. - -Also calls updatemd5s so that the forge API is skipped when spitting out reobfusicated files. - Update the readme to be more accurate. - Added my name to the credits :P - Updated the update_patches/package scripts to account for grabbing the conf folder. - Added GnuWin32's grep - - v99.99-pre-149 bumped version number - - v99.99-pre-148 further backward compatibility fixes - - v99.99-pre-147 Added my EnumHelper classes, this allows for dynamic creation of Enum values at runtime. - See My post for a example: - http://www.minecraftforum.net/topic/514000-api-minecraft-forge/page__view__findpost__p__10948540 - - v99.99-pre-146 Missed some mappings - - v99.99-pre-145 For for updated mappings. - - v99.99-pre-144 added server side of the previous commit - - v99.99-pre-143 fixed backwards compatibility - - v99.99-pre-142 Fixed fortune enchant. - This breaks forge's quantityDropped signature, be careful when updating mods. - - v99.99-pre-141 Cleaned up a few things related to MLProp - Deleted unmaintained fernflower patch. - - v99.99-pre-140 Added a hoe handler for advanced farming. - - v99.99-pre-139 Added new tool harvest intercept hook. Removed mlprop.patch. - - v99.99-pre-138 Moved dye creative adds to the ItemDye class. - - v99.99-pre-137 Creative Container population hook. - - v99.99-pre-136 Fixed missing CraftingManager patches for the repair disable hook. - Fixed smp mlprop. - - v99.99-pre-135 Added MLprop.java that ST forgot when he merged. - Fixed EntityPlayer.getPlayerStrVsBlock metadata function for 1.0.0 changes in Enchantments/Potions. - - v99.99-pre-134 bumped version number - - v99.99-pre-133 merged with pre-1.9p5 branch, for 1.0.0 release - - v99.99-pre-132 fixed mapping - - v99.99-pre-131 New block destruction hook. Deprecated IOverrideReplace. - - v99.99-pre-130 Updated MCP mapping, backed out a useless patch. - - v99.99-pre-129 Added some IC2 items. - - v99.99-pre-128 Changed a field permission for MFR. - - v99.99-pre-127 Small TileEntity fix. - - v99.99-pre-126 Added a few more known ingots. - - v99.99-pre-125 Bugfix for numeric range of mob and window IDs. - - v99.99-pre-124 Fixed TileEntity caching. - - v99.99-pre-123 Patch for a small activation glitch in doors. - - v99.99-pre-122 MCP update. - Fixed a problem with TileEntity sending. - - v99.99-pre-121 Rolled in a critical MLMP fix, because MLMP is virtually unmaintained. - - v99.99-pre-120 Added ore dictionary. - - v99.99-pre-119 Fix for new MCP mappings. - Fixed the distribution of flowers with bonemeal. - Fixed accidentally making obsidian easy to mine. - - v99.99-pre-118 Fixed line endings in install.sh - - v99.99-pre-117 Updated the package.sh script to include the patches, the new install.sh, and modLoaderMP/mlprop.patch - - v99.99-pre-116 Changed the windows setup to use del instead of remove. - Both update patches scripts no longer remove svn entries. - Added the forge_client\bin and forge_server\bin folders to the svn ignore. - - v99.99-pre-115 bumbed forge minor version - - v99.99-pre-114 reactivated special armor code - - v99.99-pre-113 Made the windows setup script a bit more robust, also made both scripts filter out non-patch files. {Issue with svn files} - - v99.99-pre-112 Fixed a bug in forge_client project that had a hard link to E:/MCP/jars/bin/paul.jar now points to MCP/jars/bin/minecraft.jar {has the same paulsound libraries} - Major refactoring of the patches, now each modified file gets its own patch file. - Rewrote all the scripts to use new multi-patch system. - Added linux install.sh using new system. - Added some required libraries from GNUWin32 for the windows side of the new setup.bat/update_patches.bat http://gnuwin32.sourceforge.net/ - - v99.99-pre-111 Changed a field permission. - - v99.99-pre-110 Fixed another TileEntity bug. - - v99.99-pre-109 ISidedInventory is now explicitely an inventory - - v99.99-pre-108 Fixed the MCP mappings. - - v99.99-pre-107 - Added an ItemStack parameter to IArmorTextureProvider - - Added ISidedInventory - - Added IBonemealHandler - - Added hooks in grow-on-grass and in break tall grass. - - Fixed furnace output of multiple items. - - Added getBlockDropped(). - - Bumped version number to 1.1.1. - - v99.99-pre-106 Hopefully fixed the major TileEntity bugs. - - v99.99-pre-105 Fixed TileEntities, bumped version number. - - v99.99-pre-104 Fixed digging particles. - - v99.99-pre-103 Added a fix for onItemUse regression. - - v99.99-pre-102 More MCP mapping fixes. - - v99.99-pre-101 Undid that. Whoops. - - v99.99-pre-100 Code to remove a single block effectiveness. - - v99.99-pre-99 Metadata-sensitive quantity dropped. - - v99.99-pre-98 Fixed up a few bugs in the tool path. - - v99.99-pre-97 Fixed another bug in the furnace patch. Works now. - - v99.99-pre-96 Small bugfix for furnace patch. - - v99.99-pre-95 Metadata-sensitive smelting patch. - - v99.99-pre-94 Fixes for MCP updates. - - v99.99-pre-93 Fixed the 1.8.1 version for MLMP support. - - v99.99-pre-92 A bunch of little patches to make it actually build for 1.8.1. - - v99.99-pre-91 First attempt at a 1.8.1 version. May not work. - - v99.99-pre-90 Unrolled a mistaken fix. - - v99.99-pre-89 Another try for osx. - - v99.99-pre-88 A small fix to hopefully make the script work on a mac. - - v99.99-pre-87 Redesigned TileEntity handling. - - v99.99-pre-86 fixed SMP bug related to BuildCraft issue #226 - - v99.99-pre-85 A few small patches to fix obscure piston rendering bugs. - - v99.99-pre-84 Optifine compatibility patch. - - v99.99-pre-83 updated to latest MCP, and added custom item rendering facilities - - v99.99-pre-82 Improved trapdoor hook. - - v99.99-pre-81 New lighting hook. - - v99.99-pre-80 Fixed new MCP mappings. - - v99.99-pre-79 bumped forge version # to 1.0.6 - - v99.99-pre-78 added ArmorProperties constructors, remove deprecated subprograms (supposedly not used by anyone) - - v99.99-pre-77 fixed headers, implemented new armor computation for IC2 - - v99.99-pre-76 Fixed the permissions on a couple fields in ItemTool. - - v99.99-pre-75 temporary reverted to r61 - - v99.99-pre-74 updated credits - - v99.99-pre-73 Patched the installer again. - - v99.99-pre-72 Fixed a typo. - - v99.99-pre-71 Small RedPower-specific patch. - - v99.99-pre-70 Added armor texture hook. - - v99.99-pre-69 New install script for Windows. - - v99.99-pre-68 Fixed the version number. - - v99.99-pre-67 Changed some field permissions. - - v99.99-pre-66 Handler for custom block highlight. - - v99.99-pre-65 Version control logic, improved the destroy handling hook. - - v99.99-pre-64 Improved BTW compatibility. - Finished the placement hook changes. - Added a sleep handler. - Added a current item destroyed handler. - - v99.99-pre-63 Checking in the new crafting hook. - - v99.99-pre-62 Added a little support for two-pass rendering. - - v99.99-pre-61 Forgot the forge hooks. - - v99.99-pre-60 Updates: - - Added warning message for non-preloaded textures. - - Documentation - - Ladder fix for SMP. - - Obsoleted IBlockSecondaryProperties - - Added hooks for place-by-side. - - Fixed texture 3 and piston texture bug. - - Added new tool system. - - v99.99-pre-59 Added patches for decompiled by fernflower source. Client only, and not tested enough. Using is currently not recommended. - - v99.99-pre-58 Uploaded new install file. - - v99.99-pre-57 Fixed for the new version of MCP. - - v99.99-pre-56 Uploaded install fix. - - v99.99-pre-55 The ladder hook. - - v99.99-pre-54 Fixed a typo in isBoundingBoxBurning. - - v99.99-pre-53 updated list of contributers - - v99.99-pre-52 updated release and package script to take into account credit file - - v99.99-pre-51 renamed file - - v99.99-pre-50 initial revision of the credit file, to be completed - - v99.99-pre-49 Added a comment. - - v99.99-pre-48 Added a small patch to MovingObjectPosition. - - v99.99-pre-47 Not really a change. - - v99.99-pre-46 Added a texture preloader to avoid render glitches on the first render. - - v99.99-pre-45 New multiple-tessellator texture renderer. - - v99.99-pre-44 New install script for Linux users. - - v99.99-pre-43 improved installation and setup scripts - - v99.99-pre-42 Added secondary block properties patch. - - v99.99-pre-41 Fixed a little path bug. - - v99.99-pre-40 Improved the setup scripts. - - v99.99-pre-39 Fixed bugs in the pickaxe code. - - v99.99-pre-38 Improved some documentation. - - v99.99-pre-37 removed inner classes, remove redundant biome control - - v99.99-pre-36 fixed files for release - - v99.99-pre-35 additional comments - - v99.99-pre-34 added comments - - v99.99-pre-33 fixed exceptions in minecraft code - - v99.99-pre-32 fixed previous checkin - - v99.99-pre-31 added sources packaging - - v99.99-pre-30 add custom armor, for #13 - - v99.99-pre-29 first batch of documentation + minor reformatings - - v99.99-pre-28 Added explosion resistance hook. - - v99.99-pre-27 fixed addPixaxeBlockEffectiveAgainst - - v99.99-pre-26 Added the four new hooks from RedPower, and the TileEntity bugfix. - - v99.99-pre-25 added missing copyright header - - v99.99-pre-24 added missing file - - v99.99-pre-23 added mineable block configuration, for #6 - - v99.99-pre-22 added missing graphical features, added configuration management, for #5 - - v99.99-pre-21 improved previous patch, extracted internal class - - v99.99-pre-20 fixed compilation errors - - v99.99-pre-19 fixed setup file - - v99.99-pre-18 Removed MCForgeEffectRenderer, patched MC EffectRenderer - - v99.99-pre-17 removed OBE file - - v99.99-pre-16 fixed setup script for windows and patch - - v99.99-pre-15 fixed packaging script - - v99.99-pre-14 fixed patch script and added release scripts - - v99.99-pre-13 Added OnGameStart hook, added custom effect render to fulfill infinite sprite support. Render needs to be changed a little to cover items also, though. - - v99.99-pre-12 added headers - - v99.99-pre-11 added support for infinite sprites, for #4 - - v99.99-pre-10 implement infinite terrain sprites, for #3 - - v99.99-pre-9 fixed style, added biome population support, for #2 - - v99.99-pre-8 initial revision of the license - - v99.99-pre-7 fixed previous checkin - - v99.99-pre-6 added basic build script for windows - - v99.99-pre-5 added missing patch step - - v99.99-pre-4 made initial setup, implemented custom bucket, for #1 - - v99.99-pre-3 added main project directories - - v99.99-pre-2 added main source directory - - v99.99-pre-1 added base directories From 5b3ce5834fa67f132793d9d9e1159bda6fda5b3b Mon Sep 17 00:00:00 2001 From: Mahtaran Date: Thu, 11 Aug 2022 03:28:35 +0200 Subject: [PATCH 015/469] :recycle: refactor a lot of code, primarily the radix tree --- .../SkillAPI.java => magus/Magus.java} | 27 ++-- .../omegasource/magus/radix/Branch.java | 59 +++++++++ .../omegasource/magus/radix/Condition.java | 16 +++ .../amuzil/omegasource/magus/radix/Leaf.java | 9 ++ .../amuzil/omegasource/magus/radix/Node.java | 21 ++++ .../omegasource/magus/radix/NodeBuilder.java | 116 ++++++++++++++++++ .../omegasource/magus/radix/RadixTree.java | 106 ++++++++++++++++ .../radix/condition/SimpleCondition.java | 22 ++++ .../minecraft/forge/EventCondition.java | 33 +++++ .../forge/TickTimedEventCondition.java | 50 ++++++++ .../minecraft/forge/key/KeyHoldCondition.java | 69 +++++++++++ .../forge/key/KeyPressCondition.java | 17 +++ .../forge/key/KeyReleaseCondition.java | 17 +++ .../magus/radix/leaf/MouseMovementLeaf.java | 43 +++++++ .../skill}/activateable/Activator.java | 2 +- .../skill}/activateable/KeyCombination.java | 2 +- .../skill}/activateable/KeyInfo.java | 2 +- .../skill}/activateable/KeyPermutation.java | 2 +- .../skill/listener}/DynamicStateListener.java | 2 +- .../magus/skill/skill/SkillBase.java | 4 + .../magus/skill/util/ClassToLeafMap.java | 22 ++++ .../skill}/util/KeyboardData.java | 2 +- .../omegasource/skillapi/data/Condition.java | 15 --- .../skillapi/data/RadixBranch.java | 81 ------------ .../omegasource/skillapi/data/RadixLeaf.java | 11 -- .../omegasource/skillapi/data/RadixNode.java | 63 ---------- .../omegasource/skillapi/data/RadixTree.java | 109 ---------------- .../omegasource/skillapi/data/RadixUtils.java | 4 - .../data/conditions/EventCondition.java | 23 ---- .../data/conditions/ForgeEventCondition.java | 28 ----- .../data/conditions/SimpleCondition.java | 34 ----- .../data/conditions/StateCondition.java | 17 --- .../data/conditions/TimedEventCondition.java | 52 -------- .../skillapi/data/conditions/VRCondition.java | 4 - .../data/conditions/VRGestureCondition.java | 4 - .../data/conditions/VRMotionCondition.java | 4 - .../data/conditions/key/KeyCondition.java | 9 -- .../conditions/key/KeyEventCondition.java | 20 --- .../data/conditions/key/KeyHoldCondition.java | 31 ----- .../conditions/key/KeyPressCondition.java | 19 --- .../conditions/key/KeyReleaseCondition.java | 19 --- .../data/leaves/MouseMovementLeaf.java | 50 -------- .../skillapi/skills/SkillBase.java | 4 - .../skillapi/util/ClassToLeafMap.java | 23 ---- src/main/resources/META-INF/mods.toml | 54 ++++---- src/main/resources/pack.mcmeta | 2 +- 46 files changed, 649 insertions(+), 674 deletions(-) rename src/main/java/com/amuzil/omegasource/{skillapi/SkillAPI.java => magus/Magus.java} (83%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/Branch.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/Condition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/Leaf.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/Node.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/leaf/MouseMovementLeaf.java rename src/main/java/com/amuzil/omegasource/{skillapi => magus/skill}/activateable/Activator.java (96%) rename src/main/java/com/amuzil/omegasource/{skillapi => magus/skill}/activateable/KeyCombination.java (88%) rename src/main/java/com/amuzil/omegasource/{skillapi => magus/skill}/activateable/KeyInfo.java (95%) rename src/main/java/com/amuzil/omegasource/{skillapi => magus/skill}/activateable/KeyPermutation.java (93%) rename src/main/java/com/amuzil/omegasource/{skillapi/listeners => magus/skill/listener}/DynamicStateListener.java (90%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/ClassToLeafMap.java rename src/main/java/com/amuzil/omegasource/{skillapi => magus/skill}/util/KeyboardData.java (69%) delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixLeaf.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/RadixUtils.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRGestureCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRMotionCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyEventCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/skills/SkillBase.java delete mode 100644 src/main/java/com/amuzil/omegasource/skillapi/util/ClassToLeafMap.java diff --git a/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java similarity index 83% rename from src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java rename to src/main/java/com/amuzil/omegasource/magus/Magus.java index 8af2809f..28154e7e 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/SkillAPI.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,13 +1,9 @@ -package com.amuzil.omegasource.skillapi; +package com.amuzil.omegasource.magus; -import com.amuzil.omegasource.skillapi.data.conditions.ForgeEventCondition; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; -import net.minecraftforge.event.entity.living.LivingAttackEvent; -import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; @@ -16,7 +12,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.util.function.Function; import java.util.stream.Collectors; // The value here should match an entry in the META-INF/mods.toml file @@ -27,21 +22,21 @@ * This is so Mahtaran and I can work on features of Magus separately. */ -@Mod(SkillAPI.MODID) -public class SkillAPI { +@Mod(Magus.MOD_ID) +public class Magus { //MODID reference - public static final String MODID = "magus"; + public static final String MOD_ID = "magus"; // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); - public SkillAPI() { - // Register the setup method for modloading + public Magus() { + // Register the setup method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); - // Register the enqueueIMC method for modloading + // Register the enqueueIMC method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC); - // Register the processIMC method for modloading + // Register the processIMC method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); - // Register the doClientStuff method for modloading + // Register the doClientStuff method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); // Register ourselves for server and other game events we are interested in @@ -49,8 +44,8 @@ public SkillAPI() { } private void setup(final FMLCommonSetupEvent event) { - // some preinit code - LOGGER.info("HELLO FROM PREINIT"); + // some pre init code + LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); //Testing for some conditions diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java b/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java new file mode 100644 index 00000000..c8cef05c --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java @@ -0,0 +1,59 @@ +package com.amuzil.omegasource.magus.radix; + +import java.util.HashMap; +import java.util.LinkedList; + +public class Branch { + private final LinkedList path; + + private final HashMap>, Leaf> leaves; + + public Branch() { + path = new LinkedList<>(); + leaves = new HashMap<>(); + } + + public void burn() { + path.clear(); + leaves.values().forEach(Leaf::burn); + leaves.clear(); + } + + public void reset(Node root) { + path.clear(); + addStep(null, root); + leaves.values().forEach(Leaf::reset); + } + + public void addStep(Condition activator, Node node) { + path.add(new Step(activator, node)); + } + + public boolean registerLeaf(Class> type, Leaf leaf) { + if (leaves.containsKey(type)) { + return false; + } else { + leaves.put(type, leaf); + return true; + } + } + + public void resetLeaf(Class> type) { + leaves.get(type).reset(); + } + + public LinkedList getPath() { + // Return a copy of the path. + return new LinkedList<>(path); + } + + @SuppressWarnings("unchecked") + public T measureLeaf(Class> type) { + return (T) leaves.get(type).measure(); + } + + public record Step(Condition activator, Node node) { + + } +} + diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java new file mode 100644 index 00000000..3d6bfacb --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -0,0 +1,16 @@ +package com.amuzil.omegasource.magus.radix; + +public abstract class Condition { + protected Runnable onSuccess; + protected Runnable onExpire; + + public void register(Runnable onSuccess, Runnable onExpire) { + this.onSuccess = onSuccess; + this.onExpire = onExpire; + } + + public void unregister() { + // This should not cause any errors when called if the condition is + // already unregistered or was never registered in the first place + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Leaf.java b/src/main/java/com/amuzil/omegasource/magus/radix/Leaf.java new file mode 100644 index 00000000..96f523a8 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Leaf.java @@ -0,0 +1,9 @@ +package com.amuzil.omegasource.magus.radix; + +public interface Leaf { + void burn(); + + void reset(); + + T measure(); +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java new file mode 100644 index 00000000..68be3fa5 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -0,0 +1,21 @@ +package com.amuzil.omegasource.magus.radix; + +import java.util.Map; +import java.util.function.Consumer; + +/** + * @param children If a condition is fulfilled, the active node moves down to the mapped child node + * @param onEnter Called when the active node is moved down from the parent node to this node + * @param onLeave Called when the active node is moved down from this node to a child node + * @param onTerminate Called when the active node is moved up to the root node because either all children's conditions have expired or the terminate condition has been fulfilled + * @param terminateCondition If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate + */ +public record Node( + Map children, + Consumer onEnter, + Consumer onLeave, + Consumer onTerminate, + Condition terminateCondition +) { + +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java new file mode 100644 index 00000000..9d5d4785 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -0,0 +1,116 @@ +package com.amuzil.omegasource.magus.radix; + +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.function.Consumer; + +public class NodeBuilder { + private final Type type; + private final Map children; + private Consumer onEnter; + private Consumer onLeave; + private Consumer onTerminate; + private Condition terminateCondition; + + private NodeBuilder(Type type) { + this.type = type; + this.children = new HashMap<>(); + this.onEnter = null; + this.onLeave = null; + this.onTerminate = null; + this.terminateCondition = null; + } + + public static NodeBuilder root() { + return new NodeBuilder(Type.ROOT); + } + + public static NodeBuilder middle() { + return new NodeBuilder(Type.MIDDLE); + } + + public static NodeBuilder end() { + return new NodeBuilder(Type.END); + } + + private IllegalStateException cannot(String message) { + return new IllegalStateException("A " + type.name().toLowerCase(Locale.ROOT) + " node cannot " + message); + } + + public NodeBuilder addChild(Condition condition, Node child) { + if (type.canHaveChildren) { + children.put(condition, child); + return this; + } else { + throw cannot("have children"); + } + } + + public NodeBuilder removeChild(Condition condition) { + if (type.canHaveChildren) { + children.remove(condition); + return this; + } else { + throw cannot("have children"); + } + } + + public NodeBuilder onEnter(Consumer onEnter) { + if (type.canBeEntered) { + this.onEnter = onEnter; + return this; + } else { + throw cannot("be entered"); + } + } + + public NodeBuilder onLeave(Consumer onLeave) { + if (type.canBeLeft) { + this.onLeave = onLeave; + return this; + } else { + throw cannot("be left"); + } + } + + public NodeBuilder onTerminate(Consumer onTerminate) { + if (type.canBeTerminated) { + this.onTerminate = onTerminate; + return this; + } else { + throw cannot("be terminated"); + } + } + + public NodeBuilder terminateWhen(Condition terminateCondition) { + if (type.canBeTerminated) { + this.terminateCondition = terminateCondition; + return this; + } else { + throw cannot("be terminated"); + } + } + + public Node build() { + return new Node(children, onEnter, onLeave, onTerminate, terminateCondition); + } + + private enum Type { + ROOT(true, false, true, false), + MIDDLE(true, true, true, true), + END(false, true, false, false); + + final boolean canHaveChildren; + final boolean canBeEntered; + final boolean canBeLeft; + final boolean canBeTerminated; + + Type(boolean canHaveChildren, boolean canBeEntered, boolean canBeLeft, boolean canBeTerminated) { + this.canHaveChildren = canHaveChildren; + this.canBeEntered = canBeEntered; + this.canBeLeft = canBeLeft; + this.canBeTerminated = canBeTerminated; + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java new file mode 100644 index 00000000..b6196db7 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -0,0 +1,106 @@ +package com.amuzil.omegasource.magus.radix; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +public class RadixTree { + private final Node root; + private final Branch branch; + private final List activeConditions; + + private Node active; + + public RadixTree(Node root) { + this.root = root; + this.branch = new Branch(); + this.active = root; + this.activeConditions = new ArrayList<>(); + } + + public boolean registerLeaf(Class> type, Leaf leaf) { + return branch.registerLeaf(type, leaf); + } + + public void burn() { + activeConditions.forEach(Condition::unregister); + activeConditions.clear(); + + if (active.terminateCondition() != null) { + active.terminateCondition().unregister(); + } + + active = null; + + branch.burn(); + } + + public void start() { + branch.reset(root); + setActive(root); + } + + public void setActive(Node node) { + active = node; + + if (active.onEnter() != null) { + active.onEnter().accept(branch); + } + + if (active.terminateCondition() != null) { + active.terminateCondition().register(() -> terminate(node), () -> {}); + } + + active.children().forEach((condition, child) -> { + activeConditions.add(condition); + condition.register(() -> { + branch.addStep(condition, child); + moveDown(child); + }, () -> expire(condition)); + }); + } + + // Called when either the node's terminate condition is fulfilled or all active child conditions have expired + public void terminate(Node node) { + activeConditions.forEach(Condition::unregister); + + if (active.onTerminate() != null) { + active.onTerminate().accept(branch); + } + + if (active.terminateCondition() != null) { + active.terminateCondition().unregister(); + } + + activeConditions.clear(); + + start(); + } + + public void moveDown(Node child) { + if (active.onLeave() != null) { + active.onLeave().accept(branch); + } + + if (active.terminateCondition() != null) { + active.terminateCondition().unregister(); + } + + Iterator iterator = activeConditions.iterator(); + while (iterator.hasNext()) { + Condition condition = iterator.next(); + condition.unregister(); + iterator.remove(); + } + + setActive(child); + } + + public void expire(Condition condition) { + condition.unregister(); + activeConditions.remove(condition); + if (activeConditions.isEmpty()) { + terminate(active); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java new file mode 100644 index 00000000..a4442c4d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java @@ -0,0 +1,22 @@ +package com.amuzil.omegasource.magus.radix.condition; + +import com.amuzil.omegasource.magus.radix.Condition; + +import java.util.function.Supplier; + +public class SimpleCondition extends Condition { + Supplier condition; + + public SimpleCondition(Supplier condition) { + this.condition = condition; + } + + @Override + public void register(Runnable onSuccess, Runnable onExpire) { + if (condition.get()) { + onSuccess.run(); + } else { + onExpire.run(); + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java new file mode 100644 index 00000000..11a49b7d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -0,0 +1,33 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge; + +import com.amuzil.omegasource.magus.radix.Condition; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.Event; + +import java.util.function.Consumer; +import java.util.function.Function; + +public class EventCondition extends Condition { + private final Consumer listener; + + public EventCondition(Function condition) { + this.listener = event -> { + if (condition.apply(event)) { + this.onSuccess.run(); + } else { + this.onExpire.run(); + } + }; + } + + @Override + public void register(Runnable onSuccess, Runnable onExpire) { + super.register(onSuccess, onExpire); + MinecraftForge.EVENT_BUS.addListener(listener); + } + + @Override + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(listener); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java new file mode 100644 index 00000000..1c99aa28 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java @@ -0,0 +1,50 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge; + +import com.amuzil.omegasource.magus.radix.Condition; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.event.TickEvent.Phase; +import net.minecraftforge.event.TickEvent.Type; + +import java.util.function.Consumer; + +public class TickTimedEventCondition extends Condition { + private final Consumer listener; + + private final Condition subCondition; + private final boolean respectSubExpire; + + private int current; + + public TickTimedEventCondition(Type type, Phase phase, Condition subCondition, boolean respectSubExpire, int timeout) { + assert timeout >= 0; // TODO Assert util + + this.subCondition = subCondition; + this.respectSubExpire = respectSubExpire; + + this.current = 0; + + this.listener = event -> { + if (event.type == type && event.phase == phase) { + this.current += 1; + if (this.current >= timeout) { + this.onExpire.run(); + } + } + }; + } + + @Override + public void register(Runnable onSuccess, Runnable onExpire) { + super.register(onSuccess, onExpire); + // TODO is this the correct approach? + this.subCondition.register(onSuccess, this.respectSubExpire ? onExpire : () -> {}); + MinecraftForge.EVENT_BUS.addListener(listener); + } + + @Override + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(listener); + subCondition.unregister(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java new file mode 100644 index 00000000..9e2d37de --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -0,0 +1,69 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.mojang.blaze3d.platform.InputConstants.Key; +import net.minecraftforge.client.event.InputEvent.KeyInputEvent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent.ClientTickEvent; +import org.lwjgl.glfw.GLFW; + +import java.util.function.Consumer; + +public class KeyHoldCondition extends Condition { + private final Consumer keyInputListener; + private final Consumer clientTickListener; + + private int currentTotal; + private boolean isHolding; + private int currentHolding; + + public KeyHoldCondition(Key key, int duration, int timeout) { + assert duration >= 0; // TODO Assert util + assert timeout >= 0; // TODO Assert util + + this.currentTotal = 0; + this.isHolding = false; + this.currentHolding = 0; + + this.keyInputListener = event -> { + if (event.getKey() == key.getValue()) { + if (event.getAction() == GLFW.GLFW_PRESS) { + this.isHolding = true; + this.currentHolding = 0; + } else if (event.getAction() == GLFW.GLFW_RELEASE) { + this.isHolding = false; + } + } else { + this.onExpire.run(); + } + }; + + this.clientTickListener = event -> { + if (event.phase == ClientTickEvent.Phase.START) { + this.currentTotal += 1; + if (this.isHolding) { + this.currentHolding += 1; + if (this.currentHolding >= duration) { + this.onSuccess.run(); + } + } + if (this.currentTotal >= timeout) { + this.onExpire.run(); + } + } + }; + } + + @Override + public void register(Runnable onSuccess, Runnable onExpire) { + super.register(onSuccess, onExpire); + MinecraftForge.EVENT_BUS.addListener(keyInputListener); + MinecraftForge.EVENT_BUS.addListener(clientTickListener); + } + + @Override + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(keyInputListener); + MinecraftForge.EVENT_BUS.unregister(clientTickListener); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java new file mode 100644 index 00000000..9b9d9ced --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -0,0 +1,17 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; + +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; +import com.mojang.blaze3d.platform.InputConstants.Key; +import net.minecraftforge.client.event.InputEvent.KeyInputEvent; +import net.minecraftforge.event.TickEvent.Phase; +import net.minecraftforge.event.TickEvent.Type; +import org.lwjgl.glfw.GLFW; + +public class KeyPressCondition extends TickTimedEventCondition { + public KeyPressCondition(Key key, int timeout) { + super(Type.CLIENT, Phase.START, new EventCondition( + event -> event.getAction() == GLFW.GLFW_PRESS && event.getKey() == key.getValue() + ), false, timeout); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java new file mode 100644 index 00000000..3b82a378 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java @@ -0,0 +1,17 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; + +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; +import com.mojang.blaze3d.platform.InputConstants.Key; +import net.minecraftforge.client.event.InputEvent.KeyInputEvent; +import net.minecraftforge.event.TickEvent.Phase; +import net.minecraftforge.event.TickEvent.Type; +import org.lwjgl.glfw.GLFW; + +public class KeyReleaseCondition extends TickTimedEventCondition { + public KeyReleaseCondition(Key key, int timeout) { + super(Type.CLIENT, Phase.START, new EventCondition( + event -> event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == key.getValue() + ), false, timeout); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/leaf/MouseMovementLeaf.java b/src/main/java/com/amuzil/omegasource/magus/radix/leaf/MouseMovementLeaf.java new file mode 100644 index 00000000..1c8f029c --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/leaf/MouseMovementLeaf.java @@ -0,0 +1,43 @@ +package com.amuzil.omegasource.magus.radix.leaf; + +import com.amuzil.omegasource.magus.radix.Leaf; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.function.Consumer; + +public class MouseMovementLeaf implements Leaf> { + private final Consumer listener; + + private final List path; + + public MouseMovementLeaf() { + this.path = new LinkedList<>(); + this.listener = event -> { + // TODO see if we can directly capture the mouse movement + // This would be done by injecting a callback into net.minecraft.client.MouseHandler#onMove + path.add(event.getEntityLiving().getLookAngle()); + }; + MinecraftForge.EVENT_BUS.addListener(this.listener); + } + + @Override + public void burn() { + this.path.clear(); + MinecraftForge.EVENT_BUS.unregister(this.listener); + } + + @Override + public void reset() { + path.clear(); + } + + @Override + public List measure() { + return Collections.unmodifiableList(path); + } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java similarity index 96% rename from src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java rename to src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java index aa19261c..0ca390d3 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/Activator.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.skillapi.activateable; +package com.amuzil.omegasource.magus.skill.activateable; /** * Covers all the different ways to activate an ability. diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java similarity index 88% rename from src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java rename to src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java index 88608427..51b096ad 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.skillapi.activateable; +package com.amuzil.omegasource.magus.skill.activateable; import java.util.LinkedList; diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInfo.java similarity index 95% rename from src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java rename to src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInfo.java index d265bb28..d0cb22d0 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyInfo.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInfo.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.skillapi.activateable; +package com.amuzil.omegasource.magus.skill.activateable; import com.mojang.blaze3d.platform.InputConstants; diff --git a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java similarity index 93% rename from src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java rename to src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java index f9e07396..2eff7cf4 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/activateable/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.skillapi.activateable; +package com.amuzil.omegasource.magus.skill.activateable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/amuzil/omegasource/skillapi/listeners/DynamicStateListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/listener/DynamicStateListener.java similarity index 90% rename from src/main/java/com/amuzil/omegasource/skillapi/listeners/DynamicStateListener.java rename to src/main/java/com/amuzil/omegasource/magus/skill/listener/DynamicStateListener.java index 3b30584f..1013e88a 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/listeners/DynamicStateListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/listener/DynamicStateListener.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.skillapi.listeners; +package com.amuzil.omegasource.magus.skill.listener; /** * Listeners store activators. Activators have a list of pre-requisites/events. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java new file mode 100644 index 00000000..87be3efd --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.skill; + +public class SkillBase { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/ClassToLeafMap.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/ClassToLeafMap.java new file mode 100644 index 00000000..41694313 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/ClassToLeafMap.java @@ -0,0 +1,22 @@ +package com.amuzil.omegasource.magus.skill.util; + +import com.amuzil.omegasource.magus.radix.Leaf; + +import java.util.HashMap; +import java.util.Map; + +public class ClassToLeafMap { + + //Can be copied for consumers too + private final HashMap, Leaf> map = new HashMap<>(); + + @SuppressWarnings("unchecked") + public static Leaf put(Map, Leaf> map, Class key, Leaf c) { + return (Leaf) map.put(key, c); + } + + @SuppressWarnings("unchecked") + public static Leaf get(Map, Leaf> map, Class key) { + return (Leaf) map.get(key); + } +} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/util/KeyboardData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java similarity index 69% rename from src/main/java/com/amuzil/omegasource/skillapi/util/KeyboardData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java index 33e38014..e9726325 100644 --- a/src/main/java/com/amuzil/omegasource/skillapi/util/KeyboardData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.skillapi.util; +package com.amuzil.omegasource.magus.skill.util; import java.awt.event.KeyEvent; diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java deleted file mode 100644 index 95a4a590..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/Condition.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.amuzil.omegasource.skillapi.data; - -public abstract class Condition { - - protected Runnable onSuccess; - protected Runnable onExpire; - - public void register(Runnable onSuccess, Runnable onExpire) { - this.onSuccess = onSuccess; - this.onExpire = onExpire; - } - - // This should not cause any errors when called if the condition is already unregistered or was never registered in the first place - public abstract void unregister(); -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java deleted file mode 100644 index 9fb77258..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixBranch.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.amuzil.omegasource.skillapi.data; - -import com.amuzil.omegasource.skillapi.util.ClassToLeafMap; - -import java.util.HashMap; -import java.util.LinkedList; - -public class RadixBranch { - LinkedList path; - - //Class and Consumer - HashMap, RadixLeaf> leaves; - - public RadixBranch() { - path = new LinkedList<>(); - leaves = new HashMap<>(); - } - - void burn() { - path.clear(); - leaves.values().forEach(RadixLeaf::burn); - leaves.clear(); - } - - void reset(RadixNode root) { - path.clear(); - addStep(null, root); - leaves.values().forEach(RadixLeaf::reset); - } - - void addStep(Condition activator, RadixNode node) { - path.add(new Step(activator, node)); - } - - boolean registerLeaf(Class> type, RadixLeaf leaf) { - if (leaves.containsKey(type)) { - return false; - } else { - leaves.put(type, leaf); - return true; - } - } - - void resetLeaf(Class> type) { - leaves.get(type).reset(); - } - - T measureLeaf(Class> type) { - return (T) leaves.get(type).measure(); - } - - static class Step { - Condition activator; - RadixNode node; - - - public Step(Condition activator, RadixNode node) { - this.activator = activator; - this.node = node; - } - - public Step() { - this.init(); - } - - void init() { - activator = null; - //Nonnull - node = new RadixNode(); - } - - public Condition getActivator() { - return activator; - } - - public RadixNode getNode() { - return node; - } - } -} - diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixLeaf.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixLeaf.java deleted file mode 100644 index 430d7d6b..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixLeaf.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.amuzil.omegasource.skillapi.data; - -public interface RadixLeaf { - - void burn(); - - void reset(); - - T measure(); - -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java deleted file mode 100644 index d8313ff7..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixNode.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.amuzil.omegasource.skillapi.data; - -import java.util.Map; -import java.util.function.Consumer; - -public class RadixNode { - // If a condition is fulfilled, the active node moves down to the mapped child node - Map children; - - // Called when the active node is moved down from the parent node to this node - Consumer onEnter; - // Called when the active node is moved down from this node to a child node - Consumer onLeave; - // Called when the active node is moved up to the root node because either all children's conditions have expired or the terminate condition has been fulfilled - Consumer onTerminate; - // If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate - Condition terminateCondition; - - public RadixNode () { - this.init(); - } - - void init() { - //All can be anything. TODO: Fix. - children = null; - onEnter = null; - onLeave = null; - onTerminate = null; - terminateCondition = null; - } -} - -class RootNode extends RadixNode { - // This is the only node where onEnter is called not when this node is moved down to, but rather when a (sub)child node terminates - - @Override - void init() { - onTerminate = null; - terminateCondition = null; - } -} - -class EndNode extends RadixNode { - - public EndNode() { - super(); - } - - public EndNode(Consumer onEnter) { - this.init(); - this.onEnter = onEnter; - } - - @Override - void init() { - children = null; - //@Nonnull - onEnter = null; - onLeave = null; - onTerminate = null; - terminateCondition = null; - } -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java deleted file mode 100644 index 4801e878..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixTree.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.amuzil.omegasource.skillapi.data; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -public class RadixTree { - RadixNode root; - - RadixBranch branch; - RadixNode active; - List activeConditions; - - void init() { - //Nonnull - root = null; - branch = new RadixBranch(); - active = null; - //TODO: Make a map, should be a map not a list. Conditions should map to their respective nodes. - //e.g. HashMap - activeConditions = new ArrayList<>();//HashMap(); - } - - boolean registerLeaf(Class> type, RadixLeaf leaf) { - return branch.registerLeaf(type, leaf); - } - - void burn() { - activeConditions.forEach(Condition::unregister); - activeConditions.clear(); - - if (active.terminateCondition != null) { - active.terminateCondition.unregister(); - } - - active = null; - - branch.burn(); - } - - void start() { - branch.reset(root); - setActive(root); - } - - void setActive(RadixNode node) { - active = node; - - if (active.onEnter != null) { - active.onEnter.accept(branch); - } - - if (active.terminateCondition != null) { - active.terminateCondition.register(() -> terminate(node), () -> {}); - } - - active.children.forEach((condition, child) -> { - activeConditions.add(condition); - condition.register(() -> { - branch.addStep(condition, child); - moveDown(child); - }, () -> expire(condition)); - }); - } - - // Called when either the node's terminate condition is fulfilled or all active child conditions have expired - void terminate(RadixNode node) { - activeConditions.forEach(Condition::unregister); - - if (active.onTerminate != null) { - active.onTerminate.accept(branch); - } - - if (active.terminateCondition != null) { - active.terminateCondition.unregister(); - } - - activeConditions.clear(); - - start(); - } - - void moveDown(RadixNode child) { - if (active.onLeave != null) { - active.onLeave.accept(branch); - } - - if (active.terminateCondition != null) { - active.terminateCondition.unregister(); - } - - Iterator iterator = activeConditions.iterator(); - while (iterator.hasNext()) { - Condition condition = iterator.next(); - condition.unregister(); - iterator.remove(); - } - - setActive(child); - } - - void expire(Condition condition) { - condition.unregister(); - activeConditions.remove(condition); - if (activeConditions.isEmpty()) { - terminate(active); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixUtils.java b/src/main/java/com/amuzil/omegasource/skillapi/data/RadixUtils.java deleted file mode 100644 index 620a969e..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/RadixUtils.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.skillapi.data; - -public class RadixUtils { -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java deleted file mode 100644 index a5da4541..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/EventCondition.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions; - -import com.amuzil.omegasource.skillapi.data.Condition; -import net.minecraftforge.eventbus.api.Event; -import net.minecraftforge.eventbus.api.SubscribeEvent; - -import java.util.function.Function; - -public abstract class EventCondition extends Condition { - - //Make sure to instantiate this to something in inherited classes. - public Function condition = null; - - //Annotation needed for forge - @SubscribeEvent - public void listen(E event) { - if (condition.apply(event)) { - onSuccess.run(); - } else { - onExpire.run(); - } - } -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java deleted file mode 100644 index ac2ac61a..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/ForgeEventCondition.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions; - -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.eventbus.api.Event; - -import java.util.function.Function; - -public class ForgeEventCondition extends EventCondition { - - public ForgeEventCondition() { - this.condition = null; - } - - public ForgeEventCondition(Function condition) { - this.condition = condition; - } - - @Override - public void register(Runnable success, Runnable expire) { - super.register(success, expire); - MinecraftForge.EVENT_BUS.register(this); - } - - @Override - public void unregister() { - MinecraftForge.EVENT_BUS.unregister(this); - } -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java deleted file mode 100644 index 3b2c37d3..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/SimpleCondition.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions; - -import com.amuzil.omegasource.skillapi.data.Condition; - -//import javax.xml.ws.Provider; - -public class SimpleCondition extends Condition { - - boolean condition; - - public SimpleCondition(boolean condition) { - this.condition = condition; - } - - public SimpleCondition() { - this.condition = false; - } - - @Override - //TODO: Fix this/check if using the right provider - public void register(Runnable onSuccess, Runnable onExpire) { - if (condition) { - onSuccess.run(); - } else { - onExpire.run(); - } - } - - @Override - public void unregister() { - //Expires anyway if the boolean condition is failed, but... - this.onExpire.run(); - } -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java deleted file mode 100644 index bb8a14b5..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/StateCondition.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions; - -import com.amuzil.omegasource.skillapi.data.Condition; - -public interface StateCondition {//extends Condition { - - boolean isSatisfied(); - - default void register(Runnable success, Runnable expire) { - if (isSatisfied()) { - success.run(); - } else { - expire.run(); - } - } - -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java deleted file mode 100644 index 340058e1..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/TimedEventCondition.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions; - -import com.amuzil.omegasource.skillapi.data.Condition; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.eventbus.api.Event; -import net.minecraftforge.eventbus.api.SubscribeEvent; - -public class TimedEventCondition extends EventCondition { - - Condition subCondition; - int timeout; - int current; - - public TimedEventCondition() { - this.subCondition = new SimpleCondition(); - this.timeout = -1; - this.current = 0; - this.onSuccess = null; - this.onExpire = null; - } - - public TimedEventCondition(Condition subCondition, int timeout, int current, Runnable onSuccess, Runnable onExpire) { - this.subCondition = subCondition; - this.timeout = timeout; - this.current = current; - this.onSuccess = onSuccess; - this.onExpire = onExpire; - } - - @Override - public void register(Runnable onSuccess, Runnable onExpire) { - super.register(onSuccess, onExpire); - subCondition.register(onSuccess, onExpire); - MinecraftForge.EVENT_BUS.register(this); - } - - @Override - public void unregister() { - MinecraftForge.EVENT_BUS.unregister(this); - subCondition.unregister(); - } - - // Simplified - @SubscribeEvent - @Override - public void listen(E event) { - current += 1; - if (current >= timeout) { - onExpire.run(); - } - } -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRCondition.java deleted file mode 100644 index 4dd63b8d..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRCondition.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions; - -public abstract class VRCondition { -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRGestureCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRGestureCondition.java deleted file mode 100644 index 4d28b4c9..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRGestureCondition.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions; - -public abstract class VRGestureCondition { -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRMotionCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRMotionCondition.java deleted file mode 100644 index 1c606aac..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/VRMotionCondition.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions; - -public abstract class VRMotionCondition { -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyCondition.java deleted file mode 100644 index fa27ed2e..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyCondition.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions.key; - -import com.amuzil.omegasource.skillapi.activateable.KeyInfo; -import com.amuzil.omegasource.skillapi.data.conditions.StateCondition; - -public interface KeyCondition extends StateCondition { - - KeyInfo getKeyInfo(); -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyEventCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyEventCondition.java deleted file mode 100644 index 62c6fd8f..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyEventCondition.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions.key; - -import com.amuzil.omegasource.skillapi.activateable.KeyInfo; -import com.amuzil.omegasource.skillapi.data.conditions.EventCondition; -import net.minecraftforge.client.event.InputEvent; - -public abstract class KeyEventCondition extends EventCondition implements KeyCondition { - - private KeyInfo key; - - public KeyEventCondition(KeyInfo key) { - this.key = key; - } - - @Override - public KeyInfo getKeyInfo() { - return key; - } - -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java deleted file mode 100644 index 52c18b07..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyHoldCondition.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions.key; - -import com.amuzil.omegasource.skillapi.activateable.KeyInfo; -import com.amuzil.omegasource.skillapi.data.conditions.TimedEventCondition; -import com.mojang.blaze3d.platform.InputConstants; -import net.minecraft.client.Minecraft; -import net.minecraftforge.client.event.InputEvent; -import org.lwjgl.glfw.GLFW; - -public abstract class KeyHoldCondition extends TimedEventCondition implements KeyCondition { - int duration; - private KeyInfo key; - - public KeyHoldCondition(KeyInfo key) { - this.key = key; - } - - @Override - public void listen(InputEvent.KeyInputEvent event) { - if (event.getAction() == GLFW.GLFW_PRESS && event.getKey() == getKeyInfo().getKey().getValue()) { - //We don't actually want success to run here, we want it to run if this condition is satisfied - //and the key has been held for a certain amount of time - // success.run(); - } - } - - @Override - public KeyInfo getKeyInfo() { - return key; - } -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java deleted file mode 100644 index 83f63cab..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyPressCondition.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions.key; - -import com.amuzil.omegasource.skillapi.activateable.KeyInfo; -import net.minecraftforge.client.event.InputEvent; -import org.lwjgl.glfw.GLFW; - -public abstract class KeyPressCondition extends KeyEventCondition { - - public KeyPressCondition(KeyInfo key) { - super(key); - } - - @Override - public void listen(InputEvent.KeyInputEvent event) { - if (event.getAction() == GLFW.GLFW_PRESS && event.getKey() == getKeyInfo().getKey().getValue()) { - //success.run(); - } - } -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java deleted file mode 100644 index ed51f8e8..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/conditions/key/KeyReleaseCondition.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.conditions.key; - -import com.amuzil.omegasource.skillapi.activateable.KeyInfo; -import net.minecraftforge.client.event.InputEvent; -import org.lwjgl.glfw.GLFW; - -public abstract class KeyReleaseCondition extends KeyEventCondition { - - public KeyReleaseCondition(KeyInfo key) { - super(key); - } - - @Override - public void listen(InputEvent.KeyInputEvent event) { - if (event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == getKeyInfo().getKey().getValue()) { - // success.run(); - } - } -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java b/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java deleted file mode 100644 index 3a49c04b..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/data/leaves/MouseMovementLeaf.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.amuzil.omegasource.skillapi.data.leaves; - -import com.amuzil.omegasource.skillapi.data.RadixLeaf; -import com.mojang.blaze3d.platform.InputConstants; -import net.minecraft.world.phys.Vec3; -import net.minecraftforge.client.event.ScreenEvent; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.LivingEvent; - -import java.util.LinkedList; -import java.util.List; - -public class MouseMovementLeaf implements RadixLeaf> { - java.util.List path; - - - public void init() { - path = new LinkedList<>(); - MinecraftForge.EVENT_BUS.addListener(this::listener); - } - - @Override - public void burn() { - path.clear(); - //MinecraftForge.EVENT_BUS.removeListener(); - } - - @Override - public void reset() { - path.clear(); - } - - @Override - public List measure() { - return path; - } - - //TODO: Find the right event - //Dunno if this is the right event - void listener(LivingEvent.LivingUpdateEvent event) { - Vec3 look = event.getEntityLiving().getLookAngle(); - //int x = InputConstants. - path.add(look); - } - - void listen(ScreenEvent.KeyboardCharTypedEvent event) { - - } - -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/skills/SkillBase.java b/src/main/java/com/amuzil/omegasource/skillapi/skills/SkillBase.java deleted file mode 100644 index b1d71874..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/skills/SkillBase.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.skillapi.skills; - -public class SkillBase { -} diff --git a/src/main/java/com/amuzil/omegasource/skillapi/util/ClassToLeafMap.java b/src/main/java/com/amuzil/omegasource/skillapi/util/ClassToLeafMap.java deleted file mode 100644 index 59e645ca..00000000 --- a/src/main/java/com/amuzil/omegasource/skillapi/util/ClassToLeafMap.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.amuzil.omegasource.skillapi.util; - -import com.amuzil.omegasource.skillapi.data.RadixLeaf; - -import java.util.HashMap; -import java.util.Map; - -public class ClassToLeafMap { - - //Can be copied for consumers too - private final HashMap, RadixLeaf> map = - new HashMap<>(); - - @SuppressWarnings("unchecked") - public static RadixLeaf put(Map, RadixLeaf> map, Class key, RadixLeaf c) { - return (RadixLeaf) map.put(key, c); - } - - @SuppressWarnings("unchecked") - public static RadixLeaf get(Map, RadixLeaf> map, Class key) { - return (RadixLeaf) map.get(key); - } -} diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 36333b8d..3ff727c7 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -4,36 +4,36 @@ # Note that there are a couple of TOML lists in this file. # Find more information on toml format here: https://github.com/toml-lang/toml # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml -modLoader="javafml" #mandatory +modLoader = "javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version -loaderVersion="[36,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +loaderVersion = "[36,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. # The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. # Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. -license="All rights reserved" +license = "All rights reserved" # A URL to refer people to when problems occur with this mod #issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod -modId="magus" #mandatory +modId = "magus" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata # see the associated build.gradle script for how to populate this completely automatically during a build -version="${file.jarVersion}" #mandatory - # A display name for the mod -displayName="Magus" #mandatory +version = "${file.jarVersion}" #mandatory +# A display name for the mod +displayName = "Magus" #mandatory # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ #updateJSONURL="https://change.me.example.invalid/updates.json" #optional # A URL for the "homepage" for this mod, displayed in the mod UI #displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional # A file name (in the root of the mod JAR) containing a logo for display -logoFile="magus.png" #optional +logoFile = "todo-magus.png" #optional TODO # A text field displayed in the mod UI -credits="Thanks for this example mod goes to Java" #optional +credits = "Credits to be added!" #optional TODO # A text field displayed in the mod UI -authors="Love, Cheese and small house plants" #optional -# The description text for the mod (multi line!) (#mandatory) -description=''' +authors = "Mahtaran & FavouriteDragon" #optional TODO +# The description text for the mod (multi line!) (#mandatory) TODO +description = ''' This is a long form description of the mod. You can write whatever you want here Have some lorem ipsum. @@ -42,21 +42,21 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn ''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. [[dependencies.magus]] #optional - # the modid of the dependency - modId="forge" #mandatory - # Does this dependency have to exist - if not, ordering below must be specified - mandatory=true #mandatory - # The version range of the dependency - versionRange="[36,)" #mandatory - # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory - ordering="NONE" - # Side this dependency is applied on - BOTH, CLIENT or SERVER - side="BOTH" +# the modid of the dependency +modId = "forge" #mandatory +# Does this dependency have to exist - if not, ordering below must be specified +mandatory = true #mandatory +# The version range of the dependency +versionRange = "[36,)" #mandatory +# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory +ordering = "NONE" +# Side this dependency is applied on - BOTH, CLIENT or SERVER +side = "BOTH" # Here's another dependency [[dependencies.magus]] - modId="minecraft" - mandatory=true +modId = "minecraft" +mandatory = true # This version range declares a minimum of the current minecraft version up to but not including the next major version - versionRange="[1.18.2, 1.19)" - ordering="NONE" - side="BOTH" +versionRange = "[1.18.2, 1.19)" +ordering = "NONE" +side = "BOTH" diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index c79a3626..a79510ad 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "examplemod resources", + "description": "Magus resources", "pack_format": 6, "_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods." } From 8994d4c96d276f07af4760f8237df3ca9458f627 Mon Sep 17 00:00:00 2001 From: Luka Leer Date: Thu, 11 Aug 2022 03:39:20 +0200 Subject: [PATCH 016/469] :truck: remove unnecessary file extension --- LICENSE.md => LICENSE | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE.md => LICENSE (100%) diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE From c43fc8b6fa8ee369b2fb256fe661362a155bbdcc Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 11 Aug 2022 12:19:23 +1000 Subject: [PATCH 017/469] using maht's new changes, some cleanup, and testing --- .../com/amuzil/omegasource/magus/Magus.java | 43 ++++ .../omegasource/magus/radix/RadixTree.java | 197 +++++++++--------- .../condition/util/ConditionConverter.java | 50 +++++ .../skill/activateable/KeyCombination.java | 4 + .../magus/skill/util/ClassToLeafMap.java | 22 -- 5 files changed, 196 insertions(+), 120 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/ClassToLeafMap.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 28154e7e..c11647b2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,5 +1,10 @@ package com.amuzil.omegasource.magus; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.skill.activateable.KeyCombination; +import com.amuzil.omegasource.magus.skill.activateable.KeyInfo; +import com.amuzil.omegasource.magus.skill.activateable.KeyPermutation; +import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; @@ -12,8 +17,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import java.util.LinkedList; import java.util.stream.Collectors; +import static com.amuzil.omegasource.magus.radix.condition.util.ConditionConverter.keysToConditions; + // The value here should match an entry in the META-INF/mods.toml file /** @@ -61,6 +69,41 @@ private void setup(final FMLCommonSetupEvent event) { // test.unregister(); // }, () -> { // }); + + //More testing: +// KeyInfo k1 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D), 10, 10), +// k2 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D)), +// k3 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_S), 0, 5), +// k4 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_A)), +// k5 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_A), 0, 2), +// k6 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_S), 15, 0), +// k7 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_W)); +// +// LinkedList ls1 = new LinkedList<>(), +// ls2 = new LinkedList<>(); +// +// ls1.add(k2); +// ls1.add(k3); +// ls2.add(k5); +// ls2.add(k6); +// KeyPermutation p1 = new KeyPermutation(k1), +// p2 = new KeyPermutation(ls1), +// p3 = new KeyPermutation(k4), +// p4 = new KeyPermutation(ls2), +// p5 = new KeyPermutation(k7); +// +// LinkedList kpLs = new LinkedList<>(); +// kpLs.add(p1); +// kpLs.add(p2); +// kpLs.add(p3); +// kpLs.add(p4); +// kpLs.add(p5); +// +// KeyCombination comb = new KeyCombination(kpLs); +// LinkedList conds = keysToConditions(comb); +// +// for (Condition c : conds) +// System.out.println(c); } private void doClientStuff(final FMLClientSetupEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index b6196db7..4b1b53f1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -5,102 +5,103 @@ import java.util.List; public class RadixTree { - private final Node root; - private final Branch branch; - private final List activeConditions; - - private Node active; - - public RadixTree(Node root) { - this.root = root; - this.branch = new Branch(); - this.active = root; - this.activeConditions = new ArrayList<>(); - } - - public boolean registerLeaf(Class> type, Leaf leaf) { - return branch.registerLeaf(type, leaf); - } - - public void burn() { - activeConditions.forEach(Condition::unregister); - activeConditions.clear(); - - if (active.terminateCondition() != null) { - active.terminateCondition().unregister(); - } - - active = null; - - branch.burn(); - } - - public void start() { - branch.reset(root); - setActive(root); - } - - public void setActive(Node node) { - active = node; - - if (active.onEnter() != null) { - active.onEnter().accept(branch); - } - - if (active.terminateCondition() != null) { - active.terminateCondition().register(() -> terminate(node), () -> {}); - } - - active.children().forEach((condition, child) -> { - activeConditions.add(condition); - condition.register(() -> { - branch.addStep(condition, child); - moveDown(child); - }, () -> expire(condition)); - }); - } - - // Called when either the node's terminate condition is fulfilled or all active child conditions have expired - public void terminate(Node node) { - activeConditions.forEach(Condition::unregister); - - if (active.onTerminate() != null) { - active.onTerminate().accept(branch); - } - - if (active.terminateCondition() != null) { - active.terminateCondition().unregister(); - } - - activeConditions.clear(); - - start(); - } - - public void moveDown(Node child) { - if (active.onLeave() != null) { - active.onLeave().accept(branch); - } - - if (active.terminateCondition() != null) { - active.terminateCondition().unregister(); - } - - Iterator iterator = activeConditions.iterator(); - while (iterator.hasNext()) { - Condition condition = iterator.next(); - condition.unregister(); - iterator.remove(); - } - - setActive(child); - } - - public void expire(Condition condition) { - condition.unregister(); - activeConditions.remove(condition); - if (activeConditions.isEmpty()) { - terminate(active); - } - } + private final Node root; + private final Branch branch; + private final List activeConditions; + + private Node active; + + public RadixTree(Node root) { + this.root = root; + this.branch = new Branch(); + this.active = root; + this.activeConditions = new ArrayList<>(); + } + + public boolean registerLeaf(Class> type, Leaf leaf) { + return branch.registerLeaf(type, leaf); + } + + public void burn() { + activeConditions.forEach(Condition::unregister); + activeConditions.clear(); + + if (active.terminateCondition() != null) { + active.terminateCondition().unregister(); + } + + active = null; + + branch.burn(); + } + + public void start() { + branch.reset(root); + setActive(root); + } + + public void setActive(Node node) { + active = node; + + if (active.onEnter() != null) { + active.onEnter().accept(branch); + } + + if (active.terminateCondition() != null) { + active.terminateCondition().register(this::terminate, () -> { + }); + } + + active.children().forEach((condition, child) -> { + activeConditions.add(condition); + condition.register(() -> { + branch.addStep(condition, child); + moveDown(child); + }, () -> expire(condition)); + }); + } + + // Called when either the node's terminate condition is fulfilled or all active child conditions have expired + public void terminate() { + activeConditions.forEach(Condition::unregister); + + if (active.onTerminate() != null) { + active.onTerminate().accept(branch); + } + + if (active.terminateCondition() != null) { + active.terminateCondition().unregister(); + } + + activeConditions.clear(); + + start(); + } + + public void moveDown(Node child) { + if (active.onLeave() != null) { + active.onLeave().accept(branch); + } + + if (active.terminateCondition() != null) { + active.terminateCondition().unregister(); + } + + Iterator iterator = activeConditions.iterator(); + while (iterator.hasNext()) { + Condition condition = iterator.next(); + condition.unregister(); + iterator.remove(); + } + + setActive(child); + } + + public void expire(Condition condition) { + condition.unregister(); + activeConditions.remove(condition); + if (activeConditions.isEmpty()) { + terminate(); + } + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java new file mode 100644 index 00000000..ce455a19 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java @@ -0,0 +1,50 @@ +package com.amuzil.omegasource.magus.radix.condition.util; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; +import com.amuzil.omegasource.magus.skill.activateable.KeyCombination; +import com.amuzil.omegasource.magus.skill.activateable.KeyInfo; +import com.amuzil.omegasource.magus.skill.activateable.KeyPermutation; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraftforge.event.TickEvent; + +import java.util.LinkedList; + +/** + * Takes data and converts it into a corresponding data structure of conditions. + * Still has to be turned into tree. + */ +public class ConditionConverter { + + public static LinkedList keysToConditions(KeyCombination keys) { + LinkedList ls = new LinkedList<>(); + for (KeyPermutation keyP : keys.getKeys()) + ls.addAll(keysToConditions(keyP)); + return ls; + } + + public static LinkedList keysToConditions(KeyPermutation keys) { + LinkedList ls = new LinkedList<>(); + for (KeyInfo key : keys.getKeys()) + ls.addAll(keyToConditions(key)); + return ls; + } + + public static LinkedList keyToConditions(KeyInfo key) { + LinkedList ls = new LinkedList<>(); + + //Any time less than this is just a key press. + if (key.getHeld() > 3) + ls.add(new KeyHoldCondition(key.getKey(), key.getHeld(), 50)); + else ls.add(new KeyPressCondition(key.getKey(), 50)); + + if (key.getMinDelay() > 0) + //TODO: Fix this + ls.add(new TickTimedEventCondition(TickEvent.Type.CLIENT, TickEvent.Phase.START, + null, false, key.getMinDelay())); + + return ls; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java index 51b096ad..596787bf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java @@ -22,4 +22,8 @@ public KeyCombination (LinkedList keys) { this.keys = keys; } + public LinkedList getKeys() { + return this.keys; + } + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/ClassToLeafMap.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/ClassToLeafMap.java deleted file mode 100644 index 41694313..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/ClassToLeafMap.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util; - -import com.amuzil.omegasource.magus.radix.Leaf; - -import java.util.HashMap; -import java.util.Map; - -public class ClassToLeafMap { - - //Can be copied for consumers too - private final HashMap, Leaf> map = new HashMap<>(); - - @SuppressWarnings("unchecked") - public static Leaf put(Map, Leaf> map, Class key, Leaf c) { - return (Leaf) map.put(key, c); - } - - @SuppressWarnings("unchecked") - public static Leaf get(Map, Leaf> map, Class key) { - return (Leaf) map.get(key); - } -} From eed86a606f3e0d3f7bff4c2e23f19a837b38c1d5 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 11 Aug 2022 15:26:25 +1000 Subject: [PATCH 018/469] Conditions seem to be working except for timed --- .../com/amuzil/omegasource/magus/Magus.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index c11647b2..6230cf2b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -9,6 +9,7 @@ import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; @@ -18,8 +19,10 @@ import org.apache.logging.log4j.Logger; import java.util.LinkedList; +import java.util.function.Function; import java.util.stream.Collectors; +import static com.amuzil.omegasource.magus.radix.condition.util.ConditionConverter.keyToConditions; import static com.amuzil.omegasource.magus.radix.condition.util.ConditionConverter.keysToConditions; // The value here should match an entry in the META-INF/mods.toml file @@ -56,19 +59,17 @@ private void setup(final FMLCommonSetupEvent event) { LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); + + //Testing for some conditions -// Function cond = event1 -> event1 instanceof LivingAttackEvent && ((LivingAttackEvent) event1).getSource().getEntity() instanceof Player; -// ForgeEventCondition test = new ForgeEventCondition<>(cond); -// ForgeEventCondition test2 = new ForgeEventCondition<>(cond); + + //Note: this is only executed client-side, due to how events work. Be sure to send a packet! +// Condition test = keyToConditions(new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_X), +// 0, 40)).get(0); // test.register(() -> { // System.out.println("Success??"); // test.unregister(); // }, () -> {}); -// test2.register(() -> { -// System.out.println("Sus-ccess"); -// test.unregister(); -// }, () -> { -// }); //More testing: // KeyInfo k1 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D), 10, 10), From 52ed117ba808e3340a8e2a2dc0f02c799cf46500 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Tue, 16 Aug 2022 15:40:40 +1000 Subject: [PATCH 019/469] added fail conditions and a tick event condition, along with testing --- .../com/amuzil/omegasource/magus/Magus.java | 12 ++--- .../minecraft/forge/TickEventCondition.java | 47 +++++++++++++++++++ .../forge/TickTimedEventCondition.java | 3 +- .../minecraft/forge/key/KeyHoldCondition.java | 1 + .../forge/key/KeyPressedCondition.java | 16 +++++++ .../condition/util/ConditionConverter.java | 7 ++- .../magus/skill/util/KeyboardData.java | 24 ++++++++++ 7 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickEventCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 6230cf2b..bb60b876 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -64,12 +64,12 @@ private void setup(final FMLCommonSetupEvent event) { //Testing for some conditions //Note: this is only executed client-side, due to how events work. Be sure to send a packet! -// Condition test = keyToConditions(new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_X), -// 0, 40)).get(0); -// test.register(() -> { -// System.out.println("Success??"); -// test.unregister(); -// }, () -> {}); + Condition test = keyToConditions(new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_X), + 0, 40)).get(0); + test.register(() -> { + System.out.println("Success??"); + test.unregister(); + }, () -> {}); //More testing: // KeyInfo k1 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D), 10, 10), diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickEventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickEventCondition.java new file mode 100644 index 00000000..49c6a295 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickEventCondition.java @@ -0,0 +1,47 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge; + +import com.amuzil.omegasource.magus.radix.Condition; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; + +import java.util.function.Consumer; + +//Success upon hitting the given time, but has a fail condition +public class TickEventCondition extends TickTimedEventCondition { + + private final Consumer timeListener; + private final Condition failCondition; + //Max duration before it becomes true + private final int max; + + //Fail condition lets this condition know whether to run onExpire or onSuccess upon the condition being completed. + //Completion conditions are ors, not ands. + public TickEventCondition(TickEvent.Type type, TickEvent.Phase phase, Condition subCondition, + boolean respectSubExpire, Condition failCondition, int timeout, int max) { + super(type, phase, subCondition, respectSubExpire, timeout); + this.max = max; + this.failCondition = failCondition; + + this.timeListener = tickEvent -> { + if (tickEvent.type == type && tickEvent.phase == phase) { + if (this.current >= this.max) + this.onSuccess.run(); + } + }; + } + + @Override + public void register(Runnable onSuccess, Runnable onExpire) { + super.register(onSuccess, onExpire); + //No success registered upon time completion yet, therefore, no need to unregister anything. + this.failCondition.register(this.onExpire, this.onSuccess); + MinecraftForge.EVENT_BUS.addListener(timeListener); + } + + @Override + public void unregister() { + super.unregister(); + MinecraftForge.EVENT_BUS.unregister(timeListener); + failCondition.unregister(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java index 1c99aa28..6765ae88 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java @@ -14,7 +14,8 @@ public class TickTimedEventCondition extends Condition { private final Condition subCondition; private final boolean respectSubExpire; - private int current; + //TickEvent extends this, so this needs to be protected vs private + protected int current; public TickTimedEventCondition(Type type, Phase phase, Condition subCondition, boolean respectSubExpire, int timeout) { assert timeout >= 0; // TODO Assert util diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 9e2d37de..29890d88 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -10,6 +10,7 @@ import java.util.function.Consumer; public class KeyHoldCondition extends Condition { + private final Consumer keyInputListener; private final Consumer clientTickListener; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java new file mode 100644 index 00000000..299f80ec --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -0,0 +1,16 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; + +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; +import com.amuzil.omegasource.magus.skill.util.KeyboardData; +import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.event.TickEvent; + +public class KeyPressedCondition extends TickTimedEventCondition { + //Upon *any* key (not including modifiers or wasd) being pressed, return true + public KeyPressedCondition(int timeout) { + super(TickEvent.Type.CLIENT, TickEvent.Phase.START, new EventCondition( + event -> !KeyboardData.ignore(event.getKey()) + ), false, timeout); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java index ce455a19..34a783e2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition.util; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; @@ -8,6 +9,7 @@ import com.amuzil.omegasource.magus.skill.activateable.KeyInfo; import com.amuzil.omegasource.magus.skill.activateable.KeyPermutation; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.event.TickEvent; import java.util.LinkedList; @@ -41,9 +43,10 @@ public static LinkedList keyToConditions(KeyInfo key) { else ls.add(new KeyPressCondition(key.getKey(), 50)); if (key.getMinDelay() > 0) - //TODO: Fix this + //TODO: Fix this to account for "action keys". ls.add(new TickTimedEventCondition(TickEvent.Type.CLIENT, TickEvent.Phase.START, - null, false, key.getMinDelay())); + new EventCondition( + event -> false), false, key.getMinDelay())); return ls; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java index e9726325..97af9cdf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java @@ -1,8 +1,32 @@ package com.amuzil.omegasource.magus.skill.util; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.KeyMapping; +import net.minecraftforge.client.settings.KeyBindingMap; +import org.lwjgl.glfw.GLFW; + import java.awt.event.KeyEvent; +import java.util.ArrayList; +import java.util.List; + +import static com.mojang.blaze3d.platform.InputConstants.*; public class KeyboardData { //Converts InputConstants key data into GLFW + //TODO: Configurable list of invalid keys + public static boolean ignore(int keyCode) { + List invalidKeys = new ArrayList<>(); + invalidKeys.add(KEY_A); + invalidKeys.add(KEY_S); + invalidKeys.add(KEY_W); + invalidKeys.add(KEY_D); + invalidKeys.add(KEY_SPACE); + invalidKeys.add(GLFW.GLFW_KEY_LEFT_ALT); + invalidKeys.add(GLFW.GLFW_KEY_RIGHT_ALT); + invalidKeys.add(GLFW.GLFW_KEY_LEFT_CONTROL); + + return invalidKeys.contains(keyCode); + } + } From 126706efdb6c235b567ee5a4e6acf98be2bc122a Mon Sep 17 00:00:00 2001 From: Mahtaran Date: Thu, 18 Aug 2022 02:27:11 +0200 Subject: [PATCH 020/469] :sparkles: allow more flexibility with the tick timed condition :recycle: clean up the condition converter --- .../com/amuzil/omegasource/magus/Magus.java | 6 -- .../omegasource/magus/radix/Condition.java | 32 +++++++- .../omegasource/magus/radix/RadixUtil.java | 19 +++++ .../radix/condition/SimpleCondition.java | 4 +- .../minecraft/forge/EventCondition.java | 6 +- .../minecraft/forge/TickEventCondition.java | 47 ------------ ...Condition.java => TickTimedCondition.java} | 25 ++++--- .../minecraft/forge/key/KeyHoldCondition.java | 13 ++-- .../forge/key/KeyPressCondition.java | 8 +- .../forge/key/KeyPressedCondition.java | 8 +- .../forge/key/KeyReleaseCondition.java | 8 +- .../condition/util/ConditionConverter.java | 73 ++++++++++--------- 12 files changed, 124 insertions(+), 125 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/RadixUtil.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickEventCondition.java rename src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/{TickTimedEventCondition.java => TickTimedCondition.java} (53%) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index bb60b876..c94767c5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,15 +1,12 @@ package com.amuzil.omegasource.magus; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.activateable.KeyCombination; import com.amuzil.omegasource.magus.skill.activateable.KeyInfo; -import com.amuzil.omegasource.magus.skill.activateable.KeyPermutation; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; -import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; @@ -18,12 +15,9 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.util.LinkedList; -import java.util.function.Function; import java.util.stream.Collectors; import static com.amuzil.omegasource.magus.radix.condition.util.ConditionConverter.keyToConditions; -import static com.amuzil.omegasource.magus.radix.condition.util.ConditionConverter.keysToConditions; // The value here should match an entry in the META-INF/mods.toml file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 3d6bfacb..bf757405 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -1,16 +1,40 @@ package com.amuzil.omegasource.magus.radix; public abstract class Condition { + public enum Result { + SUCCESS, + FAILURE, + NONE + } + + protected static final Runnable NO_OPERATION = () -> RadixUtil.getLogger().debug("Result: no operation"); + protected Runnable onSuccess; - protected Runnable onExpire; + protected Runnable onFailure; - public void register(Runnable onSuccess, Runnable onExpire) { - this.onSuccess = onSuccess; - this.onExpire = onExpire; + public void register(Runnable onSuccess, Runnable onFailure) { + RadixUtil.getLogger().debug("Registering results"); + this.onSuccess = () -> { + RadixUtil.getLogger().debug("Result: success"); + onSuccess.run(); + }; + this.onFailure = () -> { + RadixUtil.getLogger().debug("Result: failure"); + onFailure.run(); + }; } public void unregister() { + RadixUtil.getLogger().debug("Unregistering results"); // This should not cause any errors when called if the condition is // already unregistered or was never registered in the first place } + + protected Runnable runOn(Result result) { + return switch (result) { + case SUCCESS -> onSuccess; + case FAILURE -> onFailure; + case NONE -> NO_OPERATION; + }; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixUtil.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixUtil.java new file mode 100644 index 00000000..994d51aa --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixUtil.java @@ -0,0 +1,19 @@ +package com.amuzil.omegasource.magus.radix; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class RadixUtil { + + private static final Logger logger = LogManager.getLogger(RadixTree.class); + + public static Logger getLogger() { + return logger; + } + + public static void assertTrue(boolean condition, String message) { + if (!condition) { + throw new AssertionError(message); + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java index a4442c4d..feff1337 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java @@ -12,11 +12,11 @@ public SimpleCondition(Supplier condition) { } @Override - public void register(Runnable onSuccess, Runnable onExpire) { + public void register(Runnable onSuccess, Runnable onFailure) { if (condition.get()) { onSuccess.run(); } else { - onExpire.run(); + onFailure.run(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index 11a49b7d..30bd6942 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -15,14 +15,14 @@ public EventCondition(Function condition) { if (condition.apply(event)) { this.onSuccess.run(); } else { - this.onExpire.run(); + this.onFailure.run(); } }; } @Override - public void register(Runnable onSuccess, Runnable onExpire) { - super.register(onSuccess, onExpire); + public void register(Runnable onSuccess, Runnable onFailure) { + super.register(onSuccess, onFailure); MinecraftForge.EVENT_BUS.addListener(listener); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickEventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickEventCondition.java deleted file mode 100644 index 49c6a295..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickEventCondition.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.amuzil.omegasource.magus.radix.condition.minecraft.forge; - -import com.amuzil.omegasource.magus.radix.Condition; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.TickEvent; - -import java.util.function.Consumer; - -//Success upon hitting the given time, but has a fail condition -public class TickEventCondition extends TickTimedEventCondition { - - private final Consumer timeListener; - private final Condition failCondition; - //Max duration before it becomes true - private final int max; - - //Fail condition lets this condition know whether to run onExpire or onSuccess upon the condition being completed. - //Completion conditions are ors, not ands. - public TickEventCondition(TickEvent.Type type, TickEvent.Phase phase, Condition subCondition, - boolean respectSubExpire, Condition failCondition, int timeout, int max) { - super(type, phase, subCondition, respectSubExpire, timeout); - this.max = max; - this.failCondition = failCondition; - - this.timeListener = tickEvent -> { - if (tickEvent.type == type && tickEvent.phase == phase) { - if (this.current >= this.max) - this.onSuccess.run(); - } - }; - } - - @Override - public void register(Runnable onSuccess, Runnable onExpire) { - super.register(onSuccess, onExpire); - //No success registered upon time completion yet, therefore, no need to unregister anything. - this.failCondition.register(this.onExpire, this.onSuccess); - MinecraftForge.EVENT_BUS.addListener(timeListener); - } - - @Override - public void unregister() { - super.unregister(); - MinecraftForge.EVENT_BUS.unregister(timeListener); - failCondition.unregister(); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java similarity index 53% rename from src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java rename to src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 6765ae88..5e552f60 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedEventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixUtil; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.Phase; @@ -8,20 +9,22 @@ import java.util.function.Consumer; -public class TickTimedEventCondition extends Condition { +public class TickTimedCondition extends Condition { private final Consumer listener; private final Condition subCondition; - private final boolean respectSubExpire; + private final Result onSubSuccess; + private final Result onSubFailure; - //TickEvent extends this, so this needs to be protected vs private - protected int current; + private int current; - public TickTimedEventCondition(Type type, Phase phase, Condition subCondition, boolean respectSubExpire, int timeout) { - assert timeout >= 0; // TODO Assert util + public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, Condition subCondition, Result onSubSuccess, Result onSubFailure) { + RadixUtil.assertTrue(timeout >= 0, "timeout must be >= 0"); + RadixUtil.assertTrue(onTimeout != Result.NONE, "onTimeout must be != NONE"); this.subCondition = subCondition; - this.respectSubExpire = respectSubExpire; + this.onSubSuccess = onSubSuccess; + this.onSubFailure = onSubFailure; this.current = 0; @@ -29,17 +32,17 @@ public TickTimedEventCondition(Type type, Phase phase, Condition subCondition, b if (event.type == type && event.phase == phase) { this.current += 1; if (this.current >= timeout) { - this.onExpire.run(); + runOn(onTimeout).run(); } } }; } @Override - public void register(Runnable onSuccess, Runnable onExpire) { - super.register(onSuccess, onExpire); + public void register(Runnable onSuccess, Runnable onFailure) { + super.register(onSuccess, onFailure); // TODO is this the correct approach? - this.subCondition.register(onSuccess, this.respectSubExpire ? onExpire : () -> {}); + this.subCondition.register(runOn(this.onSubSuccess), runOn(this.onSubFailure)); MinecraftForge.EVENT_BUS.addListener(listener); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 29890d88..cab10125 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.mojang.blaze3d.platform.InputConstants.Key; import net.minecraftforge.client.event.InputEvent.KeyInputEvent; import net.minecraftforge.common.MinecraftForge; @@ -19,8 +20,8 @@ public class KeyHoldCondition extends Condition { private int currentHolding; public KeyHoldCondition(Key key, int duration, int timeout) { - assert duration >= 0; // TODO Assert util - assert timeout >= 0; // TODO Assert util + RadixUtil.assertTrue(duration >= 0, "duration must be >= 0"); + RadixUtil.assertTrue(timeout >= 0, "timeout must be >= 0"); this.currentTotal = 0; this.isHolding = false; @@ -35,7 +36,7 @@ public KeyHoldCondition(Key key, int duration, int timeout) { this.isHolding = false; } } else { - this.onExpire.run(); + this.onFailure.run(); } }; @@ -49,15 +50,15 @@ public KeyHoldCondition(Key key, int duration, int timeout) { } } if (this.currentTotal >= timeout) { - this.onExpire.run(); + this.onFailure.run(); } } }; } @Override - public void register(Runnable onSuccess, Runnable onExpire) { - super.register(onSuccess, onExpire); + public void register(Runnable onSuccess, Runnable onFailure) { + super.register(onSuccess, onFailure); MinecraftForge.EVENT_BUS.addListener(keyInputListener); MinecraftForge.EVENT_BUS.addListener(clientTickListener); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index 9b9d9ced..0b6659c7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -1,17 +1,17 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.mojang.blaze3d.platform.InputConstants.Key; import net.minecraftforge.client.event.InputEvent.KeyInputEvent; import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.Type; import org.lwjgl.glfw.GLFW; -public class KeyPressCondition extends TickTimedEventCondition { +public class KeyPressCondition extends TickTimedCondition { public KeyPressCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, new EventCondition( + super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition( event -> event.getAction() == GLFW.GLFW_PRESS && event.getKey() == key.getValue() - ), false, timeout); + ), Result.SUCCESS, Result.FAILURE); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java index 299f80ec..dfca6b91 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -1,16 +1,16 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.skill.util.KeyboardData; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.event.TickEvent; -public class KeyPressedCondition extends TickTimedEventCondition { +public class KeyPressedCondition extends TickTimedCondition { //Upon *any* key (not including modifiers or wasd) being pressed, return true public KeyPressedCondition(int timeout) { - super(TickEvent.Type.CLIENT, TickEvent.Phase.START, new EventCondition( + super(TickEvent.Type.CLIENT, TickEvent.Phase.START, timeout, Result.FAILURE, new EventCondition( event -> !KeyboardData.ignore(event.getKey()) - ), false, timeout); + ), Result.SUCCESS, Result.FAILURE); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java index 3b82a378..1f6d21c6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java @@ -1,17 +1,17 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.mojang.blaze3d.platform.InputConstants.Key; import net.minecraftforge.client.event.InputEvent.KeyInputEvent; import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.Type; import org.lwjgl.glfw.GLFW; -public class KeyReleaseCondition extends TickTimedEventCondition { +public class KeyReleaseCondition extends TickTimedCondition { public KeyReleaseCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, new EventCondition( + super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition( event -> event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == key.getValue() - ), false, timeout); + ), Result.SUCCESS, Result.FAILURE); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java index 34a783e2..b7dd9446 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java @@ -1,15 +1,15 @@ package com.amuzil.omegasource.magus.radix.condition.util; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.Condition.Result; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedEventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.skill.activateable.KeyCombination; import com.amuzil.omegasource.magus.skill.activateable.KeyInfo; import com.amuzil.omegasource.magus.skill.activateable.KeyPermutation; -import com.mojang.blaze3d.platform.InputConstants; -import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.client.event.InputEvent.KeyInputEvent; import net.minecraftforge.event.TickEvent; import java.util.LinkedList; @@ -19,35 +19,40 @@ * Still has to be turned into tree. */ public class ConditionConverter { - - public static LinkedList keysToConditions(KeyCombination keys) { - LinkedList ls = new LinkedList<>(); - for (KeyPermutation keyP : keys.getKeys()) - ls.addAll(keysToConditions(keyP)); - return ls; - } - - public static LinkedList keysToConditions(KeyPermutation keys) { - LinkedList ls = new LinkedList<>(); - for (KeyInfo key : keys.getKeys()) - ls.addAll(keyToConditions(key)); - return ls; - } - - public static LinkedList keyToConditions(KeyInfo key) { - LinkedList ls = new LinkedList<>(); - - //Any time less than this is just a key press. - if (key.getHeld() > 3) - ls.add(new KeyHoldCondition(key.getKey(), key.getHeld(), 50)); - else ls.add(new KeyPressCondition(key.getKey(), 50)); - - if (key.getMinDelay() > 0) - //TODO: Fix this to account for "action keys". - ls.add(new TickTimedEventCondition(TickEvent.Type.CLIENT, TickEvent.Phase.START, - new EventCondition( - event -> false), false, key.getMinDelay())); - - return ls; - } + /** + * Minimum amount of ticks a key must be pressed for it to be considered a held condition. + */ + public static final int HELD_THRESHOLD = 3; + + public static LinkedList combinationToConditions(KeyCombination combination) { + return combination.getKeys().stream().map(ConditionConverter::permutationToConditions) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll); + } + + public static LinkedList permutationToConditions(KeyPermutation permutation) { + // TODO ensure the order is preserved + return permutation.getKeys().stream().map(ConditionConverter::keyToConditions) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll); + } + + public static LinkedList keyToConditions(KeyInfo key) { + LinkedList conditions = new LinkedList<>(); + + // Any time less than this is just a key press. + conditions.add(key.getHeld() > HELD_THRESHOLD + ? new KeyHoldCondition(key.getKey(), key.getHeld(), 50) + : new KeyPressCondition(key.getKey(), 50) + ); + + if (key.getMinDelay() > 0) { + //TODO: Fix this to account for "action keys". + conditions.add(new TickTimedCondition( + TickEvent.Type.CLIENT, TickEvent.Phase.START, + key.getMinDelay(), Result.SUCCESS, + new EventCondition(event -> false), Result.SUCCESS, Result.FAILURE + )); + } + + return conditions; + } } From 21ee55d98d49925d59da4afa914f8e7faa4c617a Mon Sep 17 00:00:00 2001 From: Mahtaran Date: Thu, 18 Aug 2022 02:33:33 +0200 Subject: [PATCH 021/469] :recycle: clean up deprecated code --- .../com/amuzil/omegasource/magus/Magus.java | 148 +++++++++--------- 1 file changed, 75 insertions(+), 73 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index c94767c5..9e206b56 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -29,43 +29,43 @@ @Mod(Magus.MOD_ID) public class Magus { - //MODID reference - public static final String MOD_ID = "magus"; - // Directly reference a log4j logger. - private static final Logger LOGGER = LogManager.getLogger(); - - public Magus() { - // Register the setup method for mod loading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); - // Register the enqueueIMC method for mod loading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC); - // Register the processIMC method for mod loading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); - // Register the doClientStuff method for mod loading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); - - // Register ourselves for server and other game events we are interested in - MinecraftForge.EVENT_BUS.register(this); - } - - private void setup(final FMLCommonSetupEvent event) { - // some pre init code - LOGGER.info("HELLO FROM PRE INIT"); - LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); - - - - //Testing for some conditions - - //Note: this is only executed client-side, due to how events work. Be sure to send a packet! - Condition test = keyToConditions(new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_X), - 0, 40)).get(0); - test.register(() -> { - System.out.println("Success??"); - test.unregister(); - }, () -> {}); - - //More testing: + //MODID reference + public static final String MOD_ID = "magus"; + // Directly reference a log4j logger. + private static final Logger LOGGER = LogManager.getLogger(); + + public Magus() { + // Register the setup method for mod loading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); + // Register the enqueueIMC method for mod loading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC); + // Register the processIMC method for mod loading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); + // Register the doClientStuff method for mod loading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); + + // Register ourselves for server and other game events we are interested in + MinecraftForge.EVENT_BUS.register(this); + } + + private void setup(final FMLCommonSetupEvent event) { + // some pre init code + LOGGER.info("HELLO FROM PRE INIT"); + LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); + + + //Testing for some conditions + + //Note: this is only executed client-side, due to how events work. Be sure to send a packet! + Condition test = keyToConditions( + new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 40) + ).get(0); + test.register(() -> { + System.out.println("Success??"); + test.unregister(); + }, () -> {}); + + //More testing: // KeyInfo k1 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D), 10, 10), // k2 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D)), // k3 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_S), 0, 5), @@ -99,40 +99,42 @@ private void setup(final FMLCommonSetupEvent event) { // // for (Condition c : conds) // System.out.println(c); - } - - private void doClientStuff(final FMLClientSetupEvent event) { - // do something that can only be done on the client - } - - private void enqueueIMC(final InterModEnqueueEvent event) { - // some example code to dispatch IMC to another mod - InterModComms.sendTo("magus", "helloworld", () -> { - LOGGER.info("Hello world from the MDK"); - return "Hello world"; - }); - } - - private void processIMC(final InterModProcessEvent event) { - // some example code to receive and process InterModComms from other mods - LOGGER.info("Got IMC {}", event.getIMCStream().map(m -> m.getMessageSupplier().get()).collect(Collectors.toList())); - } - - // You can use SubscribeEvent and let the Event Bus discover methods to call - @SubscribeEvent - public void onServerStarting(FMLDedicatedServerSetupEvent event) { - // do something when the server starts - LOGGER.info("HELLO from server starting"); - } - - // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD - // Event bus for receiving Registry Events) - @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) - public static class RegistryEvents { - @SubscribeEvent - public static void onBlocksRegistry(final RegistryEvent.Register blockRegistryEvent) { - // register a new block here - LOGGER.info("HELLO from Register Block"); - } - } + } + + private void doClientStuff(final FMLClientSetupEvent event) { + // do something that can only be done on the client + } + + private void enqueueIMC(final InterModEnqueueEvent event) { + // some example code to dispatch IMC to another mod + InterModComms.sendTo("magus", "helloworld", () -> { + LOGGER.info("Hello world from the MDK"); + return "Hello world"; + }); + } + + private void processIMC(final InterModProcessEvent event) { + // some example code to receive and process InterModComms from other mods + LOGGER.info("Got IMC {}", + event.getIMCStream().map(message -> message.messageSupplier().get()).collect(Collectors.toList()) + ); + } + + // You can use SubscribeEvent and let the Event Bus discover methods to call + @SubscribeEvent + public void onServerStarting(FMLDedicatedServerSetupEvent event) { + // do something when the server starts + LOGGER.info("HELLO from server starting"); + } + + // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD + // Event bus for receiving Registry Events) + @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) + public static class RegistryEvents { + @SubscribeEvent + public static void onBlocksRegistry(final RegistryEvent.Register blockRegistryEvent) { + // register a new block here + LOGGER.info("HELLO from Register Block"); + } + } } From a2f24ca225b9896b25381203081571dba412dca9 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 18 Aug 2022 14:19:10 +1000 Subject: [PATCH 022/469] refactoring; still getting class cast exceptions --- .../com/amuzil/omegasource/magus/Magus.java | 10 ++++++---- .../amuzil/omegasource/magus/radix/Node.java | 18 +++++++++--------- .../minecraft/forge/EventCondition.java | 13 +++++++++---- .../forge/key/KeyPressedCondition.java | 2 +- .../condition/util/ConditionConverter.java | 4 ++-- .../{KeyInfo.java => KeyInput.java} | 10 +++++----- .../skill/activateable/KeyPermutation.java | 8 ++++---- 7 files changed, 36 insertions(+), 29 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/activateable/{KeyInfo.java => KeyInput.java} (84%) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 9e206b56..e098670a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,7 +1,8 @@ package com.amuzil.omegasource.magus; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.activateable.KeyInfo; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; +import com.amuzil.omegasource.magus.skill.activateable.KeyInput; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -58,11 +59,12 @@ private void setup(final FMLCommonSetupEvent event) { //Note: this is only executed client-side, due to how events work. Be sure to send a packet! Condition test = keyToConditions( - new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 40) + new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 40) ).get(0); - test.register(() -> { + Condition wait = new KeyPressedCondition(40); + wait.register(() -> { System.out.println("Success??"); - test.unregister(); + wait.unregister(); }, () -> {}); //More testing: diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 68be3fa5..497aba0c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -4,18 +4,18 @@ import java.util.function.Consumer; /** - * @param children If a condition is fulfilled, the active node moves down to the mapped child node - * @param onEnter Called when the active node is moved down from the parent node to this node - * @param onLeave Called when the active node is moved down from this node to a child node - * @param onTerminate Called when the active node is moved up to the root node because either all children's conditions have expired or the terminate condition has been fulfilled + * @param children If a condition is fulfilled, the active node moves down to the mapped child node + * @param onEnter Called when the active node is moved down from the parent node to this node + * @param onLeave Called when the active node is moved down from this node to a child node + * @param onTerminate Called when the active node is moved up to the root node because either all children's conditions have expired or the terminate condition has been fulfilled * @param terminateCondition If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate */ public record Node( - Map children, - Consumer onEnter, - Consumer onLeave, - Consumer onTerminate, - Condition terminateCondition + Map children, + Consumer onEnter, + Consumer onLeave, + Consumer onTerminate, + Condition terminateCondition ) { } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index 30bd6942..3027bdcf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -12,10 +12,15 @@ public class EventCondition extends Condition { public EventCondition(Function condition) { this.listener = event -> { - if (condition.apply(event)) { - this.onSuccess.run(); - } else { - this.onFailure.run(); + try { + if (condition.apply(event)) { + this.onSuccess.run(); + } else { + this.onFailure.run(); + } + } + catch (ClassCastException e) { + e.printStackTrace(); } }; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java index dfca6b91..019af987 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -9,7 +9,7 @@ public class KeyPressedCondition extends TickTimedCondition { //Upon *any* key (not including modifiers or wasd) being pressed, return true public KeyPressedCondition(int timeout) { - super(TickEvent.Type.CLIENT, TickEvent.Phase.START, timeout, Result.FAILURE, new EventCondition( + super(TickEvent.Type.CLIENT, TickEvent.Phase.START, timeout, Result.SUCCESS, new EventCondition( event -> !KeyboardData.ignore(event.getKey()) ), Result.SUCCESS, Result.FAILURE); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java index b7dd9446..e1060faa 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java @@ -7,7 +7,7 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.skill.activateable.KeyCombination; -import com.amuzil.omegasource.magus.skill.activateable.KeyInfo; +import com.amuzil.omegasource.magus.skill.activateable.KeyInput; import com.amuzil.omegasource.magus.skill.activateable.KeyPermutation; import net.minecraftforge.client.event.InputEvent.KeyInputEvent; import net.minecraftforge.event.TickEvent; @@ -35,7 +35,7 @@ public static LinkedList permutationToConditions(KeyPermutation permu .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll); } - public static LinkedList keyToConditions(KeyInfo key) { + public static LinkedList keyToConditions(KeyInput key) { LinkedList conditions = new LinkedList<>(); // Any time less than this is just a key press. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInfo.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInput.java similarity index 84% rename from src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInfo.java rename to src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInput.java index d0cb22d0..e818ddb1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInfo.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInput.java @@ -3,7 +3,7 @@ import com.mojang.blaze3d.platform.InputConstants; //Takes a key, delay, and held length. -public class KeyInfo { +public class KeyInput { private InputConstants.Key key; //In ticks (20 ticks a second). Can be used to make someone wait between key presses for something. @@ -15,25 +15,25 @@ public class KeyInfo { private int held; - public KeyInfo() { + public KeyInput() { this.key = InputConstants.UNKNOWN; this.minDelay = 0; this.held = -1; } - public KeyInfo(InputConstants.Key key) { + public KeyInput(InputConstants.Key key) { this.key = key; this.minDelay = 0; this.held = - 1; } - public KeyInfo(InputConstants.Key key, int delay) { + public KeyInput(InputConstants.Key key, int delay) { this.key = key; this.minDelay = delay; this.held = -1; } - public KeyInfo(InputConstants.Key key, int delay, int held) { + public KeyInput(InputConstants.Key key, int delay, int held) { this.key = key; this.minDelay = delay; this.held = held; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java index 2eff7cf4..a681c2e7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java @@ -13,22 +13,22 @@ public class KeyPermutation { //Key and delay. - private List keys; + private List keys; public KeyPermutation() { this.keys = new ArrayList<>(); } - public KeyPermutation(List keys) { + public KeyPermutation(List keys) { this.keys = keys; } - public KeyPermutation(KeyInfo info) { + public KeyPermutation(KeyInput info) { this.keys = new ArrayList<>(); this.keys.add(info); } - public List getKeys() { + public List getKeys() { return this.keys; } From df253d75d79719a485509d66d5919553065e76af Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 18 Aug 2022 15:53:45 +1000 Subject: [PATCH 023/469] refactoring; going to redo conditions and make a condition builder --- .../com/amuzil/omegasource/magus/Magus.java | 4 +- .../condition/util/ConditionConverter.java | 22 ++++---- .../skill/activateable/KeyCombination.java | 29 ---------- .../magus/skill/activateable/KeyInput.java | 53 ------------------- .../skill/activateable/KeyPermutation.java | 35 ------------ .../activateable/key/KeyCombination.java | 11 ++++ .../skill/activateable/key/KeyInput.java | 14 +++++ .../activateable/key/KeyPermutation.java | 15 ++++++ 8 files changed, 54 insertions(+), 129 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInput.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyCombination.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyPermutation.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index e098670a..d521ef74 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -2,7 +2,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; -import com.amuzil.omegasource.magus.skill.activateable.KeyInput; +import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -59,7 +59,7 @@ private void setup(final FMLCommonSetupEvent event) { //Note: this is only executed client-side, due to how events work. Be sure to send a packet! Condition test = keyToConditions( - new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 40) + new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) ).get(0); Condition wait = new KeyPressedCondition(40); wait.register(() -> { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java index e1060faa..10ada211 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java @@ -6,9 +6,9 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; -import com.amuzil.omegasource.magus.skill.activateable.KeyCombination; -import com.amuzil.omegasource.magus.skill.activateable.KeyInput; -import com.amuzil.omegasource.magus.skill.activateable.KeyPermutation; +import com.amuzil.omegasource.magus.skill.activateable.key.KeyCombination; +import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; +import com.amuzil.omegasource.magus.skill.activateable.key.KeyPermutation; import net.minecraftforge.client.event.InputEvent.KeyInputEvent; import net.minecraftforge.event.TickEvent; @@ -23,15 +23,16 @@ public class ConditionConverter { * Minimum amount of ticks a key must be pressed for it to be considered a held condition. */ public static final int HELD_THRESHOLD = 3; + public static final int TIMEOUT_THRESHOLD = 50; public static LinkedList combinationToConditions(KeyCombination combination) { - return combination.getKeys().stream().map(ConditionConverter::permutationToConditions) + return combination.keys().stream().map(ConditionConverter::permutationToConditions) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll); } public static LinkedList permutationToConditions(KeyPermutation permutation) { // TODO ensure the order is preserved - return permutation.getKeys().stream().map(ConditionConverter::keyToConditions) + return permutation.keys().stream().map(ConditionConverter::keyToConditions) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll); } @@ -39,16 +40,17 @@ public static LinkedList keyToConditions(KeyInput key) { LinkedList conditions = new LinkedList<>(); // Any time less than this is just a key press. - conditions.add(key.getHeld() > HELD_THRESHOLD - ? new KeyHoldCondition(key.getKey(), key.getHeld(), 50) - : new KeyPressCondition(key.getKey(), 50) + // TODO: Adjust timeout to be per node. + conditions.add(key.held() > HELD_THRESHOLD + ? new KeyHoldCondition(key.key(), key.held(), TIMEOUT_THRESHOLD) + : new KeyPressCondition(key.key(), TIMEOUT_THRESHOLD) ); - if (key.getMinDelay() > 0) { + if (key.minDelay() > 0) { //TODO: Fix this to account for "action keys". conditions.add(new TickTimedCondition( TickEvent.Type.CLIENT, TickEvent.Phase.START, - key.getMinDelay(), Result.SUCCESS, + key.maxDelay(), Result.SUCCESS, new EventCondition(event -> false), Result.SUCCESS, Result.FAILURE )); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java deleted file mode 100644 index 596787bf..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyCombination.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.amuzil.omegasource.magus.skill.activateable; - -import java.util.LinkedList; - -/** - * Stores all possible permutations. - */ -public class KeyCombination { - - private LinkedList keys; - - public KeyCombination() { - this.keys = new LinkedList<>(); - } - - public KeyCombination(KeyPermutation keyP) { - this.keys = new LinkedList<>(); - this.keys.add(keyP); - } - - public KeyCombination (LinkedList keys) { - this.keys = keys; - } - - public LinkedList getKeys() { - return this.keys; - } - -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInput.java deleted file mode 100644 index e818ddb1..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyInput.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.amuzil.omegasource.magus.skill.activateable; - -import com.mojang.blaze3d.platform.InputConstants; - -//Takes a key, delay, and held length. -public class KeyInput { - - private InputConstants.Key key; - //In ticks (20 ticks a second). Can be used to make someone wait between key presses for something. - private int minDelay; - //Maximum delay before the listener should stop caring - private int maxDelay; - //Also in ticks. -1 to 1 all are effectively just pressed. Remember, this class doesn't check - //the logic, only provides the values for which to apply it with. - private int held; - - - public KeyInput() { - this.key = InputConstants.UNKNOWN; - this.minDelay = 0; - this.held = -1; - } - - public KeyInput(InputConstants.Key key) { - this.key = key; - this.minDelay = 0; - this.held = - 1; - } - - public KeyInput(InputConstants.Key key, int delay) { - this.key = key; - this.minDelay = delay; - this.held = -1; - } - - public KeyInput(InputConstants.Key key, int delay, int held) { - this.key = key; - this.minDelay = delay; - this.held = held; - } - - public InputConstants.Key getKey() { - return this.key; - } - - public int getMinDelay() { - return this.minDelay; - } - - public int getHeld() { - return this.held; - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java deleted file mode 100644 index a681c2e7..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/KeyPermutation.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.amuzil.omegasource.magus.skill.activateable; - -import java.util.ArrayList; -import java.util.List; - -/** - * Essentially a wrapper class for a part of combination/sequential list of keys. - * This is meant to be a fragment of a whole key-combination, and it allows developers - * to break up the combination in a way that's readable + makes sense. - * ONLY SUPPORTS MULTIPLE KEYS AT ONCE. DELAY IS USELESS HERE. If multiple keys are passed with *different* delay, - * the key with the most delay will be read. - */ -public class KeyPermutation { - - //Key and delay. - private List keys; - - public KeyPermutation() { - this.keys = new ArrayList<>(); - } - - public KeyPermutation(List keys) { - this.keys = keys; - } - - public KeyPermutation(KeyInput info) { - this.keys = new ArrayList<>(); - this.keys.add(info); - } - - public List getKeys() { - return this.keys; - } - -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyCombination.java new file mode 100644 index 00000000..7c4bfef6 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyCombination.java @@ -0,0 +1,11 @@ +package com.amuzil.omegasource.magus.skill.activateable.key; + +import java.util.LinkedList; + +/** + * Stores all possible permutations. + */ +public record KeyCombination ( + LinkedList keys +) { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java new file mode 100644 index 00000000..f60efc4f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java @@ -0,0 +1,14 @@ +package com.amuzil.omegasource.magus.skill.activateable.key; + +import com.mojang.blaze3d.platform.InputConstants; + +import java.util.LinkedList; + +//Takes a key, delay, and held length. +public record KeyInput ( + InputConstants.Key key, + int minDelay, + int maxDelay, + int held +) { +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyPermutation.java new file mode 100644 index 00000000..e00632f7 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyPermutation.java @@ -0,0 +1,15 @@ +package com.amuzil.omegasource.magus.skill.activateable.key; + +import java.util.LinkedList; + +/** + * Essentially a wrapper class for a part of combination/sequential list of keys. + * This is meant to be a fragment of a whole key-combination, and it allows developers + * to break up the combination in a way that's readable + makes sense. + * ONLY SUPPORTS MULTIPLE KEYS AT ONCE. DELAY IS USELESS HERE. If multiple keys are passed with *different* delay, + * the key with the most delay will be read. + */ +public record KeyPermutation ( + LinkedList keys +) { +} From 63888294e5ed3a55400b1f687f2ad13b6a965b30 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 18 Aug 2022 22:05:27 +1000 Subject: [PATCH 024/469] trying to update but it doesn't work --- build.gradle | 28 +++------ gradlew | 16 +++-- gradlew.bat | 14 +++-- .../com/amuzil/omegasource/magus/Magus.java | 14 +++++ .../magus/skill/activateable/Activator.java | 59 ++---------------- .../skill/activateable/ConditionBuilder.java | 61 ++++++++++++++++++ .../skill/activateable/key/KeyInput.java | 3 +- src/main/resources/META-INF/mods.toml | 62 +++++++++++-------- src/main/resources/pack.mcmeta | 8 ++- 9 files changed, 150 insertions(+), 115 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/activateable/ConditionBuilder.java diff --git a/build.gradle b/build.gradle index 49bfffc2..868c6db2 100644 --- a/build.gradle +++ b/build.gradle @@ -9,15 +9,15 @@ buildscript { } } // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. + plugins { id 'eclipse' id 'maven-publish' + id 'net.minecraftforge.gradle' version '5.1.+' } -apply plugin: 'net.minecraftforge.gradle' - version = '1.0' -group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +group = 'com.amuzil.omegasource' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'magus' // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. @@ -38,7 +38,7 @@ minecraft { // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. - mappings channel: 'official', version: '1.18.2' + mappings channel: 'official', version: '1.19.2' // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. @@ -77,8 +77,7 @@ minecraft { property 'forge.logging.console.level', 'debug' - // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. - property 'forge.enabledGameTestNamespaces', 'magus' + property 'forge.enabledGameTestNamespaces', 'examplemod' mods { examplemod { @@ -93,20 +92,11 @@ minecraft { gameTestServer { workingDirectory project.file('run') - // Recommended logging data for a userdev environment - // The markers can be added/remove as needed separated by commas. - // "SCAN": For mods scan. - // "REGISTRIES": For firing of registry events. - // "REGISTRYDUMP": For getting the contents of all registries. property 'forge.logging.markers', 'REGISTRIES' - // Recommended logging level for the console - // You can set various levels here. - // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' - // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. - property 'forge.enabledGameTestNamespaces', 'magus' + property 'forge.enabledGameTestNamespaces', 'examplemod' mods { examplemod { @@ -151,7 +141,7 @@ dependencies { // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. - minecraft 'net.minecraftforge:forge:1.18.2-40.0.24' + minecraft 'net.minecraftforge:forge:1.19.2-43.1.1' // Real mod deobf dependency examples - these get remapped to your current mappings // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency @@ -171,11 +161,11 @@ jar { manifest { attributes([ "Specification-Title" : "magus", - "Specification-Vendor" : "OmegaSource", + "Specification-Vendor" : "Omega Source", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "examplemodsareus", + "Implementation-Vendor" : "omegasource", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } diff --git a/gradlew b/gradlew index c53aefaa..a69d9cb6 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # @@ -205,6 +205,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32..f127cfd4 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index d521ef74..d0640529 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.Minecraft; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; @@ -139,4 +140,17 @@ public static void onBlocksRegistry(final RegistryEvent.Register blockReg LOGGER.info("HELLO from Register Block"); } } + + //Copied for 1.19 + @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) + public static class ClientModEvents + { + @SubscribeEvent + public static void onClientSetup(FMLClientSetupEvent event) + { + // Some client setup code + LOGGER.info("HELLO FROM CLIENT SETUP"); + LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); + } + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java index 0ca390d3..d1eadc15 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java @@ -1,59 +1,12 @@ package com.amuzil.omegasource.magus.skill.activateable; -/** - * Covers all the different ways to activate an ability. - * Gonna use an enum to describe for now. Will update that later; think of it as a placeholder. - */ -public class Activator { - - //Will fix this later - public Activator() { - } - /** - * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and - * consolidate for good code practice later. - */ - public enum ActivationType { - RADIAL, - HOTKEY, - MULTIKEY, - GESTURE - } - - public enum RadialType { - MOUSE, - NUMBER - } +import com.amuzil.omegasource.magus.radix.Condition; - /** - * These 2 types are generally used for multikey. Initialise is how to start listening for the hotkey or key combo, - * and the execution is when to stop. - */ - public enum InitialiseType { - TOGGLE, - HOLD - } - - public enum ExecuteType { - DESIGNATED, - SPECIAL - } +import java.util.LinkedList; - /** - * Covers a range of VR gestures for those who aren't too flexible or athletically inclined, and those - * who are quite adept in their range of motion. - */ - public enum GestureType { - SIMPLE, - COMPLEX - } - - /** - * Simple activators take direct events/information to pass to a listener (radial menu and such). - * Complex take other activators and simple events. - */ - public enum ActivatorType { - SIMPLE, - COMPLEX +public class Activator { + //Returns a linked list of all conditions derived from the current class + public LinkedList toCondition() { + return new LinkedList<>(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/ConditionBuilder.java new file mode 100644 index 00000000..418273a5 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/ConditionBuilder.java @@ -0,0 +1,61 @@ +package com.amuzil.omegasource.magus.skill.activateable; + +/** + * Covers all the different ways to activate an ability. + * Gonna use an enum to describe for now. Will update that later; think of it as a placeholder. + */ +public class ConditionBuilder { + + //Will fix this later. + + //TODO: Make this a builder class, similar to NodeBuilder + public ConditionBuilder() { + } + /** + * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and + * consolidate for good code practice later. + */ + public enum ActivationType { + RADIAL, + HOTKEY, + MULTIKEY, + GESTURE + } + + public enum RadialType { + MOUSE, + NUMBER + } + + /** + * These 2 types are generally used for multikey. Initialise is how to start listening for the hotkey or key combo, + * and the execution is when to stop. + */ + public enum InitialiseType { + TOGGLE, + HOLD + } + + public enum ExecuteType { + DESIGNATED, + SPECIAL + } + + /** + * Covers a range of VR gestures for those who aren't too flexible or athletically inclined, and those + * who are quite adept in their range of motion. + */ + public enum GestureType { + SIMPLE, + COMPLEX + } + + /** + * Simple activators take direct events/information to pass to a listener (radial menu and such). + * Complex take other activators and simple events. + */ + public enum ActivatorType { + SIMPLE, + COMPLEX + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java index f60efc4f..4c5cf942 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java @@ -1,9 +1,8 @@ package com.amuzil.omegasource.magus.skill.activateable.key; +import com.amuzil.omegasource.magus.skill.activateable.Activator; import com.mojang.blaze3d.platform.InputConstants; -import java.util.LinkedList; - //Takes a key, delay, and held length. public record KeyInput ( InputConstants.Key key, diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 3ff727c7..2d172fcf 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -4,36 +4,44 @@ # Note that there are a couple of TOML lists in this file. # Find more information on toml format here: https://github.com/toml-lang/toml # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml -modLoader = "javafml" #mandatory +modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version -loaderVersion = "[36,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +loaderVersion="[43,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. # The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. # Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. -license = "All rights reserved" +license="All rights reserved" # A URL to refer people to when problems occur with this mod #issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod -modId = "magus" #mandatory +modId="magus" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata # see the associated build.gradle script for how to populate this completely automatically during a build -version = "${file.jarVersion}" #mandatory -# A display name for the mod -displayName = "Magus" #mandatory +version="${file.jarVersion}" #mandatory + # A display name for the mod +displayName="Magus #mandatory # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ #updateJSONURL="https://change.me.example.invalid/updates.json" #optional # A URL for the "homepage" for this mod, displayed in the mod UI #displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional # A file name (in the root of the mod JAR) containing a logo for display -logoFile = "todo-magus.png" #optional TODO +logoFile="examplemod.png" #optional # A text field displayed in the mod UI -credits = "Credits to be added!" #optional TODO +credits="Thanks for this example mod goes to Java" #optional # A text field displayed in the mod UI -authors = "Mahtaran & FavouriteDragon" #optional TODO -# The description text for the mod (multi line!) (#mandatory) TODO -description = ''' +authors="Love, Cheese and small house plants" #optional +# Display Test controls the display for your mod in the server connection screen +# MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod. +# IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod. +# IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component. +# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value. +# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself. +#displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional) + +# The description text for the mod (multi line!) (#mandatory) +description=''' This is a long form description of the mod. You can write whatever you want here Have some lorem ipsum. @@ -42,21 +50,21 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn ''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. [[dependencies.magus]] #optional -# the modid of the dependency -modId = "forge" #mandatory -# Does this dependency have to exist - if not, ordering below must be specified -mandatory = true #mandatory -# The version range of the dependency -versionRange = "[36,)" #mandatory -# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory -ordering = "NONE" -# Side this dependency is applied on - BOTH, CLIENT or SERVER -side = "BOTH" + # the modid of the dependency + modId="forge" #mandatory + # Does this dependency have to exist - if not, ordering below must be specified + mandatory=true #mandatory + # The version range of the dependency + versionRange="[43,)" #mandatory + # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory + ordering="NONE" + # Side this dependency is applied on - BOTH, CLIENT or SERVER + side="BOTH" # Here's another dependency [[dependencies.magus]] -modId = "minecraft" -mandatory = true + modId="minecraft" + mandatory=true # This version range declares a minimum of the current minecraft version up to but not including the next major version -versionRange = "[1.18.2, 1.19)" -ordering = "NONE" -side = "BOTH" + versionRange="[1.19.2,1.20)" + ordering="NONE" + side="BOTH" diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index a79510ad..ca7d1d1d 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,7 +1,9 @@ { "pack": { - "description": "Magus resources", - "pack_format": 6, - "_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods." + "description": "Magus' resources", + "pack_format": 9, + "forge:resource_pack_format": 9, + "forge:data_pack_format": 10 } } + From 987d3c6d00972bea3a459c7d3ec1d9bb919ea165 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 18 Aug 2022 23:12:32 +1000 Subject: [PATCH 025/469] gradle isn't working (as per usual) --- build.gradle | 5 ++--- gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 60756 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 868c6db2..25c8ba8c 100644 --- a/build.gradle +++ b/build.gradle @@ -11,9 +11,8 @@ buildscript { // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. plugins { - id 'eclipse' - id 'maven-publish' - id 'net.minecraftforge.gradle' version '5.1.+' + id ('maven-publish') + id ('net.minecraftforge') version '5.1.+' } version = '1.0' diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2ae8848c63b8b4dea2cb829da983f2fa..249e5832f090a2944b7473328c07c9755baa3196 100644 GIT binary patch delta 10158 zcmaKSbyOWsmn~e}-QC?axCPf>!2<-jxI0|j{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e@%{WrvE&Jp#Lw^ zcj13CbsW+V>i@rj@SEfFf0@yjS@nbPB0)6D`lA;e%61nh`-qhydO!uS7jXGQd%i7opEnOL;| zDn!3EUm(V796;f?fA+RDF<@%qKlo)`0VtL74`!~516_aogYP%QfG#<2kQ!pijthz2 zpaFX3|D$%C7!bL242U?-e@2QZ`q$~lgZbvgfLLyVfT1OC5<8@6lLi=A{stK#zJmWd zlx+(HbgX)l$RGwH|2rV@P3o@xCrxch0$*z1ASpy(n+d4d2XWd~2AYjQm`xZU3af8F p+x$Nxf1895@0bJirXkdpJh+N7@Nb7x007(DEB&^Lm}dWn{T~m64-^0Z diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 41dfb879..8049c684 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 97af34013ea40968088844c9925c91af8c9befe6 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Fri, 19 Aug 2022 00:22:55 +1000 Subject: [PATCH 026/469] loads in, runClient doesn't finish --- build.gradle | 23 ++- .../com/amuzil/omegasource/magus/Magus.java | 177 +++++++++--------- .../minecraft/forge/key/KeyHoldCondition.java | 100 +++++----- .../forge/key/KeyPressCondition.java | 4 +- .../forge/key/KeyPressedCondition.java | 2 +- .../forge/key/KeyReleaseCondition.java | 4 +- .../condition/util/ConditionConverter.java | 4 +- .../magus/radix/leaf/MouseMovementLeaf.java | 60 +++--- .../magus/skill/util/KeyboardData.java | 4 - src/main/resources/META-INF/mods.toml | 14 +- src/main/resources/pack.mcmeta | 2 +- 11 files changed, 193 insertions(+), 201 deletions(-) diff --git a/build.gradle b/build.gradle index 25c8ba8c..7e00d407 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,10 @@ buildscript { // These repositories are only for Gradle plugins, put any other repositories in the repository block further below maven { url = 'https://maven.minecraftforge.net' } mavenCentral() + maven { + url "https://plugins.gradle.org/m2/" + } + } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true @@ -11,10 +15,11 @@ buildscript { // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. plugins { + //In case people use the inferior IDE + id ('eclipse') id ('maven-publish') - id ('net.minecraftforge') version '5.1.+' } - +apply plugin: 'net.minecraftforge.gradle' version = '1.0' group = 'com.amuzil.omegasource' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'magus' @@ -60,10 +65,10 @@ minecraft { property 'forge.logging.console.level', 'debug' // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. - property 'forge.enabledGameTestNamespaces', 'examplemod' + property 'forge.enabledGameTestNamespaces', 'magus' mods { - examplemod { + magus { source sourceSets.main } } @@ -76,10 +81,10 @@ minecraft { property 'forge.logging.console.level', 'debug' - property 'forge.enabledGameTestNamespaces', 'examplemod' + property 'forge.enabledGameTestNamespaces', 'magus' mods { - examplemod { + magus { source sourceSets.main } } @@ -95,10 +100,10 @@ minecraft { property 'forge.logging.console.level', 'debug' - property 'forge.enabledGameTestNamespaces', 'examplemod' + property 'forge.enabledGameTestNamespaces', 'magus' mods { - examplemod { + magus { source sourceSets.main } } @@ -115,7 +120,7 @@ minecraft { args '--mod', 'magus', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { - examplemod { + magus { source sourceSets.main } } diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index d0640529..5cb5b176 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -5,10 +5,8 @@ import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; -import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; @@ -31,44 +29,45 @@ @Mod(Magus.MOD_ID) public class Magus { - //MODID reference - public static final String MOD_ID = "magus"; - // Directly reference a log4j logger. - private static final Logger LOGGER = LogManager.getLogger(); - - public Magus() { - // Register the setup method for mod loading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); - // Register the enqueueIMC method for mod loading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC); - // Register the processIMC method for mod loading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); - // Register the doClientStuff method for mod loading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); - - // Register ourselves for server and other game events we are interested in - MinecraftForge.EVENT_BUS.register(this); - } - - private void setup(final FMLCommonSetupEvent event) { - // some pre init code - LOGGER.info("HELLO FROM PRE INIT"); - LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); - - - //Testing for some conditions - - //Note: this is only executed client-side, due to how events work. Be sure to send a packet! - Condition test = keyToConditions( - new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) + //MODID reference + public static final String MOD_ID = "magus"; + // Directly reference a log4j logger. + private static final Logger LOGGER = LogManager.getLogger(); + + public Magus() { + // Register the setup method for mod loading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); + // Register the enqueueIMC method for mod loading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC); + // Register the processIMC method for mod loading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); + // Register the doClientStuff method for mod loading + FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); + + // Register ourselves for server and other game events we are interested in + MinecraftForge.EVENT_BUS.register(this); + } + + private void setup(final FMLCommonSetupEvent event) { + // some pre init code + LOGGER.info("HELLO FROM PRE INIT"); + LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); + + + //Testing for some conditions + + //Note: this is only executed client-side, due to how events work. Be sure to send a packet! + Condition test = keyToConditions( + new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) ).get(0); - Condition wait = new KeyPressedCondition(40); - wait.register(() -> { - System.out.println("Success??"); - wait.unregister(); - }, () -> {}); - - //More testing: + Condition wait = new KeyPressedCondition(40); + wait.register(() -> { + System.out.println("Success??"); + wait.unregister(); + }, () -> { + }); + + //More testing: // KeyInfo k1 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D), 10, 10), // k2 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D)), // k3 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_S), 0, 5), @@ -102,55 +101,53 @@ private void setup(final FMLCommonSetupEvent event) { // // for (Condition c : conds) // System.out.println(c); - } - - private void doClientStuff(final FMLClientSetupEvent event) { - // do something that can only be done on the client - } - - private void enqueueIMC(final InterModEnqueueEvent event) { - // some example code to dispatch IMC to another mod - InterModComms.sendTo("magus", "helloworld", () -> { - LOGGER.info("Hello world from the MDK"); - return "Hello world"; - }); - } - - private void processIMC(final InterModProcessEvent event) { - // some example code to receive and process InterModComms from other mods - LOGGER.info("Got IMC {}", - event.getIMCStream().map(message -> message.messageSupplier().get()).collect(Collectors.toList()) - ); - } - - // You can use SubscribeEvent and let the Event Bus discover methods to call - @SubscribeEvent - public void onServerStarting(FMLDedicatedServerSetupEvent event) { - // do something when the server starts - LOGGER.info("HELLO from server starting"); - } - - // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD - // Event bus for receiving Registry Events) - @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) - public static class RegistryEvents { - @SubscribeEvent - public static void onBlocksRegistry(final RegistryEvent.Register blockRegistryEvent) { - // register a new block here - LOGGER.info("HELLO from Register Block"); - } - } - - //Copied for 1.19 - @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) - public static class ClientModEvents - { - @SubscribeEvent - public static void onClientSetup(FMLClientSetupEvent event) - { - // Some client setup code - LOGGER.info("HELLO FROM CLIENT SETUP"); - LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); - } - } + } + + private void doClientStuff(final FMLClientSetupEvent event) { + // do something that can only be done on the client + } + + private void enqueueIMC(final InterModEnqueueEvent event) { + // some example code to dispatch IMC to another mod + InterModComms.sendTo("magus", "helloworld", () -> { + LOGGER.info("Hello world from the MDK"); + return "Hello world"; + }); + } + + private void processIMC(final InterModProcessEvent event) { + // some example code to receive and process InterModComms from other mods + LOGGER.info("Got IMC {}", + event.getIMCStream().map(message -> message.messageSupplier().get()).collect(Collectors.toList()) + ); + } + + // You can use SubscribeEvent and let the Event Bus discover methods to call + @SubscribeEvent + public void onServerStarting(FMLDedicatedServerSetupEvent event) { + // do something when the server starts + LOGGER.info("HELLO from server starting"); + } + + // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD + // Event bus for receiving Registry Events) +// @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) +// public static class RegistryEvents { +// @SubscribeEvent +// public static void onBlocksRegistry(final RegistryEvent.Register blockRegistryEvent) { +// // register a new block here +// LOGGER.info("HELLO from Register Block"); +// } +// } + + //Copied for 1.19 + @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) + public static class ClientModEvents { + @SubscribeEvent + public static void onClientSetup(FMLClientSetupEvent event) { + // Some client setup code + LOGGER.info("HELLO FROM CLIENT SETUP"); + LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); + } + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index cab10125..3c1f0b92 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -3,7 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; import com.mojang.blaze3d.platform.InputConstants.Key; -import net.minecraftforge.client.event.InputEvent.KeyInputEvent; +import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent.ClientTickEvent; import org.lwjgl.glfw.GLFW; @@ -12,60 +12,60 @@ public class KeyHoldCondition extends Condition { - private final Consumer keyInputListener; - private final Consumer clientTickListener; + private final Consumer keyInputListener; + private final Consumer clientTickListener; - private int currentTotal; - private boolean isHolding; - private int currentHolding; + private int currentTotal; + private boolean isHolding; + private int currentHolding; - public KeyHoldCondition(Key key, int duration, int timeout) { - RadixUtil.assertTrue(duration >= 0, "duration must be >= 0"); - RadixUtil.assertTrue(timeout >= 0, "timeout must be >= 0"); + public KeyHoldCondition(Key key, int duration, int timeout) { + RadixUtil.assertTrue(duration >= 0, "duration must be >= 0"); + RadixUtil.assertTrue(timeout >= 0, "timeout must be >= 0"); - this.currentTotal = 0; - this.isHolding = false; - this.currentHolding = 0; + this.currentTotal = 0; + this.isHolding = false; + this.currentHolding = 0; - this.keyInputListener = event -> { - if (event.getKey() == key.getValue()) { - if (event.getAction() == GLFW.GLFW_PRESS) { - this.isHolding = true; - this.currentHolding = 0; - } else if (event.getAction() == GLFW.GLFW_RELEASE) { - this.isHolding = false; - } - } else { - this.onFailure.run(); - } - }; + this.keyInputListener = event -> { + if (event.getKey() == key.getValue()) { + if (event.getAction() == GLFW.GLFW_PRESS) { + this.isHolding = true; + this.currentHolding = 0; + } else if (event.getAction() == GLFW.GLFW_RELEASE) { + this.isHolding = false; + } + } else { + this.onFailure.run(); + } + }; - this.clientTickListener = event -> { - if (event.phase == ClientTickEvent.Phase.START) { - this.currentTotal += 1; - if (this.isHolding) { - this.currentHolding += 1; - if (this.currentHolding >= duration) { - this.onSuccess.run(); - } - } - if (this.currentTotal >= timeout) { - this.onFailure.run(); - } - } - }; - } + this.clientTickListener = event -> { + if (event.phase == ClientTickEvent.Phase.START) { + this.currentTotal += 1; + if (this.isHolding) { + this.currentHolding += 1; + if (this.currentHolding >= duration) { + this.onSuccess.run(); + } + } + if (this.currentTotal >= timeout) { + this.onFailure.run(); + } + } + }; + } - @Override - public void register(Runnable onSuccess, Runnable onFailure) { - super.register(onSuccess, onFailure); - MinecraftForge.EVENT_BUS.addListener(keyInputListener); - MinecraftForge.EVENT_BUS.addListener(clientTickListener); - } + @Override + public void register(Runnable onSuccess, Runnable onFailure) { + super.register(onSuccess, onFailure); + MinecraftForge.EVENT_BUS.addListener(keyInputListener); + MinecraftForge.EVENT_BUS.addListener(clientTickListener); + } - @Override - public void unregister() { - MinecraftForge.EVENT_BUS.unregister(keyInputListener); - MinecraftForge.EVENT_BUS.unregister(clientTickListener); - } + @Override + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(keyInputListener); + MinecraftForge.EVENT_BUS.unregister(clientTickListener); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index 0b6659c7..aae126ae 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -3,14 +3,14 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.mojang.blaze3d.platform.InputConstants.Key; -import net.minecraftforge.client.event.InputEvent.KeyInputEvent; +import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.Type; import org.lwjgl.glfw.GLFW; public class KeyPressCondition extends TickTimedCondition { public KeyPressCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition( + super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition( event -> event.getAction() == GLFW.GLFW_PRESS && event.getKey() == key.getValue() ), Result.SUCCESS, Result.FAILURE); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java index 019af987..06fb3c52 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -9,7 +9,7 @@ public class KeyPressedCondition extends TickTimedCondition { //Upon *any* key (not including modifiers or wasd) being pressed, return true public KeyPressedCondition(int timeout) { - super(TickEvent.Type.CLIENT, TickEvent.Phase.START, timeout, Result.SUCCESS, new EventCondition( + super(TickEvent.Type.CLIENT, TickEvent.Phase.START, timeout, Result.SUCCESS, new EventCondition( event -> !KeyboardData.ignore(event.getKey()) ), Result.SUCCESS, Result.FAILURE); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java index 1f6d21c6..4b2f4707 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java @@ -3,14 +3,14 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.mojang.blaze3d.platform.InputConstants.Key; -import net.minecraftforge.client.event.InputEvent.KeyInputEvent; +import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.Type; import org.lwjgl.glfw.GLFW; public class KeyReleaseCondition extends TickTimedCondition { public KeyReleaseCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition( + super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition( event -> event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == key.getValue() ), Result.SUCCESS, Result.FAILURE); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java index 10ada211..6f07b75d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java @@ -9,7 +9,7 @@ import com.amuzil.omegasource.magus.skill.activateable.key.KeyCombination; import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.amuzil.omegasource.magus.skill.activateable.key.KeyPermutation; -import net.minecraftforge.client.event.InputEvent.KeyInputEvent; +import net.minecraftforge.client.event.InputEvent.Key; import net.minecraftforge.event.TickEvent; import java.util.LinkedList; @@ -51,7 +51,7 @@ public static LinkedList keyToConditions(KeyInput key) { conditions.add(new TickTimedCondition( TickEvent.Type.CLIENT, TickEvent.Phase.START, key.maxDelay(), Result.SUCCESS, - new EventCondition(event -> false), Result.SUCCESS, Result.FAILURE + new EventCondition(event -> false), Result.SUCCESS, Result.FAILURE )); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/leaf/MouseMovementLeaf.java b/src/main/java/com/amuzil/omegasource/magus/radix/leaf/MouseMovementLeaf.java index 1c8f029c..2e324bfb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/leaf/MouseMovementLeaf.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/leaf/MouseMovementLeaf.java @@ -3,7 +3,7 @@ import com.amuzil.omegasource.magus.radix.Leaf; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; +import net.minecraftforge.event.entity.living.LivingEvent; import java.util.Collections; import java.util.LinkedList; @@ -11,33 +11,33 @@ import java.util.function.Consumer; public class MouseMovementLeaf implements Leaf> { - private final Consumer listener; - - private final List path; - - public MouseMovementLeaf() { - this.path = new LinkedList<>(); - this.listener = event -> { - // TODO see if we can directly capture the mouse movement - // This would be done by injecting a callback into net.minecraft.client.MouseHandler#onMove - path.add(event.getEntityLiving().getLookAngle()); - }; - MinecraftForge.EVENT_BUS.addListener(this.listener); - } - - @Override - public void burn() { - this.path.clear(); - MinecraftForge.EVENT_BUS.unregister(this.listener); - } - - @Override - public void reset() { - path.clear(); - } - - @Override - public List measure() { - return Collections.unmodifiableList(path); - } + private final Consumer listener; + + private final List path; + + public MouseMovementLeaf() { + this.path = new LinkedList<>(); + this.listener = event -> { + // TODO see if we can directly capture the mouse movement + // This would be done by injecting a callback into net.minecraft.client.MouseHandler#onMove + path.add(event.getEntity().getLookAngle()); + }; + MinecraftForge.EVENT_BUS.addListener(this.listener); + } + + @Override + public void burn() { + this.path.clear(); + MinecraftForge.EVENT_BUS.unregister(this.listener); + } + + @Override + public void reset() { + path.clear(); + } + + @Override + public List measure() { + return Collections.unmodifiableList(path); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java index 97af9cdf..0bb6d13a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java @@ -1,11 +1,7 @@ package com.amuzil.omegasource.magus.skill.util; -import com.mojang.blaze3d.platform.InputConstants; -import net.minecraft.client.KeyMapping; -import net.minecraftforge.client.settings.KeyBindingMap; import org.lwjgl.glfw.GLFW; -import java.awt.event.KeyEvent; import java.util.ArrayList; import java.util.List; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 2d172fcf..7baf585b 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -27,11 +27,11 @@ displayName="Magus #mandatory # A URL for the "homepage" for this mod, displayed in the mod UI #displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional # A file name (in the root of the mod JAR) containing a logo for display -logoFile="examplemod.png" #optional +logoFile="todo-magus.png" #optional # A text field displayed in the mod UI -credits="Thanks for this example mod goes to Java" #optional +credits="Thanks for this mod goes to the Omega Source team!" #optional # A text field displayed in the mod UI -authors="Love, Cheese and small house plants" #optional +authors="FavouriteDragon & Mahtaran" #optional # Display Test controls the display for your mod in the server connection screen # MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod. # IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod. @@ -41,13 +41,7 @@ authors="Love, Cheese and small house plants" #optional #displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional) # The description text for the mod (multi line!) (#mandatory) -description=''' -This is a long form description of the mod. You can write whatever you want here - -Have some lorem ipsum. - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. -''' +description='''''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. [[dependencies.magus]] #optional # the modid of the dependency diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index ca7d1d1d..092cdb00 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "Magus' resources", + "description": "Magus resources", "pack_format": 9, "forge:resource_pack_format": 9, "forge:data_pack_format": 10 From cff360860178cb61984ff6ac739547ef6ab95897 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Fri, 19 Aug 2022 02:47:33 +1000 Subject: [PATCH 027/469] it works! --- build.gradle | 4 +- .../minecraft/forge/EventCondition.java | 48 +++++++++---------- .../forge/key/KeyPressCondition.java | 4 +- .../forge/key/KeyPressedCondition.java | 4 +- .../forge/key/KeyReleaseCondition.java | 4 +- .../condition/util/ConditionConverter.java | 3 +- src/main/resources/META-INF/mods.toml | 4 +- 7 files changed, 35 insertions(+), 36 deletions(-) diff --git a/build.gradle b/build.gradle index 7e00d407..d9dcedda 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,7 @@ buildscript { // These repositories are only for Gradle plugins, put any other repositories in the repository block further below maven { url = 'https://maven.minecraftforge.net' } mavenCentral() - maven { - url "https://plugins.gradle.org/m2/" - } + maven { url "https://plugins.gradle.org/m2/" } } dependencies { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index 3027bdcf..62f1f43d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -3,36 +3,36 @@ import com.amuzil.omegasource.magus.radix.Condition; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; +import net.minecraftforge.eventbus.api.EventPriority; import java.util.function.Consumer; import java.util.function.Function; public class EventCondition extends Condition { - private final Consumer listener; + private final Consumer listener; + private final Class eventType; - public EventCondition(Function condition) { - this.listener = event -> { - try { - if (condition.apply(event)) { - this.onSuccess.run(); - } else { - this.onFailure.run(); - } - } - catch (ClassCastException e) { - e.printStackTrace(); - } - }; - } + public EventCondition(Class eventType, Function condition) { + this.eventType = eventType; + this.listener = event -> { + if (condition.apply(event)) { + this.onSuccess.run(); + } else { + this.onFailure.run(); + } + }; + } - @Override - public void register(Runnable onSuccess, Runnable onFailure) { - super.register(onSuccess, onFailure); - MinecraftForge.EVENT_BUS.addListener(listener); - } + @Override + public void register(Runnable onSuccess, Runnable onFailure) { + super.register(onSuccess, onFailure); + //This is required because a class type check isn't inbuilt, for some reason. + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, eventType, listener); + } - @Override - public void unregister() { - MinecraftForge.EVENT_BUS.unregister(listener); - } + @Override + public void unregister() { + super.unregister(); + MinecraftForge.EVENT_BUS.unregister(listener); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index aae126ae..202fc4b5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -10,8 +10,8 @@ public class KeyPressCondition extends TickTimedCondition { public KeyPressCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition( - event -> event.getAction() == GLFW.GLFW_PRESS && event.getKey() == key.getValue() + super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition<>( + InputEvent.Key.class, event -> event.getAction() == GLFW.GLFW_PRESS && event.getKey() == key.getValue() ), Result.SUCCESS, Result.FAILURE); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java index 06fb3c52..d8782cf7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -9,8 +9,8 @@ public class KeyPressedCondition extends TickTimedCondition { //Upon *any* key (not including modifiers or wasd) being pressed, return true public KeyPressedCondition(int timeout) { - super(TickEvent.Type.CLIENT, TickEvent.Phase.START, timeout, Result.SUCCESS, new EventCondition( - event -> !KeyboardData.ignore(event.getKey()) + super(TickEvent.Type.CLIENT, TickEvent.Phase.START, timeout, Result.SUCCESS, new EventCondition<>( + InputEvent.Key.class, event -> !KeyboardData.ignore(event.getKey()) ), Result.SUCCESS, Result.FAILURE); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java index 4b2f4707..b62d6de7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java @@ -10,8 +10,8 @@ public class KeyReleaseCondition extends TickTimedCondition { public KeyReleaseCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition( - event -> event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == key.getValue() + super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition<>( + InputEvent.Key.class, event -> event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == key.getValue() ), Result.SUCCESS, Result.FAILURE); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java index 6f07b75d..19815b8f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java @@ -6,6 +6,7 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; import com.amuzil.omegasource.magus.skill.activateable.key.KeyCombination; import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.amuzil.omegasource.magus.skill.activateable.key.KeyPermutation; @@ -51,7 +52,7 @@ public static LinkedList keyToConditions(KeyInput key) { conditions.add(new TickTimedCondition( TickEvent.Type.CLIENT, TickEvent.Phase.START, key.maxDelay(), Result.SUCCESS, - new EventCondition(event -> false), Result.SUCCESS, Result.FAILURE + new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS )); } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 7baf585b..94c25d7d 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -21,7 +21,7 @@ modId="magus" #mandatory # see the associated build.gradle script for how to populate this completely automatically during a build version="${file.jarVersion}" #mandatory # A display name for the mod -displayName="Magus #mandatory +displayName="Magus" #mandatory # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ #updateJSONURL="https://change.me.example.invalid/updates.json" #optional # A URL for the "homepage" for this mod, displayed in the mod UI @@ -41,7 +41,7 @@ authors="FavouriteDragon & Mahtaran" #optional #displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional) # The description text for the mod (multi line!) (#mandatory) -description='''''' +description='''Skill API part of Magus.''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. [[dependencies.magus]] #optional # the modid of the dependency From 65c38e8b55059b3b2c675b810a2172c046e918e7 Mon Sep 17 00:00:00 2001 From: Mahtaran Date: Thu, 18 Aug 2022 19:14:13 +0200 Subject: [PATCH 028/469] :sparkles: create a path builder --- .../magus/radix/path/PathBuilder.java | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java new file mode 100644 index 00000000..6112e52c --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -0,0 +1,68 @@ +package com.amuzil.omegasource.magus.radix.path; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.Condition.Result; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; +import com.amuzil.omegasource.magus.skill.activateable.key.KeyCombination; +import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; +import com.amuzil.omegasource.magus.skill.activateable.key.KeyPermutation; +import net.minecraftforge.event.TickEvent; + +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Map; +import java.util.function.Function; + +public class PathBuilder { + private static final Map, Function>> CONDITION_BUILDERS = new HashMap<>(); + + static { + registerBuilder(KeyInput.class, keyInput -> { + // Minimum amount of ticks a key must be pressed for it to be considered a held condition. + final int HELD_THRESHOLD = 3; + final int TIMEOUT_THRESHOLD = 50; + + LinkedList conditions = new LinkedList<>(); + + // Any time less than this is just a key press. + // TODO: Adjust timeout to be per node. + conditions.add(keyInput.held() > HELD_THRESHOLD + ? new KeyHoldCondition(keyInput.key(), keyInput.held(), TIMEOUT_THRESHOLD) + : new KeyPressCondition(keyInput.key(), TIMEOUT_THRESHOLD) + ); + + if (keyInput.minDelay() > 0) { + //TODO: Fix this to account for "action keys". + conditions.add(new TickTimedCondition( + TickEvent.Type.CLIENT, TickEvent.Phase.START, + keyInput.maxDelay(), Result.SUCCESS, + new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS + )); + } + + return conditions; + }); + registerBuilder(KeyPermutation.class, + permutation -> permutation.keys().stream().map(PathBuilder::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) + ); + registerBuilder(KeyCombination.class, + combination -> combination.keys().stream().map(PathBuilder::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) + ); + } + + @SuppressWarnings("unchecked") + public static void registerBuilder(Class type, Function> builder) { + CONDITION_BUILDERS.put(type, (Function>) builder); + } + + // TODO turn a linked list of conditions into a connected node tree. + + public static LinkedList buildPathFrom(T data) { + return CONDITION_BUILDERS.get(data.getClass()).apply(data); + } +} From 438e6cad52d10a6f300fec5b32705b927ae1d391 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 20 Aug 2022 17:35:35 +1000 Subject: [PATCH 029/469] working on node and condition itnegration --- .../com/amuzil/omegasource/magus/Magus.java | 5 +- .../omegasource/magus/radix/Branch.java | 3 +- .../condition/util/ConditionConverter.java | 52 ------------------- .../magus/radix/path/PathBuilder.java | 1 + .../magus/skill/activateable/Activator.java | 12 ----- 5 files changed, 4 insertions(+), 69 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 5cb5b176..51278a65 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; +import com.amuzil.omegasource.magus.radix.path.PathBuilder; import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; @@ -17,8 +18,6 @@ import java.util.stream.Collectors; -import static com.amuzil.omegasource.magus.radix.condition.util.ConditionConverter.keyToConditions; - // The value here should match an entry in the META-INF/mods.toml file /** @@ -57,7 +56,7 @@ private void setup(final FMLCommonSetupEvent event) { //Testing for some conditions //Note: this is only executed client-side, due to how events work. Be sure to send a packet! - Condition test = keyToConditions( + Condition test = PathBuilder.buildPathFrom( new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) ).get(0); Condition wait = new KeyPressedCondition(40); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java b/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java index c8cef05c..782b7b1f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java @@ -52,8 +52,7 @@ public T measureLeaf(Class> type) { return (T) leaves.get(type).measure(); } - public record Step(Condition activator, Node node) { - + public record Step (Condition activator, Node node) { } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java index 19815b8f..3dc7aa1c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java @@ -1,61 +1,9 @@ package com.amuzil.omegasource.magus.radix.condition.util; -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.Condition.Result; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; -import com.amuzil.omegasource.magus.skill.activateable.key.KeyCombination; -import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; -import com.amuzil.omegasource.magus.skill.activateable.key.KeyPermutation; -import net.minecraftforge.client.event.InputEvent.Key; -import net.minecraftforge.event.TickEvent; - -import java.util.LinkedList; - /** * Takes data and converts it into a corresponding data structure of conditions. * Still has to be turned into tree. */ public class ConditionConverter { - /** - * Minimum amount of ticks a key must be pressed for it to be considered a held condition. - */ - public static final int HELD_THRESHOLD = 3; - public static final int TIMEOUT_THRESHOLD = 50; - - public static LinkedList combinationToConditions(KeyCombination combination) { - return combination.keys().stream().map(ConditionConverter::permutationToConditions) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll); - } - - public static LinkedList permutationToConditions(KeyPermutation permutation) { - // TODO ensure the order is preserved - return permutation.keys().stream().map(ConditionConverter::keyToConditions) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll); - } - - public static LinkedList keyToConditions(KeyInput key) { - LinkedList conditions = new LinkedList<>(); - - // Any time less than this is just a key press. - // TODO: Adjust timeout to be per node. - conditions.add(key.held() > HELD_THRESHOLD - ? new KeyHoldCondition(key.key(), key.held(), TIMEOUT_THRESHOLD) - : new KeyPressCondition(key.key(), TIMEOUT_THRESHOLD) - ); - - if (key.minDelay() > 0) { - //TODO: Fix this to account for "action keys". - conditions.add(new TickTimedCondition( - TickEvent.Type.CLIENT, TickEvent.Phase.START, - key.maxDelay(), Result.SUCCESS, - new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS - )); - } - return conditions; - } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 6112e52c..4cd89457 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -22,6 +22,7 @@ public class PathBuilder { static { registerBuilder(KeyInput.class, keyInput -> { // Minimum amount of ticks a key must be pressed for it to be considered a held condition. + //TODO: Adjust these final int HELD_THRESHOLD = 3; final int TIMEOUT_THRESHOLD = 50; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java deleted file mode 100644 index d1eadc15..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/Activator.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.amuzil.omegasource.magus.skill.activateable; - -import com.amuzil.omegasource.magus.radix.Condition; - -import java.util.LinkedList; - -public class Activator { - //Returns a linked list of all conditions derived from the current class - public LinkedList toCondition() { - return new LinkedList<>(); - } -} From d7f93eb8fea6bf4b5d8c8168a5726a0556479e87 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Wed, 21 Dec 2022 22:16:13 -0800 Subject: [PATCH 030/469] basic capabilities implemetation --- .../magus/pseudo/DataTrait.pseudojava | 5 ++ .../omegasource/magus/pseudo/Skill.pseudojava | 41 +++++++++++++++ .../minecraft/forge/TickTimedCondition.java | 4 +- .../magus/skill/capability/Capabilities.java | 18 +++++++ .../magus/skill/capability/LivingData.java | 16 ++++++ .../skill/capability/LivingDataAttacher.java | 52 +++++++++++++++++++ .../skill/capability/LivingDataInterface.java | 10 ++++ .../magus/skill/skill/SkillActive.java | 9 ++++ .../magus/skill/skill/SkillBase.java | 13 +++++ .../magus/skill/skill/SkillCategory.java | 11 ++++ .../magus/skill/skill/SkillStance.java | 13 +++++ .../magus/skill/util/LivingData.java | 4 ++ .../magus/skill/util/PlayerData.java | 4 ++ .../magus/skill/util/SkillCategoryData.java | 4 ++ .../magus/skill/util/SkillData.java | 4 ++ .../magus/skill/util/traits/DataTrait.java | 7 +++ .../magus/skill/util/traits/DataTraits.java | 15 ++++++ 17 files changed, 229 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/pseudo/DataTrait.pseudojava create mode 100644 src/main/java/com/amuzil/omegasource/magus/pseudo/Skill.pseudojava create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/capability/Capabilities.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataInterface.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/LivingData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/PlayerData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/SkillCategoryData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/SkillData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java diff --git a/src/main/java/com/amuzil/omegasource/magus/pseudo/DataTrait.pseudojava b/src/main/java/com/amuzil/omegasource/magus/pseudo/DataTrait.pseudojava new file mode 100644 index 00000000..3969c527 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/pseudo/DataTrait.pseudojava @@ -0,0 +1,5 @@ + + +public class DataTrait { + +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/pseudo/Skill.pseudojava b/src/main/java/com/amuzil/omegasource/magus/pseudo/Skill.pseudojava new file mode 100644 index 00000000..b91fd0bb --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/pseudo/Skill.pseudojava @@ -0,0 +1,41 @@ + +public record Skill ( + String name, + SkillCategory category; + SkillTraits traits + ) { + + public boolean shouldStart(LivingEntity entity, RadixTree tree) { + } + + public void start(LivingEntity entity, RadixTree tree) { + if (shouldRun(entity, tree)) + run(entity, tree); + } + + public boolean shouldRun(LivingEntity entity, RadixTree tree) { + + } + + public void run(LivingEntity entity, RadixTree tree) { + if (shouldStop(entity, tree)) + stop(entity, tree); + //Code that does whatever + + if (shouldRun(entity, tree)) + run(entity, tree); + } + + public boolean shouldStop(LivingEntity entity, RadixTree tree) { + } + + public void stop(LivingEntity entity, RadixTree tree) { + } + + public SkillType getType() { + } + + + + +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 5e552f60..03aeff68 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -6,6 +6,7 @@ import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.Phase; import net.minecraftforge.event.TickEvent.Type; +import net.minecraftforge.eventbus.api.EventPriority; import java.util.function.Consumer; @@ -43,7 +44,8 @@ public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); // TODO is this the correct approach? this.subCondition.register(runOn(this.onSubSuccess), runOn(this.onSubFailure)); - MinecraftForge.EVENT_BUS.addListener(listener); + //Ensures no cast errors occur (blame forge) + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, listener); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/capability/Capabilities.java new file mode 100644 index 00000000..165752f0 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/capability/Capabilities.java @@ -0,0 +1,18 @@ +package com.amuzil.omegasource.magus.skill.capability; + +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.CapabilityManager; +import net.minecraftforge.common.capabilities.CapabilityToken; +import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; + +public class Capabilities { + + public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() {}); + + public static void register(RegisterCapabilitiesEvent event) { + event.register(LivingDataInterface.class); + } + + private Capabilities() { + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java new file mode 100644 index 00000000..ad64c0f8 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java @@ -0,0 +1,16 @@ +package com.amuzil.omegasource.magus.skill.capability; + +import net.minecraft.nbt.CompoundTag; + +public class LivingData implements LivingDataInterface { + + @Override + public CompoundTag serializeNBT() { + return null; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java new file mode 100644 index 00000000..34d9af30 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java @@ -0,0 +1,52 @@ +package com.amuzil.omegasource.magus.skill.capability; + +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.Entity; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ICapabilityProvider; +import net.minecraftforge.common.util.INBTSerializable; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.event.AttachCapabilitiesEvent; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class LivingDataAttacher { + private LivingDataAttacher() { + } + + public static void attach(final AttachCapabilitiesEvent event) { + final LivingDataProvider provider = new LivingDataProvider(); + + event.addCapability(LivingDataProvider.IDENTIFIER, provider); + } + + private static class LivingDataProvider implements ICapabilityProvider, INBTSerializable { + + public static final ResourceLocation IDENTIFIER = new ResourceLocation("magus", "livingDataProvider"); + + private final LivingDataInterface livingData = new LivingData(); + private final LazyOptional optionalData = LazyOptional.of(() -> livingData); + + @NotNull + @Override + public LazyOptional getCapability(@NotNull Capability cap, @Nullable Direction side) { + return Capabilities.LIVING_DATA.orEmpty(cap, this.optionalData); + } + + void invalidate() { + this.optionalData.invalidate(); + } + + @Override + public CompoundTag serializeNBT() { + return this.livingData.serializeNBT(); + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + this.livingData.deserializeNBT(nbt); + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataInterface.java b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataInterface.java new file mode 100644 index 00000000..0731afdc --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataInterface.java @@ -0,0 +1,10 @@ +package com.amuzil.omegasource.magus.skill.capability; + +import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.common.capabilities.AutoRegisterCapability; +import net.minecraftforge.common.util.INBTSerializable; + +@AutoRegisterCapability +public interface LivingDataInterface extends INBTSerializable { + +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java new file mode 100644 index 00000000..0e37d8d6 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -0,0 +1,9 @@ +package com.amuzil.omegasource.magus.skill.skill; + +public class SkillActive extends SkillBase { + + //Need to account for the different types as worked out by Maht and I (FavouriteDragon). + public boolean execute() { + return false; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java index 87be3efd..6fb7a891 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java @@ -1,4 +1,17 @@ package com.amuzil.omegasource.magus.skill.skill; +import java.util.UUID; + +/** + * Basic skill class. All other skills extend this. + */ public class SkillBase { + + private String name; + private UUID category; + + //Modifier data + //Constant data + //E.t.c + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java new file mode 100644 index 00000000..fdf496d5 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java @@ -0,0 +1,11 @@ +package com.amuzil.omegasource.magus.skill.skill; + +import java.util.LinkedList; + +public class SkillCategory { + + //List of all skills available within the category + public LinkedList skills = new LinkedList<>(); + + //TODO: GUI stuff as data +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java new file mode 100644 index 00000000..3cd6b4bf --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java @@ -0,0 +1,13 @@ +package com.amuzil.omegasource.magus.skill.skill; + +/** + * Name WIP. + * Functions as a "stance" skill, as described in Avatar's documentation, design, and outline. + * Stance skills are in between active and passive skills. You have to activate them, but rather than + * producing a direct effect, they invoke a passive effect upon the player. + * The idea is to have a cycle method or something similar to rotate through unlocked stances. + * Stance skills could range from Sun stance firebending, to give access to new combos, + * to different types of martial arts in a martial arts mod. E.g variations on karate. + */ +public class SkillStance extends SkillBase { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/LivingData.java new file mode 100644 index 00000000..5e622f1b --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/LivingData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util; + +public class LivingData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/PlayerData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/PlayerData.java new file mode 100644 index 00000000..44dc2685 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/PlayerData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util; + +public class PlayerData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillCategoryData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillCategoryData.java new file mode 100644 index 00000000..dcf894d4 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillCategoryData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util; + +public class SkillCategoryData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillData.java new file mode 100644 index 00000000..16442ab2 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util; + +public class SkillData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java new file mode 100644 index 00000000..4e0631e9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java @@ -0,0 +1,7 @@ +package com.amuzil.omegasource.magus.skill.util.traits; + +import net.minecraft.nbt.Tag; +import net.minecraftforge.common.util.INBTSerializable; + +public interface DataTrait extends INBTSerializable { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java new file mode 100644 index 00000000..c983f0c5 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java @@ -0,0 +1,15 @@ +package com.amuzil.omegasource.magus.skill.util.traits; + +import net.minecraft.nbt.Tag; + +public class DataTraits implements DataTrait { + @Override + public Tag serializeNBT() { + return null; + } + + @Override + public void deserializeNBT(Tag nbt) { + + } +} From 77b4ad4d41ac75a62df19e4c006ef882cc096805 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Wed, 21 Dec 2022 22:25:59 -0800 Subject: [PATCH 031/469] capabilities implementation chugging along --- .../magus/skill/capability/LivingData.java | 14 +++++++++++-- .../magus/skill/util/traits/DataTrait.java | 5 +++-- .../magus/skill/util/traits/DataTraits.java | 15 -------------- .../skill/util/traits/LivingDataTrait.java | 20 +++++++++++++++++++ 4 files changed, 35 insertions(+), 19 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java index ad64c0f8..30b82891 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java @@ -1,16 +1,26 @@ package com.amuzil.omegasource.magus.skill.capability; +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraft.nbt.CompoundTag; +import java.util.ArrayList; +import java.util.List; + public class LivingData implements LivingDataInterface { + private List traits = new ArrayList<>(); + @Override public CompoundTag serializeNBT() { - return null; + CompoundTag tag = new CompoundTag(); + for (DataTrait trait : traits) + tag.put(trait.getName(), trait.serializeNBT()); + return tag; } @Override public void deserializeNBT(CompoundTag nbt) { - + for (DataTrait trait : traits) + trait.deserializeNBT(nbt); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java index 4e0631e9..7c07f7f4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java @@ -1,7 +1,8 @@ package com.amuzil.omegasource.magus.skill.util.traits; -import net.minecraft.nbt.Tag; import net.minecraftforge.common.util.INBTSerializable; -public interface DataTrait extends INBTSerializable { +public interface DataTrait extends INBTSerializable { + + String getName(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java deleted file mode 100644 index c983f0c5..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util.traits; - -import net.minecraft.nbt.Tag; - -public class DataTraits implements DataTrait { - @Override - public Tag serializeNBT() { - return null; - } - - @Override - public void deserializeNBT(Tag nbt) { - - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java new file mode 100644 index 00000000..45fc0a24 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java @@ -0,0 +1,20 @@ +package com.amuzil.omegasource.magus.skill.util.traits; + +import net.minecraft.nbt.CompoundTag; + +public class LivingDataTrait implements DataTrait { + @Override + public String getName() { + return null; + } + + @Override + public CompoundTag serializeNBT() { + return null; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + + } +} From b2bfb771ff0ead1bf856a4a91f69aebeb7fd9fa1 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 22 Dec 2022 10:09:34 -0800 Subject: [PATCH 032/469] Working on basic data capabilities --- .../magus/skill/capability/LivingDataAttacher.java | 3 ++- .../{LivingData.java => LivingDataCapability.java} | 4 ++-- .../magus/skill/util/traits/LivingDataTrait.java | 13 ++++++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/capability/{LivingData.java => LivingDataCapability.java} (81%) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java index 34d9af30..7c654533 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java @@ -26,9 +26,10 @@ private static class LivingDataProvider implements ICapabilityProvider, INBTSeri public static final ResourceLocation IDENTIFIER = new ResourceLocation("magus", "livingDataProvider"); - private final LivingDataInterface livingData = new LivingData(); + private final LivingDataInterface livingData = new LivingDataCapability(); private final LazyOptional optionalData = LazyOptional.of(() -> livingData); + @NotNull @Override public LazyOptional getCapability(@NotNull Capability cap, @Nullable Direction side) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataCapability.java similarity index 81% rename from src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataCapability.java index 30b82891..8ff0f7c3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataCapability.java @@ -6,7 +6,7 @@ import java.util.ArrayList; import java.util.List; -public class LivingData implements LivingDataInterface { +public class LivingDataCapability implements LivingDataInterface { private List traits = new ArrayList<>(); @@ -21,6 +21,6 @@ public CompoundTag serializeNBT() { @Override public void deserializeNBT(CompoundTag nbt) { for (DataTrait trait : traits) - trait.deserializeNBT(nbt); + trait.deserializeNBT((CompoundTag) nbt.get(trait.getName())); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java index 45fc0a24..27afd41d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java @@ -1,11 +1,22 @@ package com.amuzil.omegasource.magus.skill.util.traits; +import com.amuzil.omegasource.magus.skill.skill.SkillBase; +import com.amuzil.omegasource.magus.skill.skill.SkillCategory; +import com.amuzil.omegasource.magus.skill.util.SkillData; import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.LivingEntity; + +import java.util.List; public class LivingDataTrait implements DataTrait { + + private LivingEntity entity; + private List skills; + private SkillData data; + private List categories; @Override public String getName() { - return null; + return "livingDataTrait"; } @Override From 0644fe969400d7ee34b52d078957394aacf8231b Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 22 Dec 2022 10:35:27 -0800 Subject: [PATCH 033/469] don't need to pass an entity in the cap --- .../magus/skill/util/traits/CategoryDataTrait.java | 4 ++++ .../magus/skill/util/traits/DataTrait.java | 4 ++-- .../magus/skill/util/traits/LivingDataTrait.java | 12 ++++++++---- .../magus/skill/util/traits/SkillDataTrait.java | 4 ++++ 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/CategoryDataTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillDataTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/CategoryDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/CategoryDataTrait.java new file mode 100644 index 00000000..227921c9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/CategoryDataTrait.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util.traits; + +public class CategoryDataTrait { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java index 7c07f7f4..6007d186 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java @@ -1,8 +1,8 @@ package com.amuzil.omegasource.magus.skill.util.traits; +import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.util.INBTSerializable; -public interface DataTrait extends INBTSerializable { - +public interface DataTrait extends INBTSerializable { String getName(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java index 27afd41d..dba5fe65 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java @@ -4,24 +4,28 @@ import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.util.SkillData; import net.minecraft.nbt.CompoundTag; -import net.minecraft.world.entity.LivingEntity; import java.util.List; public class LivingDataTrait implements DataTrait { - private LivingEntity entity; + private List skills; private SkillData data; private List categories; + + @Override public String getName() { - return "livingDataTrait"; + return "livingDataTraits"; } @Override public CompoundTag serializeNBT() { - return null; + CompoundTag tag = new CompoundTag(); + + + return tag; } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillDataTrait.java new file mode 100644 index 00000000..eaf529a6 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillDataTrait.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util.traits; + +public class SkillDataTrait { +} From 419014f53c5cc5ed6f57cb4b3ab6b966ff0f2c83 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Thu, 22 Dec 2022 22:03:56 -0800 Subject: [PATCH 034/469] working on a data structure --- .../minecraft/forge/key/KeyPressedCondition.java | 2 +- .../omegasource/magus/skill/util/LivingData.java | 4 ---- .../omegasource/magus/skill/util/PlayerData.java | 4 ---- .../magus/skill/util/SkillCategoryData.java | 4 ---- .../omegasource/magus/skill/util/SkillData.java | 4 ---- .../skill/{ => util}/capability/Capabilities.java | 2 +- .../{ => util}/capability/LivingDataAttacher.java | 2 +- .../{ => util}/capability/LivingDataCapability.java | 2 +- .../{ => util}/capability/LivingDataInterface.java | 2 +- .../magus/skill/util/{ => data}/KeyboardData.java | 2 +- .../omegasource/magus/skill/util/data/LivingData.java | 4 ++++ .../omegasource/magus/skill/util/data/PlayerData.java | 4 ++++ .../magus/skill/util/data/SkillCategoryData.java | 4 ++++ .../omegasource/magus/skill/util/data/SkillData.java | 4 ++++ .../magus/skill/util/traits/LivingDataTrait.java | 11 ++++++++++- 15 files changed, 32 insertions(+), 23 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/LivingData.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/PlayerData.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/SkillCategoryData.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/SkillData.java rename src/main/java/com/amuzil/omegasource/magus/skill/{ => util}/capability/Capabilities.java (90%) rename src/main/java/com/amuzil/omegasource/magus/skill/{ => util}/capability/LivingDataAttacher.java (96%) rename src/main/java/com/amuzil/omegasource/magus/skill/{ => util}/capability/LivingDataCapability.java (92%) rename src/main/java/com/amuzil/omegasource/magus/skill/{ => util}/capability/LivingDataInterface.java (81%) rename src/main/java/com/amuzil/omegasource/magus/skill/util/{ => data}/KeyboardData.java (93%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/data/LivingData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/data/PlayerData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java index d8782cf7..bada042f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -2,7 +2,7 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; -import com.amuzil.omegasource.magus.skill.util.KeyboardData; +import com.amuzil.omegasource.magus.skill.util.data.KeyboardData; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.event.TickEvent; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/LivingData.java deleted file mode 100644 index 5e622f1b..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/LivingData.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util; - -public class LivingData { -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/PlayerData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/PlayerData.java deleted file mode 100644 index 44dc2685..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/PlayerData.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util; - -public class PlayerData { -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillCategoryData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillCategoryData.java deleted file mode 100644 index dcf894d4..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillCategoryData.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util; - -public class SkillCategoryData { -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillData.java deleted file mode 100644 index 16442ab2..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/SkillData.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util; - -public class SkillData { -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java similarity index 90% rename from src/main/java/com/amuzil/omegasource/magus/skill/capability/Capabilities.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java index 165752f0..eabbacc8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/capability/Capabilities.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.capability; +package com.amuzil.omegasource.magus.skill.util.capability; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java similarity index 96% rename from src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index 7c654533..5b695ff1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.capability; +package com.amuzil.omegasource.magus.skill.util.capability; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java similarity index 92% rename from src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataCapability.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java index 8ff0f7c3..114c6efb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.capability; +package com.amuzil.omegasource.magus.skill.util.capability; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataInterface.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataInterface.java similarity index 81% rename from src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataInterface.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataInterface.java index 0731afdc..e628c8c0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/capability/LivingDataInterface.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataInterface.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.capability; +package com.amuzil.omegasource.magus.skill.util.capability; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.capabilities.AutoRegisterCapability; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/KeyboardData.java similarity index 93% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/data/KeyboardData.java index 0bb6d13a..e295f83c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/KeyboardData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/KeyboardData.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.util; +package com.amuzil.omegasource.magus.skill.util.data; import org.lwjgl.glfw.GLFW; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/LivingData.java new file mode 100644 index 00000000..8affe74c --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/LivingData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util.data; + +public class LivingData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/PlayerData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/PlayerData.java new file mode 100644 index 00000000..897228c9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/PlayerData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util.data; + +public class PlayerData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java new file mode 100644 index 00000000..a69ac9f9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util.data; + +public class SkillCategoryData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java new file mode 100644 index 00000000..7b327cf2 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util.data; + +public class SkillData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java index dba5fe65..72e706f8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java @@ -2,10 +2,12 @@ import com.amuzil.omegasource.magus.skill.skill.SkillBase; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; -import com.amuzil.omegasource.magus.skill.util.SkillData; +import com.amuzil.omegasource.magus.skill.util.data.SkillData; import net.minecraft.nbt.CompoundTag; import java.util.List; +import java.util.Set; +import java.util.function.Consumer; public class LivingDataTrait implements DataTrait { @@ -13,6 +15,13 @@ public class LivingDataTrait implements DataTrait { private List skills; private SkillData data; private List categories; + private SkillCategory activeCategory; + //Need to add energy mechanic; stored here + //Need to add config and *global* skill modifiers. + //Need to add something for inputs + private Set activeListeners; + //Miscellaneous data to save + private List traits; @Override From 1af4f8d9fe05e3f1977272ca0c5101ffca38536d Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 11:06:48 -0800 Subject: [PATCH 035/469] New registries (thank you openAI chat bot) --- .../com/amuzil/omegasource/magus/Magus.java | 2 + .../magus/registry/Registries.java | 49 +++++++++++++++++++ .../skill/{SkillBase.java => Skill.java} | 2 +- .../magus/skill/skill/SkillActive.java | 2 +- .../magus/skill/skill/SkillCategory.java | 2 +- .../magus/skill/skill/SkillStance.java | 2 +- .../util/capability/LivingDataCapability.java | 8 +-- .../magus/skill/util/traits/DataTraits.java | 4 ++ .../{DataTrait.java => IDataTrait.java} | 2 +- .../skill/util/traits/LivingDataTrait.java | 30 +++++------- 10 files changed, 76 insertions(+), 27 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/registry/Registries.java rename src/main/java/com/amuzil/omegasource/magus/skill/skill/{SkillBase.java => Skill.java} (90%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java rename src/main/java/com/amuzil/omegasource/magus/skill/util/traits/{DataTrait.java => IDataTrait.java} (72%) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 51278a65..2b317be8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; @@ -45,6 +46,7 @@ public Magus() { // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); + Registries.init(); } private void setup(final FMLCommonSetupEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java new file mode 100644 index 00000000..5adef603 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -0,0 +1,49 @@ +package com.amuzil.omegasource.magus.registry; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import com.amuzil.omegasource.magus.skill.skill.SkillCategory; +import com.amuzil.omegasource.magus.skill.util.traits.DataTraits; +import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.registries.ForgeRegistry; +import net.minecraftforge.registries.NewRegistryEvent; +import net.minecraftforge.registries.ObjectHolder; +import net.minecraftforge.registries.RegistryBuilder; + +/** + * All custom registries go here. + */ +@Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) +public class Registries { + + public static void init() { + } + + @ObjectHolder(registryName = "data_traits", value = "magus:data_traits") + public static ForgeRegistry DATA_TRAITS; + + @ObjectHolder(registryName = "skill_categories", value = "magus:skill_categories") + public static ForgeRegistry SKILL_CATEGORIES; + + @ObjectHolder(registryName = "skills", value = "magus:skills") + public static ForgeRegistry SKILLS; + + @SubscribeEvent + public static void onRegistryRegister(NewRegistryEvent event) { + //Data trait registry. + RegistryBuilder traits = new RegistryBuilder<>(); + traits.setName(new ResourceLocation(Magus.MOD_ID, "data_traits")); + event.create(traits); + + RegistryBuilder categories = new RegistryBuilder<>(); + categories.setName(new ResourceLocation(Magus.MOD_ID, "skill_categories")); + event.create(categories); + + RegistryBuilder skills = new RegistryBuilder<>(); + skills.setName(new ResourceLocation(Magus.MOD_ID, "skills")); + event.create(skills); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java similarity index 90% rename from src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java rename to src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index 6fb7a891..72865175 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBase.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -5,7 +5,7 @@ /** * Basic skill class. All other skills extend this. */ -public class SkillBase { +public class Skill { private String name; private UUID category; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index 0e37d8d6..9e720e8d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -1,6 +1,6 @@ package com.amuzil.omegasource.magus.skill.skill; -public class SkillActive extends SkillBase { +public class SkillActive extends Skill { //Need to account for the different types as worked out by Maht and I (FavouriteDragon). public boolean execute() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java index fdf496d5..eeb5be97 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java @@ -5,7 +5,7 @@ public class SkillCategory { //List of all skills available within the category - public LinkedList skills = new LinkedList<>(); + public LinkedList skills = new LinkedList<>(); //TODO: GUI stuff as data } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java index 3cd6b4bf..6b50d68b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java @@ -9,5 +9,5 @@ * Stance skills could range from Sun stance firebending, to give access to new combos, * to different types of martial arts in a martial arts mod. E.g variations on karate. */ -public class SkillStance extends SkillBase { +public class SkillStance extends Skill { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java index 114c6efb..b01a702f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java @@ -1,6 +1,6 @@ package com.amuzil.omegasource.magus.skill.util.capability; -import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; +import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; import net.minecraft.nbt.CompoundTag; import java.util.ArrayList; @@ -8,19 +8,19 @@ public class LivingDataCapability implements LivingDataInterface { - private List traits = new ArrayList<>(); + private List traits = new ArrayList<>(); @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); - for (DataTrait trait : traits) + for (IDataTrait trait : traits) tag.put(trait.getName(), trait.serializeNBT()); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { - for (DataTrait trait : traits) + for (IDataTrait trait : traits) trait.deserializeNBT((CompoundTag) nbt.get(trait.getName())); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java new file mode 100644 index 00000000..8f281556 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.util.traits; + +public class DataTraits { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/IDataTrait.java similarity index 72% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/traits/IDataTrait.java index 6007d186..1117119d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/IDataTrait.java @@ -3,6 +3,6 @@ import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.util.INBTSerializable; -public interface DataTrait extends INBTSerializable { +public interface IDataTrait extends INBTSerializable { String getName(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java index 72e706f8..142b912a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java @@ -1,27 +1,21 @@ package com.amuzil.omegasource.magus.skill.util.traits; -import com.amuzil.omegasource.magus.skill.skill.SkillBase; -import com.amuzil.omegasource.magus.skill.skill.SkillCategory; -import com.amuzil.omegasource.magus.skill.util.data.SkillData; import net.minecraft.nbt.CompoundTag; -import java.util.List; -import java.util.Set; -import java.util.function.Consumer; +public class LivingDataTrait implements IDataTrait { -public class LivingDataTrait implements DataTrait { - - private List skills; - private SkillData data; - private List categories; - private SkillCategory activeCategory; - //Need to add energy mechanic; stored here - //Need to add config and *global* skill modifiers. - //Need to add something for inputs - private Set activeListeners; - //Miscellaneous data to save - private List traits; + //Dont use these, use a forge registry. +// private List skills; +// private SkillData data; +// private List categories; +// private SkillCategory activeCategory; +// //Need to add energy mechanic; stored here +// //Need to add config and *global* skill modifiers. +// //Need to add something for inputs +// private Set activeListeners; +// //Miscellaneous data to save +// private List traits; @Override From 3893fad5d81bd08dd9529c4d002067667bd2375a Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 11:28:45 -0800 Subject: [PATCH 036/469] cleaned up capabilities --- .../skill/util/capability/Capabilities.java | 9 ++++ .../util/capability/LivingDataAttacher.java | 2 +- .../util/capability/LivingDataCapability.java | 42 ++++++++++++++++++- .../magus/skill/util/traits/DataTraits.java | 8 +++- .../skill/util/traits/LivingDataTrait.java | 38 ----------------- 5 files changed, 58 insertions(+), 41 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java index eabbacc8..476f81f5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java @@ -1,18 +1,27 @@ package com.amuzil.omegasource.magus.skill.util.capability; +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.CapabilityToken; import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; +import java.util.List; + public class Capabilities { public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() {}); + public static List dataTraits; public static void register(RegisterCapabilitiesEvent event) { event.register(LivingDataInterface.class); } + public static void initialiseRegistries() { + dataTraits = (List) Registries.DATA_TRAITS.getValues(); + } + private Capabilities() { } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index 5b695ff1..4bd1d63c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -16,7 +16,7 @@ public class LivingDataAttacher { private LivingDataAttacher() { } - public static void attach(final AttachCapabilitiesEvent event) { + public static void attach(AttachCapabilitiesEvent event) { final LivingDataProvider provider = new LivingDataProvider(); event.addCapability(LivingDataProvider.IDENTIFIER, provider); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java index b01a702f..5d32a03e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java @@ -1,20 +1,41 @@ package com.amuzil.omegasource.magus.skill.util.capability; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; import net.minecraft.nbt.CompoundTag; import java.util.ArrayList; import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; public class LivingDataCapability implements LivingDataInterface { - private List traits = new ArrayList<>(); + //Data Traits to add: + // private List skills; +// private SkillData data; +// private List categories; +// private SkillCategory activeCategory; +// //Need to add energy mechanic; stored here +// //Need to add config and *global* skill modifiers. +// //Need to add something for inputs +// private Set activeListeners; +// //Miscellaneous data to save + + //The amount of data traits the player has should not change after initialisation. + private List traits; + + public LivingDataCapability() { + //Clones it. + traits = Capabilities.dataTraits.stream().toList(); + } @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); for (IDataTrait trait : traits) tag.put(trait.getName(), trait.serializeNBT()); + return tag; } @@ -23,4 +44,23 @@ public void deserializeNBT(CompoundTag nbt) { for (IDataTrait trait : traits) trait.deserializeNBT((CompoundTag) nbt.get(trait.getName())); } + + //When players move to versions with new techniques and such, we'll have to use these to accomodate. + public void addTraits(List dataTraits) { + traits.addAll(dataTraits); + } + + public void addTrait(IDataTrait trait) { + traits.add(trait); + } + + //Ideally, these delete methods are *never* used, because each piece of content + //added to the mod should be final. + public void removeTrait(IDataTrait trait) { + traits.remove(trait); + } + + public void removeTraits(List dataTraits) { + traits.removeAll(dataTraits); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java index 8f281556..a5d72bc2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java @@ -1,4 +1,10 @@ package com.amuzil.omegasource.magus.skill.util.traits; -public class DataTraits { +import com.amuzil.omegasource.magus.registry.Registries; + +public class DataTraits { + + public static void register() { + Registries.DATA_TRAITS.register("livingData", new LivingDataTrait()); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java deleted file mode 100644 index 142b912a..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/LivingDataTrait.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util.traits; - -import net.minecraft.nbt.CompoundTag; - -public class LivingDataTrait implements IDataTrait { - - - //Dont use these, use a forge registry. -// private List skills; -// private SkillData data; -// private List categories; -// private SkillCategory activeCategory; -// //Need to add energy mechanic; stored here -// //Need to add config and *global* skill modifiers. -// //Need to add something for inputs -// private Set activeListeners; -// //Miscellaneous data to save -// private List traits; - - - @Override - public String getName() { - return "livingDataTraits"; - } - - @Override - public CompoundTag serializeNBT() { - CompoundTag tag = new CompoundTag(); - - - return tag; - } - - @Override - public void deserializeNBT(CompoundTag nbt) { - - } -} From 76c4f9deae89959134bc6fdeac3e0ebaf49a85cf Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 11:31:57 -0800 Subject: [PATCH 037/469] Registries set up, capabilities need work --- .../magus/skill/util/capability/LivingDataCapability.java | 4 ---- .../omegasource/magus/skill/util/traits/DataTraits.java | 3 --- 2 files changed, 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java index 5d32a03e..f92ffe43 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java @@ -1,13 +1,9 @@ package com.amuzil.omegasource.magus.skill.util.capability; -import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; import net.minecraft.nbt.CompoundTag; -import java.util.ArrayList; import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; public class LivingDataCapability implements LivingDataInterface { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java index a5d72bc2..e659d314 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTraits.java @@ -1,10 +1,7 @@ package com.amuzil.omegasource.magus.skill.util.traits; -import com.amuzil.omegasource.magus.registry.Registries; - public class DataTraits { public static void register() { - Registries.DATA_TRAITS.register("livingData", new LivingDataTrait()); } } From 47862c3caef2698a79a76e789bf913d6a7743ab3 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 13:13:21 -0800 Subject: [PATCH 038/469] adjusted LivingData code based on @Mahtaran --- src/main/java/com/amuzil/omegasource/magus/Magus.java | 9 ++++++--- .../amuzil/omegasource/magus/registry/Registries.java | 6 ++++++ .../magus/skill/util/capability/Capabilities.java | 4 ++-- .../{LivingDataInterface.java => ILivingData.java} | 2 +- .../{LivingDataCapability.java => LivingData.java} | 11 ++++------- .../skill/util/capability/LivingDataAttacher.java | 4 ++-- .../omegasource/magus/skill/util/data/LivingData.java | 4 ---- 7 files changed, 21 insertions(+), 19 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/util/capability/{LivingDataInterface.java => ILivingData.java} (76%) rename src/main/java/com/amuzil/omegasource/magus/skill/util/capability/{LivingDataCapability.java => LivingData.java} (83%) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/data/LivingData.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 2b317be8..6a14c848 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.radix.path.PathBuilder; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; +import com.amuzil.omegasource.magus.skill.util.capability.Capabilities; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraft.world.level.block.Blocks; @@ -35,6 +36,8 @@ public class Magus { private static final Logger LOGGER = LogManager.getLogger(); public Magus() { + // Register ourselves for server and other game events we are interested in + MinecraftForge.EVENT_BUS.register(this); // Register the setup method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); // Register the enqueueIMC method for mod loading @@ -44,13 +47,13 @@ public Magus() { // Register the doClientStuff method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); - // Register ourselves for server and other game events we are interested in - MinecraftForge.EVENT_BUS.register(this); - Registries.init(); + + Capabilities.initialiseRegistries(); } private void setup(final FMLCommonSetupEvent event) { // some pre init code + Registries.init(); LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 5adef603..ddeb7b4e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -38,12 +38,18 @@ public static void onRegistryRegister(NewRegistryEvent event) { traits.setName(new ResourceLocation(Magus.MOD_ID, "data_traits")); event.create(traits); + //Skill categories RegistryBuilder categories = new RegistryBuilder<>(); categories.setName(new ResourceLocation(Magus.MOD_ID, "skill_categories")); event.create(categories); + //Skills RegistryBuilder skills = new RegistryBuilder<>(); skills.setName(new ResourceLocation(Magus.MOD_ID, "skills")); event.create(skills); + + //Forms + + //Modifiers } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java index 476f81f5..c1335fa6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java @@ -11,11 +11,11 @@ public class Capabilities { - public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() {}); + public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() {}); public static List dataTraits; public static void register(RegisterCapabilitiesEvent event) { - event.register(LivingDataInterface.class); + event.register(ILivingData.class); } public static void initialiseRegistries() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataInterface.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/ILivingData.java similarity index 76% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataInterface.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/ILivingData.java index e628c8c0..f3a35fcc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataInterface.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/ILivingData.java @@ -5,6 +5,6 @@ import net.minecraftforge.common.util.INBTSerializable; @AutoRegisterCapability -public interface LivingDataInterface extends INBTSerializable { +public interface ILivingData extends INBTSerializable { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java similarity index 83% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index f92ffe43..efb8732b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -5,7 +5,7 @@ import java.util.List; -public class LivingDataCapability implements LivingDataInterface { +public class LivingData implements ILivingData { //Data Traits to add: // private List skills; @@ -21,7 +21,7 @@ public class LivingDataCapability implements LivingDataInterface { //The amount of data traits the player has should not change after initialisation. private List traits; - public LivingDataCapability() { + public LivingData() { //Clones it. traits = Capabilities.dataTraits.stream().toList(); } @@ -29,16 +29,13 @@ public LivingDataCapability() { @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); - for (IDataTrait trait : traits) - tag.put(trait.getName(), trait.serializeNBT()); - + traits.forEach(trait -> tag.put(trait.getName(), trait.serializeNBT())); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { - for (IDataTrait trait : traits) - trait.deserializeNBT((CompoundTag) nbt.get(trait.getName())); + traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); } //When players move to versions with new techniques and such, we'll have to use these to accomodate. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index 4bd1d63c..f91f4911 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -26,8 +26,8 @@ private static class LivingDataProvider implements ICapabilityProvider, INBTSeri public static final ResourceLocation IDENTIFIER = new ResourceLocation("magus", "livingDataProvider"); - private final LivingDataInterface livingData = new LivingDataCapability(); - private final LazyOptional optionalData = LazyOptional.of(() -> livingData); + private final ILivingData livingData = new LivingData(); + private final LazyOptional optionalData = LazyOptional.of(() -> livingData); @NotNull diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/LivingData.java deleted file mode 100644 index 8affe74c..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/LivingData.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util.data; - -public class LivingData { -} From 6a7844405e6e1ab759d89d6cc8ef3b3738dce1ab Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 14:03:53 -0800 Subject: [PATCH 039/469] things should actually register now; waiting on @Mahtaran to review --- .../skill/util/capability/Capabilities.java | 16 +++++++++++----- .../capability/{ILivingData.java => IData.java} | 2 +- .../magus/skill/util/capability/LivingData.java | 4 ++-- .../util/capability/LivingDataAttacher.java | 13 ++++++++++--- 4 files changed, 24 insertions(+), 11 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/util/capability/{ILivingData.java => IData.java} (78%) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java index c1335fa6..65bc7cc2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java @@ -1,27 +1,33 @@ package com.amuzil.omegasource.magus.skill.util.capability; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.CapabilityToken; import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; import java.util.List; +@Mod.EventBusSubscriber(modid = Magus.MOD_ID) public class Capabilities { - public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() {}); + public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() { + }); public static List dataTraits; + private Capabilities() { + } + + @SubscribeEvent public static void register(RegisterCapabilitiesEvent event) { - event.register(ILivingData.class); + event.register(IData.class); } public static void initialiseRegistries() { dataTraits = (List) Registries.DATA_TRAITS.getValues(); } - - private Capabilities() { - } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/ILivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java similarity index 78% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/capability/ILivingData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java index f3a35fcc..c136ea67 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/ILivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java @@ -5,6 +5,6 @@ import net.minecraftforge.common.util.INBTSerializable; @AutoRegisterCapability -public interface ILivingData extends INBTSerializable { +public interface IData extends INBTSerializable { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index efb8732b..51fb6542 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -5,7 +5,7 @@ import java.util.List; -public class LivingData implements ILivingData { +public class LivingData implements IData { //Data Traits to add: // private List skills; @@ -19,7 +19,7 @@ public class LivingData implements ILivingData { // //Miscellaneous data to save //The amount of data traits the player has should not change after initialisation. - private List traits; + private final List traits; public LivingData() { //Clones it. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index f91f4911..c4730513 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -1,33 +1,40 @@ package com.amuzil.omegasource.magus.skill.util.capability; +import com.amuzil.omegasource.magus.Magus; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; +import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; import net.minecraftforge.common.util.INBTSerializable; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.event.AttachCapabilitiesEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +@Mod.EventBusSubscriber(modid = Magus.MOD_ID) public class LivingDataAttacher { private LivingDataAttacher() { } + @SubscribeEvent public static void attach(AttachCapabilitiesEvent event) { - final LivingDataProvider provider = new LivingDataProvider(); + LivingDataProvider provider = new LivingDataProvider(); event.addCapability(LivingDataProvider.IDENTIFIER, provider); } + private static class LivingDataProvider implements ICapabilityProvider, INBTSerializable { public static final ResourceLocation IDENTIFIER = new ResourceLocation("magus", "livingDataProvider"); - private final ILivingData livingData = new LivingData(); - private final LazyOptional optionalData = LazyOptional.of(() -> livingData); + private final IData livingData = new LivingData(); + private final LazyOptional optionalData = LazyOptional.of(() -> livingData); @NotNull From e389df0a1b05bf97964601cc79eb77e3bb947ee8 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 14:33:43 -0800 Subject: [PATCH 040/469] capabilities work, registries currently don't --- .../com/amuzil/omegasource/magus/Magus.java | 20 ++++++------ .../skill/activateable/key/KeyInput.java | 2 +- .../skill/util/capability/Capabilities.java | 8 ++--- .../skill/util/capability/LivingData.java | 10 ++++-- .../util/capability/LivingDataAttacher.java | 31 ++++++++++++++++--- 5 files changed, 50 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 6a14c848..40d41835 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -48,12 +48,12 @@ public Magus() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); - Capabilities.initialiseRegistries(); } private void setup(final FMLCommonSetupEvent event) { // some pre init code Registries.init(); + Capabilities.initialiseCaps(); LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); @@ -61,15 +61,15 @@ private void setup(final FMLCommonSetupEvent event) { //Testing for some conditions //Note: this is only executed client-side, due to how events work. Be sure to send a packet! - Condition test = PathBuilder.buildPathFrom( - new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) - ).get(0); - Condition wait = new KeyPressedCondition(40); - wait.register(() -> { - System.out.println("Success??"); - wait.unregister(); - }, () -> { - }); +// Condition test = PathBuilder.buildPathFrom( +// new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) +// ).get(0); +// Condition wait = new KeyPressedCondition(40); +// wait.register(() -> { +// System.out.println("Success??"); +// wait.unregister(); +// }, () -> { +// }); //More testing: // KeyInfo k1 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D), 10, 10), diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java index 4c5cf942..894dd638 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java @@ -1,6 +1,6 @@ package com.amuzil.omegasource.magus.skill.activateable.key; -import com.amuzil.omegasource.magus.skill.activateable.Activator; + import com.mojang.blaze3d.platform.InputConstants; //Takes a key, delay, and held length. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java index 65bc7cc2..6c3bd639 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.skill.util.capability; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; @@ -10,6 +9,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; +import java.util.ArrayList; import java.util.List; @Mod.EventBusSubscriber(modid = Magus.MOD_ID) @@ -17,7 +17,7 @@ public class Capabilities { public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() { }); - public static List dataTraits; + public static List dataTraits = new ArrayList<>(); private Capabilities() { } @@ -27,7 +27,7 @@ public static void register(RegisterCapabilitiesEvent event) { event.register(IData.class); } - public static void initialiseRegistries() { - dataTraits = (List) Registries.DATA_TRAITS.getValues(); + public static void initialiseCaps() { + LivingDataAttacher.init(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index 51fb6542..97dc2dba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -1,8 +1,10 @@ package com.amuzil.omegasource.magus.skill.util.capability; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; import net.minecraft.nbt.CompoundTag; +import java.util.ArrayList; import java.util.List; public class LivingData implements IData { @@ -22,8 +24,8 @@ public class LivingData implements IData { private final List traits; public LivingData() { - //Clones it. - traits = Capabilities.dataTraits.stream().toList(); + traits = new ArrayList<>(); + fillTraits(); } @Override @@ -38,6 +40,10 @@ public void deserializeNBT(CompoundTag nbt) { traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); } + public void fillTraits() { + //traits.addAll(Registries.DATA_TRAITS.getValues()); + } + //When players move to versions with new techniques and such, we'll have to use these to accomodate. public void addTraits(List dataTraits) { traits.addAll(dataTraits); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index c4730513..b2916bee 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -1,10 +1,16 @@ package com.amuzil.omegasource.magus.skill.util.capability; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; +import com.amuzil.omegasource.magus.radix.path.PathBuilder; +import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; +import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; @@ -20,18 +26,35 @@ public class LivingDataAttacher { private LivingDataAttacher() { } + public static void init() { + //Prevents class loading exceptions + LivingDataProvider.init(); + } @SubscribeEvent public static void attach(AttachCapabilitiesEvent event) { - LivingDataProvider provider = new LivingDataProvider(); - - event.addCapability(LivingDataProvider.IDENTIFIER, provider); + if (event.getObject() instanceof Player) { + LivingDataProvider provider = new LivingDataProvider(); + event.addCapability(LivingDataProvider.IDENTIFIER, provider); + Condition test = PathBuilder.buildPathFrom( + new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) + ).get(0); + Condition wait = new KeyPressedCondition(40); + test.register(() -> { + System.out.println("Success??"); + test.unregister(); + }, () -> { + }); + } } private static class LivingDataProvider implements ICapabilityProvider, INBTSerializable { - public static final ResourceLocation IDENTIFIER = new ResourceLocation("magus", "livingDataProvider"); + static void init() { + } + + public static final ResourceLocation IDENTIFIER = new ResourceLocation("magus", "living_data_provider"); private final IData livingData = new LivingData(); private final LazyOptional optionalData = LazyOptional.of(() -> livingData); From 0d33d3a81ac8b66d02c3152990cd0bf611189452 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 14:44:02 -0800 Subject: [PATCH 041/469] Capabilities and registries working --- .../magus/registry/Registries.java | 37 ++++++++++++------- .../skill/util/capability/LivingData.java | 2 +- .../util/capability/LivingDataAttacher.java | 9 ----- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index ddeb7b4e..ef5a3d9c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -8,10 +8,9 @@ import net.minecraft.resources.ResourceLocation; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.registries.ForgeRegistry; -import net.minecraftforge.registries.NewRegistryEvent; -import net.minecraftforge.registries.ObjectHolder; -import net.minecraftforge.registries.RegistryBuilder; +import net.minecraftforge.registries.*; + +import java.util.function.Supplier; /** * All custom registries go here. @@ -22,31 +21,43 @@ public class Registries { public static void init() { } - @ObjectHolder(registryName = "data_traits", value = "magus:data_traits") - public static ForgeRegistry DATA_TRAITS; + public static Supplier> DATA_TRAITS; - @ObjectHolder(registryName = "skill_categories", value = "magus:skill_categories") - public static ForgeRegistry SKILL_CATEGORIES; + public static Supplier> SKILL_CATEGORIES; - @ObjectHolder(registryName = "skills", value = "magus:skills") - public static ForgeRegistry SKILLS; + public static Supplier> SKILLS; @SubscribeEvent public static void onRegistryRegister(NewRegistryEvent event) { //Data trait registry. RegistryBuilder traits = new RegistryBuilder<>(); traits.setName(new ResourceLocation(Magus.MOD_ID, "data_traits")); - event.create(traits); + DATA_TRAITS = event.create(traits); + //Skill categories RegistryBuilder categories = new RegistryBuilder<>(); categories.setName(new ResourceLocation(Magus.MOD_ID, "skill_categories")); - event.create(categories); + SKILL_CATEGORIES = event.create(categories); //Skills RegistryBuilder skills = new RegistryBuilder<>(); skills.setName(new ResourceLocation(Magus.MOD_ID, "skills")); - event.create(skills); + SKILLS = event.create(skills); + + //Forms + + //Modifiers + } + + //What to do in the case of missing registry entries for each type of registry. + @SubscribeEvent + public void onMissing(MissingMappingsEvent event) { + //Data Traits + + //Skill Categories + + //Skills //Forms diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index 97dc2dba..d367352b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -41,7 +41,7 @@ public void deserializeNBT(CompoundTag nbt) { } public void fillTraits() { - //traits.addAll(Registries.DATA_TRAITS.getValues()); + traits.addAll(Registries.DATA_TRAITS.get().getValues()); } //When players move to versions with new techniques and such, we'll have to use these to accomodate. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index b2916bee..a59b0769 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -36,15 +36,6 @@ public static void attach(AttachCapabilitiesEvent event) { if (event.getObject() instanceof Player) { LivingDataProvider provider = new LivingDataProvider(); event.addCapability(LivingDataProvider.IDENTIFIER, provider); - Condition test = PathBuilder.buildPathFrom( - new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) - ).get(0); - Condition wait = new KeyPressedCondition(40); - test.register(() -> { - System.out.println("Success??"); - test.unregister(); - }, () -> { - }); } } From 3ecf570c5e60c088571032a5b004a2363681471d Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 15:02:38 -0800 Subject: [PATCH 042/469] Further tested capabilities. --- .../com/amuzil/omegasource/magus/Magus.java | 14 ++++++-------- .../omegasource/magus/radix/Condition.java | 4 ++-- .../skill/util/capability/LivingData.java | 1 + .../util/capability/LivingDataAttacher.java | 18 ++++++++++-------- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 40d41835..966093be 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -6,6 +6,7 @@ import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.amuzil.omegasource.magus.skill.util.capability.Capabilities; +import com.amuzil.omegasource.magus.skill.util.capability.IData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraft.world.level.block.Blocks; @@ -61,14 +62,11 @@ private void setup(final FMLCommonSetupEvent event) { //Testing for some conditions //Note: this is only executed client-side, due to how events work. Be sure to send a packet! -// Condition test = PathBuilder.buildPathFrom( -// new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) -// ).get(0); -// Condition wait = new KeyPressedCondition(40); -// wait.register(() -> { -// System.out.println("Success??"); -// wait.unregister(); -// }, () -> { + Condition test = PathBuilder.buildPathFrom( + new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) + ).get(0); + Condition wait = new KeyPressedCondition(40); +// test.register(() -> { }, () -> { // }); //More testing: diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index bf757405..10b2491e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -15,11 +15,11 @@ public enum Result { public void register(Runnable onSuccess, Runnable onFailure) { RadixUtil.getLogger().debug("Registering results"); this.onSuccess = () -> { - RadixUtil.getLogger().debug("Result: success"); + //RadixUtil.getLogger().debug("Result: success"); onSuccess.run(); }; this.onFailure = () -> { - RadixUtil.getLogger().debug("Result: failure"); + //RadixUtil.getLogger().debug("Result: failure"); onFailure.run(); }; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index d367352b..133d8243 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -28,6 +28,7 @@ public LivingData() { fillTraits(); } + @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index a59b0769..641c05a3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -1,19 +1,14 @@ package com.amuzil.omegasource.magus.skill.util.capability; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; -import com.amuzil.omegasource.magus.radix.path.PathBuilder; -import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; -import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; import net.minecraftforge.common.util.INBTSerializable; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.event.AttachCapabilitiesEvent; @@ -33,7 +28,9 @@ public static void init() { @SubscribeEvent public static void attach(AttachCapabilitiesEvent event) { - if (event.getObject() instanceof Player) { + if (event.getObject() instanceof LivingEntity) { + //TODO: Add requirement to check against a list of compatible entities. + //E.g custom npcs, or specific mobs you want to be able to use Skills. LivingDataProvider provider = new LivingDataProvider(); event.addCapability(LivingDataProvider.IDENTIFIER, provider); } @@ -51,10 +48,15 @@ static void init() { private final LazyOptional optionalData = LazyOptional.of(() -> livingData); + @Override + public @NotNull LazyOptional getCapability(@NotNull Capability cap) { + return Capabilities.LIVING_DATA.orEmpty(cap, this.optionalData); + } + @NotNull @Override public LazyOptional getCapability(@NotNull Capability cap, @Nullable Direction side) { - return Capabilities.LIVING_DATA.orEmpty(cap, this.optionalData); + return getCapability(cap); } void invalidate() { From 3b332341aae276bf57f7fb8caed80610baf171aa Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sat, 24 Dec 2022 15:04:45 -0800 Subject: [PATCH 043/469] Documentation for IData --- .../amuzil/omegasource/magus/skill/util/capability/IData.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java index c136ea67..28058f0c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java @@ -4,6 +4,10 @@ import net.minecraftforge.common.capabilities.AutoRegisterCapability; import net.minecraftforge.common.util.INBTSerializable; +/** + * Very different from IDataTrait. This class lets you access data and do things with it, + * whereas IDataTrait merely stores it. + */ @AutoRegisterCapability public interface IData extends INBTSerializable { From fbfaa0a5b86be506a5571f78946c9600d18ec1e7 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sun, 25 Dec 2022 13:58:36 -0800 Subject: [PATCH 044/469] Restructuring data, added some basic SkillTraits --- .../magus/registry/Registries.java | 7 ++-- .../omegasource/magus/skill/skill/Skill.java | 7 ++++ .../skill/util/capability/Capabilities.java | 4 +- .../skill/util/capability/LivingData.java | 42 +++++++++++++++---- .../skill/util/data/SkillCategoryData.java | 19 ++++++++- .../magus/skill/util/data/SkillData.java | 33 ++++++++++++++- .../{IDataTrait.java => DataTrait.java} | 2 +- .../{SkillDataTrait.java => InputTrait.java} | 2 +- ...DataTrait.java => SkillCategoryTrait.java} | 2 +- .../magus/skill/util/traits/SkillTrait.java | 31 ++++++++++++++ .../util/traits/skilltraits/DamageTrait.java | 32 ++++++++++++++ .../traits/skilltraits/LifetimeTrait.java | 29 +++++++++++++ .../util/traits/skilltraits/SizeTrait.java | 27 ++++++++++++ 13 files changed, 219 insertions(+), 18 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/util/traits/{IDataTrait.java => DataTrait.java} (72%) rename src/main/java/com/amuzil/omegasource/magus/skill/util/traits/{SkillDataTrait.java => InputTrait.java} (55%) rename src/main/java/com/amuzil/omegasource/magus/skill/util/traits/{CategoryDataTrait.java => SkillCategoryTrait.java} (63%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index ef5a3d9c..93424b99 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -3,8 +3,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; -import com.amuzil.omegasource.magus.skill.util.traits.DataTraits; -import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -21,7 +20,7 @@ public class Registries { public static void init() { } - public static Supplier> DATA_TRAITS; + public static Supplier> DATA_TRAITS; public static Supplier> SKILL_CATEGORIES; @@ -30,7 +29,7 @@ public static void init() { @SubscribeEvent public static void onRegistryRegister(NewRegistryEvent event) { //Data trait registry. - RegistryBuilder traits = new RegistryBuilder<>(); + RegistryBuilder traits = new RegistryBuilder<>(); traits.setName(new ResourceLocation(Magus.MOD_ID, "data_traits")); DATA_TRAITS = event.create(traits); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index 72865175..d8c9dc73 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -1,5 +1,8 @@ package com.amuzil.omegasource.magus.skill.skill; +import com.amuzil.omegasource.magus.registry.Registries; + +import java.util.List; import java.util.UUID; /** @@ -14,4 +17,8 @@ public class Skill { //Constant data //E.t.c + public static List getSkills() { + return (List) Registries.SKILLS.get().getValues(); + } + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java index 6c3bd639..934db3b5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.skill.util.capability; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.CapabilityToken; @@ -17,7 +17,7 @@ public class Capabilities { public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() { }); - public static List dataTraits = new ArrayList<>(); + public static List dataTraits = new ArrayList<>(); private Capabilities() { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index 133d8243..308ecf2d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -1,7 +1,10 @@ package com.amuzil.omegasource.magus.skill.util.capability; import com.amuzil.omegasource.magus.registry.Registries; -import com.amuzil.omegasource.magus.skill.util.traits.IDataTrait; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import com.amuzil.omegasource.magus.skill.skill.SkillCategory; +import com.amuzil.omegasource.magus.skill.util.data.SkillData; +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraft.nbt.CompoundTag; import java.util.ArrayList; @@ -21,11 +24,16 @@ public class LivingData implements IData { // //Miscellaneous data to save //The amount of data traits the player has should not change after initialisation. - private final List traits; + private List traits = new ArrayList<>(); + private List categories = new ArrayList<>(); + private List skills = new ArrayList<>(); public LivingData() { - traits = new ArrayList<>(); fillTraits(); + //TODO: Data generation methods for each skill + + fillCategories(); + fillSkills(); } @@ -46,21 +54,41 @@ public void fillTraits() { } //When players move to versions with new techniques and such, we'll have to use these to accomodate. - public void addTraits(List dataTraits) { + public void addTraits(List dataTraits) { traits.addAll(dataTraits); } - public void addTrait(IDataTrait trait) { + public void addTrait(DataTrait trait) { traits.add(trait); } //Ideally, these delete methods are *never* used, because each piece of content //added to the mod should be final. - public void removeTrait(IDataTrait trait) { + public void removeTrait(DataTrait trait) { traits.remove(trait); } - public void removeTraits(List dataTraits) { + public void removeTraits(List dataTraits) { traits.removeAll(dataTraits); } + + public void fillCategories() { + categories.addAll(Registries.SKILL_CATEGORIES.get().getValues()); + } + + public List getAllSkillCategories() { + return this.categories; + } + + public void fillSkills() { + skills.addAll(Registries.SKILLS.get().getValues()); + } + public List getAllSkills() { + return this.skills; + } + + public SkillData getSkillData() { + return null; + } + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java index a69ac9f9..163c4495 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java @@ -1,4 +1,21 @@ package com.amuzil.omegasource.magus.skill.util.data; -public class SkillCategoryData { +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; +import net.minecraft.nbt.CompoundTag; + +public class SkillCategoryData implements DataTrait { + @Override + public String getName() { + return null; + } + + @Override + public CompoundTag serializeNBT() { + return null; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index 7b327cf2..08d18a1b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -1,4 +1,35 @@ package com.amuzil.omegasource.magus.skill.util.data; -public class SkillData { +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; +import org.checkerframework.checker.units.qual.C; + +import java.util.ArrayList; +import java.util.List; + +//TODO: Make this an implementation rather than a class. +//E.g SizeTrait vs ElementTrait or something are both SkillTraits but.... +public class SkillData implements DataTrait { + + List skillTraits = new ArrayList<>(); + + + @Override + public String getName() { + return "skillData"; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = new CompoundTag(); + skillTraits.forEach(skillTrait -> tag.put(skillTrait.getName() + "Trait", skillTrait.serializeNBT())); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + skillTraits.forEach(skillTrait -> skillTrait.deserializeNBT + ((CompoundTag) nbt.get(skillTrait.getName() + "Trait"))); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/IDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java similarity index 72% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/traits/IDataTrait.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java index 1117119d..6007d186 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/IDataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java @@ -3,6 +3,6 @@ import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.util.INBTSerializable; -public interface IDataTrait extends INBTSerializable { +public interface DataTrait extends INBTSerializable { String getName(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/InputTrait.java similarity index 55% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillDataTrait.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/traits/InputTrait.java index eaf529a6..19d1b3fa 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillDataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/InputTrait.java @@ -1,4 +1,4 @@ package com.amuzil.omegasource.magus.skill.util.traits; -public class SkillDataTrait { +public interface InputTrait extends DataTrait { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/CategoryDataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillCategoryTrait.java similarity index 63% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/traits/CategoryDataTrait.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillCategoryTrait.java index 227921c9..7c87cf0b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/CategoryDataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillCategoryTrait.java @@ -1,4 +1,4 @@ package com.amuzil.omegasource.magus.skill.util.traits; -public class CategoryDataTrait { +public class SkillCategoryTrait { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java new file mode 100644 index 00000000..02a80714 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java @@ -0,0 +1,31 @@ +package com.amuzil.omegasource.magus.skill.util.traits; + +import net.minecraft.nbt.CompoundTag; +import org.checkerframework.checker.units.qual.C; + +import javax.xml.crypto.Data; + +public class SkillTrait implements DataTrait { + private String name; + + public SkillTrait(String name) { + this.name = name; + } + + @Override + public String getName() { + return name; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = new CompoundTag(); + tag.putString(getName(), name); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + name = nbt.getString(getName()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java new file mode 100644 index 00000000..65285a57 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java @@ -0,0 +1,32 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +/** + * Basic DamageTrait class for skills. Lets the user determine + * what kind of damage it's for. E.g a Lightning Arc technique might take + * multiple damage traits for the shockwave, chain hits, e.t.c. + */ +public class DamageTrait extends SkillTrait { + + private float damage; + + public DamageTrait(float damage, String name) { + super(name); + this.damage = damage; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putFloat(getName(), damage); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + damage = nbt.getFloat(getName()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java new file mode 100644 index 00000000..0ca11c9f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java @@ -0,0 +1,29 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +/** + * Lifetime of an entity or projectile, in ticks. + */ +public class LifetimeTrait extends SkillTrait { + private int lifetime; + + public LifetimeTrait(int lifetime, String name) { + super(name); + this.lifetime = lifetime; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putInt(getName(), lifetime); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + lifetime = nbt.getInt(getName()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java new file mode 100644 index 00000000..2410eb1f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java @@ -0,0 +1,27 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class SizeTrait extends SkillTrait { + + private float size; + + public SizeTrait(float size, String name) { + super(name); + this.size = size; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putFloat(getName(), size); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + size = nbt.getFloat(getName()); + } +} From 73cd7caa6f5aae3d842ca73f45a5b4372bac63ee Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sun, 25 Dec 2022 14:05:52 -0800 Subject: [PATCH 045/469] 4 basic traits done, adjusted naming @Mahtaran --- .../com/amuzil/omegasource/magus/Magus.java | 1 - .../skill/util/capability/Capabilities.java | 4 +-- .../util/capability/{IData.java => Data.java} | 2 +- .../skill/util/capability/LivingData.java | 2 +- .../util/capability/LivingDataAttacher.java | 5 ++-- .../util/traits/skilltraits/DamageTrait.java | 8 +++--- .../util/traits/skilltraits/SizeTrait.java | 6 ++--- .../util/traits/skilltraits/SpeedTrait.java | 26 +++++++++++++++++++ 8 files changed, 39 insertions(+), 15 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/util/capability/{IData.java => Data.java} (86%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 966093be..ffe20a87 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -6,7 +6,6 @@ import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; import com.amuzil.omegasource.magus.skill.util.capability.Capabilities; -import com.amuzil.omegasource.magus.skill.util.capability.IData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraft.world.level.block.Blocks; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java index 934db3b5..c63a22b3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java @@ -15,7 +15,7 @@ @Mod.EventBusSubscriber(modid = Magus.MOD_ID) public class Capabilities { - public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() { + public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() { }); public static List dataTraits = new ArrayList<>(); @@ -24,7 +24,7 @@ private Capabilities() { @SubscribeEvent public static void register(RegisterCapabilitiesEvent event) { - event.register(IData.class); + event.register(Data.class); } public static void initialiseCaps() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java similarity index 86% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java index 28058f0c..62db9fa1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/IData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java @@ -9,6 +9,6 @@ * whereas IDataTrait merely stores it. */ @AutoRegisterCapability -public interface IData extends INBTSerializable { +public interface Data extends INBTSerializable { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index 308ecf2d..be6e074f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -10,7 +10,7 @@ import java.util.ArrayList; import java.util.List; -public class LivingData implements IData { +public class LivingData implements Data { //Data Traits to add: // private List skills; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index 641c05a3..23436462 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -6,7 +6,6 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.util.INBTSerializable; @@ -44,8 +43,8 @@ static void init() { public static final ResourceLocation IDENTIFIER = new ResourceLocation("magus", "living_data_provider"); - private final IData livingData = new LivingData(); - private final LazyOptional optionalData = LazyOptional.of(() -> livingData); + private final Data livingData = new LivingData(); + private final LazyOptional optionalData = LazyOptional.of(() -> livingData); @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java index 65285a57..34ac2696 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java @@ -10,9 +10,9 @@ */ public class DamageTrait extends SkillTrait { - private float damage; + private double damage; - public DamageTrait(float damage, String name) { + public DamageTrait(double damage, String name) { super(name); this.damage = damage; } @@ -20,13 +20,13 @@ public DamageTrait(float damage, String name) { @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putFloat(getName(), damage); + tag.putDouble(getName(), damage); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); - damage = nbt.getFloat(getName()); + damage = nbt.getDouble(getName()); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java index 2410eb1f..0e132d83 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java @@ -5,7 +5,7 @@ public class SizeTrait extends SkillTrait { - private float size; + private double size; public SizeTrait(float size, String name) { super(name); @@ -15,13 +15,13 @@ public SizeTrait(float size, String name) { @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putFloat(getName(), size); + tag.putDouble(getName(), size); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); - size = nbt.getFloat(getName()); + size = nbt.getDouble(getName()); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java new file mode 100644 index 00000000..5e62df1a --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java @@ -0,0 +1,26 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class SpeedTrait extends SkillTrait { + + private double speed; + + public SpeedTrait(double speed, String name) { + super(name); + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putDouble(getName(), speed); + return super.serializeNBT(); + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + speed = nbt.getDouble(getName()); + } +} From 5f3e72d46100718d1841b4acce36637009194295 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sun, 25 Dec 2022 16:53:41 -0800 Subject: [PATCH 046/469] things are now marked as "dirty" for data saving --- .../skill/util/capability/LivingData.java | 13 +++- .../magus/skill/util/data/SkillData.java | 42 ++++++++-- .../magus/skill/util/traits/DataTrait.java | 12 +++ .../magus/skill/util/traits/SkillTrait.java | 21 ++++- .../util/traits/skilltraits/ColourTrait.java | 77 +++++++++++++++++++ .../util/traits/skilltraits/DamageTrait.java | 13 +++- .../traits/skilltraits/LifetimeTrait.java | 9 +++ .../util/traits/skilltraits/SizeTrait.java | 4 +- .../util/traits/skilltraits/SpeedTrait.java | 10 +++ 9 files changed, 187 insertions(+), 14 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index be6e074f..e3d71ebf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -6,6 +6,7 @@ import com.amuzil.omegasource.magus.skill.util.data.SkillData; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.item.ItemStack; import java.util.ArrayList; import java.util.List; @@ -40,13 +41,21 @@ public LivingData() { @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); - traits.forEach(trait -> tag.put(trait.getName(), trait.serializeNBT())); + traits.forEach(trait -> { + if (trait.isDirty()) { + tag.put(trait.getName(), trait.serializeNBT()); + } + }); return tag; } + + @Override public void deserializeNBT(CompoundTag nbt) { - traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); + traits.forEach(trait -> { + trait.deserializeNBT((CompoundTag) nbt.get(trait.getName())); + }); } public void fillTraits() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index 08d18a1b..e46b0674 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -1,35 +1,67 @@ package com.amuzil.omegasource.magus.skill.util.data; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.nbt.CompoundTag; -import org.checkerframework.checker.units.qual.C; import java.util.ArrayList; import java.util.List; +import java.util.Objects; //TODO: Make this an implementation rather than a class. //E.g SizeTrait vs ElementTrait or something are both SkillTraits but.... public class SkillData implements DataTrait { List skillTraits = new ArrayList<>(); - + private boolean isDirty = false; @Override public String getName() { return "skillData"; } + @Override + public void markDirty() { + this.isDirty = true; + } + + @Override + public void markClean() { + this.isDirty = false; + } + + @Override + public boolean isDirty() { + for (SkillTrait trait : skillTraits) + if (trait.isDirty()) { + markDirty(); + return true; + } + + return this.isDirty; + } + @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); - skillTraits.forEach(skillTrait -> tag.put(skillTrait.getName() + "Trait", skillTrait.serializeNBT())); + skillTraits.forEach(skillTrait -> { + if (skillTrait.isDirty()) + tag.put(skillTrait.getName() + "Trait", skillTrait.serializeNBT()); + }); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { - skillTraits.forEach(skillTrait -> skillTrait.deserializeNBT - ((CompoundTag) nbt.get(skillTrait.getName() + "Trait"))); + markClean(); + try { + skillTraits.forEach(skillTrait -> skillTrait.deserializeNBT + ((CompoundTag) Objects.requireNonNull(nbt.get(skillTrait.getName() + "Trait")))); + } catch (NullPointerException e) { + RadixUtil.getLogger().error("Something has gone seriously wrong:" + + "A skill trait hasn't been carried over from the registry."); + e.printStackTrace(); + } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java index 6007d186..b0c5cf25 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java @@ -4,5 +4,17 @@ import net.minecraftforge.common.util.INBTSerializable; public interface DataTrait extends INBTSerializable { + String getName(); + + /* Remember to call these in *ever* setter you have for each trait! */ + /* Methods for whether to save the data. */ + void markDirty(); + + /* Do not use this ever. This is only used by LivingData upon unserialisation. */ + void markClean(); + + boolean isDirty(); + + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java index 02a80714..d9b1812b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java @@ -1,15 +1,14 @@ package com.amuzil.omegasource.magus.skill.util.traits; import net.minecraft.nbt.CompoundTag; -import org.checkerframework.checker.units.qual.C; - -import javax.xml.crypto.Data; public class SkillTrait implements DataTrait { private String name; + private boolean isDirty = false; public SkillTrait(String name) { this.name = name; + markDirty(); } @Override @@ -17,6 +16,21 @@ public String getName() { return name; } + @Override + public void markDirty() { + this.isDirty = true; + } + + @Override + public void markClean() { + this.isDirty = false; + } + + @Override + public boolean isDirty() { + return this.isDirty; + } + @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); @@ -26,6 +40,7 @@ public CompoundTag serializeNBT() { @Override public void deserializeNBT(CompoundTag nbt) { + markClean(); name = nbt.getString(getName()); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java new file mode 100644 index 00000000..5276e3ec --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java @@ -0,0 +1,77 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +/** + * Supports an R, G, and B value. Designed for 0 - 1D, but you can use an int if you divide + * by 255D. + */ +public class ColourTrait extends SkillTrait { + + private double r, g, b; + + public ColourTrait(double r, double g, double b, String name) { + super(name); + this.r = r; + this.g = g; + this.b = b; + } + + public ColourTrait(int r, int g, int b, String name) { + super(name); + this.r = r / 255D; + this.g = g / 255D; + this.b = b / 255D; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putDouble("red", r); + tag.putDouble("green", g); + tag.putDouble("blue", b); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + r = nbt.getDouble("red"); + g = nbt.getDouble("green"); + b = nbt.getDouble("blue"); + } + + public void setR(double r) { + this.r = r; + markDirty(); + } + + public void setG(double g) { + this.g = g; + markDirty(); + } + + public void setB(double b) { + this.b = b; + markDirty(); + } + + public void setRGB(double r, double g, double b) { + setR(r); + setG(g); + setB(b); + } + + public double getR() { + return r; + } + + public double getG() { + return g; + } + + public double getB() { + return b; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java index 34ac2696..254f24c8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java @@ -20,13 +20,22 @@ public DamageTrait(double damage, String name) { @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putDouble(getName(), damage); + tag.putDouble("damage", damage); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); - damage = nbt.getDouble(getName()); + damage = nbt.getDouble("damage"); + } + + public void setDamage(double damage) { + this.damage = damage; + markDirty(); + } + + public double getDamage() { + return this.damage; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java index 0ca11c9f..83417e96 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java @@ -26,4 +26,13 @@ public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); lifetime = nbt.getInt(getName()); } + + public void setLifetime(int lifetime) { + this.lifetime = lifetime; + markDirty(); + } + + public int getLifetime() { + return lifetime; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java index 0e132d83..cb7a6c08 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java @@ -15,13 +15,13 @@ public SizeTrait(float size, String name) { @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putDouble(getName(), size); + tag.putDouble("size", size); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); - size = nbt.getDouble(getName()); + size = nbt.getDouble("size"); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java index 5e62df1a..d02957d1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java @@ -9,6 +9,7 @@ public class SpeedTrait extends SkillTrait { public SpeedTrait(double speed, String name) { super(name); + this.speed = speed; } @Override @@ -23,4 +24,13 @@ public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); speed = nbt.getDouble(getName()); } + + public void setSpeed(double speed) { + this.speed = speed; + markDirty(); + } + + public double getSpeed() { + return speed; + } } From 8f0085605ce5b21b3ec77a1ee385db572a2f4e8d Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sun, 25 Dec 2022 16:58:02 -0800 Subject: [PATCH 047/469] LivingData now has isDirty() --- .../magus/skill/util/capability/Data.java | 7 ++++++ .../skill/util/capability/LivingData.java | 22 +++++++++++++++++++ .../util/traits/skilltraits/RadiusTrait.java | 10 +++++++++ 3 files changed, 39 insertions(+) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RadiusTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java index 62db9fa1..9d0997a9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java @@ -11,4 +11,11 @@ @AutoRegisterCapability public interface Data extends INBTSerializable { + void markDirty(); + + void markClean(); + + boolean isDirty(); + + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index e3d71ebf..8f77b797 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -28,6 +28,7 @@ public class LivingData implements Data { private List traits = new ArrayList<>(); private List categories = new ArrayList<>(); private List skills = new ArrayList<>(); + private boolean isDirty; public LivingData() { fillTraits(); @@ -35,6 +36,7 @@ public LivingData() { fillCategories(); fillSkills(); + markDirty(); } @@ -100,4 +102,24 @@ public SkillData getSkillData() { return null; } + @Override + public void markDirty() { + this.isDirty = true; + } + + @Override + public void markClean() { + this.isDirty = false; + } + + @Override + public boolean isDirty() { + for (DataTrait trait : traits) + if (trait.isDirty()) { + markDirty(); + return true; + } + //TODO: Add a check for all kinds of data, not just DataTraits + return true; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RadiusTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RadiusTrait.java new file mode 100644 index 00000000..2d08884a --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RadiusTrait.java @@ -0,0 +1,10 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; + +public class RadiusTrait extends SkillTrait { + + public RadiusTrait(String name) { + super(name); + } +} From bc0972b93b9c3b2060b2b824059791c57f36ff7c Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sun, 25 Dec 2022 17:51:58 -0800 Subject: [PATCH 048/469] Added a variety of traits I will look at the contribution guidelines later maht, L --- .../skill/util/capability/LivingData.java | 6 ++- .../util/capability/LivingDataAttacher.java | 1 + .../magus/skill/util/traits/SkillTrait.java | 4 +- .../util/traits/skilltraits/ColourTrait.java | 12 +++--- .../util/traits/skilltraits/DamageTrait.java | 4 +- .../traits/skilltraits/KnockbackTrait.java | 27 +++++++++++++ .../util/traits/skilltraits/LevelTrait.java | 27 +++++++++++++ .../traits/skilltraits/PiercingTrait.java | 36 ++++++++++++++++++ .../traits/skilltraits/PotionLevelTrait.java | 27 +++++++++++++ .../util/traits/skilltraits/PushTrait.java | 38 +++++++++++++++++++ .../util/traits/skilltraits/RadiusTrait.java | 10 ----- .../util/traits/skilltraits/RangeTrait.java | 36 ++++++++++++++++++ .../{LifetimeTrait.java => TimedTrait.java} | 23 +++++------ .../util/traits/skilltraits/XPTrait.java | 27 +++++++++++++ 14 files changed, 245 insertions(+), 33 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/KnockbackTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LevelTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PiercingTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PotionLevelTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PushTrait.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RadiusTrait.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RangeTrait.java rename src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/{LifetimeTrait.java => TimedTrait.java} (52%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index 8f77b797..8a1be848 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -6,11 +6,13 @@ import com.amuzil.omegasource.magus.skill.util.data.SkillData; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraft.nbt.CompoundTag; -import net.minecraft.world.item.ItemStack; import java.util.ArrayList; import java.util.List; +/** + * TODO: Figure out how to save this data when MC wants to save but nothing has changed/. + */ public class LivingData implements Data { //Data Traits to add: @@ -120,6 +122,6 @@ public boolean isDirty() { return true; } //TODO: Add a check for all kinds of data, not just DataTraits - return true; + return this.isDirty; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index 23436462..cc0d7788 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -6,6 +6,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.level.Level; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.util.INBTSerializable; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java index d9b1812b..22db9f41 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java @@ -34,13 +34,13 @@ public boolean isDirty() { @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); - tag.putString(getName(), name); + tag.putString("name", name); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { markClean(); - name = nbt.getString(getName()); + name = nbt.getString("name"); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java index 5276e3ec..b01b9d50 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java @@ -28,18 +28,18 @@ public ColourTrait(int r, int g, int b, String name) { @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putDouble("red", r); - tag.putDouble("green", g); - tag.putDouble("blue", b); + tag.putDouble(getName() + "Red", r); + tag.putDouble(getName() + "Green", g); + tag.putDouble(getName() + "Blue", b); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); - r = nbt.getDouble("red"); - g = nbt.getDouble("green"); - b = nbt.getDouble("blue"); + r = nbt.getDouble(getName() + "Red"); + g = nbt.getDouble(getName() + "Green"); + b = nbt.getDouble(getName() + "Blue"); } public void setR(double r) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java index 254f24c8..d250e458 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java @@ -20,14 +20,14 @@ public DamageTrait(double damage, String name) { @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putDouble("damage", damage); + tag.putDouble(getName(), damage); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); - damage = nbt.getDouble("damage"); + damage = nbt.getDouble(getName()); } public void setDamage(double damage) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/KnockbackTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/KnockbackTrait.java new file mode 100644 index 00000000..833fb17a --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/KnockbackTrait.java @@ -0,0 +1,27 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class KnockbackTrait extends SkillTrait { + + private double knockback; + + public KnockbackTrait(double knockback, String name) { + super(name); + this.knockback = knockback; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putDouble(getName(), knockback); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + knockback = nbt.getDouble(getName()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LevelTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LevelTrait.java new file mode 100644 index 00000000..fbf8669d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LevelTrait.java @@ -0,0 +1,27 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class LevelTrait extends SkillTrait { + + private int level; + + public LevelTrait(int level, String name) { + super(name); + this.level = level; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putInt(getName(), level); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + level = nbt.getInt(getName()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PiercingTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PiercingTrait.java new file mode 100644 index 00000000..c925a6eb --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PiercingTrait.java @@ -0,0 +1,36 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class PiercingTrait extends SkillTrait { + + private boolean piecing; + + public PiercingTrait(boolean piercing, String name) { + super(name); + this.piecing = piercing; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putBoolean(getName(), piecing); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + piecing = nbt.getBoolean(getName()); + } + + public void setPiecing(boolean piecing) { + this.piecing = piecing; + markDirty(); + } + + public boolean isPiecing() { + return piecing; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PotionLevelTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PotionLevelTrait.java new file mode 100644 index 00000000..214cc222 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PotionLevelTrait.java @@ -0,0 +1,27 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class PotionLevelTrait extends SkillTrait { + + private int level; + + public PotionLevelTrait(int level, String name) { + super(name); + this.level = level; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putInt(getName(), level); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + level = nbt.getInt(getName()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PushTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PushTrait.java new file mode 100644 index 00000000..04468a92 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PushTrait.java @@ -0,0 +1,38 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class PushTrait extends SkillTrait { + + private PushType type; + + public PushTrait(PushType type, String name) { + super(name); + this.type = type; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putString(getName(), type.name()); + return super.serializeNBT(); + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + type = PushType.valueOf(nbt.getString(getName())); + } + + /** Shows the different levels of redstone pushing in increasing order of redstone. + * + */ + public enum PushType { + NONE, + REDSTONE, + STONE, + IRON_DOOR, + IRON_TRAPDOOR; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RadiusTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RadiusTrait.java deleted file mode 100644 index 2d08884a..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RadiusTrait.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; - -import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; - -public class RadiusTrait extends SkillTrait { - - public RadiusTrait(String name) { - super(name); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RangeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RangeTrait.java new file mode 100644 index 00000000..c2521a28 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RangeTrait.java @@ -0,0 +1,36 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class RangeTrait extends SkillTrait { + + private double range; + + public RangeTrait(double range, String name) { + super(name); + this.range = range; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putDouble(getName(), range); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + range = nbt.getDouble(getName()); + } + + public void setRange(double range) { + this.range = range; + markDirty(); + } + + public double getRange() { + return range; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java similarity index 52% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java index 83417e96..82e6bde0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LifetimeTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java @@ -4,35 +4,36 @@ import net.minecraft.nbt.CompoundTag; /** - * Lifetime of an entity or projectile, in ticks. + * The most generic trait of all time. Works for: + * -Fire time, charging, lifetime, potion duration, e.t.c. */ -public class LifetimeTrait extends SkillTrait { - private int lifetime; +public class TimedTrait extends SkillTrait { + private int time; - public LifetimeTrait(int lifetime, String name) { + public TimedTrait(int time, String name) { super(name); - this.lifetime = lifetime; + this.time = time; } @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putInt(getName(), lifetime); + tag.putInt(getName(), time); return tag; } @Override public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); - lifetime = nbt.getInt(getName()); + time = nbt.getInt(getName()); } - public void setLifetime(int lifetime) { - this.lifetime = lifetime; + public void setTime(int time) { + this.time = time; markDirty(); } - public int getLifetime() { - return lifetime; + public int getTime() { + return time; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java new file mode 100644 index 00000000..87debd2e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java @@ -0,0 +1,27 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class XPTrait extends SkillTrait { + + private double xp; + + public XPTrait(double xp, String name) { + super(name); + this.xp = xp; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putDouble(getName(), xp); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + xp = nbt.getDouble(getName()); + } +} From 9cc7bf9540d9ced93ab90ebb0abb9eaf6f36f6cf Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sun, 25 Dec 2022 21:00:21 -0800 Subject: [PATCH 049/469] basic traits done; onto Skill Structure --- .../magus/skill/util/capability/Data.java | 3 ++ .../skill/util/capability/LivingData.java | 14 ++----- .../traits/skilltraits/AngleWidthTrait.java | 40 +++++++++++++++++++ 3 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/AngleWidthTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java index 9d0997a9..d958e764 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java @@ -11,6 +11,9 @@ @AutoRegisterCapability public interface Data extends INBTSerializable { + /* These are used to make everything stored in the class serialised/unserialised. + Not for generic purposes like DataTrait. + */ void markDirty(); void markClean(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index 8a1be848..7bfb22ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -46,7 +46,7 @@ public LivingData() { public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); traits.forEach(trait -> { - if (trait.isDirty()) { + if (trait.isDirty() || isDirty()) { tag.put(trait.getName(), trait.serializeNBT()); } }); @@ -54,12 +54,10 @@ public CompoundTag serializeNBT() { } - @Override public void deserializeNBT(CompoundTag nbt) { - traits.forEach(trait -> { - trait.deserializeNBT((CompoundTag) nbt.get(trait.getName())); - }); + markClean(); + traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); } public void fillTraits() { @@ -96,6 +94,7 @@ public List getAllSkillCategories() { public void fillSkills() { skills.addAll(Registries.SKILLS.get().getValues()); } + public List getAllSkills() { return this.skills; } @@ -116,11 +115,6 @@ public void markClean() { @Override public boolean isDirty() { - for (DataTrait trait : traits) - if (trait.isDirty()) { - markDirty(); - return true; - } //TODO: Add a check for all kinds of data, not just DataTraits return this.isDirty; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/AngleWidthTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/AngleWidthTrait.java new file mode 100644 index 00000000..28715e40 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/AngleWidthTrait.java @@ -0,0 +1,40 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +/** + * In degrees. + */ +public class AngleWidthTrait extends SkillTrait { + + //Between 0 and 360. Double for *very* specific angles. + private double degrees; + + public AngleWidthTrait(double degrees, String name) { + super(name); + this.degrees = degrees; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putDouble(getName(), degrees); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + degrees = nbt.getDouble(getName()); + } + + public void setDegrees(double degrees) { + this.degrees = degrees; + markDirty(); + } + + public double getDegrees() { + return degrees; + } +} From fcd2b43761ab364dc40a97c743a100ae9238fbee Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sun, 25 Dec 2022 21:43:48 -0800 Subject: [PATCH 050/469] working on skill structure, registry set up for skills --- .../magus/registry/Registries.java | 54 +++++++++-- .../omegasource/magus/skill/skill/Skill.java | 89 +++++++++++++++++-- .../magus/skill/skill/SkillActive.java | 4 + .../magus/skill/skill/SkillStance.java | 3 + .../skill/util/data/SkillCategoryData.java | 16 ++++ 5 files changed, 152 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 93424b99..a4059cbf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -4,6 +4,8 @@ import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -17,15 +19,18 @@ @Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class Registries { - public static void init() { - } - public static Supplier> DATA_TRAITS; - public static Supplier> SKILL_CATEGORIES; - public static Supplier> SKILLS; + public static void init() { + } + + //How registering will work: + /* + All skills will be registered first, along with skill categories. + Then, each skill will have its getTraits() method called, and each of its traits will be registered. + */ @SubscribeEvent public static void onRegistryRegister(NewRegistryEvent event) { //Data trait registry. @@ -49,9 +54,10 @@ public static void onRegistryRegister(NewRegistryEvent event) { //Modifiers } + //What to do in the case of missing registry entries for each type of registry. @SubscribeEvent - public void onMissing(MissingMappingsEvent event) { + public static void onMissing(MissingMappingsEvent event) { //Data Traits //Skill Categories @@ -62,4 +68,40 @@ public void onMissing(MissingMappingsEvent event) { //Modifiers } + + @SubscribeEvent + public static void gameRegistry(RegisterEvent event) { + /* Skill Categories. */ + if (event.getRegistryKey().equals(SKILL_CATEGORIES.get().getRegistryKey())) { + IForgeRegistry registry = SKILL_CATEGORIES.get(); + ResourceKey> resKey = registry.getRegistryKey(); + + + event.register(resKey, helper -> { + }); + } + + /* Skills. */ + if (event.getRegistryKey().equals(SKILLS.get().getRegistryKey())) { + IForgeRegistry registry = SKILLS.get(); + ResourceKey> resKey = registry.getRegistryKey(); + + + event.register(resKey, helper -> { + Skill fireball = new Skill("fireball", null); + registry.register(fireball.getId(), fireball); + }); + } + + /* Data Traits. */ + if (event.getRegistryKey().equals(DATA_TRAITS.get().getRegistryKey())) { + IForgeRegistry registry = DATA_TRAITS.get(); + ResourceKey> resKey = registry.getRegistryKey(); + + + /* For each skill registered, grab its list of SkillTraits and register it here. */ + event.register(resKey, helper -> { + }); + } + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index d8c9dc73..cdf2a606 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -1,24 +1,97 @@ package com.amuzil.omegasource.magus.skill.skill; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.LivingEntity; import java.util.List; -import java.util.UUID; /** * Basic skill class. All other skills extend this. */ public class Skill { + private ResourceLocation id; + private SkillCategory category; + private List traits; + private List types; - private String name; - private UUID category; + public Skill(String name, SkillCategory category) { + this.id = new ResourceLocation(Magus.MOD_ID, name); + this.category = category; + Registries.SKILLS.get().register(id, this); + } + + public Skill(ResourceLocation id, SkillCategory category) { + + } - //Modifier data - //Constant data - //E.t.c + public SkillCategory getCategory() { + return category; + } - public static List getSkills() { - return (List) Registries.SKILLS.get().getValues(); + public ResourceLocation getId() { + return id; } + public final void lifecycle(LivingEntity entity, RadixTree tree) { + // Run this asynchronously + if (!shouldStart(entity, tree)) + return; + +// if (EventBus.post(new SkillLifecycleEvent.Start(entity, tree, this)) == EventResult.CANCEL) +// return; +// +// start(entity, tree); +// +// while (shouldRun(entity, tree)) { +// if (shouldStop(entity, tree)) { +// if (EventBus.post(new SkillLifecycleEvent.Stop(entity, tree, this)) == EventResult.CANCEL) +// break; +// +// stop(entity, tree); +// } else { +// if (EventBus.post(new SkillLifecycleEvent.Run(entity, tree, this)) == EventResult.CANCEL) +// break; +// run(entity, tree); +// } +// } + } + + public boolean shouldStart(LivingEntity entity, RadixTree tree) { + return false; + } + + public boolean shouldRun(LivingEntity entity, RadixTree tree) { + return false; + } + + public boolean shouldStop(LivingEntity entity, RadixTree tree) { + return false; + } + + public void start(LivingEntity entity, RadixTree tree) { + } + + public void run(LivingEntity entity, RadixTree tree) { + } + + public void stop(LivingEntity entity, RadixTree tree) { + } + + /** + * Different skill types. A skill can be multiple of one type. + */ + public enum SkillType { + OFFENSIVE, + DEFENSIVE, + MOBILITY, + BUFF, + UTILITY, + RANGED, + MELEE, + CONSTRUCT + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index 9e720e8d..3d7c215d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -2,6 +2,10 @@ public class SkillActive extends Skill { + public SkillActive(String name, SkillCategory category) { + super(name, category); + } + //Need to account for the different types as worked out by Maht and I (FavouriteDragon). public boolean execute() { return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java index 6b50d68b..6ecb41a9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java @@ -10,4 +10,7 @@ * to different types of martial arts in a martial arts mod. E.g variations on karate. */ public class SkillStance extends Skill { + public SkillStance(String name, SkillCategory category) { + super(name, category); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java index 163c4495..f637c041 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillCategoryData.java @@ -4,11 +4,27 @@ import net.minecraft.nbt.CompoundTag; public class SkillCategoryData implements DataTrait { + @Override public String getName() { return null; } + @Override + public void markDirty() { + + } + + @Override + public void markClean() { + + } + + @Override + public boolean isDirty() { + return false; + } + @Override public CompoundTag serializeNBT() { return null; From ab7d7b35d6fa411d343f4df65219ad54f71aa944 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Sun, 25 Dec 2022 21:53:15 -0800 Subject: [PATCH 051/469] Registries now work, working on Skill structure --- .../magus/registry/Registries.java | 3 +- .../omegasource/magus/skill/skill/Skill.java | 35 +++++++++---------- .../magus/skill/skill/SkillActive.java | 33 +++++++++++++++++ .../magus/skill/skill/SkillStance.java | 33 +++++++++++++++++ 4 files changed, 85 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index a4059cbf..3947e883 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.skill.skill.Skill; +import com.amuzil.omegasource.magus.skill.skill.SkillActive; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraft.core.Registry; @@ -88,7 +89,7 @@ public static void gameRegistry(RegisterEvent event) { event.register(resKey, helper -> { - Skill fireball = new Skill("fireball", null); + Skill fireball = new SkillActive("fireball", null); registry.register(fireball.getId(), fireball); }); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index cdf2a606..ed576c03 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -12,7 +12,7 @@ /** * Basic skill class. All other skills extend this. */ -public class Skill { +public abstract class Skill { private ResourceLocation id; private SkillCategory category; private List traits; @@ -21,11 +21,11 @@ public class Skill { public Skill(String name, SkillCategory category) { this.id = new ResourceLocation(Magus.MOD_ID, name); this.category = category; - Registries.SKILLS.get().register(id, this); } public Skill(ResourceLocation id, SkillCategory category) { - + this.id = id; + this.category = category; } public SkillCategory getCategory() { @@ -36,6 +36,14 @@ public ResourceLocation getId() { return id; } + public List getTraits() { + return this.traits; + } + + public List getTypes() { + return types; + } + public final void lifecycle(LivingEntity entity, RadixTree tree) { // Run this asynchronously if (!shouldStart(entity, tree)) @@ -60,26 +68,17 @@ public final void lifecycle(LivingEntity entity, RadixTree tree) { // } } - public boolean shouldStart(LivingEntity entity, RadixTree tree) { - return false; - } + public abstract boolean shouldStart(LivingEntity entity, RadixTree tree); - public boolean shouldRun(LivingEntity entity, RadixTree tree) { - return false; - } + public abstract boolean shouldRun(LivingEntity entity, RadixTree tree); - public boolean shouldStop(LivingEntity entity, RadixTree tree) { - return false; - } + public abstract boolean shouldStop(LivingEntity entity, RadixTree tree); - public void start(LivingEntity entity, RadixTree tree) { - } + public abstract void start(LivingEntity entity, RadixTree tree); - public void run(LivingEntity entity, RadixTree tree) { - } + public abstract void run(LivingEntity entity, RadixTree tree); - public void stop(LivingEntity entity, RadixTree tree) { - } + public abstract void stop(LivingEntity entity, RadixTree tree); /** * Different skill types. A skill can be multiple of one type. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index 3d7c215d..cf61b1e1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -1,11 +1,44 @@ package com.amuzil.omegasource.magus.skill.skill; +import com.amuzil.omegasource.magus.radix.RadixTree; +import net.minecraft.world.entity.LivingEntity; + public class SkillActive extends Skill { public SkillActive(String name, SkillCategory category) { super(name, category); } + @Override + public boolean shouldStart(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public boolean shouldRun(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public boolean shouldStop(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public void start(LivingEntity entity, RadixTree tree) { + + } + + @Override + public void run(LivingEntity entity, RadixTree tree) { + + } + + @Override + public void stop(LivingEntity entity, RadixTree tree) { + + } + //Need to account for the different types as worked out by Maht and I (FavouriteDragon). public boolean execute() { return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java index 6ecb41a9..f2b27f87 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java @@ -1,5 +1,8 @@ package com.amuzil.omegasource.magus.skill.skill; +import com.amuzil.omegasource.magus.radix.RadixTree; +import net.minecraft.world.entity.LivingEntity; + /** * Name WIP. * Functions as a "stance" skill, as described in Avatar's documentation, design, and outline. @@ -13,4 +16,34 @@ public class SkillStance extends Skill { public SkillStance(String name, SkillCategory category) { super(name, category); } + + @Override + public boolean shouldStart(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public boolean shouldRun(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public boolean shouldStop(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public void start(LivingEntity entity, RadixTree tree) { + + } + + @Override + public void run(LivingEntity entity, RadixTree tree) { + + } + + @Override + public void stop(LivingEntity entity, RadixTree tree) { + + } } From 878240afec3d370a143bbec5d07f1eab98439cb5 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Mon, 26 Dec 2022 17:02:41 -0800 Subject: [PATCH 052/469] Package restructuring, skill class finalised --- .../com/amuzil/omegasource/magus/Magus.java | 2 +- .../magus/radix/path/PathBuilder.java | 6 +-- .../ConditionBuilder.java | 2 +- .../key/KeyCombination.java | 2 +- .../key/KeyInput.java | 2 +- .../key/KeyPermutation.java | 2 +- .../magus/skill/event/SkillEvent.java | 31 +++++++++++++ .../magus/skill/event/SkillTickEvent.java | 35 +++++++++++++++ .../omegasource/magus/skill/skill/Skill.java | 43 +++++++++++-------- 9 files changed, 98 insertions(+), 27 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/{activateable => conditionals}/ConditionBuilder.java (96%) rename src/main/java/com/amuzil/omegasource/magus/skill/{activateable => conditionals}/key/KeyCombination.java (71%) rename src/main/java/com/amuzil/omegasource/magus/skill/{activateable => conditionals}/key/KeyInput.java (77%) rename src/main/java/com/amuzil/omegasource/magus/skill/{activateable => conditionals}/key/KeyPermutation.java (89%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/event/SkillEvent.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/event/SkillTickEvent.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index ffe20a87..215323d9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -4,7 +4,7 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; import com.amuzil.omegasource.magus.registry.Registries; -import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.util.capability.Capabilities; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 4cd89457..0dc47dfa 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -6,9 +6,9 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; -import com.amuzil.omegasource.magus.skill.activateable.key.KeyCombination; -import com.amuzil.omegasource.magus.skill.activateable.key.KeyInput; -import com.amuzil.omegasource.magus.skill.activateable.key.KeyPermutation; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyCombination; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyPermutation; import net.minecraftforge.event.TickEvent; import java.util.HashMap; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java similarity index 96% rename from src/main/java/com/amuzil/omegasource/magus/skill/activateable/ConditionBuilder.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 418273a5..4355f406 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.activateable; +package com.amuzil.omegasource.magus.skill.conditionals; /** * Covers all the different ways to activate an ability. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java similarity index 71% rename from src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyCombination.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java index 7c4bfef6..611b952d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.activateable.key; +package com.amuzil.omegasource.magus.skill.conditionals.key; import java.util.LinkedList; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java similarity index 77% rename from src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java index 894dd638..d41b52c3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.activateable.key; +package com.amuzil.omegasource.magus.skill.conditionals.key; import com.mojang.blaze3d.platform.InputConstants; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java similarity index 89% rename from src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyPermutation.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java index e00632f7..1d5ee2dc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/activateable/key/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.activateable.key; +package com.amuzil.omegasource.magus.skill.conditionals.key; import java.util.LinkedList; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/event/SkillEvent.java b/src/main/java/com/amuzil/omegasource/magus/skill/event/SkillEvent.java new file mode 100644 index 00000000..0e2e7e50 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/event/SkillEvent.java @@ -0,0 +1,31 @@ +package com.amuzil.omegasource.magus.skill.event; + +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import net.minecraft.world.entity.LivingEntity; +import net.minecraftforge.event.entity.living.LivingEvent; + +public class SkillEvent extends LivingEvent { + + private Skill skill; + private RadixTree tree; + + public SkillEvent(LivingEntity entity, RadixTree tree, Skill skill) { + super(entity); + this.skill = skill; + this.tree = tree; + } + + @Override + public boolean isCancelable() { + return true; + } + + public Skill getSkill() { + return skill; + } + + public RadixTree getTree() { + return tree; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/event/SkillTickEvent.java b/src/main/java/com/amuzil/omegasource/magus/skill/event/SkillTickEvent.java new file mode 100644 index 00000000..f8ec7b81 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/event/SkillTickEvent.java @@ -0,0 +1,35 @@ +package com.amuzil.omegasource.magus.skill.event; + +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import net.minecraft.world.entity.LivingEntity; + +public class SkillTickEvent extends SkillEvent { + + public SkillTickEvent(LivingEntity entity, RadixTree tree, Skill skill) { + super(entity, tree, skill); + } + + public static class Start extends SkillTickEvent { + + public Start(LivingEntity entity, RadixTree tree, Skill skill) { + super(entity, tree, skill); + } + } + + public static class Run extends SkillTickEvent { + + public Run(LivingEntity entity, RadixTree tree, Skill skill) { + super(entity, tree, skill); + } + } + + public static class Stop extends SkillTickEvent { + + public Stop(LivingEntity entity, RadixTree tree, Skill skill) { + super(entity, tree, skill); + } + } + + +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index ed576c03..40d91e51 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -3,9 +3,13 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.event.SkillTickEvent; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.LivingEntity; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.EventBus; import java.util.List; @@ -44,28 +48,29 @@ public List getTypes() { return types; } - public final void lifecycle(LivingEntity entity, RadixTree tree) { - // Run this asynchronously + public void tick(LivingEntity entity, RadixTree tree) { + //Run this asynchronously if (!shouldStart(entity, tree)) return; -// if (EventBus.post(new SkillLifecycleEvent.Start(entity, tree, this)) == EventResult.CANCEL) -// return; -// -// start(entity, tree); -// -// while (shouldRun(entity, tree)) { -// if (shouldStop(entity, tree)) { -// if (EventBus.post(new SkillLifecycleEvent.Stop(entity, tree, this)) == EventResult.CANCEL) -// break; -// -// stop(entity, tree); -// } else { -// if (EventBus.post(new SkillLifecycleEvent.Run(entity, tree, this)) == EventResult.CANCEL) -// break; -// run(entity, tree); -// } -// } + //Remember, for some reason post only returns true upon the event being cancelled. Blame Forge. + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Start(entity, tree, this))) + return; + + start(entity, tree); + + while (shouldRun(entity, tree)) { + if (shouldStop(entity, tree)) { + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Stop(entity, tree, this))) + break; + + stop(entity, tree); + } else { + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) + break; + run(entity, tree); + } + } } public abstract boolean shouldStart(LivingEntity entity, RadixTree tree); From 8af6a8f6e313c054930ea92d624cba10adf34073 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Mon, 26 Dec 2022 17:11:31 -0800 Subject: [PATCH 053/469] working on reducing the amount of traits --- .../util/traits/skilltraits/BooleanTrait.java | 44 +++++++++++++++++++ .../traits/skilltraits/PiercingTrait.java | 36 --------------- 2 files changed, 44 insertions(+), 36 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/BooleanTrait.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PiercingTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/BooleanTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/BooleanTrait.java new file mode 100644 index 00000000..2695bdbd --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/BooleanTrait.java @@ -0,0 +1,44 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +/** Unlike the classes in the skilltraits package, these + * traits exist outside the skill instance. For example + * StanceTrait s are toggleable booleans that say whether a player has a certain stance enabled. + */ +public class BooleanTrait extends SkillTrait { + + private boolean enabled; + + public BooleanTrait(String name, boolean enabled) { + super(name); + this.enabled = enabled; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putBoolean(getName(), enabled); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + enabled = nbt.getBoolean(getName()); + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + markDirty(); + } + + public boolean isEnabled() { + return this.enabled; + } + + public void toggleEnabled() { + setEnabled(!isEnabled()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PiercingTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PiercingTrait.java deleted file mode 100644 index c925a6eb..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PiercingTrait.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; - -import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; -import net.minecraft.nbt.CompoundTag; - -public class PiercingTrait extends SkillTrait { - - private boolean piecing; - - public PiercingTrait(boolean piercing, String name) { - super(name); - this.piecing = piercing; - } - - @Override - public CompoundTag serializeNBT() { - CompoundTag tag = super.serializeNBT(); - tag.putBoolean(getName(), piecing); - return tag; - } - - @Override - public void deserializeNBT(CompoundTag nbt) { - super.deserializeNBT(nbt); - piecing = nbt.getBoolean(getName()); - } - - public void setPiecing(boolean piecing) { - this.piecing = piecing; - markDirty(); - } - - public boolean isPiecing() { - return piecing; - } -} From 2e9231465c832c2a324cef0998ca7944b26e24cb Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Mon, 26 Dec 2022 17:13:03 -0800 Subject: [PATCH 054/469] added a string trait --- .../util/traits/skilltraits/StringTrait.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/StringTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/StringTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/StringTrait.java new file mode 100644 index 00000000..293cc11d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/StringTrait.java @@ -0,0 +1,36 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; + +public class StringTrait extends SkillTrait { + + private String info; + + public StringTrait(String name, String info) { + super(name); + this.info = info; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putString(getName(), info); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + info = nbt.getString(getName()); + } + + public void setInfo(String info) { + this.info = info; + markDirty(); + } + + public String getInfo() { + return info; + } +} From 2a03870d15aeedb42ffb35f99a69182817bb1d20 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Mon, 26 Dec 2022 20:37:47 -0800 Subject: [PATCH 055/469] working on SkillData --- .../omegasource/magus/skill/skill/Skill.java | 1 + .../util/capability/LivingDataAttacher.java | 1 - .../magus/skill/util/data/SkillData.java | 37 +++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index 40d91e51..f9f63420 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -32,6 +32,7 @@ public Skill(ResourceLocation id, SkillCategory category) { this.category = category; } + public SkillCategory getCategory() { return category; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java index cc0d7788..23436462 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java @@ -6,7 +6,6 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.level.Level; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.util.INBTSerializable; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index e46b0674..ccdf4aae 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -1,21 +1,38 @@ package com.amuzil.omegasource.magus.skill.util.data; import com.amuzil.omegasource.magus.radix.RadixUtil; +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; //TODO: Make this an implementation rather than a class. //E.g SizeTrait vs ElementTrait or something are both SkillTraits but.... public class SkillData implements DataTrait { List skillTraits = new ArrayList<>(); + //The reason we're using a resource location and not the actual Skill object is because + //it's much easier to serialise a String and then get a skill from it. + ResourceLocation skillId; private boolean isDirty = false; + public SkillData(ResourceLocation skillId) { + this.skillId = skillId; + this.skillTraits = getSkill().getTraits(); + } + + + public SkillData(Skill skill) { + this(skill.getId()); + } + @Override public String getName() { return "skillData"; @@ -45,6 +62,7 @@ public boolean isDirty() { @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); + tag.putString("Skill ID", skillId.toString()); skillTraits.forEach(skillTrait -> { if (skillTrait.isDirty()) tag.put(skillTrait.getName() + "Trait", skillTrait.serializeNBT()); @@ -56,6 +74,7 @@ public CompoundTag serializeNBT() { public void deserializeNBT(CompoundTag nbt) { markClean(); try { + skillId = ResourceLocation.tryParse(nbt.getString("Skill ID")); skillTraits.forEach(skillTrait -> skillTrait.deserializeNBT ((CompoundTag) Objects.requireNonNull(nbt.get(skillTrait.getName() + "Trait")))); } catch (NullPointerException e) { @@ -64,4 +83,22 @@ public void deserializeNBT(CompoundTag nbt) { e.printStackTrace(); } } + + + public List getSkillTraits() { + return skillTraits; + } + + public ResourceLocation getSkillId() { + return skillId; + } + + public Skill getSkill() { + return Registries.SKILLS.get().getValue(getSkillId()); + } + + public List getFilteredTraits(Class filter) { + return getSkillTraits().stream().filter(filter::isInstance) + .collect(Collectors.toList()); + } } From 8f5bdea0742adc2d59d588f30009246177bfe712 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Mon, 26 Dec 2022 21:07:39 -0800 Subject: [PATCH 056/469] added a reset() function for traits --- .../magus/skill/util/data/SkillData.java | 2 +- .../magus/skill/util/traits/SkillTrait.java | 8 +++ .../util/traits/skilltraits/BooleanTrait.java | 6 ++ .../util/traits/skilltraits/ColourTrait.java | 9 ++- .../util/traits/skilltraits/DamageTrait.java | 6 ++ .../traits/skilltraits/KnockbackTrait.java | 15 ++++ .../util/traits/skilltraits/LevelTrait.java | 17 +++++ .../util/traits/skilltraits/PushTrait.java | 15 ++++ .../util/traits/skilltraits/RangeTrait.java | 6 ++ .../util/traits/skilltraits/SizeTrait.java | 15 ++++ .../util/traits/skilltraits/SourceTrait.java | 72 +++++++++++++++++++ .../util/traits/skilltraits/SpeedTrait.java | 6 ++ .../util/traits/skilltraits/StringTrait.java | 7 ++ .../util/traits/skilltraits/TimedTrait.java | 10 +++ .../util/traits/skilltraits/XPTrait.java | 15 ++++ 15 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SourceTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index ccdf4aae..c1fcf9a2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -17,7 +17,7 @@ //E.g SizeTrait vs ElementTrait or something are both SkillTraits but.... public class SkillData implements DataTrait { - List skillTraits = new ArrayList<>(); + List skillTraits; //The reason we're using a resource location and not the actual Skill object is because //it's much easier to serialise a String and then get a skill from it. ResourceLocation skillId; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java index 22db9f41..a4c92032 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/SkillTrait.java @@ -43,4 +43,12 @@ public void deserializeNBT(CompoundTag nbt) { markClean(); name = nbt.getString("name"); } + + /** + * Resets stored values. Good for resetting things that are ticked during a Skill's use, + * such as a combo count or timed duration. + */ + public void reset() { + markDirty(); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/BooleanTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/BooleanTrait.java index 2695bdbd..7f01d82f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/BooleanTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/BooleanTrait.java @@ -41,4 +41,10 @@ public boolean isEnabled() { public void toggleEnabled() { setEnabled(!isEnabled()); } + + @Override + public void reset() { + super.reset(); + setEnabled(false); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java index b01b9d50..081bfe68 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java @@ -71,7 +71,12 @@ public double getG() { return g; } - public double getB() { - return b; + public double getB() { return b;} + + @Override + public void reset() { + super.reset(); + //Default colour is white. + setRGB(1D, 1D, 1D); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java index d250e458..d1ac5200 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/DamageTrait.java @@ -38,4 +38,10 @@ public void setDamage(double damage) { public double getDamage() { return this.damage; } + + @Override + public void reset() { + super.reset(); + setDamage(0); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/KnockbackTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/KnockbackTrait.java index 833fb17a..dd766282 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/KnockbackTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/KnockbackTrait.java @@ -24,4 +24,19 @@ public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); knockback = nbt.getDouble(getName()); } + + public void setKnockback(double knockback) { + this.knockback = knockback; + markDirty(); + } + + public double getKnockback() { + return knockback; + } + + @Override + public void reset() { + super.reset(); + setKnockback(0); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LevelTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LevelTrait.java index fbf8669d..50f7ff16 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LevelTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/LevelTrait.java @@ -24,4 +24,21 @@ public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); level = nbt.getInt(getName()); } + + public void setLevel(int level) { + this.level = level; + markDirty(); + } + + public int getLevel() { + return level; + } + + //-1, because 0 is usually going to be unlocked/starting level in most mods. + //-1 is locked. + @Override + public void reset() { + super.reset(); + setLevel(-1); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PushTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PushTrait.java index 04468a92..e5d15837 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PushTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PushTrait.java @@ -25,6 +25,21 @@ public void deserializeNBT(CompoundTag nbt) { type = PushType.valueOf(nbt.getString(getName())); } + public void setType(PushType type) { + this.type = type; + markDirty(); + } + + public PushType getType() { + return type; + } + + @Override + public void reset() { + super.reset(); + setType(PushType.NONE); + } + /** Shows the different levels of redstone pushing in increasing order of redstone. * */ diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RangeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RangeTrait.java index c2521a28..e6836ae9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RangeTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/RangeTrait.java @@ -33,4 +33,10 @@ public void setRange(double range) { public double getRange() { return range; } + + @Override + public void reset() { + super.reset(); + setRange(0); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java index cb7a6c08..d6841b38 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SizeTrait.java @@ -24,4 +24,19 @@ public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); size = nbt.getDouble("size"); } + + public void setSize(double size) { + this.size = size; + markDirty(); + } + + public double getSize() { + return size; + } + + @Override + public void reset() { + super.reset(); + setSize(0); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SourceTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SourceTrait.java new file mode 100644 index 00000000..bed31d00 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SourceTrait.java @@ -0,0 +1,72 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Registry; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.common.extensions.IForgeBlockState; + +/** + * Huge trait class, stores the source block of the Skill. + */ +public class SourceTrait extends SkillTrait { + + //TODO: Change this to an IForgeBlockState and make it support modded blocks. Right now it only supports vanilla. + private BlockState state; + private BlockPos pos; + + //Note: If you want to know how long a usable blockstate has been selected, use another + //TimedTrait. + public SourceTrait(String name, BlockState state, BlockPos pos) { + super(name); + this.state = state; + this.pos = pos; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putInt(getName() + " State", Block.getId(state)); + tag.putIntArray(getName() + " Pos", new int[] { + pos.getX(), pos.getY(), pos.getZ() + }); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + super.deserializeNBT(nbt); + state = Block.stateById(nbt.getInt(getName() + " State")); + int[] blockPos = nbt.getIntArray(getName() + " Pos"); + pos = new BlockPos(blockPos[0], blockPos[1], blockPos[2]); + } + + public void setState(BlockState state) { + this.state = state; + markDirty(); + } + + public void setPos(BlockPos pos) { + this.pos = pos; + markDirty(); + } + + public BlockState getState() { + return state; + } + + public BlockPos getPos() { + return pos; + } + + @Override + public void reset() { + super.reset(); + //Default source info is 0,0,0 with Air. + setPos(BlockPos.ZERO); + setState(Blocks.AIR.defaultBlockState()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java index d02957d1..ef150129 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SpeedTrait.java @@ -33,4 +33,10 @@ public void setSpeed(double speed) { public double getSpeed() { return speed; } + + @Override + public void reset() { + super.reset(); + setSpeed(0); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/StringTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/StringTrait.java index 293cc11d..eb897c13 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/StringTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/StringTrait.java @@ -33,4 +33,11 @@ public void setInfo(String info) { public String getInfo() { return info; } + + //Probably won't be used, but just in case. + @Override + public void reset() { + super.reset(); + setInfo(""); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java index 82e6bde0..34f0876e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java @@ -36,4 +36,14 @@ public void setTime(int time) { public int getTime() { return time; } + + /** + * -1 instead of 0 here, because 0 implies a duration of nothing, whereas + * -1 means never iterate at all. + */ + @Override + public void reset() { + super.reset(); + setTime(-1); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java index 87debd2e..ba0a557d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java @@ -24,4 +24,19 @@ public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); xp = nbt.getDouble(getName()); } + + public void setXp(double xp) { + this.xp = xp; + markDirty(); + } + + public double getXp() { + return xp; + } + + @Override + public void reset() { + super.reset(); + setXp(0); + } } From 957bd6f537767a2be43bfad41c7fd9bd47e98174 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Mon, 26 Dec 2022 21:08:44 -0800 Subject: [PATCH 057/469] missed 2 traits --- .../traits/skilltraits/AngleWidthTrait.java | 6 ++++++ .../traits/skilltraits/PotionLevelTrait.java | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/AngleWidthTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/AngleWidthTrait.java index 28715e40..8df9fb32 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/AngleWidthTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/AngleWidthTrait.java @@ -37,4 +37,10 @@ public void setDegrees(double degrees) { public double getDegrees() { return degrees; } + + @Override + public void reset() { + super.reset(); + setDegrees(0); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PotionLevelTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PotionLevelTrait.java index 214cc222..7b97c57a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PotionLevelTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/PotionLevelTrait.java @@ -24,4 +24,22 @@ public void deserializeNBT(CompoundTag nbt) { super.deserializeNBT(nbt); level = nbt.getInt(getName()); } + + public void setLevel(int level) { + this.level = level; + markDirty(); + } + + public int getLevel() { + return level; + } + + /** + * 0 means a level 1 potion, so -1 means nothing at all. + */ + @Override + public void reset() { + super.reset(); + setLevel(-1); + } } From b5ac90003eea92bfc645ab65267aa95aa61e12a8 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Mon, 26 Dec 2022 22:17:05 -0800 Subject: [PATCH 058/469] added get methods to SkillData --- .../magus/skill/util/data/SkillData.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index c1fcf9a2..b0152857 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -7,6 +7,7 @@ import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; @@ -101,4 +102,18 @@ public List getFilteredTraits(Class filter return getSkillTraits().stream().filter(filter::isInstance) .collect(Collectors.toList()); } + + @Nullable + public SkillTrait getTrait(String name) { + for (SkillTrait trait : getSkillTraits()) + if (trait.getName().equals(name)) + return trait; + + return null; + } + + public void reset() { + for (SkillTrait trait : getSkillTraits()) + trait.reset(); + } } From 367fe81060dab3bd8bf24153ffe91fbae328d4f5 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Tue, 27 Dec 2022 15:46:20 -0800 Subject: [PATCH 059/469] network channel set up --- .../com/amuzil/omegasource/magus/Magus.java | 2 + .../magus/network/MagusNetwork.java | 19 ++++++++++ .../minecraft/forge/TickTimedCondition.java | 2 +- .../minecraft/forge/key/KeyHoldCondition.java | 12 +++--- .../magus/registry/Registries.java | 13 +++++-- .../skill/conditionals/ConditionBuilder.java | 2 +- .../omegasource/magus/skill/forms/Form.java | 4 ++ .../omegasource/magus/skill/skill/Skill.java | 3 ++ .../skill/util/capability/LivingData.java | 37 +++++++++++++++++-- .../magus/skill/util/data/SkillData.java | 10 ++--- 10 files changed, 85 insertions(+), 19 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 215323d9..319a601b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus; +import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; @@ -54,6 +55,7 @@ private void setup(final FMLCommonSetupEvent event) { // some pre init code Registries.init(); Capabilities.initialiseCaps(); + MagusNetwork.registerMessages(); LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java new file mode 100644 index 00000000..a878dfad --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -0,0 +1,19 @@ +package com.amuzil.omegasource.magus.network; + +import com.amuzil.omegasource.magus.Magus; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.network.NetworkRegistry; +import net.minecraftforge.network.simple.SimpleChannel; + +public class MagusNetwork { + private static final String PROTOCOL_VERSION = "1"; + public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( + new ResourceLocation(Magus.MOD_ID, "main"), + () -> PROTOCOL_VERSION, + PROTOCOL_VERSION::equals, + PROTOCOL_VERSION::equals + ); + + public static void registerMessages() { + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 03aeff68..d9298b5a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -31,7 +31,7 @@ public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, this.listener = event -> { if (event.type == type && event.phase == phase) { - this.current += 1; + this.current++; if (this.current >= timeout) { runOn(onTimeout).run(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 3c1f0b92..4bd87725 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -15,7 +15,7 @@ public class KeyHoldCondition extends Condition { private final Consumer keyInputListener; private final Consumer clientTickListener; - private int currentTotal; + private final int currentTotal; private boolean isHolding; private int currentHolding; @@ -42,13 +42,13 @@ public KeyHoldCondition(Key key, int duration, int timeout) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START) { - this.currentTotal += 1; if (this.isHolding) { - this.currentHolding += 1; - if (this.currentHolding >= duration) { - this.onSuccess.run(); - } + this.currentHolding++; } + if (this.currentHolding >= duration) { + this.onSuccess.run(); + } + if (this.currentTotal >= timeout) { this.onFailure.run(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 3947e883..bf0023f7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.skill.skill.SkillActive; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -100,9 +101,15 @@ public static void gameRegistry(RegisterEvent event) { ResourceKey> resKey = registry.getRegistryKey(); - /* For each skill registered, grab its list of SkillTraits and register it here. */ - event.register(resKey, helper -> { - }); + //Registers every Data Trait for every skill. + //Register other traits manually. + for (Skill skill : SKILLS.get().getValues()) { + for (SkillTrait trait : skill.getTraits()) { + /* For each skill registered, grab its list of SkillTraits and register it here. */ + event.register(resKey, helper -> registry.register(new ResourceLocation(Magus.MOD_ID) + + trait.getName(), trait)); + } + } } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 4355f406..11364e02 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -16,7 +16,7 @@ public ConditionBuilder() { * consolidate for good code practice later. */ public enum ActivationType { - RADIAL, + MENU, HOTKEY, MULTIKEY, GESTURE diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java new file mode 100644 index 00000000..8bea9cac --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.forms; + +public class Form { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index f9f63420..c2f7a5f6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -21,6 +21,7 @@ public abstract class Skill { private SkillCategory category; private List traits; private List types; + private RadixTree requirements; public Skill(String name, SkillCategory category) { this.id = new ResourceLocation(Magus.MOD_ID, name); @@ -74,6 +75,8 @@ public void tick(LivingEntity entity, RadixTree tree) { } } + + public abstract boolean shouldStart(LivingEntity entity, RadixTree tree); public abstract boolean shouldRun(LivingEntity entity, RadixTree tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java index 7bfb22ba..fff80d50 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java @@ -1,11 +1,15 @@ package com.amuzil.omegasource.magus.skill.util.capability; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.util.data.SkillData; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.level.entity.LevelEntityGetter; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; @@ -27,11 +31,14 @@ public class LivingData implements Data { // //Miscellaneous data to save //The amount of data traits the player has should not change after initialisation. - private List traits = new ArrayList<>(); - private List categories = new ArrayList<>(); - private List skills = new ArrayList<>(); + private final List traits = new ArrayList<>(); + private final List categories = new ArrayList<>(); + private final List skills = new ArrayList<>(); private boolean isDirty; + //Gets the tree from the event bus. + private RadixTree tree; + public LivingData() { fillTraits(); //TODO: Data generation methods for each skill @@ -60,10 +67,24 @@ public void deserializeNBT(CompoundTag nbt) { traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); } + + public void setTree(RadixTree tree) { + this.tree = tree; + markDirty(); + } + + public RadixTree getTree() { + return tree; + } + public void fillTraits() { traits.addAll(Registries.DATA_TRAITS.get().getValues()); } + public List getTraits() { + return this.traits; + } + //When players move to versions with new techniques and such, we'll have to use these to accomodate. public void addTraits(List dataTraits) { traits.addAll(dataTraits); @@ -83,6 +104,16 @@ public void removeTraits(List dataTraits) { traits.removeAll(dataTraits); } + @Nullable + public DataTrait getTrait(String name) { + for (DataTrait trait : getTraits()) + if (trait.getName().equals(name)) + return trait; + + return null; + + } + public void fillCategories() { categories.addAll(Registries.SKILL_CATEGORIES.get().getValues()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index b0152857..3cdb749d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -9,9 +9,9 @@ import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.Nullable; -import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.function.Predicate; import java.util.stream.Collectors; //TODO: Make this an implementation rather than a class. @@ -36,7 +36,7 @@ public SkillData(Skill skill) { @Override public String getName() { - return "skillData"; + return "skillData-" + getSkillId(); } @Override @@ -98,8 +98,8 @@ public Skill getSkill() { return Registries.SKILLS.get().getValue(getSkillId()); } - public List getFilteredTraits(Class filter) { - return getSkillTraits().stream().filter(filter::isInstance) + public List getFilteredTraits(Predicate filter) { + return getSkillTraits().stream().filter(filter) .collect(Collectors.toList()); } @@ -111,7 +111,7 @@ public SkillTrait getTrait(String name) { return null; } - + public void reset() { for (SkillTrait trait : getSkillTraits()) trait.reset(); From 67f159aa9efc8b6ca37abf03248b0790d3caf6b7 Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Tue, 27 Dec 2022 16:49:59 -0800 Subject: [PATCH 060/469] fixed registration for traits; working on networking --- .../magus/network/MagusNetwork.java | 2 +- .../network/packets/SyncDataSPacket.java | 13 ++++++ .../magus/registry/Registries.java | 45 +++++++++++++++---- .../omegasource/magus/skill/skill/Skill.java | 7 ++- .../magus/skill/util/data/SkillData.java | 2 +- 5 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/SyncDataSPacket.java diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java index a878dfad..4556b397 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -6,7 +6,7 @@ import net.minecraftforge.network.simple.SimpleChannel; public class MagusNetwork { - private static final String PROTOCOL_VERSION = "1"; + private static final String PROTOCOL_VERSION = "1.0.0"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(Magus.MOD_ID, "main"), () -> PROTOCOL_VERSION, diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/SyncDataSPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/SyncDataSPacket.java new file mode 100644 index 00000000..c94f5850 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/SyncDataSPacket.java @@ -0,0 +1,13 @@ +package com.amuzil.omegasource.magus.network.packets; + +import com.amuzil.omegasource.magus.skill.util.capability.Data; + +public class SyncDataSPacket { + private Data data; + + public SyncDataSPacket(Data data) { + this.data = data; + } + + +} diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index bf0023f7..b63126db 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillActive; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; +import com.amuzil.omegasource.magus.skill.util.capability.Data; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.core.Registry; @@ -13,6 +14,7 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.*; +import java.util.List; import java.util.function.Supplier; /** @@ -101,15 +103,42 @@ public static void gameRegistry(RegisterEvent event) { ResourceKey> resKey = registry.getRegistryKey(); - //Registers every Data Trait for every skill. + //Registers every Data Trait for every skill included within Magus. //Register other traits manually. - for (Skill skill : SKILLS.get().getValues()) { - for (SkillTrait trait : skill.getTraits()) { - /* For each skill registered, grab its list of SkillTraits and register it here. */ - event.register(resKey, helper -> registry.register(new ResourceLocation(Magus.MOD_ID) - + trait.getName(), trait)); - } - } + registerTraitsFromSkills((List) SKILLS.get().getValues(), event); } } + + /** + * Use this method to register the data traits of all registered skills. + * @param skills List of skills. + * @param event Registry event. + * @param modID ModID. + */ + public static void registerTraitsFromSkills(List skills, RegisterEvent event, + String modID) { + ResourceKey> key = DATA_TRAITS.get().getRegistryKey(); + IForgeRegistry registry = DATA_TRAITS.get(); + for (Skill skill : skills) + for (SkillTrait trait : skill.getTraits()) + event.register(key, helper -> + registry.register(new ResourceLocation(modID) + trait.getName(), trait)); + + } + + /** + * Same as the above method, but if you standardise your modID in your data, + * then use this. + * @param skills Skills to register. + * @param event The registry event. + */ + public static void registerTraitsFromSkills(List skills, RegisterEvent event) { + ResourceKey> key = DATA_TRAITS.get().getRegistryKey(); + IForgeRegistry registry = DATA_TRAITS.get(); + for (Skill skill : skills) + for (SkillTrait trait : skill.getTraits()) + event.register(key, helper -> + registry.register(trait.getName(), trait)); + + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index c2f7a5f6..695e38f4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -23,9 +23,12 @@ public abstract class Skill { private List types; private RadixTree requirements; + public Skill(String modID, String name, SkillCategory category) { + this(new ResourceLocation(modID, name), category); + } + public Skill(String name, SkillCategory category) { - this.id = new ResourceLocation(Magus.MOD_ID, name); - this.category = category; + this(Magus.MOD_ID, name, category); } public Skill(ResourceLocation id, SkillCategory category) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index 3cdb749d..d3ba1da1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -36,7 +36,7 @@ public SkillData(Skill skill) { @Override public String getName() { - return "skillData-" + getSkillId(); + return getSkillId() + "_skillData"; } @Override From 1c5a2aa51b93c3f842261e6a1e254b3ad89ebeac Mon Sep 17 00:00:00 2001 From: "ninjadragon008@icloud.com" Date: Wed, 28 Dec 2022 17:04:20 -0800 Subject: [PATCH 061/469] basic skilluser class --- .../magus/skill/skill/SkillUser.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillUser.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillUser.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillUser.java new file mode 100644 index 00000000..0967d6de --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillUser.java @@ -0,0 +1,38 @@ +package com.amuzil.omegasource.magus.skill.skill; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.util.capability.LivingData; +import net.minecraft.world.entity.LivingEntity; +import net.minecraftforge.event.entity.living.LivingEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(modid = Magus.MOD_ID) +public abstract class SkillUser { + + public abstract LivingData getData(); + public abstract LivingEntity getEntity(); + + public void onUpdate() { + } + + public void executeSkill() { + } + + public static SkillUser getSkillUser(LivingEntity entity) { + return null; + } + + // TODO: Check capabilities for the entity before returning true + public static boolean isSkillUserSupported(LivingEntity entity) { + return false; + } + + @SubscribeEvent + public static void livingTick(LivingEvent.LivingTickEvent event) { + //Call onUpdate here + if (getSkillUser(event.getEntity()) != null) + getSkillUser(event.getEntity()).onUpdate(); + } + +} From a10f27735817452f642b462d65374e6d2c3fce5e Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 23 Jan 2023 01:33:02 +0000 Subject: [PATCH 062/469] Refactor capability implementation to be inline with Render projects capability implementation --- .../com/amuzil/omegasource/magus/Magus.java | 9 +- .../network/packets/SyncDataSPacket.java | 2 +- .../magus/registry/Registries.java | 20 +- .../magus/skill/skill/SkillUser.java | 4 +- .../skill/util/capability/Capabilities.java | 33 ---- .../util/capability/CapabilityHandler.java | 46 +++++ .../skill/util/capability/LivingData.java | 152 --------------- .../util/capability/LivingDataAttacher.java | 75 ------- .../util/capability/{ => entity}/Data.java | 4 +- .../entity/LivingDataCapability.java | 184 ++++++++++++++++++ 10 files changed, 254 insertions(+), 275 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java rename src/main/java/com/amuzil/omegasource/magus/skill/util/capability/{ => entity}/Data.java (86%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 319a601b..c181327d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -6,9 +6,10 @@ import com.amuzil.omegasource.magus.radix.path.PathBuilder; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.util.capability.Capabilities; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; +import net.minecraft.world.entity.Entity; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -39,6 +40,10 @@ public class Magus { public Magus() { // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); + // Register capabilities + FMLJavaModLoadingContext.get().getModEventBus().addListener(CapabilityHandler::registerCapabilities); + // attach capabilities + MinecraftForge.EVENT_BUS.addGenericListener(Entity.class, CapabilityHandler::attachEntityCapability); // Register the setup method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); // Register the enqueueIMC method for mod loading @@ -54,7 +59,7 @@ public Magus() { private void setup(final FMLCommonSetupEvent event) { // some pre init code Registries.init(); - Capabilities.initialiseCaps(); + CapabilityHandler.initialiseCaps(); MagusNetwork.registerMessages(); LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/SyncDataSPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/SyncDataSPacket.java index c94f5850..407a302f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/SyncDataSPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/SyncDataSPacket.java @@ -1,6 +1,6 @@ package com.amuzil.omegasource.magus.network.packets; -import com.amuzil.omegasource.magus.skill.util.capability.Data; +import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; public class SyncDataSPacket { private Data data; diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index b63126db..a6ce5477 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -4,7 +4,6 @@ import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillActive; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; -import com.amuzil.omegasource.magus.skill.util.capability.Data; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.core.Registry; @@ -60,19 +59,24 @@ public static void onRegistryRegister(NewRegistryEvent event) { //What to do in the case of missing registry entries for each type of registry. - @SubscribeEvent - public static void onMissing(MissingMappingsEvent event) { - //Data Traits - //Skill Categories + @Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) + public class ForgeRegistries { + @SubscribeEvent + public static void onMissing(MissingMappingsEvent event) { + //Data Traits - //Skills + //Skill Categories - //Forms + //Skills - //Modifiers + //Forms + + //Modifiers + } } + @SubscribeEvent public static void gameRegistry(RegisterEvent event) { /* Skill Categories. */ diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillUser.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillUser.java index 0967d6de..4bfba85a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillUser.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillUser.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.skill.skill; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.skill.util.capability.LivingData; +import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; import net.minecraft.world.entity.LivingEntity; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -10,7 +10,7 @@ @Mod.EventBusSubscriber(modid = Magus.MOD_ID) public abstract class SkillUser { - public abstract LivingData getData(); + public abstract Data getData(); public abstract LivingEntity getEntity(); public void onUpdate() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java deleted file mode 100644 index c63a22b3..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Capabilities.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util.capability; - -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.CapabilityManager; -import net.minecraftforge.common.capabilities.CapabilityToken; -import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; - -import java.util.ArrayList; -import java.util.List; - -@Mod.EventBusSubscriber(modid = Magus.MOD_ID) -public class Capabilities { - - public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>() { - }); - public static List dataTraits = new ArrayList<>(); - - private Capabilities() { - } - - @SubscribeEvent - public static void register(RegisterCapabilitiesEvent event) { - event.register(Data.class); - } - - public static void initialiseCaps() { - LivingDataAttacher.init(); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java new file mode 100644 index 00000000..ed2b4f3f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java @@ -0,0 +1,46 @@ +package com.amuzil.omegasource.magus.skill.util.capability; + +import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import com.amuzil.omegasource.magus.skill.util.capability.entity.LivingDataCapability; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.CapabilityManager; +import net.minecraftforge.common.capabilities.CapabilityToken; +import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; +import net.minecraftforge.event.AttachCapabilitiesEvent; + +import javax.annotation.Nullable; + +public class CapabilityHandler { + public static final Capability LIVING_DATA = CapabilityManager.get(new CapabilityToken<>(){}); + + public static void registerCapabilities(RegisterCapabilitiesEvent event) { + event.register(Data.class); + } + + public static void attachEntityCapability(AttachCapabilitiesEvent e) { + if (e.getObject() instanceof LivingEntity) { + //capabilities all living entities get. + //TODO: Add requirement to check against a list of compatible entities. + //E.g custom npcs, or specific mobs you want to be able to use Skills. + e.addCapability(LivingDataCapability.IDENTIFIER, new LivingDataCapability.LivingDataProvider()); + if (e.getObject() instanceof Player) { + //capabilities just players get. + } + } + } + + @Nullable + public static T getCapability(Entity entity, Capability capability) { + if (entity == null) return null; + if (!entity.isAlive()) return null; + return entity.getCapability(capability).isPresent() ? entity.getCapability(capability).orElseThrow(() -> new IllegalArgumentException("Lazy optional must not be empty")) : null; + } + + public static void initialiseCaps() { + //Prevents class loading exceptions + LivingDataCapability.LivingDataProvider.init(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java deleted file mode 100644 index fff80d50..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingData.java +++ /dev/null @@ -1,152 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util.capability; - -import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.registry.Registries; -import com.amuzil.omegasource.magus.skill.skill.Skill; -import com.amuzil.omegasource.magus.skill.skill.SkillCategory; -import com.amuzil.omegasource.magus.skill.util.data.SkillData; -import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.level.entity.LevelEntityGetter; -import org.jetbrains.annotations.Nullable; - -import java.util.ArrayList; -import java.util.List; - -/** - * TODO: Figure out how to save this data when MC wants to save but nothing has changed/. - */ -public class LivingData implements Data { - - //Data Traits to add: - // private List skills; -// private SkillData data; -// private List categories; -// private SkillCategory activeCategory; -// //Need to add energy mechanic; stored here -// //Need to add config and *global* skill modifiers. -// //Need to add something for inputs -// private Set activeListeners; -// //Miscellaneous data to save - - //The amount of data traits the player has should not change after initialisation. - private final List traits = new ArrayList<>(); - private final List categories = new ArrayList<>(); - private final List skills = new ArrayList<>(); - private boolean isDirty; - - //Gets the tree from the event bus. - private RadixTree tree; - - public LivingData() { - fillTraits(); - //TODO: Data generation methods for each skill - - fillCategories(); - fillSkills(); - markDirty(); - } - - - @Override - public CompoundTag serializeNBT() { - CompoundTag tag = new CompoundTag(); - traits.forEach(trait -> { - if (trait.isDirty() || isDirty()) { - tag.put(trait.getName(), trait.serializeNBT()); - } - }); - return tag; - } - - - @Override - public void deserializeNBT(CompoundTag nbt) { - markClean(); - traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); - } - - - public void setTree(RadixTree tree) { - this.tree = tree; - markDirty(); - } - - public RadixTree getTree() { - return tree; - } - - public void fillTraits() { - traits.addAll(Registries.DATA_TRAITS.get().getValues()); - } - - public List getTraits() { - return this.traits; - } - - //When players move to versions with new techniques and such, we'll have to use these to accomodate. - public void addTraits(List dataTraits) { - traits.addAll(dataTraits); - } - - public void addTrait(DataTrait trait) { - traits.add(trait); - } - - //Ideally, these delete methods are *never* used, because each piece of content - //added to the mod should be final. - public void removeTrait(DataTrait trait) { - traits.remove(trait); - } - - public void removeTraits(List dataTraits) { - traits.removeAll(dataTraits); - } - - @Nullable - public DataTrait getTrait(String name) { - for (DataTrait trait : getTraits()) - if (trait.getName().equals(name)) - return trait; - - return null; - - } - - public void fillCategories() { - categories.addAll(Registries.SKILL_CATEGORIES.get().getValues()); - } - - public List getAllSkillCategories() { - return this.categories; - } - - public void fillSkills() { - skills.addAll(Registries.SKILLS.get().getValues()); - } - - public List getAllSkills() { - return this.skills; - } - - public SkillData getSkillData() { - return null; - } - - @Override - public void markDirty() { - this.isDirty = true; - } - - @Override - public void markClean() { - this.isDirty = false; - } - - @Override - public boolean isDirty() { - //TODO: Add a check for all kinds of data, not just DataTraits - return this.isDirty; - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java deleted file mode 100644 index 23436462..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/LivingDataAttacher.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.amuzil.omegasource.magus.skill.util.capability; - -import com.amuzil.omegasource.magus.Magus; -import net.minecraft.core.Direction; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.LivingEntity; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.common.util.INBTSerializable; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.event.AttachCapabilitiesEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@Mod.EventBusSubscriber(modid = Magus.MOD_ID) -public class LivingDataAttacher { - private LivingDataAttacher() { - } - public static void init() { - //Prevents class loading exceptions - LivingDataProvider.init(); - } - - @SubscribeEvent - public static void attach(AttachCapabilitiesEvent event) { - if (event.getObject() instanceof LivingEntity) { - //TODO: Add requirement to check against a list of compatible entities. - //E.g custom npcs, or specific mobs you want to be able to use Skills. - LivingDataProvider provider = new LivingDataProvider(); - event.addCapability(LivingDataProvider.IDENTIFIER, provider); - } - } - - - private static class LivingDataProvider implements ICapabilityProvider, INBTSerializable { - - static void init() { - } - - public static final ResourceLocation IDENTIFIER = new ResourceLocation("magus", "living_data_provider"); - - private final Data livingData = new LivingData(); - private final LazyOptional optionalData = LazyOptional.of(() -> livingData); - - - @Override - public @NotNull LazyOptional getCapability(@NotNull Capability cap) { - return Capabilities.LIVING_DATA.orEmpty(cap, this.optionalData); - } - - @NotNull - @Override - public LazyOptional getCapability(@NotNull Capability cap, @Nullable Direction side) { - return getCapability(cap); - } - - void invalidate() { - this.optionalData.invalidate(); - } - - @Override - public CompoundTag serializeNBT() { - return this.livingData.serializeNBT(); - } - - @Override - public void deserializeNBT(CompoundTag nbt) { - this.livingData.deserializeNBT(nbt); - } - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java similarity index 86% rename from src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java rename to src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java index d958e764..b141e523 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/Data.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.util.capability; +package com.amuzil.omegasource.magus.skill.util.capability.entity; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.capabilities.AutoRegisterCapability; @@ -8,7 +8,7 @@ * Very different from IDataTrait. This class lets you access data and do things with it, * whereas IDataTrait merely stores it. */ -@AutoRegisterCapability +//@AutoRegisterCapability public interface Data extends INBTSerializable { /* These are used to make everything stored in the class serialised/unserialised. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java new file mode 100644 index 00000000..b158f5d8 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -0,0 +1,184 @@ +package com.amuzil.omegasource.magus.skill.util.capability.entity; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import com.amuzil.omegasource.magus.skill.skill.SkillCategory; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import com.amuzil.omegasource.magus.skill.util.data.SkillData; +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ICapabilityProvider; +import net.minecraftforge.common.capabilities.ICapabilitySerializable; +import net.minecraftforge.common.util.LazyOptional; +import org.jetbrains.annotations.Nullable; + +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.List; + +public class LivingDataCapability { + public static ResourceLocation IDENTIFIER = new ResourceLocation(Magus.MOD_ID, "living_data"); + + /** + * TODO: Figure out how to save this data when MC wants to save but nothing has changed/. + */ + public static class LivingDataCapabilityImp implements Data { + + //Data Traits to add: + // private List skills; +// private SkillData data; +// private List categories; +// private SkillCategory activeCategory; +// //Need to add energy mechanic; stored here +// //Need to add config and *global* skill modifiers. +// //Need to add something for inputs +// private Set activeListeners; +// //Miscellaneous data to save + + //The amount of data traits the player has should not change after initialisation. + private final List traits = new ArrayList<>(); + private final List categories = new ArrayList<>(); + private final List skills = new ArrayList<>(); + private boolean isDirty; + + //Gets the tree from the event bus. + private RadixTree tree; + + public LivingDataCapabilityImp() { + fillTraits(); + //TODO: Data generation methods for each skill + + fillCategories(); + fillSkills(); + markDirty(); + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = new CompoundTag(); + traits.forEach(trait -> { + if (trait.isDirty() || isDirty()) { + tag.put(trait.getName(), trait.serializeNBT()); + } + }); + return tag; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + markClean(); + traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); + } + + public void setTree(RadixTree tree) { + this.tree = tree; + markDirty(); + } + + public RadixTree getTree() { + return tree; + } + + public void fillTraits() { + traits.addAll(Registries.DATA_TRAITS.get().getValues()); + } + + public List getTraits() { + return this.traits; + } + + //When players move to versions with new techniques and such, we'll have to use these to accomodate. + public void addTraits(List dataTraits) { + traits.addAll(dataTraits); + } + + public void addTrait(DataTrait trait) { + traits.add(trait); + } + + //Ideally, these delete methods are *never* used, because each piece of content + //added to the mod should be final. + public void removeTrait(DataTrait trait) { + traits.remove(trait); + } + + public void removeTraits(List dataTraits) { + traits.removeAll(dataTraits); + } + + @Nullable + public DataTrait getTrait(String name) { + for (DataTrait trait : getTraits()) + if (trait.getName().equals(name)) + return trait; + + return null; + + } + + public void fillCategories() { + categories.addAll(Registries.SKILL_CATEGORIES.get().getValues()); + } + + public List getAllSkillCategories() { + return this.categories; + } + + public void fillSkills() { + skills.addAll(Registries.SKILLS.get().getValues()); + } + + public List getAllSkills() { + return this.skills; + } + + public SkillData getSkillData() { + return null; + } + + @Override + public void markDirty() { + this.isDirty = true; + } + + @Override + public void markClean() { + this.isDirty = false; + } + + @Override + public boolean isDirty() { + //TODO: Add a check for all kinds of data, not just DataTraits + return this.isDirty; + } + } + + public static class LivingDataProvider implements ICapabilityProvider, ICapabilitySerializable { + + public static void init() { + } + + private final LazyOptional instance = LazyOptional.of(LivingDataCapabilityImp::new); + + @Override + public CompoundTag serializeNBT() { + return instance.orElseThrow(NullPointerException::new).serializeNBT(); + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + instance.orElseThrow(NullPointerException::new).deserializeNBT(nbt); + } + + @Nonnull + @Override + public LazyOptional getCapability(@Nonnull Capability cap, Direction side) { + return CapabilityHandler.LIVING_DATA.orEmpty(cap, instance.cast()); + } + } +} From 1c2e937617ad0d77947baeedc73a71d2b84a0dd5 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Fri, 27 Jan 2023 17:05:15 +0000 Subject: [PATCH 063/469] Implement Forms Registry and Register Basic Non-Element specific Forms --- .../magus/registry/Registries.java | 57 ++++++++++++++++++- .../omegasource/magus/skill/forms/Form.java | 7 +++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index a6ce5477..af971c39 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.registry; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillActive; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; @@ -25,6 +26,7 @@ public class Registries { public static Supplier> DATA_TRAITS; public static Supplier> SKILL_CATEGORIES; public static Supplier> SKILLS; + public static Supplier> FORMS; public static void init() { } @@ -53,6 +55,9 @@ public static void onRegistryRegister(NewRegistryEvent event) { SKILLS = event.create(skills); //Forms + RegistryBuilder
forms = new RegistryBuilder<>(); + forms.setName(new ResourceLocation(Magus.MOD_ID, "forms")); + FORMS = event.create(forms); //Modifiers } @@ -61,7 +66,7 @@ public static void onRegistryRegister(NewRegistryEvent event) { //What to do in the case of missing registry entries for each type of registry. @Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) - public class ForgeRegistries { + public static class ForgeRegistries { @SubscribeEvent public static void onMissing(MissingMappingsEvent event) { //Data Traits @@ -101,6 +106,56 @@ public static void gameRegistry(RegisterEvent event) { }); } + /* Forms. */ + if (event.getRegistryKey().equals(FORMS.get().getRegistryKey())) { + IForgeRegistry registry = FORMS.get(); + ResourceKey> resKey = registry.getRegistryKey(); + + + event.register(resKey, helper -> { + Form push = new Form("push"); + registry.register(push.getName(), push); + + Form pull = new Form("pull"); + registry.register(pull.getName(), pull); + + Form raise = new Form("raise"); + registry.register(raise.getName(), raise); + + Form lower = new Form("lower"); + registry.register(lower.getName(), lower); + + Form burst = new Form("burst"); + registry.register(burst.getName(), burst); + + Form arc = new Form("arc"); + registry.register(arc.getName(), arc); + + Form compress = new Form("compress"); + registry.register(compress.getName(), compress); + + Form expand = new Form("expand"); + registry.register(expand.getName(), expand); + + Form twist = new Form("twist"); + registry.register(twist.getName(), twist); + + Form strike = new Form("strike"); + registry.register(strike.getName(), strike); + + Form block = new Form("block"); + registry.register(block.getName(), block); + + Form breathe = new Form("breathe"); + registry.register(breathe.getName(), breathe); + + Form step = new Form("step"); + registry.register(step.getName(), step); + + //TODO: Element specific forms + }); + } + /* Data Traits. */ if (event.getRegistryKey().equals(DATA_TRAITS.get().getRegistryKey())) { IForgeRegistry registry = DATA_TRAITS.get(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 8bea9cac..04235c98 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -1,4 +1,11 @@ package com.amuzil.omegasource.magus.skill.forms; public class Form { + private final String name; + + public Form(String name) { + this.name = name; + } + + public String getName() { return name; } } From 62ff870c930824d2ca9f5779e96e09da88df3560 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Fri, 27 Jan 2023 21:15:54 +0000 Subject: [PATCH 064/469] Reworked Form registry and skill registry to use static instances and deferred registry --- .../magus/registry/Registries.java | 73 ++++++++----------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index af971c39..102e9bd0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -28,6 +28,24 @@ public class Registries { public static Supplier> SKILLS; public static Supplier> FORMS; + // SKILLS + public static final Skill FIREBALL = new SkillActive("fireball", null); + + // FORMS + public static final Form PUSH = new Form("push"); + public static final Form PULL = new Form("pull"); + public static final Form RAISE = new Form("raise"); + public static final Form LOWER = new Form("lower"); + public static final Form BURST = new Form("burst"); + public static final Form ARC = new Form("arc"); + public static final Form COMPRESS = new Form("compress"); + public static final Form EXPAND = new Form("expand"); + public static final Form TWIST = new Form("twist"); + public static final Form STRIKE = new Form("strike"); + public static final Form BLOCK = new Form("block"); + public static final Form BREATHE = new Form("breathe"); + public static final Form STEP = new Form("step"); + public static void init() { } @@ -101,8 +119,7 @@ public static void gameRegistry(RegisterEvent event) { event.register(resKey, helper -> { - Skill fireball = new SkillActive("fireball", null); - registry.register(fireball.getId(), fireball); + registry.register(FIREBALL.getId(), FIREBALL); }); } @@ -113,45 +130,19 @@ public static void gameRegistry(RegisterEvent event) { event.register(resKey, helper -> { - Form push = new Form("push"); - registry.register(push.getName(), push); - - Form pull = new Form("pull"); - registry.register(pull.getName(), pull); - - Form raise = new Form("raise"); - registry.register(raise.getName(), raise); - - Form lower = new Form("lower"); - registry.register(lower.getName(), lower); - - Form burst = new Form("burst"); - registry.register(burst.getName(), burst); - - Form arc = new Form("arc"); - registry.register(arc.getName(), arc); - - Form compress = new Form("compress"); - registry.register(compress.getName(), compress); - - Form expand = new Form("expand"); - registry.register(expand.getName(), expand); - - Form twist = new Form("twist"); - registry.register(twist.getName(), twist); - - Form strike = new Form("strike"); - registry.register(strike.getName(), strike); - - Form block = new Form("block"); - registry.register(block.getName(), block); - - Form breathe = new Form("breathe"); - registry.register(breathe.getName(), breathe); - - Form step = new Form("step"); - registry.register(step.getName(), step); - + registry.register(PUSH.getName(), PUSH); + registry.register(PULL.getName(), PULL); + registry.register(RAISE.getName(), RAISE); + registry.register(LOWER.getName(), LOWER); + registry.register(BURST.getName(), BURST); + registry.register(ARC.getName(), ARC); + registry.register(COMPRESS.getName(), COMPRESS); + registry.register(EXPAND.getName(), EXPAND); + registry.register(TWIST.getName(), TWIST); + registry.register(STRIKE.getName(), STRIKE); + registry.register(BLOCK.getName(), BLOCK); + registry.register(BREATHE.getName(), BREATHE); + registry.register(STEP.getName(), STEP); //TODO: Element specific forms }); } From 3ed48f7249f4ea53efea204a2d481cc481009776 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 30 Jan 2023 22:40:05 +0000 Subject: [PATCH 065/469] Split enums into their own file. Implement ConditionBuilder. Implement KeyboardMouseInputModule and InputModule interface. Created Chainedcondition Node for InputModule. Made InputData interface and made existing Implementations implement the class for polymorphism. --- .../omegasource/magus/input/InputModule.java | 15 ++++ .../magus/input/KeyboardMouseInputModule.java | 34 ++++++++++ .../radix/condition/ChainedCondition.java | 50 ++++++++++++++ .../skill/conditionals/ConditionBuilder.java | 58 ++++------------ .../magus/skill/conditionals/InputData.java | 4 ++ .../conditionals/enums/ActivationType.java | 12 ++++ .../conditionals/enums/ActivatorType.java | 10 +++ .../skill/conditionals/enums/ExecuteType.java | 6 ++ .../skill/conditionals/enums/GestureType.java | 10 +++ .../conditionals/enums/InitialiseType.java | 10 +++ .../skill/conditionals/enums/RadialType.java | 6 ++ .../conditionals/key/KeyCombination.java | 41 ++++++++++- .../skill/conditionals/key/KeyInput.java | 68 +++++++++++++++++-- .../conditionals/key/KeyPermutation.java | 41 ++++++++++- 14 files changed, 310 insertions(+), 55 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/input/InputModule.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivationType.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivatorType.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ExecuteType.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/GestureType.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/InitialiseType.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/RadialType.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java new file mode 100644 index 00000000..586f6ada --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -0,0 +1,15 @@ +package com.amuzil.omegasource.magus.input; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.forms.Form; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public abstract class InputModule { + protected final Map _formInputs = new HashMap<>(); + + public abstract void registerInputData(List formExecutionInputs, Form formToExecute); +} diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java new file mode 100644 index 00000000..3b7bf50d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -0,0 +1,34 @@ +package com.amuzil.omegasource.magus.input; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.forms.Form; + +import java.util.List; + +public class KeyboardMouseInputModule extends InputModule { + @Override + public void registerInputData(List formExecutionInputs, Form formToExecute) { + //generate condition from InputData. + Runnable onSuccess = () -> { + //todo pass formToExecute to the form queue. + //reset condition? + }; + Runnable onFailure = () -> { + //reset conditions? + }; + Condition formCondition = new ConditionBuilder() + .fromInputData(formExecutionInputs) + .build(); + if(formCondition != null) { + //Register listeners for condition created. + formCondition.register(onSuccess, onFailure); + //add condition to InputModule registry so that it can be tracked. + _formInputs.put(formCondition, formToExecute); + } else { + //todo errors/logging + } + + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java new file mode 100644 index 00000000..178d0a2b --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -0,0 +1,50 @@ +package com.amuzil.omegasource.magus.radix.condition; + +import com.amuzil.omegasource.magus.radix.Condition; + +import java.util.List; + +public class ChainedCondition extends Condition { + + private final List chainedConditions; + private Runnable onCompleteSuccess; + private Runnable onCompleteFailure; + private int currentConditionIndex = 0; + private Condition currentCondition = null; + + private final Runnable onPartialSuccess; + + public ChainedCondition(List chainedConditions) { + this.chainedConditions = chainedConditions; + this.onPartialSuccess = this::finishCurrentCondition; + } + + public void finishCurrentCondition() { + if(currentCondition == null) ; + currentCondition.unregister(); + if(currentConditionIndex == (chainedConditions.size() - 1)) { + onCompleteSuccess.run(); + currentConditionIndex = 0; + } else { + currentConditionIndex++; + currentCondition = chainedConditions.get(currentConditionIndex); + currentCondition.register(onPartialSuccess, onCompleteFailure); + } + } + + @Override + public void register(Runnable onSuccess, Runnable onFailure) { + this.onCompleteSuccess = onSuccess; + this.onCompleteFailure = onFailure; + currentCondition = chainedConditions.get(currentConditionIndex); + currentCondition.register(onPartialSuccess, () -> { + // todo: if we dont want to completely fail the chain then this method can be expanded. + onCompleteFailure.run(); + }); + } + + @Override + public void unregister() { + currentCondition.unregister(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 11364e02..8fc70ec7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -1,61 +1,33 @@ package com.amuzil.omegasource.magus.skill.conditionals; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; +import com.amuzil.omegasource.magus.radix.path.PathBuilder; + +import java.util.LinkedList; +import java.util.List; + /** * Covers all the different ways to activate an ability. * Gonna use an enum to describe for now. Will update that later; think of it as a placeholder. */ public class ConditionBuilder { - //Will fix this later. + private List conditionList = new LinkedList<>(); - //TODO: Make this a builder class, similar to NodeBuilder public ConditionBuilder() { } - /** - * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and - * consolidate for good code practice later. - */ - public enum ActivationType { - MENU, - HOTKEY, - MULTIKEY, - GESTURE - } - public enum RadialType { - MOUSE, - NUMBER - } + public ConditionBuilder fromInputData(List formExecutionInputs) { + formExecutionInputs.forEach(inputData -> conditionList.addAll(PathBuilder.buildPathFrom(inputData))); - /** - * These 2 types are generally used for multikey. Initialise is how to start listening for the hotkey or key combo, - * and the execution is when to stop. - */ - public enum InitialiseType { - TOGGLE, - HOLD + return this; } - public enum ExecuteType { - DESIGNATED, - SPECIAL - } - - /** - * Covers a range of VR gestures for those who aren't too flexible or athletically inclined, and those - * who are quite adept in their range of motion. - */ - public enum GestureType { - SIMPLE, - COMPLEX - } + public Condition build() { + if(conditionList.size() == 0) return null; + if(conditionList.size() == 1) return conditionList.get(0); - /** - * Simple activators take direct events/information to pass to a listener (radial menu and such). - * Complex take other activators and simple events. - */ - public enum ActivatorType { - SIMPLE, - COMPLEX + return new ChainedCondition(conditionList); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputData.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputData.java new file mode 100644 index 00000000..ed20cf89 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputData.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.conditionals; + +public interface InputData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivationType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivationType.java new file mode 100644 index 00000000..0b93390b --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivationType.java @@ -0,0 +1,12 @@ +package com.amuzil.omegasource.magus.skill.conditionals.enums; + +/** + * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and + * consolidate for good code practice later. + */ +public enum ActivationType { + MENU, + HOTKEY, + MULTIKEY, + GESTURE +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivatorType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivatorType.java new file mode 100644 index 00000000..478d1296 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivatorType.java @@ -0,0 +1,10 @@ +package com.amuzil.omegasource.magus.skill.conditionals.enums; + +/** + * Simple activators take direct events/information to pass to a listener (radial menu and such). + * Complex take other activators and simple events. + */ +public enum ActivatorType { + SIMPLE, + COMPLEX +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ExecuteType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ExecuteType.java new file mode 100644 index 00000000..f8ae9569 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ExecuteType.java @@ -0,0 +1,6 @@ +package com.amuzil.omegasource.magus.skill.conditionals.enums; + +public enum ExecuteType { + DESIGNATED, + SPECIAL +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/GestureType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/GestureType.java new file mode 100644 index 00000000..1d5b9244 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/GestureType.java @@ -0,0 +1,10 @@ +package com.amuzil.omegasource.magus.skill.conditionals.enums; + +/** + * Covers a range of VR gestures for those who aren't too flexible or athletically inclined, and those + * who are quite adept in their range of motion. + */ +public enum GestureType { + SIMPLE, + COMPLEX +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/InitialiseType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/InitialiseType.java new file mode 100644 index 00000000..39d45722 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/InitialiseType.java @@ -0,0 +1,10 @@ +package com.amuzil.omegasource.magus.skill.conditionals.enums; + +/** + * These 2 types are generally used for multikey. Initialise is how to start listening for the hotkey or key combo, + * and the execution is when to stop. + */ +public enum InitialiseType { + TOGGLE, + HOLD +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/RadialType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/RadialType.java new file mode 100644 index 00000000..e55b7b68 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/RadialType.java @@ -0,0 +1,6 @@ +package com.amuzil.omegasource.magus.skill.conditionals.enums; + +public enum RadialType { + MOUSE, + NUMBER +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java index 611b952d..2a26e5d1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java @@ -1,11 +1,46 @@ package com.amuzil.omegasource.magus.skill.conditionals.key; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; + import java.util.LinkedList; +import java.util.Objects; /** * Stores all possible permutations. */ -public record KeyCombination ( - LinkedList keys -) { +public final class KeyCombination implements InputData { + private final LinkedList keys; + + /** + * + */ + public KeyCombination( + LinkedList keys + ) { + this.keys = keys; + } + + public LinkedList keys() { + return keys; + } + + @Override + public boolean equals(Object obj) { + if (obj == this) return true; + if (obj == null || obj.getClass() != this.getClass()) return false; + var that = (KeyCombination) obj; + return Objects.equals(this.keys, that.keys); + } + + @Override + public int hashCode() { + return Objects.hash(keys); + } + + @Override + public String toString() { + return "KeyCombination[" + + "keys=" + keys + ']'; + } + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java index d41b52c3..7f2bed17 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java @@ -1,13 +1,69 @@ package com.amuzil.omegasource.magus.skill.conditionals.key; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.mojang.blaze3d.platform.InputConstants; +import java.util.Objects; + //Takes a key, delay, and held length. -public record KeyInput ( - InputConstants.Key key, - int minDelay, - int maxDelay, - int held -) { +public final class KeyInput implements InputData { + private final InputConstants.Key key; + private final int minDelay; + private final int maxDelay; + private final int held; + + public KeyInput( + InputConstants.Key key, + int minDelay, + int maxDelay, + int held + ) { + this.key = key; + this.minDelay = minDelay; + this.maxDelay = maxDelay; + this.held = held; + } + + public InputConstants.Key key() { + return key; + } + + public int minDelay() { + return minDelay; + } + + public int maxDelay() { + return maxDelay; + } + + public int held() { + return held; + } + + @Override + public boolean equals(Object obj) { + if (obj == this) return true; + if (obj == null || obj.getClass() != this.getClass()) return false; + var that = (KeyInput) obj; + return Objects.equals(this.key, that.key) && + this.minDelay == that.minDelay && + this.maxDelay == that.maxDelay && + this.held == that.held; + } + + @Override + public int hashCode() { + return Objects.hash(key, minDelay, maxDelay, held); + } + + @Override + public String toString() { + return "KeyInput[" + + "key=" + key + ", " + + "minDelay=" + minDelay + ", " + + "maxDelay=" + maxDelay + ", " + + "held=" + held + ']'; + } + } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java index 1d5ee2dc..2bd2f4c9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java @@ -1,6 +1,9 @@ package com.amuzil.omegasource.magus.skill.conditionals.key; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; + import java.util.LinkedList; +import java.util.Objects; /** * Essentially a wrapper class for a part of combination/sequential list of keys. @@ -9,7 +12,39 @@ * ONLY SUPPORTS MULTIPLE KEYS AT ONCE. DELAY IS USELESS HERE. If multiple keys are passed with *different* delay, * the key with the most delay will be read. */ -public record KeyPermutation ( - LinkedList keys -) { +public final class KeyPermutation implements InputData { + private final LinkedList keys; + + /** + * + */ + public KeyPermutation( + LinkedList keys + ) { + this.keys = keys; + } + + public LinkedList keys() { + return keys; + } + + @Override + public boolean equals(Object obj) { + if (obj == this) return true; + if (obj == null || obj.getClass() != this.getClass()) return false; + var that = (KeyPermutation) obj; + return Objects.equals(this.keys, that.keys); + } + + @Override + public int hashCode() { + return Objects.hash(keys); + } + + @Override + public String toString() { + return "KeyPermutation[" + + "keys=" + keys + ']'; + } + } From e78042349705128758eaa32226b1355a5f5aa882 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 30 Jan 2023 22:41:25 +0000 Subject: [PATCH 066/469] Added missing return statement --- .../omegasource/magus/radix/condition/ChainedCondition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 178d0a2b..7ab04c1f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -20,7 +20,7 @@ public ChainedCondition(List chainedConditions) { } public void finishCurrentCondition() { - if(currentCondition == null) ; + if(currentCondition == null) return; currentCondition.unregister(); if(currentConditionIndex == (chainedConditions.size() - 1)) { onCompleteSuccess.run(); From 665746003e34d19be4319acc4cc1f767c90423ed Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 30 Jan 2023 23:02:08 +0000 Subject: [PATCH 067/469] Fix review comments --- .../magus/registry/Registries.java | 27 ++++++++++--------- .../omegasource/magus/skill/forms/Form.java | 10 +------ 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 102e9bd0..2e0b5441 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -29,6 +29,7 @@ public class Registries { public static Supplier> FORMS; // SKILLS + // this is a placeholder skill for testing purposes. public static final Skill FIREBALL = new SkillActive("fireball", null); // FORMS @@ -130,19 +131,19 @@ public static void gameRegistry(RegisterEvent event) { event.register(resKey, helper -> { - registry.register(PUSH.getName(), PUSH); - registry.register(PULL.getName(), PULL); - registry.register(RAISE.getName(), RAISE); - registry.register(LOWER.getName(), LOWER); - registry.register(BURST.getName(), BURST); - registry.register(ARC.getName(), ARC); - registry.register(COMPRESS.getName(), COMPRESS); - registry.register(EXPAND.getName(), EXPAND); - registry.register(TWIST.getName(), TWIST); - registry.register(STRIKE.getName(), STRIKE); - registry.register(BLOCK.getName(), BLOCK); - registry.register(BREATHE.getName(), BREATHE); - registry.register(STEP.getName(), STEP); + registry.register(PUSH.name(), PUSH); + registry.register(PULL.name(), PULL); + registry.register(RAISE.name(), RAISE); + registry.register(LOWER.name(), LOWER); + registry.register(BURST.name(), BURST); + registry.register(ARC.name(), ARC); + registry.register(COMPRESS.name(), COMPRESS); + registry.register(EXPAND.name(), EXPAND); + registry.register(TWIST.name(), TWIST); + registry.register(STRIKE.name(), STRIKE); + registry.register(BLOCK.name(), BLOCK); + registry.register(BREATHE.name(), BREATHE); + registry.register(STEP.name(), STEP); //TODO: Element specific forms }); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 04235c98..f57900a1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -1,11 +1,3 @@ package com.amuzil.omegasource.magus.skill.forms; -public class Form { - private final String name; - - public Form(String name) { - this.name = name; - } - - public String getName() { return name; } -} +public record Form(String name) {} From c0e0cbc8286be27bb5b14ca1e600e1c106eb694d Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 30 Jan 2023 23:13:29 +0000 Subject: [PATCH 068/469] Fix review comments --- .../skill/conditionals/ConditionEnums.java | 51 +++++++++++++++ .../conditionals/enums/ActivationType.java | 12 ---- .../conditionals/enums/ActivatorType.java | 10 --- .../skill/conditionals/enums/ExecuteType.java | 6 -- .../skill/conditionals/enums/GestureType.java | 10 --- .../conditionals/enums/InitialiseType.java | 10 --- .../skill/conditionals/enums/RadialType.java | 6 -- .../conditionals/key/KeyCombination.java | 37 +---------- .../skill/conditionals/key/KeyInput.java | 63 +------------------ .../conditionals/key/KeyPermutation.java | 38 +---------- 10 files changed, 54 insertions(+), 189 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionEnums.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivationType.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivatorType.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ExecuteType.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/GestureType.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/InitialiseType.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/RadialType.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionEnums.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionEnums.java new file mode 100644 index 00000000..643b42c3 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionEnums.java @@ -0,0 +1,51 @@ +package com.amuzil.omegasource.magus.skill.conditionals; + +public class ConditionEnums { + /** + * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and + * consolidate for good code practice later. + */ + public enum ActivationType { + MENU, + HOTKEY, + MULTIKEY, + GESTURE + } + + /** + * Simple activators take direct events/information to pass to a listener (radial menu and such). + * Complex take other activators and simple events. + */ + public enum ActivatorType { + SIMPLE, + COMPLEX + } + + /** + * Covers a range of VR gestures for those who aren't too flexible or athletically inclined, and those + * who are quite adept in their range of motion. + */ + public enum GestureType { + SIMPLE, + COMPLEX + } + + /** + * These 2 types are generally used for multikey. Initialise is how to start listening for the hotkey or key combo, + * and the execution is when to stop. + */ + public enum InitialiseType { + TOGGLE, + HOLD + } + + public enum RadialType { + MOUSE, + NUMBER + } + + public enum ExecuteType { + DESIGNATED, + SPECIAL + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivationType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivationType.java deleted file mode 100644 index 0b93390b..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivationType.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.enums; - -/** - * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and - * consolidate for good code practice later. - */ -public enum ActivationType { - MENU, - HOTKEY, - MULTIKEY, - GESTURE -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivatorType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivatorType.java deleted file mode 100644 index 478d1296..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ActivatorType.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.enums; - -/** - * Simple activators take direct events/information to pass to a listener (radial menu and such). - * Complex take other activators and simple events. - */ -public enum ActivatorType { - SIMPLE, - COMPLEX -} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ExecuteType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ExecuteType.java deleted file mode 100644 index f8ae9569..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/ExecuteType.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.enums; - -public enum ExecuteType { - DESIGNATED, - SPECIAL -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/GestureType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/GestureType.java deleted file mode 100644 index 1d5b9244..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/GestureType.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.enums; - -/** - * Covers a range of VR gestures for those who aren't too flexible or athletically inclined, and those - * who are quite adept in their range of motion. - */ -public enum GestureType { - SIMPLE, - COMPLEX -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/InitialiseType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/InitialiseType.java deleted file mode 100644 index 39d45722..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/InitialiseType.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.enums; - -/** - * These 2 types are generally used for multikey. Initialise is how to start listening for the hotkey or key combo, - * and the execution is when to stop. - */ -public enum InitialiseType { - TOGGLE, - HOLD -} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/RadialType.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/RadialType.java deleted file mode 100644 index e55b7b68..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/enums/RadialType.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.enums; - -public enum RadialType { - MOUSE, - NUMBER -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java index 2a26e5d1..c1e14e45 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java @@ -3,44 +3,9 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputData; import java.util.LinkedList; -import java.util.Objects; /** * Stores all possible permutations. */ -public final class KeyCombination implements InputData { - private final LinkedList keys; - - /** - * - */ - public KeyCombination( - LinkedList keys - ) { - this.keys = keys; - } - - public LinkedList keys() { - return keys; - } - - @Override - public boolean equals(Object obj) { - if (obj == this) return true; - if (obj == null || obj.getClass() != this.getClass()) return false; - var that = (KeyCombination) obj; - return Objects.equals(this.keys, that.keys); - } - - @Override - public int hashCode() { - return Objects.hash(keys); - } - - @Override - public String toString() { - return "KeyCombination[" + - "keys=" + keys + ']'; - } - +public record KeyCombination(LinkedList keys) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java index 7f2bed17..a438dd1e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java @@ -4,66 +4,5 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.mojang.blaze3d.platform.InputConstants; -import java.util.Objects; - //Takes a key, delay, and held length. -public final class KeyInput implements InputData { - private final InputConstants.Key key; - private final int minDelay; - private final int maxDelay; - private final int held; - - public KeyInput( - InputConstants.Key key, - int minDelay, - int maxDelay, - int held - ) { - this.key = key; - this.minDelay = minDelay; - this.maxDelay = maxDelay; - this.held = held; - } - - public InputConstants.Key key() { - return key; - } - - public int minDelay() { - return minDelay; - } - - public int maxDelay() { - return maxDelay; - } - - public int held() { - return held; - } - - @Override - public boolean equals(Object obj) { - if (obj == this) return true; - if (obj == null || obj.getClass() != this.getClass()) return false; - var that = (KeyInput) obj; - return Objects.equals(this.key, that.key) && - this.minDelay == that.minDelay && - this.maxDelay == that.maxDelay && - this.held == that.held; - } - - @Override - public int hashCode() { - return Objects.hash(key, minDelay, maxDelay, held); - } - - @Override - public String toString() { - return "KeyInput[" + - "key=" + key + ", " + - "minDelay=" + minDelay + ", " + - "maxDelay=" + maxDelay + ", " + - "held=" + held + ']'; - } - -} \ No newline at end of file +public record KeyInput(InputConstants.Key key, int minDelay, int maxDelay, int held) implements InputData {} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java index 2bd2f4c9..fbe64fba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java @@ -3,7 +3,6 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputData; import java.util.LinkedList; -import java.util.Objects; /** * Essentially a wrapper class for a part of combination/sequential list of keys. @@ -12,39 +11,4 @@ * ONLY SUPPORTS MULTIPLE KEYS AT ONCE. DELAY IS USELESS HERE. If multiple keys are passed with *different* delay, * the key with the most delay will be read. */ -public final class KeyPermutation implements InputData { - private final LinkedList keys; - - /** - * - */ - public KeyPermutation( - LinkedList keys - ) { - this.keys = keys; - } - - public LinkedList keys() { - return keys; - } - - @Override - public boolean equals(Object obj) { - if (obj == this) return true; - if (obj == null || obj.getClass() != this.getClass()) return false; - var that = (KeyPermutation) obj; - return Objects.equals(this.keys, that.keys); - } - - @Override - public int hashCode() { - return Objects.hash(keys); - } - - @Override - public String toString() { - return "KeyPermutation[" + - "keys=" + keys + ']'; - } - -} +public record KeyPermutation(LinkedList keys) implements InputData {} From 374a06fda6421ef7f4da4b05226cf1927ae88f0f Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 1 Feb 2023 20:26:36 -0800 Subject: [PATCH 069/469] working on fixing the registry before i start prototyping --- .../magus/registry/Registries.java | 89 ++++++++++++------- .../omegasource/magus/skill/forms/Form.java | 20 ++++- .../omegasource/magus/skill/forms/Forms.java | 18 ++++ 3 files changed, 94 insertions(+), 33 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 2e0b5441..b7db14a4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -14,6 +14,7 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.*; +import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; @@ -28,28 +29,57 @@ public class Registries { public static Supplier> SKILLS; public static Supplier> FORMS; + + public static List traits = new ArrayList<>(); + public static List categories = new ArrayList<>(); + public static List skills = new ArrayList<>(); + public static List forms = new ArrayList<>(); + // SKILLS // this is a placeholder skill for testing purposes. public static final Skill FIREBALL = new SkillActive("fireball", null); - // FORMS - public static final Form PUSH = new Form("push"); - public static final Form PULL = new Form("pull"); - public static final Form RAISE = new Form("raise"); - public static final Form LOWER = new Form("lower"); - public static final Form BURST = new Form("burst"); - public static final Form ARC = new Form("arc"); - public static final Form COMPRESS = new Form("compress"); - public static final Form EXPAND = new Form("expand"); - public static final Form TWIST = new Form("twist"); - public static final Form STRIKE = new Form("strike"); - public static final Form BLOCK = new Form("block"); - public static final Form BREATHE = new Form("breathe"); - public static final Form STEP = new Form("step"); public static void init() { } + /** + * Registry methods. + */ + //These are added to the forge event bus registry. To get a specific trait, use the registry. + public static void registerTraits(List dataTraits) { + traits.addAll(dataTraits); + } + + public static void registerTrait(DataTrait dataTrait) { + traits.add(dataTrait); + } + + public static void registerSkillCategories(List skillCategories) { + categories.addAll(skillCategories); + } + + public static void registerSkillCategory(SkillCategory skillCategory) { + categories.add(skillCategory); + } + + + public static void registerSkills(List registrySkills) { + skills.addAll(registrySkills); + } + + public static void registerSkill(Skill registrySkill) { + skills.add(registrySkill); + } + + public static void registerForms(List registryForms) { + forms.addAll(registryForms); + } + + public static void registerForm(Form registryForm) { + forms.add(registryForm); + } + //How registering will work: /* All skills will be registered first, along with skill categories. @@ -131,19 +161,8 @@ public static void gameRegistry(RegisterEvent event) { event.register(resKey, helper -> { - registry.register(PUSH.name(), PUSH); - registry.register(PULL.name(), PULL); - registry.register(RAISE.name(), RAISE); - registry.register(LOWER.name(), LOWER); - registry.register(BURST.name(), BURST); - registry.register(ARC.name(), ARC); - registry.register(COMPRESS.name(), COMPRESS); - registry.register(EXPAND.name(), EXPAND); - registry.register(TWIST.name(), TWIST); - registry.register(STRIKE.name(), STRIKE); - registry.register(BLOCK.name(), BLOCK); - registry.register(BREATHE.name(), BREATHE); - registry.register(STEP.name(), STEP); + for (Form form : forms) + registry.register(form.name(), form); //TODO: Element specific forms }); } @@ -157,14 +176,19 @@ public static void gameRegistry(RegisterEvent event) { //Registers every Data Trait for every skill included within Magus. //Register other traits manually. registerTraitsFromSkills((List) SKILLS.get().getValues(), event); + event.register(resKey, helper -> { + for (DataTrait trait : traits) + registry.register(trait.getName(), trait); + }); } } /** * Use this method to register the data traits of all registered skills. + * * @param skills List of skills. - * @param event Registry event. - * @param modID ModID. + * @param event Registry event. + * @param modID ModID. */ public static void registerTraitsFromSkills(List skills, RegisterEvent event, String modID) { @@ -178,10 +202,11 @@ public static void registerTraitsFromSkills(List skills, RegisterEvent ev } /** - * Same as the above method, but if you standardise your modID in your data, - * then use this. + * Same as the above method, but if you standardise your modID in your data, + * then use this. + * * @param skills Skills to register. - * @param event The registry event. + * @param event The registry event. */ public static void registerTraitsFromSkills(List skills, RegisterEvent event) { ResourceKey> key = DATA_TRAITS.get().getRegistryKey(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index f57900a1..6b634290 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -1,3 +1,21 @@ package com.amuzil.omegasource.magus.skill.forms; -public record Form(String name) {} +import com.amuzil.omegasource.magus.registry.Registries; + +public class Form { + private String name; + + public Form(String name) { + this.name = name; + Registries.registerForm(this); + } + + public Form(String name, String modID) { + this(name); + + } + + public String name() { + return name; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java new file mode 100644 index 00000000..82100023 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -0,0 +1,18 @@ +package com.amuzil.omegasource.magus.skill.forms; + +public class Forms { + // FORMS + public static final Form PUSH = new Form("push"); + public static final Form PULL = new Form("pull"); + public static final Form RAISE = new Form("raise"); + public static final Form LOWER = new Form("lower"); + public static final Form BURST = new Form("burst"); + public static final Form ARC = new Form("arc"); + public static final Form COMPRESS = new Form("compress"); + public static final Form EXPAND = new Form("expand"); + public static final Form TWIST = new Form("twist"); + public static final Form STRIKE = new Form("strike"); + public static final Form BLOCK = new Form("block"); + public static final Form BREATHE = new Form("breathe"); + public static final Form STEP = new Form("step"); +} From 36ec3f87fd90b1e44f6919ca6a069b6384164cee Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 1 Feb 2023 20:29:36 -0800 Subject: [PATCH 070/469] documentation --- .../java/com/amuzil/omegasource/magus/skill/forms/Form.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 6b634290..8c324488 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -10,9 +10,13 @@ public Form(String name) { Registries.registerForm(this); } + /** + * Just in case. I don't think we care about the MOD_ID as forge handles that. + * @param name + * @param modID + */ public Form(String name, String modID) { this(name); - } public String name() { From 9301427463a556f24a7f2c6ea92c327a7d1b9919 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 1 Feb 2023 21:20:39 -0800 Subject: [PATCH 071/469] cleanup; need the tree to be fixed before i can prototype --- .../magus/radix/condition/util/ConditionConverter.java | 9 --------- .../com/amuzil/omegasource/magus/skill/forms/Forms.java | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java deleted file mode 100644 index 3dc7aa1c..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/util/ConditionConverter.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.amuzil.omegasource.magus.radix.condition.util; - -/** - * Takes data and converts it into a corresponding data structure of conditions. - * Still has to be turned into tree. - */ -public class ConditionConverter { - -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 82100023..c5e617f2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -15,4 +15,9 @@ public class Forms { public static final Form BLOCK = new Form("block"); public static final Form BREATHE = new Form("breathe"); public static final Form STEP = new Form("step"); + + + //These two may not be necessary. + public static final Form MENU = new Form("menu"); + public static final Form HOTKEY = new Form("hotkey"); } From 9bb11351c87f200d5a72ee8b7d137b0cf755d1bb Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Thu, 2 Feb 2023 23:21:21 +0000 Subject: [PATCH 072/469] reworked the tree to not use a branch structure and tied it to the input module --- .../com/amuzil/omegasource/magus/Magus.java | 4 ++ .../omegasource/magus/input/InputModule.java | 7 ++- .../magus/input/KeyboardMouseInputModule.java | 21 +++----- .../amuzil/omegasource/magus/radix/Node.java | 4 +- .../omegasource/magus/radix/RadixTree.java | 52 ++++++++++--------- .../omegasource/magus/skill/forms/Form.java | 15 ++++-- 6 files changed, 61 insertions(+), 42 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index c181327d..f998ce3d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus; +import com.amuzil.omegasource.magus.input.InputModule; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; @@ -37,6 +39,8 @@ public class Magus { // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); + public static InputModule inputModule = new KeyboardMouseInputModule(); + public Magus() { // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 586f6ada..c3894c8b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -11,5 +11,10 @@ public abstract class InputModule { protected final Map _formInputs = new HashMap<>(); - public abstract void registerInputData(List formExecutionInputs, Form formToExecute); + public abstract Condition registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure); + + public void unregisterCondition(Condition condition) { + condition.unregister(); + _formInputs.remove(condition); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 3b7bf50d..79074117 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -8,27 +9,21 @@ import java.util.List; public class KeyboardMouseInputModule extends InputModule { + + private RadixTree tree; + @Override - public void registerInputData(List formExecutionInputs, Form formToExecute) { - //generate condition from InputData. - Runnable onSuccess = () -> { - //todo pass formToExecute to the form queue. - //reset condition? - }; - Runnable onFailure = () -> { - //reset conditions? - }; - Condition formCondition = new ConditionBuilder() - .fromInputData(formExecutionInputs) - .build(); + public Condition registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure) { if(formCondition != null) { //Register listeners for condition created. formCondition.register(onSuccess, onFailure); //add condition to InputModule registry so that it can be tracked. _formInputs.put(formCondition, formToExecute); + + return formCondition; } else { //todo errors/logging + return null; } - } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 497aba0c..0ac1399e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.skill.forms.Form; + import java.util.Map; import java.util.function.Consumer; @@ -11,7 +13,7 @@ * @param terminateCondition If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate */ public record Node( - Map children, + Map children, Consumer onEnter, Consumer onLeave, Consumer onTerminate, diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 4b1b53f1..3c12ffe9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -1,26 +1,28 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.skill.forms.Form; + import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class RadixTree { private final Node root; - private final Branch branch; private final List activeConditions; - private Node active; public RadixTree(Node root) { this.root = root; - this.branch = new Branch(); +// this.branch = new Branch(); this.active = root; this.activeConditions = new ArrayList<>(); } - public boolean registerLeaf(Class> type, Leaf leaf) { - return branch.registerLeaf(type, leaf); - } +// public boolean registerLeaf(Class> type, Leaf leaf) { +// return branch.registerLeaf(type, leaf); +// } public void burn() { activeConditions.forEach(Condition::unregister); @@ -32,32 +34,34 @@ public void burn() { active = null; - branch.burn(); +// branch.burn(); } public void start() { - branch.reset(root); +// branch.reset(root); setActive(root); } public void setActive(Node node) { active = node; - if (active.onEnter() != null) { - active.onEnter().accept(branch); - } +// if (active.onEnter() != null) { +// active.onEnter().accept(branch); +// } if (active.terminateCondition() != null) { active.terminateCondition().register(this::terminate, () -> { }); } - active.children().forEach((condition, child) -> { - activeConditions.add(condition); - condition.register(() -> { - branch.addStep(condition, child); + active.children().forEach((form, child) -> { + Condition formCondition = new ConditionBuilder() + .fromInputData(form.getInputData()) + .build(); + activeConditions.add(formCondition); + Magus.inputModule.registerInputData(formCondition, form, () -> { moveDown(child); - }, () -> expire(condition)); + }, () -> expire(formCondition)); }); } @@ -65,9 +69,9 @@ public void setActive(Node node) { public void terminate() { activeConditions.forEach(Condition::unregister); - if (active.onTerminate() != null) { - active.onTerminate().accept(branch); - } +// if (active.onTerminate() != null) { +// active.onTerminate().accept(branch); +// } if (active.terminateCondition() != null) { active.terminateCondition().unregister(); @@ -79,14 +83,14 @@ public void terminate() { } public void moveDown(Node child) { - if (active.onLeave() != null) { - active.onLeave().accept(branch); - } +// if (active.onLeave() != null) { +// active.onLeave().accept(branch); +// } if (active.terminateCondition() != null) { active.terminateCondition().unregister(); } - +// Iterator iterator = activeConditions.iterator(); while (iterator.hasNext()) { Condition condition = iterator.next(); @@ -98,7 +102,7 @@ public void moveDown(Node child) { } public void expire(Condition condition) { - condition.unregister(); + Magus.inputModule.unregisterCondition(condition); activeConditions.remove(condition); if (activeConditions.isEmpty()) { terminate(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 8c324488..e2a443cf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -1,12 +1,17 @@ package com.amuzil.omegasource.magus.skill.forms; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; + +import java.util.LinkedList; public class Form { private String name; + private LinkedList inputData; - public Form(String name) { + public Form(String name, LinkedList inputData) { this.name = name; + this.inputData = inputData; Registries.registerForm(this); } @@ -15,11 +20,15 @@ public Form(String name) { * @param name * @param modID */ - public Form(String name, String modID) { - this(name); + public Form(String name, LinkedList inputData, String modID) { + this(name, inputData); } public String name() { return name; } + + public LinkedList getInputData() { + return inputData; + } } From 25753f00092159ab8607c608e06d064ca35d41d2 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Thu, 2 Feb 2023 23:22:48 +0000 Subject: [PATCH 073/469] remove reference to radix tree --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 79074117..19f1a307 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -10,8 +10,6 @@ public class KeyboardMouseInputModule extends InputModule { - private RadixTree tree; - @Override public Condition registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure) { if(formCondition != null) { From fc7216433cc313146820c9e355c23a3295c9f233 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Thu, 2 Feb 2023 23:23:58 +0000 Subject: [PATCH 074/469] remove artifacts of an old implementation attempt --- .../amuzil/omegasource/magus/input/InputModule.java | 4 +--- .../magus/input/KeyboardMouseInputModule.java | 10 +--------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index c3894c8b..20405fc1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -1,17 +1,15 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import java.util.HashMap; -import java.util.List; import java.util.Map; public abstract class InputModule { protected final Map _formInputs = new HashMap<>(); - public abstract Condition registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure); + public abstract void registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure); public void unregisterCondition(Condition condition) { condition.unregister(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 19f1a307..d1cda035 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,27 +1,19 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; -import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; -import java.util.List; - public class KeyboardMouseInputModule extends InputModule { @Override - public Condition registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure) { + public void registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure) { if(formCondition != null) { //Register listeners for condition created. formCondition.register(onSuccess, onFailure); //add condition to InputModule registry so that it can be tracked. _formInputs.put(formCondition, formToExecute); - - return formCondition; } else { //todo errors/logging - return null; } } } From 5ae5ecde95f058b1a5833a0881148f2e9d19e99d Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Thu, 2 Feb 2023 23:26:31 +0000 Subject: [PATCH 075/469] fixed compilation error --- .../omegasource/magus/skill/forms/Forms.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 82100023..2c397523 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -1,18 +1,20 @@ package com.amuzil.omegasource.magus.skill.forms; +import java.util.LinkedList; + public class Forms { // FORMS - public static final Form PUSH = new Form("push"); - public static final Form PULL = new Form("pull"); - public static final Form RAISE = new Form("raise"); - public static final Form LOWER = new Form("lower"); - public static final Form BURST = new Form("burst"); - public static final Form ARC = new Form("arc"); - public static final Form COMPRESS = new Form("compress"); - public static final Form EXPAND = new Form("expand"); - public static final Form TWIST = new Form("twist"); - public static final Form STRIKE = new Form("strike"); - public static final Form BLOCK = new Form("block"); - public static final Form BREATHE = new Form("breathe"); - public static final Form STEP = new Form("step"); + public static final Form PUSH = new Form("push", new LinkedList<>()); + public static final Form PULL = new Form("pull", new LinkedList<>()); + public static final Form RAISE = new Form("raise", new LinkedList<>()); + public static final Form LOWER = new Form("lower", new LinkedList<>()); + public static final Form BURST = new Form("burst", new LinkedList<>()); + public static final Form ARC = new Form("arc", new LinkedList<>()); + public static final Form COMPRESS = new Form("compress", new LinkedList<>()); + public static final Form EXPAND = new Form("expand", new LinkedList<>()); + public static final Form TWIST = new Form("twist", new LinkedList<>()); + public static final Form STRIKE = new Form("strike", new LinkedList<>()); + public static final Form BLOCK = new Form("block", new LinkedList<>()); + public static final Form BREATHE = new Form("breathe", new LinkedList<>()); + public static final Form STEP = new Form("step", new LinkedList<>()); } From 3a8b7a68d5b1ea7375ce9bd0eeb119cd99a868de Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Fri, 3 Feb 2023 01:57:37 +0000 Subject: [PATCH 076/469] rework tree --- .../omegasource/magus/input/InputModule.java | 9 ++-- .../magus/input/KeyboardMouseInputModule.java | 20 +++++++- .../omegasource/magus/radix/NodeBuilder.java | 12 +++-- .../omegasource/magus/radix/RadixTree.java | 48 +++---------------- .../omegasource/magus/skill/forms/Form.java | 15 ++---- .../omegasource/magus/skill/forms/Forms.java | 28 +++++------ 6 files changed, 51 insertions(+), 81 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 20405fc1..586f6ada 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -1,18 +1,15 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import java.util.HashMap; +import java.util.List; import java.util.Map; public abstract class InputModule { protected final Map _formInputs = new HashMap<>(); - public abstract void registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure); - - public void unregisterCondition(Condition condition) { - condition.unregister(); - _formInputs.remove(condition); - } + public abstract void registerInputData(List formExecutionInputs, Form formToExecute); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index d1cda035..131ff9f6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,12 +1,29 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import java.util.List; + public class KeyboardMouseInputModule extends InputModule { @Override - public void registerInputData(Condition formCondition, Form formToExecute, Runnable onSuccess, Runnable onFailure) { + public void registerInputData(List formExecutionInputs, Form formToExecute) { + //generate condition from InputData. + Runnable onSuccess = () -> { + //todo pass formToExecute to the form queue. + + //reset condition? + }; + Runnable onFailure = () -> { + //reset conditions? + }; + Condition formCondition = new ConditionBuilder() + .fromInputData(formExecutionInputs) + .build(); if(formCondition != null) { //Register listeners for condition created. formCondition.register(onSuccess, onFailure); @@ -15,5 +32,6 @@ public void registerInputData(Condition formCondition, Form formToExecute, Runna } else { //todo errors/logging } + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index 9d5d4785..b398de4e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.skill.forms.Form; + import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -7,7 +9,7 @@ public class NodeBuilder { private final Type type; - private final Map children; + private final Map children; private Consumer onEnter; private Consumer onLeave; private Consumer onTerminate; @@ -38,18 +40,18 @@ private IllegalStateException cannot(String message) { return new IllegalStateException("A " + type.name().toLowerCase(Locale.ROOT) + " node cannot " + message); } - public NodeBuilder addChild(Condition condition, Node child) { + public NodeBuilder addChild(Form form, Node child) { if (type.canHaveChildren) { - children.put(condition, child); + children.put(form, child); return this; } else { throw cannot("have children"); } } - public NodeBuilder removeChild(Condition condition) { + public NodeBuilder removeChild(Form form) { if (type.canHaveChildren) { - children.remove(condition); + children.remove(form); return this; } else { throw cannot("have children"); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 3c12ffe9..838b035a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -1,23 +1,15 @@ package com.amuzil.omegasource.magus.radix; -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.forms.Form; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - public class RadixTree { private final Node root; - private final List activeConditions; private Node active; public RadixTree(Node root) { this.root = root; // this.branch = new Branch(); this.active = root; - this.activeConditions = new ArrayList<>(); } // public boolean registerLeaf(Class> type, Leaf leaf) { @@ -25,9 +17,6 @@ public RadixTree(Node root) { // } public void burn() { - activeConditions.forEach(Condition::unregister); - activeConditions.clear(); - if (active.terminateCondition() != null) { active.terminateCondition().unregister(); } @@ -42,7 +31,7 @@ public void start() { setActive(root); } - public void setActive(Node node) { + private void setActive(Node node) { active = node; // if (active.onEnter() != null) { @@ -53,22 +42,10 @@ public void setActive(Node node) { active.terminateCondition().register(this::terminate, () -> { }); } - - active.children().forEach((form, child) -> { - Condition formCondition = new ConditionBuilder() - .fromInputData(form.getInputData()) - .build(); - activeConditions.add(formCondition); - Magus.inputModule.registerInputData(formCondition, form, () -> { - moveDown(child); - }, () -> expire(formCondition)); - }); } // Called when either the node's terminate condition is fulfilled or all active child conditions have expired - public void terminate() { - activeConditions.forEach(Condition::unregister); - + private void terminate() { // if (active.onTerminate() != null) { // active.onTerminate().accept(branch); // } @@ -77,12 +54,10 @@ public void terminate() { active.terminateCondition().unregister(); } - activeConditions.clear(); - start(); } - public void moveDown(Node child) { + public void moveDown(Form executedForm) { // if (active.onLeave() != null) { // active.onLeave().accept(branch); // } @@ -90,22 +65,11 @@ public void moveDown(Node child) { if (active.terminateCondition() != null) { active.terminateCondition().unregister(); } -// - Iterator iterator = activeConditions.iterator(); - while (iterator.hasNext()) { - Condition condition = iterator.next(); - condition.unregister(); - iterator.remove(); - } - setActive(child); + setActive(active.children().get(executedForm)); } - public void expire(Condition condition) { - Magus.inputModule.unregisterCondition(condition); - activeConditions.remove(condition); - if (activeConditions.isEmpty()) { - terminate(); - } + public void expire() { + terminate(); } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index e2a443cf..8c324488 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -1,17 +1,12 @@ package com.amuzil.omegasource.magus.skill.forms; import com.amuzil.omegasource.magus.registry.Registries; -import com.amuzil.omegasource.magus.skill.conditionals.InputData; - -import java.util.LinkedList; public class Form { private String name; - private LinkedList inputData; - public Form(String name, LinkedList inputData) { + public Form(String name) { this.name = name; - this.inputData = inputData; Registries.registerForm(this); } @@ -20,15 +15,11 @@ public Form(String name, LinkedList inputData) { * @param name * @param modID */ - public Form(String name, LinkedList inputData, String modID) { - this(name, inputData); + public Form(String name, String modID) { + this(name); } public String name() { return name; } - - public LinkedList getInputData() { - return inputData; - } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 2c397523..82100023 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -1,20 +1,18 @@ package com.amuzil.omegasource.magus.skill.forms; -import java.util.LinkedList; - public class Forms { // FORMS - public static final Form PUSH = new Form("push", new LinkedList<>()); - public static final Form PULL = new Form("pull", new LinkedList<>()); - public static final Form RAISE = new Form("raise", new LinkedList<>()); - public static final Form LOWER = new Form("lower", new LinkedList<>()); - public static final Form BURST = new Form("burst", new LinkedList<>()); - public static final Form ARC = new Form("arc", new LinkedList<>()); - public static final Form COMPRESS = new Form("compress", new LinkedList<>()); - public static final Form EXPAND = new Form("expand", new LinkedList<>()); - public static final Form TWIST = new Form("twist", new LinkedList<>()); - public static final Form STRIKE = new Form("strike", new LinkedList<>()); - public static final Form BLOCK = new Form("block", new LinkedList<>()); - public static final Form BREATHE = new Form("breathe", new LinkedList<>()); - public static final Form STEP = new Form("step", new LinkedList<>()); + public static final Form PUSH = new Form("push"); + public static final Form PULL = new Form("pull"); + public static final Form RAISE = new Form("raise"); + public static final Form LOWER = new Form("lower"); + public static final Form BURST = new Form("burst"); + public static final Form ARC = new Form("arc"); + public static final Form COMPRESS = new Form("compress"); + public static final Form EXPAND = new Form("expand"); + public static final Form TWIST = new Form("twist"); + public static final Form STRIKE = new Form("strike"); + public static final Form BLOCK = new Form("block"); + public static final Form BREATHE = new Form("breathe"); + public static final Form STEP = new Form("step"); } From 5f87c754312da468e35378269efb6f131a504aea Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sat, 4 Feb 2023 01:48:25 +0000 Subject: [PATCH 077/469] removed branches --- .../omegasource/magus/radix/Branch.java | 58 ------------------- .../amuzil/omegasource/magus/radix/Node.java | 6 +- .../omegasource/magus/radix/NodeBuilder.java | 12 ++-- 3 files changed, 9 insertions(+), 67 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/Branch.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java b/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java deleted file mode 100644 index 782b7b1f..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Branch.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.amuzil.omegasource.magus.radix; - -import java.util.HashMap; -import java.util.LinkedList; - -public class Branch { - private final LinkedList path; - - private final HashMap>, Leaf> leaves; - - public Branch() { - path = new LinkedList<>(); - leaves = new HashMap<>(); - } - - public void burn() { - path.clear(); - leaves.values().forEach(Leaf::burn); - leaves.clear(); - } - - public void reset(Node root) { - path.clear(); - addStep(null, root); - leaves.values().forEach(Leaf::reset); - } - - public void addStep(Condition activator, Node node) { - path.add(new Step(activator, node)); - } - - public boolean registerLeaf(Class> type, Leaf leaf) { - if (leaves.containsKey(type)) { - return false; - } else { - leaves.put(type, leaf); - return true; - } - } - - public void resetLeaf(Class> type) { - leaves.get(type).reset(); - } - - public LinkedList getPath() { - // Return a copy of the path. - return new LinkedList<>(path); - } - - @SuppressWarnings("unchecked") - public T measureLeaf(Class> type) { - return (T) leaves.get(type).measure(); - } - - public record Step (Condition activator, Node node) { - } -} - diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 0ac1399e..98046131 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -14,9 +14,9 @@ */ public record Node( Map children, - Consumer onEnter, - Consumer onLeave, - Consumer onTerminate, + Consumer onEnter, + Consumer onLeave, + Consumer onTerminate, Condition terminateCondition ) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index b398de4e..59617169 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -10,9 +10,9 @@ public class NodeBuilder { private final Type type; private final Map children; - private Consumer onEnter; - private Consumer onLeave; - private Consumer onTerminate; + private Consumer onEnter; + private Consumer onLeave; + private Consumer onTerminate; private Condition terminateCondition; private NodeBuilder(Type type) { @@ -58,7 +58,7 @@ public NodeBuilder removeChild(Form form) { } } - public NodeBuilder onEnter(Consumer onEnter) { + public NodeBuilder onEnter(Consumer onEnter) { if (type.canBeEntered) { this.onEnter = onEnter; return this; @@ -67,7 +67,7 @@ public NodeBuilder onEnter(Consumer onEnter) { } } - public NodeBuilder onLeave(Consumer onLeave) { + public NodeBuilder onLeave(Consumer onLeave) { if (type.canBeLeft) { this.onLeave = onLeave; return this; @@ -76,7 +76,7 @@ public NodeBuilder onLeave(Consumer onLeave) { } } - public NodeBuilder onTerminate(Consumer onTerminate) { + public NodeBuilder onTerminate(Consumer onTerminate) { if (type.canBeTerminated) { this.onTerminate = onTerminate; return this; From 4d6f044d169125e61f452b49c4856f3e5627f91c Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sun, 5 Feb 2023 22:33:20 +0000 Subject: [PATCH 078/469] Implement Modifier, ModifierData, ModifierListener first attempts --- .../omegasource/magus/input/InputModule.java | 2 + .../amuzil/omegasource/magus/radix/Node.java | 89 ++++++++++++++++--- .../magus/skill/modifiers/Modifier.java | 4 + .../magus/skill/modifiers/ModifierData.java | 19 ++++ .../skill/modifiers/ModifierListener.java | 32 +++++++ 5 files changed, 134 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/Modifier.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierListener.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 586f6ada..821d0f9c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.modifiers.ModifierListener; import java.util.HashMap; import java.util.List; @@ -10,6 +11,7 @@ public abstract class InputModule { protected final Map _formInputs = new HashMap<>(); + protected final Map _modifierConditions = new HashMap<>(); public abstract void registerInputData(List formExecutionInputs, Form formToExecute); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 98046131..f8e0d70b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -1,23 +1,88 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.modifiers.Modifier; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import java.util.function.Consumer; /** - * @param children If a condition is fulfilled, the active node moves down to the mapped child node - * @param onEnter Called when the active node is moved down from the parent node to this node - * @param onLeave Called when the active node is moved down from this node to a child node - * @param onTerminate Called when the active node is moved up to the root node because either all children's conditions have expired or the terminate condition has been fulfilled - * @param terminateCondition If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate + * */ -public record Node( - Map children, - Consumer onEnter, - Consumer onLeave, - Consumer onTerminate, - Condition terminateCondition -) { +public final class Node { + private final Map children; + private final Consumer onEnter; + private final Consumer onLeave; + private final Consumer onTerminate; + private final Condition terminateCondition; + private final List modifiers = new ArrayList<>(); + /** + * @param children If a condition is fulfilled, the active node moves down to the mapped child node + * @param onEnter Called when the active node is moved down from the parent node to this node + * @param onLeave Called when the active node is moved down from this node to a child node + * @param onTerminate Called when the active node is moved up to the root node because either all children's conditions have expired or the terminate condition has been fulfilled + * @param terminateCondition If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate + */ + public Node( + Map children, + Consumer onEnter, + Consumer onLeave, + Consumer onTerminate, + Condition terminateCondition + ) { + this.children = children; + this.onEnter = onEnter; + this.onLeave = onLeave; + this.onTerminate = onTerminate; + this.terminateCondition = terminateCondition; + } + + public Map children() { + return children; + } + + public Consumer onEnter() { + // todo: wrap the listener registration in a check if this is in a player or AI context. + if(modifiers.size() > 0) + registerModifierListeners(); + return onEnter; + } + + public Consumer onLeave() { + // todo: wrap the listener unregistration in a check if this is in a player or AI context. + if(modifiers.size() > 0) + unregisterModifierListeners(); + return onLeave; + } + + public Consumer onTerminate() { + return onTerminate; + } + + public Condition terminateCondition() { + return terminateCondition; + } + + public List getModifiers() { + return modifiers; + } + + public void registerModifierListeners() { + modifiers.forEach(this::registerModifierListener); + } + + private void registerModifierListener(Modifier modifier) { + modifier.listener().register(() -> { + int modifierIndex = modifiers.indexOf(modifier); + Modifier existingModifier = modifiers.get(modifierIndex); + existingModifier.data().add(modifier.listener().getModifierData()); + }); + } + + public void unregisterModifierListeners() { + modifiers.forEach(modifier -> modifier.listener().unregister()); + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/Modifier.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/Modifier.java new file mode 100644 index 00000000..26945832 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/Modifier.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.modifiers; + +public record Modifier(ModifierData data, ModifierListener listener) { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java new file mode 100644 index 00000000..39a490f1 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java @@ -0,0 +1,19 @@ +package com.amuzil.omegasource.magus.skill.modifiers; + +import net.minecraftforge.common.util.INBTSerializable; + +public abstract class ModifierData implements INBTSerializable { + + public ModifierData() { + } + + /* this method should be overwritten by the specific implementation + of ModifierData, and encapsulates merging two copies of the same + ModifierData into one set. This base method just ensures we aren't + merging two separate types */ + public void add(ModifierData modifierData) { + if(!modifierData.getClass().equals(this.getClass())) { + //todo logging - tried to merge 2 different types of ModifierData together + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierListener.java new file mode 100644 index 00000000..3c2068f1 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierListener.java @@ -0,0 +1,32 @@ +package com.amuzil.omegasource.magus.skill.modifiers; + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.Event; + +import java.util.function.Consumer; + +public abstract class ModifierListener implements Consumer { + + Runnable onSuccess; + private ModifierData modifierData; + + public void register(Runnable onSuccess) { + MinecraftForge.EVENT_BUS.addListener(this); + this.onSuccess = onSuccess; + } + + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(this); + } + + public abstract ModifierData collectModifierDataFromEvent(T event); + + public ModifierData getModifierData() { return modifierData; } + + @Override + public void accept(T event) { + this.modifierData.add(collectModifierDataFromEvent(event)); + + onSuccess.run(); + } +} From ef701db036fac0a58b7b8aca31e2a6e2f4fbcca5 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sun, 5 Feb 2023 22:36:16 +0000 Subject: [PATCH 079/469] Update NodeBuilder --- .../omegasource/magus/radix/NodeBuilder.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index 59617169..90faa66b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -1,10 +1,9 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.modifiers.Modifier; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; +import java.util.*; import java.util.function.Consumer; public class NodeBuilder { @@ -14,10 +13,12 @@ public class NodeBuilder { private Consumer onLeave; private Consumer onTerminate; private Condition terminateCondition; + private List availableModifiers; private NodeBuilder(Type type) { this.type = type; this.children = new HashMap<>(); + this.availableModifiers = new ArrayList<>(); this.onEnter = null; this.onLeave = null; this.onTerminate = null; @@ -49,6 +50,18 @@ public NodeBuilder addChild(Form form, Node child) { } } + public NodeBuilder addModifiers(List modifiers) { + availableModifiers.addAll(modifiers); + + return this; + } + + public NodeBuilder addModifier(Modifier modifier) { + this.availableModifiers.add(modifier); + + return this; + } + public NodeBuilder removeChild(Form form) { if (type.canHaveChildren) { children.remove(form); From d29d8945ecc80420d42d71b38f659c30b5a86d84 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sun, 5 Feb 2023 22:37:14 +0000 Subject: [PATCH 080/469] Remove unneeded Map --- .../java/com/amuzil/omegasource/magus/input/InputModule.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 821d0f9c..fce7f5fe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -11,7 +11,6 @@ public abstract class InputModule { protected final Map _formInputs = new HashMap<>(); - protected final Map _modifierConditions = new HashMap<>(); public abstract void registerInputData(List formExecutionInputs, Form formToExecute); } From 6bee38178bf3719fd0e714e0dbbb27255633ecb1 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sun, 5 Feb 2023 22:47:35 +0000 Subject: [PATCH 081/469] Add new forms, rename TWIST to SPIN --- .../java/com/amuzil/omegasource/magus/skill/forms/Forms.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 82100023..1ec94465 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -10,9 +10,10 @@ public class Forms { public static final Form ARC = new Form("arc"); public static final Form COMPRESS = new Form("compress"); public static final Form EXPAND = new Form("expand"); - public static final Form TWIST = new Form("twist"); + public static final Form SPIN = new Form("spin"); + public static final Form ROTATE = new Form("rotate"); public static final Form STRIKE = new Form("strike"); - public static final Form BLOCK = new Form("block"); + public static final Form FORCE = new Form("force"); public static final Form BREATHE = new Form("breathe"); public static final Form STEP = new Form("step"); } From d9ea4fac4e23cc4b6676619c69bcb86411881bd0 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sun, 5 Feb 2023 22:50:27 +0000 Subject: [PATCH 082/469] Finish adding Modifiers to NodeBuilder --- src/main/java/com/amuzil/omegasource/magus/radix/Node.java | 7 ++++--- .../com/amuzil/omegasource/magus/radix/NodeBuilder.java | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index f8e0d70b..5907f07c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -3,7 +3,6 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.Modifier; -import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Consumer; @@ -17,7 +16,7 @@ public final class Node { private final Consumer onLeave; private final Consumer onTerminate; private final Condition terminateCondition; - private final List modifiers = new ArrayList<>(); + private final List modifiers; /** * @param children If a condition is fulfilled, the active node moves down to the mapped child node @@ -31,13 +30,15 @@ public Node( Consumer onEnter, Consumer onLeave, Consumer onTerminate, - Condition terminateCondition + Condition terminateCondition, + List modifiers ) { this.children = children; this.onEnter = onEnter; this.onLeave = onLeave; this.onTerminate = onTerminate; this.terminateCondition = terminateCondition; + this.modifiers = modifiers; } public Map children() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index 90faa66b..1f0cbe66 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -51,7 +51,7 @@ public NodeBuilder addChild(Form form, Node child) { } public NodeBuilder addModifiers(List modifiers) { - availableModifiers.addAll(modifiers); + this.availableModifiers.addAll(modifiers); return this; } @@ -108,7 +108,7 @@ public NodeBuilder terminateWhen(Condition terminateCondition) { } public Node build() { - return new Node(children, onEnter, onLeave, onTerminate, terminateCondition); + return new Node(children, onEnter, onLeave, onTerminate, terminateCondition, availableModifiers); } private enum Type { From 91637906d859a14157521213d600611d60a7644a Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sun, 5 Feb 2023 22:51:06 +0000 Subject: [PATCH 083/469] Made field final --- .../java/com/amuzil/omegasource/magus/radix/NodeBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index 1f0cbe66..99bc8517 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -13,7 +13,7 @@ public class NodeBuilder { private Consumer onLeave; private Consumer onTerminate; private Condition terminateCondition; - private List availableModifiers; + private final List availableModifiers; private NodeBuilder(Type type) { this.type = type; From d5a94357c910ac0964bc6d974cf8cdd11508b0aa Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sun, 5 Feb 2023 22:52:16 +0000 Subject: [PATCH 084/469] Remove unused import statement --- .../java/com/amuzil/omegasource/magus/input/InputModule.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index fce7f5fe..586f6ada 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -3,7 +3,6 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.modifiers.ModifierListener; import java.util.HashMap; import java.util.List; From a287ce0b19cff815bfa968cabf7f29f73725fb8c Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 6 Feb 2023 01:15:22 +0000 Subject: [PATCH 085/469] Address comments on pr --- src/main/java/com/amuzil/omegasource/magus/radix/Node.java | 2 +- .../omegasource/magus/skill/modifiers/ModifierData.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 5907f07c..2ccfa743 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -10,7 +10,7 @@ /** * */ -public final class Node { +public class Node { private final Map children; private final Consumer onEnter; private final Consumer onLeave; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java index 39a490f1..bb72afad 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java @@ -1,8 +1,8 @@ package com.amuzil.omegasource.magus.skill.modifiers; -import net.minecraftforge.common.util.INBTSerializable; +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; -public abstract class ModifierData implements INBTSerializable { +public abstract class ModifierData implements DataTrait { public ModifierData() { } @@ -14,6 +14,8 @@ public ModifierData() { public void add(ModifierData modifierData) { if(!modifierData.getClass().equals(this.getClass())) { //todo logging - tried to merge 2 different types of ModifierData together + } else { + markDirty(); } } } From db9930876d51532c70c26cecde201a5ccf0062b4 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 6 Feb 2023 01:25:31 +0000 Subject: [PATCH 086/469] Add comment --- .../amuzil/omegasource/magus/skill/modifiers/ModifierData.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java index bb72afad..ffa55956 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java @@ -2,6 +2,8 @@ import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; + +// actually adding data is handled by sub-class implementations, this is just for generics. public abstract class ModifierData implements DataTrait { public ModifierData() { From 46245b61aafac2756be9c1f41959deb1b9fdf748 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 6 Feb 2023 01:36:26 +0000 Subject: [PATCH 087/469] Create instance of radixtree and link to InputModule --- src/main/java/com/amuzil/omegasource/magus/Magus.java | 4 ++++ .../omegasource/magus/input/KeyboardMouseInputModule.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index f998ce3d..e43338fe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -4,6 +4,8 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.NodeBuilder; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; import com.amuzil.omegasource.magus.registry.Registries; @@ -39,6 +41,8 @@ public class Magus { // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); + //todo: move these to a better place + public static RadixTree radixTree = new RadixTree(NodeBuilder.root().build()); public static InputModule inputModule = new KeyboardMouseInputModule(); public Magus() { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 131ff9f6..0e795c11 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.input; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; @@ -15,11 +16,12 @@ public void registerInputData(List formExecutionInputs, Form formToEx //generate condition from InputData. Runnable onSuccess = () -> { //todo pass formToExecute to the form queue. - + Magus.radixTree.moveDown(formToExecute); //reset condition? }; Runnable onFailure = () -> { //reset conditions? + Magus.radixTree.burn(); }; Condition formCondition = new ConditionBuilder() .fromInputData(formExecutionInputs) From 9a81eba8b7f63cee1469b620fc56bdaa8129d3a2 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 5 Feb 2023 18:01:50 -0800 Subject: [PATCH 088/469] getting a npe error; testing out input module integration --- .../com/amuzil/omegasource/magus/Magus.java | 51 ++----------------- .../minecraft/forge/TickTimedCondition.java | 2 + .../magus/skill/forms/FormDataRegistry.java | 21 ++++++++ 3 files changed, 28 insertions(+), 46 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index e43338fe..63171b3e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -10,6 +10,8 @@ import com.amuzil.omegasource.magus.radix.path.PathBuilder; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; @@ -60,7 +62,9 @@ public Magus() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); // Register the doClientStuff method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); - + //Assign input data to forms + radixTree.start(); + FormDataRegistry.init(); } @@ -72,51 +76,6 @@ private void setup(final FMLCommonSetupEvent event) { LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); - - //Testing for some conditions - - //Note: this is only executed client-side, due to how events work. Be sure to send a packet! - Condition test = PathBuilder.buildPathFrom( - new KeyInput(InputConstants.getKey(-1, InputConstants.KEY_X), 0, 0, 40) - ).get(0); - Condition wait = new KeyPressedCondition(40); -// test.register(() -> { }, () -> { -// }); - - //More testing: -// KeyInfo k1 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D), 10, 10), -// k2 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_D)), -// k3 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_S), 0, 5), -// k4 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_A)), -// k5 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_A), 0, 2), -// k6 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_S), 15, 0), -// k7 = new KeyInfo(InputConstants.getKey(-1, InputConstants.KEY_W)); -// -// LinkedList ls1 = new LinkedList<>(), -// ls2 = new LinkedList<>(); -// -// ls1.add(k2); -// ls1.add(k3); -// ls2.add(k5); -// ls2.add(k6); -// KeyPermutation p1 = new KeyPermutation(k1), -// p2 = new KeyPermutation(ls1), -// p3 = new KeyPermutation(k4), -// p4 = new KeyPermutation(ls2), -// p5 = new KeyPermutation(k7); -// -// LinkedList kpLs = new LinkedList<>(); -// kpLs.add(p1); -// kpLs.add(p2); -// kpLs.add(p3); -// kpLs.add(p4); -// kpLs.add(p5); -// -// KeyCombination comb = new KeyCombination(kpLs); -// LinkedList conds = keysToConditions(comb); -// -// for (Condition c : conds) -// System.out.println(c); } private void doClientStuff(final FMLClientSetupEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index d9298b5a..70b4da61 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -34,6 +34,8 @@ public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, this.current++; if (this.current >= timeout) { runOn(onTimeout).run(); + //Test: + System.out.println("Success?"); } } }; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java new file mode 100644 index 00000000..677983f4 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -0,0 +1,21 @@ +package com.amuzil.omegasource.magus.skill.forms; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.KeyboardHandler; + +import java.util.ArrayList; +import java.util.List; + +public class FormDataRegistry { + + //Remember to see #InputConstants for the key names. + public static void init() { + List inputs = new ArrayList<>(); + inputs.add(new KeyInput(InputConstants.getKey("key.mouse.left"), + 0, 0, 0)); + Magus.inputModule.registerInputData(inputs, Forms.STRIKE); + } +} From ffb64df8fda7ffb3ea4ef722a837671d089b6323 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 5 Feb 2023 18:05:06 -0800 Subject: [PATCH 089/469] commented out the burn --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 2 +- .../radix/condition/minecraft/forge/TickTimedCondition.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 0e795c11..25fb4b68 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -21,7 +21,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx }; Runnable onFailure = () -> { //reset conditions? - Magus.radixTree.burn(); + // Magus.radixTree.burn(); }; Condition formCondition = new ConditionBuilder() .fromInputData(formExecutionInputs) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 70b4da61..439328a2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -35,7 +35,7 @@ public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, if (this.current >= timeout) { runOn(onTimeout).run(); //Test: - System.out.println("Success?"); + // System.out.println("Success?"); } } }; From 19e6ecf08229d048477bae35d9089ba6c1137e92 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 6 Feb 2023 02:42:30 +0000 Subject: [PATCH 090/469] fixed crashes --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 2 ++ src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java | 2 ++ .../java/com/amuzil/omegasource/magus/registry/Registries.java | 2 +- .../amuzil/omegasource/magus/skill/forms/FormDataRegistry.java | 2 +- .../magus/skill/util/capability/CapabilityHandler.java | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 25fb4b68..291c130c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -8,6 +8,7 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import java.util.List; +import org.apache.logging.log4j.LogManager; public class KeyboardMouseInputModule extends InputModule { @@ -16,6 +17,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx //generate condition from InputData. Runnable onSuccess = () -> { //todo pass formToExecute to the form queue. + LogManager.getLogger().info("FORM ACTIVATED :" + formToExecute.name()); Magus.radixTree.moveDown(formToExecute); //reset condition? }; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 838b035a..2da66c5e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -62,6 +62,8 @@ public void moveDown(Form executedForm) { // active.onLeave().accept(branch); // } + if(active.children().size() == 0) return; + if (active.terminateCondition() != null) { active.terminateCondition().unregister(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index b7db14a4..c07275cf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -175,7 +175,7 @@ public static void gameRegistry(RegisterEvent event) { //Registers every Data Trait for every skill included within Magus. //Register other traits manually. - registerTraitsFromSkills((List) SKILLS.get().getValues(), event); + registerTraitsFromSkills(SKILLS.get().getValues().stream().toList(), event); event.register(resKey, helper -> { for (DataTrait trait : traits) registry.register(trait.getName(), trait); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 677983f4..b53d29b8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -14,7 +14,7 @@ public class FormDataRegistry { //Remember to see #InputConstants for the key names. public static void init() { List inputs = new ArrayList<>(); - inputs.add(new KeyInput(InputConstants.getKey("key.mouse.left"), + inputs.add(new KeyInput(InputConstants.getKey("key.keyboard.semicolon"), 0, 0, 0)); Magus.inputModule.registerInputData(inputs, Forms.STRIKE); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java index ed2b4f3f..6ca2bc9a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java @@ -25,7 +25,7 @@ public static void attachEntityCapability(AttachCapabilitiesEvent e) { //capabilities all living entities get. //TODO: Add requirement to check against a list of compatible entities. //E.g custom npcs, or specific mobs you want to be able to use Skills. - e.addCapability(LivingDataCapability.IDENTIFIER, new LivingDataCapability.LivingDataProvider()); +// e.addCapability(LivingDataCapability.IDENTIFIER, new LivingDataCapability.LivingDataProvider()); if (e.getObject() instanceof Player) { //capabilities just players get. } From 1c90db351948a38eb9fcaac0ffdd9dd6046a2f6b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 5 Feb 2023 19:12:08 -0800 Subject: [PATCH 091/469] mouse and keyboard inputs working! --- .../omegasource/magus/input/InputModule.java | 15 +++++++++++++++ .../amuzil/omegasource/magus/radix/Condition.java | 2 +- .../condition/minecraft/forge/EventCondition.java | 4 ++++ .../minecraft/forge/key/KeyPressCondition.java | 7 ++++--- .../magus/skill/forms/FormDataRegistry.java | 2 +- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 586f6ada..06712f93 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -1,8 +1,12 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraftforge.client.event.InputEvent; +import org.lwjgl.glfw.GLFW; import java.util.HashMap; import java.util.List; @@ -12,4 +16,15 @@ public abstract class InputModule { protected final Map _formInputs = new HashMap<>(); public abstract void registerInputData(List formExecutionInputs, Form formToExecute); + + public static EventCondition keyToCondition(InputConstants.Key key, int actionCondition) { + if (key.getType().equals(InputConstants.Type.MOUSE)) { + return new EventCondition<>(InputEvent.MouseButton.class, + event -> event.getButton() == key.getValue() && + event.getAction() == actionCondition); + } + else return new EventCondition<>(InputEvent.Key.class, + event -> event.getKey() == key.getValue() && event.getAction() + == actionCondition); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 10b2491e..22199e5e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -15,7 +15,7 @@ public enum Result { public void register(Runnable onSuccess, Runnable onFailure) { RadixUtil.getLogger().debug("Registering results"); this.onSuccess = () -> { - //RadixUtil.getLogger().debug("Result: success"); + RadixUtil.getLogger().debug("Result: success"); onSuccess.run(); }; this.onFailure = () -> { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index 62f1f43d..22dabd71 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -1,6 +1,8 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge; import com.amuzil.omegasource.magus.radix.Condition; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.EventPriority; @@ -35,4 +37,6 @@ public void unregister() { super.unregister(); MinecraftForge.EVENT_BUS.unregister(listener); } + + } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index 202fc4b5..a16ddbc8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -1,7 +1,9 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; +import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; +import com.mojang.blaze3d.platform.InputConstants; import com.mojang.blaze3d.platform.InputConstants.Key; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.event.TickEvent.Phase; @@ -10,8 +12,7 @@ public class KeyPressCondition extends TickTimedCondition { public KeyPressCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition<>( - InputEvent.Key.class, event -> event.getAction() == GLFW.GLFW_PRESS && event.getKey() == key.getValue() - ), Result.SUCCESS, Result.FAILURE); + super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, InputModule.keyToCondition(key, + GLFW.GLFW_PRESS), Result.SUCCESS, Result.FAILURE); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index b53d29b8..237cde7f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -14,7 +14,7 @@ public class FormDataRegistry { //Remember to see #InputConstants for the key names. public static void init() { List inputs = new ArrayList<>(); - inputs.add(new KeyInput(InputConstants.getKey("key.keyboard.semicolon"), + inputs.add(new KeyInput(InputConstants.getKey("key.mouse.right"), 0, 0, 0)); Magus.inputModule.registerInputData(inputs, Forms.STRIKE); } From 44f24f91da1af85acb5a4deca8fa83fb43263a8e Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 6 Feb 2023 23:36:57 +0000 Subject: [PATCH 092/469] added the held modifier --- .../com/amuzil/omegasource/magus/Magus.java | 12 +--- .../magus/input/KeyboardMouseInputModule.java | 18 +++-- .../amuzil/omegasource/magus/radix/Node.java | 6 +- .../omegasource/magus/radix/NodeBuilder.java | 3 +- .../omegasource/magus/radix/RadixTree.java | 21 +++--- .../magus/skill/modifiers/Modifier.java | 4 -- .../skill/modifiers/ModifiersRegistry.java | 16 +++++ .../magus/skill/modifiers/api/Modifier.java | 11 +++ .../modifiers/{ => api}/ModifierData.java | 7 +- .../modifiers/{ => api}/ModifierListener.java | 13 ++-- .../modifiers/data/BaseModifierData.java | 30 ++++++++ .../modifiers/data/HeldModifierData.java | 52 ++++++++++++++ .../listeners/KeyHeldModifierListener.java | 71 +++++++++++++++++++ .../util/capability/CapabilityHandler.java | 2 +- .../skill/util/capability/entity/Data.java | 3 + .../entity/LivingDataCapability.java | 10 ++- 16 files changed, 242 insertions(+), 37 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/Modifier.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java rename src/main/java/com/amuzil/omegasource/magus/skill/modifiers/{ => api}/ModifierData.java (79%) rename src/main/java/com/amuzil/omegasource/magus/skill/modifiers/{ => api}/ModifierListener.java (64%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 63171b3e..7b4f58f9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -3,17 +3,10 @@ import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.network.MagusNetwork; -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.NodeBuilder; -import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; -import com.amuzil.omegasource.magus.radix.path.PathBuilder; import com.amuzil.omegasource.magus.registry.Registries; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; -import com.amuzil.omegasource.magus.skill.forms.Forms; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; -import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.block.Blocks; @@ -44,7 +37,6 @@ public class Magus { private static final Logger LOGGER = LogManager.getLogger(); //todo: move these to a better place - public static RadixTree radixTree = new RadixTree(NodeBuilder.root().build()); public static InputModule inputModule = new KeyboardMouseInputModule(); public Magus() { @@ -63,8 +55,8 @@ public Magus() { // Register the doClientStuff method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); //Assign input data to forms - radixTree.start(); FormDataRegistry.init(); + ModifiersRegistry.init(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 291c130c..85975195 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,27 +1,37 @@ package com.amuzil.omegasource.magus.input; -import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import java.util.List; + +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import net.minecraft.client.Minecraft; import org.apache.logging.log4j.LogManager; public class KeyboardMouseInputModule extends InputModule { + private Form activeForm = null; + @Override public void registerInputData(List formExecutionInputs, Form formToExecute) { //generate condition from InputData. Runnable onSuccess = () -> { //todo pass formToExecute to the form queue. - LogManager.getLogger().info("FORM ACTIVATED :" + formToExecute.name()); - Magus.radixTree.moveDown(formToExecute); + Minecraft mc = Minecraft.getInstance(); + if(mc.level != null && formToExecute != activeForm) { + Data livingDataCapability = CapabilityHandler.getCapability(mc.player, CapabilityHandler.LIVING_DATA); + LogManager.getLogger().info("FORM ACTIVATED :" + formToExecute.name()); + livingDataCapability.getTree().moveDown(formToExecute); + activeForm = formToExecute; + } //reset condition? }; Runnable onFailure = () -> { + activeForm = null; //reset conditions? // Magus.radixTree.burn(); }; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 2ccfa743..472c65bd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.modifiers.Modifier; +import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import java.util.List; import java.util.Map; @@ -54,8 +54,10 @@ public Consumer onEnter() { public Consumer onLeave() { // todo: wrap the listener unregistration in a check if this is in a player or AI context. - if(modifiers.size() > 0) + if(modifiers.size() > 0) { + modifiers.forEach(modifier -> modifier.print()); unregisterModifierListeners(); + } return onLeave; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index 99bc8517..8a601b2a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -1,7 +1,8 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.modifiers.Modifier; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import java.util.*; import java.util.function.Consumer; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 2da66c5e..91369196 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -34,9 +34,9 @@ public void start() { private void setActive(Node node) { active = node; -// if (active.onEnter() != null) { -// active.onEnter().accept(branch); -// } + if (active.onEnter() != null) { + active.onEnter().accept(this); + } if (active.terminateCondition() != null) { active.terminateCondition().register(this::terminate, () -> { @@ -46,9 +46,9 @@ private void setActive(Node node) { // Called when either the node's terminate condition is fulfilled or all active child conditions have expired private void terminate() { -// if (active.onTerminate() != null) { -// active.onTerminate().accept(branch); -// } + if (active.onTerminate() != null) { + active.onTerminate().accept(this); + } if (active.terminateCondition() != null) { active.terminateCondition().unregister(); @@ -58,12 +58,15 @@ private void terminate() { } public void moveDown(Form executedForm) { -// if (active.onLeave() != null) { -// active.onLeave().accept(branch); -// } + if(active.getModifiers().size() > 0) active.getModifiers().forEach(modifier -> modifier.print()); if(active.children().size() == 0) return; + if (active.onLeave() != null) { + active.onLeave().accept(this); + } + + if (active.terminateCondition() != null) { active.terminateCondition().unregister(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/Modifier.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/Modifier.java deleted file mode 100644 index 26945832..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/Modifier.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.amuzil.omegasource.magus.skill.modifiers; - -public record Modifier(ModifierData data, ModifierListener listener) { -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java new file mode 100644 index 00000000..413adc3f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -0,0 +1,16 @@ +package com.amuzil.omegasource.magus.skill.modifiers; + +import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; +import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.listeners.KeyHeldModifierListener; +import com.mojang.blaze3d.platform.InputConstants; + +public class ModifiersRegistry { + + public static Modifier FOCUS; + + public static void init() { + FOCUS = new Modifier(new HeldModifierData(), new KeyHeldModifierListener(InputConstants.getKey("key.mouse.right"))); + } + +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java new file mode 100644 index 00000000..fb179296 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java @@ -0,0 +1,11 @@ +package com.amuzil.omegasource.magus.skill.modifiers.api; + +public record Modifier(ModifierData data, ModifierListener listener) { + public Modifier copy() { + return new Modifier(data(), listener()); + } + + public void print() { + data.print(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java similarity index 79% rename from src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java index ffa55956..3fea6ec2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.modifiers; +package com.amuzil.omegasource.magus.skill.modifiers.api; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; @@ -17,7 +17,12 @@ public void add(ModifierData modifierData) { if(!modifierData.getClass().equals(this.getClass())) { //todo logging - tried to merge 2 different types of ModifierData together } else { + mergeFields(modifierData); markDirty(); } } + + protected abstract void mergeFields(ModifierData modifierData); + + public abstract void print(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java similarity index 64% rename from src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierListener.java rename to src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java index 3c2068f1..b958ac83 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java @@ -1,14 +1,15 @@ -package com.amuzil.omegasource.magus.skill.modifiers; +package com.amuzil.omegasource.magus.skill.modifiers.api; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; +import org.apache.logging.log4j.LogManager; import java.util.function.Consumer; public abstract class ModifierListener implements Consumer { Runnable onSuccess; - private ModifierData modifierData; + protected ModifierData modifierData; public void register(Runnable onSuccess) { MinecraftForge.EVENT_BUS.addListener(this); @@ -19,14 +20,18 @@ public void unregister() { MinecraftForge.EVENT_BUS.unregister(this); } + public abstract boolean shouldCollectModifierData(T event); + public abstract ModifierData collectModifierDataFromEvent(T event); public ModifierData getModifierData() { return modifierData; } @Override public void accept(T event) { - this.modifierData.add(collectModifierDataFromEvent(event)); + if(shouldCollectModifierData(event)) { + this.modifierData = collectModifierDataFromEvent(event); - onSuccess.run(); + onSuccess.run(); + } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java new file mode 100644 index 00000000..b9f66306 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java @@ -0,0 +1,30 @@ +package com.amuzil.omegasource.magus.skill.modifiers.data; + +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.nbt.CompoundTag; + +public abstract class BaseModifierData extends ModifierData { + + private boolean isDirty = false; + + @Override + public void markDirty() { + isDirty = true; + } + + @Override + public void markClean() { + isDirty = false; + } + + @Override + public boolean isDirty() { + return isDirty; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag compoundTag = new CompoundTag(); + return compoundTag; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java new file mode 100644 index 00000000..f76c5016 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -0,0 +1,52 @@ +package com.amuzil.omegasource.magus.skill.modifiers.data; + +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.nbt.CompoundTag; +import org.apache.logging.log4j.LogManager; + +public class HeldModifierData extends BaseModifierData { + + private int duration; + + public HeldModifierData() { + this.duration = 0; + } + + public HeldModifierData(int duration) { + super(); + this.duration = duration; + } + + @Override + public String getName() { + return "HeldModifier"; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag compoundTag = super.serializeNBT(); + + compoundTag.putInt("duration", duration); + + return compoundTag; + } + + @Override + public void deserializeNBT(CompoundTag compoundTag) { + this.duration = compoundTag.getInt("duration"); + } + + //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking + @Override + protected void mergeFields(ModifierData modifierData) { + HeldModifierData heldModifierData = (HeldModifierData) modifierData; + LogManager.getLogger().info("MERGING DATA: " + heldModifierData.duration); + this.duration += heldModifierData.duration; + LogManager.getLogger().info("NEW VALUE: " + this.duration); + } + + @Override + public void print() { + LogManager.getLogger().info("HeldModifierData duration: " + duration); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java new file mode 100644 index 00000000..d4666913 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -0,0 +1,71 @@ +package com.amuzil.omegasource.magus.skill.modifiers.listeners; + +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import org.apache.logging.log4j.LogManager; +import org.lwjgl.glfw.GLFW; + +import java.util.function.Consumer; + +public class KeyHeldModifierListener extends ModifierListener { + + private final Consumer keyInputListener; + private final Consumer clientTickListener; + private int currentHolding; + private final InputConstants.Key keyToHold; + private boolean isHeld = false; + + public KeyHeldModifierListener(InputConstants.Key key) { + this.modifierData = new HeldModifierData(); + this.keyToHold = key; + + this.keyInputListener = event -> { + if (event.getButton() == key.getValue()) { + if (event.getAction() == GLFW.GLFW_PRESS) { + this.isHeld = true; + this.currentHolding = 0; + } else if (event.getAction() == GLFW.GLFW_RELEASE) { + this.isHeld = false; + } + } + }; + + this.clientTickListener = event -> { + if (event.phase == TickEvent.ClientTickEvent.Phase.START) { + if (this.isHeld) { + this.currentHolding++; + } + } + }; + } + + @Override + public void register(Runnable onSuccess) { + super.register(onSuccess); + MinecraftForge.EVENT_BUS.addListener(keyInputListener); + MinecraftForge.EVENT_BUS.addListener(clientTickListener); + } + + @Override + public boolean shouldCollectModifierData(TickEvent event) { + if(isHeld) { + return true; + } + return false; + } + + @Override + public ModifierData collectModifierDataFromEvent(TickEvent event) { + LogManager.getLogger().info("COLLECTING MODIFIER DATA"); + //todo check how often this is called. + HeldModifierData data = new HeldModifierData(currentHolding); + this.currentHolding = 0; + return data; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java index 6ca2bc9a..ed2b4f3f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/CapabilityHandler.java @@ -25,7 +25,7 @@ public static void attachEntityCapability(AttachCapabilitiesEvent e) { //capabilities all living entities get. //TODO: Add requirement to check against a list of compatible entities. //E.g custom npcs, or specific mobs you want to be able to use Skills. -// e.addCapability(LivingDataCapability.IDENTIFIER, new LivingDataCapability.LivingDataProvider()); + e.addCapability(LivingDataCapability.IDENTIFIER, new LivingDataCapability.LivingDataProvider()); if (e.getObject() instanceof Player) { //capabilities just players get. } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java index b141e523..693a9f4b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; +import com.amuzil.omegasource.magus.radix.RadixTree; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.capabilities.AutoRegisterCapability; import net.minecraftforge.common.util.INBTSerializable; @@ -20,5 +21,7 @@ public interface Data extends INBTSerializable { boolean isDirty(); + RadixTree getTree(); + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java index b158f5d8..a5240e56 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -1,8 +1,12 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.Node; +import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.forms.Forms; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -52,9 +56,13 @@ public static class LivingDataCapabilityImp implements Data { public LivingDataCapabilityImp() { fillTraits(); //TODO: Data generation methods for each skill - fillCategories(); fillSkills(); + Node secondNode = NodeBuilder.middle().addModifier(ModifiersRegistry.FOCUS.copy()).build(); + tree = new RadixTree(NodeBuilder.root().addChild(Forms.STRIKE, secondNode).build()); + + //todo this should probably not be where we call start, but for now it'll stop us crashing + tree.start(); markDirty(); } From 219e2dac05326567a07c94c24056051ebe542fe4 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Tue, 7 Feb 2023 00:03:36 +0000 Subject: [PATCH 093/469] removed excessive logging and cleaned up workflow a touch --- .../skill/modifiers/data/HeldModifierData.java | 2 -- .../listeners/KeyHeldModifierListener.java | 14 ++++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index f76c5016..7cfc2af4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -40,9 +40,7 @@ public void deserializeNBT(CompoundTag compoundTag) { @Override protected void mergeFields(ModifierData modifierData) { HeldModifierData heldModifierData = (HeldModifierData) modifierData; - LogManager.getLogger().info("MERGING DATA: " + heldModifierData.duration); this.duration += heldModifierData.duration; - LogManager.getLogger().info("NEW VALUE: " + this.duration); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index d4666913..4e297624 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; @@ -8,7 +7,6 @@ import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; -import org.apache.logging.log4j.LogManager; import org.lwjgl.glfw.GLFW; import java.util.function.Consumer; @@ -18,12 +16,10 @@ public class KeyHeldModifierListener extends ModifierListener { private final Consumer keyInputListener; private final Consumer clientTickListener; private int currentHolding; - private final InputConstants.Key keyToHold; private boolean isHeld = false; public KeyHeldModifierListener(InputConstants.Key key) { this.modifierData = new HeldModifierData(); - this.keyToHold = key; this.keyInputListener = event -> { if (event.getButton() == key.getValue()) { @@ -52,9 +48,16 @@ public void register(Runnable onSuccess) { MinecraftForge.EVENT_BUS.addListener(clientTickListener); } + @Override + public void unregister() { + super.unregister(); + MinecraftForge.EVENT_BUS.unregister(keyInputListener); + MinecraftForge.EVENT_BUS.unregister(clientTickListener); + } + @Override public boolean shouldCollectModifierData(TickEvent event) { - if(isHeld) { + if(isHeld && currentHolding > 0) { return true; } return false; @@ -62,7 +65,6 @@ public boolean shouldCollectModifierData(TickEvent event) { @Override public ModifierData collectModifierDataFromEvent(TickEvent event) { - LogManager.getLogger().info("COLLECTING MODIFIER DATA"); //todo check how often this is called. HeldModifierData data = new HeldModifierData(currentHolding); this.currentHolding = 0; From b20ad434f5c573e3166ee6bdb803f376e03acd8e Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Tue, 7 Feb 2023 01:02:34 +0000 Subject: [PATCH 094/469] made a method for resetting a nodes ModifierData --- .../omegasource/magus/skill/modifiers/api/ModifierData.java | 2 ++ .../magus/skill/modifiers/data/HeldModifierData.java | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java index 3fea6ec2..f77ac650 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java @@ -25,4 +25,6 @@ public void add(ModifierData modifierData) { protected abstract void mergeFields(ModifierData modifierData); public abstract void print(); + + public abstract void reset(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index 7cfc2af4..5957e27a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -43,6 +43,11 @@ protected void mergeFields(ModifierData modifierData) { this.duration += heldModifierData.duration; } + @Override + public void reset() { + this.duration = 0; + } + @Override public void print() { LogManager.getLogger().info("HeldModifierData duration: " + duration); From cf2f16a8419e93c62e410f69131bf0e71ca7b8e2 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Tue, 7 Feb 2023 18:38:15 +0000 Subject: [PATCH 095/469] added RadixPath logic and made sure InputModule chooses complex forms over simple ones --- .../omegasource/magus/input/InputModule.java | 3 +- .../magus/input/KeyboardMouseInputModule.java | 49 ++++++++++-- .../amuzil/omegasource/magus/radix/Node.java | 1 + .../omegasource/magus/radix/RadixPath.java | 75 +++++++++++++++++++ .../omegasource/magus/radix/RadixTree.java | 9 +++ .../magus/skill/forms/FormDataRegistry.java | 9 ++- .../skill/modifiers/ModifiersRegistry.java | 20 ++++- .../modifiers/data/BaseModifierData.java | 3 + 8 files changed, 159 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 06712f93..e1df2fce 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -6,7 +6,6 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.mojang.blaze3d.platform.InputConstants; import net.minecraftforge.client.event.InputEvent; -import org.lwjgl.glfw.GLFW; import java.util.HashMap; import java.util.List; @@ -27,4 +26,6 @@ public static EventCondition keyToCondition(InputConstants.Key key, int actio event -> event.getKey() == key.getValue() && event.getAction() == actionCondition); } + + public abstract void unregister(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 85975195..d79d5010 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -6,27 +6,56 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import java.util.List; +import java.util.function.Consumer; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; import net.minecraft.client.Minecraft; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; import org.apache.logging.log4j.LogManager; public class KeyboardMouseInputModule extends InputModule { + private final Consumer tickEventConsumer; + + private Form lastActivatedForm = null; private Form activeForm = null; + private int ticksSinceActivated = 0; + + //todo make this threshold configurable + private final int tickActivationThreshold = 4; + Minecraft mc = Minecraft.getInstance(); + + public KeyboardMouseInputModule() { + tickEventConsumer = tickEvent -> { + if(activeForm != null) { + ticksSinceActivated++; + } + + if(ticksSinceActivated >= tickActivationThreshold) { + Data livingDataCapability = CapabilityHandler.getCapability(mc.player, CapabilityHandler.LIVING_DATA); + LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); + livingDataCapability.getTree().moveDown(activeForm); + lastActivatedForm = activeForm; + activeForm = null; + ticksSinceActivated = 0; + } + }; + MinecraftForge.EVENT_BUS.addListener(tickEventConsumer); + } @Override public void registerInputData(List formExecutionInputs, Form formToExecute) { //generate condition from InputData. Runnable onSuccess = () -> { - //todo pass formToExecute to the form queue. - Minecraft mc = Minecraft.getInstance(); - if(mc.level != null && formToExecute != activeForm) { - Data livingDataCapability = CapabilityHandler.getCapability(mc.player, CapabilityHandler.LIVING_DATA); - LogManager.getLogger().info("FORM ACTIVATED :" + formToExecute.name()); - livingDataCapability.getTree().moveDown(formToExecute); - activeForm = formToExecute; + if(mc.level != null) { + //this section is to prevent re-activating + // single condition forms when you hold the activation key for Held modifiers + if(formToExecute != lastActivatedForm) { + activeForm = formToExecute; + } + ticksSinceActivated = 0; } //reset condition? }; @@ -48,4 +77,10 @@ public void registerInputData(List formExecutionInputs, Form formToEx } } + + @Override + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); + _formInputs.forEach((condition, form) -> condition.unregister()); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 472c65bd..d2a86fa9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -56,6 +56,7 @@ public Consumer onLeave() { // todo: wrap the listener unregistration in a check if this is in a player or AI context. if(modifiers.size() > 0) { modifiers.forEach(modifier -> modifier.print()); + unregisterModifierListeners(); } return onLeave; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java new file mode 100644 index 00000000..c63c0a04 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java @@ -0,0 +1,75 @@ +package com.amuzil.omegasource.magus.radix; + +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.ibm.icu.impl.Pair; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraftforge.common.util.INBTSerializable; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +public class RadixPath implements INBTSerializable { + + private LinkedList>> activationPath; + + public RadixPath() { + activationPath = new LinkedList<>(); + } + + public void addStep(Form activatedForm, List modifierData) { + activationPath.add(Pair.of(activatedForm, modifierData)); + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag compoundTag = new CompoundTag(); + + ListTag listOfPairsTag = new ListTag(); + + CompoundTag pairTag; + for (int i = 0; i < activationPath.size(); i++) { + Pair> formListPair = activationPath.get(i); + Form activeForm = formListPair.first; + List modifierData = formListPair.second; + + pairTag = new CompoundTag(); + ListTag modifierDataListTag = new ListTag(); + + modifierData.forEach(modifierDataInstance -> modifierDataListTag.add(modifierDataInstance.serializeNBT())); + + pairTag.putString("form", activeForm.name()); + pairTag.put("modifiers", modifierDataListTag); + listOfPairsTag.add(i, pairTag); + } + + compoundTag.put("activationPath", listOfPairsTag); + + return compoundTag; + } + + @Override + public void deserializeNBT(CompoundTag compoundTag) { + ListTag listOfPairsTag = (ListTag)compoundTag.get("activationPath"); + activationPath = new LinkedList<>(); + + listOfPairsTag.forEach(pairTag -> { + if(pairTag instanceof CompoundTag pairTagCompound) { + Pair> stepPair; + Form formActivated = FormDataRegistry.getFormByName(pairTagCompound.getString("form")); + ListTag modifiersListTag = (ListTag)pairTagCompound.get("modifiers"); + + List modifierData = new ArrayList<>(); + + modifiersListTag.forEach(tag -> modifierData.add(ModifiersRegistry.fromCompoundTag(compoundTag))); + + stepPair = Pair.of(formActivated, modifierData); + activationPath.add(stepPair); + } + }); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 91369196..c2730864 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -1,10 +1,13 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; public class RadixTree { private final Node root; private Node active; + private Form lastActivated = null; + private RadixPath path; public RadixTree(Node root) { this.root = root; @@ -29,6 +32,7 @@ public void burn() { public void start() { // branch.reset(root); setActive(root); + path = new RadixPath(); } private void setActive(Node node) { @@ -58,6 +62,11 @@ private void terminate() { } public void moveDown(Form executedForm) { + //add the last Node to the activation Path and store its ModifierData's + path.addStep(this.lastActivated, active.getModifiers().stream().map(Modifier::data).toList()); + this.lastActivated = executedForm; + + //todo remove this its just for testing if(active.getModifiers().size() > 0) active.getModifiers().forEach(modifier -> modifier.print()); if(active.children().size() == 0) return; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 237cde7f..a0caa9aa 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -4,18 +4,25 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.mojang.blaze3d.platform.InputConstants; -import net.minecraft.client.KeyboardHandler; import java.util.ArrayList; import java.util.List; public class FormDataRegistry { + private static List formTypes; + //Remember to see #InputConstants for the key names. public static void init() { + formTypes = new ArrayList<>(); List inputs = new ArrayList<>(); inputs.add(new KeyInput(InputConstants.getKey("key.mouse.right"), 0, 0, 0)); Magus.inputModule.registerInputData(inputs, Forms.STRIKE); + formTypes.add(Forms.STRIKE); + } + + public static Form getFormByName(String formName) { + return formTypes.stream().filter(form -> form.name().equals(formName)).findFirst().get(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 413adc3f..927aec2b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -1,16 +1,34 @@ package com.amuzil.omegasource.magus.skill.modifiers; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.amuzil.omegasource.magus.skill.modifiers.listeners.KeyHeldModifierListener; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.nbt.CompoundTag; + +import java.util.HashMap; +import java.util.Map; public class ModifiersRegistry { + //used to look up what instance to deserialise into from nbt + private static Map modifierDataTypes; + public static Modifier FOCUS; public static void init() { - FOCUS = new Modifier(new HeldModifierData(), new KeyHeldModifierListener(InputConstants.getKey("key.mouse.right"))); + modifierDataTypes = new HashMap<>(); + + ModifierData heldModifierData = new HeldModifierData(); + FOCUS = new Modifier(heldModifierData, new KeyHeldModifierListener(InputConstants.getKey("key.mouse.right"))); + modifierDataTypes.put(heldModifierData.getName(), heldModifierData); + } + + public static ModifierData fromCompoundTag(CompoundTag compoundTag) { + ModifierData data = modifierDataTypes.get(compoundTag.getString("dataIdentifier")); + data.deserializeNBT(compoundTag); + return data; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java index b9f66306..3167e9e1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java @@ -25,6 +25,9 @@ public boolean isDirty() { @Override public CompoundTag serializeNBT() { CompoundTag compoundTag = new CompoundTag(); + + compoundTag.putString("dataIdentifier", getName()); + return compoundTag; } } From efdc25617b66ddbec2765f7bcc8ac807004a78e4 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Thu, 9 Feb 2023 19:47:17 +0000 Subject: [PATCH 096/469] Implemented packets, started moving the radixtree to serverside only, changed modifier listener registration to be packet triggered --- .../omegasource/magus/input/InputModule.java | 20 +++++- .../magus/input/KeyboardMouseInputModule.java | 9 ++- .../magus/network/ClientPacketHandler.java | 41 ++++++++++++ .../magus/network/MagusNetwork.java | 25 +++++++ .../RegisterModifierListenersPacket.java | 53 +++++++++++++++ .../client_executed/SkillTriggeredPacket.java | 32 +++++++++ .../UnregisterModifierListenersPacket.java | 24 +++++++ .../server_executed/FormActivatedPacket.java | 38 +++++++++++ .../SendModifierDataPacket.java | 39 +++++++++++ .../server_executed/StartBendingPacket.java | 26 ++++++++ .../amuzil/omegasource/magus/radix/Node.java | 39 +++++++---- .../omegasource/magus/radix/RadixTree.java | 8 +++ .../forge/key/KeyPressCondition.java | 3 + .../skill/conditionals/ConditionBuilder.java | 6 ++ .../magus/skill/forms/FormDataRegistry.java | 15 +++-- .../skill/modifiers/ModifiersRegistry.java | 14 ++-- .../magus/skill/modifiers/api/Modifier.java | 29 +++++++- .../skill/modifiers/api/ModifierListener.java | 5 ++ .../modifiers/data/HeldModifierData.java | 13 ++++ .../listeners/KeyHeldModifierListener.java | 66 +++++++++++++------ 20 files changed, 455 insertions(+), 50 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/RegisterModifierListenersPacket.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/UnregisterModifierListenersPacket.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index e1df2fce..9b5dc187 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -4,9 +4,12 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.nbt.CompoundTag; import net.minecraftforge.client.event.InputEvent; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -14,8 +17,19 @@ public abstract class InputModule { protected final Map _formInputs = new HashMap<>(); + protected final List _modifierListeners = new ArrayList<>(); + public abstract void registerInputData(List formExecutionInputs, Form formToExecute); + public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { + listener.setupListener(treeData); + listener.register(() -> { + //todo send modifier data via packet + }); + + _modifierListeners.add(listener); + } + public static EventCondition keyToCondition(InputConstants.Key key, int actionCondition) { if (key.getType().equals(InputConstants.Type.MOUSE)) { return new EventCondition<>(InputEvent.MouseButton.class, @@ -27,5 +41,9 @@ public static EventCondition keyToCondition(InputConstants.Key key, int actio == actionCondition); } - public abstract void unregister(); + public abstract void unregisterInputs(); + + public void unregisterModifiers() { + _modifierListeners.forEach(ModifierListener::unregister); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index d79d5010..542ca9a0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -8,8 +8,6 @@ import java.util.List; import java.util.function.Consumer; -import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; -import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; import net.minecraft.client.Minecraft; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -19,6 +17,7 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer tickEventConsumer; + private Form lastActivatedForm = null; private Form activeForm = null; private int ticksSinceActivated = 0; @@ -34,9 +33,9 @@ public KeyboardMouseInputModule() { } if(ticksSinceActivated >= tickActivationThreshold) { - Data livingDataCapability = CapabilityHandler.getCapability(mc.player, CapabilityHandler.LIVING_DATA); LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); - livingDataCapability.getTree().moveDown(activeForm); + //todo send form activation packet +// new FormActivatedPacket(activeForm); lastActivatedForm = activeForm; activeForm = null; ticksSinceActivated = 0; @@ -79,7 +78,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx } @Override - public void unregister() { + public void unregisterInputs() { MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); _formInputs.forEach((condition, form) -> condition.unregister()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java new file mode 100644 index 00000000..01402f65 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java @@ -0,0 +1,41 @@ +package com.amuzil.omegasource.magus.network; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; +import com.amuzil.omegasource.magus.network.packets.client_executed.SkillTriggeredPacket; +import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +//this class is for handling packets specific to the clientside, +// otherwise any references to clientside only classes in packet handling causes us to crash. +public class ClientPacketHandler { + public static boolean handlePacket(SkillTriggeredPacket packet, Supplier ctx) { + + ctx.get().enqueueWork(() -> { + //todo handle activating a skill on the clientside + }); + + return true; + } + + public static boolean handlePacket(RegisterModifierListenersPacket packet, Supplier ctx) { + ctx.get().enqueueWork(() -> { + packet.modifierTypes.forEach(modifierType -> { + Magus.inputModule.registerModifierListener(ModifiersRegistry.fromName(modifierType).listener(), packet.treeData); + }); + }); + + return true; + } + + public static boolean handlePacket(UnregisterModifierListenersPacket packet, Supplier ctx) { + ctx.get().enqueueWork(() -> { + Magus.inputModule.unregisterModifiers(); + }); + + return true; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java index 4556b397..f448b192 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -1,12 +1,16 @@ package com.amuzil.omegasource.magus.network; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.network.packets.client_executed.SkillTriggeredPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.StartBendingPacket; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; public class MagusNetwork { private static final String PROTOCOL_VERSION = "1.0.0"; + private static int packetId = 0; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(Magus.MOD_ID, "main"), () -> PROTOCOL_VERSION, @@ -14,6 +18,27 @@ public class MagusNetwork { PROTOCOL_VERSION::equals ); + private static int nextID() { + return packetId++; + } + public static void registerMessages() { + CHANNEL.messageBuilder(FormActivatedPacket.class, nextID()) + .encoder(FormActivatedPacket::toBytes) + .decoder(FormActivatedPacket::fromBytes) + .consumerMainThread(FormActivatedPacket::handle) + .add(); + + CHANNEL.messageBuilder(SkillTriggeredPacket.class, nextID()) + .encoder(SkillTriggeredPacket::toBytes) + .decoder(SkillTriggeredPacket::fromBytes) + .consumerMainThread(SkillTriggeredPacket::handle) + .add(); + + CHANNEL.messageBuilder(StartBendingPacket.class, nextID()) + .encoder(StartBendingPacket::toBytes) + .decoder(StartBendingPacket::fromBytes) + .consumerMainThread(StartBendingPacket::handle) + .add(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/RegisterModifierListenersPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/RegisterModifierListenersPacket.java new file mode 100644 index 00000000..01521b21 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/RegisterModifierListenersPacket.java @@ -0,0 +1,53 @@ +package com.amuzil.omegasource.magus.network.packets.client_executed; + +import com.amuzil.omegasource.magus.network.ClientPacketHandler; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.StringTag; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkEvent; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; + +public class RegisterModifierListenersPacket { + public CompoundTag treeData; + public List modifierTypes; + + public RegisterModifierListenersPacket(List modifierTypes, CompoundTag treeData) { + this.modifierTypes = modifierTypes; + this.treeData = treeData; + } + + public void toBytes(FriendlyByteBuf buf) { + CompoundTag object = new CompoundTag(); + object.put("treeData", treeData); + + ListTag list = new ListTag(); + modifierTypes.forEach(modifierType -> list.add(StringTag.valueOf(modifierType))); + + object.put("modifierTypes", list); + + buf.writeNbt(object); + } + + public static RegisterModifierListenersPacket fromBytes(FriendlyByteBuf buf) { + CompoundTag object = buf.readNbt(); + + List modifierTypes = new ArrayList<>(); + + ListTag list = (ListTag)object.get("modifierTypes"); + list.forEach(tag -> { + modifierTypes.add(tag.getAsString()); + }); + + CompoundTag treeData = object.getCompound("treeData"); + + return new RegisterModifierListenersPacket(modifierTypes, treeData); + } + + public boolean handle(Supplier ctx) { + return ClientPacketHandler.handlePacket(this, ctx); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java new file mode 100644 index 00000000..28de9f4c --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java @@ -0,0 +1,32 @@ +package com.amuzil.omegasource.magus.network.packets.client_executed; + +import com.amuzil.omegasource.magus.network.ClientPacketHandler; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +public class SkillTriggeredPacket { + + private final Skill skill; + + public SkillTriggeredPacket(Skill skill) { + this.skill = skill; + } + + public void toBytes(FriendlyByteBuf buf) { + if(skill != null) { + //todo serialize skill + } + } + + public static SkillTriggeredPacket fromBytes(FriendlyByteBuf buf) { + //todo deserialise skill + return new SkillTriggeredPacket(null); + } + + public boolean handle(Supplier ctx) { + return ClientPacketHandler.handlePacket(this, ctx); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/UnregisterModifierListenersPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/UnregisterModifierListenersPacket.java new file mode 100644 index 00000000..ef351213 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/UnregisterModifierListenersPacket.java @@ -0,0 +1,24 @@ +package com.amuzil.omegasource.magus.network.packets.client_executed; + +import com.amuzil.omegasource.magus.network.ClientPacketHandler; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +public class UnregisterModifierListenersPacket { + + public UnregisterModifierListenersPacket() { + } + + public void toBytes(FriendlyByteBuf buf) { + } + + public static UnregisterModifierListenersPacket fromBytes(FriendlyByteBuf buf) { + return new UnregisterModifierListenersPacket(); + } + + public boolean handle(Supplier ctx) { + return ClientPacketHandler.handlePacket(this, ctx); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java new file mode 100644 index 00000000..96827e09 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java @@ -0,0 +1,38 @@ +package com.amuzil.omegasource.magus.network.packets.server_executed; + +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +public class FormActivatedPacket { + + private final Form form; + + public FormActivatedPacket(Form form) { + this.form = form; + } + + public void toBytes(FriendlyByteBuf buf) { + if(form != null) { + buf.writeUtf(form.name()); + } + } + + public static FormActivatedPacket fromBytes(FriendlyByteBuf buf) { + String form = buf.readUtf(); + return new FormActivatedPacket(FormDataRegistry.getFormByName(form)); + } + + public boolean handle(Supplier ctx) { + ctx.get().enqueueWork(() -> { + Player player = ctx.get().getSender(); + CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(form); + }); + return true; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java new file mode 100644 index 00000000..9a4e8232 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java @@ -0,0 +1,39 @@ +package com.amuzil.omegasource.magus.network.packets.server_executed; + +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +public class SendModifierDataPacket { + + private ModifierData modifierData; + + public SendModifierDataPacket(ModifierData modifierData) { + this.modifierData = modifierData; + } + + public void toBytes(FriendlyByteBuf buf) { + if(modifierData != null) { + buf.writeNbt(modifierData.serializeNBT()); + } + } + + public static SendModifierDataPacket fromBytes(FriendlyByteBuf buf) { + CompoundTag modifierTag = buf.readNbt(); + return new SendModifierDataPacket(ModifiersRegistry.fromCompoundTag(modifierTag)); + } + + public boolean handle(Supplier ctx) { + ctx.get().enqueueWork(() -> { + Player player = ctx.get().getSender(); + CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().addModifierData(modifierData); + }); + return true; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java new file mode 100644 index 00000000..edac81cc --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java @@ -0,0 +1,26 @@ +package com.amuzil.omegasource.magus.network.packets.server_executed; + +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +public class StartBendingPacket { + public void toBytes(FriendlyByteBuf buf) { + } + + public static StartBendingPacket fromBytes(FriendlyByteBuf buf) { + return new StartBendingPacket(); + } + + public boolean handle(Supplier ctx) { + ctx.get().enqueueWork(() -> { + Player player = ctx.get().getSender(); + CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().start(); + }); + return true; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index d2a86fa9..b1918067 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -1,8 +1,13 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; +import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.nbt.CompoundTag; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Consumer; @@ -47,8 +52,6 @@ public Map children() { public Consumer onEnter() { // todo: wrap the listener registration in a check if this is in a player or AI context. - if(modifiers.size() > 0) - registerModifierListeners(); return onEnter; } @@ -74,19 +77,31 @@ public List getModifiers() { return modifiers; } - public void registerModifierListeners() { - modifiers.forEach(this::registerModifierListener); - } + public void registerModifierListeners(Form lastActivatedForm) { + CompoundTag listenerInstanceData = new CompoundTag(); + + //here we can send information to the client to help build the Modifier Listeners appropriately. + listenerInstanceData.putString("lastFormActivated", lastActivatedForm.name()); - private void registerModifierListener(Modifier modifier) { - modifier.listener().register(() -> { - int modifierIndex = modifiers.indexOf(modifier); - Modifier existingModifier = modifiers.get(modifierIndex); - existingModifier.data().add(modifier.listener().getModifierData()); - }); + List modifierTypes = new ArrayList<>(); + modifiers.forEach(type -> modifierTypes.add(type.data().getName())); + + //todo send RegisterModifierListeners packet to register + // new Modifier listener instances based on the form used to execute this node +// new RegisterModifierListenersPacket(modifierTypes, listenerInstanceData); } public void unregisterModifierListeners() { - modifiers.forEach(modifier -> modifier.listener().unregister()); + //todo send packet to unregister modifier listeners +// new UnregisterModifierListenersPacket(); + } + + public void addModifierData(ModifierData modifierData) { + Modifier existingModifier = modifiers.stream() + .filter(modifier -> modifier.data().getName().equals(modifierData.getName())).findFirst().get(); + + ModifierData existingData = existingModifier.data(); + + existingData.add(modifierData); } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index c2730864..48c3e2da 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; public class RadixTree { private final Node root; @@ -38,6 +39,9 @@ public void start() { private void setActive(Node node) { active = node; + if(active.getModifiers().size() > 0) + active.registerModifierListeners(lastActivated); + if (active.onEnter() != null) { active.onEnter().accept(this); } @@ -86,4 +90,8 @@ public void moveDown(Form executedForm) { public void expire() { terminate(); } + + public void addModifierData(ModifierData modifierData) { + active.addModifierData(modifierData); + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index a16ddbc8..f8fc2a9d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -11,8 +11,11 @@ import org.lwjgl.glfw.GLFW; public class KeyPressCondition extends TickTimedCondition { + public InputConstants.Key key; + public KeyPressCondition(Key key, int timeout) { super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, InputModule.keyToCondition(key, GLFW.GLFW_PRESS), Result.SUCCESS, Result.FAILURE); + this.key = key; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 8fc70ec7..9210edca 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -24,6 +24,12 @@ public ConditionBuilder fromInputData(List formExecutionInputs) { return this; } + public ConditionBuilder fromInputData(InputData formExecutionInput) { + conditionList.addAll(PathBuilder.buildPathFrom(formExecutionInput)); + + return this; + } + public Condition build() { if(conditionList.size() == 0) return null; if(conditionList.size() == 1) return conditionList.get(0); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index a0caa9aa..8e9a548c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -6,23 +6,30 @@ import com.mojang.blaze3d.platform.InputConstants; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; public class FormDataRegistry { - private static List formTypes; + private static Map, Form> formTypes; //Remember to see #InputConstants for the key names. public static void init() { - formTypes = new ArrayList<>(); + formTypes = new HashMap<>(); List inputs = new ArrayList<>(); inputs.add(new KeyInput(InputConstants.getKey("key.mouse.right"), 0, 0, 0)); Magus.inputModule.registerInputData(inputs, Forms.STRIKE); - formTypes.add(Forms.STRIKE); + formTypes.put(inputs, Forms.STRIKE); } public static Form getFormByName(String formName) { - return formTypes.stream().filter(form -> form.name().equals(formName)).findFirst().get(); + return formTypes.entrySet().stream().filter(form -> form.getValue().name().equals(formName)).findFirst().get().getValue(); + } + + public static List getInputsForForm(Form formToModify) { + return formTypes.entrySet().stream().filter(form -> form.getValue().name().equals(formToModify.name())).findFirst().get().getKey(); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 927aec2b..a3f8d05b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -4,7 +4,6 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.amuzil.omegasource.magus.skill.modifiers.listeners.KeyHeldModifierListener; -import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.nbt.CompoundTag; import java.util.HashMap; @@ -12,8 +11,8 @@ public class ModifiersRegistry { - //used to look up what instance to deserialise into from nbt - private static Map modifierDataTypes; + //used to look up what instance to deserialize into from nbt + private static Map modifierDataTypes; public static Modifier FOCUS; @@ -21,14 +20,17 @@ public static void init() { modifierDataTypes = new HashMap<>(); ModifierData heldModifierData = new HeldModifierData(); - FOCUS = new Modifier(heldModifierData, new KeyHeldModifierListener(InputConstants.getKey("key.mouse.right"))); - modifierDataTypes.put(heldModifierData.getName(), heldModifierData); + FOCUS = new Modifier(heldModifierData, new KeyHeldModifierListener()); + modifierDataTypes.put(heldModifierData.getName(), FOCUS); } public static ModifierData fromCompoundTag(CompoundTag compoundTag) { - ModifierData data = modifierDataTypes.get(compoundTag.getString("dataIdentifier")); + ModifierData data = modifierDataTypes.get(compoundTag.getString("dataIdentifier")).data(); data.deserializeNBT(compoundTag); return data; } + public static Modifier fromName(String name) { + return modifierDataTypes.get(name); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java index fb179296..195f904a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java @@ -1,11 +1,36 @@ package com.amuzil.omegasource.magus.skill.modifiers.api; -public record Modifier(ModifierData data, ModifierListener listener) { +import com.amuzil.omegasource.magus.skill.forms.Form; +import net.minecraft.nbt.CompoundTag; + +import java.util.Objects; + +public final class Modifier { + private final ModifierData data; + private final ModifierListener listener; + + public Modifier(ModifierData data, ModifierListener listener) { + this.data = data; + this.listener = listener; + } + public Modifier copy() { - return new Modifier(data(), listener()); + return new Modifier(data(), listener().copy()); } public void print() { data.print(); } + + public ModifierData data() { + return data; + } + + public ModifierListener listener() { + return listener; + } + + public void setupListener(CompoundTag compoundTag) { + listener.setupListener(compoundTag); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java index b958ac83..e8884434 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.modifiers.api; +import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; import org.apache.logging.log4j.LogManager; @@ -20,6 +21,8 @@ public void unregister() { MinecraftForge.EVENT_BUS.unregister(this); } + public abstract void setupListener(CompoundTag compoundTag); + public abstract boolean shouldCollectModifierData(T event); public abstract ModifierData collectModifierDataFromEvent(T event); @@ -34,4 +37,6 @@ public void accept(T event) { onSuccess.run(); } } + + public abstract ModifierListener copy(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index 5957e27a..9a5c821a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -7,6 +7,7 @@ public class HeldModifierData extends BaseModifierData { private int duration; + private boolean currentlyHeld; public HeldModifierData() { this.duration = 0; @@ -15,6 +16,13 @@ public HeldModifierData() { public HeldModifierData(int duration) { super(); this.duration = duration; + this.currentlyHeld = false; + } + + public HeldModifierData(int duration, boolean currentlyHeld) { + super(); + this.duration = duration; + this.currentlyHeld = currentlyHeld; } @Override @@ -27,6 +35,7 @@ public CompoundTag serializeNBT() { CompoundTag compoundTag = super.serializeNBT(); compoundTag.putInt("duration", duration); + compoundTag.putBoolean("currentlyHeld", currentlyHeld); return compoundTag; } @@ -34,6 +43,7 @@ public CompoundTag serializeNBT() { @Override public void deserializeNBT(CompoundTag compoundTag) { this.duration = compoundTag.getInt("duration"); + this.currentlyHeld = compoundTag.getBoolean("currentlyHeld"); } //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking @@ -41,15 +51,18 @@ public void deserializeNBT(CompoundTag compoundTag) { protected void mergeFields(ModifierData modifierData) { HeldModifierData heldModifierData = (HeldModifierData) modifierData; this.duration += heldModifierData.duration; + this.currentlyHeld = heldModifierData.currentlyHeld; } @Override public void reset() { this.duration = 0; + this.currentlyHeld = false; } @Override public void print() { LogManager.getLogger().info("HeldModifierData duration: " + duration); + LogManager.getLogger().info("HeldModifierData currentlyHeld: " + currentlyHeld); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 4e297624..05fd1a9e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -1,30 +1,61 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.nbt.CompoundTag; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import org.lwjgl.glfw.GLFW; +import java.util.List; import java.util.function.Consumer; public class KeyHeldModifierListener extends ModifierListener { - private final Consumer keyInputListener; - private final Consumer clientTickListener; + private Consumer keyInputListener; + private Consumer clientTickListener; private int currentHolding; + private boolean wasHeld = false; private boolean isHeld = false; - public KeyHeldModifierListener(InputConstants.Key key) { + public KeyHeldModifierListener() { this.modifierData = new HeldModifierData(); + } + + @Override + public void register(Runnable onSuccess) { + super.register(onSuccess); + MinecraftForge.EVENT_BUS.addListener(keyInputListener); + MinecraftForge.EVENT_BUS.addListener(clientTickListener); + } + + @Override + public void unregister() { + super.unregister(); + MinecraftForge.EVENT_BUS.unregister(keyInputListener); + MinecraftForge.EVENT_BUS.unregister(clientTickListener); + } + + @Override + public void setupListener(CompoundTag compoundTag) { + Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); + List formConditions = FormDataRegistry.getInputsForForm(formToModify); + + InputConstants.Key keyToHold = ((KeyPressCondition)new ConditionBuilder().fromInputData(formConditions.get(formConditions.size() - 1)).build()).key; this.keyInputListener = event -> { - if (event.getButton() == key.getValue()) { + if (event.getButton() == keyToHold.getValue()) { if (event.getAction() == GLFW.GLFW_PRESS) { this.isHeld = true; + this.wasHeld = true; this.currentHolding = 0; } else if (event.getAction() == GLFW.GLFW_RELEASE) { this.isHeld = false; @@ -41,33 +72,28 @@ public KeyHeldModifierListener(InputConstants.Key key) { }; } - @Override - public void register(Runnable onSuccess) { - super.register(onSuccess); - MinecraftForge.EVENT_BUS.addListener(keyInputListener); - MinecraftForge.EVENT_BUS.addListener(clientTickListener); - } - - @Override - public void unregister() { - super.unregister(); - MinecraftForge.EVENT_BUS.unregister(keyInputListener); - MinecraftForge.EVENT_BUS.unregister(clientTickListener); - } - @Override public boolean shouldCollectModifierData(TickEvent event) { if(isHeld && currentHolding > 0) { return true; } + //so that we send a packet to say we've stopped holding(for continuous cast ability support) + if(!this.isHeld && this.wasHeld) { + this.wasHeld = false; + return true; + } return false; } @Override public ModifierData collectModifierDataFromEvent(TickEvent event) { - //todo check how often this is called. - HeldModifierData data = new HeldModifierData(currentHolding); + HeldModifierData data = new HeldModifierData(currentHolding, isHeld); this.currentHolding = 0; return data; } + + @Override + public ModifierListener copy() { + return new KeyHeldModifierListener(); + } } From b19d9d944c02282bef9b377010dd9306b69c1dbb Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Thu, 9 Feb 2023 20:11:01 +0000 Subject: [PATCH 097/469] implemented actually sending packets --- .../omegasource/magus/input/InputModule.java | 4 +++- .../magus/input/KeyboardMouseInputModule.java | 5 +++-- .../magus/network/MagusNetwork.java | 11 ++++++++++ .../amuzil/omegasource/magus/radix/Node.java | 20 ++++++------------- .../omegasource/magus/radix/RadixTree.java | 17 +++++++--------- 5 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 9b5dc187..0af14f1e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.input; +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -24,7 +26,7 @@ public abstract class InputModule { public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { listener.setupListener(treeData); listener.register(() -> { - //todo send modifier data via packet + MagusNetwork.sendToServer(new SendModifierDataPacket(listener.getModifierData())); }); _modifierListeners.add(listener); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 542ca9a0..76569b02 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.input; +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -34,8 +36,7 @@ public KeyboardMouseInputModule() { if(ticksSinceActivated >= tickActivationThreshold) { LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); - //todo send form activation packet -// new FormActivatedPacket(activeForm); + MagusNetwork.sendToServer(new FormActivatedPacket(activeForm)); lastActivatedForm = activeForm; activeForm = null; ticksSinceActivated = 0; diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java index f448b192..66bafbc7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -5,6 +5,8 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.StartBendingPacket; import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; +import net.minecraftforge.network.NetworkDirection; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; @@ -41,4 +43,13 @@ public static void registerMessages() { .consumerMainThread(StartBendingPacket::handle) .add(); } + + + public static void sendToClient(Object packet, ServerPlayer player) { + CHANNEL.sendTo(packet, player.connection.connection, NetworkDirection.PLAY_TO_CLIENT); + } + + public static void sendToServer(Object packet) { + CHANNEL.sendToServer(packet); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index b1918067..a6874cce 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -1,11 +1,13 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import java.util.ArrayList; import java.util.List; @@ -51,17 +53,10 @@ public Map children() { } public Consumer onEnter() { - // todo: wrap the listener registration in a check if this is in a player or AI context. return onEnter; } public Consumer onLeave() { - // todo: wrap the listener unregistration in a check if this is in a player or AI context. - if(modifiers.size() > 0) { - modifiers.forEach(modifier -> modifier.print()); - - unregisterModifierListeners(); - } return onLeave; } @@ -77,7 +72,7 @@ public List getModifiers() { return modifiers; } - public void registerModifierListeners(Form lastActivatedForm) { + public void registerModifierListeners(Form lastActivatedForm, ServerPlayer player) { CompoundTag listenerInstanceData = new CompoundTag(); //here we can send information to the client to help build the Modifier Listeners appropriately. @@ -86,14 +81,11 @@ public void registerModifierListeners(Form lastActivatedForm) { List modifierTypes = new ArrayList<>(); modifiers.forEach(type -> modifierTypes.add(type.data().getName())); - //todo send RegisterModifierListeners packet to register - // new Modifier listener instances based on the form used to execute this node -// new RegisterModifierListenersPacket(modifierTypes, listenerInstanceData); + MagusNetwork.sendToClient(new RegisterModifierListenersPacket(modifierTypes, listenerInstanceData), player); } - public void unregisterModifierListeners() { - //todo send packet to unregister modifier listeners -// new UnregisterModifierListenersPacket(); + public void unregisterModifierListeners(ServerPlayer player) { + MagusNetwork.sendToClient(new UnregisterModifierListenersPacket(), player); } public void addModifierData(ModifierData modifierData) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 48c3e2da..5f8b93b8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -3,35 +3,29 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.server.level.ServerPlayer; public class RadixTree { private final Node root; private Node active; private Form lastActivated = null; private RadixPath path; + private ServerPlayer player; public RadixTree(Node root) { this.root = root; -// this.branch = new Branch(); this.active = root; } -// public boolean registerLeaf(Class> type, Leaf leaf) { -// return branch.registerLeaf(type, leaf); -// } - public void burn() { if (active.terminateCondition() != null) { active.terminateCondition().unregister(); } active = null; - -// branch.burn(); } public void start() { -// branch.reset(root); setActive(root); path = new RadixPath(); } @@ -40,7 +34,7 @@ private void setActive(Node node) { active = node; if(active.getModifiers().size() > 0) - active.registerModifierListeners(lastActivated); + active.registerModifierListeners(lastActivated, player); if (active.onEnter() != null) { active.onEnter().accept(this); @@ -71,7 +65,10 @@ public void moveDown(Form executedForm) { this.lastActivated = executedForm; //todo remove this its just for testing - if(active.getModifiers().size() > 0) active.getModifiers().forEach(modifier -> modifier.print()); + if(active.getModifiers().size() > 0) { + active.getModifiers().forEach(modifier -> modifier.print()); + active.unregisterModifierListeners(player); + } if(active.children().size() == 0) return; From 53f506892292fb56a4793cbf8119ffca0f6e3433 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Fri, 10 Feb 2023 03:44:02 +0000 Subject: [PATCH 098/469] fixed modifier data --- .../omegasource/magus/input/InputModule.java | 22 +++++++++- .../magus/input/KeyboardMouseInputModule.java | 33 ++++++++++----- .../magus/network/ClientPacketHandler.java | 4 ++ .../magus/network/MagusNetwork.java | 21 ++++++++++ .../SendModifierDataPacket.java | 21 +++++++--- .../amuzil/omegasource/magus/radix/Node.java | 41 ++++++++++++++----- .../omegasource/magus/radix/RadixTree.java | 23 +++++++---- .../magus/server/ServerEvents.java | 36 ++++++++++++++++ .../skill/modifiers/ModifiersRegistry.java | 4 +- .../magus/skill/modifiers/api/Modifier.java | 8 +++- .../skill/modifiers/api/ModifierData.java | 1 + .../modifiers/data/HeldModifierData.java | 17 ++++---- .../listeners/KeyHeldModifierListener.java | 19 ++++++--- .../skill/util/capability/entity/Data.java | 2 +- .../entity/LivingDataCapability.java | 4 -- 15 files changed, 198 insertions(+), 58 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 0af14f1e..65695b4d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -6,10 +6,12 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.client.event.InputEvent; +import org.apache.logging.log4j.LogManager; import java.util.ArrayList; import java.util.HashMap; @@ -18,20 +20,32 @@ public abstract class InputModule { protected final Map _formInputs = new HashMap<>(); - protected final List _modifierListeners = new ArrayList<>(); + protected final Map modifierQueue = new HashMap<>(); + protected Form lastActivatedForm = null; public abstract void registerInputData(List formExecutionInputs, Form formToExecute); public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { listener.setupListener(treeData); listener.register(() -> { - MagusNetwork.sendToServer(new SendModifierDataPacket(listener.getModifierData())); + LogManager.getLogger().info("QUEUEING MODIFIER DATA"); + queueModifierData(listener.getModifierData()); }); _modifierListeners.add(listener); } + public void queueModifierData(ModifierData data) { + if(modifierQueue.get(data.getName()) != null) { + ModifierData existingData = modifierQueue.get(data.getName()); + existingData.add(data); + modifierQueue.put(data.getName(), existingData); + } else { + modifierQueue.put(data.getName(), data); + } + } + public static EventCondition keyToCondition(InputConstants.Key key, int actionCondition) { if (key.getType().equals(InputConstants.Type.MOUSE)) { return new EventCondition<>(InputEvent.MouseButton.class, @@ -43,6 +57,10 @@ public static EventCondition keyToCondition(InputConstants.Key key, int actio == actionCondition); } + public void resetLastActivated() { + this.lastActivatedForm = null; + } + public abstract void unregisterInputs(); public void unregisterModifiers() { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 76569b02..20d76a02 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -19,32 +20,44 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer tickEventConsumer; - - private Form lastActivatedForm = null; private Form activeForm = null; private int ticksSinceActivated = 0; + private int ticksSinceModifiersSent = 0; - //todo make this threshold configurable + //todo make these thresholds configurable private final int tickActivationThreshold = 4; + private final int modifierTickThreshold = 10; Minecraft mc = Minecraft.getInstance(); public KeyboardMouseInputModule() { tickEventConsumer = tickEvent -> { + ticksSinceModifiersSent++; + if(ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { + sendModifierData(); + } if(activeForm != null) { ticksSinceActivated++; - } + if(ticksSinceActivated >= tickActivationThreshold) { + LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); + MagusNetwork.sendToServer(new FormActivatedPacket(activeForm)); + lastActivatedForm = activeForm; + activeForm = null; + ticksSinceActivated = 0; + } + - if(ticksSinceActivated >= tickActivationThreshold) { - LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); - MagusNetwork.sendToServer(new FormActivatedPacket(activeForm)); - lastActivatedForm = activeForm; - activeForm = null; - ticksSinceActivated = 0; } }; MinecraftForge.EVENT_BUS.addListener(tickEventConsumer); } + private void sendModifierData() { + LogManager.getLogger().info("SENDING MODIFIER DATA"); + MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); + ticksSinceModifiersSent = 0; + modifierQueue.clear(); + } + @Override public void registerInputData(List formExecutionInputs, Form formToExecute) { //generate condition from InputData. diff --git a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java index 01402f65..3cd63c05 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java @@ -6,6 +6,7 @@ import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import net.minecraftforge.network.NetworkEvent; +import org.apache.logging.log4j.LogManager; import java.util.function.Supplier; @@ -22,8 +23,10 @@ public static boolean handlePacket(SkillTriggeredPacket packet, Supplier ctx) { + LogManager.getLogger().info("REGISTERING MODIFIERS"); ctx.get().enqueueWork(() -> { packet.modifierTypes.forEach(modifierType -> { + LogManager.getLogger().info("REGISTERING MODIFIER: " + modifierType); Magus.inputModule.registerModifierListener(ModifiersRegistry.fromName(modifierType).listener(), packet.treeData); }); }); @@ -33,6 +36,7 @@ public static boolean handlePacket(RegisterModifierListenersPacket packet, Suppl public static boolean handlePacket(UnregisterModifierListenersPacket packet, Supplier ctx) { ctx.get().enqueueWork(() -> { + LogManager.getLogger().info("UNREGISTERING MODIFIERS"); Magus.inputModule.unregisterModifiers(); }); diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java index 66bafbc7..dfa626fe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -1,8 +1,11 @@ package com.amuzil.omegasource.magus.network; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.SkillTriggeredPacket; +import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.StartBendingPacket; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; @@ -42,6 +45,24 @@ public static void registerMessages() { .decoder(StartBendingPacket::fromBytes) .consumerMainThread(StartBendingPacket::handle) .add(); + + CHANNEL.messageBuilder(SendModifierDataPacket.class, nextID()) + .encoder(SendModifierDataPacket::toBytes) + .decoder(SendModifierDataPacket::fromBytes) + .consumerMainThread(SendModifierDataPacket::handle) + .add(); + + CHANNEL.messageBuilder(RegisterModifierListenersPacket.class, nextID()) + .encoder(RegisterModifierListenersPacket::toBytes) + .decoder(RegisterModifierListenersPacket::fromBytes) + .consumerMainThread(RegisterModifierListenersPacket::handle) + .add(); + + CHANNEL.messageBuilder(UnregisterModifierListenersPacket.class, nextID()) + .encoder(UnregisterModifierListenersPacket::toBytes) + .decoder(UnregisterModifierListenersPacket::fromBytes) + .consumerMainThread(UnregisterModifierListenersPacket::handle) + .add(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java index 9a4e8232..806da5d5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java @@ -4,29 +4,40 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; +import org.apache.logging.log4j.LogManager; +import java.util.ArrayList; +import java.util.List; import java.util.function.Supplier; public class SendModifierDataPacket { - private ModifierData modifierData; + private List modifierData; - public SendModifierDataPacket(ModifierData modifierData) { + public SendModifierDataPacket(List modifierData) { this.modifierData = modifierData; } public void toBytes(FriendlyByteBuf buf) { - if(modifierData != null) { - buf.writeNbt(modifierData.serializeNBT()); + CompoundTag data = new CompoundTag(); + ListTag listTag = new ListTag(); + if(modifierData != null && modifierData.size() > 0) { + modifierData.forEach(modifier -> listTag.add(modifier.serializeNBT())); } + data.put("modifiers", listTag); + buf.writeNbt(data); } public static SendModifierDataPacket fromBytes(FriendlyByteBuf buf) { CompoundTag modifierTag = buf.readNbt(); - return new SendModifierDataPacket(ModifiersRegistry.fromCompoundTag(modifierTag)); + ListTag listTag = (ListTag) modifierTag.get("modifiers"); + List modifiers = new ArrayList<>(); + listTag.forEach(tag -> modifiers.add(ModifiersRegistry.fromCompoundTag((CompoundTag) tag))); + return new SendModifierDataPacket(modifiers); } public boolean handle(Supplier ctx) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index a6874cce..84455238 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -8,8 +8,10 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerPlayer; +import org.apache.logging.log4j.LogManager; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.function.Consumer; @@ -23,7 +25,7 @@ public class Node { private final Consumer onLeave; private final Consumer onTerminate; private final Condition terminateCondition; - private final List modifiers; + private final List modifiers; /** * @param children If a condition is fulfilled, the active node moves down to the mapped child node @@ -45,7 +47,7 @@ public Node( this.onLeave = onLeave; this.onTerminate = onTerminate; this.terminateCondition = terminateCondition; - this.modifiers = modifiers; + this.modifiers = Collections.synchronizedList(modifiers.stream().map(Modifier::data).toList()); } public Map children() { @@ -68,7 +70,7 @@ public Condition terminateCondition() { return terminateCondition; } - public List getModifiers() { + public synchronized List getModifiers() { return modifiers; } @@ -79,7 +81,10 @@ public void registerModifierListeners(Form lastActivatedForm, ServerPlayer playe listenerInstanceData.putString("lastFormActivated", lastActivatedForm.name()); List modifierTypes = new ArrayList<>(); - modifiers.forEach(type -> modifierTypes.add(type.data().getName())); + List modifiers = getModifiers(); + synchronized (modifiers) { + modifiers.forEach(type -> modifierTypes.add(type.getName())); + } MagusNetwork.sendToClient(new RegisterModifierListenersPacket(modifierTypes, listenerInstanceData), player); } @@ -88,12 +93,26 @@ public void unregisterModifierListeners(ServerPlayer player) { MagusNetwork.sendToClient(new UnregisterModifierListenersPacket(), player); } - public void addModifierData(ModifierData modifierData) { - Modifier existingModifier = modifiers.stream() - .filter(modifier -> modifier.data().getName().equals(modifierData.getName())).findFirst().get(); - - ModifierData existingData = existingModifier.data(); - - existingData.add(modifierData); + public synchronized void addModifierData(List modifierData) { + List existingModifiers = getModifiers(); + synchronized(existingModifiers) { + modifierData.forEach(data -> { + LogManager.getLogger().info("addModifierData: newData: "); + data.print(); + int existingModifierIndex = existingModifiers.indexOf(existingModifiers.stream().filter(mod -> mod.getName().equals(data.getName())).findFirst().get()); + LogManager.getLogger().info("addModifierData: existingModifierIndex: " + existingModifierIndex); + ModifierData currentModifier = existingModifiers.get(existingModifierIndex); + + LogManager.getLogger().info("addModifierData: oldData: "); + currentModifier.print(); + currentModifier.add(data); + LogManager.getLogger().info("addModifierData: after adding together: "); + currentModifier.print(); + existingModifiers.add(existingModifierIndex, currentModifier); + + LogManager.getLogger().info("addModifierData: after setting on the node: "); + existingModifiers.get(existingModifierIndex).print(); + }); + } } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 5f8b93b8..4ec61835 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -4,13 +4,16 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; + +import java.util.List; public class RadixTree { private final Node root; private Node active; private Form lastActivated = null; private RadixPath path; - private ServerPlayer player; + private Entity owner; public RadixTree(Node root) { this.root = root; @@ -33,7 +36,7 @@ public void start() { private void setActive(Node node) { active = node; - if(active.getModifiers().size() > 0) + if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) active.registerModifierListeners(lastActivated, player); if (active.onEnter() != null) { @@ -61,13 +64,15 @@ private void terminate() { public void moveDown(Form executedForm) { //add the last Node to the activation Path and store its ModifierData's - path.addStep(this.lastActivated, active.getModifiers().stream().map(Modifier::data).toList()); + if (this.lastActivated != null && active != null) { + path.addStep(this.lastActivated, active.getModifiers()); + } this.lastActivated = executedForm; - //todo remove this its just for testing - if(active.getModifiers().size() > 0) { - active.getModifiers().forEach(modifier -> modifier.print()); + if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) { active.unregisterModifierListeners(player); + //todo remove this its just for testing + active.getModifiers().forEach(modifier -> modifier.print()); } if(active.children().size() == 0) return; @@ -88,7 +93,11 @@ public void expire() { terminate(); } - public void addModifierData(ModifierData modifierData) { + public void addModifierData(List modifierData) { active.addModifierData(modifierData); } + + public void setOwner(Entity entity) { + this.owner = entity; + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java new file mode 100644 index 00000000..19281dbd --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -0,0 +1,36 @@ +package com.amuzil.omegasource.magus.server; + +import com.amuzil.omegasource.magus.radix.Node; +import com.amuzil.omegasource.magus.radix.NodeBuilder; +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.forms.Forms; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import com.amuzil.omegasource.magus.skill.util.capability.entity.LivingDataCapability; +import net.minecraftforge.event.entity.EntityJoinLevelEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber +public class ServerEvents { + + @SubscribeEvent + public static void onEntityJoinLevel(EntityJoinLevelEvent event) { + if(!event.getLevel().isClientSide()) { + Data capability = CapabilityHandler.getCapability(event.getEntity(), CapabilityHandler.LIVING_DATA); + if(capability != null) { + // initialise the radix tree and set the player as an instance property for sending packets. + + Node secondNode = NodeBuilder.middle().addModifier(ModifiersRegistry.FOCUS.copy()).build(); + RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.STRIKE, secondNode).build()); + tree.setOwner(event.getEntity()); + capability.setTree(tree); + + //todo this is not be where we should call start, but for now it'll stop us crashing until + // we have a key for activating the bending state + capability.getTree().start(); + } + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index a3f8d05b..96e6311b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -25,12 +25,12 @@ public static void init() { } public static ModifierData fromCompoundTag(CompoundTag compoundTag) { - ModifierData data = modifierDataTypes.get(compoundTag.getString("dataIdentifier")).data(); + ModifierData data = modifierDataTypes.get(compoundTag.getString("dataIdentifier")).copy().data(); data.deserializeNBT(compoundTag); return data; } public static Modifier fromName(String name) { - return modifierDataTypes.get(name); + return modifierDataTypes.get(name).copy(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java index 195f904a..618567d3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java @@ -6,7 +6,7 @@ import java.util.Objects; public final class Modifier { - private final ModifierData data; + private ModifierData data; private final ModifierListener listener; public Modifier(ModifierData data, ModifierListener listener) { @@ -15,7 +15,7 @@ public Modifier(ModifierData data, ModifierListener listener) { } public Modifier copy() { - return new Modifier(data(), listener().copy()); + return new Modifier(data().copy(), listener().copy()); } public void print() { @@ -26,6 +26,10 @@ public ModifierData data() { return data; } + public void setData(ModifierData data) { + this.data = data; + } + public ModifierListener listener() { return listener; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java index f77ac650..5459712e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java @@ -27,4 +27,5 @@ public void add(ModifierData modifierData) { public abstract void print(); public abstract void reset(); + public abstract ModifierData copy(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index 9a5c821a..d9cb1c4a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -13,12 +13,6 @@ public HeldModifierData() { this.duration = 0; } - public HeldModifierData(int duration) { - super(); - this.duration = duration; - this.currentlyHeld = false; - } - public HeldModifierData(int duration, boolean currentlyHeld) { super(); this.duration = duration; @@ -40,6 +34,11 @@ public CompoundTag serializeNBT() { return compoundTag; } + @Override + public HeldModifierData copy() { + return new HeldModifierData(); + } + @Override public void deserializeNBT(CompoundTag compoundTag) { this.duration = compoundTag.getInt("duration"); @@ -50,8 +49,10 @@ public void deserializeNBT(CompoundTag compoundTag) { @Override protected void mergeFields(ModifierData modifierData) { HeldModifierData heldModifierData = (HeldModifierData) modifierData; - this.duration += heldModifierData.duration; - this.currentlyHeld = heldModifierData.currentlyHeld; + if(!this.currentlyHeld) { + this.duration = this.duration + heldModifierData.duration; + this.currentlyHeld = heldModifierData.currentlyHeld; + } } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 05fd1a9e..476d7fd6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -9,10 +10,12 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; +import org.apache.logging.log4j.LogManager; import org.lwjgl.glfw.GLFW; import java.util.List; @@ -23,8 +26,8 @@ public class KeyHeldModifierListener extends ModifierListener { private Consumer keyInputListener; private Consumer clientTickListener; private int currentHolding; - private boolean wasHeld = false; - private boolean isHeld = false; + private boolean isHeld = true; + private boolean wasHeld = true; public KeyHeldModifierListener() { this.modifierData = new HeldModifierData(); @@ -53,12 +56,15 @@ public void setupListener(CompoundTag compoundTag) { this.keyInputListener = event -> { if (event.getButton() == keyToHold.getValue()) { - if (event.getAction() == GLFW.GLFW_PRESS) { + if (event.getAction() == GLFW.GLFW_REPEAT) { + this.isHeld = true; + } else if (event.getAction() == GLFW.GLFW_PRESS) { this.isHeld = true; - this.wasHeld = true; this.currentHolding = 0; - } else if (event.getAction() == GLFW.GLFW_RELEASE) { - this.isHeld = false; + } else { + if (event.getAction() == GLFW.GLFW_RELEASE) { + this.isHeld = false; + } } } }; @@ -80,6 +86,7 @@ public boolean shouldCollectModifierData(TickEvent event) { //so that we send a packet to say we've stopped holding(for continuous cast ability support) if(!this.isHeld && this.wasHeld) { this.wasHeld = false; + Magus.inputModule.resetLastActivated(); return true; } return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java index 693a9f4b..d79378b4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java @@ -23,5 +23,5 @@ public interface Data extends INBTSerializable { RadixTree getTree(); - + void setTree(RadixTree tree); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java index a5240e56..5395091e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -58,11 +58,7 @@ public LivingDataCapabilityImp() { //TODO: Data generation methods for each skill fillCategories(); fillSkills(); - Node secondNode = NodeBuilder.middle().addModifier(ModifiersRegistry.FOCUS.copy()).build(); - tree = new RadixTree(NodeBuilder.root().addChild(Forms.STRIKE, secondNode).build()); - //todo this should probably not be where we call start, but for now it'll stop us crashing - tree.start(); markDirty(); } From ab9c4bcd3fd89d47f111dff2b71fad3e16cbb35d Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Fri, 10 Feb 2023 03:46:09 +0000 Subject: [PATCH 099/469] flip flag --- .../magus/skill/modifiers/data/HeldModifierData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index d9cb1c4a..9ba83902 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -58,7 +58,7 @@ protected void mergeFields(ModifierData modifierData) { @Override public void reset() { this.duration = 0; - this.currentlyHeld = false; + this.currentlyHeld = true; } @Override From 57341f008aec503559833a00e63b665a9da9a613 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Fri, 10 Feb 2023 16:44:57 +0000 Subject: [PATCH 100/469] Reworked key conditions to use a static registry of held keys for lookup across conditions --- .../magus/input/KeyboardMouseInputModule.java | 65 ++++++++++++++++++- .../minecraft/forge/key/KeyHoldCondition.java | 29 ++------- .../forge/key/KeyPressCondition.java | 63 +++++++++++++----- .../magus/radix/path/PathBuilder.java | 4 +- .../modifiers/data/HeldModifierData.java | 8 +-- .../listeners/KeyHeldModifierListener.java | 33 +++------- 6 files changed, 127 insertions(+), 75 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 20d76a02..024aebbe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -8,10 +8,14 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; +import com.amuzil.omegasource.magus.skill.util.data.KeyboardData; +import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; +import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import org.apache.logging.log4j.LogManager; @@ -19,6 +23,9 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer tickEventConsumer; + private final List glfwKeysDown; + private final Consumer keyboardListener; + private final Consumer mouseListener; private Form activeForm = null; private int ticksSinceActivated = 0; @@ -30,6 +37,54 @@ public class KeyboardMouseInputModule extends InputModule { Minecraft mc = Minecraft.getInstance(); public KeyboardMouseInputModule() { + this.glfwKeysDown = new ArrayList<>(); + + this.keyboardListener = keyboardEvent -> { + int keyPressed = keyboardEvent.getKey(); + if(!KeyboardData.ignore(keyPressed)) { + switch (keyboardEvent.getAction()) { + case InputConstants.PRESS -> { + LogManager.getLogger().info("Key Pressed: " + keyPressed); + glfwKeysDown.add(keyPressed); + } + case InputConstants.REPEAT -> { + if (!glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.add(keyPressed); + } + } + case InputConstants.RELEASE -> { + if (glfwKeysDown.contains(keyPressed)) { + LogManager.getLogger().info("Key Released: " + keyPressed); + glfwKeysDown.remove(glfwKeysDown.indexOf(keyPressed)); + } + } + } + } + }; + + this.mouseListener = mouseEvent -> { + int keyPressed = mouseEvent.getButton(); + if(!KeyboardData.ignore(keyPressed)) { + switch (mouseEvent.getAction()) { + case InputConstants.PRESS -> { + LogManager.getLogger().info("Key Pressed: " + keyPressed); + glfwKeysDown.add(keyPressed); + } + case InputConstants.REPEAT -> { + if (!glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.add(keyPressed); + } + } + case InputConstants.RELEASE -> { + LogManager.getLogger().info("Key Released: " + keyPressed); + if (glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.remove(keyPressed); + } + } + } + } + }; + tickEventConsumer = tickEvent -> { ticksSinceModifiersSent++; if(ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { @@ -44,10 +99,10 @@ public KeyboardMouseInputModule() { activeForm = null; ticksSinceActivated = 0; } - - } }; + MinecraftForge.EVENT_BUS.addListener(keyboardListener); + MinecraftForge.EVENT_BUS.addListener(mouseListener); MinecraftForge.EVENT_BUS.addListener(tickEventConsumer); } @@ -93,7 +148,13 @@ public void registerInputData(List formExecutionInputs, Form formToEx @Override public void unregisterInputs() { + MinecraftForge.EVENT_BUS.unregister(keyboardListener); + MinecraftForge.EVENT_BUS.unregister(mouseListener); MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); _formInputs.forEach((condition, form) -> condition.unregister()); } + + public boolean keyPressed(int key) { + return glfwKeysDown.contains(key); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 4bd87725..4df7ab73 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; import com.mojang.blaze3d.platform.InputConstants.Key; @@ -11,38 +13,20 @@ import java.util.function.Consumer; public class KeyHoldCondition extends Condition { - - private final Consumer keyInputListener; private final Consumer clientTickListener; - - private final int currentTotal; - private boolean isHolding; + private int currentTotal; private int currentHolding; - public KeyHoldCondition(Key key, int duration, int timeout) { + public KeyHoldCondition(int key, int duration, int timeout) { RadixUtil.assertTrue(duration >= 0, "duration must be >= 0"); RadixUtil.assertTrue(timeout >= 0, "timeout must be >= 0"); this.currentTotal = 0; - this.isHolding = false; this.currentHolding = 0; - this.keyInputListener = event -> { - if (event.getKey() == key.getValue()) { - if (event.getAction() == GLFW.GLFW_PRESS) { - this.isHolding = true; - this.currentHolding = 0; - } else if (event.getAction() == GLFW.GLFW_RELEASE) { - this.isHolding = false; - } - } else { - this.onFailure.run(); - } - }; - this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START) { - if (this.isHolding) { + if (((KeyboardMouseInputModule) Magus.inputModule).keyPressed(key)) { this.currentHolding++; } if (this.currentHolding >= duration) { @@ -52,6 +36,7 @@ public KeyHoldCondition(Key key, int duration, int timeout) { if (this.currentTotal >= timeout) { this.onFailure.run(); } + this.currentTotal++; } }; } @@ -59,13 +44,11 @@ public KeyHoldCondition(Key key, int duration, int timeout) { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); - MinecraftForge.EVENT_BUS.addListener(keyInputListener); MinecraftForge.EVENT_BUS.addListener(clientTickListener); } @Override public void unregister() { - MinecraftForge.EVENT_BUS.unregister(keyInputListener); MinecraftForge.EVENT_BUS.unregister(clientTickListener); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index f8fc2a9d..af8b1d61 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -1,21 +1,48 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; -import com.amuzil.omegasource.magus.input.InputModule; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; -import com.mojang.blaze3d.platform.InputConstants; -import com.mojang.blaze3d.platform.InputConstants.Key; -import net.minecraftforge.client.event.InputEvent; -import net.minecraftforge.event.TickEvent.Phase; -import net.minecraftforge.event.TickEvent.Type; -import org.lwjgl.glfw.GLFW; - -public class KeyPressCondition extends TickTimedCondition { - public InputConstants.Key key; - - public KeyPressCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, InputModule.keyToCondition(key, - GLFW.GLFW_PRESS), Result.SUCCESS, Result.FAILURE); - this.key = key; - } +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.radix.Condition; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.fml.LogicalSide; + +import java.util.function.Consumer; + +public class KeyPressCondition extends Condition { + private final Consumer clientTickListener; + private int current; + private final int key; + + public KeyPressCondition(int key, int timeout) { + this.key = key; + + this.clientTickListener = event -> { + if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { + if(((KeyboardMouseInputModule)Magus.inputModule).keyPressed(key)) { + this.onSuccess.run(); + } else if(current >= timeout) { + this.onFailure.run(); + } else { + current++; + } + } + }; + } + + public int getKey() { + return key; + } + + @Override + public void register(Runnable onSuccess, Runnable onFailure) { + super.register(onSuccess, onFailure); + MinecraftForge.EVENT_BUS.addListener(clientTickListener); + } + + @Override + public void unregister() { + super.unregister(); + MinecraftForge.EVENT_BUS.unregister(clientTickListener); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 0dc47dfa..68fa959d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -31,8 +31,8 @@ public class PathBuilder { // Any time less than this is just a key press. // TODO: Adjust timeout to be per node. conditions.add(keyInput.held() > HELD_THRESHOLD - ? new KeyHoldCondition(keyInput.key(), keyInput.held(), TIMEOUT_THRESHOLD) - : new KeyPressCondition(keyInput.key(), TIMEOUT_THRESHOLD) + ? new KeyHoldCondition(keyInput.key().getValue(), keyInput.held(), TIMEOUT_THRESHOLD) + : new KeyPressCondition(keyInput.key().getValue(), TIMEOUT_THRESHOLD) ); if (keyInput.minDelay() > 0) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index 9ba83902..f931b480 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -49,16 +49,14 @@ public void deserializeNBT(CompoundTag compoundTag) { @Override protected void mergeFields(ModifierData modifierData) { HeldModifierData heldModifierData = (HeldModifierData) modifierData; - if(!this.currentlyHeld) { - this.duration = this.duration + heldModifierData.duration; - this.currentlyHeld = heldModifierData.currentlyHeld; - } + this.duration = this.duration + heldModifierData.duration; + this.currentlyHeld = heldModifierData.currentlyHeld; } @Override public void reset() { this.duration = 0; - this.currentlyHeld = true; + this.currentlyHeld = false; } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 476d7fd6..7898c4b3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -9,21 +10,14 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; -import com.mojang.blaze3d.platform.InputConstants; -import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; -import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; -import org.apache.logging.log4j.LogManager; -import org.lwjgl.glfw.GLFW; import java.util.List; import java.util.function.Consumer; public class KeyHeldModifierListener extends ModifierListener { - - private Consumer keyInputListener; private Consumer clientTickListener; private int currentHolding; private boolean isHeld = true; @@ -36,14 +30,12 @@ public KeyHeldModifierListener() { @Override public void register(Runnable onSuccess) { super.register(onSuccess); - MinecraftForge.EVENT_BUS.addListener(keyInputListener); MinecraftForge.EVENT_BUS.addListener(clientTickListener); } @Override public void unregister() { super.unregister(); - MinecraftForge.EVENT_BUS.unregister(keyInputListener); MinecraftForge.EVENT_BUS.unregister(clientTickListener); } @@ -52,30 +44,21 @@ public void setupListener(CompoundTag compoundTag) { Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); List formConditions = FormDataRegistry.getInputsForForm(formToModify); - InputConstants.Key keyToHold = ((KeyPressCondition)new ConditionBuilder().fromInputData(formConditions.get(formConditions.size() - 1)).build()).key; + int keyToHold = ((KeyPressCondition)new ConditionBuilder().fromInputData(formConditions.get(formConditions.size() - 1)).build()).getKey(); - this.keyInputListener = event -> { - if (event.getButton() == keyToHold.getValue()) { - if (event.getAction() == GLFW.GLFW_REPEAT) { - this.isHeld = true; - } else if (event.getAction() == GLFW.GLFW_PRESS) { + this.clientTickListener = event -> { + if (event.phase == TickEvent.ClientTickEvent.Phase.START) { + if (((KeyboardMouseInputModule)Magus.inputModule).keyPressed(keyToHold)) { this.isHeld = true; - this.currentHolding = 0; + this.currentHolding++; } else { - if (event.getAction() == GLFW.GLFW_RELEASE) { + if(this.isHeld) { + this.wasHeld = true; this.isHeld = false; } } } }; - - this.clientTickListener = event -> { - if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - if (this.isHeld) { - this.currentHolding++; - } - } - }; } @Override From d05b4dfee36b059fef9a827e50adc345ff8407b3 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Fri, 10 Feb 2023 19:17:53 +0000 Subject: [PATCH 101/469] removed excess logging --- .../magus/input/KeyboardMouseInputModule.java | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 024aebbe..ab9e272b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -41,22 +41,18 @@ public KeyboardMouseInputModule() { this.keyboardListener = keyboardEvent -> { int keyPressed = keyboardEvent.getKey(); - if(!KeyboardData.ignore(keyPressed)) { - switch (keyboardEvent.getAction()) { - case InputConstants.PRESS -> { - LogManager.getLogger().info("Key Pressed: " + keyPressed); + switch (keyboardEvent.getAction()) { + case InputConstants.PRESS -> { + glfwKeysDown.add(keyPressed); + } + case InputConstants.REPEAT -> { + if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); } - case InputConstants.REPEAT -> { - if (!glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.add(keyPressed); - } - } - case InputConstants.RELEASE -> { - if (glfwKeysDown.contains(keyPressed)) { - LogManager.getLogger().info("Key Released: " + keyPressed); - glfwKeysDown.remove(glfwKeysDown.indexOf(keyPressed)); - } + } + case InputConstants.RELEASE -> { + if (glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.remove(glfwKeysDown.indexOf(keyPressed)); } } } @@ -67,7 +63,6 @@ public KeyboardMouseInputModule() { if(!KeyboardData.ignore(keyPressed)) { switch (mouseEvent.getAction()) { case InputConstants.PRESS -> { - LogManager.getLogger().info("Key Pressed: " + keyPressed); glfwKeysDown.add(keyPressed); } case InputConstants.REPEAT -> { @@ -76,7 +71,6 @@ public KeyboardMouseInputModule() { } } case InputConstants.RELEASE -> { - LogManager.getLogger().info("Key Released: " + keyPressed); if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove(keyPressed); } From a44670e8be0c1f8a969371ca0b228c4ab8d9f4b6 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Fri, 10 Feb 2023 21:58:36 +0000 Subject: [PATCH 102/469] fixed comments on PR --- .../omegasource/magus/network/MagusNetwork.java | 5 +++-- .../magus/network/packets/api/MagusPacket.java | 12 ++++++++++++ .../RegisterModifierListenersPacket.java | 3 ++- .../client_executed/SkillTriggeredPacket.java | 3 ++- .../UnregisterModifierListenersPacket.java | 3 ++- .../packets/server_executed/FormActivatedPacket.java | 3 ++- .../server_executed/SendModifierDataPacket.java | 3 ++- .../packets/server_executed/StartBendingPacket.java | 3 ++- .../com/amuzil/omegasource/magus/radix/Node.java | 10 ++++++++-- .../amuzil/omegasource/magus/radix/RadixPath.java | 1 - .../omegasource/magus/server/ServerEvents.java | 4 +++- 11 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/api/MagusPacket.java diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java index dfa626fe..aae810b3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.network; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.SkillTriggeredPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; @@ -66,11 +67,11 @@ public static void registerMessages() { } - public static void sendToClient(Object packet, ServerPlayer player) { + public static void sendToClient(MagusPacket packet, ServerPlayer player) { CHANNEL.sendTo(packet, player.connection.connection, NetworkDirection.PLAY_TO_CLIENT); } - public static void sendToServer(Object packet) { + public static void sendToServer(MagusPacket packet) { CHANNEL.sendToServer(packet); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/api/MagusPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/api/MagusPacket.java new file mode 100644 index 00000000..34043a80 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/api/MagusPacket.java @@ -0,0 +1,12 @@ +package com.amuzil.omegasource.magus.network.packets.api; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +public interface MagusPacket { + void toBytes(FriendlyByteBuf buffer); + static MagusPacket fromBytes(FriendlyByteBuf buffer) { return null; } + boolean handle(Supplier context); +} diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/RegisterModifierListenersPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/RegisterModifierListenersPacket.java index 01521b21..03e40f51 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/RegisterModifierListenersPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/RegisterModifierListenersPacket.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.network.packets.client_executed; import com.amuzil.omegasource.magus.network.ClientPacketHandler; +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.StringTag; @@ -11,7 +12,7 @@ import java.util.List; import java.util.function.Supplier; -public class RegisterModifierListenersPacket { +public class RegisterModifierListenersPacket implements MagusPacket { public CompoundTag treeData; public List modifierTypes; diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java index 28de9f4c..22c46e31 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java @@ -1,13 +1,14 @@ package com.amuzil.omegasource.magus.network.packets.client_executed; import com.amuzil.omegasource.magus.network.ClientPacketHandler; +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.skill.skill.Skill; import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; -public class SkillTriggeredPacket { +public class SkillTriggeredPacket implements MagusPacket { private final Skill skill; diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/UnregisterModifierListenersPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/UnregisterModifierListenersPacket.java index ef351213..f056a974 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/UnregisterModifierListenersPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/UnregisterModifierListenersPacket.java @@ -1,12 +1,13 @@ package com.amuzil.omegasource.magus.network.packets.client_executed; import com.amuzil.omegasource.magus.network.ClientPacketHandler; +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; -public class UnregisterModifierListenersPacket { +public class UnregisterModifierListenersPacket implements MagusPacket { public UnregisterModifierListenersPacket() { } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java index 96827e09..241d5fcf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.network.packets.server_executed; +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -9,7 +10,7 @@ import java.util.function.Supplier; -public class FormActivatedPacket { +public class FormActivatedPacket implements MagusPacket { private final Form form; diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java index 806da5d5..2100ffa0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.network.packets.server_executed; +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -14,7 +15,7 @@ import java.util.List; import java.util.function.Supplier; -public class SendModifierDataPacket { +public class SendModifierDataPacket implements MagusPacket { private List modifierData; diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java index edac81cc..f1aff23f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.network.packets.server_executed; +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.network.FriendlyByteBuf; @@ -8,7 +9,7 @@ import java.util.function.Supplier; -public class StartBendingPacket { +public class StartBendingPacket implements MagusPacket { public void toBytes(FriendlyByteBuf buf) { } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 84455238..7c760845 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -97,19 +97,25 @@ public synchronized void addModifierData(List modifierData) { List existingModifiers = getModifiers(); synchronized(existingModifiers) { modifierData.forEach(data -> { + //Log the data being added to the Node LogManager.getLogger().info("addModifierData: newData: "); data.print(); + + //Identify the existing ModifierData record for this type. int existingModifierIndex = existingModifiers.indexOf(existingModifiers.stream().filter(mod -> mod.getName().equals(data.getName())).findFirst().get()); - LogManager.getLogger().info("addModifierData: existingModifierIndex: " + existingModifierIndex); ModifierData currentModifier = existingModifiers.get(existingModifierIndex); + //Log the data already on the Node. LogManager.getLogger().info("addModifierData: oldData: "); currentModifier.print(); - currentModifier.add(data); + + //Merge the two modifier instances and log the result. LogManager.getLogger().info("addModifierData: after adding together: "); + currentModifier.add(data); currentModifier.print(); existingModifiers.add(existingModifierIndex, currentModifier); + //Log proving the data has been updated in the node successfully. LogManager.getLogger().info("addModifierData: after setting on the node: "); existingModifiers.get(existingModifierIndex).print(); }); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java index c63c0a04..34a321c1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java @@ -56,7 +56,6 @@ public CompoundTag serializeNBT() { public void deserializeNBT(CompoundTag compoundTag) { ListTag listOfPairsTag = (ListTag)compoundTag.get("activationPath"); activationPath = new LinkedList<>(); - listOfPairsTag.forEach(pairTag -> { if(pairTag instanceof CompoundTag pairTagCompound) { Pair> stepPair; diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 19281dbd..5b68d0e5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -20,8 +20,10 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { if(!event.getLevel().isClientSide()) { Data capability = CapabilityHandler.getCapability(event.getEntity(), CapabilityHandler.LIVING_DATA); if(capability != null) { - // initialise the radix tree and set the player as an instance property for sending packets. + // initialise the radix tree and set the player as an instance property for sending packets. + //todo this is temporary manual tree construction for testing purposes. the true tree will be + // generated at runtime based on available skills for the player/entity. Node secondNode = NodeBuilder.middle().addModifier(ModifiersRegistry.FOCUS.copy()).build(); RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.STRIKE, secondNode).build()); tree.setOwner(event.getEntity()); From b8055a69b07ddda19dfb83ea380f3b0cbd20cf28 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sat, 11 Feb 2023 02:42:32 +0000 Subject: [PATCH 103/469] added multi modifier --- .../omegasource/magus/input/InputModule.java | 3 +- .../amuzil/omegasource/magus/radix/Node.java | 57 +++++++++------- .../omegasource/magus/radix/RadixTree.java | 10 +++ .../magus/server/ServerEvents.java | 5 +- .../skill/modifiers/ModifiersRegistry.java | 6 ++ .../magus/skill/modifiers/api/Modifier.java | 2 +- .../skill/modifiers/api/ModifierData.java | 2 + .../modifiers/data/BaseModifierData.java | 5 ++ .../modifiers/data/HeldModifierData.java | 9 ++- .../modifiers/data/MultiModifierData.java | 65 +++++++++++++++++++ 10 files changed, 135 insertions(+), 29 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 65695b4d..cc106846 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -1,7 +1,5 @@ package com.amuzil.omegasource.magus.input; -import com.amuzil.omegasource.magus.network.MagusNetwork; -import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -58,6 +56,7 @@ public static EventCondition keyToCondition(InputConstants.Key key, int actio } public void resetLastActivated() { + LogManager.getLogger().info("RESETTING LAST ACTIVATED FORM"); this.lastActivatedForm = null; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 7c760845..48aeb727 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -83,7 +83,9 @@ public void registerModifierListeners(Form lastActivatedForm, ServerPlayer playe List modifierTypes = new ArrayList<>(); List modifiers = getModifiers(); synchronized (modifiers) { - modifiers.forEach(type -> modifierTypes.add(type.getName())); + modifiers.stream() + .filter(modifierData -> !modifierData.serversideOnly()) + .forEach(type -> modifierTypes.add(type.getName())); } MagusNetwork.sendToClient(new RegisterModifierListenersPacket(modifierTypes, listenerInstanceData), player); @@ -93,32 +95,43 @@ public void unregisterModifierListeners(ServerPlayer player) { MagusNetwork.sendToClient(new UnregisterModifierListenersPacket(), player); } + public synchronized void addModifierData(ModifierData modifierData) { + List existingModifiers = getModifiers(); + synchronized(existingModifiers) { + addModifierData(existingModifiers, modifierData); + } + } + public synchronized void addModifierData(List modifierData) { List existingModifiers = getModifiers(); synchronized(existingModifiers) { modifierData.forEach(data -> { - //Log the data being added to the Node - LogManager.getLogger().info("addModifierData: newData: "); - data.print(); - - //Identify the existing ModifierData record for this type. - int existingModifierIndex = existingModifiers.indexOf(existingModifiers.stream().filter(mod -> mod.getName().equals(data.getName())).findFirst().get()); - ModifierData currentModifier = existingModifiers.get(existingModifierIndex); - - //Log the data already on the Node. - LogManager.getLogger().info("addModifierData: oldData: "); - currentModifier.print(); - - //Merge the two modifier instances and log the result. - LogManager.getLogger().info("addModifierData: after adding together: "); - currentModifier.add(data); - currentModifier.print(); - existingModifiers.add(existingModifierIndex, currentModifier); - - //Log proving the data has been updated in the node successfully. - LogManager.getLogger().info("addModifierData: after setting on the node: "); - existingModifiers.get(existingModifierIndex).print(); + addModifierData(existingModifiers, data); }); } } + + private static void addModifierData(List existingModifiers, ModifierData data) { + //Log the data being added to the Node + LogManager.getLogger().info("addModifierData: newData: "); + data.print(); + + //Identify the existing ModifierData record for this type. + int existingModifierIndex = existingModifiers.indexOf(existingModifiers.stream().filter(mod -> mod.getName().equals(data.getName())).findFirst().get()); + ModifierData currentModifier = existingModifiers.get(existingModifierIndex); + + //Log the data already on the Node. + LogManager.getLogger().info("addModifierData: oldData: "); + currentModifier.print(); + + //Merge the two modifier instances and log the result. + LogManager.getLogger().info("addModifierData: after adding together: "); + currentModifier.add(data); + currentModifier.print(); + existingModifiers.add(existingModifierIndex, currentModifier); + + //Log proving the data has been updated in the node successfully. + LogManager.getLogger().info("addModifierData: after setting on the node: "); + existingModifiers.get(existingModifierIndex).print(); + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 4ec61835..9d6ea4f4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; @@ -64,7 +65,12 @@ private void terminate() { public void moveDown(Form executedForm) { //add the last Node to the activation Path and store its ModifierData's + if (this.lastActivated != null && active != null) { + if(this.lastActivated.name().equals(executedForm.name())) { + addModifierData(new MultiModifierData()); + return; + } path.addStep(this.lastActivated, active.getModifiers()); } this.lastActivated = executedForm; @@ -97,6 +103,10 @@ public void addModifierData(List modifierData) { active.addModifierData(modifierData); } + public void addModifierData(ModifierData modifierData) { + active.addModifierData(modifierData); + } + public void setOwner(Entity entity) { this.owner = entity; } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 5b68d0e5..de6462e3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -24,7 +24,10 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // initialise the radix tree and set the player as an instance property for sending packets. //todo this is temporary manual tree construction for testing purposes. the true tree will be // generated at runtime based on available skills for the player/entity. - Node secondNode = NodeBuilder.middle().addModifier(ModifiersRegistry.FOCUS.copy()).build(); + Node secondNode = NodeBuilder.middle() + .addModifier(ModifiersRegistry.FOCUS.copy()) + .addModifier(ModifiersRegistry.MULTI.copy()) + .build(); RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.STRIKE, secondNode).build()); tree.setOwner(event.getEntity()); capability.setTree(tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 96e6311b..2234e79d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; import com.amuzil.omegasource.magus.skill.modifiers.listeners.KeyHeldModifierListener; import net.minecraft.nbt.CompoundTag; @@ -15,6 +16,7 @@ public class ModifiersRegistry { private static Map modifierDataTypes; public static Modifier FOCUS; + public static Modifier MULTI; public static void init() { modifierDataTypes = new HashMap<>(); @@ -22,6 +24,10 @@ public static void init() { ModifierData heldModifierData = new HeldModifierData(); FOCUS = new Modifier(heldModifierData, new KeyHeldModifierListener()); modifierDataTypes.put(heldModifierData.getName(), FOCUS); + + ModifierData multiModifierData = new MultiModifierData(); + MULTI = new Modifier(multiModifierData, null); + modifierDataTypes.put(multiModifierData.getName(), MULTI); } public static ModifierData fromCompoundTag(CompoundTag compoundTag) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java index 618567d3..6ec72080 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java @@ -15,7 +15,7 @@ public Modifier(ModifierData data, ModifierListener listener) { } public Modifier copy() { - return new Modifier(data().copy(), listener().copy()); + return new Modifier(data().copy(), listener() != null? listener().copy() : null); } public void print() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java index 5459712e..3fd41b7d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java @@ -6,6 +6,7 @@ // actually adding data is handled by sub-class implementations, this is just for generics. public abstract class ModifierData implements DataTrait { + public ModifierData() { } @@ -23,6 +24,7 @@ public void add(ModifierData modifierData) { } protected abstract void mergeFields(ModifierData modifierData); + public abstract boolean serversideOnly(); public abstract void print(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java index 3167e9e1..7d53de2f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java @@ -22,6 +22,11 @@ public boolean isDirty() { return isDirty; } + @Override + public boolean serversideOnly() { + return false; + } + @Override public CompoundTag serializeNBT() { CompoundTag compoundTag = new CompoundTag(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index f931b480..2f75d3d0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -11,6 +11,7 @@ public class HeldModifierData extends BaseModifierData { public HeldModifierData() { this.duration = 0; + this.currentlyHeld = true; } public HeldModifierData(int duration, boolean currentlyHeld) { @@ -49,14 +50,16 @@ public void deserializeNBT(CompoundTag compoundTag) { @Override protected void mergeFields(ModifierData modifierData) { HeldModifierData heldModifierData = (HeldModifierData) modifierData; - this.duration = this.duration + heldModifierData.duration; - this.currentlyHeld = heldModifierData.currentlyHeld; + if(this.currentlyHeld) { + this.duration = this.duration + heldModifierData.duration; + this.currentlyHeld = heldModifierData.currentlyHeld; + } } @Override public void reset() { this.duration = 0; - this.currentlyHeld = false; + this.currentlyHeld = true; } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java new file mode 100644 index 00000000..228c1a80 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java @@ -0,0 +1,65 @@ +package com.amuzil.omegasource.magus.skill.modifiers.data; + +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.nbt.CompoundTag; +import org.apache.logging.log4j.LogManager; + +public class MultiModifierData extends BaseModifierData { + + private int count; + + public MultiModifierData() { + this.count = 1; + } + + public MultiModifierData(int count) { + super(); + this.count = count; + } + + @Override + public String getName() { + return "MultiModifier"; + } + + @Override + public boolean serversideOnly() { + return true; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag compoundTag = super.serializeNBT(); + + compoundTag.putInt("count", count); + + return compoundTag; + } + + @Override + public MultiModifierData copy() { + return new MultiModifierData(); + } + + @Override + public void deserializeNBT(CompoundTag compoundTag) { + this.count = compoundTag.getInt("count"); + } + + //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking + @Override + protected void mergeFields(ModifierData modifierData) { + MultiModifierData heldModifierData = (MultiModifierData) modifierData; + this.count = this.count + heldModifierData.count; + } + + @Override + public void reset() { + this.count = 1; + } + + @Override + public void print() { + LogManager.getLogger().info("MultiModifierData count: " + count); + } +} From c2f8455d4ba8059e942b8687d141fb0dcbfd9a7a Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sat, 11 Feb 2023 15:49:40 +0000 Subject: [PATCH 104/469] added direction modifier --- .../omegasource/magus/input/InputModule.java | 16 ++-- .../magus/input/KeyboardMouseInputModule.java | 8 +- .../magus/server/ServerEvents.java | 1 + .../skill/modifiers/ModifiersRegistry.java | 8 ++ .../{data => api}/BaseModifierData.java | 2 +- .../modifiers/data/DirectionModifierData.java | 73 +++++++++++++++++++ .../modifiers/data/HeldModifierData.java | 1 + .../modifiers/data/MultiModifierData.java | 1 + .../listeners/DirectionModifierListener.java | 51 +++++++++++++ 9 files changed, 150 insertions(+), 11 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/modifiers/{data => api}/BaseModifierData.java (92%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index cc106846..f678fb9d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -34,13 +34,15 @@ public void registerModifierListener(ModifierListener listener, CompoundTag tree _modifierListeners.add(listener); } - public void queueModifierData(ModifierData data) { - if(modifierQueue.get(data.getName()) != null) { - ModifierData existingData = modifierQueue.get(data.getName()); - existingData.add(data); - modifierQueue.put(data.getName(), existingData); - } else { - modifierQueue.put(data.getName(), data); + public synchronized void queueModifierData(ModifierData data) { + synchronized (modifierQueue) { + if(modifierQueue.get(data.getName()) != null) { + ModifierData existingData = modifierQueue.get(data.getName()); + existingData.add(data); + modifierQueue.put(data.getName(), existingData); + } else { + modifierQueue.put(data.getName(), data); + } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index ab9e272b..1bb06cae 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -102,9 +102,11 @@ public KeyboardMouseInputModule() { private void sendModifierData() { LogManager.getLogger().info("SENDING MODIFIER DATA"); - MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); - ticksSinceModifiersSent = 0; - modifierQueue.clear(); + synchronized (modifierQueue) { + MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); + ticksSinceModifiersSent = 0; + modifierQueue.clear(); + } } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index de6462e3..59c761cb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -27,6 +27,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { Node secondNode = NodeBuilder.middle() .addModifier(ModifiersRegistry.FOCUS.copy()) .addModifier(ModifiersRegistry.MULTI.copy()) + .addModifier(ModifiersRegistry.DIRECTION.copy()) .build(); RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.STRIKE, secondNode).build()); tree.setOwner(event.getEntity()); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 2234e79d..8103ceec 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -2,8 +2,10 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.data.DirectionModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.listeners.DirectionModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.listeners.KeyHeldModifierListener; import net.minecraft.nbt.CompoundTag; @@ -17,6 +19,7 @@ public class ModifiersRegistry { public static Modifier FOCUS; public static Modifier MULTI; + public static Modifier DIRECTION; public static void init() { modifierDataTypes = new HashMap<>(); @@ -28,6 +31,11 @@ public static void init() { ModifierData multiModifierData = new MultiModifierData(); MULTI = new Modifier(multiModifierData, null); modifierDataTypes.put(multiModifierData.getName(), MULTI); + + + ModifierData directionModifierData = new DirectionModifierData(); + DIRECTION = new Modifier(directionModifierData, new DirectionModifierListener()); + modifierDataTypes.put(directionModifierData.getName(), DIRECTION); } public static ModifierData fromCompoundTag(CompoundTag compoundTag) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/BaseModifierData.java similarity index 92% rename from src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/BaseModifierData.java index 7d53de2f..114e45b2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/BaseModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/BaseModifierData.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.modifiers.data; +package com.amuzil.omegasource.magus.skill.modifiers.api; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java new file mode 100644 index 00000000..29b72f4d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java @@ -0,0 +1,73 @@ +package com.amuzil.omegasource.magus.skill.modifiers.data; + +import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.StringTag; +import org.apache.logging.log4j.LogManager; + +import java.util.LinkedList; +import java.util.List; +import java.util.stream.Collectors; + +public class DirectionModifierData extends BaseModifierData { + + private List directions; + + public DirectionModifierData() { + this.directions = new LinkedList<>(); + } + + public DirectionModifierData(List directions) { + this.directions = directions; + } + + @Override + public String getName() { + return "DirectionModifier"; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag compoundTag = super.serializeNBT(); + ListTag listTag = new ListTag(); + + this.directions.forEach(direction -> listTag.add(StringTag.valueOf(direction.name()))); + compoundTag.put("directions", listTag); + + return compoundTag; + } + + @Override + public DirectionModifierData copy() { + return new DirectionModifierData(); + } + + @Override + public void deserializeNBT(CompoundTag compoundTag) { + this.directions = new LinkedList<>(); + + ListTag listTag = (ListTag) compoundTag.get("directions"); + listTag.forEach(tag -> this.directions.add(Direction.byName(tag.getAsString()))); + } + + //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking + @Override + protected void mergeFields(ModifierData modifierData) { + DirectionModifierData directionModifierData = (DirectionModifierData) modifierData; + this.directions.addAll(directionModifierData.directions); + } + + @Override + public void reset() { + this.directions = new LinkedList<>(); + } + + @Override + public void print() { + LogManager.getLogger().info("MultiModifierData directions: \n" + this.directions.size()); +// LogManager.getLogger().info("MultiModifierData directions: \n" + this.directions.stream().map(direction -> direction.name()).collect(Collectors.joining(",\n"))); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index 2f75d3d0..ef21480f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.modifiers.data; +import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import net.minecraft.nbt.CompoundTag; import org.apache.logging.log4j.LogManager; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java index 228c1a80..44e6521b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.modifiers.data; +import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import net.minecraft.nbt.CompoundTag; import org.apache.logging.log4j.LogManager; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java new file mode 100644 index 00000000..485dafe1 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java @@ -0,0 +1,51 @@ +package com.amuzil.omegasource.magus.skill.modifiers.listeners; + +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.data.DirectionModifierData; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.event.entity.living.LivingEvent; +import org.apache.logging.log4j.LogManager; + +import java.util.LinkedList; +import java.util.List; + +public class DirectionModifierListener extends ModifierListener { + private final double motionThreshold = 0.08d; + + public DirectionModifierListener() { + this.modifierData = new DirectionModifierData(); + } + + //this ModifierListener doesn't use any nested listeners + @Override + public void setupListener(CompoundTag compoundTag) { + } + + @Override + public boolean shouldCollectModifierData(LivingEvent.LivingTickEvent event) { + if(!(event.getEntity() instanceof Player)) return false; + if((event.getEntity().getDeltaMovement().length() > motionThreshold)) { + LogManager.getLogger().info("MOVE MOTION: " + event.getEntity().getDeltaMovement().length()); + LogManager.getLogger().info("MOVE DIRECTION: " + event.getEntity().getMotionDirection()); + LogManager.getLogger().info(event.getEntity().getDeltaMovement()); + return true; + } + + return false; + } + + @Override + public ModifierData collectModifierDataFromEvent(LivingEvent.LivingTickEvent event) { + List directions = new LinkedList<>(); + directions.add(event.getEntity().getMotionDirection()); + return new DirectionModifierData(directions); + } + + @Override + public ModifierListener copy() { + return new DirectionModifierListener(); + } +} From 0d142f099cb7a24a0af894020202a82bb213c107 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sat, 11 Feb 2023 23:37:43 +0000 Subject: [PATCH 105/469] added helper method for movement keys --- .../com/amuzil/omegasource/magus/Magus.java | 3 +++ .../magus/input/KeyboardMouseInputModule.java | 19 +++++++++++++++++-- .../modifiers/data/DirectionModifierData.java | 7 ++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 7b4f58f9..adf6e7dc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -58,6 +58,9 @@ public Magus() { FormDataRegistry.init(); ModifiersRegistry.init(); + //todo call this anytime the key mappings are updated + KeyboardMouseInputModule.determineMotionKeys(); + } private void setup(final FMLCommonSetupEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 1bb06cae..623fe0f5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -8,12 +8,12 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import java.util.function.Consumer; import com.amuzil.omegasource.magus.skill.util.data.KeyboardData; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; @@ -24,6 +24,7 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer tickEventConsumer; private final List glfwKeysDown; + private static final Map movementKeys = new HashMap<>(); private final Consumer keyboardListener; private final Consumer mouseListener; @@ -153,4 +154,18 @@ public void unregisterInputs() { public boolean keyPressed(int key) { return glfwKeysDown.contains(key); } + + public static void determineMotionKeys() { + Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { + if(keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { + LogManager.getLogger().info(keyMapping.getName()); + movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); + } + }); + + } + + public boolean isDirectionKey(int key) { + return movementKeys.containsValue(Integer.valueOf(key)); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java index 29b72f4d..694a5861 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java @@ -8,6 +8,7 @@ import net.minecraft.nbt.StringTag; import org.apache.logging.log4j.LogManager; +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.stream.Collectors; @@ -17,7 +18,7 @@ public class DirectionModifierData extends BaseModifierData { private List directions; public DirectionModifierData() { - this.directions = new LinkedList<>(); + this.directions = new ArrayList<>(); } public DirectionModifierData(List directions) { @@ -47,7 +48,7 @@ public DirectionModifierData copy() { @Override public void deserializeNBT(CompoundTag compoundTag) { - this.directions = new LinkedList<>(); + this.directions = new ArrayList<>(); ListTag listTag = (ListTag) compoundTag.get("directions"); listTag.forEach(tag -> this.directions.add(Direction.byName(tag.getAsString()))); @@ -62,7 +63,7 @@ protected void mergeFields(ModifierData modifierData) { @Override public void reset() { - this.directions = new LinkedList<>(); + this.directions = new ArrayList<>(); } @Override From a6a9c87ac913ecf7675e046c98bb9ac13f1fb437 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Sun, 12 Feb 2023 03:10:48 +0000 Subject: [PATCH 106/469] added target modifier, doesnt exclusively select bendable material yet --- .../magus/input/KeyboardMouseInputModule.java | 2 +- .../magus/server/ServerEvents.java | 1 + .../skill/modifiers/ModifiersRegistry.java | 8 ++ .../modifiers/data/TargetModifierData.java | 82 +++++++++++++++++++ .../listeners/TargetModifierListener.java | 70 ++++++++++++++++ 5 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/TargetModifierData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 623fe0f5..4f3355de 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -73,7 +73,7 @@ public KeyboardMouseInputModule() { } case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.remove(keyPressed); + glfwKeysDown.remove(glfwKeysDown.indexOf(keyPressed)); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 59c761cb..cac29fcf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -28,6 +28,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { .addModifier(ModifiersRegistry.FOCUS.copy()) .addModifier(ModifiersRegistry.MULTI.copy()) .addModifier(ModifiersRegistry.DIRECTION.copy()) + .addModifier(ModifiersRegistry.TARGET.copy()) .build(); RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.STRIKE, secondNode).build()); tree.setOwner(event.getEntity()); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 8103ceec..c5c8734d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -5,8 +5,10 @@ import com.amuzil.omegasource.magus.skill.modifiers.data.DirectionModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.data.TargetModifierData; import com.amuzil.omegasource.magus.skill.modifiers.listeners.DirectionModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.listeners.KeyHeldModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.listeners.TargetModifierListener; import net.minecraft.nbt.CompoundTag; import java.util.HashMap; @@ -20,6 +22,7 @@ public class ModifiersRegistry { public static Modifier FOCUS; public static Modifier MULTI; public static Modifier DIRECTION; + public static Modifier TARGET; public static void init() { modifierDataTypes = new HashMap<>(); @@ -36,6 +39,11 @@ public static void init() { ModifierData directionModifierData = new DirectionModifierData(); DIRECTION = new Modifier(directionModifierData, new DirectionModifierListener()); modifierDataTypes.put(directionModifierData.getName(), DIRECTION); + + + ModifierData targetModifierData = new TargetModifierData(); + TARGET = new Modifier(targetModifierData, new TargetModifierListener()); + modifierDataTypes.put(targetModifierData.getName(), TARGET); } public static ModifierData fromCompoundTag(CompoundTag compoundTag) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/TargetModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/TargetModifierData.java new file mode 100644 index 00000000..378f8d33 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/TargetModifierData.java @@ -0,0 +1,82 @@ +package com.amuzil.omegasource.magus.skill.modifiers.data; + +import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.world.phys.Vec3; +import org.apache.logging.log4j.LogManager; + +import java.util.ArrayList; +import java.util.List; + +public class TargetModifierData extends BaseModifierData { + + private ArrayList targetPositions; + + public TargetModifierData() { + this.targetPositions = new ArrayList<>(); + } + + public TargetModifierData(ArrayList directions) { + this.targetPositions = directions; + } + + @Override + public String getName() { + return "TargetModifier"; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag compoundTag = super.serializeNBT(); + ListTag listTag = new ListTag(); + + this.targetPositions.forEach(target -> { + CompoundTag targetPosition = new CompoundTag(); + targetPosition.putDouble("x", target.x); + targetPosition.putDouble("y", target.y); + targetPosition.putDouble("z", target.z); + listTag.add(targetPosition); + }); + compoundTag.put("targetPositions", listTag); + + return compoundTag; + } + + @Override + public TargetModifierData copy() { + return new TargetModifierData(); + } + + @Override + public void deserializeNBT(CompoundTag compoundTag) { + this.targetPositions = new ArrayList<>(); + + ListTag listTag = (ListTag) compoundTag.get("targetPositions"); + listTag.forEach(tag -> { + CompoundTag target = (CompoundTag)tag; + double x = target.getDouble("x"); + double y = target.getDouble("y"); + double z = target.getDouble("z"); + this.targetPositions.add(new Vec3(x, y, z)); + }); + } + + //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking + @Override + protected void mergeFields(ModifierData modifierData) { + TargetModifierData targetModifierData = (TargetModifierData) modifierData; + this.targetPositions.addAll(targetModifierData.targetPositions); + } + + @Override + public void reset() { + this.targetPositions = new ArrayList<>(); + } + + @Override + public void print() { + LogManager.getLogger().info("TargetModifierData targetPositions: \n" + this.targetPositions.size()); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java new file mode 100644 index 00000000..cf7cc4ec --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -0,0 +1,70 @@ +package com.amuzil.omegasource.magus.skill.modifiers.listeners; + +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.data.TargetModifierData; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.Minecraft; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.client.event.InputEvent; +import org.apache.logging.log4j.LogManager; + +import java.util.ArrayList; + +public class TargetModifierListener extends ModifierListener { + private Vec3 lastTargetPosition; + + public TargetModifierListener() { + this.modifierData = new TargetModifierData(); + } + + @Override + public void setupListener(CompoundTag compoundTag) { + } + + @Override + public boolean shouldCollectModifierData(InputEvent.MouseButton event) { + if(event instanceof InputEvent.MouseButton.Post && // prevents double activation(Pre- and Post-event firing) + event.getButton() == InputConstants.MOUSE_BUTTON_MIDDLE && event.getAction() == InputConstants.PRESS) { + Minecraft mc = Minecraft.getInstance(); + Player player = mc.player; + Vec3 vector3d = mc.player.getEyePosition(1.0F); + Vec3 vector3d1 = mc.player.getViewVector(1.0F); + double d0 = 15; //todo max distance make this configurable + Vec3 vector3d2 = vector3d.add(vector3d1.x * d0, vector3d1.y * d0, vector3d1.z * d0); + + BlockHitResult hitresult = mc.player.level.clip(new ClipContext(vector3d, vector3d2, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, player)); + if (hitresult.getType() == HitResult.Type.BLOCK) { + BlockPos locationHit = hitresult.getBlockPos(); + LogManager.getLogger().info("Position: " + locationHit); + //todo, check if the material is bendable + if(!player.level.getBlockState(new BlockPos(locationHit)).isAir()) { + LogManager.getLogger().info("Blockstate: " + player.level.getBlockState(new BlockPos(locationHit))); + lastTargetPosition = new Vec3(locationHit.getX(), locationHit.getY(), locationHit.getZ()); + } + } + } + + return lastTargetPosition != null; + } + + @Override + public ModifierData collectModifierDataFromEvent(InputEvent.MouseButton event) { + ArrayList list = new ArrayList<>(); + list.add(this.lastTargetPosition); + TargetModifierData data = new TargetModifierData(list); + this.lastTargetPosition = null; + return data; + } + + @Override + public ModifierListener copy() { + return new TargetModifierListener(); + } +} From ab086f99b6f2dba6917f90fd198d0e7b1636196c Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 13 Feb 2023 01:21:04 +0000 Subject: [PATCH 107/469] made target modifier only select configured bending materials --- .../amuzil/omegasource/magus/radix/Node.java | 4 +- .../omegasource/magus/radix/RadixTree.java | 15 ++++++- .../magus/registry/Registries.java | 7 ++++ .../magus/skill/elements/Element.java | 17 ++++++++ .../magus/skill/elements/Elements.java | 17 ++++++++ .../listeners/TargetModifierListener.java | 20 +++++++--- .../util/bending/BendingMaterialUtil.java | 39 +++++++++++++++++++ 7 files changed, 111 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 48aeb727..5949e9e8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; +import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; @@ -74,11 +75,12 @@ public synchronized List getModifiers() { return modifiers; } - public void registerModifierListeners(Form lastActivatedForm, ServerPlayer player) { + public void registerModifierListeners(Form lastActivatedForm, Element activeElement, ServerPlayer player) { CompoundTag listenerInstanceData = new CompoundTag(); //here we can send information to the client to help build the Modifier Listeners appropriately. listenerInstanceData.putString("lastFormActivated", lastActivatedForm.name()); + listenerInstanceData.putString("activeElement", activeElement.name()); List modifierTypes = new ArrayList<>(); List modifiers = getModifiers(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 9d6ea4f4..e5baa682 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -1,11 +1,12 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; +import org.apache.logging.log4j.LogManager; import java.util.List; @@ -13,6 +14,7 @@ public class RadixTree { private final Node root; private Node active; private Form lastActivated = null; + private Element activeElement = null; private RadixPath path; private Entity owner; @@ -27,6 +29,7 @@ public void burn() { } active = null; + activeElement = null; } public void start() { @@ -34,11 +37,15 @@ public void start() { path = new RadixPath(); } + private void setActive(Element element) { + this.activeElement = element; + } + private void setActive(Node node) { active = node; if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) - active.registerModifierListeners(lastActivated, player); + active.registerModifierListeners(lastActivated, activeElement, player); if (active.onEnter() != null) { active.onEnter().accept(this); @@ -64,6 +71,10 @@ private void terminate() { } public void moveDown(Form executedForm) { + if(activeElement == null) { + LogManager.getLogger().info("NO ELEMENT SELECTED"); + return; + } //add the last Node to the activation Path and store its ModifierData's if (this.lastActivated != null && active != null) { diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index c07275cf..90b4cc16 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -1,6 +1,8 @@ package com.amuzil.omegasource.magus.registry; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillActive; @@ -80,6 +82,11 @@ public static void registerForm(Form registryForm) { forms.add(registryForm); } + public static void registerElement(Element element) { + categories.add(element); + Elements.ELEMENTS.add(element); + } + //How registering will work: /* All skills will be registered first, along with skill categories. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java new file mode 100644 index 00000000..e2bca60c --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java @@ -0,0 +1,17 @@ +package com.amuzil.omegasource.magus.skill.elements; + +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.skill.SkillCategory; + +public class Element extends SkillCategory { + private final String name; + + public Element(String name) { + this.name = name; + Registries.registerElement(this); + } + + public String name() { + return name; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java new file mode 100644 index 00000000..85fb77c3 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java @@ -0,0 +1,17 @@ +package com.amuzil.omegasource.magus.skill.elements; + +import java.util.ArrayList; +import java.util.List; + +public class Elements { + public static final List ELEMENTS = new ArrayList<>(); + + public static final Element AIR = new Element("air"); + public static final Element WATER = new Element("water"); + public static final Element EARTH = new Element("earth"); + public static final Element FIRE = new Element("fire"); + + public static Element fromName(String name) { + return ELEMENTS.stream().filter(element -> element.name().equals(name)).findFirst().get(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index cf7cc4ec..a9ef1407 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -1,14 +1,20 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.TargetModifierData; +import com.amuzil.omegasource.magus.skill.util.bending.BendingMaterialUtil; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; @@ -16,9 +22,11 @@ import org.apache.logging.log4j.LogManager; import java.util.ArrayList; +import java.util.List; public class TargetModifierListener extends ModifierListener { private Vec3 lastTargetPosition; + private Element activeElement; public TargetModifierListener() { this.modifierData = new TargetModifierData(); @@ -26,6 +34,7 @@ public TargetModifierListener() { @Override public void setupListener(CompoundTag compoundTag) { + this.activeElement = Elements.fromName(compoundTag.getString("activeElement")); } @Override @@ -36,15 +45,16 @@ public boolean shouldCollectModifierData(InputEvent.MouseButton event) { Player player = mc.player; Vec3 vector3d = mc.player.getEyePosition(1.0F); Vec3 vector3d1 = mc.player.getViewVector(1.0F); - double d0 = 15; //todo max distance make this configurable - Vec3 vector3d2 = vector3d.add(vector3d1.x * d0, vector3d1.y * d0, vector3d1.z * d0); - + double distance = 20; //todo max distance make this configurable + Vec3 vector3d2 = vector3d.add(vector3d1.x * distance, vector3d1.y * distance, vector3d1.z * distance); + List> bendableMaterials = BendingMaterialUtil.getBendableMaterialsForElement(activeElement); BlockHitResult hitresult = mc.player.level.clip(new ClipContext(vector3d, vector3d2, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, player)); if (hitresult.getType() == HitResult.Type.BLOCK) { BlockPos locationHit = hitresult.getBlockPos(); LogManager.getLogger().info("Position: " + locationHit); - //todo, check if the material is bendable - if(!player.level.getBlockState(new BlockPos(locationHit)).isAir()) { + BlockState hitBlockState = player.level.getBlockState(new BlockPos(locationHit)); + if(!hitBlockState.isAir() + && (bendableMaterials.size() == 0 || bendableMaterials.stream().anyMatch(hitBlockState::is))) { LogManager.getLogger().info("Blockstate: " + player.level.getBlockState(new BlockPos(locationHit))); lastTargetPosition = new Vec3(locationHit.getX(), locationHit.getY(), locationHit.getZ()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java new file mode 100644 index 00000000..1499c9f9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java @@ -0,0 +1,39 @@ +package com.amuzil.omegasource.magus.skill.util.bending; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.elements.Element; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.BlockTags; +import net.minecraft.tags.TagKey; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraftforge.common.Tags; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class BendingMaterialUtil { + public static final TagKey WATERBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "waterbending_material")); + public static final TagKey EARTHBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "earthbending_material")); + public static List> getBendableMaterialsForElement(Element element) { + List> toReturn = new ArrayList<>(); + + switch (element.name()) { + case "air": + //add nothing + break; + case "water": + toReturn.add(WATERBENDING_MATERIAL); + break; + case "earth": + toReturn.add(EARTHBENDING_MATERIAL); + break; + case "fire": + //add fire block? + break; + default: return toReturn; + } + return toReturn; + } +} From ca170efd7f280f63dfd9445f140dc4546f0fc43f Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 13 Feb 2023 14:08:10 +0000 Subject: [PATCH 108/469] made target modifier only select configured bending materials part 2 --- .../listeners/TargetModifierListener.java | 3 +-- .../util/bending/BendingMaterialUtil.java | 7 +++--- .../tags/blocks/airbending_material.json | 5 ++++ .../tags/blocks/earthbending_material.json | 25 +++++++++++++++++++ .../tags/blocks/firebending_material.json | 10 ++++++++ .../tags/blocks/waterbending_material.json | 9 +++++++ 6 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/data/magus/tags/blocks/airbending_material.json create mode 100644 src/main/resources/data/magus/tags/blocks/earthbending_material.json create mode 100644 src/main/resources/data/magus/tags/blocks/firebending_material.json create mode 100644 src/main/resources/data/magus/tags/blocks/waterbending_material.json diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index a9ef1407..495713fe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -53,8 +53,7 @@ public boolean shouldCollectModifierData(InputEvent.MouseButton event) { BlockPos locationHit = hitresult.getBlockPos(); LogManager.getLogger().info("Position: " + locationHit); BlockState hitBlockState = player.level.getBlockState(new BlockPos(locationHit)); - if(!hitBlockState.isAir() - && (bendableMaterials.size() == 0 || bendableMaterials.stream().anyMatch(hitBlockState::is))) { + if(bendableMaterials.size() == 0 || bendableMaterials.stream().anyMatch(hitBlockState::is)) { LogManager.getLogger().info("Blockstate: " + player.level.getBlockState(new BlockPos(locationHit))); lastTargetPosition = new Vec3(locationHit.getX(), locationHit.getY(), locationHit.getZ()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java index 1499c9f9..94016479 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java @@ -6,22 +6,22 @@ import net.minecraft.tags.BlockTags; import net.minecraft.tags.TagKey; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; -import net.minecraftforge.common.Tags; import java.util.ArrayList; -import java.util.Collections; import java.util.List; public class BendingMaterialUtil { + public static final TagKey AIRBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "airbending_material.json")); public static final TagKey WATERBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "waterbending_material")); public static final TagKey EARTHBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "earthbending_material")); + public static final TagKey FIREBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "firebending_material")); public static List> getBendableMaterialsForElement(Element element) { List> toReturn = new ArrayList<>(); switch (element.name()) { case "air": //add nothing + toReturn.add(AIRBENDING_MATERIAL); break; case "water": toReturn.add(WATERBENDING_MATERIAL); @@ -30,6 +30,7 @@ public static List> getBendableMaterialsForElement(Element element toReturn.add(EARTHBENDING_MATERIAL); break; case "fire": + toReturn.add(FIREBENDING_MATERIAL); //add fire block? break; default: return toReturn; diff --git a/src/main/resources/data/magus/tags/blocks/airbending_material.json b/src/main/resources/data/magus/tags/blocks/airbending_material.json new file mode 100644 index 00000000..7864d3bd --- /dev/null +++ b/src/main/resources/data/magus/tags/blocks/airbending_material.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:air" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/magus/tags/blocks/earthbending_material.json b/src/main/resources/data/magus/tags/blocks/earthbending_material.json new file mode 100644 index 00000000..bfd57dde --- /dev/null +++ b/src/main/resources/data/magus/tags/blocks/earthbending_material.json @@ -0,0 +1,25 @@ +{ + "values": [ + "minecraft:stone", + "minecraft:cobblestone", + "minecraft:granite", + "minecraft:diorite", + "minecraft:polished_diorite", + "minecraft:andesite", + "minecraft:polished_andesite", + "minecraft:mud", + "minecraft:dirt", + "minecraft:coarse_dirt", + "minecraft:podzol", + "minecraft:grass_block", + "minecraft:gravel", + "minecraft:sand", + "minecraft:red_sand", + "minecraft:deepslate", + "minecraft:tuff", + "minecraft:lodestone", + "minecraft:blackstone", + "minecraft:calcite", + "minecraft:cobbled_deepslate" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/magus/tags/blocks/firebending_material.json b/src/main/resources/data/magus/tags/blocks/firebending_material.json new file mode 100644 index 00000000..7acd8eb0 --- /dev/null +++ b/src/main/resources/data/magus/tags/blocks/firebending_material.json @@ -0,0 +1,10 @@ +{ + "values": [ + "minecraft:fire", + "minecraft:soul_fire", + "minecraft:torch", + "minecraft:campfire", + "minecraft:soul_campfire", + "minecraft:lantern" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/magus/tags/blocks/waterbending_material.json b/src/main/resources/data/magus/tags/blocks/waterbending_material.json new file mode 100644 index 00000000..e4e67bab --- /dev/null +++ b/src/main/resources/data/magus/tags/blocks/waterbending_material.json @@ -0,0 +1,9 @@ +{ + "values": [ + "minecraft:water", + "minecraft:ice", + "minecraft:packed_ice", + "minecraft:blue_ice", + "minecraft:snow_block" + ] +} \ No newline at end of file From 559dad5ccbffece2cdba5f494e979ff9903a24d5 Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 13 Feb 2023 14:29:44 +0000 Subject: [PATCH 109/469] made target modifier only select configured bending materials part 3 --- .../data/magus/tags/blocks/earthbending_material.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/data/magus/tags/blocks/earthbending_material.json b/src/main/resources/data/magus/tags/blocks/earthbending_material.json index bfd57dde..b4592862 100644 --- a/src/main/resources/data/magus/tags/blocks/earthbending_material.json +++ b/src/main/resources/data/magus/tags/blocks/earthbending_material.json @@ -20,6 +20,7 @@ "minecraft:lodestone", "minecraft:blackstone", "minecraft:calcite", - "minecraft:cobbled_deepslate" + "minecraft:cobbled_deepslate", + "#forge:stone" ] } \ No newline at end of file From 3d1d25df4dcdbb0613468da6db88ee1ddd98d45a Mon Sep 17 00:00:00 2001 From: aidan99davis Date: Mon, 13 Feb 2023 14:39:54 +0000 Subject: [PATCH 110/469] added forge tags for selecting materials --- .../magus/tags/blocks/earthbending_material.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/resources/data/magus/tags/blocks/earthbending_material.json b/src/main/resources/data/magus/tags/blocks/earthbending_material.json index b4592862..b9384ac6 100644 --- a/src/main/resources/data/magus/tags/blocks/earthbending_material.json +++ b/src/main/resources/data/magus/tags/blocks/earthbending_material.json @@ -14,6 +14,7 @@ "minecraft:grass_block", "minecraft:gravel", "minecraft:sand", + "minecraft:sandstone", "minecraft:red_sand", "minecraft:deepslate", "minecraft:tuff", @@ -21,6 +22,17 @@ "minecraft:blackstone", "minecraft:calcite", "minecraft:cobbled_deepslate", - "#forge:stone" + "#forge:blocks/sand", + "#forge:blocks/stone", + "#forge:blocks/sandstone", + "#forge:blocks/cobblestone", + "#forge:blocks/gravel", + "#forge:blocks/obsidian", + "#forge:blocks/end_stones", + "#forge:blocks/glass", + "#forge:blocks/glass_panes", + "#forge:blocks/stained_glass", + "#forge:blocks/stained_glass_panes", + "#forge:blocks/netherrack" ] } \ No newline at end of file From 157aac250d0243db63fa968aaa217dee5dc7751e Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 22 Apr 2023 12:04:15 +1000 Subject: [PATCH 111/469] storing stuff before a massive pull --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 2 +- .../amuzil/omegasource/magus/skill/forms/FormDataRegistry.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 291c130c..2ff7f2db 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -17,7 +17,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx //generate condition from InputData. Runnable onSuccess = () -> { //todo pass formToExecute to the form queue. - LogManager.getLogger().info("FORM ACTIVATED :" + formToExecute.name()); + LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); Magus.radixTree.moveDown(formToExecute); //reset condition? }; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 237cde7f..636e336a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -14,8 +14,10 @@ public class FormDataRegistry { //Remember to see #InputConstants for the key names. public static void init() { List inputs = new ArrayList<>(); + inputs.add(new KeyInput(InputConstants.getKey("key.mouse.right"), 0, 0, 0)); Magus.inputModule.registerInputData(inputs, Forms.STRIKE); + inputs.clear(); } } From 3b3d614342e3a790dba4efd7548e094a7daf3dc7 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 9 Jun 2023 03:12:49 +1000 Subject: [PATCH 112/469] :memo: Form input registration Trying to work out how we want developers to register form inputs --- .../java/com/amuzil/omegasource/magus/Magus.java | 2 ++ .../magus/skill/forms/FormDataRegistry.java | 9 ++++----- .../omegasource/magus/skill/forms/Forms.java | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index adf6e7dc..33db3c55 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.client.Minecraft; @@ -57,6 +58,7 @@ public Magus() { //Assign input data to forms FormDataRegistry.init(); ModifiersRegistry.init(); + Forms.registerForms(); //todo call this anytime the key mappings are updated KeyboardMouseInputModule.determineMotionKeys(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 8e9a548c..09f49ec8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -17,11 +17,6 @@ public class FormDataRegistry { //Remember to see #InputConstants for the key names. public static void init() { formTypes = new HashMap<>(); - List inputs = new ArrayList<>(); - inputs.add(new KeyInput(InputConstants.getKey("key.mouse.right"), - 0, 0, 0)); - Magus.inputModule.registerInputData(inputs, Forms.STRIKE); - formTypes.put(inputs, Forms.STRIKE); } public static Form getFormByName(String formName) { @@ -30,6 +25,10 @@ public static Form getFormByName(String formName) { public static List getInputsForForm(Form formToModify) { return formTypes.entrySet().stream().filter(form -> form.getValue().name().equals(formToModify.name())).findFirst().get().getKey(); + } + public static void registerForm(List inputs, Form form) { + Magus.inputModule.registerInputData(inputs, form); + formTypes.put(inputs, form); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index c62085a1..8b79925c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -1,5 +1,12 @@ package com.amuzil.omegasource.magus.skill.forms; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.mojang.blaze3d.platform.InputConstants; + +import java.util.ArrayList; +import java.util.List; + public class Forms { // FORMS public static final Form PUSH = new Form("push"); @@ -21,4 +28,13 @@ public class Forms { //These two may not be necessary. public static final Form MENU = new Form("menu"); public static final Form HOTKEY = new Form("hotkey"); + + + + public static void registerForms() { + List inputs = new ArrayList<>(); + inputs.add(new KeyInput(InputConstants.getKey("key.mouse.left"), + 0, 0, 0)); + FormDataRegistry.registerForm(inputs, STRIKE); + } } From 65a1b00f332cfc2c307f0c3beec0e57c0dafbe97 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 10 Jun 2023 03:34:10 +1000 Subject: [PATCH 113/469] InputData generation changes Added a factory for generating key InputData for use with forms, added an example class for testing avatar implementations --- .../magus/input/KeyboardMouseInputModule.java | 3 + .../magus/radix/path/PathBuilder.java | 1 + .../conditionals/key/KeyDataBuilder.java | 37 ++++++++++ .../magus/skill/forms/FormDataRegistry.java | 6 ++ .../skill/test/avatar/AvatarFormRegistry.java | 74 +++++++++++++++++++ 5 files changed, 121 insertions(+) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 4f3355de..68669295 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -162,7 +162,10 @@ public static void determineMotionKeys() { movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); } }); + } + public static Map getMovementKeys() { + return movementKeys; } public boolean isDirectionKey(int key) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 68fa959d..f91759d1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -20,6 +20,7 @@ public class PathBuilder { private static final Map, Function>> CONDITION_BUILDERS = new HashMap<>(); static { + //TODO: Account for max delay registerBuilder(KeyInput.class, keyInput -> { // Minimum amount of ticks a key must be pressed for it to be considered a held condition. //TODO: Adjust these diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java new file mode 100644 index 00000000..4c04629f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java @@ -0,0 +1,37 @@ +package com.amuzil.omegasource.magus.skill.conditionals.key; + +import com.mojang.blaze3d.platform.InputConstants; + +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; + +/** + * Uses KeyInput, KeyCombination, KeyPermutation. + * Acts as a factory for those records. + * Allows for easy conversion between them. + */ +public class KeyDataBuilder { + + public static KeyInput createInput(InputConstants.Key key, int minDelay, int maxDelay, int held) { + return new KeyInput(key, minDelay, maxDelay, held); + } + + public static KeyPermutation createPermutation(KeyInput... inputs) { + LinkedList data = new LinkedList<>(List.of(inputs)); + return new KeyPermutation(data); + } + + //Creates a permutation based off of each individual key input + public static KeyCombination createCombination(KeyInput... inputs) { + LinkedList data = new LinkedList<>(); + for (KeyInput input : inputs) + data.add(createPermutation(input)); + return new KeyCombination(data); + } + + public static KeyCombination createCombination(KeyPermutation... inputs) { + LinkedList data = new LinkedList<>(List.of(inputs)); + return new KeyCombination(data); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 09f49ec8..bf986ef6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -31,4 +31,10 @@ public static void registerForm(List inputs, Form form) { Magus.inputModule.registerInputData(inputs, form); formTypes.put(inputs, form); } + + public static void registerForm(InputData input, Form form) { + List singleton = new ArrayList<>(); + singleton.add(input); + formTypes.remove(singleton, form); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java new file mode 100644 index 00000000..2ff70a88 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -0,0 +1,74 @@ +package com.amuzil.omegasource.magus.skill.test.avatar; + +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyCombination; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyPermutation; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.forms.Forms; +import com.mojang.blaze3d.platform.InputConstants; +import org.checkerframework.checker.units.qual.A; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +public class AvatarFormRegistry { + + public static void registerForms() { + KeyInput left = KeyDataBuilder.createInput(InputConstants.getKey("key.mouse.left"), 0, + 0, 0); + KeyInput right = KeyDataBuilder.createInput(InputConstants.getKey("key.mouse.right"), 0, + 0, 0); + LinkedList inputs = new LinkedList<>(); + KeyPermutation permutation; + KeyCombination combination; + + + //FormDataRegistry.registerForm(Forms.PUSH); + + //FormDataRegistry.registerForm(Forms.PULL); + + //FormDataRegistry.registerForm(Forms.RAISE); + + //FormDataRegistry.registerForm(Forms.LOWER); + + inputs.clear(); + inputs.add(KeyDataBuilder.createPermutation(left, right)); + FormDataRegistry.registerForm(inputs, Forms.BURST); + + // FormDataRegistry.registerForm(Forms.ARC); + + // FormDataRegistry.registerForm(Forms.COMPRESS); + + // FormDataRegistry.registerForm(Forms.EXPAND); + +// FormDataRegistry.registerForm(Forms.ROTATE); + + inputs.clear(); + inputs.add(left); + FormDataRegistry.registerForm(inputs, Forms.STRIKE); + + inputs.clear(); + inputs.add(right); + FormDataRegistry.registerForm(inputs, Forms.FORCE); + + // FormDataRegistry.registerForm(Forms.BREATHE); + + + //Motion! 7 different movement options. + // Left, right, up, down, jump, sneak, sprint. + for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { + inputs.clear(); + KeyInput first, second; + first = KeyDataBuilder.createInput(InputConstants.getKey(key.getKey()), 0, 10, 0); + second = KeyDataBuilder.createInput(InputConstants.getKey(key.getKey()), 0, 0, 0); + inputs.add(KeyDataBuilder.createCombination(first, second)); + FormDataRegistry.registerForm(inputs, Forms.STEP); + } + + } +} From a3dd700a2ea83ee50560ed420c7e0944b95cd2f9 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 10 Jun 2023 04:02:10 +1000 Subject: [PATCH 114/469] need to write something to test form activation in the tree --- src/main/java/com/amuzil/omegasource/magus/Magus.java | 3 ++- .../packets/client_executed/SkillTriggeredPacket.java | 10 +++++----- .../com/amuzil/omegasource/magus/radix/Condition.java | 2 +- .../amuzil/omegasource/magus/skill/forms/Forms.java | 9 --------- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 33db3c55..c4f2ced7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -7,6 +7,7 @@ import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.client.Minecraft; import net.minecraft.world.entity.Entity; @@ -58,7 +59,7 @@ public Magus() { //Assign input data to forms FormDataRegistry.init(); ModifiersRegistry.init(); - Forms.registerForms(); + AvatarFormRegistry.registerForms(); //todo call this anytime the key mappings are updated KeyboardMouseInputModule.determineMotionKeys(); diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java index 22c46e31..d305ccfa 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/SkillTriggeredPacket.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.network.ClientPacketHandler; import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.Skill; import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.network.NetworkEvent; @@ -17,14 +18,13 @@ public SkillTriggeredPacket(Skill skill) { } public void toBytes(FriendlyByteBuf buf) { - if(skill != null) { - //todo serialize skill - } + if(skill != null) + buf.writeResourceLocation(skill.getId()); + } public static SkillTriggeredPacket fromBytes(FriendlyByteBuf buf) { - //todo deserialise skill - return new SkillTriggeredPacket(null); + return new SkillTriggeredPacket(Registries.SKILLS.get().getValue(buf.readResourceLocation())); } public boolean handle(Supplier ctx) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 22199e5e..59bd6973 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -15,7 +15,7 @@ public enum Result { public void register(Runnable onSuccess, Runnable onFailure) { RadixUtil.getLogger().debug("Registering results"); this.onSuccess = () -> { - RadixUtil.getLogger().debug("Result: success"); + // RadixUtil.getLogger().debug("Result: success"); onSuccess.run(); }; this.onFailure = () -> { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 8b79925c..40b2bdca 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -28,13 +28,4 @@ public class Forms { //These two may not be necessary. public static final Form MENU = new Form("menu"); public static final Form HOTKEY = new Form("hotkey"); - - - - public static void registerForms() { - List inputs = new ArrayList<>(); - inputs.add(new KeyInput(InputConstants.getKey("key.mouse.left"), - 0, 0, 0)); - FormDataRegistry.registerForm(inputs, STRIKE); - } } From 46636974927de68a7b946bfc9b2880ef38d5469c Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 10 Jun 2023 15:47:21 +1000 Subject: [PATCH 115/469] using burst causes an NPE.... --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 1 + .../radix/condition/minecraft/forge/key/KeyPressCondition.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 68669295..ec551a1e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index af8b1d61..65ca825c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -3,6 +3,8 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixUtil; +import com.mojang.blaze3d.platform.InputConstants; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.fml.LogicalSide; @@ -20,6 +22,7 @@ public KeyPressCondition(int key, int timeout) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { if(((KeyboardMouseInputModule)Magus.inputModule).keyPressed(key)) { + // RadixUtil.getLogger().debug(InputConstants.getKey(key, -1).getName()); this.onSuccess.run(); } else if(current >= timeout) { this.onFailure.run(); From 02115415873f21c3cf63e2c10fdca8074a715912 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 10 Jun 2023 16:17:24 +1000 Subject: [PATCH 116/469] Issues with logic as of current Cleaning up data as well; can't figure out why every form is currently being activated... --- .../magus/server/ServerEvents.java | 2 +- .../skill/conditionals/InputDataBuilder.java | 15 +++++++++++++++ .../skill/test/avatar/AvatarFormRegistry.java | 19 +++++++------------ 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index cac29fcf..2a0b3139 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -30,7 +30,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { .addModifier(ModifiersRegistry.DIRECTION.copy()) .addModifier(ModifiersRegistry.TARGET.copy()) .build(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.STRIKE, secondNode).build()); + RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.FORCE, secondNode).build()); tree.setOwner(event.getEntity()); capability.setTree(tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java new file mode 100644 index 00000000..4c0610e2 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -0,0 +1,15 @@ +package com.amuzil.omegasource.magus.skill.conditionals; + +import java.util.LinkedList; +import java.util.List; + +/** + * Designed as a factory class for taking InputDat and turning it into a linked list + * for InputModule use. + */ +public class InputDataBuilder { + + public static LinkedList toInputs(InputData... data) { + return (LinkedList) List.of(data); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 2ff70a88..1825a3bf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyCombination; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; @@ -24,8 +25,7 @@ public static void registerForms() { KeyInput right = KeyDataBuilder.createInput(InputConstants.getKey("key.mouse.right"), 0, 0, 0); LinkedList inputs = new LinkedList<>(); - KeyPermutation permutation; - KeyCombination combination; + //FormDataRegistry.registerForm(Forms.PUSH); @@ -36,9 +36,9 @@ public static void registerForms() { //FormDataRegistry.registerForm(Forms.LOWER); - inputs.clear(); - inputs.add(KeyDataBuilder.createPermutation(left, right)); - FormDataRegistry.registerForm(inputs, Forms.BURST); + LinkedList data = InputDataBuilder.toInputs( + KeyDataBuilder.createPermutation(left, right)); + FormDataRegistry.registerForm(data, Forms.BURST); // FormDataRegistry.registerForm(Forms.ARC); @@ -48,13 +48,9 @@ public static void registerForms() { // FormDataRegistry.registerForm(Forms.ROTATE); - inputs.clear(); - inputs.add(left); - FormDataRegistry.registerForm(inputs, Forms.STRIKE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - inputs.clear(); - inputs.add(right); - FormDataRegistry.registerForm(inputs, Forms.FORCE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // FormDataRegistry.registerForm(Forms.BREATHE); @@ -69,6 +65,5 @@ public static void registerForms() { inputs.add(KeyDataBuilder.createCombination(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP); } - } } From a419a0d362dbca2090e7d58169a9220b891b3380 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 10 Jun 2023 21:57:14 +1000 Subject: [PATCH 117/469] Refactoring and renaming Trying to fix the input module too --- .../java/com/amuzil/omegasource/magus/Magus.java | 4 ++-- .../magus/input/KeyboardMouseInputModule.java | 9 +++++---- .../magus/network/ClientPacketHandler.java | 4 ++-- .../omegasource/magus/radix/Condition.java | 2 +- .../omegasource/magus/radix/NodeBuilder.java | 16 +++++++++++++++- .../omegasource/magus/radix/TreeBuilder.java | 9 +++++++++ .../minecraft/forge/key/KeyHoldCondition.java | 5 +---- .../minecraft/forge/key/KeyPressCondition.java | 4 +--- .../omegasource/magus/server/ServerEvents.java | 14 +++++++------- .../skill/conditionals/ConditionBuilder.java | 10 ++++++++-- .../skill/conditionals/InputDataBuilder.java | 6 ++++-- .../magus/skill/forms/FormDataRegistry.java | 4 +--- .../listeners/KeyHeldModifierListener.java | 4 ++-- .../skill/test/avatar/AvatarFormRegistry.java | 6 ++++-- .../magus/skill/test/avatar/AvatarTreeTest.java | 4 ++++ 15 files changed, 66 insertions(+), 35 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/TreeBuilder.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index c4f2ced7..c2c1c01b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -5,7 +5,6 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; -import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -39,7 +38,8 @@ public class Magus { private static final Logger LOGGER = LogManager.getLogger(); //todo: move these to a better place - public static InputModule inputModule = new KeyboardMouseInputModule(); + //todo: make multiple input modules + public static InputModule keyboardInputModule = new KeyboardMouseInputModule(); public Magus() { // Register ourselves for server and other game events we are interested in diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index ec551a1e..4f82b93d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -19,6 +19,7 @@ import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; import org.apache.logging.log4j.LogManager; public class KeyboardMouseInputModule extends InputModule { @@ -97,9 +98,9 @@ public KeyboardMouseInputModule() { } } }; - MinecraftForge.EVENT_BUS.addListener(keyboardListener); - MinecraftForge.EVENT_BUS.addListener(mouseListener); - MinecraftForge.EVENT_BUS.addListener(tickEventConsumer); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); } private void sendModifierData() { @@ -130,7 +131,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx //reset conditions? // Magus.radixTree.burn(); }; - Condition formCondition = new ConditionBuilder() + Condition formCondition = ConditionBuilder.instance() .fromInputData(formExecutionInputs) .build(); if(formCondition != null) { diff --git a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java index 3cd63c05..afaefc6d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java @@ -27,7 +27,7 @@ public static boolean handlePacket(RegisterModifierListenersPacket packet, Suppl ctx.get().enqueueWork(() -> { packet.modifierTypes.forEach(modifierType -> { LogManager.getLogger().info("REGISTERING MODIFIER: " + modifierType); - Magus.inputModule.registerModifierListener(ModifiersRegistry.fromName(modifierType).listener(), packet.treeData); + Magus.keyboardInputModule.registerModifierListener(ModifiersRegistry.fromName(modifierType).listener(), packet.treeData); }); }); @@ -37,7 +37,7 @@ public static boolean handlePacket(RegisterModifierListenersPacket packet, Suppl public static boolean handlePacket(UnregisterModifierListenersPacket packet, Supplier ctx) { ctx.get().enqueueWork(() -> { LogManager.getLogger().info("UNREGISTERING MODIFIERS"); - Magus.inputModule.unregisterModifiers(); + Magus.keyboardInputModule.unregisterModifiers(); }); return true; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 59bd6973..a627c5eb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -7,7 +7,7 @@ public enum Result { NONE } - protected static final Runnable NO_OPERATION = () -> RadixUtil.getLogger().debug("Result: no operation"); + protected static final Runnable NO_OPERATION = () -> RadixUtil.getLogger().debug("Result: No Operation"); protected Runnable onSuccess; protected Runnable onFailure; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index 8a601b2a..f2c2bd49 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; +import com.mojang.datafixers.util.Pair; import java.util.*; import java.util.function.Consumer; @@ -47,13 +48,26 @@ public NodeBuilder addChild(Form form, Node child) { children.put(form, child); return this; } else { - throw cannot("have children"); + throw cannot("Have Children"); + } + } + + public NodeBuilder addChildren(Pair... children) { + if (type.canHaveChildren) { + for (Pair child : children) + addChild(child.getFirst(), child.getSecond()); + return this; } + else throw cannot("Have Children"); } public NodeBuilder addModifiers(List modifiers) { this.availableModifiers.addAll(modifiers); + return this; + } + public NodeBuilder addModifiers(Modifier... modifiers) { + Collections.addAll(this.availableModifiers, modifiers); return this; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/TreeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/TreeBuilder.java new file mode 100644 index 00000000..0fda50cb --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/TreeBuilder.java @@ -0,0 +1,9 @@ +package com.amuzil.omegasource.magus.radix; + + +/** + * Factory class used for adding + */ +public class TreeBuilder +{ +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 4df7ab73..3297e745 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -4,11 +4,8 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; -import com.mojang.blaze3d.platform.InputConstants.Key; -import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent.ClientTickEvent; -import org.lwjgl.glfw.GLFW; import java.util.function.Consumer; @@ -26,7 +23,7 @@ public KeyHoldCondition(int key, int duration, int timeout) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START) { - if (((KeyboardMouseInputModule) Magus.inputModule).keyPressed(key)) { + if (((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { this.currentHolding++; } if (this.currentHolding >= duration) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index 65ca825c..c8a79757 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -3,8 +3,6 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.RadixUtil; -import com.mojang.blaze3d.platform.InputConstants; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.fml.LogicalSide; @@ -21,7 +19,7 @@ public KeyPressCondition(int key, int timeout) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { - if(((KeyboardMouseInputModule)Magus.inputModule).keyPressed(key)) { + if(((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { // RadixUtil.getLogger().debug(InputConstants.getKey(key, -1).getName()); this.onSuccess.run(); } else if(current >= timeout) { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 2a0b3139..5d21c93e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -7,7 +7,6 @@ import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; -import com.amuzil.omegasource.magus.skill.util.capability.entity.LivingDataCapability; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -17,19 +16,20 @@ public class ServerEvents { @SubscribeEvent public static void onEntityJoinLevel(EntityJoinLevelEvent event) { - if(!event.getLevel().isClientSide()) { + if (!event.getLevel().isClientSide()) { Data capability = CapabilityHandler.getCapability(event.getEntity(), CapabilityHandler.LIVING_DATA); - if(capability != null) { + if (capability != null) { // initialise the radix tree and set the player as an instance property for sending packets. //todo this is temporary manual tree construction for testing purposes. the true tree will be // generated at runtime based on available skills for the player/entity. Node secondNode = NodeBuilder.middle() - .addModifier(ModifiersRegistry.FOCUS.copy()) - .addModifier(ModifiersRegistry.MULTI.copy()) - .addModifier(ModifiersRegistry.DIRECTION.copy()) - .addModifier(ModifiersRegistry.TARGET.copy()) + .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), + ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) .build(); + //Resets the tree; for testing purposes. + if (capability.getTree() != null) + capability.getTree().burn(); RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.FORCE, secondNode).build()); tree.setOwner(event.getEntity()); capability.setTree(tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 9210edca..ae0bde45 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; +import org.checkerframework.checker.units.qual.C; import java.util.LinkedList; import java.util.List; @@ -14,19 +15,24 @@ public class ConditionBuilder { private List conditionList = new LinkedList<>(); + private static ConditionBuilder builder; + + public static ConditionBuilder instance() { + if (builder == null) + builder = new ConditionBuilder(); + return builder; + } public ConditionBuilder() { } public ConditionBuilder fromInputData(List formExecutionInputs) { formExecutionInputs.forEach(inputData -> conditionList.addAll(PathBuilder.buildPathFrom(inputData))); - return this; } public ConditionBuilder fromInputData(InputData formExecutionInput) { conditionList.addAll(PathBuilder.buildPathFrom(formExecutionInput)); - return this; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java index 4c0610e2..5f43863f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.skill.conditionals; +import java.util.Collections; import java.util.LinkedList; -import java.util.List; /** * Designed as a factory class for taking InputDat and turning it into a linked list @@ -10,6 +10,8 @@ public class InputDataBuilder { public static LinkedList toInputs(InputData... data) { - return (LinkedList) List.of(data); + LinkedList out = new LinkedList<>(); + Collections.addAll(out, data); + return out; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index bf986ef6..b4d4fc3b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -2,8 +2,6 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.mojang.blaze3d.platform.InputConstants; import java.util.ArrayList; import java.util.HashMap; @@ -28,7 +26,7 @@ public static List getInputsForForm(Form formToModify) { } public static void registerForm(List inputs, Form form) { - Magus.inputModule.registerInputData(inputs, form); + Magus.keyboardInputModule.registerInputData(inputs, form); formTypes.put(inputs, form); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 7898c4b3..4031a663 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -48,7 +48,7 @@ public void setupListener(CompoundTag compoundTag) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - if (((KeyboardMouseInputModule)Magus.inputModule).keyPressed(keyToHold)) { + if (((KeyboardMouseInputModule)Magus.keyboardInputModule).keyPressed(keyToHold)) { this.isHeld = true; this.currentHolding++; } else { @@ -69,7 +69,7 @@ public boolean shouldCollectModifierData(TickEvent event) { //so that we send a packet to say we've stopped holding(for continuous cast ability support) if(!this.isHeld && this.wasHeld) { this.wasHeld = false; - Magus.inputModule.resetLastActivated(); + Magus.keyboardInputModule.resetLastActivated(); return true; } return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 1825a3bf..374b13ad 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -10,6 +10,8 @@ import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.KeyMapping; +import net.minecraft.client.Minecraft; import org.checkerframework.checker.units.qual.A; import java.util.ArrayList; @@ -20,9 +22,9 @@ public class AvatarFormRegistry { public static void registerForms() { - KeyInput left = KeyDataBuilder.createInput(InputConstants.getKey("key.mouse.left"), 0, + KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0, 0, 0); - KeyInput right = KeyDataBuilder.createInput(InputConstants.getKey("key.mouse.right"), 0, + KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0, 0, 0); LinkedList inputs = new LinkedList<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java new file mode 100644 index 00000000..e69876f3 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.test.avatar; + +public class AvatarTreeTest { +} From 5ed6b00383d179c77dcc85f0550a13b1ca64fb9a Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 13 Jun 2023 09:23:20 +1000 Subject: [PATCH 118/469] Working on adding mouse inputs --- .../magus/input/KeyboardMouseInputModule.java | 20 ++++++++++++++----- .../magus/radix/path/PathBuilder.java | 9 +++++++++ .../magus/server/ServerEvents.java | 4 +++- .../skill/conditionals/ConditionBuilder.java | 1 - .../conditionals/mouse/MouseDataBuilder.java | 4 ++++ .../skill/conditionals/mouse/MouseInput.java | 13 ++++++++++++ .../conditionals/mouse/MouseWheelInput.java | 4 ++++ .../omegasource/magus/skill/forms/Forms.java | 4 ++-- 8 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseWheelInput.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 4f82b93d..8d43211e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -8,10 +8,6 @@ import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; - -import java.util.*; -import java.util.function.Consumer; - import com.amuzil.omegasource.magus.skill.util.data.KeyboardData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; @@ -22,13 +18,22 @@ import net.minecraftforge.eventbus.api.EventPriority; import org.apache.logging.log4j.LogManager; +import java.util.*; +import java.util.function.Consumer; + public class KeyboardMouseInputModule extends InputModule { private final Consumer tickEventConsumer; - private final List glfwKeysDown; + private List glfwKeysDown; private static final Map movementKeys = new HashMap<>(); + + //How scroll delta works: every physical "tick" forwards on the mouse is 1.0, and backwards + // is -1.0. Therefore, you'd need a tracker over time, like a key held event, for the mouse wheel. + // Except you're not pressing it, you're spinning it.... + private double mouseScrollDelta; private final Consumer keyboardListener; private final Consumer mouseListener; + private final Consumer mouseScrollListener; private Form activeForm = null; private int ticksSinceActivated = 0; @@ -82,6 +87,10 @@ public KeyboardMouseInputModule() { } }; + this.mouseScrollListener = mouseScrollingEvent -> { + this.mouseScrollDelta = mouseScrollingEvent.getScrollDelta(); + }; + tickEventConsumer = tickEvent -> { ticksSinceModifiersSent++; if(ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { @@ -100,6 +109,7 @@ public KeyboardMouseInputModule() { }; MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseScrollingEvent.class, mouseScrollListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index f91759d1..8e0e6bb8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -9,6 +9,8 @@ import com.amuzil.omegasource.magus.skill.conditionals.key.KeyCombination; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyPermutation; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import net.minecraftforge.event.TickEvent; import java.util.HashMap; @@ -20,6 +22,7 @@ public class PathBuilder { private static final Map, Function>> CONDITION_BUILDERS = new HashMap<>(); static { + /* Keys. */ //TODO: Account for max delay registerBuilder(KeyInput.class, keyInput -> { // Minimum amount of ticks a key must be pressed for it to be considered a held condition. @@ -55,6 +58,12 @@ public class PathBuilder { combination -> combination.keys().stream().map(PathBuilder::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) ); + + /* Mouse */ +// registerBuilder(MouseInput.class, +// mouseInput -> ); +// registerBuilder(MouseWheelInput.class, +// mouseWheelInput -> ); } @SuppressWarnings("unchecked") diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 5d21c93e..3d95586d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -7,6 +7,7 @@ import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import com.mojang.datafixers.util.Pair; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -30,7 +31,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //Resets the tree; for testing purposes. if (capability.getTree() != null) capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.FORCE, secondNode).build()); + RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.FORCE, secondNode), + new Pair<>(Forms.STRIKE, secondNode)).build()); tree.setOwner(event.getEntity()); capability.setTree(tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index ae0bde45..5071a405 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -3,7 +3,6 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; -import org.checkerframework.checker.units.qual.C; import java.util.LinkedList; import java.util.List; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java new file mode 100644 index 00000000..727ad238 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +public class MouseDataBuilder { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java new file mode 100644 index 00000000..709c5218 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java @@ -0,0 +1,13 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +/** + * How we're going to do this: + * Mouse input is tracked 2D wise. If we need to track rotation, that's a separate thing for 3D. + * + * MouseInput, or the base layer, has a tiny snapshot of the player's mouse movement. + * MousePermutation is a longer input segment, or line. + * MouseCombination or MouseDrawing is a whole shape. + * Define a start and stop, or start position, direction, and how long the player has to move their mouse. + */ +public record MouseInput() { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseWheelInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseWheelInput.java new file mode 100644 index 00000000..ae0d291b --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseWheelInput.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +public record MouseWheelInput() { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 40b2bdca..474f5c4d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -17,8 +17,8 @@ public class Forms { public static final Form ARC = new Form("arc"); public static final Form COMPRESS = new Form("compress"); public static final Form EXPAND = new Form("expand"); - public static final Form SPIN = new Form("spin"); - public static final Form ROTATE = new Form("rotate"); + public static final Form TWIST = new Form("twist"); + public static final Form SWIRL = new Form("swirl"); public static final Form STRIKE = new Form("strike"); public static final Form FORCE = new Form("force"); public static final Form BREATHE = new Form("breathe"); From 4daeecc2e6099bc1e8c68ddfad5d032d31bc0770 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 14 Jun 2023 20:23:53 +1000 Subject: [PATCH 119/469] Investigating left click not working --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 1 + .../condition/minecraft/forge/key/KeyPressCondition.java | 1 - .../com/amuzil/omegasource/magus/server/ServerEvents.java | 4 ++-- .../magus/skill/conditionals/mouse/MouseInput.java | 2 ++ .../omegasource/magus/skill/forms/FormDataRegistry.java | 4 +++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 8d43211e..0a620442 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -159,6 +159,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx public void unregisterInputs() { MinecraftForge.EVENT_BUS.unregister(keyboardListener); MinecraftForge.EVENT_BUS.unregister(mouseListener); + MinecraftForge.EVENT_BUS.unregister(mouseScrollListener); MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); _formInputs.forEach((condition, form) -> condition.unregister()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index c8a79757..a3d95fba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -20,7 +20,6 @@ public KeyPressCondition(int key, int timeout) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { if(((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { - // RadixUtil.getLogger().debug(InputConstants.getKey(key, -1).getName()); this.onSuccess.run(); } else if(current >= timeout) { this.onFailure.run(); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 3d95586d..0a42d5ff 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -31,8 +31,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //Resets the tree; for testing purposes. if (capability.getTree() != null) capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.FORCE, secondNode), - new Pair<>(Forms.STRIKE, secondNode)).build()); + RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(//new Pair<>(Forms.FORCE, secondNode), + new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.BURST, secondNode)).build()); tree.setOwner(event.getEntity()); capability.setTree(tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java index 709c5218..4bdf5936 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java @@ -8,6 +8,8 @@ * MousePermutation is a longer input segment, or line. * MouseCombination or MouseDrawing is a whole shape. * Define a start and stop, or start position, direction, and how long the player has to move their mouse. + * + * Get a Bézier curve function working. This tracks input segments, then we path through the input segments. */ public record MouseInput() { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index b4d4fc3b..4ccace2e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.forms; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import java.util.ArrayList; @@ -28,11 +29,12 @@ public static List getInputsForForm(Form formToModify) { public static void registerForm(List inputs, Form form) { Magus.keyboardInputModule.registerInputData(inputs, form); formTypes.put(inputs, form); + Registries.registerForm(form); } public static void registerForm(InputData input, Form form) { List singleton = new ArrayList<>(); singleton.add(input); - formTypes.remove(singleton, form); + registerForm(singleton, form); } } From 0c5316f7c350bb60eea3a90cccf0319d7fa4b8ca Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 15 Jun 2023 04:02:58 +1000 Subject: [PATCH 120/469] Forms aren't working properly Joining a world claims it's missing registries, unsure what code i've changed that does this --- src/main/java/com/amuzil/omegasource/magus/Magus.java | 11 +++++++---- .../magus/input/KeyboardMouseInputModule.java | 4 ++-- .../com/amuzil/omegasource/magus/radix/Condition.java | 5 +++++ .../minecraft/forge/key/KeyPressCondition.java | 2 ++ .../omegasource/magus/radix/path/PathBuilder.java | 3 ++- .../amuzil/omegasource/magus/server/ServerEvents.java | 2 +- .../magus/skill/conditionals/key/KeyDataBuilder.java | 10 ++++++++++ .../magus/skill/forms/FormDataRegistry.java | 5 ++++- .../magus/skill/test/avatar/AvatarFormRegistry.java | 3 ++- .../magus/skill/test/avatar/AvatarTreeTest.java | 3 +++ .../magus/skill/util/data/KeyboardData.java | 4 +++- 11 files changed, 41 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index c2c1c01b..850619e8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -39,11 +39,13 @@ public class Magus { //todo: move these to a better place //todo: make multiple input modules - public static InputModule keyboardInputModule = new KeyboardMouseInputModule(); + public static InputModule keyboardInputModule; public Magus() { // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); + //Register the input module + keyboardInputModule = new KeyboardMouseInputModule(); // Register capabilities FMLJavaModLoadingContext.get().getModEventBus().addListener(CapabilityHandler::registerCapabilities); // attach capabilities @@ -59,10 +61,7 @@ public Magus() { //Assign input data to forms FormDataRegistry.init(); ModifiersRegistry.init(); - AvatarFormRegistry.registerForms(); - //todo call this anytime the key mappings are updated - KeyboardMouseInputModule.determineMotionKeys(); } @@ -74,6 +73,9 @@ private void setup(final FMLCommonSetupEvent event) { LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); + //todo call this anytime the key mappings are updated + KeyboardMouseInputModule.determineMotionKeys(); + } private void doClientStuff(final FMLClientSetupEvent event) { @@ -100,6 +102,7 @@ private void processIMC(final InterModProcessEvent event) { public void onServerStarting(FMLDedicatedServerSetupEvent event) { // do something when the server starts LOGGER.info("HELLO from server starting"); + AvatarFormRegistry.registerForms(); } // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 0a620442..e058263b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -68,7 +68,7 @@ public KeyboardMouseInputModule() { this.mouseListener = mouseEvent -> { int keyPressed = mouseEvent.getButton(); - if(!KeyboardData.ignore(keyPressed)) { + // if(!KeyboardData.ignore(keyPressed)) { switch (mouseEvent.getAction()) { case InputConstants.PRESS -> { glfwKeysDown.add(keyPressed); @@ -83,7 +83,7 @@ public KeyboardMouseInputModule() { glfwKeysDown.remove(glfwKeysDown.indexOf(keyPressed)); } } - } + // } } }; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index a627c5eb..ee49d24a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; + public abstract class Condition { public enum Result { SUCCESS, @@ -14,6 +16,8 @@ public enum Result { public void register(Runnable onSuccess, Runnable onFailure) { RadixUtil.getLogger().debug("Registering results"); + if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) + Thread.dumpStack(); this.onSuccess = () -> { // RadixUtil.getLogger().debug("Result: success"); onSuccess.run(); @@ -25,6 +29,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { } public void unregister() { + // Thread.dumpStack(); RadixUtil.getLogger().debug("Unregistering results"); // This should not cause any errors when called if the condition is // already unregistered or was never registered in the first place diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index a3d95fba..e2f4bc9e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -20,6 +20,8 @@ public KeyPressCondition(int key, int timeout) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { if(((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { + //What key is 0 hello??? + System.out.println(key); this.onSuccess.run(); } else if(current >= timeout) { this.onFailure.run(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 8e0e6bb8..8d814374 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -28,7 +28,8 @@ public class PathBuilder { // Minimum amount of ticks a key must be pressed for it to be considered a held condition. //TODO: Adjust these final int HELD_THRESHOLD = 3; - final int TIMEOUT_THRESHOLD = 50; + // 50 by default + final int TIMEOUT_THRESHOLD = 50000; LinkedList conditions = new LinkedList<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 0a42d5ff..fe5a0a1f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -31,7 +31,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //Resets the tree; for testing purposes. if (capability.getTree() != null) capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(//new Pair<>(Forms.FORCE, secondNode), + RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.BURST, secondNode)).build()); tree.setOwner(event.getEntity()); capability.setTree(tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java index 4c04629f..6137186f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java @@ -13,6 +13,16 @@ */ public class KeyDataBuilder { + /* Look at #InputConstants for key names, codes, and types. */ + + public static KeyInput createInput(int key, int minDelay, int maxDelay, int held) { + return new KeyInput(InputConstants.getKey(key, -1), minDelay, maxDelay, held); + } + + public static KeyInput createInput(String key, int minDelay, int maxDelay, int held) { + return new KeyInput(InputConstants.getKey(key), minDelay, maxDelay, held); + } + public static KeyInput createInput(InputConstants.Key key, int minDelay, int maxDelay, int held) { return new KeyInput(key, minDelay, maxDelay, held); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 4ccace2e..dac4cfc5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import net.minecraft.resources.ResourceLocation; import java.util.ArrayList; import java.util.HashMap; @@ -29,7 +30,9 @@ public static List getInputsForForm(Form formToModify) { public static void registerForm(List inputs, Form form) { Magus.keyboardInputModule.registerInputData(inputs, form); formTypes.put(inputs, form); - Registries.registerForm(form); + if (Registries.FORMS != null) + if (!Registries.FORMS.get().getValue(new ResourceLocation(form.name())).equals(form)) + Registries.registerForm(form); } public static void registerForm(InputData input, Form form) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 374b13ad..479e1275 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -26,6 +26,7 @@ public static void registerForms() { 0, 0); KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0, 0, 0); + KeyInput initialiser = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 0); LinkedList inputs = new LinkedList<>(); @@ -42,7 +43,7 @@ public static void registerForms() { KeyDataBuilder.createPermutation(left, right)); FormDataRegistry.registerForm(data, Forms.BURST); - // FormDataRegistry.registerForm(Forms.ARC); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); // FormDataRegistry.registerForm(Forms.COMPRESS); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java index e69876f3..9d07e8fd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java @@ -1,4 +1,7 @@ package com.amuzil.omegasource.magus.skill.test.avatar; +/** + * Tests out techniques using the radix tree. + */ public class AvatarTreeTest { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/KeyboardData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/KeyboardData.java index e295f83c..e3952832 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/KeyboardData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/KeyboardData.java @@ -10,7 +10,9 @@ public class KeyboardData { //Converts InputConstants key data into GLFW - //TODO: Configurable list of invalid keys + //TODO: Configurable list of invalid keys. + + //This is adjustable; we want to be cancelling GUI keys, not these keys. public static boolean ignore(int keyCode) { List invalidKeys = new ArrayList<>(); invalidKeys.add(KEY_A); From 421a74cb65688c1b1d8bb5a46a9ab2d1444137de Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 15 Jun 2023 14:52:37 +1000 Subject: [PATCH 121/469] Still confused --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 1 - .../amuzil/omegasource/magus/skill/forms/FormDataRegistry.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index e058263b..014dac22 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -171,7 +171,6 @@ public boolean keyPressed(int key) { public static void determineMotionKeys() { Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { if(keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { - LogManager.getLogger().info(keyMapping.getName()); movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); } }); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index dac4cfc5..53dd8b08 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -31,7 +31,7 @@ public static void registerForm(List inputs, Form form) { Magus.keyboardInputModule.registerInputData(inputs, form); formTypes.put(inputs, form); if (Registries.FORMS != null) - if (!Registries.FORMS.get().getValue(new ResourceLocation(form.name())).equals(form)) + if (Registries.FORMS.get().getValue(new ResourceLocation(form.name())) == null) Registries.registerForm(form); } From affbc6c0d7457caec67a67922fc9a04cb22340a1 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 15 Jun 2023 16:15:23 +1000 Subject: [PATCH 122/469] Updated MC versions --- build.gradle | 4 ++-- .../java/com/amuzil/omegasource/magus/Magus.java | 1 + .../magus/input/KeyboardMouseInputModule.java | 2 -- .../magus/skill/test/avatar/AvatarFormRegistry.java | 12 +++--------- src/main/resources/META-INF/mods.toml | 4 ++-- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index d9dcedda..11463483 100644 --- a/build.gradle +++ b/build.gradle @@ -40,7 +40,7 @@ minecraft { // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. - mappings channel: 'official', version: '1.19.2' + mappings channel: 'official', version: '1.19.4' // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. @@ -143,7 +143,7 @@ dependencies { // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. - minecraft 'net.minecraftforge:forge:1.19.2-43.1.1' + minecraft 'net.minecraftforge:forge:1.19.4-45.1.0' // Real mod deobf dependency examples - these get remapped to your current mappings // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 850619e8..ced2bbf5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -124,6 +124,7 @@ public static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); + AvatarFormRegistry.registerForms(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 014dac22..a3cc2c55 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -4,11 +4,9 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.util.data.KeyboardData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 479e1275..c9495bf3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -3,20 +3,14 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyCombination; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyPermutation; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.mojang.blaze3d.platform.InputConstants; -import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; -import org.checkerframework.checker.units.qual.A; -import java.util.ArrayList; import java.util.LinkedList; -import java.util.List; import java.util.Map; public class AvatarFormRegistry { @@ -41,7 +35,7 @@ public static void registerForms() { LinkedList data = InputDataBuilder.toInputs( KeyDataBuilder.createPermutation(left, right)); - FormDataRegistry.registerForm(data, Forms.BURST); + // FormDataRegistry.registerForm(data, Forms.BURST); FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); @@ -51,9 +45,9 @@ public static void registerForms() { // FormDataRegistry.registerForm(Forms.ROTATE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); + // FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); + // FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // FormDataRegistry.registerForm(Forms.BREATHE); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 94c25d7d..e8b14c59 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -49,7 +49,7 @@ description='''Skill API part of Magus.''' # Does this dependency have to exist - if not, ordering below must be specified mandatory=true #mandatory # The version range of the dependency - versionRange="[43,)" #mandatory + versionRange="[45,)" #mandatory # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory ordering="NONE" # Side this dependency is applied on - BOTH, CLIENT or SERVER @@ -59,6 +59,6 @@ description='''Skill API part of Magus.''' modId="minecraft" mandatory=true # This version range declares a minimum of the current minecraft version up to but not including the next major version - versionRange="[1.19.2,1.20)" + versionRange="[1.19.4,1.20)" ordering="NONE" side="BOTH" From 65ba1000646b57c8eeed4cfa2fca8039aca024a0 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 15 Jun 2023 16:49:42 +1000 Subject: [PATCH 123/469] Forms aren't triggering reliably. Tree traversal is working, however. --- .../com/amuzil/omegasource/magus/Magus.java | 3 +- .../magus/input/KeyboardMouseInputModule.java | 14 +++++- .../omegasource/magus/radix/Condition.java | 6 +-- .../forge/key/KeyPressCondition.java | 2 +- .../magus/server/ServerEvents.java | 45 +++++++++++-------- .../skill/test/avatar/AvatarFormRegistry.java | 6 +-- 6 files changed, 46 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index ced2bbf5..10ad2caf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -75,6 +75,7 @@ private void setup(final FMLCommonSetupEvent event) { //todo call this anytime the key mappings are updated KeyboardMouseInputModule.determineMotionKeys(); + AvatarFormRegistry.registerForms(); } @@ -102,7 +103,6 @@ private void processIMC(final InterModProcessEvent event) { public void onServerStarting(FMLDedicatedServerSetupEvent event) { // do something when the server starts LOGGER.info("HELLO from server starting"); - AvatarFormRegistry.registerForms(); } // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD @@ -124,7 +124,6 @@ public static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); - AvatarFormRegistry.registerForms(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index a3cc2c55..9eefa3c8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -4,6 +4,8 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixUtil; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -96,6 +98,11 @@ public KeyboardMouseInputModule() { } if(activeForm != null) { ticksSinceActivated++; +// _formInputs.forEach(((condition, form) -> { +// RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? +// "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); +// RadixUtil.getLogger().debug("Form: " + form.name()); +// })); if(ticksSinceActivated >= tickActivationThreshold) { LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); MagusNetwork.sendToServer(new FormActivatedPacket(activeForm)); @@ -127,9 +134,12 @@ public void registerInputData(List formExecutionInputs, Form formToEx if(mc.level != null) { //this section is to prevent re-activating // single condition forms when you hold the activation key for Held modifiers - if(formToExecute != lastActivatedForm) { + + //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. + // if(formToExecute != lastActivatedForm) { activeForm = formToExecute; - } + //} + ticksSinceActivated = 0; } //reset condition? diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index ee49d24a..c96c1df0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -1,7 +1,5 @@ package com.amuzil.omegasource.magus.radix; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; - public abstract class Condition { public enum Result { SUCCESS, @@ -16,8 +14,8 @@ public enum Result { public void register(Runnable onSuccess, Runnable onFailure) { RadixUtil.getLogger().debug("Registering results"); - if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) - Thread.dumpStack(); +// if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) +// Thread.dumpStack(); this.onSuccess = () -> { // RadixUtil.getLogger().debug("Result: success"); onSuccess.run(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index e2f4bc9e..d56bbf30 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -21,7 +21,7 @@ public KeyPressCondition(int key, int timeout) { if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { if(((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { //What key is 0 hello??? - System.out.println(key); + // System.out.println(key); this.onSuccess.run(); } else if(current >= timeout) { this.onFailure.run(); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index fe5a0a1f..67664894 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -1,44 +1,53 @@ package com.amuzil.omegasource.magus.server; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; import com.mojang.datafixers.util.Pair; import net.minecraftforge.event.entity.EntityJoinLevelEvent; +import net.minecraftforge.event.level.LevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber public class ServerEvents { + @SubscribeEvent + public static void worldStart(LevelEvent event) { + + } @SubscribeEvent public static void onEntityJoinLevel(EntityJoinLevelEvent event) { if (!event.getLevel().isClientSide()) { + Data capability = CapabilityHandler.getCapability(event.getEntity(), CapabilityHandler.LIVING_DATA); if (capability != null) { - // initialise the radix tree and set the player as an instance property for sending packets. - //todo this is temporary manual tree construction for testing purposes. the true tree will be - // generated at runtime based on available skills for the player/entity. - Node secondNode = NodeBuilder.middle() - .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), - ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) - .build(); - //Resets the tree; for testing purposes. - if (capability.getTree() != null) - capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), - new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.BURST, secondNode)).build()); - tree.setOwner(event.getEntity()); - capability.setTree(tree); - - //todo this is not be where we should call start, but for now it'll stop us crashing until - // we have a key for activating the bending state - capability.getTree().start(); +// // initialise the radix tree and set the player as an instance property for sending packets. +// //todo this is temporary manual tree construction for testing purposes. the true tree will be +// // generated at runtime based on available skills for the player/entity. +// Node secondNode = NodeBuilder.middle() +// .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), +// ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) +// .build(); +// //Resets the tree; for testing purposes. +// if (capability.getTree() != null) +// capability.getTree().burn(); +// RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), +// new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.FORCE, secondNode), +// new Pair<>(Forms.BURST, secondNode), new Pair<>(Forms.STEP, secondNode)).build()); +// tree.setOwner(event.getEntity()); +// capability.setTree(tree); +// +// //todo this is not be where we should call start, but for now it'll stop us crashing until +// // we have a key for activating the bending state +// capability.getTree().start(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index c9495bf3..47f8a7c0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -47,7 +47,7 @@ public static void registerForms() { // FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - // FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); + // FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // FormDataRegistry.registerForm(Forms.BREATHE); @@ -57,8 +57,8 @@ public static void registerForms() { for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { inputs.clear(); KeyInput first, second; - first = KeyDataBuilder.createInput(InputConstants.getKey(key.getKey()), 0, 10, 0); - second = KeyDataBuilder.createInput(InputConstants.getKey(key.getKey()), 0, 0, 0); + first = KeyDataBuilder.createInput(key.getValue(), 0, 10, 0); + second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); inputs.add(KeyDataBuilder.createCombination(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP); } From 66c6dc84b2bea46b3f0b1b4f677daecd9c5a518c Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 21 Jun 2023 23:22:44 +1000 Subject: [PATCH 124/469] Input module errors It just doesn't work rn --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 7 ++++--- .../magus/skill/test/avatar/AvatarFormRegistry.java | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 9eefa3c8..470ba261 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -4,8 +4,6 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.RadixUtil; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -35,6 +33,8 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer mouseListener; private final Consumer mouseScrollListener; + // List of fulfilled forms. activeForm is the most complex fulfilled form. + private List fulfilledForms = new ArrayList(); private Form activeForm = null; private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; @@ -136,9 +136,10 @@ public void registerInputData(List formExecutionInputs, Form formToEx // single condition forms when you hold the activation key for Held modifiers //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. + // I.e account for modifiers here. // if(formToExecute != lastActivatedForm) { activeForm = formToExecute; - //} + // } ticksSinceActivated = 0; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 47f8a7c0..16d1f554 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -35,7 +35,7 @@ public static void registerForms() { LinkedList data = InputDataBuilder.toInputs( KeyDataBuilder.createPermutation(left, right)); - // FormDataRegistry.registerForm(data, Forms.BURST); + FormDataRegistry.registerForm(data, Forms.BURST); FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); @@ -45,9 +45,9 @@ public static void registerForms() { // FormDataRegistry.registerForm(Forms.ROTATE); - // FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - // FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // FormDataRegistry.registerForm(Forms.BREATHE); From 13e2f9052c42a70d1dbaeecfab176094f23df308 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 22 Jun 2023 16:41:57 +1000 Subject: [PATCH 125/469] Debugging. --- .../java/com/amuzil/omegasource/magus/Magus.java | 10 +++++----- .../magus/input/KeyboardMouseInputModule.java | 12 +++++++----- .../amuzil/omegasource/magus/radix/Condition.java | 2 +- .../minecraft/forge/key/KeyHoldCondition.java | 5 ++++- .../minecraft/forge/key/KeyPressCondition.java | 9 ++++++--- .../magus/skill/forms/FormDataRegistry.java | 3 --- .../amuzil/omegasource/magus/skill/forms/Forms.java | 2 ++ 7 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 10ad2caf..0ae4785c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -59,10 +60,10 @@ public Magus() { // Register the doClientStuff method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); //Assign input data to forms + Forms.init(); FormDataRegistry.init(); ModifiersRegistry.init(); - } private void setup(final FMLCommonSetupEvent event) { @@ -73,14 +74,13 @@ private void setup(final FMLCommonSetupEvent event) { LOGGER.info("HELLO FROM PRE INIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); - //todo call this anytime the key mappings are updated - KeyboardMouseInputModule.determineMotionKeys(); - AvatarFormRegistry.registerForms(); - } private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client + //todo call this anytime the key mappings are updated + KeyboardMouseInputModule.determineMotionKeys(); + AvatarFormRegistry.registerForms(); } private void enqueueIMC(final InterModEnqueueEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 470ba261..494b7340 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -4,6 +4,8 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixUtil; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -98,11 +100,11 @@ public KeyboardMouseInputModule() { } if(activeForm != null) { ticksSinceActivated++; -// _formInputs.forEach(((condition, form) -> { -// RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? -// "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); -// RadixUtil.getLogger().debug("Form: " + form.name()); -// })); + _formInputs.forEach(((condition, form) -> { + RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? + "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); + RadixUtil.getLogger().debug("Form: " + form.name()); + })); if(ticksSinceActivated >= tickActivationThreshold) { LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); MagusNetwork.sendToServer(new FormActivatedPacket(activeForm)); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index c96c1df0..333f1e87 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -27,7 +27,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { } public void unregister() { - // Thread.dumpStack(); + Thread.dumpStack(); RadixUtil.getLogger().debug("Unregistering results"); // This should not cause any errors when called if the condition is // already unregistered or was never registered in the first place diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 3297e745..acee623f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -5,7 +5,9 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.ClientTickEvent; +import net.minecraftforge.eventbus.api.EventPriority; import java.util.function.Consumer; @@ -41,7 +43,8 @@ public KeyHoldCondition(int key, int duration, int timeout) { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); - MinecraftForge.EVENT_BUS.addListener(clientTickListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, + clientTickListener); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index d56bbf30..28404f55 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.fml.LogicalSide; import java.util.function.Consumer; @@ -16,12 +17,13 @@ public class KeyPressCondition extends Condition { public KeyPressCondition(int key, int timeout) { this.key = key; + System.out.println("Current Key: " + key); this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { - if(((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { + if(((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(getKey())) { //What key is 0 hello??? - // System.out.println(key); + System.out.println(getKey()); this.onSuccess.run(); } else if(current >= timeout) { this.onFailure.run(); @@ -39,7 +41,8 @@ public int getKey() { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); - MinecraftForge.EVENT_BUS.addListener(clientTickListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, + clientTickListener); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 53dd8b08..e2b971e1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -30,9 +30,6 @@ public static List getInputsForForm(Form formToModify) { public static void registerForm(List inputs, Form form) { Magus.keyboardInputModule.registerInputData(inputs, form); formTypes.put(inputs, form); - if (Registries.FORMS != null) - if (Registries.FORMS.get().getValue(new ResourceLocation(form.name())) == null) - Registries.registerForm(form); } public static void registerForm(InputData input, Form form) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 474f5c4d..3359acb3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -28,4 +28,6 @@ public class Forms { //These two may not be necessary. public static final Form MENU = new Form("menu"); public static final Form HOTKEY = new Form("hotkey"); + + public static void init(){} } From b8e831b761953af178d080f6c266726d0c0e6ddd Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 22 Jun 2023 17:13:38 +1000 Subject: [PATCH 126/469] More debugging --- .../condition/minecraft/forge/key/KeyPressCondition.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index 28404f55..0ef47d7a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixUtil; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.EventPriority; @@ -17,7 +18,6 @@ public class KeyPressCondition extends Condition { public KeyPressCondition(int key, int timeout) { this.key = key; - System.out.println("Current Key: " + key); this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { @@ -41,6 +41,7 @@ public int getKey() { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); + RadixUtil.getLogger().debug("Current Key upon registration: " + getKey()); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); } @@ -48,6 +49,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { @Override public void unregister() { super.unregister(); + RadixUtil.getLogger().debug("Current Key upon registration: " + getKey()); MinecraftForge.EVENT_BUS.unregister(clientTickListener); } } From 68dd13a23d33d7cc2b4a8d324300c2c78d86581b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 22 Jun 2023 17:27:39 +1000 Subject: [PATCH 127/469] more debugging --- .../radix/condition/minecraft/forge/key/KeyPressCondition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index 0ef47d7a..e91ad20c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -49,7 +49,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { @Override public void unregister() { super.unregister(); - RadixUtil.getLogger().debug("Current Key upon registration: " + getKey()); + RadixUtil.getLogger().debug("Current Key upon deregistration: " + getKey()); MinecraftForge.EVENT_BUS.unregister(clientTickListener); } } From 9be12bd3c5a1a3dff059716f6a407bb569e40a34 Mon Sep 17 00:00:00 2001 From: Aidan Date: Thu, 27 Jul 2023 22:04:19 +0100 Subject: [PATCH 128/469] WIP Changes --- .../com/amuzil/omegasource/magus/Magus.java | 5 +- .../magus/input/KeyboardMouseInputModule.java | 1 + .../omegasource/magus/radix/Condition.java | 6 +-- .../radix/condition/ChainedCondition.java | 2 + .../magus/server/ServerEvents.java | 47 +++++++++++-------- .../skill/test/avatar/AvatarFormRegistry.java | 1 - 6 files changed, 36 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 0ae4785c..010e4a27 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -79,8 +79,6 @@ private void setup(final FMLCommonSetupEvent event) { private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client //todo call this anytime the key mappings are updated - KeyboardMouseInputModule.determineMotionKeys(); - AvatarFormRegistry.registerForms(); } private void enqueueIMC(final InterModEnqueueEvent event) { @@ -123,6 +121,9 @@ public static class ClientModEvents { public static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); + + KeyboardMouseInputModule.determineMotionKeys(); + LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 494b7340..d0dfac1a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -140,6 +140,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. // I.e account for modifiers here. // if(formToExecute != lastActivatedForm) { + LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); activeForm = formToExecute; // } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 333f1e87..a12861ab 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -17,17 +17,17 @@ public void register(Runnable onSuccess, Runnable onFailure) { // if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) // Thread.dumpStack(); this.onSuccess = () -> { - // RadixUtil.getLogger().debug("Result: success"); + RadixUtil.getLogger().debug("Result: success"); onSuccess.run(); }; this.onFailure = () -> { - //RadixUtil.getLogger().debug("Result: failure"); + RadixUtil.getLogger().debug("Result: failure"); onFailure.run(); }; } public void unregister() { - Thread.dumpStack(); +// Thread.dumpStack(); RadixUtil.getLogger().debug("Unregistering results"); // This should not cause any errors when called if the condition is // already unregistered or was never registered in the first place diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 7ab04c1f..eda6dcd1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition; import com.amuzil.omegasource.magus.radix.Condition; +import org.apache.logging.log4j.LogManager; import java.util.List; @@ -21,6 +22,7 @@ public ChainedCondition(List chainedConditions) { public void finishCurrentCondition() { if(currentCondition == null) return; + LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); currentCondition.unregister(); if(currentConditionIndex == (chainedConditions.size() - 1)) { onCompleteSuccess.run(); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 67664894..939dd48f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -10,6 +10,7 @@ import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; import com.mojang.datafixers.util.Pair; +import net.minecraft.world.entity.player.Player; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.level.LevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -24,30 +25,36 @@ public static void worldStart(LevelEvent event) { } @SubscribeEvent public static void onEntityJoinLevel(EntityJoinLevelEvent event) { - if (!event.getLevel().isClientSide()) { + if (!event.getLevel().isClientSide()) { Data capability = CapabilityHandler.getCapability(event.getEntity(), CapabilityHandler.LIVING_DATA); if (capability != null) { -// // initialise the radix tree and set the player as an instance property for sending packets. -// //todo this is temporary manual tree construction for testing purposes. the true tree will be -// // generated at runtime based on available skills for the player/entity. -// Node secondNode = NodeBuilder.middle() -// .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), -// ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) -// .build(); -// //Resets the tree; for testing purposes. -// if (capability.getTree() != null) -// capability.getTree().burn(); -// RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), -// new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.FORCE, secondNode), -// new Pair<>(Forms.BURST, secondNode), new Pair<>(Forms.STEP, secondNode)).build()); -// tree.setOwner(event.getEntity()); -// capability.setTree(tree); -// -// //todo this is not be where we should call start, but for now it'll stop us crashing until -// // we have a key for activating the bending state -// capability.getTree().start(); + + // initialise the radix tree and set the player as an instance property for sending packets. + //todo this is temporary manual tree construction for testing purposes. the true tree will be + // generated at runtime based on available skills for the player/entity. + Node secondNode = NodeBuilder.middle() + .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), + ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) + .build(); + //Resets the tree; for testing purposes. + if (capability.getTree() != null) + capability.getTree().burn(); + RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), + new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.FORCE, secondNode), + new Pair<>(Forms.BURST, secondNode), new Pair<>(Forms.STEP, secondNode)).build()); + tree.setOwner(event.getEntity()); + capability.setTree(tree); + + //todo this is not be where we should call start, but for now it'll stop us crashing until + // we have a key for activating the bending state + capability.getTree().start(); + } + } + else { + if(event.getEntity() instanceof Player) { + AvatarFormRegistry.registerForms(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 16d1f554..e05b6f2b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -7,7 +7,6 @@ import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; -import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import java.util.LinkedList; From cbc5a794be0ae0342585c07138348f871b743ade Mon Sep 17 00:00:00 2001 From: Aidan Date: Sun, 20 Aug 2023 16:27:11 +0100 Subject: [PATCH 129/469] reworked chained condition --- .../radix/condition/ChainedCondition.java | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index eda6dcd1..c57e625b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -14,24 +14,41 @@ public class ChainedCondition extends Condition { private Condition currentCondition = null; private final Runnable onPartialSuccess; + private final Runnable onPartialFailure; public ChainedCondition(List chainedConditions) { this.chainedConditions = chainedConditions; this.onPartialSuccess = this::finishCurrentCondition; + this.onPartialFailure = this::reset; } - public void finishCurrentCondition() { + private void finishCurrentCondition() { if(currentCondition == null) return; LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); currentCondition.unregister(); - if(currentConditionIndex == (chainedConditions.size() - 1)) { + if (currentConditionIndex == (chainedConditions.size() - 1)) { onCompleteSuccess.run(); currentConditionIndex = 0; } else { currentConditionIndex++; - currentCondition = chainedConditions.get(currentConditionIndex); - currentCondition.register(onPartialSuccess, onCompleteFailure); } + currentCondition = chainedConditions.get(currentConditionIndex); + if(currentConditionIndex == chainedConditions.size() - 1) { + currentCondition.register(onPartialSuccess, () -> { + reset(); + onCompleteFailure.run(); + }); + } else { + currentCondition.register(onPartialSuccess, onPartialFailure); + } + + } + + private void reset() { + currentConditionIndex = 0; + currentCondition.unregister(); + currentCondition = chainedConditions.get(currentConditionIndex); + currentCondition.register(onPartialSuccess, onPartialFailure); } @Override @@ -39,10 +56,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { this.onCompleteSuccess = onSuccess; this.onCompleteFailure = onFailure; currentCondition = chainedConditions.get(currentConditionIndex); - currentCondition.register(onPartialSuccess, () -> { - // todo: if we dont want to completely fail the chain then this method can be expanded. - onCompleteFailure.run(); - }); + currentCondition.register(onPartialSuccess, onPartialFailure); } @Override From cf11f05ba1c637143c1260bf84dafadc541c28ee Mon Sep 17 00:00:00 2001 From: Aidan Date: Sun, 20 Aug 2023 17:46:38 +0100 Subject: [PATCH 130/469] minute change --- .../omegasource/magus/radix/condition/ChainedCondition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index c57e625b..ce9e1872 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -35,7 +35,7 @@ private void finishCurrentCondition() { currentCondition = chainedConditions.get(currentConditionIndex); if(currentConditionIndex == chainedConditions.size() - 1) { currentCondition.register(onPartialSuccess, () -> { - reset(); + onPartialFailure.run(); onCompleteFailure.run(); }); } else { From 46f640590d286110b44e6bb378c23749756cbc10 Mon Sep 17 00:00:00 2001 From: Aidan Date: Sun, 20 Aug 2023 20:50:06 +0100 Subject: [PATCH 131/469] fixed successful chained condition not being reset --- .../omegasource/magus/radix/condition/ChainedCondition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index ce9e1872..06992f18 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -34,7 +34,7 @@ private void finishCurrentCondition() { } currentCondition = chainedConditions.get(currentConditionIndex); if(currentConditionIndex == chainedConditions.size() - 1) { - currentCondition.register(onPartialSuccess, () -> { + currentCondition.register(onCompleteSuccess, () -> { onPartialFailure.run(); onCompleteFailure.run(); }); From d13d776fc66e1930d2d792e58c7e53e571680ac2 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 29 Aug 2023 00:14:27 +1000 Subject: [PATCH 132/469] test method --- .../omegasource/magus/skill/test/avatar/AvatarTreeTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java index 9d07e8fd..5ca41fec 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java @@ -4,4 +4,9 @@ * Tests out techniques using the radix tree. */ public class AvatarTreeTest { + + public static void registerTechniques() { + + //Air Gust: Arc > Strike + } } From dc711659b512a963daa83fe271c3b72d339b3f95 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 31 Aug 2023 00:08:55 +1000 Subject: [PATCH 133/469] Fixed the condition builder. Single input forms now work correctly in parallel. Except for Strike. --- .../magus/input/KeyboardMouseInputModule.java | 16 +++++++--- .../radix/condition/ChainedCondition.java | 1 + .../forge/key/KeyPressCondition.java | 1 + .../magus/server/ServerEvents.java | 6 ++-- .../skill/conditionals/ConditionBuilder.java | 19 +++++++++-- .../skill/test/avatar/AvatarFormRegistry.java | 32 ++++++++++--------- 6 files changed, 50 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index d0dfac1a..881c4dbf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -41,8 +41,9 @@ public class KeyboardMouseInputModule extends InputModule { private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; - //todo make these thresholds configurable + //todo make these thresholds configurable and make them longer. Especially the timeout threshold. private final int tickActivationThreshold = 4; + private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; Minecraft mc = Minecraft.getInstance(); @@ -113,6 +114,13 @@ public KeyboardMouseInputModule() { ticksSinceActivated = 0; } } + else { + ticksSinceActivated++; + if (ticksSinceActivated >= tickTimeoutThreshold) { + lastActivatedForm = null; + ticksSinceActivated = 0; + } + } }; MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); @@ -139,14 +147,14 @@ public void registerInputData(List formExecutionInputs, Form formToEx //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. // I.e account for modifiers here. - // if(formToExecute != lastActivatedForm) { + if(formToExecute != lastActivatedForm) { LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); activeForm = formToExecute; - // } + } ticksSinceActivated = 0; } - //reset condition? + //Reset condition }; Runnable onFailure = () -> { activeForm = null; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 06992f18..d1453a4b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -17,6 +17,7 @@ public class ChainedCondition extends Condition { private final Runnable onPartialFailure; public ChainedCondition(List chainedConditions) { + Thread.dumpStack(); this.chainedConditions = chainedConditions; this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index e91ad20c..8722f89a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -50,6 +50,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { public void unregister() { super.unregister(); RadixUtil.getLogger().debug("Current Key upon deregistration: " + getKey()); + Thread.dumpStack(); MinecraftForge.EVENT_BUS.unregister(clientTickListener); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 939dd48f..5cf8bf14 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -41,9 +41,9 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //Resets the tree; for testing purposes. if (capability.getTree() != null) capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), - new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.FORCE, secondNode), - new Pair<>(Forms.BURST, secondNode), new Pair<>(Forms.STEP, secondNode)).build()); + RadixTree tree = new RadixTree(NodeBuilder.root().build());//NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode)).build());//, +// new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.FORCE, secondNode), +// new Pair<>(Forms.BURST, secondNode)).build()); tree.setOwner(event.getEntity()); capability.setTree(tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 5071a405..68f5f54b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -36,9 +36,22 @@ public ConditionBuilder fromInputData(InputData formExecutionInput) { } public Condition build() { - if(conditionList.size() == 0) return null; - if(conditionList.size() == 1) return conditionList.get(0); + //Creates a copy of the list - return new ChainedCondition(conditionList); + List conditions = conditionList.stream().toList(); + + //Resets the builder + reset(); + + if(conditions.size() == 0) + return null; + if(conditions.size() == 1) + return conditions.get(0); + + return new ChainedCondition(conditions); + } + + public void reset() { + conditionList = new LinkedList<>(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index e05b6f2b..b9fdfab0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.magus.skill.test.avatar; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; @@ -10,7 +9,6 @@ import net.minecraft.client.Minecraft; import java.util.LinkedList; -import java.util.Map; public class AvatarFormRegistry { @@ -23,7 +21,6 @@ public static void registerForms() { LinkedList inputs = new LinkedList<>(); - //FormDataRegistry.registerForm(Forms.PUSH); //FormDataRegistry.registerForm(Forms.PULL); @@ -34,13 +31,13 @@ public static void registerForms() { LinkedList data = InputDataBuilder.toInputs( KeyDataBuilder.createPermutation(left, right)); - FormDataRegistry.registerForm(data, Forms.BURST); + // FormDataRegistry.registerForm(data, Forms.BURST); FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); - // FormDataRegistry.registerForm(Forms.COMPRESS); + // FormDataRegistry.registerForm(Forms.COMPRESS); - // FormDataRegistry.registerForm(Forms.EXPAND); + // FormDataRegistry.registerForm(Forms.EXPAND); // FormDataRegistry.registerForm(Forms.ROTATE); @@ -48,18 +45,23 @@ public static void registerForms() { FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); - // FormDataRegistry.registerForm(Forms.BREATHE); + // FormDataRegistry.registerForm(Forms.BREATHE); //Motion! 7 different movement options. // Left, right, up, down, jump, sneak, sprint. - for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { - inputs.clear(); - KeyInput first, second; - first = KeyDataBuilder.createInput(key.getValue(), 0, 10, 0); - second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); - inputs.add(KeyDataBuilder.createCombination(first, second)); - FormDataRegistry.registerForm(inputs, Forms.STEP); - } +// for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { +// inputs.clear(); +// KeyInput first, second; +// first = KeyDataBuilder.createInput(key.getValue(), 0, 10, 0); +// second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); +// inputs.add(KeyDataBuilder.createCombination(first, second)); +// FormDataRegistry.registerForm(inputs, Forms.STEP); +// } +// KeyInput first, second; +// first = KeyDataBuilder.createInput("key.keyboard.a", 0, 10, 0); +// second = KeyDataBuilder.createInput("key.keyboard.a", 0, 0, 0); +// inputs.add(KeyDataBuilder.createCombination(first, second)); +// FormDataRegistry.registerForm(inputs, Forms.STEP); } } From 5f1d6be2c9b235307cae89638b67723afc437ca8 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 31 Aug 2023 00:26:53 +1000 Subject: [PATCH 134/469] Strike now works, abstraction. --- .../magus/input/KeyboardMouseInputModule.java | 17 +++++++++++++++-- .../skill/test/avatar/AvatarFormRegistry.java | 10 +++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 881c4dbf..32108cfd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -83,7 +83,7 @@ public KeyboardMouseInputModule() { } case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.remove(glfwKeysDown.indexOf(keyPressed)); + glfwKeysDown.remove((Integer) keyPressed); } } // } @@ -96,9 +96,12 @@ public KeyboardMouseInputModule() { tickEventConsumer = tickEvent -> { ticksSinceModifiersSent++; - if(ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { + if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { sendModifierData(); } + + cleanMCKeys(); + if(activeForm != null) { ticksSinceActivated++; _formInputs.forEach(((condition, form) -> { @@ -137,6 +140,16 @@ private void sendModifierData() { } } + public void cleanMCKeys() { + // Fixes some weird mouse and other key issues. + for (KeyMapping key : Minecraft.getInstance().options.keyMappings) { + if (!key.isDown()) { + if (glfwKeysDown.contains(key.getKey().getValue())) + glfwKeysDown.remove((Integer) key.getKey().getValue()); + } + } + } + @Override public void registerInputData(List formExecutionInputs, Form formToExecute) { //generate condition from InputData. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index b9fdfab0..b0b9bf81 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -58,10 +58,10 @@ public static void registerForms() { // inputs.add(KeyDataBuilder.createCombination(first, second)); // FormDataRegistry.registerForm(inputs, Forms.STEP); // } -// KeyInput first, second; -// first = KeyDataBuilder.createInput("key.keyboard.a", 0, 10, 0); -// second = KeyDataBuilder.createInput("key.keyboard.a", 0, 0, 0); -// inputs.add(KeyDataBuilder.createCombination(first, second)); -// FormDataRegistry.registerForm(inputs, Forms.STEP); + KeyInput first, second; + first = KeyDataBuilder.createInput("key.keyboard.a", 0, 10, 0); + second = KeyDataBuilder.createInput("key.keyboard.a", 0, 0, 0); + inputs.add(KeyDataBuilder.createCombination(first, second)); + FormDataRegistry.registerForm(inputs, Forms.STEP); } } From 4773003636db4c6a62ce23ee78e42facec399157 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 31 Aug 2023 00:31:48 +1000 Subject: [PATCH 135/469] Conditions now work, removing debugging. --- .../magus/input/KeyboardMouseInputModule.java | 12 ++++---- .../omegasource/magus/radix/Condition.java | 4 +-- .../radix/condition/ChainedCondition.java | 1 - .../forge/key/KeyPressCondition.java | 7 ++--- .../skill/test/avatar/AvatarFormRegistry.java | 28 ++++++++++--------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 32108cfd..661df96d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -104,11 +104,11 @@ public KeyboardMouseInputModule() { if(activeForm != null) { ticksSinceActivated++; - _formInputs.forEach(((condition, form) -> { - RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? - "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); - RadixUtil.getLogger().debug("Form: " + form.name()); - })); +// _formInputs.forEach(((condition, form) -> { +// RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? +// "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); +// RadixUtil.getLogger().debug("Form: " + form.name()); +// })); if(ticksSinceActivated >= tickActivationThreshold) { LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); MagusNetwork.sendToServer(new FormActivatedPacket(activeForm)); @@ -161,7 +161,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. // I.e account for modifiers here. if(formToExecute != lastActivatedForm) { - LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); + //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); activeForm = formToExecute; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index a12861ab..774a4970 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -17,11 +17,11 @@ public void register(Runnable onSuccess, Runnable onFailure) { // if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) // Thread.dumpStack(); this.onSuccess = () -> { - RadixUtil.getLogger().debug("Result: success"); + //RadixUtil.getLogger().debug("Result: success"); onSuccess.run(); }; this.onFailure = () -> { - RadixUtil.getLogger().debug("Result: failure"); + //RadixUtil.getLogger().debug("Result: failure"); onFailure.run(); }; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index d1453a4b..06992f18 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -17,7 +17,6 @@ public class ChainedCondition extends Condition { private final Runnable onPartialFailure; public ChainedCondition(List chainedConditions) { - Thread.dumpStack(); this.chainedConditions = chainedConditions; this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java index 8722f89a..c6e3608b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java @@ -23,7 +23,7 @@ public KeyPressCondition(int key, int timeout) { if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { if(((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(getKey())) { //What key is 0 hello??? - System.out.println(getKey()); + //System.out.println(getKey()); this.onSuccess.run(); } else if(current >= timeout) { this.onFailure.run(); @@ -41,7 +41,7 @@ public int getKey() { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); - RadixUtil.getLogger().debug("Current Key upon registration: " + getKey()); + //RadixUtil.getLogger().debug("Current Key upon registration: " + getKey()); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); } @@ -49,8 +49,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { @Override public void unregister() { super.unregister(); - RadixUtil.getLogger().debug("Current Key upon deregistration: " + getKey()); - Thread.dumpStack(); + //RadixUtil.getLogger().debug("Current Key upon deregistration: " + getKey()); MinecraftForge.EVENT_BUS.unregister(clientTickListener); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index b0b9bf81..266766ce 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.test.avatar; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; @@ -9,6 +10,7 @@ import net.minecraft.client.Minecraft; import java.util.LinkedList; +import java.util.Map; public class AvatarFormRegistry { @@ -50,18 +52,18 @@ public static void registerForms() { //Motion! 7 different movement options. // Left, right, up, down, jump, sneak, sprint. -// for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { -// inputs.clear(); -// KeyInput first, second; -// first = KeyDataBuilder.createInput(key.getValue(), 0, 10, 0); -// second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); -// inputs.add(KeyDataBuilder.createCombination(first, second)); -// FormDataRegistry.registerForm(inputs, Forms.STEP); -// } - KeyInput first, second; - first = KeyDataBuilder.createInput("key.keyboard.a", 0, 10, 0); - second = KeyDataBuilder.createInput("key.keyboard.a", 0, 0, 0); - inputs.add(KeyDataBuilder.createCombination(first, second)); - FormDataRegistry.registerForm(inputs, Forms.STEP); + for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { + inputs.clear(); + KeyInput first, second; + first = KeyDataBuilder.createInput(key.getValue(), 0, 10, 0); + second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); + inputs.add(KeyDataBuilder.createCombination(first, second)); + FormDataRegistry.registerForm(inputs, Forms.STEP); + } +// KeyInput first, second; +// first = KeyDataBuilder.createInput("key.keyboard.a", 0, 10, 0); +// second = KeyDataBuilder.createInput("key.keyboard.a", 0, 0, 0); +// inputs.add(KeyDataBuilder.createCombination(first, second)); +// FormDataRegistry.registerForm(inputs, Forms.STEP); } } From 87edacb12de89aa22d5b2817a44a64e11dc37a7f Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 31 Aug 2023 00:35:29 +1000 Subject: [PATCH 136/469] Removed some unnecessary code --- .../magus/skill/test/avatar/AvatarFormRegistry.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 266766ce..8c66348e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -60,10 +60,5 @@ public static void registerForms() { inputs.add(KeyDataBuilder.createCombination(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP); } -// KeyInput first, second; -// first = KeyDataBuilder.createInput("key.keyboard.a", 0, 10, 0); -// second = KeyDataBuilder.createInput("key.keyboard.a", 0, 0, 0); -// inputs.add(KeyDataBuilder.createCombination(first, second)); -// FormDataRegistry.registerForm(inputs, Forms.STEP); } } From bb0df33337e45c64ed238214ef4495f7534207be Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 31 Aug 2023 00:54:29 +1000 Subject: [PATCH 137/469] Added a todo reminder, going to start working on form combinations soon --- .../java/com/amuzil/omegasource/magus/radix/RadixTree.java | 3 +++ .../com/amuzil/omegasource/magus/server/ServerEvents.java | 5 +++-- .../magus/skill/test/avatar/AvatarFormRegistry.java | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index e5baa682..88500aec 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -59,6 +59,9 @@ private void setActive(Node node) { // Called when either the node's terminate condition is fulfilled or all active child conditions have expired private void terminate() { + + System.out.println("Nice!"); + if (active.onTerminate() != null) { active.onTerminate().accept(this); } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 5cf8bf14..ee4ff494 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -41,8 +41,9 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //Resets the tree; for testing purposes. if (capability.getTree() != null) capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().build());//NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode)).build());//, -// new Pair<>(Forms.STRIKE, secondNode), new Pair<>(Forms.FORCE, secondNode), + RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.ARC, secondNode).addChild( + Forms.STRIKE, secondNode).build()); + // new Pair<>(Forms.FORCE, secondNode), // new Pair<>(Forms.BURST, secondNode)).build()); tree.setOwner(event.getEntity()); capability.setTree(tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 8c66348e..c662cb53 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -33,7 +33,8 @@ public static void registerForms() { LinkedList data = InputDataBuilder.toInputs( KeyDataBuilder.createPermutation(left, right)); - // FormDataRegistry.registerForm(data, Forms.BURST); + + FormDataRegistry.registerForm(data, Forms.BURST); FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); @@ -52,6 +53,9 @@ public static void registerForms() { //Motion! 7 different movement options. // Left, right, up, down, jump, sneak, sprint. + + //TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. + // Also account for the direction modifier. for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { inputs.clear(); KeyInput first, second; From 7b513afb4ed67c8d78be63598c4de38f0548495b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 31 Aug 2023 01:24:32 +1000 Subject: [PATCH 138/469] Working on a tree builder for Effects. --- .../omegasource/magus/radix/TreeBuilder.java | 3 +-- .../magus/skill/effects/Effect.java | 22 +++++++++++++++++ .../skill/effects/EffectTreeBuilder.java | 24 +++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/effects/Effect.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/TreeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/TreeBuilder.java index 0fda50cb..b7f8e809 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/TreeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/TreeBuilder.java @@ -4,6 +4,5 @@ /** * Factory class used for adding */ -public class TreeBuilder -{ +public class TreeBuilder { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/effects/Effect.java b/src/main/java/com/amuzil/omegasource/magus/skill/effects/Effect.java new file mode 100644 index 00000000..4ebfdb60 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/effects/Effect.java @@ -0,0 +1,22 @@ +package com.amuzil.omegasource.magus.skill.effects; + +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import com.amuzil.omegasource.magus.skill.skill.SkillCategory; +import net.minecraft.resources.ResourceLocation; + +public abstract class Effect extends Skill { + public Effect(String modID, String name, SkillCategory category) { + super(modID, name, category); + } + + public Effect(String name, SkillCategory category) { + super(name, category); + } + + public Effect(ResourceLocation id, SkillCategory category) { + super(id, category); + } + + public abstract RadixTree getPath(); +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java new file mode 100644 index 00000000..b3765e71 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java @@ -0,0 +1,24 @@ +package com.amuzil.omegasource.magus.skill.effects; + +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.forms.Form; + +public class EffectTreeBuilder { + + private RadixTree tree; + static EffectTreeBuilder builder; + public static EffectTreeBuilder instance() { + if (builder != null) + return builder; + else builder = new EffectTreeBuilder(); + return builder; + } + + //Creates an Effect runnable to add to the tree. + public EffectTreeBuilder addEffect(Form form, Effect effect) { + return this; + } + public RadixTree build() { + return tree; + } +} From e12ae31d7a80cb6c3961c09fc2f6665b93935078 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 11 Oct 2023 21:05:23 +1100 Subject: [PATCH 139/469] Starting to work on a tree builder from a list of effects --- .../magus/skill/effects/EffectTreeBuilder.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java index b3765e71..14a3bd8c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java @@ -1,11 +1,14 @@ package com.amuzil.omegasource.magus.skill.effects; +import com.amuzil.omegasource.magus.radix.Node; +import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.forms.Form; public class EffectTreeBuilder { - private RadixTree tree; + private NodeBuilder tree; + private Node current; static EffectTreeBuilder builder; public static EffectTreeBuilder instance() { if (builder != null) @@ -14,11 +17,19 @@ public static EffectTreeBuilder instance() { return builder; } + public EffectTreeBuilder start() { + tree = NodeBuilder.middle(); + return this; + } + //Creates an Effect runnable to add to the tree. public EffectTreeBuilder addEffect(Form form, Effect effect) { + tree.addChild(form, current); return this; } + + public RadixTree build() { - return tree; + return new RadixTree(tree.build()); } } From cc94fd42f7076853460acda75b0d64ef7624d1ac Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 14 Oct 2023 19:46:00 +1100 Subject: [PATCH 140/469] Documentation, making the Step form have better input --- .../condition/minecraft/forge/TickTimedCondition.java | 2 -- .../magus/skill/conditionals/key/KeyInput.java | 9 ++++++++- .../magus/skill/test/avatar/AvatarFormRegistry.java | 7 +++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 439328a2..d9298b5a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -34,8 +34,6 @@ public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, this.current++; if (this.current >= timeout) { runOn(onTimeout).run(); - //Test: - // System.out.println("Success?"); } } }; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java index a438dd1e..de9d119b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java @@ -4,5 +4,12 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.mojang.blaze3d.platform.InputConstants; -//Takes a key, delay, and held length. +/** + * + * @param key The key. + * @param minDelay Minimum delay that must pass between the current key input and the next. + * @param maxDelay Has to be at least equal to minDelay. The maximum amount of time that can pass in between + * the current key input, and the next. + * @param held How long the key should be held for. + */ public record KeyInput(InputConstants.Key key, int minDelay, int maxDelay, int held) implements InputData {} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index c662cb53..c1ef6e30 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -20,6 +20,9 @@ public static void registerForms() { KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0, 0, 0); KeyInput initialiser = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 0); + KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, + 20); + LinkedList inputs = new LinkedList<>(); @@ -48,7 +51,7 @@ public static void registerForms() { FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); - // FormDataRegistry.registerForm(Forms.BREATHE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); //Motion! 7 different movement options. @@ -59,7 +62,7 @@ public static void registerForms() { for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { inputs.clear(); KeyInput first, second; - first = KeyDataBuilder.createInput(key.getValue(), 0, 10, 0); + first = KeyDataBuilder.createInput(key.getValue(), 10, 20, 0); second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); inputs.add(KeyDataBuilder.createCombination(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP); From 78b08b936c750d1c86262794a80b22911cdfffe3 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 21 Oct 2023 17:21:05 +1100 Subject: [PATCH 141/469] Investigating a forge bug --- .../magus/input/KeyboardMouseInputModule.java | 15 ++++++--------- .../skill/test/avatar/AvatarFormRegistry.java | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 661df96d..e0465549 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -4,8 +4,6 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.RadixUtil; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -34,9 +32,6 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer keyboardListener; private final Consumer mouseListener; private final Consumer mouseScrollListener; - - // List of fulfilled forms. activeForm is the most complex fulfilled form. - private List fulfilledForms = new ArrayList(); private Form activeForm = null; private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; @@ -54,7 +49,8 @@ public KeyboardMouseInputModule() { int keyPressed = keyboardEvent.getKey(); switch (keyboardEvent.getAction()) { case InputConstants.PRESS -> { - glfwKeysDown.add(keyPressed); + if (!glfwKeysDown.contains(keyPressed)) + glfwKeysDown.add(keyPressed); } case InputConstants.REPEAT -> { if (!glfwKeysDown.contains(keyPressed)) { @@ -63,7 +59,7 @@ public KeyboardMouseInputModule() { } case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.remove(glfwKeysDown.indexOf(keyPressed)); + glfwKeysDown.remove((Integer) keyPressed); } } } @@ -74,7 +70,8 @@ public KeyboardMouseInputModule() { // if(!KeyboardData.ignore(keyPressed)) { switch (mouseEvent.getAction()) { case InputConstants.PRESS -> { - glfwKeysDown.add(keyPressed); + if (!glfwKeysDown.contains(keyPressed)) + glfwKeysDown.add(keyPressed); } case InputConstants.REPEAT -> { if (!glfwKeysDown.contains(keyPressed)) { @@ -100,7 +97,7 @@ public KeyboardMouseInputModule() { sendModifierData(); } - cleanMCKeys(); + //cleanMCKeys(); if(activeForm != null) { ticksSinceActivated++; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index c1ef6e30..d8eb8675 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -62,7 +62,7 @@ public static void registerForms() { for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { inputs.clear(); KeyInput first, second; - first = KeyDataBuilder.createInput(key.getValue(), 10, 20, 0); + first = KeyDataBuilder.createInput(key.getValue(), 60, 70, 0); second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); inputs.add(KeyDataBuilder.createCombination(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP); From 916a891b13a580578b87d44430f563643a325845 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 21 Oct 2023 20:49:53 +1100 Subject: [PATCH 142/469] final commit; can't do more without the InputModule supporting more --- .../magus/skill/test/avatar/AvatarFormRegistry.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index d8eb8675..4426ba85 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -22,10 +22,16 @@ public static void registerForms() { KeyInput initialiser = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 0); KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, 20); + KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, + 0); LinkedList inputs = new LinkedList<>(); + // UPDATE: Rather than having "push", "pull", "raise", and "lower" as Forms, + // why not make them Effects using the Force form and Direction modifier? + // TODO: Bring that up with other devs, seems like it makes more sense! + //FormDataRegistry.registerForm(Forms.PUSH); //FormDataRegistry.registerForm(Forms.PULL); @@ -41,10 +47,13 @@ public static void registerForms() { FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); - // FormDataRegistry.registerForm(Forms.COMPRESS); + //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.COMPRESS); - // FormDataRegistry.registerForm(Forms.EXPAND); + //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.EXPAND); + // TODO: Use mouse motion, but the input module currently does not support that. // FormDataRegistry.registerForm(Forms.ROTATE); FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); From fab0fa5b2ffdf3816f9785ae170c82afef8a982e Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 22 Oct 2023 00:54:29 +1100 Subject: [PATCH 143/469] InputData adjustments for more generic input types --- .../skill/conditionals/InputCombination.java | 9 ++++++++ .../skill/conditionals/InputPermutation.java | 10 +++++++++ .../conditionals/mouse/MouseDataBuilder.java | 21 +++++++++++++++++++ .../skill/conditionals/mouse/MouseInput.java | 4 +++- .../conditionals/mouse/MouseWheelInput.java | 9 +++++++- 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputCombination.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputPermutation.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputCombination.java new file mode 100644 index 00000000..3b01f76a --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputCombination.java @@ -0,0 +1,9 @@ +package com.amuzil.omegasource.magus.skill.conditionals; + +import java.util.List; + +/** + * @param permutations Takes a list of permutations to turn into a generic input list. + */ +public record InputCombination(List permutations) implements InputData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputPermutation.java new file mode 100644 index 00000000..c42f9f66 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputPermutation.java @@ -0,0 +1,10 @@ +package com.amuzil.omegasource.magus.skill.conditionals; + +import java.util.List; + +/** + * @param inputs Generic list of InputData to turn into InputPermutations. Good for containing inputs of multiple things + * that happen simultaneously. + */ +public record InputPermutation(List inputs) implements InputData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java index 727ad238..6a11ce0b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java @@ -1,4 +1,25 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; public class MouseDataBuilder { + + /** + * Number corresponds to the MC mouse wheel direction. + */ + enum Direction { + + // Away from the user + FORWARDS(1), + // Towards the user + BACK(-1), + NEUTRAL(0); + + private final int dir; + Direction(int dir) { + this.dir = dir; + } + + public int getDirection() { + return this.dir; + } + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java index 4bdf5936..5af4115c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; + /** * How we're going to do this: * Mouse input is tracked 2D wise. If we need to track rotation, that's a separate thing for 3D. @@ -11,5 +13,5 @@ * * Get a Bézier curve function working. This tracks input segments, then we path through the input segments. */ -public record MouseInput() { +public record MouseInput() implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseWheelInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseWheelInput.java index ae0d291b..020e7471 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseWheelInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseWheelInput.java @@ -1,4 +1,11 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; -public record MouseWheelInput() { +import com.amuzil.omegasource.magus.skill.conditionals.InputData; + +/** + * + * @param direction Which way the mouse wheel should go. If you want to just press the mouse wheel, use KeyInput. + * @param time How long the mouse wheel should be held in a certain direction. + */ +public record MouseWheelInput(MouseDataBuilder.Direction direction, int time) implements InputData { } From 5bc9b708873f5e05abce7308dc9d7a79983a11e4 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 22 Oct 2023 00:58:24 +1100 Subject: [PATCH 144/469] Generic methods added for input data sequences --- .../skill/conditionals/InputDataBuilder.java | 19 +++++++++++++++++++ .../conditionals/key/KeyDataBuilder.java | 3 +++ 2 files changed, 22 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java index 5f43863f..eb73d7f6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -2,6 +2,7 @@ import java.util.Collections; import java.util.LinkedList; +import java.util.List; /** * Designed as a factory class for taking InputDat and turning it into a linked list @@ -14,4 +15,22 @@ public static LinkedList toInputs(InputData... data) { Collections.addAll(out, data); return out; } + + public static InputPermutation createPermutation(InputData... inputs) { + LinkedList data = new LinkedList<>(List.of(inputs)); + return new InputPermutation(data); + } + + //Creates a permutation based off of each individual key input + public static InputCombination createCombination(InputData... inputs) { + LinkedList data = new LinkedList<>(); + for (InputData input : inputs) + data.add(createPermutation(input)); + return new InputCombination(data); + } + + public static InputData createCombination(InputPermutation... inputs) { + LinkedList data = new LinkedList<>(List.of(inputs)); + return new InputCombination(data); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java index 6137186f..253a6908 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java @@ -27,6 +27,9 @@ public static KeyInput createInput(InputConstants.Key key, int minDelay, int max return new KeyInput(key, minDelay, maxDelay, held); } + + //TODO: Remove these methods due to InputDataBuilder? + public static KeyPermutation createPermutation(KeyInput... inputs) { LinkedList data = new LinkedList<>(List.of(inputs)); return new KeyPermutation(data); From b1f7d0f5adca90f37c401e218b5b63052cce5bd3 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 22 Oct 2023 01:00:42 +1100 Subject: [PATCH 145/469] All possible forms done with the available input module --- .../magus/skill/conditionals/mouse/MouseDataBuilder.java | 6 +++++- .../magus/skill/test/avatar/AvatarFormRegistry.java | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java index 6a11ce0b..955f2c26 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java @@ -5,7 +5,7 @@ public class MouseDataBuilder { /** * Number corresponds to the MC mouse wheel direction. */ - enum Direction { + public enum Direction { // Away from the user FORWARDS(1), @@ -22,4 +22,8 @@ public int getDirection() { return this.dir; } } + + public static MouseWheelInput createWheelInput(Direction direction, int time) { + return new MouseWheelInput(direction, time); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 4426ba85..74da95c8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -5,6 +5,8 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseDataBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import net.minecraft.client.Minecraft; @@ -24,6 +26,8 @@ public static void registerForms() { 20); KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, 0); + MouseWheelInput forwards = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.FORWARDS, 1); + MouseWheelInput back = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.BACK, 1); LinkedList inputs = new LinkedList<>(); @@ -48,10 +52,10 @@ public static void registerForms() { FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. - FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.COMPRESS); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. - FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.EXPAND); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); // TODO: Use mouse motion, but the input module currently does not support that. // FormDataRegistry.registerForm(Forms.ROTATE); From 823e715a417d9a77cdd57276c3d3b5da55c651c9 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 22 Oct 2023 16:28:09 +1100 Subject: [PATCH 146/469] Added in a placeholder for the mouse wheel condition --- .../magus/radix/path/PathBuilder.java | 104 ++++++++++-------- 1 file changed, 56 insertions(+), 48 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 8d814374..83e4edda 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -9,7 +9,6 @@ import com.amuzil.omegasource.magus.skill.conditionals.key.KeyCombination; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyPermutation; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import net.minecraftforge.event.TickEvent; @@ -19,62 +18,71 @@ import java.util.function.Function; public class PathBuilder { - private static final Map, Function>> CONDITION_BUILDERS = new HashMap<>(); + private static final Map, Function>> CONDITION_BUILDERS = new HashMap<>(); - static { - /* Keys. */ - //TODO: Account for max delay - registerBuilder(KeyInput.class, keyInput -> { - // Minimum amount of ticks a key must be pressed for it to be considered a held condition. - //TODO: Adjust these - final int HELD_THRESHOLD = 3; - // 50 by default - final int TIMEOUT_THRESHOLD = 50000; + static { + /* Keys. */ + //TODO: Account for max delay + registerBuilder(KeyInput.class, keyInput -> { + // Minimum amount of ticks a key must be pressed for it to be considered a held condition. + //TODO: Adjust these + final int HELD_THRESHOLD = 3; + // 50 by default + final int TIMEOUT_THRESHOLD = 6000; - LinkedList conditions = new LinkedList<>(); + LinkedList conditions = new LinkedList<>(); - // Any time less than this is just a key press. - // TODO: Adjust timeout to be per node. - conditions.add(keyInput.held() > HELD_THRESHOLD - ? new KeyHoldCondition(keyInput.key().getValue(), keyInput.held(), TIMEOUT_THRESHOLD) - : new KeyPressCondition(keyInput.key().getValue(), TIMEOUT_THRESHOLD) - ); + // Any time less than this is just a key press. + // TODO: Adjust timeout to be per node. + conditions.add(keyInput.held() > HELD_THRESHOLD + ? new KeyHoldCondition(keyInput.key().getValue(), keyInput.held(), TIMEOUT_THRESHOLD) + : new KeyPressCondition(keyInput.key().getValue(), TIMEOUT_THRESHOLD) + ); - if (keyInput.minDelay() > 0) { - //TODO: Fix this to account for "action keys". - conditions.add(new TickTimedCondition( - TickEvent.Type.CLIENT, TickEvent.Phase.START, - keyInput.maxDelay(), Result.SUCCESS, - new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS - )); - } + if (keyInput.minDelay() > 0) { + //TODO: Fix this to account for "action keys". + conditions.add(new TickTimedCondition( + TickEvent.Type.CLIENT, TickEvent.Phase.START, + keyInput.maxDelay(), Result.SUCCESS, + new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS + )); + } - return conditions; - }); - registerBuilder(KeyPermutation.class, - permutation -> permutation.keys().stream().map(PathBuilder::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) - ); - registerBuilder(KeyCombination.class, - combination -> combination.keys().stream().map(PathBuilder::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) - ); + return conditions; + }); + registerBuilder(KeyPermutation.class, + permutation -> permutation.keys().stream().map(PathBuilder::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) + ); + registerBuilder(KeyCombination.class, + combination -> combination.keys().stream().map(PathBuilder::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) + ); - /* Mouse */ + /* Mouse */ // registerBuilder(MouseInput.class, // mouseInput -> ); -// registerBuilder(MouseWheelInput.class, -// mouseWheelInput -> ); - } + registerBuilder(MouseWheelInput.class, + mouseWheelInput -> { + final int TIMEOUT_THRESHOLD = 6000; + LinkedList conditions = new LinkedList<>(); + // Placeholder for now + conditions.add(new KeyPressCondition(0, TIMEOUT_THRESHOLD)); - @SuppressWarnings("unchecked") - public static void registerBuilder(Class type, Function> builder) { - CONDITION_BUILDERS.put(type, (Function>) builder); - } + return conditions; - // TODO turn a linked list of conditions into a connected node tree. + } + ); + } - public static LinkedList buildPathFrom(T data) { - return CONDITION_BUILDERS.get(data.getClass()).apply(data); - } + @SuppressWarnings("unchecked") + public static void registerBuilder(Class type, Function> builder) { + CONDITION_BUILDERS.put(type, (Function>) builder); + } + + // TODO turn a linked list of conditions into a connected node tree. + + public static LinkedList buildPathFrom(T data) { + return CONDITION_BUILDERS.get(data.getClass()).apply(data); + } } From a453c6251a4eec59cbd3e1fff701513a88aed426 Mon Sep 17 00:00:00 2001 From: John Atkins Date: Fri, 27 Oct 2023 21:04:05 -0700 Subject: [PATCH 147/469] Update XPTrait.java for naming conventions Suggestion by @Mahtaran Co-authored-by: Luka Leer Signed-off-by: John Atkins --- .../magus/skill/util/traits/skilltraits/XPTrait.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java index ba0a557d..2a2f4354 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java @@ -25,7 +25,7 @@ public void deserializeNBT(CompoundTag nbt) { xp = nbt.getDouble(getName()); } - public void setXp(double xp) { + public void setXP(double xp) { this.xp = xp; markDirty(); } From cb80bcbeb3a7ef68499c2e7c0de86c3771386319 Mon Sep 17 00:00:00 2001 From: John Atkins Date: Sat, 28 Oct 2023 21:12:39 -0700 Subject: [PATCH 148/469] Update README.md Co-authored-by: Luka Leer Signed-off-by: John Atkins --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c613d29c..995652b1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Magus's Skill API -Temporary code storage for the skill part of Magus. +# Magus's Skills API +Temporary code storage for the skills API part of Magus. From ae3a196e0732593232ac7c93d23061cc82b1a4f6 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 29 Oct 2023 16:20:11 +1100 Subject: [PATCH 149/469] Changes as requested by @mahtaran --- .../magus/skill/conditionals/InputDataBuilder.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java index eb73d7f6..7d7d8c78 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -17,8 +17,7 @@ public static LinkedList toInputs(InputData... data) { } public static InputPermutation createPermutation(InputData... inputs) { - LinkedList data = new LinkedList<>(List.of(inputs)); - return new InputPermutation(data); + return new InputPermutation(new LinkedList<>(List.of(inputs))); } //Creates a permutation based off of each individual key input @@ -30,7 +29,6 @@ public static InputCombination createCombination(InputData... inputs) { } public static InputData createCombination(InputPermutation... inputs) { - LinkedList data = new LinkedList<>(List.of(inputs)); - return new InputCombination(data); + return new InputCombination(new LinkedList<>(List.of(inputs))); } } From 404032f7ead7d4702e25dfa98611f465cc94e7e7 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 29 Oct 2023 16:22:06 +1100 Subject: [PATCH 150/469] Code cleanup --- .../magus/skill/conditionals/InputDataBuilder.java | 6 ++---- .../magus/skill/util/traits/skilltraits/XPTrait.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java index 7d7d8c78..81310264 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -11,13 +11,11 @@ public class InputDataBuilder { public static LinkedList toInputs(InputData... data) { - LinkedList out = new LinkedList<>(); - Collections.addAll(out, data); - return out; + return new LinkedList<>(List.of(data)); } public static InputPermutation createPermutation(InputData... inputs) { - return new InputPermutation(new LinkedList<>(List.of(inputs))); + return new InputPermutation(toInputs(inputs)); } //Creates a permutation based off of each individual key input diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java index 2a2f4354..1b02b28e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/XPTrait.java @@ -37,6 +37,6 @@ public double getXp() { @Override public void reset() { super.reset(); - setXp(0); + setXP(0); } } From 1c8609ed370b96b6c2bc2d3664e937d222d902e4 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 29 Oct 2023 16:55:21 +1100 Subject: [PATCH 151/469] Cleanup based on @mahtaran 's comments --- src/main/java/com/amuzil/omegasource/magus/Magus.java | 11 ----------- .../amuzil/omegasource/magus/input/InputModule.java | 8 ++++---- .../magus/input/KeyboardMouseInputModule.java | 4 ++-- .../magus/skill/conditionals/InputDataBuilder.java | 3 +-- .../magus/skill/conditionals/key/KeyDataBuilder.java | 1 - 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 010e4a27..6a230973 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -71,8 +71,6 @@ private void setup(final FMLCommonSetupEvent event) { Registries.init(); CapabilityHandler.initialiseCaps(); MagusNetwork.registerMessages(); - LOGGER.info("HELLO FROM PRE INIT"); - LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getName()); } @@ -82,18 +80,9 @@ private void doClientStuff(final FMLClientSetupEvent event) { } private void enqueueIMC(final InterModEnqueueEvent event) { - // some example code to dispatch IMC to another mod - InterModComms.sendTo("magus", "helloworld", () -> { - LOGGER.info("Hello world from the MDK"); - return "Hello world"; - }); } private void processIMC(final InterModProcessEvent event) { - // some example code to receive and process InterModComms from other mods - LOGGER.info("Got IMC {}", - event.getIMCStream().map(message -> message.messageSupplier().get()).collect(Collectors.toList()) - ); } // You can use SubscribeEvent and let the Event Bus discover methods to call diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index f678fb9d..77696958 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -17,8 +17,8 @@ import java.util.Map; public abstract class InputModule { - protected final Map _formInputs = new HashMap<>(); - protected final List _modifierListeners = new ArrayList<>(); + protected final Map formInputs = new HashMap<>(); + protected final List modifierListeners = new ArrayList<>(); protected final Map modifierQueue = new HashMap<>(); protected Form lastActivatedForm = null; @@ -31,7 +31,7 @@ public void registerModifierListener(ModifierListener listener, CompoundTag tree queueModifierData(listener.getModifierData()); }); - _modifierListeners.add(listener); + modifierListeners.add(listener); } public synchronized void queueModifierData(ModifierData data) { @@ -65,6 +65,6 @@ public void resetLastActivated() { public abstract void unregisterInputs(); public void unregisterModifiers() { - _modifierListeners.forEach(ModifierListener::unregister); + modifierListeners.forEach(ModifierListener::unregister); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index e0465549..b6b809df 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -178,7 +178,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx //Register listeners for condition created. formCondition.register(onSuccess, onFailure); //add condition to InputModule registry so that it can be tracked. - _formInputs.put(formCondition, formToExecute); + formInputs.put(formCondition, formToExecute); } else { //todo errors/logging } @@ -191,7 +191,7 @@ public void unregisterInputs() { MinecraftForge.EVENT_BUS.unregister(mouseListener); MinecraftForge.EVENT_BUS.unregister(mouseScrollListener); MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); - _formInputs.forEach((condition, form) -> condition.unregister()); + formInputs.forEach((condition, form) -> condition.unregister()); } public boolean keyPressed(int key) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java index 81310264..3a81fcd7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -1,11 +1,10 @@ package com.amuzil.omegasource.magus.skill.conditionals; -import java.util.Collections; import java.util.LinkedList; import java.util.List; /** - * Designed as a factory class for taking InputDat and turning it into a linked list + * Designed as a factory class for taking InputData and turning it into a linked list * for InputModule use. */ public class InputDataBuilder { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java index 253a6908..f8139940 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java @@ -2,7 +2,6 @@ import com.mojang.blaze3d.platform.InputConstants; -import java.util.Arrays; import java.util.LinkedList; import java.util.List; From 60d1911a9bd96c76fcec14275b2ff57e66259697 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 22 Jan 2024 00:20:21 -0800 Subject: [PATCH 152/469] Working redoing it out --- .../radix/condition/CombinationCondition.java | 67 +++++++++++++++++++ ...ndition.java => PermutationCondition.java} | 11 ++- .../magus/radix/path/PathBuilder.java | 2 + .../skill/conditionals/ConditionBuilder.java | 9 ++- 4 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/CombinationCondition.java rename src/main/java/com/amuzil/omegasource/magus/radix/condition/{ChainedCondition.java => PermutationCondition.java} (89%) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/CombinationCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/CombinationCondition.java new file mode 100644 index 00000000..2cda6395 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/CombinationCondition.java @@ -0,0 +1,67 @@ +package com.amuzil.omegasource.magus.radix.condition; + +import com.amuzil.omegasource.magus.radix.Condition; +import org.apache.logging.log4j.LogManager; + +import java.util.List; + +// TODO: Fix this so it properly accounts for simultaneous conditions +public class CombinationCondition extends Condition { + + private final List chainedConditions; + private Runnable onCompleteSuccess; + private Runnable onCompleteFailure; + private int currentConditionIndex = 0; + private Condition currentCondition = null; + + private final Runnable onPartialSuccess; + private final Runnable onPartialFailure; + + public CombinationCondition(List chainedConditions) { + this.chainedConditions = chainedConditions; + this.onPartialSuccess = this::finishCurrentCondition; + this.onPartialFailure = this::reset; + } + + private void finishCurrentCondition() { + if(currentCondition == null) return; + LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); + currentCondition.unregister(); + if (currentConditionIndex == (chainedConditions.size() - 1)) { + onCompleteSuccess.run(); + currentConditionIndex = 0; + } else { + currentConditionIndex++; + } + currentCondition = chainedConditions.get(currentConditionIndex); + if(currentConditionIndex == chainedConditions.size() - 1) { + currentCondition.register(onCompleteSuccess, () -> { + onPartialFailure.run(); + onCompleteFailure.run(); + }); + } else { + currentCondition.register(onPartialSuccess, onPartialFailure); + } + + } + + private void reset() { + currentConditionIndex = 0; + currentCondition.unregister(); + currentCondition = chainedConditions.get(currentConditionIndex); + currentCondition.register(onPartialSuccess, onPartialFailure); + } + + @Override + public void register(Runnable onSuccess, Runnable onFailure) { + this.onCompleteSuccess = onSuccess; + this.onCompleteFailure = onFailure; + currentCondition = chainedConditions.get(currentConditionIndex); + currentCondition.register(onPartialSuccess, onPartialFailure); + } + + @Override + public void unregister() { + currentCondition.unregister(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java similarity index 89% rename from src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java rename to src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java index 06992f18..8538f310 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java @@ -3,10 +3,12 @@ import com.amuzil.omegasource.magus.radix.Condition; import org.apache.logging.log4j.LogManager; -import java.util.List; +import java.util.*; +import java.util.stream.Collectors; -public class ChainedCondition extends Condition { +// TODO: Fix this class so that all of its sub-conditions run in parallel. +public class PermutationCondition extends Condition { private final List chainedConditions; private Runnable onCompleteSuccess; private Runnable onCompleteFailure; @@ -16,7 +18,7 @@ public class ChainedCondition extends Condition { private final Runnable onPartialSuccess; private final Runnable onPartialFailure; - public ChainedCondition(List chainedConditions) { + public PermutationCondition(List chainedConditions) { this.chainedConditions = chainedConditions; this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; @@ -64,3 +66,6 @@ public void unregister() { currentCondition.unregister(); } } + + + diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 83e4edda..b5586bbf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -50,6 +50,8 @@ public class PathBuilder { return conditions; }); + // TODO: Need to print these out and test how they work, + // TODO: in order to finalise ConditionBuilder.java. registerBuilder(KeyPermutation.class, permutation -> permutation.keys().stream().map(PathBuilder::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 68f5f54b..6188b5dd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.skill.conditionals; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; +import com.amuzil.omegasource.magus.radix.condition.CombinationCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; import java.util.LinkedList; @@ -35,6 +35,11 @@ public ConditionBuilder fromInputData(InputData formExecutionInput) { return this; } + /** + * + * @return A CombinationCondition combining all of the prequisite InputData + * for an input group. + */ public Condition build() { //Creates a copy of the list @@ -48,7 +53,7 @@ public Condition build() { if(conditions.size() == 1) return conditions.get(0); - return new ChainedCondition(conditions); + return new CombinationCondition(conditions); } public void reset() { From acba3a08dab5a5954467d63de66b06d61f0282a2 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 22 Jan 2024 11:28:26 -0800 Subject: [PATCH 153/469] Getting closer to simultaneous condition tracking --- .../radix/condition/PermutationCondition.java | 4 ++ .../magus/radix/path/PathBuilder.java | 13 +++--- .../skill/conditionals/ConditionBuilder.java | 8 +++- .../skill/test/avatar/AvatarFormRegistry.java | 44 ++++++++++--------- 4 files changed, 42 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java index 8538f310..07b22f9f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java @@ -22,6 +22,10 @@ public PermutationCondition(List chainedConditions) { this.chainedConditions = chainedConditions; this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; + + for (Condition cond : chainedConditions) { + System.out.println("Permutation " + this + "Condition: " + cond); + } } private void finishCurrentCondition() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index b5586bbf..ac199928 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.Condition.Result; +import com.amuzil.omegasource.magus.radix.condition.PermutationCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; @@ -12,9 +13,7 @@ import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import net.minecraftforge.event.TickEvent; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.Map; +import java.util.*; import java.util.function.Function; public class PathBuilder { @@ -53,8 +52,12 @@ public class PathBuilder { // TODO: Need to print these out and test how they work, // TODO: in order to finalise ConditionBuilder.java. registerBuilder(KeyPermutation.class, - permutation -> permutation.keys().stream().map(PathBuilder::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) + permutation -> { + List conditions = new LinkedList<>(permutation.keys().stream().map(PathBuilder::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + PermutationCondition cond = new PermutationCondition((conditions)); + return new LinkedList<>(List.of(cond)); + } ); registerBuilder(KeyCombination.class, combination -> combination.keys().stream().map(PathBuilder::buildPathFrom) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 6188b5dd..8fb9cdc5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -53,7 +53,13 @@ public Condition build() { if(conditions.size() == 1) return conditions.get(0); - return new CombinationCondition(conditions); + // Debugging + for (Condition condition : conditions) { + System.out.println(condition.getClass()); + } + // return new CombinationCondition(); + + return conditions.get(0); } public void reset() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 74da95c8..4e7af6e0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -44,27 +44,27 @@ public static void registerForms() { //FormDataRegistry.registerForm(Forms.LOWER); - LinkedList data = InputDataBuilder.toInputs( - KeyDataBuilder.createPermutation(left, right)); - - FormDataRegistry.registerForm(data, Forms.BURST); - - FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); - - //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. - FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); - - //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. - FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); - - // TODO: Use mouse motion, but the input module currently does not support that. -// FormDataRegistry.registerForm(Forms.ROTATE); - - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); - - FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); +// LinkedList data = InputDataBuilder.toInputs( +// KeyDataBuilder.createPermutation(left, right)); +// +// FormDataRegistry.registerForm(data, Forms.BURST); +// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); +// +// //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); +// +// //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); +// +// // TODO: Use mouse motion, but the input module currently does not support that. +//// FormDataRegistry.registerForm(Forms.ROTATE); +// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); +// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); +// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); //Motion! 7 different movement options. @@ -75,6 +75,8 @@ public static void registerForms() { for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { inputs.clear(); KeyInput first, second; + // Problem: The tick delay is being combined with the key press into a simultaneous condition. + // Not good. first = KeyDataBuilder.createInput(key.getValue(), 60, 70, 0); second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); inputs.add(KeyDataBuilder.createCombination(first, second)); From 3f351d0f45e0ca849b607ff7bb9cb999f943bf99 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 22 Jan 2024 11:53:28 -0800 Subject: [PATCH 154/469] Found the reason why stuff is being combined --- .../com/amuzil/omegasource/magus/radix/path/PathBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index ac199928..bb02a74e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -38,6 +38,8 @@ public class PathBuilder { : new KeyPressCondition(keyInput.key().getValue(), TIMEOUT_THRESHOLD) ); + // TODO: Fix this being combined into a permutation with the key holds and presses. + // We do not want that happening. if (keyInput.minDelay() > 0) { //TODO: Fix this to account for "action keys". conditions.add(new TickTimedCondition( @@ -55,7 +57,7 @@ public class PathBuilder { permutation -> { List conditions = new LinkedList<>(permutation.keys().stream().map(PathBuilder::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - PermutationCondition cond = new PermutationCondition((conditions)); + PermutationCondition cond = new PermutationCondition(conditions); return new LinkedList<>(List.of(cond)); } ); From 4b7ad6f737a5689e343b53d36edf623c56dcc63c Mon Sep 17 00:00:00 2001 From: Aidan Date: Tue, 23 Jan 2024 04:35:59 +0000 Subject: [PATCH 155/469] changes --- .../amuzil/omegasource/magus/radix/Node.java | 6 +- .../omegasource/magus/radix/RadixTree.java | 14 ++-- .../magus/radix/condition/MultiCondition.java | 44 +++++++++++ .../radix/condition/PermutationCondition.java | 75 ------------------- ...nCondition.java => SequenceCondition.java} | 19 +++-- .../magus/radix/path/PathBuilder.java | 4 +- .../magus/registry/Registries.java | 10 +-- .../skill/conditionals/ConditionBuilder.java | 1 - .../skill/conditionals/InputDataBuilder.java | 14 ++-- ...utPermutation.java => MultiInputData.java} | 2 +- ...ombination.java => SequenceInputData.java} | 2 +- .../{Element.java => Discipline.java} | 6 +- .../magus/skill/elements/Disciplines.java | 17 +++++ .../magus/skill/elements/Elements.java | 17 ----- .../listeners/TargetModifierListener.java | 10 +-- .../util/bending/BendingMaterialUtil.java | 6 +- 16 files changed, 107 insertions(+), 140 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java rename src/main/java/com/amuzil/omegasource/magus/radix/condition/{CombinationCondition.java => SequenceCondition.java} (72%) rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/{InputPermutation.java => MultiInputData.java} (76%) rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/{InputCombination.java => SequenceInputData.java} (66%) rename src/main/java/com/amuzil/omegasource/magus/skill/elements/{Element.java => Discipline.java} (69%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/elements/Disciplines.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 5949e9e8..502844a7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -3,7 +3,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; -import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; @@ -75,12 +75,12 @@ public synchronized List getModifiers() { return modifiers; } - public void registerModifierListeners(Form lastActivatedForm, Element activeElement, ServerPlayer player) { + public void registerModifierListeners(Form lastActivatedForm, Discipline activeDiscipline, ServerPlayer player) { CompoundTag listenerInstanceData = new CompoundTag(); //here we can send information to the client to help build the Modifier Listeners appropriately. listenerInstanceData.putString("lastFormActivated", lastActivatedForm.name()); - listenerInstanceData.putString("activeElement", activeElement.name()); + listenerInstanceData.putString("activeElement", activeDiscipline.name()); List modifierTypes = new ArrayList<>(); List modifiers = getModifiers(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 88500aec..b68db463 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -1,6 +1,6 @@ package com.amuzil.omegasource.magus.radix; -import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; @@ -14,7 +14,7 @@ public class RadixTree { private final Node root; private Node active; private Form lastActivated = null; - private Element activeElement = null; + private Discipline activeDiscipline = null; private RadixPath path; private Entity owner; @@ -29,7 +29,7 @@ public void burn() { } active = null; - activeElement = null; + activeDiscipline = null; } public void start() { @@ -37,15 +37,15 @@ public void start() { path = new RadixPath(); } - private void setActive(Element element) { - this.activeElement = element; + private void setActive(Discipline discipline) { + this.activeDiscipline = discipline; } private void setActive(Node node) { active = node; if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) - active.registerModifierListeners(lastActivated, activeElement, player); + active.registerModifierListeners(lastActivated, activeDiscipline, player); if (active.onEnter() != null) { active.onEnter().accept(this); @@ -74,7 +74,7 @@ private void terminate() { } public void moveDown(Form executedForm) { - if(activeElement == null) { + if(activeDiscipline == null) { LogManager.getLogger().info("NO ELEMENT SELECTED"); return; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java new file mode 100644 index 00000000..066fb642 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -0,0 +1,44 @@ +package com.amuzil.omegasource.magus.radix.condition; + +import com.amuzil.omegasource.magus.radix.Condition; +import org.apache.logging.log4j.LogManager; + +import java.util.*; + +public class MultiCondition extends Condition { + private final List concurrentConditions; + private Runnable onCompleteSuccess; + private Runnable onCompleteFailure; + private final Runnable onPartialSuccess; + private int conditionsMet; + + public MultiCondition(List concurrentConditions) { + this.concurrentConditions = concurrentConditions; + this.onPartialSuccess = this::conditionMet; + + for (Condition cond : concurrentConditions) { + System.out.println("Multi " + this + "Condition: " + cond); + } + } + + private void conditionMet() { + this.conditionsMet++; + + if(this.conditionsMet == concurrentConditions.size()) this.onCompleteSuccess.run(); + } + + @Override + public void register(Runnable onSuccess, Runnable onFailure) { + this.onCompleteSuccess = onSuccess; + this.onCompleteFailure = onFailure; + concurrentConditions.forEach(condition -> condition.register(onPartialSuccess, onCompleteFailure)); + } + + @Override + public void unregister() { + concurrentConditions.forEach(Condition::unregister); + } +} + + + diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java deleted file mode 100644 index 07b22f9f..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/PermutationCondition.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.amuzil.omegasource.magus.radix.condition; - -import com.amuzil.omegasource.magus.radix.Condition; -import org.apache.logging.log4j.LogManager; - -import java.util.*; -import java.util.stream.Collectors; - -// TODO: Fix this class so that all of its sub-conditions run in parallel. - -public class PermutationCondition extends Condition { - private final List chainedConditions; - private Runnable onCompleteSuccess; - private Runnable onCompleteFailure; - private int currentConditionIndex = 0; - private Condition currentCondition = null; - - private final Runnable onPartialSuccess; - private final Runnable onPartialFailure; - - public PermutationCondition(List chainedConditions) { - this.chainedConditions = chainedConditions; - this.onPartialSuccess = this::finishCurrentCondition; - this.onPartialFailure = this::reset; - - for (Condition cond : chainedConditions) { - System.out.println("Permutation " + this + "Condition: " + cond); - } - } - - private void finishCurrentCondition() { - if(currentCondition == null) return; - LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); - currentCondition.unregister(); - if (currentConditionIndex == (chainedConditions.size() - 1)) { - onCompleteSuccess.run(); - currentConditionIndex = 0; - } else { - currentConditionIndex++; - } - currentCondition = chainedConditions.get(currentConditionIndex); - if(currentConditionIndex == chainedConditions.size() - 1) { - currentCondition.register(onCompleteSuccess, () -> { - onPartialFailure.run(); - onCompleteFailure.run(); - }); - } else { - currentCondition.register(onPartialSuccess, onPartialFailure); - } - - } - - private void reset() { - currentConditionIndex = 0; - currentCondition.unregister(); - currentCondition = chainedConditions.get(currentConditionIndex); - currentCondition.register(onPartialSuccess, onPartialFailure); - } - - @Override - public void register(Runnable onSuccess, Runnable onFailure) { - this.onCompleteSuccess = onSuccess; - this.onCompleteFailure = onFailure; - currentCondition = chainedConditions.get(currentConditionIndex); - currentCondition.register(onPartialSuccess, onPartialFailure); - } - - @Override - public void unregister() { - currentCondition.unregister(); - } -} - - - diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/CombinationCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java similarity index 72% rename from src/main/java/com/amuzil/omegasource/magus/radix/condition/CombinationCondition.java rename to src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java index 2cda6395..c30d9421 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/CombinationCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java @@ -5,10 +5,9 @@ import java.util.List; -// TODO: Fix this so it properly accounts for simultaneous conditions -public class CombinationCondition extends Condition { +public class SequenceCondition extends Condition { - private final List chainedConditions; + private final List conditionSequence; private Runnable onCompleteSuccess; private Runnable onCompleteFailure; private int currentConditionIndex = 0; @@ -17,8 +16,8 @@ public class CombinationCondition extends Condition { private final Runnable onPartialSuccess; private final Runnable onPartialFailure; - public CombinationCondition(List chainedConditions) { - this.chainedConditions = chainedConditions; + public SequenceCondition(List conditionSequence) { + this.conditionSequence = conditionSequence; this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; } @@ -27,14 +26,14 @@ private void finishCurrentCondition() { if(currentCondition == null) return; LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); currentCondition.unregister(); - if (currentConditionIndex == (chainedConditions.size() - 1)) { + if (currentConditionIndex == (conditionSequence.size() - 1)) { onCompleteSuccess.run(); currentConditionIndex = 0; } else { currentConditionIndex++; } - currentCondition = chainedConditions.get(currentConditionIndex); - if(currentConditionIndex == chainedConditions.size() - 1) { + currentCondition = conditionSequence.get(currentConditionIndex); + if(currentConditionIndex == conditionSequence.size() - 1) { currentCondition.register(onCompleteSuccess, () -> { onPartialFailure.run(); onCompleteFailure.run(); @@ -48,7 +47,7 @@ private void finishCurrentCondition() { private void reset() { currentConditionIndex = 0; currentCondition.unregister(); - currentCondition = chainedConditions.get(currentConditionIndex); + currentCondition = conditionSequence.get(currentConditionIndex); currentCondition.register(onPartialSuccess, onPartialFailure); } @@ -56,7 +55,7 @@ private void reset() { public void register(Runnable onSuccess, Runnable onFailure) { this.onCompleteSuccess = onSuccess; this.onCompleteFailure = onFailure; - currentCondition = chainedConditions.get(currentConditionIndex); + currentCondition = conditionSequence.get(currentConditionIndex); currentCondition.register(onPartialSuccess, onPartialFailure); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index bb02a74e..ff58801b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -2,7 +2,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.Condition.Result; -import com.amuzil.omegasource.magus.radix.condition.PermutationCondition; +import com.amuzil.omegasource.magus.radix.condition.MultiCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; @@ -57,7 +57,7 @@ public class PathBuilder { permutation -> { List conditions = new LinkedList<>(permutation.keys().stream().map(PathBuilder::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - PermutationCondition cond = new PermutationCondition(conditions); + MultiCondition cond = new MultiCondition(conditions); return new LinkedList<>(List.of(cond)); } ); diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 90b4cc16..2749903b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -1,8 +1,8 @@ package com.amuzil.omegasource.magus.registry; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.skill.elements.Element; -import com.amuzil.omegasource.magus.skill.elements.Elements; +import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillActive; @@ -82,9 +82,9 @@ public static void registerForm(Form registryForm) { forms.add(registryForm); } - public static void registerElement(Element element) { - categories.add(element); - Elements.ELEMENTS.add(element); + public static void registerDiscipline(Discipline discipline) { + categories.add(discipline); + Disciplines.DISCIPLINES.add(discipline); } //How registering will work: diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 8fb9cdc5..5a11b1ef 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.skill.conditionals; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.condition.CombinationCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; import java.util.LinkedList; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java index 3a81fcd7..ef5bc330 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -13,19 +13,19 @@ public static LinkedList toInputs(InputData... data) { return new LinkedList<>(List.of(data)); } - public static InputPermutation createPermutation(InputData... inputs) { - return new InputPermutation(toInputs(inputs)); + public static MultiInputData createPermutation(InputData... inputs) { + return new MultiInputData(toInputs(inputs)); } //Creates a permutation based off of each individual key input - public static InputCombination createCombination(InputData... inputs) { - LinkedList data = new LinkedList<>(); + public static SequenceInputData createCombination(InputData... inputs) { + LinkedList data = new LinkedList<>(); for (InputData input : inputs) data.add(createPermutation(input)); - return new InputCombination(data); + return new SequenceInputData(data); } - public static InputData createCombination(InputPermutation... inputs) { - return new InputCombination(new LinkedList<>(List.of(inputs))); + public static InputData createCombination(MultiInputData... inputs) { + return new SequenceInputData(new LinkedList<>(List.of(inputs))); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/MultiInputData.java similarity index 76% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputPermutation.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/MultiInputData.java index c42f9f66..736635e5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputPermutation.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/MultiInputData.java @@ -6,5 +6,5 @@ * @param inputs Generic list of InputData to turn into InputPermutations. Good for containing inputs of multiple things * that happen simultaneously. */ -public record InputPermutation(List inputs) implements InputData { +public record MultiInputData(List inputs) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/SequenceInputData.java similarity index 66% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputCombination.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/SequenceInputData.java index 3b01f76a..30b0e4b7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputCombination.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/SequenceInputData.java @@ -5,5 +5,5 @@ /** * @param permutations Takes a list of permutations to turn into a generic input list. */ -public record InputCombination(List permutations) implements InputData { +public record SequenceInputData(List permutations) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Discipline.java similarity index 69% rename from src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java rename to src/main/java/com/amuzil/omegasource/magus/skill/elements/Discipline.java index e2bca60c..6e9563a2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Discipline.java @@ -3,12 +3,12 @@ import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; -public class Element extends SkillCategory { +public class Discipline extends SkillCategory { private final String name; - public Element(String name) { + public Discipline(String name) { this.name = name; - Registries.registerElement(this); + Registries.registerDiscipline(this); } public String name() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Disciplines.java b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Disciplines.java new file mode 100644 index 00000000..5e9439ca --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Disciplines.java @@ -0,0 +1,17 @@ +package com.amuzil.omegasource.magus.skill.elements; + +import java.util.ArrayList; +import java.util.List; + +public class Disciplines { + public static final List DISCIPLINES = new ArrayList<>(); + + public static final Discipline AIR = new Discipline("air"); + public static final Discipline WATER = new Discipline("water"); + public static final Discipline EARTH = new Discipline("earth"); + public static final Discipline FIRE = new Discipline("fire"); + + public static Discipline fromName(String name) { + return DISCIPLINES.stream().filter(element -> element.name().equals(name)).findFirst().get(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java deleted file mode 100644 index 85fb77c3..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.amuzil.omegasource.magus.skill.elements; - -import java.util.ArrayList; -import java.util.List; - -public class Elements { - public static final List ELEMENTS = new ArrayList<>(); - - public static final Element AIR = new Element("air"); - public static final Element WATER = new Element("water"); - public static final Element EARTH = new Element("earth"); - public static final Element FIRE = new Element("fire"); - - public static Element fromName(String name) { - return ELEMENTS.stream().filter(element -> element.name().equals(name)).findFirst().get(); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index 495713fe..bd5e60e3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; -import com.amuzil.omegasource.magus.skill.elements.Element; -import com.amuzil.omegasource.magus.skill.elements.Elements; +import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.TargetModifierData; @@ -26,7 +26,7 @@ public class TargetModifierListener extends ModifierListener { private Vec3 lastTargetPosition; - private Element activeElement; + private Discipline activeDiscipline; public TargetModifierListener() { this.modifierData = new TargetModifierData(); @@ -34,7 +34,7 @@ public TargetModifierListener() { @Override public void setupListener(CompoundTag compoundTag) { - this.activeElement = Elements.fromName(compoundTag.getString("activeElement")); + this.activeDiscipline = Disciplines.fromName(compoundTag.getString("activeElement")); } @Override @@ -47,7 +47,7 @@ public boolean shouldCollectModifierData(InputEvent.MouseButton event) { Vec3 vector3d1 = mc.player.getViewVector(1.0F); double distance = 20; //todo max distance make this configurable Vec3 vector3d2 = vector3d.add(vector3d1.x * distance, vector3d1.y * distance, vector3d1.z * distance); - List> bendableMaterials = BendingMaterialUtil.getBendableMaterialsForElement(activeElement); + List> bendableMaterials = BendingMaterialUtil.getBendableMaterialsForElement(activeDiscipline); BlockHitResult hitresult = mc.player.level.clip(new ClipContext(vector3d, vector3d2, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, player)); if (hitresult.getType() == HitResult.Type.BLOCK) { BlockPos locationHit = hitresult.getBlockPos(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java index 94016479..9971cf22 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.skill.util.bending; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Discipline; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; import net.minecraft.tags.TagKey; @@ -15,10 +15,10 @@ public class BendingMaterialUtil { public static final TagKey WATERBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "waterbending_material")); public static final TagKey EARTHBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "earthbending_material")); public static final TagKey FIREBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "firebending_material")); - public static List> getBendableMaterialsForElement(Element element) { + public static List> getBendableMaterialsForElement(Discipline discipline) { List> toReturn = new ArrayList<>(); - switch (element.name()) { + switch (discipline.name()) { case "air": //add nothing toReturn.add(AIRBENDING_MATERIAL); From 2ab193300ca4fa5b956187ac317840269c879e20 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 23 Jan 2024 11:25:16 -0800 Subject: [PATCH 156/469] Some code refactoring --- .../magus/radix/condition/MultiCondition.java | 5 ++ .../radix/condition/SequenceCondition.java | 6 ++ .../magus/radix/path/PathBuilder.java | 65 ++++++++++++------- .../skill/conditionals/ConditionBuilder.java | 10 +++ 4 files changed, 64 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 066fb642..ca762101 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -21,6 +21,11 @@ public MultiCondition(List concurrentConditions) { } } + public MultiCondition(Condition condition) { + this.concurrentConditions = List.of(condition); + this.onPartialSuccess = this::conditionMet; + } + private void conditionMet() { this.conditionsMet++; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java index c30d9421..b75ebaf4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java @@ -22,6 +22,12 @@ public SequenceCondition(List conditionSequence) { this.onPartialFailure = this::reset; } + public SequenceCondition(Condition condition) { + this.conditionSequence = List.of(condition); + this.onPartialSuccess = this::finishCurrentCondition; + this.onPartialFailure = this::reset; + } + private void finishCurrentCondition() { if(currentCondition == null) return; LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index ff58801b..337d32be 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -7,27 +7,32 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyCombination; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyPermutation; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import net.minecraftforge.event.TickEvent; -import java.util.*; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; import java.util.function.Function; public class PathBuilder { private static final Map, Function>> CONDITION_BUILDERS = new HashMap<>(); static { + // Minimum amount of ticks a key must be pressed for it to be considered a held condition. + //TODO: Adjust these + final int HELD_THRESHOLD = 3; + // 50 by default + final int TIMEOUT_THRESHOLD = 6000; + /* Keys. */ //TODO: Account for max delay registerBuilder(KeyInput.class, keyInput -> { - // Minimum amount of ticks a key must be pressed for it to be considered a held condition. - //TODO: Adjust these - final int HELD_THRESHOLD = 3; - // 50 by default - final int TIMEOUT_THRESHOLD = 6000; LinkedList conditions = new LinkedList<>(); @@ -38,17 +43,6 @@ public class PathBuilder { : new KeyPressCondition(keyInput.key().getValue(), TIMEOUT_THRESHOLD) ); - // TODO: Fix this being combined into a permutation with the key holds and presses. - // We do not want that happening. - if (keyInput.minDelay() > 0) { - //TODO: Fix this to account for "action keys". - conditions.add(new TickTimedCondition( - TickEvent.Type.CLIENT, TickEvent.Phase.START, - keyInput.maxDelay(), Result.SUCCESS, - new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS - )); - } - return conditions; }); // TODO: Need to print these out and test how they work, @@ -57,8 +51,35 @@ public class PathBuilder { permutation -> { List conditions = new LinkedList<>(permutation.keys().stream().map(PathBuilder::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - MultiCondition cond = new MultiCondition(conditions); - return new LinkedList<>(List.of(cond)); + + + // List of multiconditions + List allConditions = new LinkedList<>(); + + + MultiCondition timedCondition; + Condition timed; + + // Moved the time delay code from the input path to here so it is not combined. + for (int i = 0; i < conditions.size(); i++) { + KeyInput input = permutation.keys().get(i); + Condition cond = conditions.get(i); + + // Ensures the timed conditiosn are added in the right sequential order + allConditions.add(ConditionBuilder.createMultiCondition(cond)); + if (input.minDelay() > 0) { + //TODO: Fix this to account for "action keys". + timed = new TickTimedCondition( + TickEvent.Type.CLIENT, TickEvent.Phase.START, + input.maxDelay(), Result.SUCCESS, + new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS + ); + timedCondition = ConditionBuilder.createMultiCondition(timed); + allConditions.add(timedCondition); + + } + } + return new LinkedList<>(allConditions); } ); registerBuilder(KeyCombination.class, @@ -71,12 +92,12 @@ public class PathBuilder { // mouseInput -> ); registerBuilder(MouseWheelInput.class, mouseWheelInput -> { - final int TIMEOUT_THRESHOLD = 6000; + LinkedList conditions = new LinkedList<>(); // Placeholder for now - conditions.add(new KeyPressCondition(0, TIMEOUT_THRESHOLD)); + conditions.add(new KeyPressCondition(0, TIMEOUT_THRESHOLD)); - return conditions; + return conditions; } ); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 5a11b1ef..6dd1530b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -1,6 +1,8 @@ package com.amuzil.omegasource.magus.skill.conditionals; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.MultiCondition; +import com.amuzil.omegasource.magus.radix.condition.SequenceCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; import java.util.LinkedList; @@ -24,6 +26,14 @@ public static ConditionBuilder instance() { public ConditionBuilder() { } + public static MultiCondition createMultiCondition(Condition condition) { + return new MultiCondition(condition); + } + + public static SequenceCondition createSequentialCondition(Condition condition) { + return new SequenceCondition(createMultiCondition(condition)); + } + public ConditionBuilder fromInputData(List formExecutionInputs) { formExecutionInputs.forEach(inputData -> conditionList.addAll(PathBuilder.buildPathFrom(inputData))); return this; From 3b766004025eb7df28c15950b89f8b6553378d2b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 23 Jan 2024 11:27:35 -0800 Subject: [PATCH 157/469] Comments for clarity --- .../skill/conditionals/ConditionBuilder.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 6dd1530b..5a51a380 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; import com.amuzil.omegasource.magus.radix.condition.SequenceCondition; +import com.amuzil.omegasource.magus.radix.condition.SimpleCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; import java.util.LinkedList; @@ -14,8 +15,11 @@ */ public class ConditionBuilder { - private List conditionList = new LinkedList<>(); private static ConditionBuilder builder; + private List conditionList = new LinkedList<>(); + + public ConditionBuilder() { + } public static ConditionBuilder instance() { if (builder == null) @@ -23,17 +27,21 @@ public static ConditionBuilder instance() { return builder; } - public ConditionBuilder() { - } - + // These methods are static because they are not building a Condition from data, they simply transform one type + // of condition into another. public static MultiCondition createMultiCondition(Condition condition) { return new MultiCondition(condition); } + // This is designed for simple conditions/singular. public static SequenceCondition createSequentialCondition(Condition condition) { return new SequenceCondition(createMultiCondition(condition)); } + public static SequenceCondition createSequentialCondition(MultiCondition condition) { + return new SequenceCondition(condition); + } + public ConditionBuilder fromInputData(List formExecutionInputs) { formExecutionInputs.forEach(inputData -> conditionList.addAll(PathBuilder.buildPathFrom(inputData))); return this; @@ -45,7 +53,6 @@ public ConditionBuilder fromInputData(InputData formExecutionInput) { } /** - * * @return A CombinationCondition combining all of the prequisite InputData * for an input group. */ @@ -57,9 +64,9 @@ public Condition build() { //Resets the builder reset(); - if(conditions.size() == 0) + if (conditions.size() == 0) return null; - if(conditions.size() == 1) + if (conditions.size() == 1) return conditions.get(0); // Debugging From f9bc2873b08709d84b356a20d3e6f23c819747b8 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 23 Jan 2024 11:36:16 -0800 Subject: [PATCH 158/469] Debugging removed, time to test! --- .../magus/radix/condition/MultiCondition.java | 4 -- .../skill/conditionals/ConditionBuilder.java | 8 +--- .../skill/test/avatar/AvatarFormRegistry.java | 42 +++++++++---------- 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index ca762101..ea80d472 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -15,10 +15,6 @@ public class MultiCondition extends Condition { public MultiCondition(List concurrentConditions) { this.concurrentConditions = concurrentConditions; this.onPartialSuccess = this::conditionMet; - - for (Condition cond : concurrentConditions) { - System.out.println("Multi " + this + "Condition: " + cond); - } } public MultiCondition(Condition condition) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 5a51a380..97638c68 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -69,13 +69,7 @@ public Condition build() { if (conditions.size() == 1) return conditions.get(0); - // Debugging - for (Condition condition : conditions) { - System.out.println(condition.getClass()); - } - // return new CombinationCondition(); - - return conditions.get(0); + return new SequenceCondition(conditions); } public void reset() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 4e7af6e0..b527dc25 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -44,27 +44,27 @@ public static void registerForms() { //FormDataRegistry.registerForm(Forms.LOWER); -// LinkedList data = InputDataBuilder.toInputs( -// KeyDataBuilder.createPermutation(left, right)); -// -// FormDataRegistry.registerForm(data, Forms.BURST); -// -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); -// -// //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); -// -// //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); -// -// // TODO: Use mouse motion, but the input module currently does not support that. -//// FormDataRegistry.registerForm(Forms.ROTATE); -// -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); -// -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); -// -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); + LinkedList data = InputDataBuilder.toInputs( + KeyDataBuilder.createPermutation(left, right)); + + FormDataRegistry.registerForm(data, Forms.BURST); + + FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); + + //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); + + //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); + + // TODO: Use mouse motion, but the input module currently does not support that. +// FormDataRegistry.registerForm(Forms.ROTATE); + + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); + + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); + + FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); //Motion! 7 different movement options. From 55c4672a82977620bc40974849393eb237126437 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 23 Jan 2024 12:58:59 -0800 Subject: [PATCH 159/469] Strike is acting up; fixed accidentally splitting up key permutations --- .../magus/radix/path/PathBuilder.java | 5 +-- .../skill/conditionals/ConditionBuilder.java | 4 ++ .../skill/test/avatar/AvatarFormRegistry.java | 38 +++++++++---------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 337d32be..cba496ef 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -55,7 +55,7 @@ public class PathBuilder { // List of multiconditions List allConditions = new LinkedList<>(); - + allConditions.add(ConditionBuilder.createMultiCondition(conditions)); MultiCondition timedCondition; Condition timed; @@ -63,10 +63,7 @@ public class PathBuilder { // Moved the time delay code from the input path to here so it is not combined. for (int i = 0; i < conditions.size(); i++) { KeyInput input = permutation.keys().get(i); - Condition cond = conditions.get(i); - // Ensures the timed conditiosn are added in the right sequential order - allConditions.add(ConditionBuilder.createMultiCondition(cond)); if (input.minDelay() > 0) { //TODO: Fix this to account for "action keys". timed = new TickTimedCondition( diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 97638c68..1f5c7554 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -33,6 +33,10 @@ public static MultiCondition createMultiCondition(Condition condition) { return new MultiCondition(condition); } + public static MultiCondition createMultiCondition(List condition) { + return new MultiCondition(condition); + } + // This is designed for simple conditions/singular. public static SequenceCondition createSequentialCondition(Condition condition) { return new SequenceCondition(createMultiCondition(condition)); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index b527dc25..fb209138 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -46,25 +46,25 @@ public static void registerForms() { LinkedList data = InputDataBuilder.toInputs( KeyDataBuilder.createPermutation(left, right)); - - FormDataRegistry.registerForm(data, Forms.BURST); - - FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); - - //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. - FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); - - //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. - FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); - - // TODO: Use mouse motion, but the input module currently does not support that. -// FormDataRegistry.registerForm(Forms.ROTATE); - - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); - - FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); +// +// FormDataRegistry.registerForm(data, Forms.BURST); +// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); +// +// //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); +// +// //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); +// +// // TODO: Use mouse motion, but the input module currently does not support that. +//// FormDataRegistry.registerForm(Forms.ROTATE); +// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); +// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); +// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); //Motion! 7 different movement options. From c55a9f190d8e711cd82500aea6c6204b9b8926af Mon Sep 17 00:00:00 2001 From: Aidan Date: Tue, 23 Jan 2024 22:09:07 +0000 Subject: [PATCH 160/469] changes --- .../com/amuzil/omegasource/magus/radix/Condition.java | 4 ++-- .../magus/radix/condition/SequenceCondition.java | 8 +++++--- .../amuzil/omegasource/magus/radix/path/PathBuilder.java | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 774a4970..3dab1375 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -13,7 +13,7 @@ public enum Result { protected Runnable onFailure; public void register(Runnable onSuccess, Runnable onFailure) { - RadixUtil.getLogger().debug("Registering results"); + //RadixUtil.getLogger().debug("Registering results"); // if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) // Thread.dumpStack(); this.onSuccess = () -> { @@ -28,7 +28,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { public void unregister() { // Thread.dumpStack(); - RadixUtil.getLogger().debug("Unregistering results"); + //RadixUtil.getLogger().debug("Unregistering results"); // This should not cause any errors when called if the condition is // already unregistered or was never registered in the first place } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java index c30d9421..e968d9e4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java @@ -24,14 +24,16 @@ public SequenceCondition(List conditionSequence) { private void finishCurrentCondition() { if(currentCondition == null) return; - LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); - currentCondition.unregister(); if (currentConditionIndex == (conditionSequence.size() - 1)) { onCompleteSuccess.run(); - currentConditionIndex = 0; + reset(); + return; } else { currentConditionIndex++; } + LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); + currentCondition.unregister(); + currentCondition = conditionSequence.get(currentConditionIndex); if(currentConditionIndex == conditionSequence.size() - 1) { currentCondition.register(onCompleteSuccess, () -> { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index ff58801b..684fdb0e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.Condition.Result; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; +import com.amuzil.omegasource.magus.radix.condition.SequenceCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; @@ -57,7 +58,7 @@ public class PathBuilder { permutation -> { List conditions = new LinkedList<>(permutation.keys().stream().map(PathBuilder::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - MultiCondition cond = new MultiCondition(conditions); + SequenceCondition cond = new SequenceCondition(conditions); return new LinkedList<>(List.of(cond)); } ); From 7241b82c028564d55c195a6512c18bf78b056f44 Mon Sep 17 00:00:00 2001 From: Aidan Date: Tue, 23 Jan 2024 22:34:19 +0000 Subject: [PATCH 161/469] uncommented strike --- .../omegasource/magus/skill/test/avatar/AvatarFormRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 4e7af6e0..7aab919e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -60,7 +60,7 @@ public static void registerForms() { // // TODO: Use mouse motion, but the input module currently does not support that. //// FormDataRegistry.registerForm(Forms.ROTATE); // -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); // // FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // From 43fffeaf2e7c3c7c79fc97a3a23d40b1b2718775 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 23 Jan 2024 14:34:58 -0800 Subject: [PATCH 162/469] refactored names to hell and back for consistency --- ...uenceCondition.java => ChainedCondition.java} | 6 +++--- .../magus/radix/path/PathBuilder.java | 8 ++++---- .../skill/conditionals/ConditionBuilder.java | 13 ++++++------- .../skill/conditionals/InputDataBuilder.java | 9 ++++++--- .../skill/conditionals/SequenceInputData.java | 9 --------- .../conditionals/inputdata/ChainedInputData.java | 11 +++++++++++ .../{ => inputdata}/MultiInputData.java | 4 +++- ...{KeyCombination.java => ChainedKeyInput.java} | 2 +- .../skill/conditionals/key/KeyDataBuilder.java | 16 ++++++++-------- .../{KeyPermutation.java => MultiKeyInput.java} | 2 +- .../omegasource/magus/skill/forms/Forms.java | 7 ------- 11 files changed, 43 insertions(+), 44 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/radix/condition/{SequenceCondition.java => ChainedCondition.java} (93%) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/SequenceInputData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/inputdata/ChainedInputData.java rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/{ => inputdata}/MultiInputData.java (67%) rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/{KeyCombination.java => ChainedKeyInput.java} (78%) rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/{KeyPermutation.java => MultiKeyInput.java} (87%) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java similarity index 93% rename from src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java rename to src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index b75ebaf4..c435d625 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SequenceCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -5,7 +5,7 @@ import java.util.List; -public class SequenceCondition extends Condition { +public class ChainedCondition extends Condition { private final List conditionSequence; private Runnable onCompleteSuccess; @@ -16,13 +16,13 @@ public class SequenceCondition extends Condition { private final Runnable onPartialSuccess; private final Runnable onPartialFailure; - public SequenceCondition(List conditionSequence) { + public ChainedCondition(List conditionSequence) { this.conditionSequence = conditionSequence; this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; } - public SequenceCondition(Condition condition) { + public ChainedCondition(Condition condition) { this.conditionSequence = List.of(condition); this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index cba496ef..aca99731 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -8,9 +8,9 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyCombination; +import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyPermutation; +import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import net.minecraftforge.event.TickEvent; @@ -47,7 +47,7 @@ public class PathBuilder { }); // TODO: Need to print these out and test how they work, // TODO: in order to finalise ConditionBuilder.java. - registerBuilder(KeyPermutation.class, + registerBuilder(MultiKeyInput.class, permutation -> { List conditions = new LinkedList<>(permutation.keys().stream().map(PathBuilder::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); @@ -79,7 +79,7 @@ public class PathBuilder { return new LinkedList<>(allConditions); } ); - registerBuilder(KeyCombination.class, + registerBuilder(ChainedKeyInput.class, combination -> combination.keys().stream().map(PathBuilder::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) ); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 1f5c7554..d1058699 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -1,9 +1,8 @@ package com.amuzil.omegasource.magus.skill.conditionals; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; -import com.amuzil.omegasource.magus.radix.condition.SequenceCondition; -import com.amuzil.omegasource.magus.radix.condition.SimpleCondition; import com.amuzil.omegasource.magus.radix.path.PathBuilder; import java.util.LinkedList; @@ -38,12 +37,12 @@ public static MultiCondition createMultiCondition(List condition) { } // This is designed for simple conditions/singular. - public static SequenceCondition createSequentialCondition(Condition condition) { - return new SequenceCondition(createMultiCondition(condition)); + public static ChainedCondition createSequentialCondition(Condition condition) { + return new ChainedCondition(createMultiCondition(condition)); } - public static SequenceCondition createSequentialCondition(MultiCondition condition) { - return new SequenceCondition(condition); + public static ChainedCondition createSequentialCondition(MultiCondition condition) { + return new ChainedCondition(condition); } public ConditionBuilder fromInputData(List formExecutionInputs) { @@ -73,7 +72,7 @@ public Condition build() { if (conditions.size() == 1) return conditions.get(0); - return new SequenceCondition(conditions); + return new ChainedCondition(conditions); } public void reset() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java index ef5bc330..d5ac46e9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -1,5 +1,8 @@ package com.amuzil.omegasource.magus.skill.conditionals; +import com.amuzil.omegasource.magus.skill.conditionals.inputdata.ChainedInputData; +import com.amuzil.omegasource.magus.skill.conditionals.inputdata.MultiInputData; + import java.util.LinkedList; import java.util.List; @@ -18,14 +21,14 @@ public static MultiInputData createPermutation(InputData... inputs) { } //Creates a permutation based off of each individual key input - public static SequenceInputData createCombination(InputData... inputs) { + public static ChainedInputData createCombination(InputData... inputs) { LinkedList data = new LinkedList<>(); for (InputData input : inputs) data.add(createPermutation(input)); - return new SequenceInputData(data); + return new ChainedInputData(data); } public static InputData createCombination(MultiInputData... inputs) { - return new SequenceInputData(new LinkedList<>(List.of(inputs))); + return new ChainedInputData(new LinkedList<>(List.of(inputs))); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/SequenceInputData.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/SequenceInputData.java deleted file mode 100644 index 30b0e4b7..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/SequenceInputData.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals; - -import java.util.List; - -/** - * @param permutations Takes a list of permutations to turn into a generic input list. - */ -public record SequenceInputData(List permutations) implements InputData { -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/inputdata/ChainedInputData.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/inputdata/ChainedInputData.java new file mode 100644 index 00000000..473bbe3e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/inputdata/ChainedInputData.java @@ -0,0 +1,11 @@ +package com.amuzil.omegasource.magus.skill.conditionals.inputdata; + +import com.amuzil.omegasource.magus.skill.conditionals.InputData; + +import java.util.List; + +/** + * @param permutations Takes a list of permutations to turn into a generic input list. + */ +public record ChainedInputData(List permutations) implements InputData { +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/MultiInputData.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/inputdata/MultiInputData.java similarity index 67% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/MultiInputData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/inputdata/MultiInputData.java index 736635e5..455adf66 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/MultiInputData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/inputdata/MultiInputData.java @@ -1,4 +1,6 @@ -package com.amuzil.omegasource.magus.skill.conditionals; +package com.amuzil.omegasource.magus.skill.conditionals.inputdata; + +import com.amuzil.omegasource.magus.skill.conditionals.InputData; import java.util.List; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/ChainedKeyInput.java similarity index 78% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/ChainedKeyInput.java index c1e14e45..70d86a96 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyCombination.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/ChainedKeyInput.java @@ -7,5 +7,5 @@ /** * Stores all possible permutations. */ -public record KeyCombination(LinkedList keys) implements InputData { +public record ChainedKeyInput(LinkedList keys) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java index f8139940..8e7b6a2a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java @@ -29,21 +29,21 @@ public static KeyInput createInput(InputConstants.Key key, int minDelay, int max //TODO: Remove these methods due to InputDataBuilder? - public static KeyPermutation createPermutation(KeyInput... inputs) { + public static MultiKeyInput createPermutation(KeyInput... inputs) { LinkedList data = new LinkedList<>(List.of(inputs)); - return new KeyPermutation(data); + return new MultiKeyInput(data); } //Creates a permutation based off of each individual key input - public static KeyCombination createCombination(KeyInput... inputs) { - LinkedList data = new LinkedList<>(); + public static ChainedKeyInput createCombination(KeyInput... inputs) { + LinkedList data = new LinkedList<>(); for (KeyInput input : inputs) data.add(createPermutation(input)); - return new KeyCombination(data); + return new ChainedKeyInput(data); } - public static KeyCombination createCombination(KeyPermutation... inputs) { - LinkedList data = new LinkedList<>(List.of(inputs)); - return new KeyCombination(data); + public static ChainedKeyInput createCombination(MultiKeyInput... inputs) { + LinkedList data = new LinkedList<>(List.of(inputs)); + return new ChainedKeyInput(data); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/MultiKeyInput.java similarity index 87% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/MultiKeyInput.java index fbe64fba..4e9622ff 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyPermutation.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/MultiKeyInput.java @@ -11,4 +11,4 @@ * ONLY SUPPORTS MULTIPLE KEYS AT ONCE. DELAY IS USELESS HERE. If multiple keys are passed with *different* delay, * the key with the most delay will be read. */ -public record KeyPermutation(LinkedList keys) implements InputData {} +public record MultiKeyInput(LinkedList keys) implements InputData {} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 3359acb3..f35ccbef 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -1,12 +1,5 @@ package com.amuzil.omegasource.magus.skill.forms; -import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.mojang.blaze3d.platform.InputConstants; - -import java.util.ArrayList; -import java.util.List; - public class Forms { // FORMS public static final Form PUSH = new Form("push"); From 3519cde5c15c32a3588a786f1ce504d969254dc8 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 23 Jan 2024 14:52:25 -0800 Subject: [PATCH 163/469] Trying to figure out why things aren't working --- .../amuzil/omegasource/magus/radix/path/PathBuilder.java | 1 - .../com/amuzil/omegasource/magus/server/ServerEvents.java | 3 +-- .../magus/skill/test/avatar/AvatarFormRegistry.java | 8 ++++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 8c2063a9..aca99731 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -3,7 +3,6 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.Condition.Result; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; -import com.amuzil.omegasource.magus.radix.condition.SequenceCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index ee4ff494..64049ab7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -41,8 +41,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //Resets the tree; for testing purposes. if (capability.getTree() != null) capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.ARC, secondNode).addChild( - Forms.STRIKE, secondNode).build()); + RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.ARC, secondNode).build()); // new Pair<>(Forms.FORCE, secondNode), // new Pair<>(Forms.BURST, secondNode)).build()); tree.setOwner(event.getEntity()); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index b98a6e70..5afdc866 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -47,9 +47,9 @@ public static void registerForms() { LinkedList data = InputDataBuilder.toInputs( KeyDataBuilder.createPermutation(left, right)); // -// FormDataRegistry.registerForm(data, Forms.BURST); + FormDataRegistry.registerForm(data, Forms.BURST); // -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); // // //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); @@ -60,9 +60,9 @@ public static void registerForms() { // // TODO: Use mouse motion, but the input module currently does not support that. //// FormDataRegistry.registerForm(Forms.ROTATE); // - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); // -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // // FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); From 44248575dee15a957b583477aed9ddf9099f2883 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 23 Jan 2024 15:19:59 -0800 Subject: [PATCH 164/469] comments --- .../magus/skill/test/avatar/AvatarFormRegistry.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 5afdc866..bb6555a5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -74,7 +74,9 @@ public static void registerForms() { // Also account for the direction modifier. for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { inputs.clear(); - KeyInput first, second; + //TODO: Find a way to specify releasing a key is required. + + KeyInput first, release, second; // Problem: The tick delay is being combined with the key press into a simultaneous condition. // Not good. first = KeyDataBuilder.createInput(key.getValue(), 60, 70, 0); From ab0dace725ade02ebc6bddd1ffa5dce3ec1b1037 Mon Sep 17 00:00:00 2001 From: Aidan Date: Tue, 23 Jan 2024 23:34:03 +0000 Subject: [PATCH 165/469] fixed multiple activation --- .../java/com/amuzil/omegasource/magus/radix/Condition.java | 2 +- .../omegasource/magus/radix/condition/MultiCondition.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 3dab1375..b48c30a0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -21,7 +21,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { onSuccess.run(); }; this.onFailure = () -> { - //RadixUtil.getLogger().debug("Result: failure"); + RadixUtil.getLogger().debug("Result: failure: " + getClass()); onFailure.run(); }; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index ea80d472..2a6aeba6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -25,7 +25,10 @@ public MultiCondition(Condition condition) { private void conditionMet() { this.conditionsMet++; - if(this.conditionsMet == concurrentConditions.size()) this.onCompleteSuccess.run(); + if(this.conditionsMet == concurrentConditions.size()) { + this.onCompleteSuccess.run(); + this.conditionsMet = 0; + } } @Override From 86dee9fe44d82a22c8b5867244bb002b282c72bf Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 27 Jan 2024 20:39:42 -0800 Subject: [PATCH 166/469] Added a key release condition --- .../magus/radix/path/PathBuilder.java | 14 +++++++--- .../skill/conditionals/InputDataBuilder.java | 8 +++--- .../conditionals/key/KeyDataBuilder.java | 26 +++++++++++++------ .../skill/conditionals/key/KeyInput.java | 3 ++- .../skill/test/avatar/AvatarFormRegistry.java | 6 ++--- 5 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index aca99731..392035fe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -7,6 +7,7 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyReleaseCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; @@ -57,13 +58,21 @@ public class PathBuilder { List allConditions = new LinkedList<>(); allConditions.add(ConditionBuilder.createMultiCondition(conditions)); - MultiCondition timedCondition; - Condition timed; + MultiCondition timedCondition, releaseCondition; + Condition timed, release; // Moved the time delay code from the input path to here so it is not combined. for (int i = 0; i < conditions.size(); i++) { KeyInput input = permutation.keys().get(i); + //Adding a release condition. + if (input.release()) { + int timeout = 6; + release = new KeyReleaseCondition(input.key(), timeout); + releaseCondition = ConditionBuilder.createMultiCondition(release); + allConditions.add(releaseCondition); + } + if (input.minDelay() > 0) { //TODO: Fix this to account for "action keys". timed = new TickTimedCondition( @@ -73,7 +82,6 @@ public class PathBuilder { ); timedCondition = ConditionBuilder.createMultiCondition(timed); allConditions.add(timedCondition); - } } return new LinkedList<>(allConditions); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java index d5ac46e9..47c110a0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputDataBuilder.java @@ -16,19 +16,19 @@ public static LinkedList toInputs(InputData... data) { return new LinkedList<>(List.of(data)); } - public static MultiInputData createPermutation(InputData... inputs) { + public static MultiInputData createMultiInput(InputData... inputs) { return new MultiInputData(toInputs(inputs)); } //Creates a permutation based off of each individual key input - public static ChainedInputData createCombination(InputData... inputs) { + public static ChainedInputData createChainedInput(InputData... inputs) { LinkedList data = new LinkedList<>(); for (InputData input : inputs) - data.add(createPermutation(input)); + data.add(createMultiInput(input)); return new ChainedInputData(data); } - public static InputData createCombination(MultiInputData... inputs) { + public static InputData createChainedInput(MultiInputData... inputs) { return new ChainedInputData(new LinkedList<>(List.of(inputs))); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java index 8e7b6a2a..78ffa126 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java @@ -15,34 +15,44 @@ public class KeyDataBuilder { /* Look at #InputConstants for key names, codes, and types. */ public static KeyInput createInput(int key, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key, -1), minDelay, maxDelay, held); + return new KeyInput(InputConstants.getKey(key, -1), false, minDelay, maxDelay, held); + } + + public static KeyInput createInput(int key, boolean released, int minDelay, int maxDelay, int held) { + return new KeyInput(InputConstants.getKey(key, -1), released, minDelay, maxDelay, held); } public static KeyInput createInput(String key, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key), minDelay, maxDelay, held); + return new KeyInput(InputConstants.getKey(key), false, minDelay, maxDelay, held); } - public static KeyInput createInput(InputConstants.Key key, int minDelay, int maxDelay, int held) { - return new KeyInput(key, minDelay, maxDelay, held); + public static KeyInput createInput(String key, boolean released, int minDelay, int maxDelay, int held) { + return new KeyInput(InputConstants.getKey(key), released, minDelay, maxDelay, held); + } + public static KeyInput createInput(InputConstants.Key key, boolean released, int minDelay, int maxDelay, int held) { + return new KeyInput(key, released, minDelay, maxDelay, held); } + public static KeyInput createInput(InputConstants.Key key, int minDelay, int maxDelay, int held) { + return new KeyInput(key, false, minDelay, maxDelay, held); + } //TODO: Remove these methods due to InputDataBuilder? - public static MultiKeyInput createPermutation(KeyInput... inputs) { + public static MultiKeyInput createMultiInput(KeyInput... inputs) { LinkedList data = new LinkedList<>(List.of(inputs)); return new MultiKeyInput(data); } //Creates a permutation based off of each individual key input - public static ChainedKeyInput createCombination(KeyInput... inputs) { + public static ChainedKeyInput createChainedInput(KeyInput... inputs) { LinkedList data = new LinkedList<>(); for (KeyInput input : inputs) - data.add(createPermutation(input)); + data.add(createMultiInput(input)); return new ChainedKeyInput(data); } - public static ChainedKeyInput createCombination(MultiKeyInput... inputs) { + public static ChainedKeyInput createChainedInput(MultiKeyInput... inputs) { LinkedList data = new LinkedList<>(List.of(inputs)); return new ChainedKeyInput(data); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java index de9d119b..bc57404b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java @@ -7,9 +7,10 @@ /** * * @param key The key. + * @param release Whether the key should be released after. * @param minDelay Minimum delay that must pass between the current key input and the next. * @param maxDelay Has to be at least equal to minDelay. The maximum amount of time that can pass in between * the current key input, and the next. * @param held How long the key should be held for. */ -public record KeyInput(InputConstants.Key key, int minDelay, int maxDelay, int held) implements InputData {} \ No newline at end of file +public record KeyInput(InputConstants.Key key, boolean release, int minDelay, int maxDelay, int held) implements InputData {} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index bb6555a5..32895342 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -45,7 +45,7 @@ public static void registerForms() { //FormDataRegistry.registerForm(Forms.LOWER); LinkedList data = InputDataBuilder.toInputs( - KeyDataBuilder.createPermutation(left, right)); + KeyDataBuilder.createMultiInput(left, right)); // FormDataRegistry.registerForm(data, Forms.BURST); // @@ -79,9 +79,9 @@ public static void registerForms() { KeyInput first, release, second; // Problem: The tick delay is being combined with the key press into a simultaneous condition. // Not good. - first = KeyDataBuilder.createInput(key.getValue(), 60, 70, 0); + first = KeyDataBuilder.createInput(key.getValue(), true,60, 70, 0); second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); - inputs.add(KeyDataBuilder.createCombination(first, second)); + inputs.add(KeyDataBuilder.createChainedInput(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP); } } From 55d9dc4c17728f6f42778be5c2032b870ab01095 Mon Sep 17 00:00:00 2001 From: Aidan Date: Fri, 2 Feb 2024 23:34:23 +0000 Subject: [PATCH 167/469] changed multi condition --- .../magus/radix/condition/MultiCondition.java | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 2a6aeba6..8e7fa683 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -1,48 +1,55 @@ package com.amuzil.omegasource.magus.radix.condition; import com.amuzil.omegasource.magus.radix.Condition; -import org.apache.logging.log4j.LogManager; import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; public class MultiCondition extends Condition { private final List concurrentConditions; private Runnable onCompleteSuccess; private Runnable onCompleteFailure; - private final Runnable onPartialSuccess; - private int conditionsMet; + private Dictionary conditionsMet; public MultiCondition(List concurrentConditions) { this.concurrentConditions = concurrentConditions; - this.onPartialSuccess = this::conditionMet; } public MultiCondition(Condition condition) { this.concurrentConditions = List.of(condition); - this.onPartialSuccess = this::conditionMet; } - private void conditionMet() { - this.conditionsMet++; - - if(this.conditionsMet == concurrentConditions.size()) { - this.onCompleteSuccess.run(); - this.conditionsMet = 0; + private void checkConditionMet() { + for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { + // none/not all conditions have been met yet, exit loop and dont execute. + if (it.next() == false) return; } + this.onCompleteSuccess.run(); + this.reset(); } @Override public void register(Runnable onSuccess, Runnable onFailure) { this.onCompleteSuccess = onSuccess; this.onCompleteFailure = onFailure; - concurrentConditions.forEach(condition -> condition.register(onPartialSuccess, onCompleteFailure)); + this.reset(); + } + + public void reset() { + AtomicInteger counter = new AtomicInteger(); + conditionsMet = new Hashtable<>(); + concurrentConditions.forEach(condition -> { + int id = counter.getAndIncrement(); + condition.register(() -> { + conditionsMet.put(id, true); + checkConditionMet(); + }, onCompleteFailure); + conditionsMet.put(id, false); + }); } @Override public void unregister() { concurrentConditions.forEach(Condition::unregister); } -} - - - +} \ No newline at end of file From 195bc52e705f16c0140c8cc13d33960812e28375 Mon Sep 17 00:00:00 2001 From: Aidan Date: Sat, 3 Feb 2024 00:31:34 +0000 Subject: [PATCH 168/469] changes --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 2 +- .../condition/minecraft/forge/key/KeyReleaseCondition.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index b6b809df..022b21ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -37,7 +37,7 @@ public class KeyboardMouseInputModule extends InputModule { private int ticksSinceModifiersSent = 0; //todo make these thresholds configurable and make them longer. Especially the timeout threshold. - private final int tickActivationThreshold = 4; + private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; Minecraft mc = Minecraft.getInstance(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java index b62d6de7..16f5f27d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.mojang.blaze3d.platform.InputConstants.Key; @@ -11,7 +13,9 @@ public class KeyReleaseCondition extends TickTimedCondition { public KeyReleaseCondition(Key key, int timeout) { super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition<>( - InputEvent.Key.class, event -> event.getAction() == GLFW.GLFW_RELEASE && event.getKey() == key.getValue() + InputEvent.Key.class, event -> event.getKey() == key.getValue() && (event.getAction() == GLFW.GLFW_RELEASE + || !((KeyboardMouseInputModule)Magus.keyboardInputModule).keyPressed(key.getValue()) + ) ), Result.SUCCESS, Result.FAILURE); } } From cc8e777ef6d12a8aec25f058a3f8d23f26a8c0d6 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 2 Feb 2024 23:38:49 -0800 Subject: [PATCH 169/469] Tried condensing stuff down but it broke something --- .../omegasource/magus/radix/Condition.java | 2 +- .../omegasource/magus/radix/RadixTree.java | 4 +- .../minecraft/forge/key/KeyHoldCondition.java | 32 ++++++++++- .../forge/key/KeyPressCondition.java | 55 ------------------- .../forge/key/KeyPressedCondition.java | 3 + .../forge/key/KeyReleaseCondition.java | 21 ------- .../magus/radix/path/PathBuilder.java | 18 +----- .../listeners/KeyHeldModifierListener.java | 4 +- .../skill/test/avatar/AvatarFormRegistry.java | 4 +- 9 files changed, 43 insertions(+), 100 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index b48c30a0..33138ee4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -21,7 +21,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { onSuccess.run(); }; this.onFailure = () -> { - RadixUtil.getLogger().debug("Result: failure: " + getClass()); +// RadixUtil.getLogger().debug("Result: failure: " + getClass()); onFailure.run(); }; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index b68db463..aba6e2fc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; @@ -14,7 +15,8 @@ public class RadixTree { private final Node root; private Node active; private Form lastActivated = null; - private Discipline activeDiscipline = null; + // Fire is a test + private Discipline activeDiscipline = Disciplines.FIRE; private RadixPath path; private Entity owner; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index acee623f..5c8d5b6a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -15,21 +15,39 @@ public class KeyHoldCondition extends Condition { private final Consumer clientTickListener; private int currentTotal; private int currentHolding; + private int key; - public KeyHoldCondition(int key, int duration, int timeout) { + // False by default. + private boolean release = false; + + //TODO: Make this configurable + public static final int KEY_PRESS_TIMEOUT = 3; + + public KeyHoldCondition(int key, int duration, int timeout, boolean release) { RadixUtil.assertTrue(duration >= 0, "duration must be >= 0"); RadixUtil.assertTrue(timeout >= 0, "timeout must be >= 0"); this.currentTotal = 0; this.currentHolding = 0; + this.release = release; + this.key = key; this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START) { if (((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { this.currentHolding++; + } else { + if (pressed(this.currentHolding, duration)) { + // If the Condition doesn't require the key being released.... + if (release) + this.onSuccess.run(); + } } - if (this.currentHolding >= duration) { - this.onSuccess.run(); + // If the duration is <= 3, then we want the Condition to act as a key press, rather than a hold. + if (pressed(this.currentHolding, duration)) { + // If the Condition doesn't require the key being released.... + if (!release) + this.onSuccess.run(); } if (this.currentTotal >= timeout) { @@ -40,6 +58,14 @@ public KeyHoldCondition(int key, int duration, int timeout) { }; } + public boolean pressed(int held, int duration) { + return held >= duration || held > 0 && duration <= KEY_PRESS_TIMEOUT; + } + + public int getKey() { + return this.key; + } + @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java deleted file mode 100644 index c6e3608b..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressCondition.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; - -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.RadixUtil; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.TickEvent; -import net.minecraftforge.eventbus.api.EventPriority; -import net.minecraftforge.fml.LogicalSide; - -import java.util.function.Consumer; - -public class KeyPressCondition extends Condition { - private final Consumer clientTickListener; - private int current; - private final int key; - - public KeyPressCondition(int key, int timeout) { - this.key = key; - - this.clientTickListener = event -> { - if (event.phase == TickEvent.ClientTickEvent.Phase.START && event.side == LogicalSide.CLIENT) { - if(((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(getKey())) { - //What key is 0 hello??? - //System.out.println(getKey()); - this.onSuccess.run(); - } else if(current >= timeout) { - this.onFailure.run(); - } else { - current++; - } - } - }; - } - - public int getKey() { - return key; - } - - @Override - public void register(Runnable onSuccess, Runnable onFailure) { - super.register(onSuccess, onFailure); - //RadixUtil.getLogger().debug("Current Key upon registration: " + getKey()); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, - clientTickListener); - } - - @Override - public void unregister() { - super.unregister(); - //RadixUtil.getLogger().debug("Current Key upon deregistration: " + getKey()); - MinecraftForge.EVENT_BUS.unregister(clientTickListener); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java index bada042f..0948f5a9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -6,6 +6,9 @@ import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.event.TickEvent; +/** + * Used to determine whether any key was pressed during a time period. + */ public class KeyPressedCondition extends TickTimedCondition { //Upon *any* key (not including modifiers or wasd) being pressed, return true public KeyPressedCondition(int timeout) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java deleted file mode 100644 index 16f5f27d..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyReleaseCondition.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; - -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; -import com.mojang.blaze3d.platform.InputConstants.Key; -import net.minecraftforge.client.event.InputEvent; -import net.minecraftforge.event.TickEvent.Phase; -import net.minecraftforge.event.TickEvent.Type; -import org.lwjgl.glfw.GLFW; - -public class KeyReleaseCondition extends TickTimedCondition { - public KeyReleaseCondition(Key key, int timeout) { - super(Type.CLIENT, Phase.START, timeout, Result.FAILURE, new EventCondition<>( - InputEvent.Key.class, event -> event.getKey() == key.getValue() && (event.getAction() == GLFW.GLFW_RELEASE - || !((KeyboardMouseInputModule)Magus.keyboardInputModule).keyPressed(key.getValue()) - ) - ), Result.SUCCESS, Result.FAILURE); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 392035fe..a60c1533 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -5,9 +5,7 @@ import com.amuzil.omegasource.magus.radix.condition.MultiCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyReleaseCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; @@ -39,10 +37,8 @@ public class PathBuilder { // Any time less than this is just a key press. // TODO: Adjust timeout to be per node. - conditions.add(keyInput.held() > HELD_THRESHOLD - ? new KeyHoldCondition(keyInput.key().getValue(), keyInput.held(), TIMEOUT_THRESHOLD) - : new KeyPressCondition(keyInput.key().getValue(), TIMEOUT_THRESHOLD) - ); + conditions.add(new KeyHoldCondition(keyInput.key().getValue(), + keyInput.held(), TIMEOUT_THRESHOLD, keyInput.release())); return conditions; }); @@ -64,14 +60,6 @@ public class PathBuilder { // Moved the time delay code from the input path to here so it is not combined. for (int i = 0; i < conditions.size(); i++) { KeyInput input = permutation.keys().get(i); - - //Adding a release condition. - if (input.release()) { - int timeout = 6; - release = new KeyReleaseCondition(input.key(), timeout); - releaseCondition = ConditionBuilder.createMultiCondition(release); - allConditions.add(releaseCondition); - } if (input.minDelay() > 0) { //TODO: Fix this to account for "action keys". @@ -100,7 +88,7 @@ public class PathBuilder { LinkedList conditions = new LinkedList<>(); // Placeholder for now - conditions.add(new KeyPressCondition(0, TIMEOUT_THRESHOLD)); + //conditions.add(new KeyPressCondition(0, TIMEOUT_THRESHOLD)); return conditions; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 4031a663..5ff9cae1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -2,7 +2,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -44,7 +44,7 @@ public void setupListener(CompoundTag compoundTag) { Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); List formConditions = FormDataRegistry.getInputsForForm(formToModify); - int keyToHold = ((KeyPressCondition)new ConditionBuilder().fromInputData(formConditions.get(formConditions.size() - 1)).build()).getKey(); + int keyToHold = ((KeyHoldCondition) new ConditionBuilder().fromInputData(formConditions.get(formConditions.size() - 1)).build()).getKey(); this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 32895342..a22bd74a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -60,8 +60,8 @@ public static void registerForms() { // // TODO: Use mouse motion, but the input module currently does not support that. //// FormDataRegistry.registerForm(Forms.ROTATE); // -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); -// + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // // FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); From 333bf47d512770da627740315b56ed823eff40ea Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 2 Feb 2024 23:53:28 -0800 Subject: [PATCH 170/469] trying to figure out what went wrong after condensing stuff --- .../java/com/amuzil/omegasource/magus/radix/Condition.java | 1 + .../java/com/amuzil/omegasource/magus/radix/RadixTree.java | 2 +- .../radix/condition/minecraft/forge/key/KeyHoldCondition.java | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 33138ee4..63f8d95b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -22,6 +22,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { }; this.onFailure = () -> { // RadixUtil.getLogger().debug("Result: failure: " + getClass()); + Thread.dumpStack(); onFailure.run(); }; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index aba6e2fc..f671bd00 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -16,7 +16,7 @@ public class RadixTree { private Node active; private Form lastActivated = null; // Fire is a test - private Discipline activeDiscipline = Disciplines.FIRE; + private Discipline activeDiscipline = null;//Disciplines.FIRE; private RadixPath path; private Entity owner; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 5c8d5b6a..f1008259 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -18,7 +18,7 @@ public class KeyHoldCondition extends Condition { private int key; // False by default. - private boolean release = false; + private boolean release; //TODO: Make this configurable public static final int KEY_PRESS_TIMEOUT = 3; @@ -38,7 +38,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.currentHolding++; } else { if (pressed(this.currentHolding, duration)) { - // If the Condition doesn't require the key being released.... + // If the Condition requires the key being released.... if (release) this.onSuccess.run(); } From 8fe6d2143ecf0c0510763ea6074d80135e1ed61e Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 5 Feb 2024 23:37:48 +0000 Subject: [PATCH 171/469] further consolidating --- .../omegasource/magus/input/InputModule.java | 2 ++ .../magus/input/KeyboardMouseInputModule.java | 12 ++++++++---- .../amuzil/omegasource/magus/radix/Condition.java | 4 ++-- .../magus/radix/condition/ChainedCondition.java | 2 +- .../magus/radix/condition/MultiCondition.java | 7 ++++++- .../minecraft/forge/key/KeyHoldCondition.java | 13 ++++++++++--- .../omegasource/magus/server/ServerEvents.java | 14 ++++++++++++-- .../skill/test/avatar/AvatarFormRegistry.java | 4 ++-- 8 files changed, 43 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 77696958..2aff3129 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -62,6 +62,8 @@ public void resetLastActivated() { this.lastActivatedForm = null; } + public abstract void registerListeners(); + public abstract void unregisterInputs(); public void unregisterModifiers() { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 022b21ba..35f4055a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -122,10 +122,6 @@ public KeyboardMouseInputModule() { } } }; - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseScrollingEvent.class, mouseScrollListener); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); } private void sendModifierData() { @@ -185,6 +181,14 @@ public void registerInputData(List formExecutionInputs, Form formToEx } + @Override + public void registerListeners() { + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseScrollingEvent.class, mouseScrollListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); + } + @Override public void unregisterInputs() { MinecraftForge.EVENT_BUS.unregister(keyboardListener); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 63f8d95b..1a3c7d95 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -22,14 +22,14 @@ public void register(Runnable onSuccess, Runnable onFailure) { }; this.onFailure = () -> { // RadixUtil.getLogger().debug("Result: failure: " + getClass()); - Thread.dumpStack(); +// Thread.dumpStack(); onFailure.run(); }; } public void unregister() { // Thread.dumpStack(); - //RadixUtil.getLogger().debug("Unregistering results"); + RadixUtil.getLogger().debug("Unregistering condition:" + getClass()); // This should not cause any errors when called if the condition is // already unregistered or was never registered in the first place } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index daffbd59..19ac738a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -37,7 +37,7 @@ private void finishCurrentCondition() { } else { currentConditionIndex++; } - LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION"); +// LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION: " + currentCondition.getClass()); currentCondition.unregister(); currentCondition = conditionSequence.get(currentConditionIndex); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 8e7fa683..96ca8720 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition; import com.amuzil.omegasource.magus.radix.Condition; +import org.apache.logging.log4j.LogManager; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; @@ -41,7 +42,11 @@ public void reset() { concurrentConditions.forEach(condition -> { int id = counter.getAndIncrement(); condition.register(() -> { - conditionsMet.put(id, true); + synchronized (conditionsMet){ +// LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); + conditionsMet.put(id, true); + condition.unregister(); + } checkConditionMet(); }, onCompleteFailure); conditionsMet.put(id, false); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index f1008259..9084d323 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -8,6 +8,7 @@ import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.ClientTickEvent; import net.minecraftforge.eventbus.api.EventPriority; +import org.apache.logging.log4j.LogManager; import java.util.function.Consumer; @@ -24,7 +25,7 @@ public class KeyHoldCondition extends Condition { public static final int KEY_PRESS_TIMEOUT = 3; public KeyHoldCondition(int key, int duration, int timeout, boolean release) { - RadixUtil.assertTrue(duration >= 0, "duration must be >= 0"); + RadixUtil.assertTrue(duration > 0, "duration must be >= 0"); RadixUtil.assertTrue(timeout >= 0, "timeout must be >= 0"); this.currentTotal = 0; @@ -35,19 +36,24 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START) { if (((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { + LogManager.getLogger().info("KEY PRESSED: " + key); this.currentHolding++; } else { if (pressed(this.currentHolding, duration)) { // If the Condition requires the key being released.... - if (release) + if (release) { + LogManager.getLogger().info("ONSUCCESS RUNNING 1"); this.onSuccess.run(); + } } } // If the duration is <= 3, then we want the Condition to act as a key press, rather than a hold. if (pressed(this.currentHolding, duration)) { // If the Condition doesn't require the key being released.... - if (!release) + if (!release) { + LogManager.getLogger().info("ONSUCCESS RUNNING 2"); this.onSuccess.run(); + } } if (this.currentTotal >= timeout) { @@ -59,6 +65,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } public boolean pressed(int held, int duration) { + LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration); return held >= duration || held > 0 && duration <= KEY_PRESS_TIMEOUT; } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 64049ab7..28dbef54 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -1,6 +1,6 @@ package com.amuzil.omegasource.magus.server; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; @@ -9,9 +9,9 @@ import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; -import com.mojang.datafixers.util.Pair; import net.minecraft.world.entity.player.Player; import net.minecraftforge.event.entity.EntityJoinLevelEvent; +import net.minecraftforge.event.entity.EntityLeaveLevelEvent; import net.minecraftforge.event.level.LevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -54,8 +54,18 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } else { if(event.getEntity() instanceof Player) { + Magus.keyboardInputModule.registerListeners(); AvatarFormRegistry.registerForms(); } } } + + @SubscribeEvent + public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) + { + if(event.getLevel().isClientSide()) + { + Magus.keyboardInputModule.unregisterInputs(); + } + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index a22bd74a..cd5325a5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -60,9 +60,9 @@ public static void registerForms() { // // TODO: Use mouse motion, but the input module currently does not support that. //// FormDataRegistry.registerForm(Forms.ROTATE); // - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // // FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); From 0b6d62ca24d7d83767e6d403c0935650ad958905 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 5 Feb 2024 15:41:12 -0800 Subject: [PATCH 172/469] Fixed key press durations being 0 --- .../radix/condition/minecraft/forge/key/KeyHoldCondition.java | 4 ++-- .../com/amuzil/omegasource/magus/radix/path/PathBuilder.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index f1008259..7ee7a705 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -24,8 +24,8 @@ public class KeyHoldCondition extends Condition { public static final int KEY_PRESS_TIMEOUT = 3; public KeyHoldCondition(int key, int duration, int timeout, boolean release) { - RadixUtil.assertTrue(duration >= 0, "duration must be >= 0"); - RadixUtil.assertTrue(timeout >= 0, "timeout must be >= 0"); + RadixUtil.assertTrue(duration >= 1, "duration must be >= 0"); + RadixUtil.assertTrue(timeout >= 1, "timeout must be >= 0"); this.currentTotal = 0; this.currentHolding = 0; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index a60c1533..94f02e45 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -27,7 +27,7 @@ public class PathBuilder { //TODO: Adjust these final int HELD_THRESHOLD = 3; // 50 by default - final int TIMEOUT_THRESHOLD = 6000; + final int TIMEOUT_THRESHOLD = 60000000; /* Keys. */ //TODO: Account for max delay @@ -38,7 +38,7 @@ public class PathBuilder { // Any time less than this is just a key press. // TODO: Adjust timeout to be per node. conditions.add(new KeyHoldCondition(keyInput.key().getValue(), - keyInput.held(), TIMEOUT_THRESHOLD, keyInput.release())); + keyInput.held() + KeyHoldCondition.KEY_PRESS_TIMEOUT, TIMEOUT_THRESHOLD, keyInput.release())); return conditions; }); From 5ea7ad4f6a8c9e3418bd72618a21a2d1888e0656 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 5 Feb 2024 15:50:47 -0800 Subject: [PATCH 173/469] Things don't seem to be working??? --- .../magus/radix/condition/ChainedCondition.java | 4 +++- .../magus/radix/condition/MultiCondition.java | 13 +++++++++---- .../minecraft/forge/key/KeyHoldCondition.java | 6 +++--- .../magus/skill/test/avatar/AvatarFormRegistry.java | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 19ac738a..88ecbbd1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -37,7 +37,9 @@ private void finishCurrentCondition() { } else { currentConditionIndex++; } -// LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION: " + currentCondition.getClass()); + //Debugging statement + LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION: " + currentCondition.getClass()); + currentCondition.unregister(); currentCondition = conditionSequence.get(currentConditionIndex); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 96ca8720..e84e61d3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -3,7 +3,10 @@ import com.amuzil.omegasource.magus.radix.Condition; import org.apache.logging.log4j.LogManager; -import java.util.*; +import java.util.Dictionary; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; import java.util.concurrent.atomic.AtomicInteger; public class MultiCondition extends Condition { @@ -23,7 +26,7 @@ public MultiCondition(Condition condition) { private void checkConditionMet() { for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { // none/not all conditions have been met yet, exit loop and dont execute. - if (it.next() == false) return; + if (!it.next()) return; } this.onCompleteSuccess.run(); this.reset(); @@ -42,8 +45,10 @@ public void reset() { concurrentConditions.forEach(condition -> { int id = counter.getAndIncrement(); condition.register(() -> { - synchronized (conditionsMet){ -// LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); + synchronized (conditionsMet) { + // Debugging statement: + LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); + conditionsMet.put(id, true); condition.unregister(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 182d8fff..49131694 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -25,8 +25,8 @@ public class KeyHoldCondition extends Condition { public static final int KEY_PRESS_TIMEOUT = 3; public KeyHoldCondition(int key, int duration, int timeout, boolean release) { - RadixUtil.assertTrue(duration >= 1, "duration must be >= 0"); - RadixUtil.assertTrue(timeout >= 1, "timeout must be >= 0"); + RadixUtil.assertTrue(duration >= 1, "duration must be >= 1"); + RadixUtil.assertTrue(timeout >= 1, "timeout must be >= 1"); this.currentTotal = 0; this.currentHolding = 0; @@ -65,7 +65,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } public boolean pressed(int held, int duration) { - LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration); +// LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration); return held >= duration || held > 0 && duration <= KEY_PRESS_TIMEOUT; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index cd5325a5..5d319429 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -60,7 +60,7 @@ public static void registerForms() { // // TODO: Use mouse motion, but the input module currently does not support that. //// FormDataRegistry.registerForm(Forms.ROTATE); // -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // From b8a7337bfe9fffbd73fd50ab7ed14418095caec2 Mon Sep 17 00:00:00 2001 From: Aidan Date: Tue, 6 Feb 2024 00:00:39 +0000 Subject: [PATCH 174/469] i dont believe in god but damn he better make this work --- .../radix/condition/ChainedCondition.java | 2 +- .../magus/radix/condition/MultiCondition.java | 2 +- .../minecraft/forge/key/KeyHoldCondition.java | 20 +++++++++++++++++-- .../magus/server/ServerEvents.java | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 19ac738a..8641da71 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -37,7 +37,7 @@ private void finishCurrentCondition() { } else { currentConditionIndex++; } -// LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION: " + currentCondition.getClass()); + LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION: " + currentCondition.getClass()); currentCondition.unregister(); currentCondition = conditionSequence.get(currentConditionIndex); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 96ca8720..b23a23d2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -43,7 +43,7 @@ public void reset() { int id = counter.getAndIncrement(); condition.register(() -> { synchronized (conditionsMet){ -// LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); + LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); conditionsMet.put(id, true); condition.unregister(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 182d8fff..35c413f6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -44,6 +44,13 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (release) { LogManager.getLogger().info("ONSUCCESS RUNNING 1"); this.onSuccess.run(); + reset(); + } + } else { + if(this.currentHolding > 0) { + LogManager.getLogger().info("ONFAILURE RUNNING 1"); + this.onFailure.run(); + reset(); } } } @@ -53,11 +60,14 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (!release) { LogManager.getLogger().info("ONSUCCESS RUNNING 2"); this.onSuccess.run(); + reset(); } } if (this.currentTotal >= timeout) { + LogManager.getLogger().info("ONFAILURE RUNNING 2"); this.onFailure.run(); + reset(); } this.currentTotal++; } @@ -65,8 +75,14 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } public boolean pressed(int held, int duration) { - LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration); - return held >= duration || held > 0 && duration <= KEY_PRESS_TIMEOUT; + boolean pressed = held >= duration || held > 0 && duration <= KEY_PRESS_TIMEOUT; + LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration + ", result: " + pressed); + return pressed; + } + + public void reset() { + this.currentTotal = 0; + this.currentHolding = 0; } public int getKey() { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 28dbef54..2b2ba51c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -63,7 +63,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { - if(event.getLevel().isClientSide()) + if(event.getLevel().isClientSide() && event.getEntity() instanceof Player) { Magus.keyboardInputModule.unregisterInputs(); } From 7ea63a9f51f8f3cf611119ef0db16bfa3528372a Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 5 Feb 2024 16:11:43 -0800 Subject: [PATCH 175/469] Infinite failure? --- .../magus/radix/condition/ChainedCondition.java | 2 +- .../magus/radix/condition/MultiCondition.java | 3 ++- .../minecraft/forge/key/KeyHoldCondition.java | 11 ++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 88ecbbd1..75795666 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -38,7 +38,7 @@ private void finishCurrentCondition() { currentConditionIndex++; } //Debugging statement - LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION: " + currentCondition.getClass()); + // LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION: " + currentCondition.getClass()); currentCondition.unregister(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 3dafabe8..8372b727 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -47,7 +47,8 @@ public void reset() { condition.register(() -> { synchronized (conditionsMet) { // Debugging statement: - LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); +// LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); + conditionsMet.put(id, true); condition.unregister(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 213fc6b5..3adf9976 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -40,13 +40,14 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (pressed(this.currentHolding, duration)) { // If the Condition requires the key being released.... if (release) { - LogManager.getLogger().info("ONSUCCESS RUNNING 1"); +// LogManager.getLogger().info("ONSUCCESS RUNNING 1"); this.onSuccess.run(); reset(); } } else { + // Not held for long enough if (this.currentHolding > 0) { - LogManager.getLogger().info("ONFAILURE RUNNING 1"); +// LogManager.getLogger().info("ONFAILURE RUNNING 1"); this.onFailure.run(); reset(); } @@ -56,14 +57,14 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (pressed(this.currentHolding, duration)) { // If the Condition doesn't require the key being released.... if (!release) { - LogManager.getLogger().info("ONSUCCESS RUNNING 2"); +// LogManager.getLogger().info("ONSUCCESS RUNNING 2"); this.onSuccess.run(); reset(); } } if (this.currentTotal >= timeout) { - LogManager.getLogger().info("ONFAILURE RUNNING 2"); +// LogManager.getLogger().info("ONFAILURE RUNNING 2"); this.onFailure.run(); reset(); } @@ -74,7 +75,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { public boolean pressed(int held, int duration) { boolean pressed = held >= duration || held > 0 && duration <= KEY_PRESS_TIMEOUT; - LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration + ", result: " + pressed); +// LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration + ", result: " + pressed); return pressed; } From b956d994d2ed2d5977e73e879bf9c2555009a632 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 5 Feb 2024 16:41:13 -0800 Subject: [PATCH 176/469] Removing some debugging to investigate ChainedCondition issues --- .../minecraft/forge/key/KeyHoldCondition.java | 2 +- .../omegasource/magus/server/ServerEvents.java | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 3adf9976..f7d0a7bb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -34,7 +34,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START) { if (((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { - LogManager.getLogger().info("KEY PRESSED: " + key); +// LogManager.getLogger().info("KEY PRESSED: " + key); this.currentHolding++; } else { if (pressed(this.currentHolding, duration)) { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 2b2ba51c..8b83cd9f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -4,11 +4,13 @@ import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import com.mojang.datafixers.util.Pair; import net.minecraft.world.entity.player.Player; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.EntityLeaveLevelEvent; @@ -23,6 +25,7 @@ public class ServerEvents { public static void worldStart(LevelEvent event) { } + @SubscribeEvent public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @@ -41,7 +44,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //Resets the tree; for testing purposes. if (capability.getTree() != null) capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChild(Forms.ARC, secondNode).build()); + RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), + new Pair<>(Forms.STEP, secondNode)).build()); // new Pair<>(Forms.FORCE, secondNode), // new Pair<>(Forms.BURST, secondNode)).build()); tree.setOwner(event.getEntity()); @@ -51,9 +55,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // we have a key for activating the bending state capability.getTree().start(); } - } - else { - if(event.getEntity() instanceof Player) { + } else { + if (event.getEntity() instanceof Player) { Magus.keyboardInputModule.registerListeners(); AvatarFormRegistry.registerForms(); } @@ -61,10 +64,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } @SubscribeEvent - public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) - { - if(event.getLevel().isClientSide() && event.getEntity() instanceof Player) - { + public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { + if (event.getLevel().isClientSide() && event.getEntity() instanceof Player) { Magus.keyboardInputModule.unregisterInputs(); } } From bd3b6ca0650630377fabcc47c63687145358c9e2 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 6 Feb 2024 01:10:18 -0800 Subject: [PATCH 177/469] Fixed step failing constantly --- .../omegasource/magus/radix/path/PathBuilder.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 94f02e45..32d7ad39 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -63,13 +63,13 @@ public class PathBuilder { if (input.minDelay() > 0) { //TODO: Fix this to account for "action keys". - timed = new TickTimedCondition( - TickEvent.Type.CLIENT, TickEvent.Phase.START, - input.maxDelay(), Result.SUCCESS, - new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS - ); - timedCondition = ConditionBuilder.createMultiCondition(timed); - allConditions.add(timedCondition); +// timed = new TickTimedCondition( +// TickEvent.Type.CLIENT, TickEvent.Phase.START, +// input.maxDelay(), Result.SUCCESS, +// new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS +// ); +// timedCondition = ConditionBuilder.createMultiCondition(timed); +// allConditions.add(timedCondition); } } return new LinkedList<>(allConditions); From 68ec47e72cc953cd65e43a24d15fa39bf9322409 Mon Sep 17 00:00:00 2001 From: Aidan Date: Tue, 6 Feb 2024 13:24:44 +0000 Subject: [PATCH 178/469] changes --- .../magus/radix/condition/MultiCondition.java | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 8372b727..e557df44 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -1,6 +1,9 @@ package com.amuzil.omegasource.magus.radix.condition; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; +import net.minecraftforge.event.TickEvent; import org.apache.logging.log4j.LogManager; import java.util.Dictionary; @@ -8,12 +11,17 @@ import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; public class MultiCondition extends Condition { private final List concurrentConditions; private Runnable onCompleteSuccess; private Runnable onCompleteFailure; private Dictionary conditionsMet; + private Consumer clientTickListener; + private static int TIMEOUT_IN_TICKS = 15; + private int executionTime = 0; + private boolean startedExecuting = false; public MultiCondition(List concurrentConditions) { this.concurrentConditions = concurrentConditions; @@ -34,6 +42,20 @@ private void checkConditionMet() { @Override public void register(Runnable onSuccess, Runnable onFailure) { + this.clientTickListener = event -> { + if (event.phase == TickEvent.ClientTickEvent.Phase.START) { + if(startedExecuting) + { + executionTime++; + if(executionTime > TIMEOUT_IN_TICKS) { + this.onCompleteFailure.run(); + + LogManager.getLogger().info("MULTI CONDITION TIMED OUT"); + this.reset(); + } + } + } + }; this.onCompleteSuccess = onSuccess; this.onCompleteFailure = onFailure; this.reset(); @@ -42,18 +64,26 @@ public void register(Runnable onSuccess, Runnable onFailure) { public void reset() { AtomicInteger counter = new AtomicInteger(); conditionsMet = new Hashtable<>(); + this.startedExecuting = false; + this.executionTime = 0; concurrentConditions.forEach(condition -> { int id = counter.getAndIncrement(); condition.register(() -> { synchronized (conditionsMet) { // Debugging statement: // LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); - + startedExecuting = true; conditionsMet.put(id, true); condition.unregister(); } checkConditionMet(); - }, onCompleteFailure); + }, () -> { + synchronized (conditionsMet) { + conditionsMet.put(id, false); + condition.unregister(); + } + checkConditionMet(); + }); conditionsMet.put(id, false); }); } From eb24bafe7d763e19e52d13e3e298cdc8da8de421 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 6 Feb 2024 15:29:14 -0800 Subject: [PATCH 179/469] goddamit --- .../com/amuzil/omegasource/magus/radix/path/PathBuilder.java | 2 +- .../omegasource/magus/skill/test/avatar/AvatarFormRegistry.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 32d7ad39..dd4bce10 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -27,7 +27,7 @@ public class PathBuilder { //TODO: Adjust these final int HELD_THRESHOLD = 3; // 50 by default - final int TIMEOUT_THRESHOLD = 60000000; + final int TIMEOUT_THRESHOLD = 200; /* Keys. */ //TODO: Account for max delay diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 5d319429..a22bd74a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -62,7 +62,7 @@ public static void registerForms() { // FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); // // FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); From 897eb33443eeac025cb6f55936cb9ea26e80216a Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 6 Feb 2024 15:31:55 -0800 Subject: [PATCH 180/469] fixed the mouse button being set when you leave a world --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 3 +++ .../java/com/amuzil/omegasource/magus/server/ServerEvents.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 35f4055a..afcbcba0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -133,6 +133,9 @@ private void sendModifierData() { } } + public void resetKeys() { + glfwKeysDown = new ArrayList<>(); + } public void cleanMCKeys() { // Fixes some weird mouse and other key issues. for (KeyMapping key : Minecraft.getInstance().options.keyMappings) { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 8b83cd9f..0ac1f1d8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.server; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; @@ -67,6 +68,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { if (event.getLevel().isClientSide() && event.getEntity() instanceof Player) { Magus.keyboardInputModule.unregisterInputs(); + ((KeyboardMouseInputModule) Magus.keyboardInputModule).resetKeys(); } } } From 4a141dd403f74505966f092edbf7bc3a94f08adf Mon Sep 17 00:00:00 2001 From: Aidan Date: Tue, 6 Feb 2024 23:33:07 +0000 Subject: [PATCH 181/469] changes --- .../minecraft/forge/key/KeyHoldCondition.java | 23 ++++++++++++------- .../magus/radix/path/PathBuilder.java | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index f7d0a7bb..e82ebea6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; +import net.minecraft.client.Minecraft; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.ClientTickEvent; @@ -21,6 +22,7 @@ public class KeyHoldCondition extends Condition { private final int key; // False by default. private final boolean release; + private boolean started = false; public KeyHoldCondition(int key, int duration, int timeout, boolean release) { RadixUtil.assertTrue(duration >= 1, "duration must be >= 1"); @@ -30,10 +32,12 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.currentHolding = 0; this.release = release; this.key = key; + this.started = false; this.clientTickListener = event -> { - if (event.phase == ClientTickEvent.Phase.START) { + if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { if (((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { + this.started = true; // LogManager.getLogger().info("KEY PRESSED: " + key); this.currentHolding++; } else { @@ -47,7 +51,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } else { // Not held for long enough if (this.currentHolding > 0) { -// LogManager.getLogger().info("ONFAILURE RUNNING 1"); + LogManager.getLogger().info("ONFAILURE RUNNING 1"); this.onFailure.run(); reset(); } @@ -62,13 +66,15 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { reset(); } } - - if (this.currentTotal >= timeout) { -// LogManager.getLogger().info("ONFAILURE RUNNING 2"); - this.onFailure.run(); - reset(); + if(this.started || !release) { + if (this.currentTotal >= timeout) { + LogManager.getLogger().info("ONFAILURE RUNNING 2"); + this.onFailure.run(); + reset(); + } + this.currentTotal++; } - this.currentTotal++; + } }; } @@ -82,6 +88,7 @@ public boolean pressed(int held, int duration) { public void reset() { this.currentTotal = 0; this.currentHolding = 0; + this.started = false; } public int getKey() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 32d7ad39..836d592f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -27,7 +27,7 @@ public class PathBuilder { //TODO: Adjust these final int HELD_THRESHOLD = 3; // 50 by default - final int TIMEOUT_THRESHOLD = 60000000; + final int TIMEOUT_THRESHOLD = 20; /* Keys. */ //TODO: Account for max delay From ad24a0434dec2f84244e080bf2a19063de0d5596 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 6 Feb 2024 15:33:24 -0800 Subject: [PATCH 182/469] Reset keys upon joining a world --- .../java/com/amuzil/omegasource/magus/server/ServerEvents.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 0ac1f1d8..a7fdd4d6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -58,6 +58,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } else { if (event.getEntity() instanceof Player) { + ((KeyboardMouseInputModule) Magus.keyboardInputModule).resetKeys(); Magus.keyboardInputModule.registerListeners(); AvatarFormRegistry.registerForms(); } From d6a251db811b5bd842c4740c9de685fed4166cc8 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 6 Feb 2024 15:59:02 -0800 Subject: [PATCH 183/469] cleanup, added in a keymapping to toggle the tree --- .../amuzil/omegasource/magus/input/KeyBindings.java | 12 ++++++++++++ .../magus/input/KeyboardMouseInputModule.java | 1 - .../minecraft/forge/key/KeyHoldCondition.java | 2 +- .../omegasource/magus/radix/path/PathBuilder.java | 2 +- .../magus/skill/listener/DynamicStateListener.java | 13 ------------- 5 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/listener/DynamicStateListener.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java new file mode 100644 index 00000000..ad918fb2 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java @@ -0,0 +1,12 @@ +package com.amuzil.omegasource.magus.input; + +import net.minecraft.client.KeyMapping; +import net.minecraft.client.Minecraft; + +import javax.swing.text.JTextComponent; + +public class KeyBindings { + + // Grave. Found the key # in InputConstants. + public static final KeyMapping keyToggleTree = new KeyMapping("key.keyboard.grave.accent", 96, "key.categories.gameplay");; +} diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index afcbcba0..4a5b930e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -44,7 +44,6 @@ public class KeyboardMouseInputModule extends InputModule { public KeyboardMouseInputModule() { this.glfwKeysDown = new ArrayList<>(); - this.keyboardListener = keyboardEvent -> { int keyPressed = keyboardEvent.getKey(); switch (keyboardEvent.getAction()) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index e82ebea6..7c895b50 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -66,7 +66,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { reset(); } } - if(this.started || !release) { + if(this.started) { if (this.currentTotal >= timeout) { LogManager.getLogger().info("ONFAILURE RUNNING 2"); this.onFailure.run(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index dd4bce10..9224b929 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -27,7 +27,7 @@ public class PathBuilder { //TODO: Adjust these final int HELD_THRESHOLD = 3; // 50 by default - final int TIMEOUT_THRESHOLD = 200; + final int TIMEOUT_THRESHOLD = 15; /* Keys. */ //TODO: Account for max delay diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/listener/DynamicStateListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/listener/DynamicStateListener.java deleted file mode 100644 index 1013e88a..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/listener/DynamicStateListener.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.amuzil.omegasource.magus.skill.listener; - -/** - * Listeners store activators. Activators have a list of pre-requisites/events. - * Listeners search for those events and trigger all activators as needed. - * 1 listener per activator. - * Activators can have hard-coded pre-requisites or loaded ones from json files. - * Upon 'skill mode' being activated (whether through a toggle key or something else), all - * skill listeners are loaded. Listeners that are always active are the toggle listeners/initialise - * listeners. - **/ -public class DynamicStateListener { -} From 37b53aba9885c800f5b10cf21fe5317ecb4a63a7 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 6 Feb 2024 16:02:00 -0800 Subject: [PATCH 184/469] Don't know why the minimum delay was so high --- .../omegasource/magus/skill/test/avatar/AvatarFormRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index a22bd74a..1cdc9933 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -79,7 +79,7 @@ public static void registerForms() { KeyInput first, release, second; // Problem: The tick delay is being combined with the key press into a simultaneous condition. // Not good. - first = KeyDataBuilder.createInput(key.getValue(), true,60, 70, 0); + first = KeyDataBuilder.createInput(key.getValue(), true, 0, 70, 0); second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); inputs.add(KeyDataBuilder.createChainedInput(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP); From b167f83f62ecbc3926857b9515fb8bd97e0cd117 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 7 Feb 2024 01:48:33 -0800 Subject: [PATCH 185/469] Should toggle listeners now? --- .../omegasource/magus/input/InputModule.java | 2 ++ .../omegasource/magus/input/KeyBindings.java | 22 +++++++++++++++++-- .../magus/input/KeyboardMouseInputModule.java | 14 ++++++++++++ .../skill/test/avatar/AvatarFormRegistry.java | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 2aff3129..365f7aba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -69,4 +69,6 @@ public void resetLastActivated() { public void unregisterModifiers() { modifierListeners.forEach(ModifierListener::unregister); } + + public abstract void toggleListeners(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java index ad918fb2..8d65e713 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java @@ -1,12 +1,30 @@ package com.amuzil.omegasource.magus.input; +import com.amuzil.omegasource.magus.Magus; import net.minecraft.client.KeyMapping; -import net.minecraft.client.Minecraft; +import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.client.event.RegisterKeyMappingsEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; -import javax.swing.text.JTextComponent; +// Need to denote this as client-side only +@Mod.EventBusSubscriber(modid = Magus.MOD_ID) public class KeyBindings { // Grave. Found the key # in InputConstants. public static final KeyMapping keyToggleTree = new KeyMapping("key.keyboard.grave.accent", 96, "key.categories.gameplay");; + + @SubscribeEvent + public static void registerBindings(RegisterKeyMappingsEvent event) { + event.register(keyToggleTree); + } + + @SubscribeEvent + public static void keyBindPress(InputEvent.Key press) { + if (press.getKey() == keyToggleTree.getKey().getValue()) { + Magus.keyboardInputModule.toggleListeners(); + } + } + } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 4a5b930e..a8462284 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -40,6 +40,7 @@ public class KeyboardMouseInputModule extends InputModule { private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; + private boolean listen = false; Minecraft mc = Minecraft.getInstance(); public KeyboardMouseInputModule() { @@ -91,6 +92,7 @@ public KeyboardMouseInputModule() { }; tickEventConsumer = tickEvent -> { + ticksSinceModifiersSent++; if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { sendModifierData(); @@ -200,6 +202,18 @@ public void unregisterInputs() { formInputs.forEach((condition, form) -> condition.unregister()); } + @Override + public void toggleListeners() { + if (!listen) { + registerListeners(); + listen = true; + } + else { + unregisterInputs(); + listen = false; + } + } + public boolean keyPressed(int key) { return glfwKeysDown.contains(key); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 1cdc9933..8fefe021 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -76,7 +76,7 @@ public static void registerForms() { inputs.clear(); //TODO: Find a way to specify releasing a key is required. - KeyInput first, release, second; + KeyInput first, second; // Problem: The tick delay is being combined with the key press into a simultaneous condition. // Not good. first = KeyDataBuilder.createInput(key.getValue(), true, 0, 70, 0); From eb7f6818f58939a434d00358a28dff2f7776acdc Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 7 Feb 2024 01:58:36 -0800 Subject: [PATCH 186/469] yeah it doesn't turn back on --- .../com/amuzil/omegasource/magus/input/KeyBindings.java | 9 +++++++-- .../magus/input/KeyboardMouseInputModule.java | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java index 8d65e713..54429511 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java @@ -2,14 +2,16 @@ import com.amuzil.omegasource.magus.Magus; import net.minecraft.client.KeyMapping; +import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.client.event.RegisterKeyMappingsEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; +import org.lwjgl.glfw.GLFW; // Need to denote this as client-side only -@Mod.EventBusSubscriber(modid = Magus.MOD_ID) +@Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class KeyBindings { // Grave. Found the key # in InputConstants. @@ -23,7 +25,10 @@ public static void registerBindings(RegisterKeyMappingsEvent event) { @SubscribeEvent public static void keyBindPress(InputEvent.Key press) { if (press.getKey() == keyToggleTree.getKey().getValue()) { - Magus.keyboardInputModule.toggleListeners(); + if (press.getAction() == GLFW.GLFW_RELEASE) { + Magus.keyboardInputModule.toggleListeners(); + System.out.println("Toggled!"); + } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index a8462284..002fa2d5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -40,11 +40,12 @@ public class KeyboardMouseInputModule extends InputModule { private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; - private boolean listen = false; + private boolean listen; Minecraft mc = Minecraft.getInstance(); public KeyboardMouseInputModule() { this.glfwKeysDown = new ArrayList<>(); + this.listen = true; this.keyboardListener = keyboardEvent -> { int keyPressed = keyboardEvent.getKey(); switch (keyboardEvent.getAction()) { From c7486cbc34c3a00c8f8cc2f4706af2d4456b80ca Mon Sep 17 00:00:00 2001 From: Aidan Date: Sat, 10 Feb 2024 13:34:13 +0000 Subject: [PATCH 187/469] got the bending toggle key working --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 4 ++++ .../java/com/amuzil/omegasource/magus/radix/Condition.java | 4 ++++ .../omegasource/magus/radix/condition/ChainedCondition.java | 5 +++++ .../omegasource/magus/radix/condition/MultiCondition.java | 5 +++++ .../radix/condition/minecraft/forge/EventCondition.java | 5 +++++ .../radix/condition/minecraft/forge/TickTimedCondition.java | 6 ++++++ .../condition/minecraft/forge/key/KeyHoldCondition.java | 6 ++++++ 7 files changed, 35 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 002fa2d5..3e1f771c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -203,6 +203,10 @@ public void unregisterInputs() { formInputs.forEach((condition, form) -> condition.unregister()); } + public void registerInputs() { + formInputs.forEach((condition, form) -> condition.register()); + } + @Override public void toggleListeners() { if (!listen) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 1a3c7d95..7b1a59bb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -27,6 +27,10 @@ public void register(Runnable onSuccess, Runnable onFailure) { }; } + public void register() { + + } + public void unregister() { // Thread.dumpStack(); RadixUtil.getLogger().debug("Unregistering condition:" + getClass()); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 75795666..1ebd053d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -65,6 +65,11 @@ private void reset() { public void register(Runnable onSuccess, Runnable onFailure) { this.onCompleteSuccess = onSuccess; this.onCompleteFailure = onFailure; + this.register(); + } + + @Override + public void register() { currentCondition = conditionSequence.get(currentConditionIndex); currentCondition.register(onPartialSuccess, onPartialFailure); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index e557df44..75a2c8b3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -88,6 +88,11 @@ public void reset() { }); } + @Override + public void register() { + this.reset(); + } + @Override public void unregister() { concurrentConditions.forEach(Condition::unregister); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index 22dabd71..059b2822 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -28,6 +28,11 @@ public EventCondition(Class eventType, Function condition) { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); + this.register(); + } + + @Override + public void register() { //This is required because a class type check isn't inbuilt, for some reason. MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, eventType, listener); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index d9298b5a..124060c4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -42,6 +42,12 @@ public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); + this.register(); + } + + @Override + public void register() { + super.register(); // TODO is this the correct approach? this.subCondition.register(runOn(this.onSubSuccess), runOn(this.onSubFailure)); //Ensures no cast errors occur (blame forge) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 7c895b50..4e55c825 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -98,6 +98,12 @@ public int getKey() { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); + this.register(); + } + + @Override + public void register() { + super.register(); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); } From 7fa744fc5fc7e54d928505aef94e3c4f5b88b9ae Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 9 Mar 2024 20:39:06 +1100 Subject: [PATCH 188/469] Gonna start experimenting with avatar stuff before porting it to a separate mod --- .../magus/skill/effects/EffectTreeBuilder.java | 8 ++++++-- .../omegasource/magus/skill/skill/SkillBuilder.java | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBuilder.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java index 14a3bd8c..68ef7e46 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java @@ -5,6 +5,10 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.forms.Form; +/** + * Creates Effects given a set of Forms. + * To use Effects together, check out SkillBuilder + */ public class EffectTreeBuilder { private NodeBuilder tree; @@ -22,8 +26,8 @@ public EffectTreeBuilder start() { return this; } - //Creates an Effect runnable to add to the tree. - public EffectTreeBuilder addEffect(Form form, Effect effect) { + //Adds a required Form to the tree. + public EffectTreeBuilder addForm(Form form) { tree.addChild(form, current); return this; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBuilder.java new file mode 100644 index 00000000..ec355f26 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillBuilder.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.skill; + +public class SkillBuilder { +} From 4ab597097c72a9f3862876bd7508978c81adbc5e Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 30 May 2024 20:37:37 +1000 Subject: [PATCH 189/469] Slowly migrating the tree to conditions instead of forms --- .../amuzil/omegasource/magus/radix/Node.java | 7 ++++--- .../omegasource/magus/radix/NodeBuilder.java | 10 +++++----- .../omegasource/magus/radix/RadixPath.java | 18 ++++++++++-------- .../magus/skill/effects/EffectTreeBuilder.java | 3 ++- .../magus/skill/forms/FormDataRegistry.java | 17 +++++++++++++++++ .../skill/test/avatar/AvatarTreeTest.java | 3 +++ 6 files changed, 41 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 502844a7..8c182289 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -21,7 +21,8 @@ * */ public class Node { - private final Map children; + //This needs to be changed to + private final Map children; private final Consumer onEnter; private final Consumer onLeave; private final Consumer onTerminate; @@ -36,7 +37,7 @@ public class Node { * @param terminateCondition If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate */ public Node( - Map children, + Map children, Consumer onEnter, Consumer onLeave, Consumer onTerminate, @@ -51,7 +52,7 @@ public Node( this.modifiers = Collections.synchronizedList(modifiers.stream().map(Modifier::data).toList()); } - public Map children() { + public Map children() { return children; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index f2c2bd49..3da62cc6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -10,7 +10,7 @@ public class NodeBuilder { private final Type type; - private final Map children; + private final Map children; private Consumer onEnter; private Consumer onLeave; private Consumer onTerminate; @@ -43,18 +43,18 @@ private IllegalStateException cannot(String message) { return new IllegalStateException("A " + type.name().toLowerCase(Locale.ROOT) + " node cannot " + message); } - public NodeBuilder addChild(Form form, Node child) { + public NodeBuilder addChild(Condition condition, Node child) { if (type.canHaveChildren) { - children.put(form, child); + children.put(condition, child); return this; } else { throw cannot("Have Children"); } } - public NodeBuilder addChildren(Pair... children) { + public NodeBuilder addChildren(Pair... children) { if (type.canHaveChildren) { - for (Pair child : children) + for (Pair child : children) addChild(child.getFirst(), child.getSecond()); return this; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java index 34a321c1..2704f517 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java @@ -15,14 +15,14 @@ public class RadixPath implements INBTSerializable { - private LinkedList>> activationPath; + private LinkedList>> activationPath; public RadixPath() { activationPath = new LinkedList<>(); } - public void addStep(Form activatedForm, List modifierData) { - activationPath.add(Pair.of(activatedForm, modifierData)); + public void addStep(Condition activatedCondition, List modifierData) { + activationPath.add(Pair.of(activatedCondition, modifierData)); } @Override @@ -33,16 +33,16 @@ public CompoundTag serializeNBT() { CompoundTag pairTag; for (int i = 0; i < activationPath.size(); i++) { - Pair> formListPair = activationPath.get(i); - Form activeForm = formListPair.first; - List modifierData = formListPair.second; + Pair> conditionListPair = activationPath.get(i); + Condition activeCondition = conditionListPair.first; + List modifierData = conditionListPair.second; pairTag = new CompoundTag(); ListTag modifierDataListTag = new ListTag(); modifierData.forEach(modifierDataInstance -> modifierDataListTag.add(modifierDataInstance.serializeNBT())); - pairTag.putString("form", activeForm.name()); + pairTag.putString("condition", activeCondition.toString()); pairTag.put("modifiers", modifierDataListTag); listOfPairsTag.add(i, pairTag); } @@ -57,6 +57,8 @@ public void deserializeNBT(CompoundTag compoundTag) { ListTag listOfPairsTag = (ListTag)compoundTag.get("activationPath"); activationPath = new LinkedList<>(); listOfPairsTag.forEach(pairTag -> { + // Need to figure out how to convert this into conditions. + // Going to go over capability data to check for every active listener and use those in the path. if(pairTag instanceof CompoundTag pairTagCompound) { Pair> stepPair; Form formActivated = FormDataRegistry.getFormByName(pairTagCompound.getString("form")); @@ -67,7 +69,7 @@ public void deserializeNBT(CompoundTag compoundTag) { modifiersListTag.forEach(tag -> modifierData.add(ModifiersRegistry.fromCompoundTag(compoundTag))); stepPair = Pair.of(formActivated, modifierData); - activationPath.add(stepPair); +// activationPath.add(stepPair); } }); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java index 68ef7e46..d56aa671 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/effects/EffectTreeBuilder.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.effects; +import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; @@ -27,7 +28,7 @@ public EffectTreeBuilder start() { } //Adds a required Form to the tree. - public EffectTreeBuilder addForm(Form form) { + public EffectTreeBuilder addCondition(Condition form) { tree.addChild(form, current); return this; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index e2b971e1..4c7b087c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -1,7 +1,9 @@ package com.amuzil.omegasource.magus.skill.forms; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import net.minecraft.resources.ResourceLocation; @@ -12,11 +14,14 @@ public class FormDataRegistry { + //TODO: Change this to use Conditions rather than a list of input data private static Map, Form> formTypes; + private static Map> formConditions; //Remember to see #InputConstants for the key names. public static void init() { formTypes = new HashMap<>(); + formConditions = new HashMap<>(); } public static Form getFormByName(String formName) { @@ -28,10 +33,22 @@ public static List getInputsForForm(Form formToModify) { } public static void registerForm(List inputs, Form form) { + // First, we register the raw input data Magus.keyboardInputModule.registerInputData(inputs, form); formTypes.put(inputs, form); + // Then, we register the requisite conditions + List conditions = new ArrayList<>(); + if (formConditions.containsKey(form)) { + conditions = formConditions.get(form); + } + Condition condition = ConditionBuilder.instance().fromInputData(inputs).build(); + conditions.add(condition); + formConditions.put(form, conditions); } + public static List getConditionsFrom(Form form) { + return formConditions.get(form); + } public static void registerForm(InputData input, Form form) { List singleton = new ArrayList<>(); singleton.add(input); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java index 5ca41fec..62fd60be 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarTreeTest.java @@ -8,5 +8,8 @@ public class AvatarTreeTest { public static void registerTechniques() { //Air Gust: Arc > Strike + // So it's tree would have 2 nodes: One for Arc, One for Strike *For the Effects*. + // So a tree reliant on Effects would be reliant on EventConditionals, stemming from + // listening to the 'onSuccess' event for OnSkillUse. } } From 4b00af5e4b9da043d9f05853a45e33f50ed012ed Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 20 Aug 2024 17:27:56 +1000 Subject: [PATCH 190/469] Significant progress migrating forms to conditions --- .../magus/input/KeyboardMouseInputModule.java | 4 ++-- .../magus/network/MagusNetwork.java | 12 +++++------ ...ket.java => ConditionActivatedPacket.java} | 19 +++++++++-------- .../omegasource/magus/radix/Condition.java | 3 +++ .../amuzil/omegasource/magus/radix/Node.java | 3 +-- .../omegasource/magus/radix/RadixTree.java | 15 ++++++------- .../radix/condition/ChainedCondition.java | 5 +++++ .../magus/radix/condition/MultiCondition.java | 5 +++++ .../radix/condition/SimpleCondition.java | 5 +++++ .../minecraft/forge/EventCondition.java | 5 ++++- .../minecraft/forge/TickTimedCondition.java | 5 +++++ .../minecraft/forge/key/KeyHoldCondition.java | 5 +++++ .../forge/key/KeyPressedCondition.java | 5 +++++ .../magus/server/ServerEvents.java | 21 ++++++++++--------- .../skill/conditionals/ConditionBuilder.java | 1 + 15 files changed, 76 insertions(+), 37 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/{FormActivatedPacket.java => ConditionActivatedPacket.java} (65%) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 3e1f771c..ba224bb1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.network.MagusNetwork; -import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; @@ -110,7 +110,7 @@ public KeyboardMouseInputModule() { // })); if(ticksSinceActivated >= tickActivationThreshold) { LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); - MagusNetwork.sendToServer(new FormActivatedPacket(activeForm)); + MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; activeForm = null; ticksSinceActivated = 0; diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java index aae810b3..c919eca9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -5,7 +5,7 @@ import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.SkillTriggeredPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; -import com.amuzil.omegasource.magus.network.packets.server_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.StartBendingPacket; import net.minecraft.resources.ResourceLocation; @@ -29,10 +29,10 @@ private static int nextID() { } public static void registerMessages() { - CHANNEL.messageBuilder(FormActivatedPacket.class, nextID()) - .encoder(FormActivatedPacket::toBytes) - .decoder(FormActivatedPacket::fromBytes) - .consumerMainThread(FormActivatedPacket::handle) + CHANNEL.messageBuilder(ConditionActivatedPacket.class, nextID()) + .encoder(ConditionActivatedPacket::toBytes) + .decoder(ConditionActivatedPacket::fromBytes) + .consumerMainThread(ConditionActivatedPacket::handle) .add(); CHANNEL.messageBuilder(SkillTriggeredPacket.class, nextID()) @@ -71,7 +71,7 @@ public static void sendToClient(MagusPacket packet, ServerPlayer player) { CHANNEL.sendTo(packet, player.connection.connection, NetworkDirection.PLAY_TO_CLIENT); } - public static void sendToServer(MagusPacket packet) { + public static void sendToServer(MagusPacket packet) { CHANNEL.sendToServer(packet); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java similarity index 65% rename from src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java rename to src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index 241d5fcf..db477729 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.network.packets.server_executed; import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; +import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -10,23 +11,23 @@ import java.util.function.Supplier; -public class FormActivatedPacket implements MagusPacket { +public class ConditionActivatedPacket implements MagusPacket { - private final Form form; + private final Condition condition; - public FormActivatedPacket(Form form) { - this.form = form; + public ConditionActivatedPacket(Condition condition) { + this.condition = condition; } public void toBytes(FriendlyByteBuf buf) { - if(form != null) { - buf.writeUtf(form.name()); - } +// if(condition != null) { +// buf.writeUtf(form.name()); +// } } - public static FormActivatedPacket fromBytes(FriendlyByteBuf buf) { + public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { String form = buf.readUtf(); - return new FormActivatedPacket(FormDataRegistry.getFormByName(form)); + return new ConditionActivatedPacket(FormDataRegistry.getFormByName(form)); } public boolean handle(Supplier ctx) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 7b1a59bb..287d20cd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -45,4 +45,7 @@ protected Runnable runOn(Result result) { case NONE -> NO_OPERATION; }; } + + // Need to log each condition's id too + public abstract String name(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 8c182289..441c77ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -76,11 +76,10 @@ public synchronized List getModifiers() { return modifiers; } - public void registerModifierListeners(Form lastActivatedForm, Discipline activeDiscipline, ServerPlayer player) { + public void registerModifierListeners(Discipline activeDiscipline, ServerPlayer player) { CompoundTag listenerInstanceData = new CompoundTag(); //here we can send information to the client to help build the Modifier Listeners appropriately. - listenerInstanceData.putString("lastFormActivated", lastActivatedForm.name()); listenerInstanceData.putString("activeElement", activeDiscipline.name()); List modifierTypes = new ArrayList<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index f671bd00..05746b0c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; @@ -14,7 +13,7 @@ public class RadixTree { private final Node root; private Node active; - private Form lastActivated = null; + private Condition lastActivated = null; // Fire is a test private Discipline activeDiscipline = null;//Disciplines.FIRE; private RadixPath path; @@ -47,7 +46,7 @@ private void setActive(Node node) { active = node; if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) - active.registerModifierListeners(lastActivated, activeDiscipline, player); + active.registerModifierListeners(activeDiscipline, player); if (active.onEnter() != null) { active.onEnter().accept(this); @@ -75,7 +74,7 @@ private void terminate() { start(); } - public void moveDown(Form executedForm) { + public void moveDown(Condition executedCondition) { if(activeDiscipline == null) { LogManager.getLogger().info("NO ELEMENT SELECTED"); return; @@ -83,13 +82,15 @@ public void moveDown(Form executedForm) { //add the last Node to the activation Path and store its ModifierData's if (this.lastActivated != null && active != null) { - if(this.lastActivated.name().equals(executedForm.name())) { + //TODO: + // Need a better way to ensure the conditions are equivalent + if(this.lastActivated.name().equals(executedCondition.name())) { addModifierData(new MultiModifierData()); return; } path.addStep(this.lastActivated, active.getModifiers()); } - this.lastActivated = executedForm; + this.lastActivated = executedCondition; if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) { active.unregisterModifierListeners(player); @@ -108,7 +109,7 @@ public void moveDown(Form executedForm) { active.terminateCondition().unregister(); } - setActive(active.children().get(executedForm)); + setActive(active.children().get(executedCondition)); } public void expire() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 1ebd053d..b2257ff5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -78,4 +78,9 @@ public void register() { public void unregister() { currentCondition.unregister(); } + + @Override + public String name() { + return "chained_condition"; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 75a2c8b3..27d46026 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -97,4 +97,9 @@ public void register() { public void unregister() { concurrentConditions.forEach(Condition::unregister); } + + @Override + public String name() { + return "multi_condition"; + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java index feff1337..991255a4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java @@ -19,4 +19,9 @@ public void register(Runnable onSuccess, Runnable onFailure) { onFailure.run(); } } + + @Override + public String name() { + return "simple_condition"; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index 059b2822..2e0f3ef2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -43,5 +43,8 @@ public void unregister() { MinecraftForge.EVENT_BUS.unregister(listener); } - + @Override + public String name() { + return "event"; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 124060c4..5c9103bb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -59,4 +59,9 @@ public void unregister() { MinecraftForge.EVENT_BUS.unregister(listener); subCondition.unregister(); } + + @Override + public String name() { + return "tick_timed_condition"; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 4e55c825..c135987f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -112,4 +112,9 @@ public void register() { public void unregister() { MinecraftForge.EVENT_BUS.unregister(clientTickListener); } + + @Override + public String name() { + return "key_hold"; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java index 0948f5a9..eeafeac9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -16,4 +16,9 @@ public KeyPressedCondition(int timeout) { InputEvent.Key.class, event -> !KeyboardData.ignore(event.getKey()) ), Result.SUCCESS, Result.FAILURE); } + + @Override + public String name() { + return "key_pressed"; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index a7fdd4d6..eec07d99 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -45,16 +45,17 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //Resets the tree; for testing purposes. if (capability.getTree() != null) capability.getTree().burn(); - RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), - new Pair<>(Forms.STEP, secondNode)).build()); - // new Pair<>(Forms.FORCE, secondNode), -// new Pair<>(Forms.BURST, secondNode)).build()); - tree.setOwner(event.getEntity()); - capability.setTree(tree); - - //todo this is not be where we should call start, but for now it'll stop us crashing until - // we have a key for activating the bending state - capability.getTree().start(); + // TODO: Need a way to convert forms into conditions +// RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), +// new Pair<>(Forms.STEP, secondNode)).build()); +// // new Pair<>(Forms.FORCE, secondNode), +//// new Pair<>(Forms.BURST, secondNode)).build()); +// tree.setOwner(event.getEntity()); +// capability.setTree(tree); +// +// //todo this is not be where we should call start, but for now it'll stop us crashing until +// // we have a key for activating the bending state +// capability.getTree().start(); } } else { if (event.getEntity() instanceof Player) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index d1058699..8b06cedd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -72,6 +72,7 @@ public Condition build() { if (conditions.size() == 1) return conditions.get(0); + // This is bad. We want to just return a list of conditions. return new ChainedCondition(conditions); } From ceaa2d9d6f1dccbc22790995ea6ee4486899a389 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 21 Aug 2024 00:42:55 +1000 Subject: [PATCH 191/469] Slowly working on revising our inputs --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 2 +- .../packets/server_executed/ConditionActivatedPacket.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index ba224bb1..68f41729 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -110,7 +110,7 @@ public KeyboardMouseInputModule() { // })); if(ticksSinceActivated >= tickActivationThreshold) { LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); - MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); +// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; activeForm = null; ticksSinceActivated = 0; diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index db477729..f793ecec 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -33,7 +33,7 @@ public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { public boolean handle(Supplier ctx) { ctx.get().enqueueWork(() -> { Player player = ctx.get().getSender(); - CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(form); + CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); }); return true; } From 7e76b946caa3da4d3c58aee9d63833d354d37a96 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 21 Aug 2024 19:54:25 +1000 Subject: [PATCH 192/469] Getting closer!!! --- .../ConditionActivatedPacket.java | 1 + .../omegasource/magus/radix/Condition.java | 14 +++------ .../omegasource/magus/radix/RadixTree.java | 31 +++++++++++++++++-- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index f793ecec..077144cd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -27,6 +27,7 @@ public void toBytes(FriendlyByteBuf buf) { public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { String form = buf.readUtf(); + // Need to add a way to store forms... return new ConditionActivatedPacket(FormDataRegistry.getFormByName(form)); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 287d20cd..27df2d35 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -16,15 +16,11 @@ public void register(Runnable onSuccess, Runnable onFailure) { //RadixUtil.getLogger().debug("Registering results"); // if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) // Thread.dumpStack(); - this.onSuccess = () -> { - //RadixUtil.getLogger().debug("Result: success"); - onSuccess.run(); - }; - this.onFailure = () -> { -// RadixUtil.getLogger().debug("Result: failure: " + getClass()); -// Thread.dumpStack(); - onFailure.run(); - }; + //RadixUtil.getLogger().debug("Result: success"); + this.onSuccess = onSuccess::run; + // RadixUtil.getLogger().debug("Result: failure: " + getClass()); + // Thread.dumpStack(); + this.onFailure = onFailure::run; } public void register() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 05746b0c..ce245cdb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -1,6 +1,9 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.event.SkillTickEvent; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; @@ -9,6 +12,7 @@ import org.apache.logging.log4j.LogManager; import java.util.List; +import java.util.Map; public class RadixTree { private final Node root; @@ -45,6 +49,21 @@ private void setActive(Discipline discipline) { private void setActive(Node node) { active = node; + /** + * Automatically handles making conditions move down the tree when satisfied. + * Need to adjust because it's moving down the tree based on its terminating condition, rather than for each child condition. + */ + for (Map.Entry child : active.children().entrySet()) { + //TODO: Find way to prevent overwriting but also prevent doubly sending packets. + Condition condition = child.getKey(); + Runnable success; + success = () -> { + condition.onSuccess.run(); + MagusNetwork.sendToServer(new ConditionActivatedPacket(condition)); + }; + condition.register(success, condition.onFailure); + } + if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) active.registerModifierListeners(activeDiscipline, player); @@ -52,8 +71,13 @@ private void setActive(Node node) { active.onEnter().accept(this); } + // Should run the original condition and terminate the tree if (active.terminateCondition() != null) { - active.terminateCondition().register(this::terminate, () -> { + Runnable onSuccess = () -> { + active.terminateCondition().onSuccess.run(); + terminate(); + }; + active.terminateCondition().register(onSuccess, () -> { }); } } @@ -70,10 +94,11 @@ private void terminate() { if (active.terminateCondition() != null) { active.terminateCondition().unregister(); } - start(); } + // TODO: + // Rather than relying on the input module to send packets, handle everything in the condition runnables? public void moveDown(Condition executedCondition) { if(activeDiscipline == null) { LogManager.getLogger().info("NO ELEMENT SELECTED"); @@ -82,7 +107,7 @@ public void moveDown(Condition executedCondition) { //add the last Node to the activation Path and store its ModifierData's if (this.lastActivated != null && active != null) { - //TODO: + //TODO: // Need a better way to ensure the conditions are equivalent if(this.lastActivated.name().equals(executedCondition.name())) { addModifierData(new MultiModifierData()); From f18764ec4305c61ad09d4423b8ae5febf59b91d4 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 21 Aug 2024 20:03:04 +1000 Subject: [PATCH 193/469] We should now move down the tree as intended --- .../com/amuzil/omegasource/magus/radix/RadixTree.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index ce245cdb..f342a743 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -52,7 +52,17 @@ private void setActive(Node node) { /** * Automatically handles making conditions move down the tree when satisfied. * Need to adjust because it's moving down the tree based on its terminating condition, rather than for each child condition. + * We only want to do this once per active node. */ + // Current Node + Condition currentCondition = active.terminateCondition(); + if (currentCondition != null) { + currentCondition.register(() -> { + currentCondition.onSuccess.run(); + MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); + }, currentCondition.onFailure); + } + // Child Nodes for (Map.Entry child : active.children().entrySet()) { //TODO: Find way to prevent overwriting but also prevent doubly sending packets. Condition condition = child.getKey(); From d55a0fbefe8c24f640d7a02d3af2537f5a8a45f5 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 21 Aug 2024 20:25:08 +1000 Subject: [PATCH 194/469] Registry for conditions done! --- .../omegasource/magus/radix/Condition.java | 4 ++- .../radix/condition/ConditionRegistry.java | 19 ++++++++++++ .../magus/registry/Registries.java | 29 +++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 27df2d35..4662d927 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.registry.Registries; + public abstract class Condition { public enum Result { SUCCESS, @@ -24,7 +26,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { } public void register() { - + Registries.registerCondition(this); } public void unregister() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java new file mode 100644 index 00000000..18d90e31 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java @@ -0,0 +1,19 @@ +package com.amuzil.omegasource.magus.radix.condition; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.forms.Form; +import net.minecraft.resources.ResourceLocation; + +public class ConditionRegistry { + + + public static Condition getConditionByName(String formName) { + return Registries.CONDITIONS.get().getValue(new ResourceLocation(Magus.MOD_ID, formName)); + } + + public static Condition getConditionByName(String modID, String formName) { + return Registries.CONDITIONS.get().getValue(new ResourceLocation(modID, formName)); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 2749903b..38aedec2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.registry; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -30,12 +31,14 @@ public class Registries { public static Supplier> SKILL_CATEGORIES; public static Supplier> SKILLS; public static Supplier> FORMS; + public static Supplier> CONDITIONS; public static List traits = new ArrayList<>(); public static List categories = new ArrayList<>(); public static List skills = new ArrayList<>(); public static List forms = new ArrayList<>(); + public static List conditions = new ArrayList<>(); // SKILLS // this is a placeholder skill for testing purposes. @@ -78,10 +81,17 @@ public static void registerForms(List registryForms) { forms.addAll(registryForms); } + public static void registerConditions(List registryConditions) { + conditions.addAll(registryConditions); + } + public static void registerForm(Form registryForm) { forms.add(registryForm); } + public static void registerCondition(Condition registryCondition) { + conditions.add(registryCondition); + } public static void registerDiscipline(Discipline discipline) { categories.add(discipline); Disciplines.DISCIPLINES.add(discipline); @@ -115,6 +125,11 @@ public static void onRegistryRegister(NewRegistryEvent event) { forms.setName(new ResourceLocation(Magus.MOD_ID, "forms")); FORMS = event.create(forms); + //Conditions + RegistryBuilder conditions = new RegistryBuilder<>(); + conditions.setName(new ResourceLocation(Magus.MOD_ID, "conditions")); + CONDITIONS = event.create(conditions); + //Modifiers } @@ -188,6 +203,20 @@ public static void gameRegistry(RegisterEvent event) { registry.register(trait.getName(), trait); }); } + + + /* Conditions. */ + /* Registered last because they can hold any conditional data value. */ + if (event.getRegistryKey().equals(CONDITIONS.get().getRegistryKey())) { + IForgeRegistry registry = CONDITIONS.get(); + ResourceKey> resKey = registry.getRegistryKey(); + + + event.register(resKey, helper -> { + for (Condition condition : conditions) + registry.register(condition.name(), condition); + }); + } } /** From cd33640d037ab6da0afe7496310588bd9a0a1924 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 21 Aug 2024 20:28:29 +1000 Subject: [PATCH 195/469] Packet fixed to use the condition registry! --- .../server_executed/ConditionActivatedPacket.java | 15 ++++++++------- .../amuzil/omegasource/magus/radix/Condition.java | 6 ++++++ .../magus/radix/condition/ConditionRegistry.java | 4 ++-- .../omegasource/magus/registry/Registries.java | 2 +- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index 077144cd..61f9b01d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -2,8 +2,7 @@ import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Player; @@ -20,15 +19,17 @@ public ConditionActivatedPacket(Condition condition) { } public void toBytes(FriendlyByteBuf buf) { -// if(condition != null) { -// buf.writeUtf(form.name()); -// } + if(condition != null) { + buf.writeUtf(condition.modID()); + buf.writeUtf(condition.name()); + } } public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { - String form = buf.readUtf(); + String modID = buf.readUtf(); + String condition = buf.readUtf(); // Need to add a way to store forms... - return new ConditionActivatedPacket(FormDataRegistry.getFormByName(form)); + return new ConditionActivatedPacket(ConditionRegistry.getConditionByName(modID, condition)); } public boolean handle(Supplier ctx) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 4662d927..615830b0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.radix; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.registry.Registries; public abstract class Condition { @@ -46,4 +47,9 @@ protected Runnable runOn(Result result) { // Need to log each condition's id too public abstract String name(); + + // Change this for custom conditions/conditions you want registered in your own mod + public String modID() { + return Magus.MOD_ID; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java index 18d90e31..5010e266 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java @@ -10,10 +10,10 @@ public class ConditionRegistry { public static Condition getConditionByName(String formName) { - return Registries.CONDITIONS.get().getValue(new ResourceLocation(Magus.MOD_ID, formName)); + return Registries.CONDITIONS.get().getValue(new ResourceLocation(Magus.MOD_ID, ":" + formName)); } public static Condition getConditionByName(String modID, String formName) { - return Registries.CONDITIONS.get().getValue(new ResourceLocation(modID, formName)); + return Registries.CONDITIONS.get().getValue(new ResourceLocation(modID, ":" + formName)); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 38aedec2..f86d588b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -214,7 +214,7 @@ public static void gameRegistry(RegisterEvent event) { event.register(resKey, helper -> { for (Condition condition : conditions) - registry.register(condition.name(), condition); + registry.register(condition.modID() + ":" + condition.name(), condition); }); } } From 5c3b5dee523db3730090c48ec4bb6683f3648ba0 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 21 Aug 2024 20:31:49 +1000 Subject: [PATCH 196/469] Working on cleaning up condition registry --- .../java/com/amuzil/omegasource/magus/radix/Condition.java | 7 +++++++ .../radix/condition/minecraft/forge/EventCondition.java | 1 + 2 files changed, 8 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 615830b0..b80659d4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -15,6 +15,7 @@ public enum Result { protected Runnable onSuccess; protected Runnable onFailure; + // TODO: Change to registerRunnables() public void register(Runnable onSuccess, Runnable onFailure) { //RadixUtil.getLogger().debug("Registering results"); // if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) @@ -26,7 +27,13 @@ public void register(Runnable onSuccess, Runnable onFailure) { this.onFailure = onFailure::run; } + // TODO: Change this to registerListeners() public void register() { + + } + + // Every Condition needs to call this in their constructor + public void registerEntry() { Registries.registerCondition(this); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index 2e0f3ef2..a43e1eeb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -33,6 +33,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { @Override public void register() { + super.register(); //This is required because a class type check isn't inbuilt, for some reason. MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, eventType, listener); } From 67b053db1bb53044d5df798c64d93e99387c9cfc Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 5 Sep 2024 16:59:06 +1000 Subject: [PATCH 197/469] CONDITIONS CAN DO THINGS IN GAME!!!! --- .../omegasource/magus/radix/Condition.java | 15 ++++-- .../omegasource/magus/radix/RadixTree.java | 31 +++++++------ .../omegasource/magus/radix/RadixUtil.java | 1 + .../radix/condition/ChainedCondition.java | 10 +--- .../magus/radix/condition/MultiCondition.java | 8 +--- .../radix/condition/SimpleCondition.java | 6 +-- .../magus/server/ServerEvents.java | 46 +++++++++++++++++-- 7 files changed, 75 insertions(+), 42 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index b80659d4..0d5a3051 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -14,6 +14,7 @@ public enum Result { protected Runnable onSuccess; protected Runnable onFailure; + private String name; // TODO: Change to registerRunnables() public void register(Runnable onSuccess, Runnable onFailure) { @@ -21,10 +22,10 @@ public void register(Runnable onSuccess, Runnable onFailure) { // if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) // Thread.dumpStack(); //RadixUtil.getLogger().debug("Result: success"); - this.onSuccess = onSuccess::run; + this.onSuccess = onSuccess; // RadixUtil.getLogger().debug("Result: failure: " + getClass()); // Thread.dumpStack(); - this.onFailure = onFailure::run; + this.onFailure = onFailure; } // TODO: Change this to registerListeners() @@ -52,8 +53,14 @@ protected Runnable runOn(Result result) { }; } - // Need to log each condition's id too - public abstract String name(); + // Method for naming and retrieving the name of a Condition + public void name(String name) { + this.name = name; + } + + public String name() { + return this.name; + } // Change this for custom conditions/conditions you want registered in your own mod public String modID() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index f342a743..349980f7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -3,8 +3,6 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.event.SkillTickEvent; -import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; import net.minecraft.server.level.ServerPlayer; @@ -66,15 +64,18 @@ private void setActive(Node node) { for (Map.Entry child : active.children().entrySet()) { //TODO: Find way to prevent overwriting but also prevent doubly sending packets. Condition condition = child.getKey(); - Runnable success; - success = () -> { - condition.onSuccess.run(); - MagusNetwork.sendToServer(new ConditionActivatedPacket(condition)); - }; - condition.register(success, condition.onFailure); + if (condition != null) { + Runnable success; + success = () -> { + if (condition.onSuccess != null) + condition.onSuccess.run(); + MagusNetwork.sendToServer(new ConditionActivatedPacket(condition)); + }; + condition.register(success, condition.onFailure); + } } - if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) + if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) active.registerModifierListeners(activeDiscipline, player); if (active.onEnter() != null) { @@ -84,8 +85,8 @@ private void setActive(Node node) { // Should run the original condition and terminate the tree if (active.terminateCondition() != null) { Runnable onSuccess = () -> { - active.terminateCondition().onSuccess.run(); - terminate(); + active.terminateCondition().onSuccess.run(); + terminate(); }; active.terminateCondition().register(onSuccess, () -> { }); @@ -110,7 +111,7 @@ private void terminate() { // TODO: // Rather than relying on the input module to send packets, handle everything in the condition runnables? public void moveDown(Condition executedCondition) { - if(activeDiscipline == null) { + if (activeDiscipline == null) { LogManager.getLogger().info("NO ELEMENT SELECTED"); return; } @@ -119,7 +120,7 @@ public void moveDown(Condition executedCondition) { if (this.lastActivated != null && active != null) { //TODO: // Need a better way to ensure the conditions are equivalent - if(this.lastActivated.name().equals(executedCondition.name())) { + if (this.lastActivated.name().equals(executedCondition.name())) { addModifierData(new MultiModifierData()); return; } @@ -127,13 +128,13 @@ public void moveDown(Condition executedCondition) { } this.lastActivated = executedCondition; - if(active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) { + if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) { active.unregisterModifierListeners(player); //todo remove this its just for testing active.getModifiers().forEach(modifier -> modifier.print()); } - if(active.children().size() == 0) return; + if (active.children().size() == 0) return; if (active.onLeave() != null) { active.onLeave().accept(this); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixUtil.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixUtil.java index 994d51aa..964c6a9c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixUtil.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixUtil.java @@ -3,6 +3,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + public class RadixUtil { private static final Logger logger = LogManager.getLogger(RadixTree.class); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index b2257ff5..4b043dd7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -20,12 +20,11 @@ public ChainedCondition(List conditionSequence) { this.conditionSequence = conditionSequence; this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; + this.registerEntry(); } public ChainedCondition(Condition condition) { - this.conditionSequence = List.of(condition); - this.onPartialSuccess = this::finishCurrentCondition; - this.onPartialFailure = this::reset; + this(List.of(condition)); } private void finishCurrentCondition() { @@ -78,9 +77,4 @@ public void register() { public void unregister() { currentCondition.unregister(); } - - @Override - public String name() { - return "chained_condition"; - } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 27d46026..1c34b362 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -25,10 +25,11 @@ public class MultiCondition extends Condition { public MultiCondition(List concurrentConditions) { this.concurrentConditions = concurrentConditions; + this.registerEntry(); } public MultiCondition(Condition condition) { - this.concurrentConditions = List.of(condition); + this(List.of(condition)); } private void checkConditionMet() { @@ -97,9 +98,4 @@ public void register() { public void unregister() { concurrentConditions.forEach(Condition::unregister); } - - @Override - public String name() { - return "multi_condition"; - } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java index 991255a4..51a3e0da 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java @@ -9,6 +9,7 @@ public class SimpleCondition extends Condition { public SimpleCondition(Supplier condition) { this.condition = condition; + this.registerEntry(); } @Override @@ -19,9 +20,4 @@ public void register(Runnable onSuccess, Runnable onFailure) { onFailure.run(); } } - - @Override - public String name() { - return "simple_condition"; - } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index eec07d99..fda93f48 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -2,9 +2,10 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; -import com.amuzil.omegasource.magus.radix.Node; -import com.amuzil.omegasource.magus.radix.NodeBuilder; -import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.radix.*; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; @@ -12,7 +13,14 @@ import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; import com.mojang.datafixers.util.Pair; +import net.minecraft.client.Minecraft; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LightningBolt; +import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.EntityLeaveLevelEvent; import net.minecraftforge.event.level.LevelEvent; @@ -52,10 +60,40 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { //// new Pair<>(Forms.BURST, secondNode)).build()); // tree.setOwner(event.getEntity()); // capability.setTree(tree); + // Need to test out the condition tree. use left alt/arc > strike (left click). + // While this test code will directly use conditions, Skills will reference Forms + // that get automatically turned into conditions. + KeyInput initialiser = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 1); + KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0, + 0, 1); + + Condition arc = new KeyHoldCondition(initialiser.key().getValue(), initialiser.held(), 20000, false); + Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); + strike.register(() -> { + Entity eventEntity = event.getEntity(); + RadixUtil.getLogger().debug("Working strike??"); + + Level level = event.getLevel(); + LightningBolt lightningBolt = EntityType.LIGHTNING_BOLT.create(level); + + if (lightningBolt != null) { + // Set the position of the lightning bolt + lightningBolt.moveTo(eventEntity.xo, eventEntity.yo, eventEntity.zo); + + // Spawn the lightning bolt in the world + level.addFreshEntity(lightningBolt); + } + + }, () -> {}); + Node node2 = NodeBuilder.middle().addChild(strike, NodeBuilder.end().build()).build(); + + RadixTree tree = new RadixTree(NodeBuilder.root().addChild(arc, node2).build()); // // //todo this is not be where we should call start, but for now it'll stop us crashing until // // we have a key for activating the bending state -// capability.getTree().start(); + tree.setOwner(event.getEntity()); + capability.setTree(tree); + capability.getTree().start(); } } else { if (event.getEntity() instanceof Player) { From d61ea8ab9a88e4574ef16cec20d9f949db88bf1e Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 5 Sep 2024 17:09:54 +1000 Subject: [PATCH 198/469] Attempting to fix an infinite recursion error --- .../omegasource/magus/radix/RadixTree.java | 26 ++++++++++--------- .../magus/server/ServerEvents.java | 6 +++++ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 349980f7..8212dad2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -60,18 +60,20 @@ private void setActive(Node node) { MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); }, currentCondition.onFailure); } - // Child Nodes - for (Map.Entry child : active.children().entrySet()) { - //TODO: Find way to prevent overwriting but also prevent doubly sending packets. - Condition condition = child.getKey(); - if (condition != null) { - Runnable success; - success = () -> { - if (condition.onSuccess != null) - condition.onSuccess.run(); - MagusNetwork.sendToServer(new ConditionActivatedPacket(condition)); - }; - condition.register(success, condition.onFailure); + if (active == root) { + // Child Nodes + for (Map.Entry child : active.children().entrySet()) { + //TODO: Find way to prevent overwriting but also prevent doubly sending packets. + Condition condition = child.getKey(); + if (condition != null) { + Runnable success; + success = () -> { + if (condition.onSuccess != null) + condition.onSuccess.run(); + MagusNetwork.sendToServer(new ConditionActivatedPacket(condition)); + }; + condition.register(success, condition.onFailure); + } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index fda93f48..12e143e1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -68,6 +68,10 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { 0, 1); Condition arc = new KeyHoldCondition(initialiser.key().getValue(), initialiser.held(), 20000, false); + arc.register(() -> {}, () -> {}); + arc.name("arc"); + arc.registerEntry(); + Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); strike.register(() -> { Entity eventEntity = event.getEntity(); @@ -85,6 +89,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } }, () -> {}); + strike.name("strike"); + strike.registerEntry(); Node node2 = NodeBuilder.middle().addChild(strike, NodeBuilder.end().build()).build(); RadixTree tree = new RadixTree(NodeBuilder.root().addChild(arc, node2).build()); From 50b82811b316f2f5c3d8d484f2e55d2ed8ba5f41 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 5 Sep 2024 17:20:31 +1000 Subject: [PATCH 199/469] Need to figure out why packets aren't being sent --- .../packets/server_executed/ConditionActivatedPacket.java | 2 ++ .../java/com/amuzil/omegasource/magus/radix/RadixTree.java | 2 ++ .../condition/minecraft/forge/key/KeyHoldCondition.java | 4 ++-- .../com/amuzil/omegasource/magus/server/ServerEvents.java | 5 ++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index 61f9b01d..c686871b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.network.FriendlyByteBuf; @@ -33,6 +34,7 @@ public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { } public boolean handle(Supplier ctx) { + RadixUtil.getLogger().debug("Condition: " + condition.name()); ctx.get().enqueueWork(() -> { Player player = ctx.get().getSender(); CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 8212dad2..5e03410b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -71,6 +71,7 @@ private void setActive(Node node) { if (condition.onSuccess != null) condition.onSuccess.run(); MagusNetwork.sendToServer(new ConditionActivatedPacket(condition)); + RadixUtil.getLogger().debug("Packet sent."); }; condition.register(success, condition.onFailure); } @@ -147,6 +148,7 @@ public void moveDown(Condition executedCondition) { active.terminateCondition().unregister(); } + //TODO: THis should not jump levels of the tree!!!!!! setActive(active.children().get(executedCondition)); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index c135987f..75aec194 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -51,7 +51,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } else { // Not held for long enough if (this.currentHolding > 0) { - LogManager.getLogger().info("ONFAILURE RUNNING 1"); +// LogManager.getLogger().info("ONFAILURE RUNNING 1"); this.onFailure.run(); reset(); } @@ -68,7 +68,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } if(this.started) { if (this.currentTotal >= timeout) { - LogManager.getLogger().info("ONFAILURE RUNNING 2"); +// LogManager.getLogger().info("ONFAILURE RUNNING 2"); this.onFailure.run(); reset(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 12e143e1..979b1c8e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -63,9 +63,9 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // Need to test out the condition tree. use left alt/arc > strike (left click). // While this test code will directly use conditions, Skills will reference Forms // that get automatically turned into conditions. - KeyInput initialiser = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 1); + KeyInput initialiser = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 4); KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0, - 0, 1); + 0, 4); Condition arc = new KeyHoldCondition(initialiser.key().getValue(), initialiser.held(), 20000, false); arc.register(() -> {}, () -> {}); @@ -75,7 +75,6 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); strike.register(() -> { Entity eventEntity = event.getEntity(); - RadixUtil.getLogger().debug("Working strike??"); Level level = event.getLevel(); LightningBolt lightningBolt = EntityType.LIGHTNING_BOLT.create(level); From 6846efe62f6b6df1c7be14c7adb73bcaec80f5f9 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 5 Sep 2024 22:35:09 +1000 Subject: [PATCH 200/469] Added an immediate children method and a parental node! --- .../amuzil/omegasource/magus/radix/Node.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 441c77ba..629ebbe6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -4,9 +4,9 @@ import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.mojang.datafixers.util.Pair; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerPlayer; import org.apache.logging.log4j.LogManager; @@ -16,6 +16,7 @@ import java.util.List; import java.util.Map; import java.util.function.Consumer; +import java.util.stream.Collectors; /** * @@ -23,6 +24,7 @@ public class Node { //This needs to be changed to private final Map children; + private final Pair parent; private final Consumer onEnter; private final Consumer onLeave; private final Consumer onTerminate; @@ -37,6 +39,7 @@ public class Node { * @param terminateCondition If this condition is fulfilled, the active node will be terminated. If it expires, nothing special happens. It doesn't have to expire for the branch to terminate */ public Node( + Pair parent, Map children, Consumer onEnter, Consumer onLeave, @@ -44,6 +47,7 @@ public Node( Condition terminateCondition, List modifiers ) { + this.parent = parent; this.children = children; this.onEnter = onEnter; this.onLeave = onLeave; @@ -64,6 +68,18 @@ public Consumer onLeave() { return onLeave; } + public Pair parent() { + return this.parent; + } + + public Map getImmediateChildren() { + return children().entrySet().stream() + .filter(entry -> + entry.getValue().parent().getSecond().equals(this) + && entry.getValue().parent().getSecond() + .terminateCondition().equals(this.terminateCondition())) // Ensure the child's parent is the current node + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } public Consumer onTerminate() { return onTerminate; } From 5718a295559ff0d840f01f8dc3ce2352ce49234a Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 6 Sep 2024 12:38:31 +1000 Subject: [PATCH 201/469] Added in parent nodes, going to have to redo the entire tree. --- .../ConditionActivatedPacket.java | 18 +++--- .../omegasource/magus/radix/NodeBuilder.java | 8 ++- .../omegasource/magus/radix/RadixTree.java | 59 +++++++++++-------- .../magus/server/ServerEvents.java | 43 ++++++++++---- 4 files changed, 81 insertions(+), 47 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index c686871b..7fffa570 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -4,8 +4,12 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; @@ -21,23 +25,21 @@ public ConditionActivatedPacket(Condition condition) { public void toBytes(FriendlyByteBuf buf) { if(condition != null) { - buf.writeUtf(condition.modID()); - buf.writeUtf(condition.name()); + buf.writeResourceLocation(new ResourceLocation(condition.modID() + ":" + condition.name())); } } public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { - String modID = buf.readUtf(); - String condition = buf.readUtf(); // Need to add a way to store forms... - return new ConditionActivatedPacket(ConditionRegistry.getConditionByName(modID, condition)); + return new ConditionActivatedPacket(Registries.CONDITIONS.get().getValue(buf.readResourceLocation())); } public boolean handle(Supplier ctx) { - RadixUtil.getLogger().debug("Condition: " + condition.name()); + RadixUtil.getLogger().debug("Condition Activated By Packet: " + condition.name()); ctx.get().enqueueWork(() -> { - Player player = ctx.get().getSender(); - CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); + // Intentional crashing because I want to know why my packet isn't being received correctly... +// CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); + RadixUtil.getLogger().debug("Condition Activated By Packet: " + condition.name()); }); return true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index 3da62cc6..02f5227f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.mojang.datafixers.util.Pair; @@ -15,6 +14,7 @@ public class NodeBuilder { private Consumer onLeave; private Consumer onTerminate; private Condition terminateCondition; + private Pair parent; private final List availableModifiers; private NodeBuilder(Type type) { @@ -43,6 +43,10 @@ private IllegalStateException cannot(String message) { return new IllegalStateException("A " + type.name().toLowerCase(Locale.ROOT) + " node cannot " + message); } + public NodeBuilder addParent(Pair parent) { + this.parent = parent; + return this; + } public NodeBuilder addChild(Condition condition, Node child) { if (type.canHaveChildren) { children.put(condition, child); @@ -123,7 +127,7 @@ public NodeBuilder terminateWhen(Condition terminateCondition) { } public Node build() { - return new Node(children, onEnter, onLeave, onTerminate, terminateCondition, availableModifiers); + return new Node(parent, children, onEnter, onLeave, onTerminate, terminateCondition, availableModifiers); } private enum Type { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 5e03410b..8eb2feeb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -53,16 +53,17 @@ private void setActive(Node node) { * We only want to do this once per active node. */ // Current Node - Condition currentCondition = active.terminateCondition(); - if (currentCondition != null) { - currentCondition.register(() -> { - currentCondition.onSuccess.run(); - MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); - }, currentCondition.onFailure); - } - if (active == root) { + if (active != null && active == root) { + Condition currentCondition = active.terminateCondition(); + if (currentCondition != null) { + currentCondition.register(() -> { + currentCondition.onSuccess.run(); + MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); + }, currentCondition.onFailure); + } + // Child Nodes - for (Map.Entry child : active.children().entrySet()) { + for (Map.Entry child : active.getImmediateChildren().entrySet()) { //TODO: Find way to prevent overwriting but also prevent doubly sending packets. Condition condition = child.getKey(); if (condition != null) { @@ -72,27 +73,29 @@ private void setActive(Node node) { condition.onSuccess.run(); MagusNetwork.sendToServer(new ConditionActivatedPacket(condition)); RadixUtil.getLogger().debug("Packet sent."); + condition.unregister(); }; condition.register(success, condition.onFailure); } } - } - if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) - active.registerModifierListeners(activeDiscipline, player); - if (active.onEnter() != null) { - active.onEnter().accept(this); - } + if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) + active.registerModifierListeners(activeDiscipline, player); - // Should run the original condition and terminate the tree - if (active.terminateCondition() != null) { - Runnable onSuccess = () -> { - active.terminateCondition().onSuccess.run(); - terminate(); - }; - active.terminateCondition().register(onSuccess, () -> { - }); + if (active.onEnter() != null) { + active.onEnter().accept(this); + } + + // Should run the original condition and terminate the tree + if (active.terminateCondition() != null) { + Runnable onSuccess = () -> { + active.terminateCondition().onSuccess.run(); + terminate(); + }; + active.terminateCondition().register(onSuccess, () -> { + }); + } } } @@ -118,8 +121,15 @@ public void moveDown(Condition executedCondition) { LogManager.getLogger().info("NO ELEMENT SELECTED"); return; } + if (active == null) { + LogManager.getLogger().info("No currently active node to traverse from."); + return; + } //add the last Node to the activation Path and store its ModifierData's - + if (active.getImmediateChildren().get(executedCondition) == null) { + LogManager.getLogger().info("Condition met not valid for tree traversal."); + return; + } if (this.lastActivated != null && active != null) { //TODO: // Need a better way to ensure the conditions are equivalent @@ -127,6 +137,7 @@ public void moveDown(Condition executedCondition) { addModifierData(new MultiModifierData()); return; } + this.lastActivated.unregister(); path.addStep(this.lastActivated, active.getModifiers()); } this.lastActivated = executedCondition; diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 979b1c8e..a055eb0b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -2,25 +2,27 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; -import com.amuzil.omegasource.magus.radix.*; +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.Node; +import com.amuzil.omegasource.magus.radix.NodeBuilder; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; import com.mojang.datafixers.util.Pair; import net.minecraft.client.Minecraft; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LightningBolt; -import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; -import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.EntityLeaveLevelEvent; import net.minecraftforge.event.level.LevelEvent; @@ -68,11 +70,16 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { 0, 4); Condition arc = new KeyHoldCondition(initialiser.key().getValue(), initialiser.held(), 20000, false); - arc.register(() -> {}, () -> {}); + arc.register(() -> { + }, () -> { + }); + arc.unregister(); arc.name("arc"); arc.registerEntry(); Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); + // TODO: Fix the tree to only change immediate children's conditions, + // and only register/unregister them in the tree itself strike.register(() -> { Entity eventEntity = event.getEntity(); @@ -85,20 +92,30 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // Spawn the lightning bolt in the world level.addFreshEntity(lightningBolt); + if (eventEntity instanceof ServerPlayer) + MagusNetwork.sendToClient(new ConditionActivatedPacket(strike), (ServerPlayer) eventEntity); + RadixUtil.getLogger().debug("Packet sent."); + strike.unregister(); } - }, () -> {}); + }, () -> { + }); +// strike.unregister(); strike.name("strike"); strike.registerEntry(); - Node node2 = NodeBuilder.middle().addChild(strike, NodeBuilder.end().build()).build(); - - RadixTree tree = new RadixTree(NodeBuilder.root().addChild(arc, node2).build()); + Node root = NodeBuilder.root().build(); + Node middle = NodeBuilder.middle().addParent(new Pair<>(root.terminateCondition(), root)).build(); + Node end = NodeBuilder.end().addParent(new Pair<>(arc, middle)).build(); + middle = middle.children().put(strike, end); + root = root.children().put(arc, middle); +// +// RadixTree tree = new RadixTree(root); // // //todo this is not be where we should call start, but for now it'll stop us crashing until // // we have a key for activating the bending state - tree.setOwner(event.getEntity()); - capability.setTree(tree); - capability.getTree().start(); +// tree.setOwner(event.getEntity()); +// capability.setTree(tree); +// capability.getTree().start(); } } else { if (event.getEntity() instanceof Player) { From 5a6e84f4e1d16af5f51196e1ba9fe635f0b3814d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 6 Sep 2024 12:50:03 +1000 Subject: [PATCH 202/469] Forge registry usage is ill advised. Need to first change how conditions are stored, then change the tree. --- .../server_executed/ConditionActivatedPacket.java | 14 ++++++++------ .../minecraft/forge/key/KeyHoldCondition.java | 1 + .../omegasource/magus/server/ServerEvents.java | 10 +++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index 7fffa570..8787b965 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -3,14 +3,11 @@ import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; -import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.registry.Registries; -import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; @@ -30,13 +27,18 @@ public void toBytes(FriendlyByteBuf buf) { } public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { - // Need to add a way to store forms... - return new ConditionActivatedPacket(Registries.CONDITIONS.get().getValue(buf.readResourceLocation())); + ResourceLocation id = buf.readResourceLocation(); + RadixUtil.getLogger().debug("Attempted Condition Pass: " + id); + Condition cond = Registries.CONDITIONS.get().getValue(id); + RadixUtil.getLogger().debug("Condition Passed: " + cond.name()); + return new ConditionActivatedPacket(cond); } public boolean handle(Supplier ctx) { RadixUtil.getLogger().debug("Condition Activated By Packet: " + condition.name()); ctx.get().enqueueWork(() -> { + Player player = ctx.get().getSender(); + player.addDeltaMovement(new Vec3(0, 2, 0)); // Intentional crashing because I want to know why my packet isn't being received correctly... // CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); RadixUtil.getLogger().debug("Condition Activated By Packet: " + condition.name()); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 75aec194..ce7148be 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -77,6 +77,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } }; + this.registerEntry(); } public boolean pressed(int held, int duration) { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index a055eb0b..f6b38b7c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -80,6 +80,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); // TODO: Fix the tree to only change immediate children's conditions, // and only register/unregister them in the tree itself +// strike.name("strike"); +// strike.registerEntry(); strike.register(() -> { Entity eventEntity = event.getEntity(); @@ -92,17 +94,15 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // Spawn the lightning bolt in the world level.addFreshEntity(lightningBolt); - if (eventEntity instanceof ServerPlayer) - MagusNetwork.sendToClient(new ConditionActivatedPacket(strike), (ServerPlayer) eventEntity); - RadixUtil.getLogger().debug("Packet sent."); +// if (eventEntity instanceof ServerPlayer) + MagusNetwork.sendToServer(new ConditionActivatedPacket(strike));//, (ServerPlayer) eventEntity); strike.unregister(); } }, () -> { }); // strike.unregister(); - strike.name("strike"); - strike.registerEntry(); + Node root = NodeBuilder.root().build(); Node middle = NodeBuilder.middle().addParent(new Pair<>(root.terminateCondition(), root)).build(); Node end = NodeBuilder.end().addParent(new Pair<>(arc, middle)).build(); From 89ab3da4849dcef525982dde4e81a4c3faa4e41b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 6 Sep 2024 13:22:44 +1000 Subject: [PATCH 203/469] Conditions will be using hashmaps --- .../ConditionActivatedPacket.java | 4 +++- .../magus/registry/Registries.java | 21 ------------------- .../omegasource/magus/skill/forms/Forms.java | 3 ++- .../skill/test/avatar/AvatarFormRegistry.java | 1 + 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index 8787b965..98566353 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; +import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.registry.Registries; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -29,7 +30,8 @@ public void toBytes(FriendlyByteBuf buf) { public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { ResourceLocation id = buf.readResourceLocation(); RadixUtil.getLogger().debug("Attempted Condition Pass: " + id); - Condition cond = Registries.CONDITIONS.get().getValue(id); + RadixUtil.getLogger().debug("Test Form Registry: " + Registries.FORMS.get().getValue(new ResourceLocation("magus:arc"))); + Condition cond = ConditionRegistry.getConditionByName(id.toString()); RadixUtil.getLogger().debug("Condition Passed: " + cond.name()); return new ConditionActivatedPacket(cond); } diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index f86d588b..cc2be33c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -31,7 +31,6 @@ public class Registries { public static Supplier> SKILL_CATEGORIES; public static Supplier> SKILLS; public static Supplier> FORMS; - public static Supplier> CONDITIONS; public static List traits = new ArrayList<>(); @@ -44,7 +43,6 @@ public class Registries { // this is a placeholder skill for testing purposes. public static final Skill FIREBALL = new SkillActive("fireball", null); - public static void init() { } @@ -125,11 +123,6 @@ public static void onRegistryRegister(NewRegistryEvent event) { forms.setName(new ResourceLocation(Magus.MOD_ID, "forms")); FORMS = event.create(forms); - //Conditions - RegistryBuilder conditions = new RegistryBuilder<>(); - conditions.setName(new ResourceLocation(Magus.MOD_ID, "conditions")); - CONDITIONS = event.create(conditions); - //Modifiers } @@ -203,20 +196,6 @@ public static void gameRegistry(RegisterEvent event) { registry.register(trait.getName(), trait); }); } - - - /* Conditions. */ - /* Registered last because they can hold any conditional data value. */ - if (event.getRegistryKey().equals(CONDITIONS.get().getRegistryKey())) { - IForgeRegistry registry = CONDITIONS.get(); - ResourceKey> resKey = registry.getRegistryKey(); - - - event.register(resKey, helper -> { - for (Condition condition : conditions) - registry.register(condition.modID() + ":" + condition.name(), condition); - }); - } } /** diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index f35ccbef..44c715d0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -22,5 +22,6 @@ public class Forms { public static final Form MENU = new Form("menu"); public static final Form HOTKEY = new Form("hotkey"); - public static void init(){} + public static void init() { + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 8fefe021..824c2588 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.test.avatar; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; From 763fdaa5aad14942a083fe0558f654bb2cfce944 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 6 Sep 2024 16:48:59 +1000 Subject: [PATCH 204/469] New hashmap systems for conditions and their IDs --- .../ConditionActivatedPacket.java | 10 ++++----- .../radix/condition/ConditionRegistry.java | 21 +++++++++++++++---- .../magus/server/ServerEvents.java | 12 ++++------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index 98566353..48ade7bf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -22,16 +22,16 @@ public ConditionActivatedPacket(Condition condition) { } public void toBytes(FriendlyByteBuf buf) { - if(condition != null) { - buf.writeResourceLocation(new ResourceLocation(condition.modID() + ":" + condition.name())); + if (condition != null) { + buf.writeInt(ConditionRegistry.getID(condition)); } } public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { - ResourceLocation id = buf.readResourceLocation(); - RadixUtil.getLogger().debug("Attempted Condition Pass: " + id); + int id = buf.readInt(); + RadixUtil.getLogger().debug("Attempted Condition Pass ID: " + id); RadixUtil.getLogger().debug("Test Form Registry: " + Registries.FORMS.get().getValue(new ResourceLocation("magus:arc"))); - Condition cond = ConditionRegistry.getConditionByName(id.toString()); + Condition cond = ConditionRegistry.getCondition(id); RadixUtil.getLogger().debug("Condition Passed: " + cond.name()); return new ConditionActivatedPacket(cond); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java index 5010e266..fec9536a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java @@ -6,14 +6,27 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import net.minecraft.resources.ResourceLocation; +import java.util.HashMap; +import java.util.Map; + public class ConditionRegistry { + // Id, Condition. Stuff is put into this map when registering. + private static HashMap conditions = new HashMap<>(); + private static Map conditionIDs = new HashMap<>(); + + static int id = 0; + public static void register(Condition condition) { + conditions.put(id, condition); + conditionIDs.put(condition, id); + id++; + } - public static Condition getConditionByName(String formName) { - return Registries.CONDITIONS.get().getValue(new ResourceLocation(Magus.MOD_ID, ":" + formName)); + public static Condition getCondition(int id) { + return conditions.get(id); } - public static Condition getConditionByName(String modID, String formName) { - return Registries.CONDITIONS.get().getValue(new ResourceLocation(modID, ":" + formName)); + public static int getID(Condition condition) { + return conditionIDs.get(condition); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index f6b38b7c..334980b2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -7,7 +7,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; -import com.amuzil.omegasource.magus.radix.RadixUtil; +import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; @@ -17,7 +17,6 @@ import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; import com.mojang.datafixers.util.Pair; import net.minecraft.client.Minecraft; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LightningBolt; @@ -70,18 +69,15 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { 0, 4); Condition arc = new KeyHoldCondition(initialiser.key().getValue(), initialiser.held(), 20000, false); - arc.register(() -> { + arc.register(() -> {arc.unregister(); }, () -> { }); - arc.unregister(); - arc.name("arc"); - arc.registerEntry(); + ConditionRegistry.register(arc); Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); // TODO: Fix the tree to only change immediate children's conditions, // and only register/unregister them in the tree itself // strike.name("strike"); -// strike.registerEntry(); strike.register(() -> { Entity eventEntity = event.getEntity(); @@ -101,7 +97,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { }, () -> { }); -// strike.unregister(); + ConditionRegistry.register(strike); Node root = NodeBuilder.root().build(); Node middle = NodeBuilder.middle().addParent(new Pair<>(root.terminateCondition(), root)).build(); From d7960f0fb2580a1fa05133184fa46a72e763f439 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 6 Sep 2024 17:17:07 +1000 Subject: [PATCH 205/469] Condition isn't unregistering for some reason. --- .../packets/server_executed/ConditionActivatedPacket.java | 6 ------ .../java/com/amuzil/omegasource/magus/radix/Condition.java | 5 ----- .../magus/radix/condition/ConditionRegistry.java | 4 ++-- .../condition/minecraft/forge/key/KeyHoldCondition.java | 1 + .../com/amuzil/omegasource/magus/server/ServerEvents.java | 7 +++---- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index 48ade7bf..bb9837ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -29,21 +29,15 @@ public void toBytes(FriendlyByteBuf buf) { public static ConditionActivatedPacket fromBytes(FriendlyByteBuf buf) { int id = buf.readInt(); - RadixUtil.getLogger().debug("Attempted Condition Pass ID: " + id); - RadixUtil.getLogger().debug("Test Form Registry: " + Registries.FORMS.get().getValue(new ResourceLocation("magus:arc"))); Condition cond = ConditionRegistry.getCondition(id); - RadixUtil.getLogger().debug("Condition Passed: " + cond.name()); return new ConditionActivatedPacket(cond); } public boolean handle(Supplier ctx) { - RadixUtil.getLogger().debug("Condition Activated By Packet: " + condition.name()); ctx.get().enqueueWork(() -> { Player player = ctx.get().getSender(); - player.addDeltaMovement(new Vec3(0, 2, 0)); // Intentional crashing because I want to know why my packet isn't being received correctly... // CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); - RadixUtil.getLogger().debug("Condition Activated By Packet: " + condition.name()); }); return true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 0d5a3051..e9410587 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -53,11 +53,6 @@ protected Runnable runOn(Result result) { }; } - // Method for naming and retrieving the name of a Condition - public void name(String name) { - this.name = name; - } - public String name() { return this.name; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java index fec9536a..ec53d7a5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java @@ -12,8 +12,8 @@ public class ConditionRegistry { // Id, Condition. Stuff is put into this map when registering. - private static HashMap conditions = new HashMap<>(); - private static Map conditionIDs = new HashMap<>(); + private static final HashMap conditions = new HashMap<>(); + private static final Map conditionIDs = new HashMap<>(); static int id = 0; public static void register(Condition condition) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index ce7148be..5078b167 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -112,6 +112,7 @@ public void register() { @Override public void unregister() { MinecraftForge.EVENT_BUS.unregister(clientTickListener); + RadixUtil.getLogger().debug("Key hold condition meant to unregister now."); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 334980b2..1740ea96 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -69,16 +69,15 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { 0, 4); Condition arc = new KeyHoldCondition(initialiser.key().getValue(), initialiser.held(), 20000, false); - arc.register(() -> {arc.unregister(); - }, () -> { + arc.register(arc::unregister, () -> { }); ConditionRegistry.register(arc); Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); // TODO: Fix the tree to only change immediate children's conditions, // and only register/unregister them in the tree itself -// strike.name("strike"); strike.register(() -> { + strike.unregister(); Entity eventEntity = event.getEntity(); Level level = event.getLevel(); @@ -92,7 +91,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { level.addFreshEntity(lightningBolt); // if (eventEntity instanceof ServerPlayer) MagusNetwork.sendToServer(new ConditionActivatedPacket(strike));//, (ServerPlayer) eventEntity); - strike.unregister(); + } }, () -> { From a84e76419ce39363ad2b902637319ad61405e75e Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 6 Sep 2024 18:01:05 +1000 Subject: [PATCH 206/469] Resolved the weird condition bug! --- .../omegasource/magus/radix/condition/ChainedCondition.java | 1 - .../condition/minecraft/forge/key/KeyHoldCondition.java | 5 ----- .../com/amuzil/omegasource/magus/server/ServerEvents.java | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 4b043dd7..6637d7fa 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.radix.condition; import com.amuzil.omegasource.magus.radix.Condition; -import org.apache.logging.log4j.LogManager; import java.util.List; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 5078b167..d0e48053 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -9,7 +9,6 @@ import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.ClientTickEvent; import net.minecraftforge.eventbus.api.EventPriority; -import org.apache.logging.log4j.LogManager; import java.util.function.Consumer; @@ -38,20 +37,17 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { if (((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { this.started = true; -// LogManager.getLogger().info("KEY PRESSED: " + key); this.currentHolding++; } else { if (pressed(this.currentHolding, duration)) { // If the Condition requires the key being released.... if (release) { -// LogManager.getLogger().info("ONSUCCESS RUNNING 1"); this.onSuccess.run(); reset(); } } else { // Not held for long enough if (this.currentHolding > 0) { -// LogManager.getLogger().info("ONFAILURE RUNNING 1"); this.onFailure.run(); reset(); } @@ -112,7 +108,6 @@ public void register() { @Override public void unregister() { MinecraftForge.EVENT_BUS.unregister(clientTickListener); - RadixUtil.getLogger().debug("Key hold condition meant to unregister now."); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 1740ea96..b7558c65 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -41,7 +41,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { if (!event.getLevel().isClientSide()) { Data capability = CapabilityHandler.getCapability(event.getEntity(), CapabilityHandler.LIVING_DATA); - if (capability != null) { + if (capability != null && event.getEntity() instanceof Player) { // initialise the radix tree and set the player as an instance property for sending packets. From 2aa1ae6fb5e72439b00f98d2e073e1621ebdc02d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 11 Sep 2024 01:40:24 +1000 Subject: [PATCH 207/469] getting ready to rewrite the tree and node --- .../java/com/amuzil/omegasource/magus/radix/Node.java | 7 +++---- .../amuzil/omegasource/magus/radix/RadixBranch.java | 11 +++++++++++ .../amuzil/omegasource/magus/server/ServerEvents.java | 3 +-- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 629ebbe6..f7befe39 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -11,10 +11,7 @@ import net.minecraft.server.level.ServerPlayer; import org.apache.logging.log4j.LogManager; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.function.Consumer; import java.util.stream.Collectors; @@ -24,6 +21,8 @@ public class Node { //This needs to be changed to private final Map children; + // Need to figure this out... + private final HashMap branches; private final Pair parent; private final Consumer onEnter; private final Consumer onLeave; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java new file mode 100644 index 00000000..f9e9d1af --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java @@ -0,0 +1,11 @@ +package com.amuzil.omegasource.magus.radix; + +public class RadixBranch { + public RadixPath path; + public Node next; + + public RadixBranch(RadixPath path, Node next) { + this.path = path; + this.next = next; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index b7558c65..24ce127c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -89,8 +89,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // Spawn the lightning bolt in the world level.addFreshEntity(lightningBolt); -// if (eventEntity instanceof ServerPlayer) - MagusNetwork.sendToServer(new ConditionActivatedPacket(strike));//, (ServerPlayer) eventEntity); + MagusNetwork.sendToServer(new ConditionActivatedPacket(strike));//, (ServerPlayer) eventEntity); } From 514418878ba6c11fd6db725dfddb88d086e4bdef Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 11 Sep 2024 23:50:17 +1000 Subject: [PATCH 208/469] Very, very important comment --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 68f41729..1721ee23 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -43,6 +43,11 @@ public class KeyboardMouseInputModule extends InputModule { private boolean listen; Minecraft mc = Minecraft.getInstance(); + // TODO: Fix this such that any tree requiring a form relies on the input + // module activating a form rather than relying on the raw input data for those forms. + // This way, the trees for different complex methods (such as VR and multikey) + // remain functionally the same, they just check different input modules for whether the same + // forms are activated. public KeyboardMouseInputModule() { this.glfwKeysDown = new ArrayList<>(); this.listen = true; From a3fa741f0109f30984d183e00e44aee12bb84886 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 13 Sep 2024 02:00:02 +1000 Subject: [PATCH 209/469] added some new useful conditions, cleaned up code --- .../omegasource/magus/input/InputModule.java | 3 + .../radix/condition/ChainedCondition.java | 5 +- .../radix/condition/input/FormCondition.java | 73 +++++++++++++++++++ .../minecraft/forge/EventCondition.java | 3 +- .../minecraft/forge/TickTimedCondition.java | 6 -- .../minecraft/forge/TimedEventCondition.java | 65 +++++++++++++++++ .../minecraft/forge/key/KeyHoldCondition.java | 1 - 7 files changed, 146 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TimedEventCondition.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 365f7aba..5053c62d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -62,6 +62,9 @@ public void resetLastActivated() { this.lastActivatedForm = null; } + public Form getLastActivatedForm() { + return this.lastActivatedForm; + } public abstract void registerListeners(); public abstract void unregisterInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 6637d7fa..7ad5612b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -63,13 +63,16 @@ private void reset() { public void register(Runnable onSuccess, Runnable onFailure) { this.onCompleteSuccess = onSuccess; this.onCompleteFailure = onFailure; - this.register(); } @Override public void register() { currentCondition = conditionSequence.get(currentConditionIndex); currentCondition.register(onPartialSuccess, onPartialFailure); + // Divorce register(runnable, runnable) from the regular register method. + // This method should add requisite listeners to the forge event bus. + // The other method should just adjust runnables as needed. + currentCondition.register(); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java new file mode 100644 index 00000000..150a8ffc --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java @@ -0,0 +1,73 @@ +package com.amuzil.omegasource.magus.radix.condition.input; + +import com.amuzil.omegasource.magus.input.InputModule; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.skill.forms.Form; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; + +import java.util.function.Consumer; + +public class FormCondition extends Condition { + private final InputModule module; + private final int timeout; + private final Form form; + private final Consumer tickEvent; + int ticksWaiting; + + public FormCondition(Form form, int timeout, InputModule module) { + this.form = form; + this.timeout = timeout; + this.module = module; + this.ticksWaiting = 0; + + tickEvent = clientTickEvent -> { + if (module.getLastActivatedForm().name().equals(form.name())) { + this.onSuccess.run(); + reset(); + } + else { + if (timeout > -1) { + ticksWaiting++; + if (ticksWaiting > timeout) { + this.onFailure.run(); + reset(); + } + } + } + }; + } + + public Form getForm() { + return this.form; + } + + public int getTimeout() { + return this.timeout; + } + + public InputModule getModule() { + return this.module; + } + public void reset() { + this.ticksWaiting = 0; + } + + @Override + public void register() { + super.register(); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, + tickEvent); + } + + @Override + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(tickEvent); + } + + @Override + public String name() { + return "form_activate"; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index a43e1eeb..98a91b20 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -28,7 +28,6 @@ public EventCondition(Class eventType, Function condition) { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); - this.register(); } @Override @@ -46,6 +45,6 @@ public void unregister() { @Override public String name() { - return "event"; + return "event_trigger"; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 5c9103bb..66cadd8d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -39,12 +39,6 @@ public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, }; } - @Override - public void register(Runnable onSuccess, Runnable onFailure) { - super.register(onSuccess, onFailure); - this.register(); - } - @Override public void register() { super.register(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TimedEventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TimedEventCondition.java new file mode 100644 index 00000000..937d36ea --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TimedEventCondition.java @@ -0,0 +1,65 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge; + +import com.amuzil.omegasource.magus.radix.Condition; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.Event; +import net.minecraftforge.eventbus.api.EventPriority; + +import java.util.function.Consumer; +import java.util.function.Function; + +public class TimedEventCondition extends Condition { + + private final Consumer listener; + private final Consumer timer; + private final Class eventType; + private int time; + + public TimedEventCondition(Class eventType, Function condition, + int timeout) { + this.eventType = eventType; + this.listener = event -> { + if (condition.apply(event)) { + this.onSuccess.run(); + reset(); + } else { + this.onFailure.run(); + reset(); + } + }; + this.time = 0; + this.timer = event -> { + time++; + if (time > timeout) { + this.onFailure.run(); + reset(); + } + }; + } + + public void reset() { + this.time = 0; + } + @Override + public void register() { + super.register(); + //This is required because a class type check isn't inbuilt, for some reason. + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, + eventType, listener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, + TickEvent.ClientTickEvent.class, timer); + } + + @Override + public void unregister() { + super.unregister(); + MinecraftForge.EVENT_BUS.unregister(listener); + MinecraftForge.EVENT_BUS.unregister(timer); + } + + @Override + public String name() { + return "event_timed_trigger"; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index d0e48053..2081a32c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -95,7 +95,6 @@ public int getKey() { @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); - this.register(); } @Override From 1649dbbc488c60d888dcf75baa637cffcbbd0ea9 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 11 Sep 2024 21:33:41 -0400 Subject: [PATCH 210/469] fixed a build error --- src/main/java/com/amuzil/omegasource/magus/radix/Node.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index f7befe39..cc7a3bb3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -53,6 +53,7 @@ public Node( this.onTerminate = onTerminate; this.terminateCondition = terminateCondition; this.modifiers = Collections.synchronizedList(modifiers.stream().map(Modifier::data).toList()); + branches = new HashMap<>(); } public Map children() { From 87764f0fc34e493617d71c83939e0f238fd69b96 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 12 Sep 2024 01:06:32 -0400 Subject: [PATCH 211/469] RadixTree.insert method complete along with print methods for debugging tree --- .../{RadixPath.java => ConditionPath.java} | 22 +++- .../amuzil/omegasource/magus/radix/Node.java | 38 +++++- .../omegasource/magus/radix/RadixBranch.java | 18 ++- .../omegasource/magus/radix/RadixTree.java | 118 +++++++++++++++++- .../radix/condition/ConditionRegistry.java | 7 +- .../minecraft/forge/key/KeyHoldCondition.java | 5 + .../magus/server/ServerEvents.java | 27 ++-- 7 files changed, 210 insertions(+), 25 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/radix/{RadixPath.java => ConditionPath.java} (79%) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java similarity index 79% rename from src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java rename to src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java index 2704f517..38a53e58 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java @@ -13,18 +13,34 @@ import java.util.LinkedList; import java.util.List; -public class RadixPath implements INBTSerializable { +public class ConditionPath implements INBTSerializable { - private LinkedList>> activationPath; + public LinkedList>> activationPath; + public List conditions; - public RadixPath() { + public ConditionPath() { activationPath = new LinkedList<>(); } + public ConditionPath(List activatedConditions) { + conditions = activatedConditions; + activationPath = new LinkedList<>(); + List emptyModifier = new ArrayList<>(); + for (Condition activatedCondition: activatedConditions) { + activationPath.add(Pair.of(activatedCondition, emptyModifier)); + } + } + public void addStep(Condition activatedCondition, List modifierData) { + conditions.add(activatedCondition); activationPath.add(Pair.of(activatedCondition, modifierData)); } + @Override + public String toString() { + return conditions.toString(); + } + @Override public CompoundTag serializeNBT() { CompoundTag compoundTag = new CompoundTag(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index cc7a3bb3..772c6f4b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -20,15 +20,16 @@ */ public class Node { //This needs to be changed to - private final Map children; + private Map children; // Need to figure this out... - private final HashMap branches; - private final Pair parent; + private Pair parent; private final Consumer onEnter; private final Consumer onLeave; private final Consumer onTerminate; private final Condition terminateCondition; private final List modifiers; + public final HashMap branches; + public boolean isComplete; /** * @param children If a condition is fulfilled, the active node moves down to the mapped child node @@ -54,8 +55,38 @@ public Node( this.terminateCondition = terminateCondition; this.modifiers = Collections.synchronizedList(modifiers.stream().map(Modifier::data).toList()); branches = new HashMap<>(); + this.isComplete = false; // Temporary } + public Node (boolean isComplete) { + this.onEnter = null; + this.onLeave = null; + this.onTerminate = null; + this.terminateCondition = null; + this.modifiers = new ArrayList<>(); + this.branches = new HashMap<>(); + this.isComplete = isComplete; + } + + public RadixBranch getTransition(Condition transitionCondition) { + return branches.get(transitionCondition); + } + + public void addCondition(ConditionPath conditionPath, Node next) { + branches.put(conditionPath.conditions.get(0), new RadixBranch(conditionPath, next)); + } + + public int totalConditions() { + return branches.size(); + } + + @Override + public String toString() { + return "Node[ isComplete=" + isComplete + ", branches=" + branches + "]"; + } + + // ---------- Cali's RadixTree Impl ---------- + public Map children() { return children; } @@ -80,6 +111,7 @@ public Map getImmediateChildren() { .terminateCondition().equals(this.terminateCondition())) // Ensure the child's parent is the current node .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } + public Consumer onTerminate() { return onTerminate; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java index f9e9d1af..b5ee288e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java @@ -1,11 +1,23 @@ package com.amuzil.omegasource.magus.radix; + public class RadixBranch { - public RadixPath path; - public Node next; + // Class that represents a valid condition path leading from a previous Node and stores the Condition(s) + + public ConditionPath path; + public Node next; - public RadixBranch(RadixPath path, Node next) { + public RadixBranch(ConditionPath path) { + this(path, new Node(true)); + } + + public RadixBranch(ConditionPath path, Node next) { this.path = path; this.next = next; } + + @Override + public String toString() { + return "RadixBranch[Conditions=" + path + "]"; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 8eb2feeb..60621cbe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -9,16 +9,17 @@ import net.minecraft.world.entity.Entity; import org.apache.logging.log4j.LogManager; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Stream; public class RadixTree { - private final Node root; + private Node root; + private static final int NO_MISMATCH = -1; private Node active; private Condition lastActivated = null; // Fire is a test - private Discipline activeDiscipline = null;//Disciplines.FIRE; - private RadixPath path; + private Discipline activeDiscipline = null; //Disciplines.FIRE; + private ConditionPath path; private Entity owner; public RadixTree(Node root) { @@ -26,6 +27,111 @@ public RadixTree(Node root) { this.active = root; } + public RadixTree() { + root = new Node(false); + } + + private int getFirstMismatchCondition(List conditions, List edgeCondition) { + int LENGTH = Math.min(conditions.size(), edgeCondition.size()); + for (int i = 1; i < LENGTH; i++) { + if (!conditions.get(i).equals(edgeCondition.get(i))) { + return i; + } + } + return NO_MISMATCH; + } + + // Helpful method to debug and to see all the gestures + public void printAllConditions() { + printAllConditions(root, new ArrayList<>()); + } + + private void printAllConditions(Node current, List result) { + if (current.isComplete) + System.out.println("Condition: " + result); + + for (RadixBranch branch: current.branches.values()) { + printAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); + } + } + + // Helpful method to debug and to see all the gestures' paths in tree format + public void printAllBranches() { + printAllBranches(root, ""); + } + + private void printAllBranches(Node current, String indent) { + int lastValue = current.totalConditions()-1; int i = 0; + for (RadixBranch branch: current.branches.values()) { + if (i == lastValue) + System.out.println(indent.replace("+", "L") + branch.path); + else + System.out.println(indent.replace("+", "|") + branch.path); + int length1 = indent.length() / 2 == 0 ? 4 : indent.length() / 2; + int length2 = branch.path.toString().length() / 3; + String oldIndent = new String(new char[length1]).replace("\0", " "); + String lineIndent = new String(new char[length2]).replace("\0", "-"); + String newIndent = oldIndent + "+" + lineIndent + "->"; i++; + printAllBranches(branch.next, newIndent); + } + } + + public void insert(List conditions) { + Node current = root; + int currIndex = 0; + + //Iterative approach + while (currIndex < conditions.size()) { + Condition transitionCondition = conditions.get(currIndex); + RadixBranch currentPath = current.getTransition(transitionCondition); + //Updated version of the input gesture + List currGesture = conditions.subList(currIndex, conditions.size()); + + //There is no associated edge with the first character of the current string + //so simply add the rest of the string and finish + if (currentPath == null) { + current.branches.put(transitionCondition, new RadixBranch(new ConditionPath(currGesture))); + break; + } + + int splitIndex = getFirstMismatchCondition(currGesture, currentPath.path.conditions); + if (splitIndex == NO_MISMATCH) { + //The edge and leftover string are the same length + //so finish and update the next node as a gesture node + if (currGesture.size() == currentPath.path.conditions.size()) { + currentPath.next.isComplete = true; + break; + } else if (currGesture.size() < currentPath.path.conditions.size()) { + //The leftover gesture is a prefix to the edge string, so split + List suffix = currentPath.path.conditions.subList(currGesture.size()-1, currGesture.size()); + currentPath.path.conditions = currGesture; + Node newNext = new Node(true); + Node afterNewNext = currentPath.next; + currentPath.next = newNext; + + newNext.addCondition(new ConditionPath(suffix), afterNewNext); + break; + } else { //currStr.length() > currentEdge.label.length() + //There is leftover string after a perfect match + splitIndex = currentPath.path.conditions.size(); + } + } else { + //The leftover string and edge string differed, so split at point + List suffix = currentPath.path.conditions.subList(splitIndex, currentPath.path.conditions.size()); + currentPath.path.conditions = currentPath.path.conditions.subList(0, splitIndex); + Node prevNext = currentPath.next; + currentPath.next = new Node(false); + currentPath.next.addCondition(new ConditionPath(suffix), prevNext); + } + + //Traverse the tree + current = currentPath.next; + currIndex += splitIndex; + } + } + + // ---------- Cali's RadixTree Impl ---------- + public void burn() { if (active.terminateCondition() != null) { active.terminateCondition().unregister(); @@ -37,7 +143,7 @@ public void burn() { public void start() { setActive(root); - path = new RadixPath(); + path = new ConditionPath(); } private void setActive(Discipline discipline) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java index ec53d7a5..6b7ccc36 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java @@ -6,8 +6,7 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import net.minecraft.resources.ResourceLocation; -import java.util.HashMap; -import java.util.Map; +import java.util.*; public class ConditionRegistry { @@ -26,6 +25,10 @@ public static Condition getCondition(int id) { return conditions.get(id); } + public static List getConditions() { + return new ArrayList<>(conditions.values()); + } + public static int getID(Condition condition) { return conditionIDs.get(condition); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 2081a32c..b25aa11e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -92,6 +92,11 @@ public int getKey() { return this.key; } + @Override + public String toString() { + return "Condition[ key=" + key + " ]"; + } + @Override public void register(Runnable onSuccess, Runnable onFailure) { super.register(onSuccess, onFailure); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 24ce127c..ffcfcddc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -7,6 +7,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; @@ -15,7 +16,6 @@ import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; -import com.mojang.datafixers.util.Pair; import net.minecraft.client.Minecraft; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +28,10 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + @Mod.EventBusSubscriber public class ServerEvents { @@ -97,19 +101,26 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { }); ConditionRegistry.register(strike); - Node root = NodeBuilder.root().build(); - Node middle = NodeBuilder.middle().addParent(new Pair<>(root.terminateCondition(), root)).build(); - Node end = NodeBuilder.end().addParent(new Pair<>(arc, middle)).build(); - middle = middle.children().put(strike, end); - root = root.children().put(arc, middle); -// -// RadixTree tree = new RadixTree(root); +// Node root = NodeBuilder.root().build(); +// Node middle = NodeBuilder.middle().addParent(new Pair<>(root.terminateCondition(), root)).build(); +// Node end = NodeBuilder.end().addParent(new Pair<>(arc, middle)).build(); +// middle = middle.children().put(strike, end); +// root = root.children().put(arc, middle); // // //todo this is not be where we should call start, but for now it'll stop us crashing until // // we have a key for activating the bending state // tree.setOwner(event.getEntity()); // capability.setTree(tree); // capability.getTree().start(); + + System.out.println("Test Populating RadixTree"); + RadixTree tree = new RadixTree(); + for (Condition condition: ConditionRegistry.getConditions()) { + List conditionPath = Arrays.asList(condition); + tree.insert(conditionPath); + } + tree.printAllConditions(); + tree.printAllBranches(); } } else { if (event.getEntity() instanceof Player) { From deb1eab50b4c4195949929972f7aa259e3985cc3 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 12 Sep 2024 01:39:21 -0400 Subject: [PATCH 212/469] add name param to Condition.register --- .../magus/input/KeyboardMouseInputModule.java | 3 +-- .../amuzil/omegasource/magus/radix/Condition.java | 8 +++++++- .../amuzil/omegasource/magus/radix/RadixTree.java | 6 +++--- .../magus/radix/condition/ChainedCondition.java | 10 +++++----- .../magus/radix/condition/MultiCondition.java | 6 ++---- .../magus/radix/condition/SimpleCondition.java | 2 +- .../condition/minecraft/forge/EventCondition.java | 7 +++---- .../minecraft/forge/TickTimedCondition.java | 8 +++++++- .../minecraft/forge/key/KeyHoldCondition.java | 13 +++++++------ .../omegasource/magus/server/ServerEvents.java | 15 +++++++++++---- 10 files changed, 47 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 1721ee23..1a717471 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.network.MagusNetwork; -import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; @@ -182,7 +181,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx .build(); if(formCondition != null) { //Register listeners for condition created. - formCondition.register(onSuccess, onFailure); + formCondition.register(formToExecute.name(), onSuccess, onFailure); //add condition to InputModule registry so that it can be tracked. formInputs.put(formCondition, formToExecute); } else { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index e9410587..5914d957 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -17,7 +17,8 @@ public enum Result { private String name; // TODO: Change to registerRunnables() - public void register(Runnable onSuccess, Runnable onFailure) { + public void register(String name, Runnable onSuccess, Runnable onFailure) { + this.name = name; //RadixUtil.getLogger().debug("Registering results"); // if (this instanceof KeyPressCondition && ((KeyPressCondition) this).getKey() == 0) // Thread.dumpStack(); @@ -61,4 +62,9 @@ public String name() { public String modID() { return Magus.MOD_ID; } + + @Override + public String toString() { + return "Condition[ " + name + " ]"; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 60621cbe..52264374 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -162,7 +162,7 @@ private void setActive(Node node) { if (active != null && active == root) { Condition currentCondition = active.terminateCondition(); if (currentCondition != null) { - currentCondition.register(() -> { + currentCondition.register("", () -> { currentCondition.onSuccess.run(); MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); }, currentCondition.onFailure); @@ -181,7 +181,7 @@ private void setActive(Node node) { RadixUtil.getLogger().debug("Packet sent."); condition.unregister(); }; - condition.register(success, condition.onFailure); + condition.register("", success, condition.onFailure); } } @@ -199,7 +199,7 @@ private void setActive(Node node) { active.terminateCondition().onSuccess.run(); terminate(); }; - active.terminateCondition().register(onSuccess, () -> { + active.terminateCondition().register("", onSuccess, () -> { }); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 7ad5612b..c5a72376 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -42,12 +42,12 @@ private void finishCurrentCondition() { currentCondition = conditionSequence.get(currentConditionIndex); if(currentConditionIndex == conditionSequence.size() - 1) { - currentCondition.register(onCompleteSuccess, () -> { + currentCondition.register("", onCompleteSuccess, () -> { onPartialFailure.run(); onCompleteFailure.run(); }); } else { - currentCondition.register(onPartialSuccess, onPartialFailure); + currentCondition.register("", onPartialSuccess, onPartialFailure); } } @@ -56,11 +56,11 @@ private void reset() { currentConditionIndex = 0; currentCondition.unregister(); currentCondition = conditionSequence.get(currentConditionIndex); - currentCondition.register(onPartialSuccess, onPartialFailure); + currentCondition.register("", onPartialSuccess, onPartialFailure); } @Override - public void register(Runnable onSuccess, Runnable onFailure) { + public void register(String name, Runnable onSuccess, Runnable onFailure) { this.onCompleteSuccess = onSuccess; this.onCompleteFailure = onFailure; } @@ -68,7 +68,7 @@ public void register(Runnable onSuccess, Runnable onFailure) { @Override public void register() { currentCondition = conditionSequence.get(currentConditionIndex); - currentCondition.register(onPartialSuccess, onPartialFailure); + currentCondition.register("", onPartialSuccess, onPartialFailure); // Divorce register(runnable, runnable) from the regular register method. // This method should add requisite listeners to the forge event bus. // The other method should just adjust runnables as needed. diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 1c34b362..b0245254 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -1,7 +1,5 @@ package com.amuzil.omegasource.magus.radix.condition; -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; import net.minecraftforge.event.TickEvent; import org.apache.logging.log4j.LogManager; @@ -42,7 +40,7 @@ private void checkConditionMet() { } @Override - public void register(Runnable onSuccess, Runnable onFailure) { + public void register(String name, Runnable onSuccess, Runnable onFailure) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { if(startedExecuting) @@ -69,7 +67,7 @@ public void reset() { this.executionTime = 0; concurrentConditions.forEach(condition -> { int id = counter.getAndIncrement(); - condition.register(() -> { + condition.register("", () -> { synchronized (conditionsMet) { // Debugging statement: // LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java index 51a3e0da..be412661 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/SimpleCondition.java @@ -13,7 +13,7 @@ public SimpleCondition(Supplier condition) { } @Override - public void register(Runnable onSuccess, Runnable onFailure) { + public void register(String name, Runnable onSuccess, Runnable onFailure) { if (condition.get()) { onSuccess.run(); } else { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java index 98a91b20..2dfe3094 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/EventCondition.java @@ -1,8 +1,6 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge; import com.amuzil.omegasource.magus.radix.Condition; -import com.mojang.blaze3d.platform.InputConstants; -import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.EventPriority; @@ -26,8 +24,9 @@ public EventCondition(Class eventType, Function condition) { } @Override - public void register(Runnable onSuccess, Runnable onFailure) { - super.register(onSuccess, onFailure); + public void register(String name, Runnable onSuccess, Runnable onFailure) { + super.register(name, onSuccess, onFailure); + this.register(); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 66cadd8d..94995e93 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -39,11 +39,17 @@ public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, }; } + @Override + public void register(String name, Runnable onSuccess, Runnable onFailure) { + super.register(name, onSuccess, onFailure); + this.register(); + } + @Override public void register() { super.register(); // TODO is this the correct approach? - this.subCondition.register(runOn(this.onSubSuccess), runOn(this.onSubFailure)); + this.subCondition.register("", runOn(this.onSubSuccess), runOn(this.onSubFailure)); //Ensures no cast errors occur (blame forge) MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, listener); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index b25aa11e..cfd30821 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -92,14 +92,15 @@ public int getKey() { return this.key; } - @Override - public String toString() { - return "Condition[ key=" + key + " ]"; - } +// @Override +// public String toString() { +// return "KeyHoldCondition[ key=" + key + " ]"; +// } @Override - public void register(Runnable onSuccess, Runnable onFailure) { - super.register(onSuccess, onFailure); + public void register(String name, Runnable onSuccess, Runnable onFailure) { + super.register(name, onSuccess, onFailure); + this.register(); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index ffcfcddc..24c70a58 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -29,7 +29,6 @@ import net.minecraftforge.fml.common.Mod; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; @Mod.EventBusSubscriber @@ -73,14 +72,14 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { 0, 4); Condition arc = new KeyHoldCondition(initialiser.key().getValue(), initialiser.held(), 20000, false); - arc.register(arc::unregister, () -> { + arc.register("Arc", arc::unregister, () -> { }); ConditionRegistry.register(arc); Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); // TODO: Fix the tree to only change immediate children's conditions, // and only register/unregister them in the tree itself - strike.register(() -> { + strike.register("Strike", () -> { strike.unregister(); Entity eventEntity = event.getEntity(); @@ -116,7 +115,15 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { System.out.println("Test Populating RadixTree"); RadixTree tree = new RadixTree(); for (Condition condition: ConditionRegistry.getConditions()) { - List conditionPath = Arrays.asList(condition); + List conditionPath = new ArrayList<>(); + conditionPath.add(condition); + conditionPath.add(arc); + tree.insert(conditionPath); + } + for (Condition condition: ConditionRegistry.getConditions()) { + List conditionPath = new ArrayList<>(); + conditionPath.add(condition); + conditionPath.add(strike); tree.insert(conditionPath); } tree.printAllConditions(); From fe87a96608de3cc9fbf98c0f1ef598aedfaa038e Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 12 Sep 2024 18:49:13 -0400 Subject: [PATCH 213/469] added RadixTree.search method --- .../omegasource/magus/radix/Condition.java | 19 +++- .../omegasource/magus/radix/RadixTree.java | 91 ++++++++++++------- .../magus/server/ServerEvents.java | 6 ++ 3 files changed, 82 insertions(+), 34 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 5914d957..cebb9ff6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -3,7 +3,10 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.registry.Registries; +import java.util.List; + public abstract class Condition { + public enum Result { SUCCESS, FAILURE, @@ -12,9 +15,9 @@ public enum Result { protected static final Runnable NO_OPERATION = () -> RadixUtil.getLogger().debug("Result: No Operation"); + private String name; protected Runnable onSuccess; protected Runnable onFailure; - private String name; // TODO: Change to registerRunnables() public void register(String name, Runnable onSuccess, Runnable onFailure) { @@ -63,6 +66,20 @@ public String modID() { return Magus.MOD_ID; } + public static boolean startsWith(List conditions, List subConditions) { + try { + return conditions.subList(0, subConditions.size()).equals(subConditions); + } catch (IndexOutOfBoundsException e) { + return false; + } + } + + // TODO - May need to override the equals or create a new method to check if conditions have matching prefixes +// @Override +// public boolean equals(Object obj) { +// return super.equals(obj); +// } + @Override public String toString() { return "Condition[ " + name + " ]"; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 52264374..d9be4fac 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -41,7 +41,7 @@ private int getFirstMismatchCondition(List conditions, List()); } @@ -55,7 +55,7 @@ private void printAllConditions(Node current, List result) { } } - // Helpful method to debug and to see all the gestures' paths in tree format + // Helpful method to debug and to see all the branches in tree format public void printAllBranches() { printAllBranches(root, ""); } @@ -76,60 +76,85 @@ private void printAllBranches(Node current, String indent) { } } + // Add conditions to RadixTree - O(n) public void insert(List conditions) { Node current = root; int currIndex = 0; - //Iterative approach while (currIndex < conditions.size()) { Condition transitionCondition = conditions.get(currIndex); - RadixBranch currentPath = current.getTransition(transitionCondition); - //Updated version of the input gesture - List currGesture = conditions.subList(currIndex, conditions.size()); - - //There is no associated edge with the first character of the current string - //so simply add the rest of the string and finish - if (currentPath == null) { - current.branches.put(transitionCondition, new RadixBranch(new ConditionPath(currGesture))); + RadixBranch currentBranch = current.getTransition(transitionCondition); + // Iterate forward as we move through the conditions and either sprout a node or move down an existing node + List currCondition = conditions.subList(currIndex, conditions.size()); + + // There is no associated branch with the first condition of the current path + // so simply add the rest of the conditions and finish + if (currentBranch == null) { + current.branches.put(transitionCondition, new RadixBranch(new ConditionPath(currCondition))); break; } - int splitIndex = getFirstMismatchCondition(currGesture, currentPath.path.conditions); + int splitIndex = getFirstMismatchCondition(currCondition, currentBranch.path.conditions); if (splitIndex == NO_MISMATCH) { - //The edge and leftover string are the same length - //so finish and update the next node as a gesture node - if (currGesture.size() == currentPath.path.conditions.size()) { - currentPath.next.isComplete = true; + // The branch and leftover conditions are the same length + // so finish and update the next node as a complete node + if (currCondition.size() == currentBranch.path.conditions.size()) { + currentBranch.next.isComplete = true; break; - } else if (currGesture.size() < currentPath.path.conditions.size()) { - //The leftover gesture is a prefix to the edge string, so split - List suffix = currentPath.path.conditions.subList(currGesture.size()-1, currGesture.size()); - currentPath.path.conditions = currGesture; + } else if (currCondition.size() < currentBranch.path.conditions.size()) { + // The leftover condition is a prefix to the edge string, so split + List suffix = currentBranch.path.conditions.subList(currCondition.size()-1, currCondition.size()); + currentBranch.path.conditions = currCondition; Node newNext = new Node(true); - Node afterNewNext = currentPath.next; - currentPath.next = newNext; + Node afterNewNext = currentBranch.next; + currentBranch.next = newNext; newNext.addCondition(new ConditionPath(suffix), afterNewNext); break; - } else { //currStr.length() > currentEdge.label.length() - //There is leftover string after a perfect match - splitIndex = currentPath.path.conditions.size(); + } else { // currStr.length() > currentEdge.label.length() + // There are leftover conditions after a perfect match + splitIndex = currentBranch.path.conditions.size(); } } else { - //The leftover string and edge string differed, so split at point - List suffix = currentPath.path.conditions.subList(splitIndex, currentPath.path.conditions.size()); - currentPath.path.conditions = currentPath.path.conditions.subList(0, splitIndex); - Node prevNext = currentPath.next; - currentPath.next = new Node(false); - currentPath.next.addCondition(new ConditionPath(suffix), prevNext); + // The leftover conditions and branch conditions differed, so split at point + List suffix = currentBranch.path.conditions.subList(splitIndex, currentBranch.path.conditions.size()); + currentBranch.path.conditions = currentBranch.path.conditions.subList(0, splitIndex); + Node prevNext = currentBranch.next; + currentBranch.next = new Node(false); + currentBranch.next.addCondition(new ConditionPath(suffix), prevNext); } - //Traverse the tree - current = currentPath.next; + // Traverse the tree + current = currentBranch.next; currIndex += splitIndex; } } + // Returns matched condition path if found and null if not found - O(n) + public List search(List conditions) { + List ret = null; + Node current = root; + int currIndex = 0; + while (currIndex < conditions.size()) { + Condition currentCondition = conditions.get(currIndex); + RadixBranch branch = current.getTransition(currentCondition); +// RadixBranch branch = current.getMatchedPath(currentCondition); + if (branch == null) + return null; + + List currSubCondition = conditions.subList(currIndex, conditions.size()); + if (!Condition.startsWith(currSubCondition, branch.path.conditions)) + return null; + + currIndex += branch.path.conditions.size(); + current = branch.next; + if(ret == null) + ret = new ArrayList<>(); + ret = Stream.concat(ret.stream(), branch.path.conditions.stream()).toList(); + } + return ret; + } + // ---------- Cali's RadixTree Impl ---------- public void burn() { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 24c70a58..71581543 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -126,8 +126,14 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { conditionPath.add(strike); tree.insert(conditionPath); } + System.out.println("FormConditions List:"); tree.printAllConditions(); + System.out.println("FormConditions Tree:"); tree.printAllBranches(); + List conditionPath = new ArrayList<>(); + conditionPath.add(strike); + conditionPath.add(arc); + System.out.println("RadixTree.search result:\n" + tree.search(conditionPath)); } } else { if (event.getEntity() instanceof Player) { From 0b4501f7fede09e2beb3ef0ad72ae1739acadfd9 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 12 Sep 2024 18:56:27 -0400 Subject: [PATCH 214/469] Update ServerEvents.java --- .../com/amuzil/omegasource/magus/server/ServerEvents.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 71581543..b6a4ea60 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -133,7 +133,10 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { List conditionPath = new ArrayList<>(); conditionPath.add(strike); conditionPath.add(arc); - System.out.println("RadixTree.search result:\n" + tree.search(conditionPath)); + System.out.println("RadixTree.search passing result:\n" + tree.search(conditionPath)); + conditionPath.clear(); + conditionPath.add(strike); + System.out.println("RadixTree.search failed result:\n" + tree.search(conditionPath)); } } else { if (event.getEntity() instanceof Player) { From d3e6d8347498769adc8387febf0fc2812c994301 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 12 Sep 2024 21:28:19 -0400 Subject: [PATCH 215/469] register immediate children conditions only after each insert also fix that misplaced `.register()` bug --- .../amuzil/omegasource/magus/radix/Node.java | 4 ++++ .../omegasource/magus/radix/RadixTree.java | 21 +++++++++++++++++-- .../minecraft/forge/key/KeyHoldCondition.java | 1 - 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 772c6f4b..c3ea609e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -80,6 +80,10 @@ public int totalConditions() { return branches.size(); } + public Set getImmediateBranches() { + return branches.keySet(); + } + @Override public String toString() { return "Node[ isComplete=" + isComplete + ", branches=" + branches + "]"; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index d9be4fac..c66a7946 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -41,6 +41,19 @@ private int getFirstMismatchCondition(List conditions, List()); + } + + private void deactivateAllConditions(Node current, List result) { + if (current.isComplete) + for (Condition condition: result) + condition.unregister(); + + for (RadixBranch branch: current.branches.values()) + deactivateAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); + } + // Helpful method to debug and to see all the conditions public void printAllConditions() { printAllConditions(root, new ArrayList<>()); @@ -50,9 +63,8 @@ private void printAllConditions(Node current, List result) { if (current.isComplete) System.out.println("Condition: " + result); - for (RadixBranch branch: current.branches.values()) { + for (RadixBranch branch: current.branches.values()) printAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); - } } // Helpful method to debug and to see all the branches in tree format @@ -128,6 +140,11 @@ public void insert(List conditions) { current = currentBranch.next; currIndex += splitIndex; } + + // Only register immediate children conditions + deactivateAllConditions(); + for (Condition condition: root.getImmediateBranches()) + condition.register(); } // Returns matched condition path if found and null if not found - O(n) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index cfd30821..2b45a468 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -100,7 +100,6 @@ public int getKey() { @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); - this.register(); } @Override From 3878de642ddfeef53c7311b4e7f595e684b11dcb Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 14 Sep 2024 01:19:49 +1000 Subject: [PATCH 216/469] fixed overwriting the failure condition --- .../com/amuzil/omegasource/magus/radix/RadixTree.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 8eb2feeb..81630c4f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -75,7 +75,13 @@ private void setActive(Node node) { RadixUtil.getLogger().debug("Packet sent."); condition.unregister(); }; - condition.register(success, condition.onFailure); + Runnable failure; + failure = () -> { + condition.onFailure.run(); + condition.unregister(); + }; + condition.register(success, failure); + condition.register(); } } From 0042b594bfbd2966d48e792cd4f4872bca0f5533 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 14 Sep 2024 01:24:03 +1000 Subject: [PATCH 217/469] Fixed condition names being overwritten in the tree --- .../omegasource/magus/radix/RadixTree.java | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 9d80bec8..f1efb91e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -9,12 +9,13 @@ import net.minecraft.world.entity.Entity; import org.apache.logging.log4j.LogManager; -import java.util.*; +import java.util.ArrayList; +import java.util.List; import java.util.stream.Stream; public class RadixTree { - private Node root; private static final int NO_MISMATCH = -1; + private Node root; private Node active; private Condition lastActivated = null; // Fire is a test @@ -47,10 +48,10 @@ private void deactivateAllConditions() { private void deactivateAllConditions(Node current, List result) { if (current.isComplete) - for (Condition condition: result) + for (Condition condition : result) condition.unregister(); - for (RadixBranch branch: current.branches.values()) + for (RadixBranch branch : current.branches.values()) deactivateAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); } @@ -63,7 +64,7 @@ private void printAllConditions(Node current, List result) { if (current.isComplete) System.out.println("Condition: " + result); - for (RadixBranch branch: current.branches.values()) + for (RadixBranch branch : current.branches.values()) printAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); } @@ -73,8 +74,9 @@ public void printAllBranches() { } private void printAllBranches(Node current, String indent) { - int lastValue = current.totalConditions()-1; int i = 0; - for (RadixBranch branch: current.branches.values()) { + int lastValue = current.totalConditions() - 1; + int i = 0; + for (RadixBranch branch : current.branches.values()) { if (i == lastValue) System.out.println(indent.replace("+", "L") + branch.path); else @@ -83,7 +85,8 @@ private void printAllBranches(Node current, String indent) { int length2 = branch.path.toString().length() / 3; String oldIndent = new String(new char[length1]).replace("\0", " "); String lineIndent = new String(new char[length2]).replace("\0", "-"); - String newIndent = oldIndent + "+" + lineIndent + "->"; i++; + String newIndent = oldIndent + "+" + lineIndent + "->"; + i++; printAllBranches(branch.next, newIndent); } } @@ -115,7 +118,7 @@ public void insert(List conditions) { break; } else if (currCondition.size() < currentBranch.path.conditions.size()) { // The leftover condition is a prefix to the edge string, so split - List suffix = currentBranch.path.conditions.subList(currCondition.size()-1, currCondition.size()); + List suffix = currentBranch.path.conditions.subList(currCondition.size() - 1, currCondition.size()); currentBranch.path.conditions = currCondition; Node newNext = new Node(true); Node afterNewNext = currentBranch.next; @@ -143,7 +146,7 @@ public void insert(List conditions) { // Only register immediate children conditions deactivateAllConditions(); - for (Condition condition: root.getImmediateBranches()) + for (Condition condition : root.getImmediateBranches()) condition.register(); } @@ -165,7 +168,7 @@ public List search(List conditions) { currIndex += branch.path.conditions.size(); current = branch.next; - if(ret == null) + if (ret == null) ret = new ArrayList<>(); ret = Stream.concat(ret.stream(), branch.path.conditions.stream()).toList(); } @@ -204,16 +207,16 @@ private void setActive(Node node) { if (active != null && active == root) { Condition currentCondition = active.terminateCondition(); if (currentCondition != null) { - currentCondition.register("", () -> { + currentCondition.register(currentCondition.name(), () -> { currentCondition.onSuccess.run(); + currentCondition.unregister(); MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); }, currentCondition.onFailure); + currentCondition.register(); } // Child Nodes - for (Map.Entry child : active.getImmediateChildren().entrySet()) { - //TODO: Find way to prevent overwriting but also prevent doubly sending packets. - Condition condition = child.getKey(); + for (Condition condition : active.getImmediateBranches()) { if (condition != null) { Runnable success; success = () -> { From 39ebee59cb69a7282ab224306bf184633f193457 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 14 Sep 2024 01:25:17 +1000 Subject: [PATCH 218/469] fixed moveDown --- .../packets/server_executed/ConditionActivatedPacket.java | 3 ++- .../java/com/amuzil/omegasource/magus/radix/RadixTree.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index bb9837ba..11bd85a4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; @@ -37,7 +38,7 @@ public boolean handle(Supplier ctx) { ctx.get().enqueueWork(() -> { Player player = ctx.get().getSender(); // Intentional crashing because I want to know why my packet isn't being received correctly... -// CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); + CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); }); return true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index f1efb91e..0aafa5ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -319,7 +319,7 @@ public void moveDown(Condition executedCondition) { } //TODO: THis should not jump levels of the tree!!!!!! - setActive(active.children().get(executedCondition)); + setActive(active.branches.get(executedCondition).next); } public void expire() { From b7e43754d59c7b6e715fecead23c88de93f4c671 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 13 Sep 2024 23:39:27 -0400 Subject: [PATCH 219/469] create sendDebugMsg method --- .../java/com/amuzil/omegasource/magus/Magus.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 6a230973..89c1a51a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -7,22 +7,19 @@ import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; -import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.client.Minecraft; +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.network.chat.Component; import net.minecraft.world.entity.Entity; -import net.minecraft.world.level.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.*; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.util.stream.Collectors; - // The value here should match an entry in the META-INF/mods.toml file /** @@ -111,9 +108,16 @@ public static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); - KeyboardMouseInputModule.determineMotionKeys(); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); } } + + // Send a message to in-game chat + public static void sendDebugMsg(String msg) { + LocalPlayer player = Minecraft.getInstance().player; + Component text = Component.literal(msg); + assert player != null; + player.sendSystemMessage(text); + } } From cbc1dd7bccf7436b3d4aa281bc0be4026064b1a9 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sat, 14 Sep 2024 01:06:15 -0400 Subject: [PATCH 220/469] add setName method --- .../java/com/amuzil/omegasource/magus/radix/Condition.java | 6 +++++- .../magus/radix/condition/input/FormCondition.java | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index cebb9ff6..b3ada3b1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -61,6 +61,10 @@ public String name() { return this.name; } + public void setName(String name) { + this.name = name; + } + // Change this for custom conditions/conditions you want registered in your own mod public String modID() { return Magus.MOD_ID; @@ -82,6 +86,6 @@ public static boolean startsWith(List conditions, List sub @Override public String toString() { - return "Condition[ " + name + " ]"; + return this.getClass().getSimpleName() + "[ " + name + " ]"; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java index 150a8ffc..1828f253 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java @@ -17,6 +17,7 @@ public class FormCondition extends Condition { int ticksWaiting; public FormCondition(Form form, int timeout, InputModule module) { + this.setName(form.name()); this.form = form; this.timeout = timeout; this.module = module; From 4dba88d100190f6acad37a04100dc924359fb97b Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sat, 14 Sep 2024 01:07:32 -0400 Subject: [PATCH 221/469] refactor and split KeyboardMouseInputModule --- .../com/amuzil/omegasource/magus/Magus.java | 5 +- .../magus/input/KeyboardInputModule.java | 208 ++++++++++++++++++ ...InputModule.java => MouseInputModule.java} | 26 +-- .../omegasource/magus/radix/RadixTree.java | 6 + .../minecraft/forge/key/KeyHoldCondition.java | 5 +- .../magus/server/ServerEvents.java | 34 +-- .../listeners/KeyHeldModifierListener.java | 4 +- .../skill/test/avatar/AvatarFormRegistry.java | 5 +- 8 files changed, 237 insertions(+), 56 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java rename src/main/java/com/amuzil/omegasource/magus/input/{KeyboardMouseInputModule.java => MouseInputModule.java} (88%) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 89c1a51a..576d0e72 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus; import com.amuzil.omegasource.magus.input.InputModule; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -43,7 +43,7 @@ public Magus() { // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); //Register the input module - keyboardInputModule = new KeyboardMouseInputModule(); + keyboardInputModule = new KeyboardInputModule(); // Register capabilities FMLJavaModLoadingContext.get().getModEventBus().addListener(CapabilityHandler::registerCapabilities); // attach capabilities @@ -108,6 +108,7 @@ public static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); + KeyboardInputModule.determineMotionKeys(); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java new file mode 100644 index 00000000..dfb5df7b --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -0,0 +1,208 @@ +package com.amuzil.omegasource.magus.input; + +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.KeyMapping; +import net.minecraft.client.Minecraft; +import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; +import org.apache.logging.log4j.LogManager; + +import java.util.*; +import java.util.function.Consumer; + +public class KeyboardInputModule extends InputModule { + + private List glfwKeysDown; + private static final Map movementKeys = new HashMap<>(); + private final Consumer keyboardListener; + private final Consumer tickEventConsumer; + private Form activeForm = null; + private int ticksSinceActivated = 0; + private int ticksSinceModifiersSent = 0; + + //todo make these thresholds configurable and make them longer. Especially the timeout threshold. + private final int tickActivationThreshold = 15; + private final int tickTimeoutThreshold = 60; + private final int modifierTickThreshold = 10; + private boolean listen; + Minecraft mc = Minecraft.getInstance(); + + // TODO: Fix this such that any tree requiring a form relies on the input + // module activating a form rather than relying on the raw input data for those forms. + // This way, the trees for different complex methods (such as VR and multikey) + // remain functionally the same, they just check different input modules for whether the same + // forms are activated. + public KeyboardInputModule() { + this.glfwKeysDown = new ArrayList<>(); + this.listen = true; + this.keyboardListener = keyboardEvent -> { + int keyPressed = keyboardEvent.getKey(); + switch (keyboardEvent.getAction()) { + case InputConstants.PRESS -> { + if (!glfwKeysDown.contains(keyPressed)) + glfwKeysDown.add(keyPressed); + } + case InputConstants.REPEAT -> { + if (!glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.add(keyPressed); + } + } + case InputConstants.RELEASE -> { + if (glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.remove((Integer) keyPressed); + } + } + } + }; + + this.tickEventConsumer = tickEvent -> { + + ticksSinceModifiersSent++; + if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { + sendModifierData(); + } + + //cleanMCKeys(); + + if(activeForm != null) { + ticksSinceActivated++; +// _formInputs.forEach(((condition, form) -> { +// RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? +// "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); +// RadixUtil.getLogger().debug("Form: " + form.name()); +// })); + if(ticksSinceActivated >= tickActivationThreshold) { + LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); +// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); + lastActivatedForm = activeForm; + activeForm = null; + ticksSinceActivated = 0; + } + } + else { + ticksSinceActivated++; + if (ticksSinceActivated >= tickTimeoutThreshold) { + lastActivatedForm = null; + ticksSinceActivated = 0; + } + } + }; + } + + private void sendModifierData() { + LogManager.getLogger().info("SENDING MODIFIER DATA"); + synchronized (modifierQueue) { + MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); + ticksSinceModifiersSent = 0; + modifierQueue.clear(); + } + } + + public void resetKeys() { + glfwKeysDown = new ArrayList<>(); + } + public void cleanMCKeys() { + // Fixes some weird mouse and other key issues. + for (KeyMapping key : Minecraft.getInstance().options.keyMappings) { + if (!key.isDown()) { + if (glfwKeysDown.contains(key.getKey().getValue())) + glfwKeysDown.remove((Integer) key.getKey().getValue()); + } + } + } + + @Override + public void registerInputData(List formExecutionInputs, Form formToExecute) { + //generate condition from InputData. + Runnable onSuccess = () -> { + if(mc.level != null) { + //this section is to prevent re-activating + // single condition forms when you hold the activation key for Held modifiers + + //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. + // I.e account for modifiers here. + if(formToExecute != lastActivatedForm) { + //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); + activeForm = formToExecute; + } + + ticksSinceActivated = 0; + } + //Reset condition + }; + Runnable onFailure = () -> { + activeForm = null; + //reset conditions? + // Magus.radixTree.burn(); + }; + Condition formCondition = ConditionBuilder.instance() + .fromInputData(formExecutionInputs) + .build(); + if(formCondition != null) { + //Register listeners for condition created. + formCondition.register(formToExecute.name(), onSuccess, onFailure); + //add condition to InputModule registry so that it can be tracked. + formInputs.put(formCondition, formToExecute); + } else { + //todo errors/logging + } + + } + + @Override + public void registerListeners() { + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); + } + + @Override + public void unregisterInputs() { + MinecraftForge.EVENT_BUS.unregister(keyboardListener); + MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); + formInputs.forEach((condition, form) -> condition.unregister()); + } + + public void registerInputs() { + formInputs.forEach((condition, form) -> condition.register()); + } + + @Override + public void toggleListeners() { + if (!listen) { + registerListeners(); + listen = true; + } + else { + unregisterInputs(); + listen = false; + } + } + + public boolean keyPressed(int key) { + return glfwKeysDown.contains(key); + } + + public static void determineMotionKeys() { + Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { + if(keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { + movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); + } + }); + } + + public static Map getMovementKeys() { + return movementKeys; + } + + public boolean isDirectionKey(int key) { + return movementKeys.containsValue(Integer.valueOf(key)); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java similarity index 88% rename from src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java rename to src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index 1a717471..981cdb53 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -18,7 +18,7 @@ import java.util.*; import java.util.function.Consumer; -public class KeyboardMouseInputModule extends InputModule { +public class MouseInputModule extends InputModule { private final Consumer tickEventConsumer; private List glfwKeysDown; @@ -28,7 +28,6 @@ public class KeyboardMouseInputModule extends InputModule { // is -1.0. Therefore, you'd need a tracker over time, like a key held event, for the mouse wheel. // Except you're not pressing it, you're spinning it.... private double mouseScrollDelta; - private final Consumer keyboardListener; private final Consumer mouseListener; private final Consumer mouseScrollListener; private Form activeForm = null; @@ -47,28 +46,9 @@ public class KeyboardMouseInputModule extends InputModule { // This way, the trees for different complex methods (such as VR and multikey) // remain functionally the same, they just check different input modules for whether the same // forms are activated. - public KeyboardMouseInputModule() { + public MouseInputModule() { this.glfwKeysDown = new ArrayList<>(); this.listen = true; - this.keyboardListener = keyboardEvent -> { - int keyPressed = keyboardEvent.getKey(); - switch (keyboardEvent.getAction()) { - case InputConstants.PRESS -> { - if (!glfwKeysDown.contains(keyPressed)) - glfwKeysDown.add(keyPressed); - } - case InputConstants.REPEAT -> { - if (!glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.add(keyPressed); - } - } - case InputConstants.RELEASE -> { - if (glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.remove((Integer) keyPressed); - } - } - } - }; this.mouseListener = mouseEvent -> { int keyPressed = mouseEvent.getButton(); @@ -192,7 +172,6 @@ public void registerInputData(List formExecutionInputs, Form formToEx @Override public void registerListeners() { - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseScrollingEvent.class, mouseScrollListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); @@ -200,7 +179,6 @@ public void registerListeners() { @Override public void unregisterInputs() { - MinecraftForge.EVENT_BUS.unregister(keyboardListener); MinecraftForge.EVENT_BUS.unregister(mouseListener); MinecraftForge.EVENT_BUS.unregister(mouseScrollListener); MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 0aafa5ba..cc888ade 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -42,6 +42,12 @@ private int getFirstMismatchCondition(List conditions, List conditions) { + for (Condition condition: conditions) { + condition.register(); + } + } + private void deactivateAllConditions() { deactivateAllConditions(root, new ArrayList<>()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 2b45a468..58a25aed 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; import net.minecraft.client.Minecraft; @@ -26,7 +26,6 @@ public class KeyHoldCondition extends Condition { public KeyHoldCondition(int key, int duration, int timeout, boolean release) { RadixUtil.assertTrue(duration >= 1, "duration must be >= 1"); RadixUtil.assertTrue(timeout >= 1, "timeout must be >= 1"); - this.currentTotal = 0; this.currentHolding = 0; this.release = release; @@ -35,7 +34,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { - if (((KeyboardMouseInputModule) Magus.keyboardInputModule).keyPressed(key)) { + if (((KeyboardInputModule) Magus.keyboardInputModule).keyPressed(key)) { this.started = true; this.currentHolding++; } else { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index b6a4ea60..206653f2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.server; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.radix.Condition; @@ -9,9 +9,11 @@ import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; +import com.amuzil.omegasource.magus.radix.condition.input.FormCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -58,12 +60,6 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { if (capability.getTree() != null) capability.getTree().burn(); // TODO: Need a way to convert forms into conditions -// RadixTree tree = new RadixTree(NodeBuilder.root().addChildren(new Pair<>(Forms.ARC, secondNode), -// new Pair<>(Forms.STEP, secondNode)).build()); -// // new Pair<>(Forms.FORCE, secondNode), -//// new Pair<>(Forms.BURST, secondNode)).build()); -// tree.setOwner(event.getEntity()); -// capability.setTree(tree); // Need to test out the condition tree. use left alt/arc > strike (left click). // While this test code will directly use conditions, Skills will reference Forms // that get automatically turned into conditions. @@ -100,19 +96,13 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { }); ConditionRegistry.register(strike); -// Node root = NodeBuilder.root().build(); -// Node middle = NodeBuilder.middle().addParent(new Pair<>(root.terminateCondition(), root)).build(); -// Node end = NodeBuilder.end().addParent(new Pair<>(arc, middle)).build(); -// middle = middle.children().put(strike, end); -// root = root.children().put(arc, middle); -// -// //todo this is not be where we should call start, but for now it'll stop us crashing until -// // we have a key for activating the bending state -// tree.setOwner(event.getEntity()); -// capability.setTree(tree); -// capability.getTree().start(); - - System.out.println("Test Populating RadixTree"); + + Condition arc2 = new FormCondition(Forms.ARC, -1, Magus.keyboardInputModule); + arc2.register("ARC", () -> { + Magus.sendDebugMsg("ARC FORM TRIGGERED"); + }, () -> {}); + + System.out.println("Test RadixTree"); RadixTree tree = new RadixTree(); for (Condition condition: ConditionRegistry.getConditions()) { List conditionPath = new ArrayList<>(); @@ -140,7 +130,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } else { if (event.getEntity() instanceof Player) { - ((KeyboardMouseInputModule) Magus.keyboardInputModule).resetKeys(); + ((KeyboardInputModule) Magus.keyboardInputModule).resetKeys(); Magus.keyboardInputModule.registerListeners(); AvatarFormRegistry.registerForms(); } @@ -151,7 +141,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { if (event.getLevel().isClientSide() && event.getEntity() instanceof Player) { Magus.keyboardInputModule.unregisterInputs(); - ((KeyboardMouseInputModule) Magus.keyboardInputModule).resetKeys(); + ((KeyboardInputModule) Magus.keyboardInputModule).resetKeys(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 5ff9cae1..3cc6cfba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -48,7 +48,7 @@ public void setupListener(CompoundTag compoundTag) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - if (((KeyboardMouseInputModule)Magus.keyboardInputModule).keyPressed(keyToHold)) { + if (((KeyboardInputModule)Magus.keyboardInputModule).keyPressed(keyToHold)) { this.isHeld = true; this.currentHolding++; } else { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 824c2588..ed988a68 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.skill.test.avatar; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; -import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; @@ -73,7 +72,7 @@ public static void registerForms() { //TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. // Also account for the direction modifier. - for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { + for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { inputs.clear(); //TODO: Find a way to specify releasing a key is required. From 32d8eefc8388ae626b47b8ef41fc1d5f740b7532 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sat, 14 Sep 2024 22:12:38 -0400 Subject: [PATCH 222/469] organizing some code still buiilds --- .../omegasource/magus/input/InputModule.java | 1 + .../magus/input/KeyboardInputModule.java | 4 +- .../radix/condition/ChainedCondition.java | 3 +- .../magus/server/ServerEvents.java | 1 + .../magus/skill/forms/FormDataRegistry.java | 1 + .../skill/test/avatar/AvatarFormRegistry.java | 67 ++++++------------- 6 files changed, 29 insertions(+), 48 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 5053c62d..dc6f50e1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -65,6 +65,7 @@ public void resetLastActivated() { public Form getLastActivatedForm() { return this.lastActivatedForm; } + public abstract void registerListeners(); public abstract void unregisterInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index dfb5df7b..c09f315f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -109,6 +109,7 @@ private void sendModifierData() { public void resetKeys() { glfwKeysDown = new ArrayList<>(); } + public void cleanMCKeys() { // Fixes some weird mouse and other key issues. for (KeyMapping key : Minecraft.getInstance().options.keyMappings) { @@ -179,8 +180,7 @@ public void toggleListeners() { if (!listen) { registerListeners(); listen = true; - } - else { + } else { unregisterInputs(); listen = false; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index c5a72376..85cd15de 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -77,6 +77,7 @@ public void register() { @Override public void unregister() { - currentCondition.unregister(); + if (currentCondition != null) + currentCondition.unregister(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 206653f2..bf55b7ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -130,6 +130,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } else { if (event.getEntity() instanceof Player) { + System.out.println("MADE IT TO CLIENT SIDE?"); ((KeyboardInputModule) Magus.keyboardInputModule).resetKeys(); Magus.keyboardInputModule.registerListeners(); AvatarFormRegistry.registerForms(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 4c7b087c..a797288b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -49,6 +49,7 @@ public static void registerForm(List inputs, Form form) { public static List getConditionsFrom(Form form) { return formConditions.get(form); } + public static void registerForm(InputData input, Form form) { List singleton = new ArrayList<>(); singleton.add(input); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index ed988a68..66898b94 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -17,64 +17,41 @@ public class AvatarFormRegistry { public static void registerForms() { - KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0, - 0, 0); - KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0, - 0, 0); - KeyInput initialiser = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 0); - KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, - 20); - KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, - 0); + KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0, 0, 0); + KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0, 0, 0); + KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 0); + KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, 20); + KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, 0); MouseWheelInput forwards = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.FORWARDS, 1); MouseWheelInput back = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.BACK, 1); - LinkedList inputs = new LinkedList<>(); - - - // UPDATE: Rather than having "push", "pull", "raise", and "lower" as Forms, - // why not make them Effects using the Force form and Direction modifier? - // TODO: Bring that up with other devs, seems like it makes more sense! - - //FormDataRegistry.registerForm(Forms.PUSH); - //FormDataRegistry.registerForm(Forms.PULL); + // TODO: Rather than having "push", "pull", "raise", and "lower" as Forms, + // make them Effects using the Force Form, Direction modifier & Target Modifier - //FormDataRegistry.registerForm(Forms.RAISE); - - //FormDataRegistry.registerForm(Forms.LOWER); - - LinkedList data = InputDataBuilder.toInputs( - KeyDataBuilder.createMultiInput(left, right)); -// - FormDataRegistry.registerForm(data, Forms.BURST); -// - FormDataRegistry.registerForm(InputDataBuilder.toInputs(initialiser), Forms.ARC); -// -// //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); -// -// //TODO: Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); -// -// // TODO: Use mouse motion, but the input module currently does not support that. -//// FormDataRegistry.registerForm(Forms.ROTATE); -// + FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC); FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); -// +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); +// FormDataRegistry.registerForm(Forms.PUSH); +// FormDataRegistry.registerForm(Forms.PULL); +// FormDataRegistry.registerForm(Forms.RAISE); +// FormDataRegistry.registerForm(Forms.LOWER); +// FormDataRegistry.registerForm(Forms.ROTATE); + // TODO: Add mouse wheel input (once the input module supports it). Mouse wheel 1; forwards/away from the player. + // Add mouse wheel input (once the input module supports it). Mouse wheel -1; towards the player/backwards. - //Motion! 7 different movement options. + // Motion! 7 different movement options. // Left, right, up, down, jump, sneak, sprint. - - //TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. - // Also account for the direction modifier. + LinkedList inputs = new LinkedList<>(); for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { inputs.clear(); - //TODO: Find a way to specify releasing a key is required. + // TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. + // Also account for the direction modifier. KeyInput first, second; // Problem: The tick delay is being combined with the key press into a simultaneous condition. From e7ca2d379079d267261ac384803c18ae0dc533be Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 15 Sep 2024 15:25:06 +1000 Subject: [PATCH 223/469] Getting ready to redo the input module --- .../amuzil/omegasource/magus/input/KeyboardMouseInputModule.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 1a717471..ff0dbb4e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -174,7 +174,6 @@ public void registerInputData(List formExecutionInputs, Form formToEx Runnable onFailure = () -> { activeForm = null; //reset conditions? - // Magus.radixTree.burn(); }; Condition formCondition = ConditionBuilder.instance() .fromInputData(formExecutionInputs) From d21d008361b44eef6e8cb33a0840ff4262de6880 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 15 Sep 2024 16:06:26 +1000 Subject: [PATCH 224/469] Rudimentary mouse motion condition acquired. --- .../radix/condition/ChainedCondition.java | 8 +- .../magus/radix/condition/MultiCondition.java | 2 +- .../forge/mouse/MouseMotionCondition.java | 108 ++++++++++++ .../magus/server/ServerEvents.java | 20 ++- .../skill/conditionals/ConditionBuilder.java | 1 - .../mouse/MouseMotionShapeComparator.java | 154 ++++++++++++++++++ 6 files changed, 285 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index c5a72376..583d98ea 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -42,12 +42,12 @@ private void finishCurrentCondition() { currentCondition = conditionSequence.get(currentConditionIndex); if(currentConditionIndex == conditionSequence.size() - 1) { - currentCondition.register("", onCompleteSuccess, () -> { + currentCondition.register(currentCondition.name(), onCompleteSuccess, () -> { onPartialFailure.run(); onCompleteFailure.run(); }); } else { - currentCondition.register("", onPartialSuccess, onPartialFailure); + currentCondition.register(currentCondition.name(), onPartialSuccess, onPartialFailure); } } @@ -56,7 +56,7 @@ private void reset() { currentConditionIndex = 0; currentCondition.unregister(); currentCondition = conditionSequence.get(currentConditionIndex); - currentCondition.register("", onPartialSuccess, onPartialFailure); + currentCondition.register(currentCondition.name(), onPartialSuccess, onPartialFailure); } @Override @@ -68,7 +68,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { @Override public void register() { currentCondition = conditionSequence.get(currentConditionIndex); - currentCondition.register("", onPartialSuccess, onPartialFailure); + currentCondition.register(currentCondition.name(), onPartialSuccess, onPartialFailure); // Divorce register(runnable, runnable) from the regular register method. // This method should add requisite listeners to the forge event bus. // The other method should just adjust runnables as needed. diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index b0245254..44b66d5d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -67,7 +67,7 @@ public void reset() { this.executionTime = 0; concurrentConditions.forEach(condition -> { int id = counter.getAndIncrement(); - condition.register("", () -> { + condition.register(condition.name(), () -> { synchronized (conditionsMet) { // Debugging statement: // LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java new file mode 100644 index 00000000..8879f216 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java @@ -0,0 +1,108 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.mouse; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionShapeComparator; +import com.amuzil.omegasource.magus.skill.forms.Form; +import net.minecraft.client.Minecraft; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; + +import java.awt.geom.Point2D; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Consumer; + +public class MouseMotionCondition extends Condition { + private final Consumer clientTickListener; + private final MouseMotionShapeComparator shapeComparator; + private final List mousePath; + private boolean tracking; + private final double speedThreshold; + private final int key; // Key that needs to be held + private final Form requiredForm; // Form that needs to be activated + private final List activeForms; // Track active forms in real-time + + public MouseMotionCondition(double speedThreshold, double errorMargin, int key, Form requiredForm) { + this.mousePath = new ArrayList<>(); + this.shapeComparator = new MouseMotionShapeComparator(errorMargin); + this.speedThreshold = speedThreshold; + this.key = key; + this.requiredForm = requiredForm; + this.activeForms = new ArrayList<>(); + this.tracking = false; + + this.clientTickListener = event -> { + if (event.phase == TickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { + boolean keyPressed = key == -1 || isKeyPressed(key); // -1 indicates no key requirement + boolean formActive = requiredForm == null || activeForms.contains(requiredForm); + + if (keyPressed && formActive) { + trackMouseMovement(); + } + } + }; + + this.registerEntry(); + } + + private void trackMouseMovement() { + double currentX = Minecraft.getInstance().mouseHandler.xpos(); + double currentY = Minecraft.getInstance().mouseHandler.ypos(); + + // Minecraft coordinates: up is negative Y, down is positive Y, left is negative X, right is positive X + // No adjustment needed as the coordinates naturally fit the system described + + if (!tracking) { + mousePath.clear(); + tracking = true; + } + + mousePath.add(new Point2D.Double(currentX, currentY)); + + // Example shape matching, modify as needed + if (shapeComparator.compareToPath(mousePath, generateDesiredShape())) { + this.onSuccess.run(); + reset(); + } + } + + public boolean isSatisfied() { + return !mousePath.isEmpty(); + } + + public void reset() { + this.mousePath.clear(); + this.tracking = false; + } + + public void setActiveForms(List forms) { + activeForms.clear(); + activeForms.addAll(forms); + } + + @Override + public void register(String name, Runnable onSuccess, Runnable onFailure) { + super.register(name, onSuccess, onFailure); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); + } + + @Override + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(clientTickListener); + } + + @Override + public String name() { + return "mouse_motion"; + } + + private boolean isKeyPressed(int key) { + return Minecraft.getInstance().options.keyMappings[key].isDown(); + } + + private List generateDesiredShape() { + // Placeholder for generating shapes like lines, spirals, etc. + return new ArrayList<>(); + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index b6a4ea60..c39b86b0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -22,6 +22,7 @@ import net.minecraft.world.entity.LightningBolt; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; +import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.EntityLeaveLevelEvent; import net.minecraftforge.event.level.LevelEvent; @@ -114,13 +115,13 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { System.out.println("Test Populating RadixTree"); RadixTree tree = new RadixTree(); - for (Condition condition: ConditionRegistry.getConditions()) { + for (Condition condition : ConditionRegistry.getConditions()) { List conditionPath = new ArrayList<>(); conditionPath.add(condition); conditionPath.add(arc); tree.insert(conditionPath); } - for (Condition condition: ConditionRegistry.getConditions()) { + for (Condition condition : ConditionRegistry.getConditions()) { List conditionPath = new ArrayList<>(); conditionPath.add(condition); conditionPath.add(strike); @@ -147,6 +148,21 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } + @SubscribeEvent + public static void tickEvent(TickEvent.ClientTickEvent event) { + Minecraft minecraft = Minecraft.getInstance(); + + + // Get the current mouse X and Y positions + double mouseX = minecraft.mouseHandler.xpos(); + double mouseY = minecraft.mouseHandler.ypos(); + + + // Print the mouse coordinates + System.out.println("Mouse X: " + mouseX + ", Mouse Y: " + mouseY); + + } + @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { if (event.getLevel().isClientSide() && event.getEntity() instanceof Player) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 8b06cedd..d1058699 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -72,7 +72,6 @@ public Condition build() { if (conditions.size() == 1) return conditions.get(0); - // This is bad. We want to just return a list of conditions. return new ChainedCondition(conditions); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java new file mode 100644 index 00000000..1d59d8e6 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java @@ -0,0 +1,154 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +import java.awt.geom.Point2D; +import java.util.ArrayList; +import java.util.List; + +public class MouseMotionShapeComparator { + + private final double errorMargin; + + public MouseMotionShapeComparator(double errorMargin) { + this.errorMargin = errorMargin; + } + + // Added compareToPath method + public boolean compareToPath(List path, List targetShape) { + // Check the size to avoid out-of-bounds errors; you may want to add more sophisticated path matching logic. + int minSize = Math.min(path.size(), targetShape.size()); + for (int i = 0; i < minSize; i++) { + Point2D pathPoint = path.get(i); + Point2D shapePoint = targetShape.get(i); + + // Check if the path points are within the acceptable error margin + if (pathPoint.distance(shapePoint) > errorMargin) { + return false; + } + } + return true; + } + + public boolean compareToLine(List path, Point2D startPoint, Point2D endPoint) { + List line = generateLine(startPoint, endPoint); + return comparePaths(path, line); + } + + public boolean compareToSquare(List path, Point2D center, double sideLength, double rotation) { + List square = generatePolygon(center, sideLength, 4, rotation); + return comparePaths(path, square); + } + + public boolean compareToCircle(List path, Point2D center, double radius) { + List circle = generateCircle(center, radius); + return comparePaths(path, circle); + } + + public boolean compareToPolygon(List path, Point2D center, double sideLength, int sides, double rotation) { + List polygon = generatePolygon(center, sideLength, sides, rotation); + return comparePaths(path, polygon); + } + + public boolean compareToStar(List path, Point2D center, double outerRadius, double innerRadius, int points, double rotation) { + List star = generateStar(center, outerRadius, innerRadius, points, rotation); + return comparePaths(path, star); + } + + public boolean compareToDiamond(List path, Point2D center, double width, double height, double rotation) { + List diamond = generateDiamond(center, width, height, rotation); + return comparePaths(path, diamond); + } + + public boolean compareToSpiral(List path, Point2D center, double initialRadius, double turns, double spacing, double rotation) { + List spiral = generateSpiral(center, initialRadius, turns, spacing, rotation); + return comparePaths(path, spiral); + } + + private boolean comparePaths(List path, List shape) { + if (path.size() != shape.size()) return false; + + for (int i = 0; i < path.size(); i++) { + Point2D pathPoint = path.get(i); + Point2D shapePoint = shape.get(i); + + if (pathPoint.distance(shapePoint) > errorMargin) { + return false; + } + } + return true; + } + + private List generateLine(Point2D startPoint, Point2D endPoint) { + List line = new ArrayList<>(); + line.add(startPoint); + line.add(endPoint); + return line; + } + + private List generateCircle(Point2D center, double radius) { + List circle = new ArrayList<>(); + int numPoints = 360; + + for (int i = 0; i < numPoints; i++) { + double angle = 2 * Math.PI * i / numPoints; + double x = center.getX() + radius * Math.cos(angle); + double y = center.getY() + radius * Math.sin(angle); + circle.add(new Point2D.Double(x, y)); + } + return circle; + } + + private List generatePolygon(Point2D center, double sideLength, int sides, double rotation) { + List polygon = new ArrayList<>(); + double angleIncrement = 2 * Math.PI / sides; + + for (int i = 0; i < sides; i++) { + double angle = i * angleIncrement + Math.toRadians(rotation); + double x = center.getX() + sideLength * Math.cos(angle); + double y = center.getY() + sideLength * Math.sin(angle); + polygon.add(new Point2D.Double(x, y)); + } + return polygon; + } + + private List generateStar(Point2D center, double outerRadius, double innerRadius, int points, double rotation) { + List star = new ArrayList<>(); + double angleIncrement = Math.PI / points; + + for (int i = 0; i < 2 * points; i++) { + double radius = (i % 2 == 0) ? outerRadius : innerRadius; + double angle = i * angleIncrement + Math.toRadians(rotation); + double x = center.getX() + radius * Math.cos(angle); + double y = center.getY() + radius * Math.sin(angle); + star.add(new Point2D.Double(x, y)); + } + return star; + } + + private List generateDiamond(Point2D center, double width, double height, double rotation) { + List diamond = new ArrayList<>(); + double[] angles = {45, 135, 225, 315}; + + for (double angle : angles) { + double rad = Math.toRadians(angle + rotation); + double x = center.getX() + (width / 2) * Math.cos(rad); + double y = center.getY() + (height / 2) * Math.sin(rad); + diamond.add(new Point2D.Double(x, y)); + } + return diamond; + } + + private List generateSpiral(Point2D center, double initialRadius, double turns, double spacing, double rotation) { + List spiral = new ArrayList<>(); + int numPoints = (int) (turns * 360); // Points per full circle turn + + for (int i = 0; i < numPoints; i++) { + double angle = 2 * Math.PI * i / 360.0 + Math.toRadians(rotation); + double radius = initialRadius + spacing * (i / 360.0); + double x = center.getX() + radius * Math.cos(angle); + double y = center.getY() + radius * Math.sin(angle); + spiral.add(new Point2D.Double(x, y)); + } + + return spiral; + } +} \ No newline at end of file From 6c5ba6a0536c8889b1c05c9d0ed83855256f13cc Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 15 Sep 2024 16:10:06 +1000 Subject: [PATCH 225/469] Did a bit of professional abstraction --- .../conditionals/mouse/MouseMotionShapeComparator.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java index 1d59d8e6..5ef3c205 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java @@ -97,12 +97,16 @@ private List generateCircle(Point2D center, double radius) { return circle; } + private double getAngle(int i, double increment, double rotation) { + return i * increment + Math.toRadians(rotation); + } + private List generatePolygon(Point2D center, double sideLength, int sides, double rotation) { List polygon = new ArrayList<>(); double angleIncrement = 2 * Math.PI / sides; for (int i = 0; i < sides; i++) { - double angle = i * angleIncrement + Math.toRadians(rotation); + double angle = getAngle(i, angleIncrement, rotation); double x = center.getX() + sideLength * Math.cos(angle); double y = center.getY() + sideLength * Math.sin(angle); polygon.add(new Point2D.Double(x, y)); @@ -116,7 +120,7 @@ private List generateStar(Point2D center, double outerRadius, double in for (int i = 0; i < 2 * points; i++) { double radius = (i % 2 == 0) ? outerRadius : innerRadius; - double angle = i * angleIncrement + Math.toRadians(rotation); + double angle = getAngle(i, angleIncrement, rotation); double x = center.getX() + radius * Math.cos(angle); double y = center.getY() + radius * Math.sin(angle); star.add(new Point2D.Double(x, y)); From 611909b7b14c3d7d1a8056f2e2458705cf0060e9 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 15 Sep 2024 20:42:02 -0400 Subject: [PATCH 226/469] got split keyboard and mouse input modules to work and last activated form is being set for both --- .../com/amuzil/omegasource/magus/Magus.java | 5 +- .../omegasource/magus/input/InputModule.java | 8 +- .../omegasource/magus/input/KeyBindings.java | 2 +- .../magus/input/KeyboardInputModule.java | 21 ++- .../magus/input/MouseInputModule.java | 16 ++- .../omegasource/magus/radix/Condition.java | 4 +- .../minecraft/forge/key/KeyHoldCondition.java | 9 +- .../magus/registry/Registries.java | 4 +- .../magus/server/ServerEvents.java | 135 +++++++++--------- .../skill/conditionals/ConditionBuilder.java | 1 - .../magus/skill/forms/FormDataRegistry.java | 16 ++- .../skill/test/avatar/AvatarFormRegistry.java | 42 +++--- 12 files changed, 138 insertions(+), 125 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 576d0e72..7540f425 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.input.KeyboardInputModule; +import com.amuzil.omegasource.magus.input.MouseInputModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -38,12 +39,14 @@ public class Magus { //todo: move these to a better place //todo: make multiple input modules public static InputModule keyboardInputModule; + public static InputModule mouseInputModule; public Magus() { // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); - //Register the input module + //Register the input modules keyboardInputModule = new KeyboardInputModule(); + mouseInputModule = new MouseInputModule(); // Register capabilities FMLJavaModLoadingContext.get().getModEventBus().addListener(CapabilityHandler::registerCapabilities); // attach capabilities diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index dc6f50e1..74d8f880 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -22,7 +22,7 @@ public abstract class InputModule { protected final Map modifierQueue = new HashMap<>(); protected Form lastActivatedForm = null; - public abstract void registerInputData(List formExecutionInputs, Form formToExecute); + public abstract void registerInputData(List formExecutionInputs, Form formToExecute, Condition condition); public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { listener.setupListener(treeData); @@ -68,6 +68,8 @@ public Form getLastActivatedForm() { public abstract void registerListeners(); + public abstract void registerInputs(); + public abstract void unregisterInputs(); public void unregisterModifiers() { @@ -75,4 +77,8 @@ public void unregisterModifiers() { } public abstract void toggleListeners(); + + public abstract void resetKeys(); + + public abstract boolean keyPressed(int key); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java index 54429511..55b0d269 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java @@ -27,7 +27,7 @@ public static void keyBindPress(InputEvent.Key press) { if (press.getKey() == keyToggleTree.getKey().getValue()) { if (press.getAction() == GLFW.GLFW_RELEASE) { Magus.keyboardInputModule.toggleListeners(); - System.out.println("Toggled!"); + Magus.mouseInputModule.toggleListeners(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index c09f315f..454089ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -74,13 +75,16 @@ public KeyboardInputModule() { if(activeForm != null) { ticksSinceActivated++; -// _formInputs.forEach(((condition, form) -> { +// formInputs.forEach(((condition, form) -> { // RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? // "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); // RadixUtil.getLogger().debug("Form: " + form.name()); // })); if(ticksSinceActivated >= tickActivationThreshold) { - LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); + if (lastActivatedForm != null) + LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); + else + LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; activeForm = null; @@ -121,7 +125,7 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute) { + public void registerInputData(List formExecutionInputs, Form formToExecute, Condition formCondition) { //generate condition from InputData. Runnable onSuccess = () -> { if(mc.level != null) { @@ -144,12 +148,11 @@ public void registerInputData(List formExecutionInputs, Form formToEx //reset conditions? // Magus.radixTree.burn(); }; - Condition formCondition = ConditionBuilder.instance() - .fromInputData(formExecutionInputs) - .build(); + if(formCondition != null) { //Register listeners for condition created. formCondition.register(formToExecute.name(), onSuccess, onFailure); + System.out.println("MADE IT KEY " + formCondition); //add condition to InputModule registry so that it can be tracked. formInputs.put(formCondition, formToExecute); } else { @@ -171,14 +174,18 @@ public void unregisterInputs() { formInputs.forEach((condition, form) -> condition.unregister()); } + @Override public void registerInputs() { - formInputs.forEach((condition, form) -> condition.register()); + formInputs.forEach((condition, form) -> { + condition.register(); + }); } @Override public void toggleListeners() { if (!listen) { registerListeners(); + registerInputs(); listen = true; } else { unregisterInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index f079b7af..1d51838c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -52,7 +52,6 @@ public MouseInputModule() { this.mouseListener = mouseEvent -> { int keyPressed = mouseEvent.getButton(); - // if(!KeyboardData.ignore(keyPressed)) { switch (mouseEvent.getAction()) { case InputConstants.PRESS -> { if (!glfwKeysDown.contains(keyPressed)) @@ -87,7 +86,7 @@ public MouseInputModule() { if(activeForm != null) { ticksSinceActivated++; -// _formInputs.forEach(((condition, form) -> { +// formInputs.forEach(((condition, form) -> { // RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? // "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); // RadixUtil.getLogger().debug("Form: " + form.name()); @@ -122,6 +121,7 @@ private void sendModifierData() { public void resetKeys() { glfwKeysDown = new ArrayList<>(); } + public void cleanMCKeys() { // Fixes some weird mouse and other key issues. for (KeyMapping key : Minecraft.getInstance().options.keyMappings) { @@ -133,7 +133,7 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute) { + public void registerInputData(List formExecutionInputs, Form formToExecute, Condition condition) { //generate condition from InputData. Runnable onSuccess = () -> { if(mc.level != null) { @@ -185,18 +185,22 @@ public void unregisterInputs() { } public void registerInputs() { - formInputs.forEach((condition, form) -> condition.register()); + formInputs.forEach((condition, form) -> { + condition.register(); + }); } @Override public void toggleListeners() { if (!listen) { registerListeners(); + registerInputs(); listen = true; - } - else { + System.out.println("Enabled!"); + } else { unregisterInputs(); listen = false; + System.out.println("Disabled!"); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index b3ada3b1..7595c2e6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -33,9 +33,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { } // TODO: Change this to registerListeners() - public void register() { - - } + public void register() {} // Every Condition needs to call this in their constructor public void registerEntry() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 58a25aed..9c149494 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -34,7 +34,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { - if (((KeyboardInputModule) Magus.keyboardInputModule).keyPressed(key)) { + if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { this.started = true; this.currentHolding++; } else { @@ -61,7 +61,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { reset(); } } - if(this.started) { + if (this.started) { if (this.currentTotal >= timeout) { // LogManager.getLogger().info("ONFAILURE RUNNING 2"); this.onFailure.run(); @@ -91,11 +91,6 @@ public int getKey() { return this.key; } -// @Override -// public String toString() { -// return "KeyHoldCondition[ key=" + key + " ]"; -// } - @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index cc2be33c..0f882adc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -66,7 +66,6 @@ public static void registerSkillCategory(SkillCategory skillCategory) { categories.add(skillCategory); } - public static void registerSkills(List registrySkills) { skills.addAll(registrySkills); } @@ -90,11 +89,13 @@ public static void registerForm(Form registryForm) { public static void registerCondition(Condition registryCondition) { conditions.add(registryCondition); } + public static void registerDiscipline(Discipline discipline) { categories.add(discipline); Disciplines.DISCIPLINES.add(discipline); } + //How registering will work: /* All skills will be registered first, along with skill categories. @@ -126,7 +127,6 @@ public static void onRegistryRegister(NewRegistryEvent event) { //Modifiers } - //What to do in the case of missing registry entries for each type of registry. @Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 2412ab5e..610aa83b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -64,77 +64,80 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // Need to test out the condition tree. use left alt/arc > strike (left click). // While this test code will directly use conditions, Skills will reference Forms // that get automatically turned into conditions. - KeyInput initialiser = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 4); - KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0, - 0, 4); +// KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 4); +// KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0, +// 0, 4); +// +// Condition arc = new KeyHoldCondition(initializer.key().getValue(), initializer.held(), 20000, false); +// arc.register("Arc", arc::unregister, () -> { +// }); +// ConditionRegistry.register(arc); - Condition arc = new KeyHoldCondition(initialiser.key().getValue(), initialiser.held(), 20000, false); - arc.register("Arc", arc::unregister, () -> { - }); - ConditionRegistry.register(arc); - - Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); // TODO: Fix the tree to only change immediate children's conditions, // and only register/unregister them in the tree itself - strike.register("Strike", () -> { - strike.unregister(); - Entity eventEntity = event.getEntity(); - - Level level = event.getLevel(); - LightningBolt lightningBolt = EntityType.LIGHTNING_BOLT.create(level); - - if (lightningBolt != null) { - // Set the position of the lightning bolt - lightningBolt.moveTo(eventEntity.xo, eventEntity.yo, eventEntity.zo); - - // Spawn the lightning bolt in the world - level.addFreshEntity(lightningBolt); - MagusNetwork.sendToServer(new ConditionActivatedPacket(strike));//, (ServerPlayer) eventEntity); - - } - - }, () -> { - }); - ConditionRegistry.register(strike); - - - Condition arc2 = new FormCondition(Forms.ARC, -1, Magus.keyboardInputModule); - arc2.register("ARC", () -> { - Magus.sendDebugMsg("ARC FORM TRIGGERED"); - }, () -> {}); - - System.out.println("Test RadixTree"); - RadixTree tree = new RadixTree(); - for (Condition condition : ConditionRegistry.getConditions()) { - List conditionPath = new ArrayList<>(); - conditionPath.add(condition); - conditionPath.add(arc); - tree.insert(conditionPath); - } - for (Condition condition : ConditionRegistry.getConditions()) { - List conditionPath = new ArrayList<>(); - conditionPath.add(condition); - conditionPath.add(strike); - tree.insert(conditionPath); - } - System.out.println("FormConditions List:"); - tree.printAllConditions(); - System.out.println("FormConditions Tree:"); - tree.printAllBranches(); - List conditionPath = new ArrayList<>(); - conditionPath.add(strike); - conditionPath.add(arc); - System.out.println("RadixTree.search passing result:\n" + tree.search(conditionPath)); - conditionPath.clear(); - conditionPath.add(strike); - System.out.println("RadixTree.search failed result:\n" + tree.search(conditionPath)); +// Condition strike = new KeyHoldCondition(left.key().getValue(), left.held(), 2000000, false); +// strike.register("Strike", () -> { +//// strike.unregister(); +// Entity eventEntity = event.getEntity(); +// +// Level level = event.getLevel(); +// LightningBolt lightningBolt = EntityType.LIGHTNING_BOLT.create(level); +// +// if (lightningBolt != null) { +// // Set the position of the lightning bolt +// lightningBolt.moveTo(eventEntity.xo, eventEntity.yo, eventEntity.zo); +// +// // Spawn the lightning bolt in the world +// level.addFreshEntity(lightningBolt); +// MagusNetwork.sendToServer(new ConditionActivatedPacket(strike));//, (ServerPlayer) eventEntity); +// +// } +// +// }, () -> { +// }); +// ConditionRegistry.register(strike); +// +// +// Condition arc2 = new FormCondition(Forms.ARC, -1, Magus.keyboardInputModule); +// arc2.register("ARC", () -> { +// Magus.sendDebugMsg("ARC FORM TRIGGERED"); +// }, () -> {}); +// +// System.out.println("Test RadixTree"); +// RadixTree tree = new RadixTree(); +// for (Condition condition : ConditionRegistry.getConditions()) { +// List conditionPath = new ArrayList<>(); +// conditionPath.add(condition); +// conditionPath.add(arc); +// tree.insert(conditionPath); +// } +// for (Condition condition : ConditionRegistry.getConditions()) { +// List conditionPath = new ArrayList<>(); +// conditionPath.add(condition); +// conditionPath.add(strike); +// tree.insert(conditionPath); +// } +// System.out.println("FormConditions List:"); +// tree.printAllConditions(); +// System.out.println("FormConditions Tree:"); +// tree.printAllBranches(); +// List conditionPath = new ArrayList<>(); +// conditionPath.add(strike); +// conditionPath.add(arc); +// System.out.println("RadixTree.search passing result:\n" + tree.search(conditionPath)); +// conditionPath.clear(); +// conditionPath.add(strike); +// System.out.println("RadixTree.search failed result:\n" + tree.search(conditionPath)); } } else { if (event.getEntity() instanceof Player) { - System.out.println("MADE IT TO CLIENT SIDE?"); - ((KeyboardInputModule) Magus.keyboardInputModule).resetKeys(); - Magus.keyboardInputModule.registerListeners(); AvatarFormRegistry.registerForms(); + Magus.keyboardInputModule.resetKeys(); + Magus.mouseInputModule.resetKeys(); + Magus.keyboardInputModule.registerListeners(); + Magus.mouseInputModule.registerListeners(); + Magus.keyboardInputModule.registerInputs(); + Magus.mouseInputModule.registerInputs(); } } } @@ -150,7 +153,7 @@ public static void tickEvent(TickEvent.ClientTickEvent event) { // Print the mouse coordinates - System.out.println("Mouse X: " + mouseX + ", Mouse Y: " + mouseY); +// System.out.println("Mouse X: " + mouseX + ", Mouse Y: " + mouseY); } @@ -158,7 +161,7 @@ public static void tickEvent(TickEvent.ClientTickEvent event) { public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { if (event.getLevel().isClientSide() && event.getEntity() instanceof Player) { Magus.keyboardInputModule.unregisterInputs(); - ((KeyboardInputModule) Magus.keyboardInputModule).resetKeys(); + Magus.keyboardInputModule.resetKeys(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index d1058699..f1054a67 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -61,7 +61,6 @@ public ConditionBuilder fromInputData(InputData formExecutionInput) { */ public Condition build() { //Creates a copy of the list - List conditions = conditionList.stream().toList(); //Resets the builder diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index a797288b..8d325ddf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -2,10 +2,9 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import net.minecraft.resources.ResourceLocation; +import com.mojang.blaze3d.platform.InputConstants; import java.util.ArrayList; import java.util.HashMap; @@ -32,11 +31,9 @@ public static List getInputsForForm(Form formToModify) { return formTypes.entrySet().stream().filter(form -> form.getValue().name().equals(formToModify.name())).findFirst().get().getKey(); } - public static void registerForm(List inputs, Form form) { - // First, we register the raw input data - Magus.keyboardInputModule.registerInputData(inputs, form); + public static void registerForm(List inputs, Form form, InputConstants.Type inputType) { formTypes.put(inputs, form); - // Then, we register the requisite conditions + // Register the requisite conditions List conditions = new ArrayList<>(); if (formConditions.containsKey(form)) { conditions = formConditions.get(form); @@ -44,6 +41,11 @@ public static void registerForm(List inputs, Form form) { Condition condition = ConditionBuilder.instance().fromInputData(inputs).build(); conditions.add(condition); formConditions.put(form, conditions); + // Register the raw input data + if (inputType == InputConstants.Type.KEYSYM) + Magus.keyboardInputModule.registerInputData(inputs, form, condition); + else + Magus.mouseInputModule.registerInputData(inputs, form, condition); } public static List getConditionsFrom(Form form) { @@ -53,6 +55,6 @@ public static List getConditionsFrom(Form form) { public static void registerForm(InputData input, Form form) { List singleton = new ArrayList<>(); singleton.add(input); - registerForm(singleton, form); + registerForm(singleton, form, InputConstants.Type.KEYSYM); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 66898b94..d1d13627 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,7 +1,5 @@ package com.amuzil.omegasource.magus.skill.test.avatar; -import com.amuzil.omegasource.magus.input.KeyboardInputModule; -import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; @@ -9,11 +7,9 @@ import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; +import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; -import java.util.LinkedList; -import java.util.Map; - public class AvatarFormRegistry { public static void registerForms() { @@ -29,10 +25,10 @@ public static void registerForms() { // TODO: Rather than having "push", "pull", "raise", and "lower" as Forms, // make them Effects using the Force Form, Direction modifier & Target Modifier - FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, InputConstants.Type.MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, InputConstants.Type.MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, InputConstants.Type.KEYSYM); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, InputConstants.Type.MOUSE); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); @@ -47,19 +43,19 @@ public static void registerForms() { // Motion! 7 different movement options. // Left, right, up, down, jump, sneak, sprint. - LinkedList inputs = new LinkedList<>(); - for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { - inputs.clear(); - // TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. - // Also account for the direction modifier. - - KeyInput first, second; - // Problem: The tick delay is being combined with the key press into a simultaneous condition. - // Not good. - first = KeyDataBuilder.createInput(key.getValue(), true, 0, 70, 0); - second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); - inputs.add(KeyDataBuilder.createChainedInput(first, second)); - FormDataRegistry.registerForm(inputs, Forms.STEP); - } +// LinkedList inputs = new LinkedList<>(); +// for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { +// inputs.clear(); +// // TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. +// // Also account for the direction modifier. +// +// KeyInput first, second; +// // Problem: The tick delay is being combined with the key press into a simultaneous condition. +// // Not good. +// first = KeyDataBuilder.createInput(key.getValue(), true, 0, 70, 0); +// second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); +// inputs.add(KeyDataBuilder.createChainedInput(first, second)); +// FormDataRegistry.registerForm(inputs, Forms.STEP); +// } } } From 32f76a40e57d87ba25705b38ff6c6bbc3dfc5cfc Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 15 Sep 2024 20:47:22 -0400 Subject: [PATCH 227/469] builds and runs --- .../omegasource/magus/input/KeyboardInputModule.java | 6 ------ .../omegasource/magus/input/MouseInputModule.java | 12 +++++------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 454089ba..c3c1bb16 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -75,11 +75,6 @@ public KeyboardInputModule() { if(activeForm != null) { ticksSinceActivated++; -// formInputs.forEach(((condition, form) -> { -// RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? -// "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); -// RadixUtil.getLogger().debug("Form: " + form.name()); -// })); if(ticksSinceActivated >= tickActivationThreshold) { if (lastActivatedForm != null) LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); @@ -152,7 +147,6 @@ public void registerInputData(List formExecutionInputs, Form formToEx if(formCondition != null) { //Register listeners for condition created. formCondition.register(formToExecute.name(), onSuccess, onFailure); - System.out.println("MADE IT KEY " + formCondition); //add condition to InputModule registry so that it can be tracked. formInputs.put(formCondition, formToExecute); } else { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index 1d51838c..00c1be5d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -75,7 +75,7 @@ public MouseInputModule() { this.mouseScrollDelta = mouseScrollingEvent.getScrollDelta(); }; - tickEventConsumer = tickEvent -> { + this.tickEventConsumer = tickEvent -> { ticksSinceModifiersSent++; if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { @@ -86,13 +86,11 @@ public MouseInputModule() { if(activeForm != null) { ticksSinceActivated++; -// formInputs.forEach(((condition, form) -> { -// RadixUtil.getLogger().debug(condition instanceof KeyPressCondition ? -// "Condition: " + ((KeyPressCondition) condition).getKey() : "Ignored."); -// RadixUtil.getLogger().debug("Form: " + form.name()); -// })); if(ticksSinceActivated >= tickActivationThreshold) { - LogManager.getLogger().info("FORM ACTIVATED :" + activeForm.name()); + if (lastActivatedForm != null) + LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); + else + LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; activeForm = null; From 17f4ed1da9543f7b591b126f48f1c4c450aae595 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 16 Sep 2024 11:16:47 +1000 Subject: [PATCH 228/469] Cleaning up debugging and the mouse motion condition --- .../minecraft/forge/mouse/MouseMotionCondition.java | 5 +++++ .../com/amuzil/omegasource/magus/server/ServerEvents.java | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java index 8879f216..56db07e7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java @@ -84,6 +84,11 @@ public void setActiveForms(List forms) { @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); + } + + @Override + public void register() { + super.register(); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 610aa83b..04ec2687 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -18,6 +18,7 @@ import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -143,10 +144,10 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } @SubscribeEvent - public static void tickEvent(TickEvent.ClientTickEvent event) { + public static void tickEvent(TickEvent.PlayerTickEvent event) { Minecraft minecraft = Minecraft.getInstance(); - + Player player = event.player; // Get the current mouse X and Y positions double mouseX = minecraft.mouseHandler.xpos(); double mouseY = minecraft.mouseHandler.ypos(); @@ -154,6 +155,9 @@ public static void tickEvent(TickEvent.ClientTickEvent event) { // Print the mouse coordinates // System.out.println("Mouse X: " + mouseX + ", Mouse Y: " + mouseY); + if (player.tickCount % 10 == 0) { + System.out.println("Mouse X : " + mouseX + ", Mouse Y: " + mouseY); + } } From bbdb8d8c17d20a613a6ac864880ca8ad042c292d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 16 Sep 2024 12:02:55 +1000 Subject: [PATCH 229/469] Created mouse motion input data and its requisite module --- .../magus/input/MouseMotionModule.java | 44 +++++++++++++++++++ .../minecraft/forge/key/KeyHoldCondition.java | 1 - .../conditionals/mouse/ChainedMouseInput.java | 15 +++++++ .../skill/conditionals/mouse/MouseInput.java | 2 +- .../conditionals/mouse/MultiMouseInput.java | 16 +++++++ 5 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ChainedMouseInput.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MultiMouseInput.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java new file mode 100644 index 00000000..4489b32e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -0,0 +1,44 @@ +package com.amuzil.omegasource.magus.input; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.forms.Form; + +import java.util.List; + +public class MouseMotionModule extends InputModule { + @Override + public void registerInputData(List formExecutionInputs, Form formToExecute, Condition condition) { + + } + + @Override + public void registerListeners() { + + } + + @Override + public void registerInputs() { + + } + + @Override + public void unregisterInputs() { + + } + + @Override + public void toggleListeners() { + + } + + @Override + public void resetKeys() { + + } + + @Override + public boolean keyPressed(int key) { + return false; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 9c149494..d4b0a4cd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ChainedMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ChainedMouseInput.java new file mode 100644 index 00000000..72e87f6e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ChainedMouseInput.java @@ -0,0 +1,15 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +import java.util.LinkedList; +import java.util.List; + +public record ChainedMouseInput(List mouseInputs) { + + public List getFullPath() { + List path = new LinkedList<>(); + for (MultiMouseInput segment : mouseInputs()) { + path.addAll(segment.mouseInputs()); + } + return path; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java index 5af4115c..64282ab6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java @@ -13,5 +13,5 @@ * * Get a Bézier curve function working. This tracks input segments, then we path through the input segments. */ -public record MouseInput() implements InputData { +public record MouseInput(double x, double y) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MultiMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MultiMouseInput.java new file mode 100644 index 00000000..d3a0270d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MultiMouseInput.java @@ -0,0 +1,16 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +import com.amuzil.omegasource.magus.input.MouseInputModule; + +import java.util.List; + +public record MultiMouseInput(List mouseInputs) { + + public MouseInput start() { + return mouseInputs.get(0); + } + + public MouseInput end() { + return mouseInputs().get(mouseInputs().size() - 1); + } +} From eedd3e117552612dbf9d3e3ceb6ee32aab878aa3 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 16 Sep 2024 12:11:26 +1000 Subject: [PATCH 230/469] Fixed naming, added in a data builder --- .../conditionals/mouse/ChainedMouseInput.java | 15 -------- .../conditionals/mouse/MouseDataBuilder.java | 34 +++++++++++++++++++ ...{MouseInput.java => MouseMotionInput.java} | 2 +- ...MouseInput.java => SegmentMouseInput.java} | 8 ++--- .../conditionals/mouse/ShapeMouseInput.java | 15 ++++++++ 5 files changed, 53 insertions(+), 21 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ChainedMouseInput.java rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/{MouseInput.java => MouseMotionInput.java} (90%) rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/{MultiMouseInput.java => SegmentMouseInput.java} (51%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ChainedMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ChainedMouseInput.java deleted file mode 100644 index 72e87f6e..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ChainedMouseInput.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.mouse; - -import java.util.LinkedList; -import java.util.List; - -public record ChainedMouseInput(List mouseInputs) { - - public List getFullPath() { - List path = new LinkedList<>(); - for (MultiMouseInput segment : mouseInputs()) { - path.addAll(segment.mouseInputs()); - } - return path; - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java index 955f2c26..23a71019 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java @@ -1,5 +1,8 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; +import java.util.LinkedList; +import java.util.List; + public class MouseDataBuilder { /** @@ -26,4 +29,35 @@ public int getDirection() { public static MouseWheelInput createWheelInput(Direction direction, int time) { return new MouseWheelInput(direction, time); } + + public static SegmentMouseInput createSegmentMouseInput(MouseMotionInput... inputs) { + return new SegmentMouseInput(List.of(inputs)); + } + + public static ShapeMouseInput createChainedMouseInput(SegmentMouseInput... inputs) { + return new ShapeMouseInput(new LinkedList<>(List.of(inputs))); + } + + // Utility to create a line from a start to an end with linear interpolation + public static SegmentMouseInput createLine(MouseMotionInput start, MouseMotionInput end, int numPoints) { + List points = new LinkedList<>(); + for (int i = 0; i <= numPoints; i++) { + double t = i / (double) numPoints; + double x = (1 - t) * start.x() + t * end.x(); + double y = (1 - t) * start.y() + t * end.y(); + points.add(new MouseMotionInput(x, y)); + } + return new SegmentMouseInput(points); + } + + // Utility to create a polygon from a list of vertices + public static ShapeMouseInput createPolygon(List vertices) { + List segments = new LinkedList<>(); + for (int i = 0; i < vertices.size(); i++) { + MouseMotionInput start = vertices.get(i); + MouseMotionInput end = vertices.get((i + 1) % vertices.size()); // Wrap around to close the shape + segments.add(createLine(start, end, 10)); // Adjust numPoints as needed + } + return new ShapeMouseInput(segments); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java similarity index 90% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java index 64282ab6..8f906b49 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java @@ -13,5 +13,5 @@ * * Get a Bézier curve function working. This tracks input segments, then we path through the input segments. */ -public record MouseInput(double x, double y) implements InputData { +public record MouseMotionInput(double x, double y) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MultiMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java similarity index 51% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MultiMouseInput.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java index d3a0270d..6c6e1ad9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MultiMouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java @@ -1,16 +1,14 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; -import com.amuzil.omegasource.magus.input.MouseInputModule; - import java.util.List; -public record MultiMouseInput(List mouseInputs) { +public record SegmentMouseInput(List mouseInputs) { - public MouseInput start() { + public MouseMotionInput start() { return mouseInputs.get(0); } - public MouseInput end() { + public MouseMotionInput end() { return mouseInputs().get(mouseInputs().size() - 1); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java new file mode 100644 index 00000000..d13c1705 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java @@ -0,0 +1,15 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +import java.util.LinkedList; +import java.util.List; + +public record ShapeMouseInput(List mouseInputs) { + + public List getFullPath() { + List path = new LinkedList<>(); + for (SegmentMouseInput segment : mouseInputs()) { + path.addAll(segment.mouseInputs()); + } + return path; + } +} From db18ad99c1f84bd70846348be63c1f299f20354e Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 16 Sep 2024 12:23:59 +1000 Subject: [PATCH 231/469] MousePathComparator and some renaming --- .../conditionals/mouse/MouseDataBuilder.java | 36 +++- .../mouse/MouseMotionShapeComparator.java | 158 ------------------ .../mouse/MousePathComparator.java | 156 +++++++++++++++++ ...eMotionInput.java => PointMouseInput.java} | 2 +- .../conditionals/mouse/SegmentMouseInput.java | 6 +- .../conditionals/mouse/ShapeMouseInput.java | 4 +- 6 files changed, 191 insertions(+), 171 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/{MouseMotionInput.java => PointMouseInput.java} (90%) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java index 23a71019..38dcbaa7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java @@ -30,7 +30,7 @@ public static MouseWheelInput createWheelInput(Direction direction, int time) { return new MouseWheelInput(direction, time); } - public static SegmentMouseInput createSegmentMouseInput(MouseMotionInput... inputs) { + public static SegmentMouseInput createSegmentMouseInput(PointMouseInput... inputs) { return new SegmentMouseInput(List.of(inputs)); } @@ -39,25 +39,47 @@ public static ShapeMouseInput createChainedMouseInput(SegmentMouseInput... input } // Utility to create a line from a start to an end with linear interpolation - public static SegmentMouseInput createLine(MouseMotionInput start, MouseMotionInput end, int numPoints) { - List points = new LinkedList<>(); + public static SegmentMouseInput createLine(PointMouseInput start, PointMouseInput end, int numPoints) { + List points = new LinkedList<>(); for (int i = 0; i <= numPoints; i++) { double t = i / (double) numPoints; double x = (1 - t) * start.x() + t * end.x(); double y = (1 - t) * start.y() + t * end.y(); - points.add(new MouseMotionInput(x, y)); + points.add(new PointMouseInput(x, y)); } return new SegmentMouseInput(points); } // Utility to create a polygon from a list of vertices - public static ShapeMouseInput createPolygon(List vertices) { + public static ShapeMouseInput createPolygon(List vertices) { List segments = new LinkedList<>(); for (int i = 0; i < vertices.size(); i++) { - MouseMotionInput start = vertices.get(i); - MouseMotionInput end = vertices.get((i + 1) % vertices.size()); // Wrap around to close the shape + PointMouseInput start = vertices.get(i); + PointMouseInput end = vertices.get((i + 1) % vertices.size()); // Wrap around to close the shape segments.add(createLine(start, end, 10)); // Adjust numPoints as needed } return new ShapeMouseInput(segments); } + + // Create a polygon with interpolated points between vertices based on distanceBetweenPoints + public static ShapeMouseInput createPolygonWithInterpolation(List vertices, double distanceBetweenPoints) { + List segments = new LinkedList<>(); + + for (int i = 0; i < vertices.size(); i++) { + PointMouseInput start = vertices.get(i); + PointMouseInput end = vertices.get((i + 1) % vertices.size()); // Wrap around to close the shape + + // Calculate distance between start and end + double dx = end.x() - start.x(); + double dy = end.y() - start.y(); + double segmentLength = Math.hypot(dx, dy); + + // Calculate number of points based on distanceBetweenPoints + int numPoints = Math.max(2, (int) (segmentLength / distanceBetweenPoints)); + + // Create line segment with interpolated points + segments.add(createLine(start, end, numPoints)); + } + return new ShapeMouseInput(segments); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java deleted file mode 100644 index 5ef3c205..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionShapeComparator.java +++ /dev/null @@ -1,158 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.mouse; - -import java.awt.geom.Point2D; -import java.util.ArrayList; -import java.util.List; - -public class MouseMotionShapeComparator { - - private final double errorMargin; - - public MouseMotionShapeComparator(double errorMargin) { - this.errorMargin = errorMargin; - } - - // Added compareToPath method - public boolean compareToPath(List path, List targetShape) { - // Check the size to avoid out-of-bounds errors; you may want to add more sophisticated path matching logic. - int minSize = Math.min(path.size(), targetShape.size()); - for (int i = 0; i < minSize; i++) { - Point2D pathPoint = path.get(i); - Point2D shapePoint = targetShape.get(i); - - // Check if the path points are within the acceptable error margin - if (pathPoint.distance(shapePoint) > errorMargin) { - return false; - } - } - return true; - } - - public boolean compareToLine(List path, Point2D startPoint, Point2D endPoint) { - List line = generateLine(startPoint, endPoint); - return comparePaths(path, line); - } - - public boolean compareToSquare(List path, Point2D center, double sideLength, double rotation) { - List square = generatePolygon(center, sideLength, 4, rotation); - return comparePaths(path, square); - } - - public boolean compareToCircle(List path, Point2D center, double radius) { - List circle = generateCircle(center, radius); - return comparePaths(path, circle); - } - - public boolean compareToPolygon(List path, Point2D center, double sideLength, int sides, double rotation) { - List polygon = generatePolygon(center, sideLength, sides, rotation); - return comparePaths(path, polygon); - } - - public boolean compareToStar(List path, Point2D center, double outerRadius, double innerRadius, int points, double rotation) { - List star = generateStar(center, outerRadius, innerRadius, points, rotation); - return comparePaths(path, star); - } - - public boolean compareToDiamond(List path, Point2D center, double width, double height, double rotation) { - List diamond = generateDiamond(center, width, height, rotation); - return comparePaths(path, diamond); - } - - public boolean compareToSpiral(List path, Point2D center, double initialRadius, double turns, double spacing, double rotation) { - List spiral = generateSpiral(center, initialRadius, turns, spacing, rotation); - return comparePaths(path, spiral); - } - - private boolean comparePaths(List path, List shape) { - if (path.size() != shape.size()) return false; - - for (int i = 0; i < path.size(); i++) { - Point2D pathPoint = path.get(i); - Point2D shapePoint = shape.get(i); - - if (pathPoint.distance(shapePoint) > errorMargin) { - return false; - } - } - return true; - } - - private List generateLine(Point2D startPoint, Point2D endPoint) { - List line = new ArrayList<>(); - line.add(startPoint); - line.add(endPoint); - return line; - } - - private List generateCircle(Point2D center, double radius) { - List circle = new ArrayList<>(); - int numPoints = 360; - - for (int i = 0; i < numPoints; i++) { - double angle = 2 * Math.PI * i / numPoints; - double x = center.getX() + radius * Math.cos(angle); - double y = center.getY() + radius * Math.sin(angle); - circle.add(new Point2D.Double(x, y)); - } - return circle; - } - - private double getAngle(int i, double increment, double rotation) { - return i * increment + Math.toRadians(rotation); - } - - private List generatePolygon(Point2D center, double sideLength, int sides, double rotation) { - List polygon = new ArrayList<>(); - double angleIncrement = 2 * Math.PI / sides; - - for (int i = 0; i < sides; i++) { - double angle = getAngle(i, angleIncrement, rotation); - double x = center.getX() + sideLength * Math.cos(angle); - double y = center.getY() + sideLength * Math.sin(angle); - polygon.add(new Point2D.Double(x, y)); - } - return polygon; - } - - private List generateStar(Point2D center, double outerRadius, double innerRadius, int points, double rotation) { - List star = new ArrayList<>(); - double angleIncrement = Math.PI / points; - - for (int i = 0; i < 2 * points; i++) { - double radius = (i % 2 == 0) ? outerRadius : innerRadius; - double angle = getAngle(i, angleIncrement, rotation); - double x = center.getX() + radius * Math.cos(angle); - double y = center.getY() + radius * Math.sin(angle); - star.add(new Point2D.Double(x, y)); - } - return star; - } - - private List generateDiamond(Point2D center, double width, double height, double rotation) { - List diamond = new ArrayList<>(); - double[] angles = {45, 135, 225, 315}; - - for (double angle : angles) { - double rad = Math.toRadians(angle + rotation); - double x = center.getX() + (width / 2) * Math.cos(rad); - double y = center.getY() + (height / 2) * Math.sin(rad); - diamond.add(new Point2D.Double(x, y)); - } - return diamond; - } - - private List generateSpiral(Point2D center, double initialRadius, double turns, double spacing, double rotation) { - List spiral = new ArrayList<>(); - int numPoints = (int) (turns * 360); // Points per full circle turn - - for (int i = 0; i < numPoints; i++) { - double angle = 2 * Math.PI * i / 360.0 + Math.toRadians(rotation); - double radius = initialRadius + spacing * (i / 360.0); - double x = center.getX() + radius * Math.cos(angle); - double y = center.getY() + radius * Math.sin(angle); - spiral.add(new Point2D.Double(x, y)); - } - - return spiral; - } -} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java new file mode 100644 index 00000000..2430f0e3 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java @@ -0,0 +1,156 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +import java.util.ArrayList; +import java.util.List; + +public class MousePathComparator { + + // Generate a circular shape centered at the player's mouse position with rotation and scaling + public static ShapeMouseInput generateCircle(PointMouseInput center, double scale, double rotationDegrees, double distanceBetweenPoints) { + List points = new ArrayList<>(); + + // Calculate the number of points based on circumference and desired distance between points + double circumference = 2 * Math.PI * scale; + int numPoints = Math.max(10, (int) (circumference / distanceBetweenPoints)); + + // Convert rotation to radians + double rotationRadians = Math.toRadians(rotationDegrees); + + for (int i = 0; i < numPoints; i++) { + double angle = 2 * Math.PI * i / numPoints; + double x = center.x() + scale * Math.cos(angle + rotationRadians); + double y = center.y() - scale * Math.sin(angle + rotationRadians); // Flip y-axis + points.add(new PointMouseInput(x, y)); + } + SegmentMouseInput segmentInput = new SegmentMouseInput(points); + return new ShapeMouseInput(List.of(segmentInput)); + } + + // Generate a straight line starting from the player's mouse position with rotation and scaling + public static ShapeMouseInput generateLine(PointMouseInput start, double scale, double rotationDegrees, double distanceBetweenPoints) { + List points = new ArrayList<>(); + + // Calculate the number of points based on length and desired distance between points + int numPoints = Math.max(2, (int) (scale / distanceBetweenPoints)); + + // Convert rotation to radians + double angleRadians = Math.toRadians(rotationDegrees); + double endX = start.x() + scale * Math.cos(angleRadians); + double endY = start.y() - scale * Math.sin(angleRadians); // Flip y-axis + + for (int i = 0; i <= numPoints; i++) { + double t = i / (double) numPoints; + double x = start.x() + t * (endX - start.x()); + double y = start.y() + t * (endY - start.y()); + points.add(new PointMouseInput(x, y)); + } + SegmentMouseInput line = new SegmentMouseInput(points); + return new ShapeMouseInput(List.of(line)); + } + + // Generate a polygon centered at the player's mouse position with rotation and scaling + public static ShapeMouseInput generatePolygon(PointMouseInput center, int sides, double scale, double rotationDegrees, double distanceBetweenPoints, boolean isDiamond) { + List vertices = new ArrayList<>(); + + double angleIncrement = 2 * Math.PI / sides; + double rotationRadians = Math.toRadians(rotationDegrees); + + // For diamond, offset the rotation by 45 degrees + if (isDiamond) { + rotationRadians += Math.toRadians(45); + } + + for (int i = 0; i < sides; i++) { + double angle = angleIncrement * i + rotationRadians; + double x = center.x() + scale * Math.cos(angle); + double y = center.y() - scale * Math.sin(angle); // Flip y-axis + vertices.add(new PointMouseInput(x, y)); + } + + // Interpolate points between vertices based on distanceBetweenPoints + return MouseDataBuilder.createPolygonWithInterpolation(vertices, distanceBetweenPoints); + } + + // Generate a star shape centered at the player's mouse position with rotation and scaling + public static ShapeMouseInput generateStar(PointMouseInput center, int pointsCount, double scale, double rotationDegrees, double distanceBetweenPoints) { + List vertices = new ArrayList<>(); + double angleIncrement = Math.PI / pointsCount; + double rotationRadians = Math.toRadians(rotationDegrees); + + // Define outer and inner radii based on scale + double outerRadius = scale; + double innerRadius = scale / 2; // Adjust the ratio as needed + + for (int i = 0; i < pointsCount * 2; i++) { + double radius = (i % 2 == 0) ? outerRadius : innerRadius; + double angle = angleIncrement * i + rotationRadians; + double x = center.x() + radius * Math.cos(angle); + double y = center.y() - radius * Math.sin(angle); // Flip y-axis + vertices.add(new PointMouseInput(x, y)); + } + + // Interpolate points between vertices based on distanceBetweenPoints + return MouseDataBuilder.createPolygonWithInterpolation(vertices, distanceBetweenPoints); + } + + // Spiral!!! + public static ShapeMouseInput generateSpiral(PointMouseInput center, int turns, double initialRadius, double finalRadius, double rotationDegrees, double distanceBetweenPoints) { + List points = new ArrayList<>(); + + double rotationRadians = Math.toRadians(rotationDegrees); + double totalAngle = 2 * Math.PI * turns; + double radiusIncrement = (finalRadius - initialRadius) / (totalAngle / distanceBetweenPoints); + double angleIncrement = distanceBetweenPoints / initialRadius; + + double angle = 0; + double radius = initialRadius; + + while (angle <= totalAngle) { + double x = center.x() + radius * Math.cos(angle + rotationRadians); + double y = center.y() - radius * Math.sin(angle + rotationRadians); // Flip y-axis + points.add(new PointMouseInput(x, y)); + + angle += angleIncrement; + radius += radiusIncrement * angleIncrement; + } + + SegmentMouseInput segmentInput = new SegmentMouseInput(points); + return new ShapeMouseInput(List.of(segmentInput)); + } + + // Compare two mouse inputs for similarity within an error margin + public static boolean compare(ShapeMouseInput playerInput, ShapeMouseInput targetShape, double errorMargin) { + // Implement a proper comparison algorithm here + // Placeholder implementation: Check if the average distance between corresponding points is within errorMargin + + List playerPoints = playerInput.getFullPath(); + List targetPoints = targetShape.getFullPath(); + + if (playerPoints.size() != targetPoints.size()) { + // Normalize the number of points + playerPoints = normalizePoints(playerPoints, targetPoints.size()); + } + + double totalDistance = 0; + for (int i = 0; i < targetPoints.size(); i++) { + PointMouseInput playerPoint = playerPoints.get(i); + PointMouseInput targetPoint = targetPoints.get(i); + double distance = Math.hypot(playerPoint.x() - targetPoint.x(), playerPoint.y() - targetPoint.y()); + totalDistance += distance; + } + + double averageDistance = totalDistance / targetPoints.size(); + return averageDistance <= errorMargin; + } + + // Helper method to normalize the number of points + private static List normalizePoints(List points, int desiredSize) { + List normalizedPoints = new ArrayList<>(); + double step = (points.size() - 1) / (double) (desiredSize - 1); + for (int i = 0; i < desiredSize; i++) { + int index = (int) Math.round(i * step); + normalizedPoints.add(points.get(Math.min(index, points.size() - 1))); + } + return normalizedPoints; + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java similarity index 90% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java index 8f906b49..32c56e33 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java @@ -13,5 +13,5 @@ * * Get a Bézier curve function working. This tracks input segments, then we path through the input segments. */ -public record MouseMotionInput(double x, double y) implements InputData { +public record PointMouseInput(double x, double y) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java index 6c6e1ad9..b2e601d6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java @@ -2,13 +2,13 @@ import java.util.List; -public record SegmentMouseInput(List mouseInputs) { +public record SegmentMouseInput(List mouseInputs) { - public MouseMotionInput start() { + public PointMouseInput start() { return mouseInputs.get(0); } - public MouseMotionInput end() { + public PointMouseInput end() { return mouseInputs().get(mouseInputs().size() - 1); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java index d13c1705..836691fc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java @@ -5,8 +5,8 @@ public record ShapeMouseInput(List mouseInputs) { - public List getFullPath() { - List path = new LinkedList<>(); + public List getFullPath() { + List path = new LinkedList<>(); for (SegmentMouseInput segment : mouseInputs()) { path.addAll(segment.mouseInputs()); } From 5eaae1a31da8537a39ab91327e155c922325ea08 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 16 Sep 2024 12:37:45 +1000 Subject: [PATCH 232/469] more efficient path comparison algorithm (o1 PREVIEW RAHHH) --- .../mouse/MousePathComparator.java | 137 ++++++++++++++++-- 1 file changed, 121 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java index 2430f0e3..ee4e508d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java @@ -118,29 +118,134 @@ public static ShapeMouseInput generateSpiral(PointMouseInput center, int turns, return new ShapeMouseInput(List.of(segmentInput)); } - // Compare two mouse inputs for similarity within an error margin public static boolean compare(ShapeMouseInput playerInput, ShapeMouseInput targetShape, double errorMargin) { - // Implement a proper comparison algorithm here - // Placeholder implementation: Check if the average distance between corresponding points is within errorMargin + // Resample the player's input to have a fixed number of points + List resampledPlayerPoints = resamplePoints(playerInput.getFullPath(), 64); - List playerPoints = playerInput.getFullPath(); - List targetPoints = targetShape.getFullPath(); + // Rotate to align with the target shape + List rotatedPlayerPoints = rotateToZero(resampledPlayerPoints); - if (playerPoints.size() != targetPoints.size()) { - // Normalize the number of points - playerPoints = normalizePoints(playerPoints, targetPoints.size()); + // Scale to a reference square + List scaledPlayerPoints = scaleToSquare(rotatedPlayerPoints, 250); + + // Translate to origin + List normalizedPlayerPoints = translateToOrigin(scaledPlayerPoints); + + // Prepare the target shape in the same way + List resampledTargetPoints = resamplePoints(targetShape.getFullPath(), 64); + List rotatedTargetPoints = rotateToZero(resampledTargetPoints); + List scaledTargetPoints = scaleToSquare(rotatedTargetPoints, 250); + List normalizedTargetPoints = translateToOrigin(scaledTargetPoints); + + // Compute the path distance between the two point paths + double distance = pathDistance(normalizedPlayerPoints, normalizedTargetPoints); + + return distance <= errorMargin; + } + + // Resample the points to a fixed number + private static List resamplePoints(List points, int n) { + double pathLength = getPathLength(points); + double interval = pathLength / (n - 1); + double D = 0.0; + List newPoints = new ArrayList<>(); + newPoints.add(points.get(0)); + + for (int i = 1; i < points.size(); i++) { + double d = euclideanDistance(points.get(i - 1), points.get(i)); + if ((D + d) >= interval) { + double t = (interval - D) / d; + double x = points.get(i - 1).x() + t * (points.get(i).x() - points.get(i - 1).x()); + double y = points.get(i - 1).y() + t * (points.get(i).y() - points.get(i - 1).y()); + PointMouseInput newPoint = new PointMouseInput(x, y); + newPoints.add(newPoint); + points.add(i, newPoint); + D = 0.0; + } else { + D += d; + } + } + if (newPoints.size() == n - 1) { + newPoints.add(points.get(points.size() - 1)); + } + return newPoints; + } + + // Rotate the points so that the indicative angle is at zero + private static List rotateToZero(List points) { + PointMouseInput centroid = getCentroid(points); + double theta = Math.atan2(points.get(0).y() - centroid.y(), points.get(0).x() - centroid.x()); + return rotateBy(points, -theta); + } + + private static List rotateBy(List points, double angle) { + PointMouseInput centroid = getCentroid(points); + List newPoints = new ArrayList<>(); + for (PointMouseInput point : points) { + double x = (point.x() - centroid.x()) * Math.cos(angle) - (point.y() - centroid.y()) * Math.sin(angle) + centroid.x(); + double y = (point.x() - centroid.x()) * Math.sin(angle) + (point.y() - centroid.y()) * Math.cos(angle) + centroid.y(); + newPoints.add(new PointMouseInput(x, y)); + } + return newPoints; + } + + // Scale the points to a reference square + private static List scaleToSquare(List points, double size) { + double minX = points.stream().mapToDouble(PointMouseInput::x).min().orElse(0); + double maxX = points.stream().mapToDouble(PointMouseInput::x).max().orElse(0); + double minY = points.stream().mapToDouble(PointMouseInput::y).min().orElse(0); + double maxY = points.stream().mapToDouble(PointMouseInput::y).max().orElse(0); + + double width = maxX - minX; + double height = maxY - minY; + + List newPoints = new ArrayList<>(); + for (PointMouseInput point : points) { + double x = (point.x() - minX) * (size / width); + double y = (point.y() - minY) * (size / height); + newPoints.add(new PointMouseInput(x, y)); + } + return newPoints; + } + + // Translate the points so that the centroid is at the origin + private static List translateToOrigin(List points) { + PointMouseInput centroid = getCentroid(points); + List newPoints = new ArrayList<>(); + for (PointMouseInput point : points) { + double x = point.x() - centroid.x(); + double y = point.y() - centroid.y(); + newPoints.add(new PointMouseInput(x, y)); } + return newPoints; + } - double totalDistance = 0; - for (int i = 0; i < targetPoints.size(); i++) { - PointMouseInput playerPoint = playerPoints.get(i); - PointMouseInput targetPoint = targetPoints.get(i); - double distance = Math.hypot(playerPoint.x() - targetPoint.x(), playerPoint.y() - targetPoint.y()); - totalDistance += distance; + // Calculate the path distance between two point paths + private static double pathDistance(List path1, List path2) { + double distance = 0.0; + for (int i = 0; i < path1.size(); i++) { + distance += euclideanDistance(path1.get(i), path2.get(i)); } + return distance / path1.size(); + } + + // Helper methods + private static double euclideanDistance(PointMouseInput p1, PointMouseInput p2) { + return Math.hypot(p1.x() - p2.x(), p1.y() - p2.y()); + } + + private static double getPathLength(List points) { + double length = 0.0; + for (int i = 1; i < points.size(); i++) { + length += euclideanDistance(points.get(i - 1), points.get(i)); + } + return length; + } - double averageDistance = totalDistance / targetPoints.size(); - return averageDistance <= errorMargin; + private static PointMouseInput getCentroid(List points) { + double xSum = points.stream().mapToDouble(PointMouseInput::x).sum(); + double ySum = points.stream().mapToDouble(PointMouseInput::y).sum(); + return new PointMouseInput(xSum / points.size(), ySum / points.size()); } // Helper method to normalize the number of points From 4de8d1b7d36eb5c97c3c3ef9a04cc9ec819265aa Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 15 Sep 2024 23:25:34 -0400 Subject: [PATCH 233/469] uncomment steps Form --- .../skill/test/avatar/AvatarFormRegistry.java | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index d1d13627..201f2103 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,15 +1,21 @@ package com.amuzil.omegasource.magus.skill.test.avatar; +import com.amuzil.omegasource.magus.input.KeyboardInputModule; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseDataBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; +import java.util.LinkedList; +import java.util.Map; + public class AvatarFormRegistry { public static void registerForms() { @@ -29,6 +35,7 @@ public static void registerForms() { FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, InputConstants.Type.MOUSE); FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, InputConstants.Type.KEYSYM); FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, InputConstants.Type.MOUSE); + // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); @@ -43,19 +50,19 @@ public static void registerForms() { // Motion! 7 different movement options. // Left, right, up, down, jump, sneak, sprint. -// LinkedList inputs = new LinkedList<>(); -// for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { -// inputs.clear(); -// // TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. -// // Also account for the direction modifier. -// -// KeyInput first, second; -// // Problem: The tick delay is being combined with the key press into a simultaneous condition. -// // Not good. -// first = KeyDataBuilder.createInput(key.getValue(), true, 0, 70, 0); -// second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); -// inputs.add(KeyDataBuilder.createChainedInput(first, second)); -// FormDataRegistry.registerForm(inputs, Forms.STEP); -// } + LinkedList inputs = new LinkedList<>(); + for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { + inputs.clear(); + // TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. + // Also account for the direction modifier. + + KeyInput first, second; + // Problem: The tick delay is being combined with the key press into a simultaneous condition. + // Not good. + first = KeyDataBuilder.createInput(key.getValue(), true, 0, 70, 0); + second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); + inputs.add(KeyDataBuilder.createChainedInput(first, second)); + FormDataRegistry.registerForm(inputs, Forms.STEP, InputConstants.Type.KEYSYM); + } } } From f1ab24079bfc6680fb116e49d83d64b9d94ba8d0 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 15 Sep 2024 23:44:26 -0400 Subject: [PATCH 234/469] started mouse motion recognition --- .../magus/server/ServerEvents.java | 2 - .../conditionals/mouse/SegmentMouseInput.java | 48 +++++++++++++++++++ .../skill/test/avatar/AvatarFormRegistry.java | 1 - 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 04ec2687..e77a423e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -146,13 +146,11 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @SubscribeEvent public static void tickEvent(TickEvent.PlayerTickEvent event) { Minecraft minecraft = Minecraft.getInstance(); - Player player = event.player; // Get the current mouse X and Y positions double mouseX = minecraft.mouseHandler.xpos(); double mouseY = minecraft.mouseHandler.ypos(); - // Print the mouse coordinates // System.out.println("Mouse X: " + mouseX + ", Mouse Y: " + mouseY); if (player.tickCount % 10 == 0) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java index b2e601d6..f2e6a953 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java @@ -1,5 +1,8 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; +import net.minecraft.world.phys.Vec3; +import org.joml.Vector2d; + import java.util.List; public record SegmentMouseInput(List mouseInputs) { @@ -11,4 +14,49 @@ public PointMouseInput start() { public PointMouseInput end() { return mouseInputs().get(mouseInputs().size() - 1); } + + public String getDirection() { + // TODO - Test this logic + PointMouseInput centroid = start(); + Vector2d mouseDirection = getVector2d(mouseInputs); + String direction = ""; + // Create the vector buckets + double degree_span = 45.0D; + Vector2d up = new Vector2d(centroid.x(), centroid.y()); + Vector2d down = new Vector2d(centroid.x(), -centroid.y()); + Vector2d left = new Vector2d(-centroid.x(), centroid.y()); + Vector2d right = new Vector2d(centroid.x(), centroid.y()); + + if (getAngle2D(up, mouseDirection) <= degree_span) { + direction = "up"; + } else if (getAngle2D(down, mouseDirection) <= degree_span) { + direction = "down"; + } else if (getAngle2D(right, mouseDirection) <= degree_span) { + direction = "right"; + } else if (getAngle2D(left, mouseDirection) <= degree_span) { + direction = "left"; + } + return direction; + } + + public Vector2d getVector2d(List mouseInputs) { + PointMouseInput centroid = start(); + PointMouseInput last = start(); + int radius = 250; + Vector2d v1 = new Vector2d(centroid.x(), centroid.y()); + Vector2d v2 = new Vector2d(last.x(), last.y()); + return v2.sub(v1).normalize(); + } + + // Get angle between two 2D vectors and return in ° (degrees) + public static double getAngle2D(Vector2d v1, Vector2d v2) { + double dotProduct = v1.mul((1), (0)).dot(v2.mul((1), (0))); + double radians = dotProduct / (getMagnitude2D(v1) * getMagnitude2D(v2)); + return Math.toDegrees(Math.acos(radians)); + } + + // Get magnitude/length of 2D vector v + public static double getMagnitude2D(Vector2d v) { + return Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2)); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 201f2103..39b32606 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -6,7 +6,6 @@ import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseDataBuilder; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; From 49465950071dbc7c5ecaaa2ccc1dbeee4590d3e2 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 16 Sep 2024 18:14:57 -0400 Subject: [PATCH 235/469] suppress compile time error --- .../java/com/amuzil/omegasource/magus/radix/NodeBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java index 02f5227f..08568bc4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/NodeBuilder.java @@ -56,7 +56,8 @@ public NodeBuilder addChild(Condition condition, Node child) { } } - public NodeBuilder addChildren(Pair... children) { + @SafeVarargs // Suppressing unsafe variable number of arguments + public final NodeBuilder addChildren(Pair... children) { if (type.canHaveChildren) { for (Pair child : children) addChild(child.getFirst(), child.getSecond()); From 207fd043198a5f2b2c430d853a94634f572dc067 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 16 Sep 2024 22:23:13 -0400 Subject: [PATCH 236/469] mouse motion debugging setup --- .../magus/input/KeyboardInputModule.java | 8 ++-- .../magus/input/MouseInputModule.java | 8 ++-- .../minecraft/forge/key/KeyHoldCondition.java | 20 +++++++++ .../forge/mouse/MouseMotionCondition.java | 6 +-- .../magus/server/ServerEvents.java | 6 +-- .../conditionals/mouse/MouseDataBuilder.java | 5 ++- .../mouse/MousePathComparator.java | 41 +++++++++++++----- .../conditionals/mouse/PointMouseInput.java | 3 +- .../conditionals/mouse/SegmentMouseInput.java | 43 ++++++++++--------- .../omegasource/magus/skill/forms/Form.java | 4 ++ 10 files changed, 98 insertions(+), 46 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index c3c1bb16..f0364bc2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -25,7 +25,7 @@ public class KeyboardInputModule extends InputModule { private static final Map movementKeys = new HashMap<>(); private final Consumer keyboardListener; private final Consumer tickEventConsumer; - private Form activeForm = null; + private Form activeForm = new Form(); private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; @@ -73,7 +73,7 @@ public KeyboardInputModule() { //cleanMCKeys(); - if(activeForm != null) { + if(activeForm.name() != null) { ticksSinceActivated++; if(ticksSinceActivated >= tickActivationThreshold) { if (lastActivatedForm != null) @@ -82,7 +82,7 @@ public KeyboardInputModule() { LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; - activeForm = null; + activeForm = new Form(); ticksSinceActivated = 0; } } @@ -139,7 +139,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx //Reset condition }; Runnable onFailure = () -> { - activeForm = null; + activeForm = new Form(); //reset conditions? // Magus.radixTree.burn(); }; diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index 00c1be5d..224c40fe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -30,7 +30,7 @@ public class MouseInputModule extends InputModule { private double mouseScrollDelta; private final Consumer mouseListener; private final Consumer mouseScrollListener; - private Form activeForm = null; + private Form activeForm = new Form(); private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; @@ -84,7 +84,7 @@ public MouseInputModule() { //cleanMCKeys(); - if(activeForm != null) { + if(activeForm.name() != null) { ticksSinceActivated++; if(ticksSinceActivated >= tickActivationThreshold) { if (lastActivatedForm != null) @@ -93,7 +93,7 @@ public MouseInputModule() { LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; - activeForm = null; + activeForm = new Form(); ticksSinceActivated = 0; } } @@ -150,7 +150,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx //Reset condition }; Runnable onFailure = () -> { - activeForm = null; + activeForm = new Form(); //reset conditions? }; Condition formCondition = ConditionBuilder.instance() diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index d4b0a4cd..aa31744b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -3,12 +3,17 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.PointMouseInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.SegmentMouseInput; import net.minecraft.client.Minecraft; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.ClientTickEvent; import net.minecraftforge.eventbus.api.EventPriority; +import java.util.ArrayList; +import java.util.List; import java.util.function.Consumer; public class KeyHoldCondition extends Condition { @@ -21,6 +26,7 @@ public class KeyHoldCondition extends Condition { // False by default. private final boolean release; private boolean started = false; + public List mouseInputs = new ArrayList<>(); public KeyHoldCondition(int key, int duration, int timeout, boolean release) { RadixUtil.assertTrue(duration >= 1, "duration must be >= 1"); @@ -36,7 +42,21 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { this.started = true; this.currentHolding++; + Minecraft mci = Minecraft.getInstance(); + if (mci.player != null) { + double x = mci.mouseHandler.xpos(); + double y = mci.mouseHandler.ypos(); + Vec3 lookAngle = mci.player.getLookAngle(); + PointMouseInput pointMouseInput = new PointMouseInput(x, y, lookAngle); + mouseInputs.add(pointMouseInput); + } } else { + if (!mouseInputs.isEmpty()) { + List inputs = new ArrayList<>(mouseInputs); + SegmentMouseInput segment = new SegmentMouseInput(inputs); + System.out.println("SEGMENT DIRECTION: " + segment.getDirection() + " SLASH!"); + mouseInputs.clear(); + } if (pressed(this.currentHolding, duration)) { // If the Condition requires the key being released.... if (release) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java index 56db07e7..7503423d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.mouse; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionShapeComparator; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePathComparator; import com.amuzil.omegasource.magus.skill.forms.Form; import net.minecraft.client.Minecraft; import net.minecraftforge.common.MinecraftForge; @@ -15,7 +15,7 @@ public class MouseMotionCondition extends Condition { private final Consumer clientTickListener; - private final MouseMotionShapeComparator shapeComparator; + private final MousePathComparator shapeComparator; private final List mousePath; private boolean tracking; private final double speedThreshold; @@ -25,7 +25,7 @@ public class MouseMotionCondition extends Condition { public MouseMotionCondition(double speedThreshold, double errorMargin, int key, Form requiredForm) { this.mousePath = new ArrayList<>(); - this.shapeComparator = new MouseMotionShapeComparator(errorMargin); + this.shapeComparator = new MousePathComparator(errorMargin); this.speedThreshold = speedThreshold; this.key = key; this.requiredForm = requiredForm; diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index e77a423e..8ebb15f0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -153,9 +153,9 @@ public static void tickEvent(TickEvent.PlayerTickEvent event) { // Print the mouse coordinates // System.out.println("Mouse X: " + mouseX + ", Mouse Y: " + mouseY); - if (player.tickCount % 10 == 0) { - System.out.println("Mouse X : " + mouseX + ", Mouse Y: " + mouseY); - } +// if (player.tickCount % 10 == 0) { +// System.out.println("Mouse X : " + mouseX + ", Mouse Y: " + mouseY); +// } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java index 38dcbaa7..b9a70f7f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; +import net.minecraft.client.Minecraft; + import java.util.LinkedList; import java.util.List; @@ -45,7 +47,8 @@ public static SegmentMouseInput createLine(PointMouseInput start, PointMouseInpu double t = i / (double) numPoints; double x = (1 - t) * start.x() + t * end.x(); double y = (1 - t) * start.y() + t * end.y(); - points.add(new PointMouseInput(x, y)); + if(Minecraft.getInstance().player != null) + points.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); } return new SegmentMouseInput(points); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java index ee4e508d..aa8d93ce 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java @@ -1,10 +1,16 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; +import net.minecraft.client.Minecraft; + +import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; public class MousePathComparator { + public MousePathComparator(double errorMargin) { + } + // Generate a circular shape centered at the player's mouse position with rotation and scaling public static ShapeMouseInput generateCircle(PointMouseInput center, double scale, double rotationDegrees, double distanceBetweenPoints) { List points = new ArrayList<>(); @@ -20,7 +26,8 @@ public static ShapeMouseInput generateCircle(PointMouseInput center, double scal double angle = 2 * Math.PI * i / numPoints; double x = center.x() + scale * Math.cos(angle + rotationRadians); double y = center.y() - scale * Math.sin(angle + rotationRadians); // Flip y-axis - points.add(new PointMouseInput(x, y)); + if(Minecraft.getInstance().player != null) + points.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); } SegmentMouseInput segmentInput = new SegmentMouseInput(points); return new ShapeMouseInput(List.of(segmentInput)); @@ -42,7 +49,8 @@ public static ShapeMouseInput generateLine(PointMouseInput start, double scale, double t = i / (double) numPoints; double x = start.x() + t * (endX - start.x()); double y = start.y() + t * (endY - start.y()); - points.add(new PointMouseInput(x, y)); + if (Minecraft.getInstance().player != null) + points.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); } SegmentMouseInput line = new SegmentMouseInput(points); return new ShapeMouseInput(List.of(line)); @@ -64,7 +72,8 @@ public static ShapeMouseInput generatePolygon(PointMouseInput center, int sides, double angle = angleIncrement * i + rotationRadians; double x = center.x() + scale * Math.cos(angle); double y = center.y() - scale * Math.sin(angle); // Flip y-axis - vertices.add(new PointMouseInput(x, y)); + if (Minecraft.getInstance().player != null) + vertices.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); } // Interpolate points between vertices based on distanceBetweenPoints @@ -86,7 +95,8 @@ public static ShapeMouseInput generateStar(PointMouseInput center, int pointsCou double angle = angleIncrement * i + rotationRadians; double x = center.x() + radius * Math.cos(angle); double y = center.y() - radius * Math.sin(angle); // Flip y-axis - vertices.add(new PointMouseInput(x, y)); + if (Minecraft.getInstance().player != null) + vertices.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); } // Interpolate points between vertices based on distanceBetweenPoints @@ -108,7 +118,8 @@ public static ShapeMouseInput generateSpiral(PointMouseInput center, int turns, while (angle <= totalAngle) { double x = center.x() + radius * Math.cos(angle + rotationRadians); double y = center.y() - radius * Math.sin(angle + rotationRadians); // Flip y-axis - points.add(new PointMouseInput(x, y)); + if (Minecraft.getInstance().player != null) + points.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); angle += angleIncrement; radius += radiusIncrement * angleIncrement; @@ -157,7 +168,9 @@ private static List resamplePoints(List points double t = (interval - D) / d; double x = points.get(i - 1).x() + t * (points.get(i).x() - points.get(i - 1).x()); double y = points.get(i - 1).y() + t * (points.get(i).y() - points.get(i - 1).y()); - PointMouseInput newPoint = new PointMouseInput(x, y); + PointMouseInput newPoint = null; + if (Minecraft.getInstance().player != null) + newPoint = new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle()); newPoints.add(newPoint); points.add(i, newPoint); D = 0.0; @@ -184,7 +197,8 @@ private static List rotateBy(List points, doub for (PointMouseInput point : points) { double x = (point.x() - centroid.x()) * Math.cos(angle) - (point.y() - centroid.y()) * Math.sin(angle) + centroid.x(); double y = (point.x() - centroid.x()) * Math.sin(angle) + (point.y() - centroid.y()) * Math.cos(angle) + centroid.y(); - newPoints.add(new PointMouseInput(x, y)); + if (Minecraft.getInstance().player != null) + newPoints.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); } return newPoints; } @@ -203,7 +217,8 @@ private static List scaleToSquare(List points, for (PointMouseInput point : points) { double x = (point.x() - minX) * (size / width); double y = (point.y() - minY) * (size / height); - newPoints.add(new PointMouseInput(x, y)); + if (Minecraft.getInstance().player != null) + newPoints.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); } return newPoints; } @@ -215,7 +230,8 @@ private static List translateToOrigin(List poi for (PointMouseInput point : points) { double x = point.x() - centroid.x(); double y = point.y() - centroid.y(); - newPoints.add(new PointMouseInput(x, y)); + if (Minecraft.getInstance().player != null) + newPoints.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); } return newPoints; } @@ -245,7 +261,8 @@ private static double getPathLength(List points) { private static PointMouseInput getCentroid(List points) { double xSum = points.stream().mapToDouble(PointMouseInput::x).sum(); double ySum = points.stream().mapToDouble(PointMouseInput::y).sum(); - return new PointMouseInput(xSum / points.size(), ySum / points.size()); + assert Minecraft.getInstance().player != null; + return new PointMouseInput(xSum / points.size(), ySum / points.size(), Minecraft.getInstance().player.getLookAngle()); } // Helper method to normalize the number of points @@ -258,4 +275,8 @@ private static List normalizePoints(List point } return normalizedPoints; } + + public boolean compareToPath(List mousePath, List point2DS) { + return true; + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java index 32c56e33..1fdc1a4b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import net.minecraft.world.phys.Vec3; /** * How we're going to do this: @@ -13,5 +14,5 @@ * * Get a Bézier curve function working. This tracks input segments, then we path through the input segments. */ -public record PointMouseInput(double x, double y) implements InputData { +public record PointMouseInput(double x, double y, Vec3 lookAngle) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java index f2e6a953..83895451 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java @@ -17,19 +17,21 @@ public PointMouseInput end() { public String getDirection() { // TODO - Test this logic - PointMouseInput centroid = start(); - Vector2d mouseDirection = getVector2d(mouseInputs); + PointMouseInput first = start(); + PointMouseInput last = end(); + Vec3 mouseDirection = getMouseDirection(); String direction = ""; // Create the vector buckets - double degree_span = 45.0D; - Vector2d up = new Vector2d(centroid.x(), centroid.y()); - Vector2d down = new Vector2d(centroid.x(), -centroid.y()); - Vector2d left = new Vector2d(-centroid.x(), centroid.y()); - Vector2d right = new Vector2d(centroid.x(), centroid.y()); - - if (getAngle2D(up, mouseDirection) <= degree_span) { + double degree_span = 45.0D; // Make 45 degrees to include diagonal directions + // Cardinal directions + Vec3 right = new Vec3(-first.lookAngle().z(), first.lookAngle().y(), first.lookAngle().x()); + Vec3 left = new Vec3(first.lookAngle().z(), first.lookAngle().y(), -first.lookAngle().x()); + System.out.println("mouseDirection: " + String.format("x: %.2f, z: %.2f", mouseDirection.x(), mouseDirection.z())); + System.out.println("getAngle between right and mouseDirection: " + getAngle2D(right, mouseDirection)); + // TODO - Fix right and left motion recognition + if (mouseDirection.y() > 0.7D) { direction = "up"; - } else if (getAngle2D(down, mouseDirection) <= degree_span) { + } else if (mouseDirection.y() < -0.7D) { direction = "down"; } else if (getAngle2D(right, mouseDirection) <= degree_span) { direction = "right"; @@ -39,24 +41,25 @@ public String getDirection() { return direction; } - public Vector2d getVector2d(List mouseInputs) { - PointMouseInput centroid = start(); - PointMouseInput last = start(); - int radius = 250; - Vector2d v1 = new Vector2d(centroid.x(), centroid.y()); - Vector2d v2 = new Vector2d(last.x(), last.y()); - return v2.sub(v1).normalize(); + public Vec3 getMouseDirection() { + Vec3 first = start().lookAngle(); + Vec3 last = end().lookAngle(); +// System.out.println("lookAngle 1: " + first.lookAngle()); +// System.out.println("lookAngle 2: " + last.lookAngle()); +// Vector2d v1 = new Vector2d(first.lookAngle().x(), first.lookAngle().z()); +// Vector2d v2 = new Vector2d(last.lookAngle().x(), last.lookAngle().z()); + return last.subtract(first).normalize(); } // Get angle between two 2D vectors and return in ° (degrees) - public static double getAngle2D(Vector2d v1, Vector2d v2) { - double dotProduct = v1.mul((1), (0)).dot(v2.mul((1), (0))); + public static double getAngle2D(Vec3 v1, Vec3 v2) { + double dotProduct = v1.multiply((1), (0), (1)).dot(v2.multiply((1), (0), (1))); double radians = dotProduct / (getMagnitude2D(v1) * getMagnitude2D(v2)); return Math.toDegrees(Math.acos(radians)); } // Get magnitude/length of 2D vector v - public static double getMagnitude2D(Vector2d v) { + public static double getMagnitude2D(Vec3 v) { return Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2)); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 8c324488..75602f3a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -10,6 +10,10 @@ public Form(String name) { Registries.registerForm(this); } + public Form() { // Create null Form to fix random NullPointerException + this.name = null; + } + /** * Just in case. I don't think we care about the MOD_ID as forge handles that. * @param name From 31eff4eaf3c7ff23d0e05825cf81e47ecd49281c Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 17 Sep 2024 15:44:38 +1000 Subject: [PATCH 237/469] Gonna start working on path builder, committing changes --- .../magus/input/KeyboardInputModule.java | 2 + .../minecraft/forge/key/KeyHoldCondition.java | 2 - .../forge/mouse/MouseMotionCondition.java | 113 ------------------ .../magus/radix/path/PathBuilder.java | 4 - 4 files changed, 2 insertions(+), 119 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index c3c1bb16..b26f0532 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -19,6 +19,8 @@ import java.util.*; import java.util.function.Consumer; + + public class KeyboardInputModule extends InputModule { private List glfwKeysDown; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index d4b0a4cd..dfe50f63 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -55,14 +55,12 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (pressed(this.currentHolding, duration)) { // If the Condition doesn't require the key being released.... if (!release) { -// LogManager.getLogger().info("ONSUCCESS RUNNING 2"); this.onSuccess.run(); reset(); } } if (this.started) { if (this.currentTotal >= timeout) { -// LogManager.getLogger().info("ONFAILURE RUNNING 2"); this.onFailure.run(); reset(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java deleted file mode 100644 index 56db07e7..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseMotionCondition.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.mouse; - -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionShapeComparator; -import com.amuzil.omegasource.magus.skill.forms.Form; -import net.minecraft.client.Minecraft; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.TickEvent; -import net.minecraftforge.eventbus.api.EventPriority; - -import java.awt.geom.Point2D; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Consumer; - -public class MouseMotionCondition extends Condition { - private final Consumer clientTickListener; - private final MouseMotionShapeComparator shapeComparator; - private final List mousePath; - private boolean tracking; - private final double speedThreshold; - private final int key; // Key that needs to be held - private final Form requiredForm; // Form that needs to be activated - private final List activeForms; // Track active forms in real-time - - public MouseMotionCondition(double speedThreshold, double errorMargin, int key, Form requiredForm) { - this.mousePath = new ArrayList<>(); - this.shapeComparator = new MouseMotionShapeComparator(errorMargin); - this.speedThreshold = speedThreshold; - this.key = key; - this.requiredForm = requiredForm; - this.activeForms = new ArrayList<>(); - this.tracking = false; - - this.clientTickListener = event -> { - if (event.phase == TickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { - boolean keyPressed = key == -1 || isKeyPressed(key); // -1 indicates no key requirement - boolean formActive = requiredForm == null || activeForms.contains(requiredForm); - - if (keyPressed && formActive) { - trackMouseMovement(); - } - } - }; - - this.registerEntry(); - } - - private void trackMouseMovement() { - double currentX = Minecraft.getInstance().mouseHandler.xpos(); - double currentY = Minecraft.getInstance().mouseHandler.ypos(); - - // Minecraft coordinates: up is negative Y, down is positive Y, left is negative X, right is positive X - // No adjustment needed as the coordinates naturally fit the system described - - if (!tracking) { - mousePath.clear(); - tracking = true; - } - - mousePath.add(new Point2D.Double(currentX, currentY)); - - // Example shape matching, modify as needed - if (shapeComparator.compareToPath(mousePath, generateDesiredShape())) { - this.onSuccess.run(); - reset(); - } - } - - public boolean isSatisfied() { - return !mousePath.isEmpty(); - } - - public void reset() { - this.mousePath.clear(); - this.tracking = false; - } - - public void setActiveForms(List forms) { - activeForms.clear(); - activeForms.addAll(forms); - } - - @Override - public void register(String name, Runnable onSuccess, Runnable onFailure) { - super.register(name, onSuccess, onFailure); - } - - @Override - public void register() { - super.register(); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); - } - - @Override - public void unregister() { - MinecraftForge.EVENT_BUS.unregister(clientTickListener); - } - - @Override - public String name() { - return "mouse_motion"; - } - - private boolean isKeyPressed(int key) { - return Minecraft.getInstance().options.keyMappings[key].isDown(); - } - - private List generateDesiredShape() { - // Placeholder for generating shapes like lines, spirals, etc. - return new ArrayList<>(); - } -} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 9224b929..051ebbae 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -1,17 +1,13 @@ package com.amuzil.omegasource.magus.radix.path; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.Condition.Result; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.TickTimedCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyPressedCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; -import net.minecraftforge.event.TickEvent; import java.util.HashMap; import java.util.LinkedList; From a6b75dbafd77bffdd57f960bb8533f87060eca59 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 17 Sep 2024 03:16:50 -0400 Subject: [PATCH 238/469] mouse motion and aim recognition done --- .../minecraft/forge/key/KeyHoldCondition.java | 3 +- .../conditionals/mouse/SegmentMouseInput.java | 30 ++++++++----------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index d2e8acdf..39e39369 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -54,7 +54,8 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (!mouseInputs.isEmpty()) { List inputs = new ArrayList<>(mouseInputs); SegmentMouseInput segment = new SegmentMouseInput(inputs); - System.out.println("SEGMENT DIRECTION: " + segment.getDirection() + " SLASH!"); +// System.out.println("SEGMENT MOTION DIRECTION: " + segment.getMotionDirection()); +// System.out.println("SEGMENT AIM DIRECTION: " + segment.getAimDirection()); mouseInputs.clear(); } if (pressed(this.currentHolding, duration)) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java index 83895451..360ca998 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/SegmentMouseInput.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; import net.minecraft.world.phys.Vec3; -import org.joml.Vector2d; import java.util.List; @@ -15,20 +14,21 @@ public PointMouseInput end() { return mouseInputs().get(mouseInputs().size() - 1); } - public String getDirection() { - // TODO - Test this logic + public Vec3 getAimDirection() { + if (mouseInputs.size() > 1) + return mouseInputs.get(mouseInputs.size() / 2).lookAngle(); + else + return new Vec3((0),(1),(0)); + } + + public String getMotionDirection() { PointMouseInput first = start(); - PointMouseInput last = end(); Vec3 mouseDirection = getMouseDirection(); String direction = ""; - // Create the vector buckets - double degree_span = 45.0D; // Make 45 degrees to include diagonal directions - // Cardinal directions - Vec3 right = new Vec3(-first.lookAngle().z(), first.lookAngle().y(), first.lookAngle().x()); - Vec3 left = new Vec3(first.lookAngle().z(), first.lookAngle().y(), -first.lookAngle().x()); - System.out.println("mouseDirection: " + String.format("x: %.2f, z: %.2f", mouseDirection.x(), mouseDirection.z())); - System.out.println("getAngle between right and mouseDirection: " + getAngle2D(right, mouseDirection)); - // TODO - Fix right and left motion recognition + double degree_span = 45.0D; // Note: 45° doesn't cover the entire unit circle, leaving room to recognize diagonals + Vec3 right = new Vec3(-first.lookAngle().z(), first.lookAngle().y(), first.lookAngle().x()).normalize(); + Vec3 left = new Vec3(first.lookAngle().z(), first.lookAngle().y(), -first.lookAngle().x()).normalize(); + if (mouseDirection.y() > 0.7D) { direction = "up"; } else if (mouseDirection.y() < -0.7D) { @@ -44,10 +44,6 @@ public String getDirection() { public Vec3 getMouseDirection() { Vec3 first = start().lookAngle(); Vec3 last = end().lookAngle(); -// System.out.println("lookAngle 1: " + first.lookAngle()); -// System.out.println("lookAngle 2: " + last.lookAngle()); -// Vector2d v1 = new Vector2d(first.lookAngle().x(), first.lookAngle().z()); -// Vector2d v2 = new Vector2d(last.lookAngle().x(), last.lookAngle().z()); return last.subtract(first).normalize(); } @@ -60,6 +56,6 @@ public static double getAngle2D(Vec3 v1, Vec3 v2) { // Get magnitude/length of 2D vector v public static double getMagnitude2D(Vec3 v) { - return Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2)); + return Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.z, 2)); } } From 22b573b02738e54814deb47e460b515a250ae011 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 18 Sep 2024 14:01:19 +1000 Subject: [PATCH 239/469] Cleaning up conditions from Maht --- .../minecraft/forge/TickTimedCondition.java | 3 +-- .../minecraft/forge/key/KeyHoldCondition.java | 14 ++++++------- .../forge/key/KeyPressedCondition.java | 7 ++++--- .../magus/radix/path/PathBuilder.java | 21 +++++++++++++++---- .../skill/conditionals/key/KeyInput.java | 2 +- .../magus/skill/forms/FormDataRegistry.java | 1 + 6 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java index 94995e93..7406f83a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/TickTimedCondition.java @@ -42,14 +42,13 @@ public TickTimedCondition(Type type, Phase phase, int timeout, Result onTimeout, @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); - this.register(); } @Override public void register() { super.register(); // TODO is this the correct approach? - this.subCondition.register("", runOn(this.onSubSuccess), runOn(this.onSubFailure)); + this.subCondition.register("key_press_predicate", runOn(this.onSubSuccess), runOn(this.onSubFailure)); //Ensures no cast errors occur (blame forge) MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, listener); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 39e39369..0e4eccfe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -29,8 +29,9 @@ public class KeyHoldCondition extends Condition { public List mouseInputs = new ArrayList<>(); public KeyHoldCondition(int key, int duration, int timeout, boolean release) { - RadixUtil.assertTrue(duration >= 1, "duration must be >= 1"); - RadixUtil.assertTrue(timeout >= 1, "timeout must be >= 1"); + if (duration < 0) + RadixUtil.getLogger().warn("You should not be defining a key press duration of less than 0."); + this.currentTotal = 0; this.currentHolding = 0; this.release = release; @@ -62,13 +63,11 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { // If the Condition requires the key being released.... if (release) { this.onSuccess.run(); - reset(); } } else { // Not held for long enough if (this.currentHolding > 0) { this.onFailure.run(); - reset(); } } } @@ -77,13 +76,12 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { // If the Condition doesn't require the key being released.... if (!release) { this.onSuccess.run(); - reset(); } } if (this.started) { - if (this.currentTotal >= timeout) { + // Timeout of -1 means that this should wait forever. + if (timeout > -1 && this.currentTotal >= timeout) { this.onFailure.run(); - reset(); } this.currentTotal++; } @@ -99,6 +97,8 @@ public boolean pressed(int held, int duration) { return pressed; } + // Should be called in either runnable by other methods, rather than manually here. Calling it manually in the class can lead + // to race conditions and other weird bugs, none of which are ideal. public void reset() { this.currentTotal = 0; this.currentHolding = 0; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java index eeafeac9..e2cde06e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyPressedCondition.java @@ -6,15 +6,16 @@ import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.event.TickEvent; +import java.util.function.Function; + /** * Used to determine whether any key was pressed during a time period. */ public class KeyPressedCondition extends TickTimedCondition { //Upon *any* key (not including modifiers or wasd) being pressed, return true - public KeyPressedCondition(int timeout) { + public KeyPressedCondition(int timeout, Function predicate) { super(TickEvent.Type.CLIENT, TickEvent.Phase.START, timeout, Result.SUCCESS, new EventCondition<>( - InputEvent.Key.class, event -> !KeyboardData.ignore(event.getKey()) - ), Result.SUCCESS, Result.FAILURE); + InputEvent.Key.class, predicate), Result.SUCCESS, Result.FAILURE); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 051ebbae..0d98d1ce 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -20,10 +20,10 @@ public class PathBuilder { static { // Minimum amount of ticks a key must be pressed for it to be considered a held condition. - //TODO: Adjust these + // This value is used in the condition class for how to check validity. Not used here. final int HELD_THRESHOLD = 3; // 50 by default - final int TIMEOUT_THRESHOLD = 15; + final int TIMEOUT_THRESHOLD = 10; /* Keys. */ //TODO: Account for max delay @@ -33,8 +33,20 @@ public class PathBuilder { // Any time less than this is just a key press. // TODO: Adjust timeout to be per node. - conditions.add(new KeyHoldCondition(keyInput.key().getValue(), - keyInput.held() + KeyHoldCondition.KEY_PRESS_TIMEOUT, TIMEOUT_THRESHOLD, keyInput.release())); + // Use a configurable value to be our default timeout. If the condition should never time out, + // dont add the threshold value. + int timeout = TIMEOUT_THRESHOLD + keyInput.timeout(); + if (keyInput.timeout() < 0) + timeout = keyInput.timeout(); + + // Default is about 0 ticks. + + KeyHoldCondition keyPress = new KeyHoldCondition(keyInput.key().getValue(), + keyInput.held(), timeout, keyInput.release()); + // We can change these runnables later if need be. + keyPress.register("key_press", keyPress::reset, keyPress::reset); + conditions.add(keyPress); + return conditions; }); @@ -67,6 +79,7 @@ public class PathBuilder { // timedCondition = ConditionBuilder.createMultiCondition(timed); // allConditions.add(timedCondition); } + } return new LinkedList<>(allConditions); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java index bc57404b..56a6f1ad 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java @@ -13,4 +13,4 @@ * the current key input, and the next. * @param held How long the key should be held for. */ -public record KeyInput(InputConstants.Key key, boolean release, int minDelay, int maxDelay, int held) implements InputData {} \ No newline at end of file +public record KeyInput(InputConstants.Key key, boolean release, int minDelay, int maxDelay, int held, int timeout) implements InputData {} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 8d325ddf..98d7636d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -31,6 +31,7 @@ public static List getInputsForForm(Form formToModify) { return formTypes.entrySet().stream().filter(form -> form.getValue().name().equals(formToModify.name())).findFirst().get().getKey(); } + public static void registerForm(List inputs, Form form, InputConstants.Type inputType) { formTypes.put(inputs, form); // Register the requisite conditions From 974ad48faebeed22190ec77e9ba0952543097097 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 18 Sep 2024 14:03:46 +1000 Subject: [PATCH 240/469] Added in a way to use the new timeout --- .../skill/conditionals/key/KeyDataBuilder.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java index 78ffa126..049cebf1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java @@ -15,26 +15,30 @@ public class KeyDataBuilder { /* Look at #InputConstants for key names, codes, and types. */ public static KeyInput createInput(int key, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key, -1), false, minDelay, maxDelay, held); + return new KeyInput(InputConstants.getKey(key, -1), false, minDelay, maxDelay, held, -1); } public static KeyInput createInput(int key, boolean released, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key, -1), released, minDelay, maxDelay, held); + return new KeyInput(InputConstants.getKey(key, -1), released, minDelay, maxDelay, held, -1); } public static KeyInput createInput(String key, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key), false, minDelay, maxDelay, held); + return new KeyInput(InputConstants.getKey(key), false, minDelay, maxDelay, held, -1); } public static KeyInput createInput(String key, boolean released, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key), released, minDelay, maxDelay, held); + return new KeyInput(InputConstants.getKey(key), released, minDelay, maxDelay, held, -1); } public static KeyInput createInput(InputConstants.Key key, boolean released, int minDelay, int maxDelay, int held) { - return new KeyInput(key, released, minDelay, maxDelay, held); + return new KeyInput(key, released, minDelay, maxDelay, held, -1); } public static KeyInput createInput(InputConstants.Key key, int minDelay, int maxDelay, int held) { - return new KeyInput(key, false, minDelay, maxDelay, held); + return new KeyInput(key, false, minDelay, maxDelay, held, -1); + } + + public static KeyInput createInput(InputConstants.Key key, int minDelay, int maxDelay, int held, int timeout) { + return new KeyInput(key, false, minDelay, maxDelay, held, timeout); } //TODO: Remove these methods due to InputDataBuilder? From e08d9ae1710b46c2fbfaa8669c8ecdc01a1f7917 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 18 Sep 2024 14:30:12 +1000 Subject: [PATCH 241/469] Finally have an idea for how we're gonna do this --- .../omegasource/magus/radix/RadixTree.java | 35 +++-- .../magus/radix/path/InputConverter.java | 118 ++++++++++++++++ .../magus/radix/path/PathBuilder.java | 132 ++++-------------- .../skill/conditionals/ConditionBuilder.java | 6 +- 4 files changed, 165 insertions(+), 126 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/path/InputConverter.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index cc888ade..a08324f3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -15,7 +15,7 @@ public class RadixTree { private static final int NO_MISMATCH = -1; - private Node root; + private final Node root; private Node active; private Condition lastActivated = null; // Fire is a test @@ -43,7 +43,7 @@ private int getFirstMismatchCondition(List conditions, List conditions) { - for (Condition condition: conditions) { + for (Condition condition : conditions) { condition.register(); } } @@ -53,9 +53,8 @@ private void deactivateAllConditions() { } private void deactivateAllConditions(Node current, List result) { - if (current.isComplete) - for (Condition condition : result) - condition.unregister(); + if (current.isComplete) for (Condition condition : result) + condition.unregister(); for (RadixBranch branch : current.branches.values()) deactivateAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); @@ -67,8 +66,7 @@ public void printAllConditions() { } private void printAllConditions(Node current, List result) { - if (current.isComplete) - System.out.println("Condition: " + result); + if (current.isComplete) System.out.println("Condition: " + result); for (RadixBranch branch : current.branches.values()) printAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); @@ -83,10 +81,8 @@ private void printAllBranches(Node current, String indent) { int lastValue = current.totalConditions() - 1; int i = 0; for (RadixBranch branch : current.branches.values()) { - if (i == lastValue) - System.out.println(indent.replace("+", "L") + branch.path); - else - System.out.println(indent.replace("+", "|") + branch.path); + if (i == lastValue) System.out.println(indent.replace("+", "L") + branch.path); + else System.out.println(indent.replace("+", "|") + branch.path); int length1 = indent.length() / 2 == 0 ? 4 : indent.length() / 2; int length2 = branch.path.toString().length() / 3; String oldIndent = new String(new char[length1]).replace("\0", " "); @@ -165,17 +161,14 @@ public List search(List conditions) { Condition currentCondition = conditions.get(currIndex); RadixBranch branch = current.getTransition(currentCondition); // RadixBranch branch = current.getMatchedPath(currentCondition); - if (branch == null) - return null; + if (branch == null) return null; List currSubCondition = conditions.subList(currIndex, conditions.size()); - if (!Condition.startsWith(currSubCondition, branch.path.conditions)) - return null; + if (!Condition.startsWith(currSubCondition, branch.path.conditions)) return null; currIndex += branch.path.conditions.size(); current = branch.next; - if (ret == null) - ret = new ArrayList<>(); + if (ret == null) ret = new ArrayList<>(); ret = Stream.concat(ret.stream(), branch.path.conditions.stream()).toList(); } return ret; @@ -226,8 +219,7 @@ private void setActive(Node node) { if (condition != null) { Runnable success; success = () -> { - if (condition.onSuccess != null) - condition.onSuccess.run(); + if (condition.onSuccess != null) condition.onSuccess.run(); MagusNetwork.sendToServer(new ConditionActivatedPacket(condition)); RadixUtil.getLogger().debug("Packet sent."); condition.unregister(); @@ -343,4 +335,9 @@ public void addModifierData(ModifierData modifierData) { public void setOwner(Entity entity) { this.owner = entity; } + + // Menu = radial menu or a HUD. Other activation types are self explanatory. + public enum ActivationType { + MULTIKEY, MENU, HOTKEY, VR + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/InputConverter.java new file mode 100644 index 00000000..e301a07f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/InputConverter.java @@ -0,0 +1,118 @@ +package com.amuzil.omegasource.magus.radix.path; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.MultiCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; + +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +public class InputConverter { + private static final Map, Function>> CONDITION_BUILDERS = new HashMap<>(); + + static { + // Minimum amount of ticks a key must be pressed for it to be considered a held condition. + // This value is used in the condition class for how to check validity. Not used here. + final int HELD_THRESHOLD = 3; + // 50 by default + final int TIMEOUT_THRESHOLD = 10; + + /* Keys. */ + //TODO: Account for max delay + registerBuilder(KeyInput.class, keyInput -> { + + LinkedList conditions = new LinkedList<>(); + + // Any time less than this is just a key press. + // TODO: Adjust timeout to be per node. + // Use a configurable value to be our default timeout. If the condition should never time out, + // dont add the threshold value. + int timeout = TIMEOUT_THRESHOLD + keyInput.timeout(); + if (keyInput.timeout() < 0) + timeout = keyInput.timeout(); + + // Default is about 0 ticks. + + KeyHoldCondition keyPress = new KeyHoldCondition(keyInput.key().getValue(), + keyInput.held(), timeout, keyInput.release()); + // We can change these runnables later if need be. + keyPress.register("key_press", keyPress::reset, keyPress::reset); + conditions.add(keyPress); + + + return conditions; + }); + // TODO: Need to print these out and test how they work, + // TODO: in order to finalise ConditionBuilder.java. + registerBuilder(MultiKeyInput.class, + permutation -> { + List conditions = new LinkedList<>(permutation.keys().stream().map(InputConverter::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + + + // List of multiconditions + List allConditions = new LinkedList<>(); + allConditions.add(ConditionBuilder.createMultiCondition(conditions)); + + MultiCondition timedCondition, releaseCondition; + Condition timed, release; + + // Moved the time delay code from the input path to here so it is not combined. + for (int i = 0; i < conditions.size(); i++) { + KeyInput input = permutation.keys().get(i); + + if (input.minDelay() > 0) { + //TODO: Fix this to account for "action keys". +// timed = new TickTimedCondition( +// TickEvent.Type.CLIENT, TickEvent.Phase.START, +// input.maxDelay(), Result.SUCCESS, +// new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS +// ); +// timedCondition = ConditionBuilder.createMultiCondition(timed); +// allConditions.add(timedCondition); + } + + } + return new LinkedList<>(allConditions); + } + ); + registerBuilder(ChainedKeyInput.class, + combination -> combination.keys().stream().map(InputConverter::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) + ); + + /* Mouse */ +// registerBuilder(MouseInput.class, +// mouseInput -> ); + registerBuilder(MouseWheelInput.class, + mouseWheelInput -> { + + LinkedList conditions = new LinkedList<>(); + // Placeholder for now + //conditions.add(new KeyPressCondition(0, TIMEOUT_THRESHOLD)); + + return conditions; + + } + ); + } + + @SuppressWarnings("unchecked") + public static void registerBuilder(Class type, Function> builder) { + CONDITION_BUILDERS.put(type, (Function>) builder); + } + + // TODO turn a linked list of conditions into a connected node tree. + + public static LinkedList buildPathFrom(T data) { + return CONDITION_BUILDERS.get(data.getClass()).apply(data); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 0d98d1ce..3e90ee1d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -1,118 +1,42 @@ package com.amuzil.omegasource.magus.radix.path; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.condition.MultiCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; -import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; +import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.RadixTree; import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.function.Function; +// Creates a path for a given object. public class PathBuilder { - private static final Map, Function>> CONDITION_BUILDERS = new HashMap<>(); - - static { - // Minimum amount of ticks a key must be pressed for it to be considered a held condition. - // This value is used in the condition class for how to check validity. Not used here. - final int HELD_THRESHOLD = 3; - // 50 by default - final int TIMEOUT_THRESHOLD = 10; - - /* Keys. */ - //TODO: Account for max delay - registerBuilder(KeyInput.class, keyInput -> { - - LinkedList conditions = new LinkedList<>(); - - // Any time less than this is just a key press. - // TODO: Adjust timeout to be per node. - // Use a configurable value to be our default timeout. If the condition should never time out, - // dont add the threshold value. - int timeout = TIMEOUT_THRESHOLD + keyInput.timeout(); - if (keyInput.timeout() < 0) - timeout = keyInput.timeout(); - - // Default is about 0 ticks. - - KeyHoldCondition keyPress = new KeyHoldCondition(keyInput.key().getValue(), - keyInput.held(), timeout, keyInput.release()); - // We can change these runnables later if need be. - keyPress.register("key_press", keyPress::reset, keyPress::reset); - conditions.add(keyPress); - - - return conditions; - }); - // TODO: Need to print these out and test how they work, - // TODO: in order to finalise ConditionBuilder.java. - registerBuilder(MultiKeyInput.class, - permutation -> { - List conditions = new LinkedList<>(permutation.keys().stream().map(PathBuilder::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - - - // List of multiconditions - List allConditions = new LinkedList<>(); - allConditions.add(ConditionBuilder.createMultiCondition(conditions)); - - MultiCondition timedCondition, releaseCondition; - Condition timed, release; - - // Moved the time delay code from the input path to here so it is not combined. - for (int i = 0; i < conditions.size(); i++) { - KeyInput input = permutation.keys().get(i); - - if (input.minDelay() > 0) { - //TODO: Fix this to account for "action keys". -// timed = new TickTimedCondition( -// TickEvent.Type.CLIENT, TickEvent.Phase.START, -// input.maxDelay(), Result.SUCCESS, -// new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS -// ); -// timedCondition = ConditionBuilder.createMultiCondition(timed); -// allConditions.add(timedCondition); - } - - } - return new LinkedList<>(allConditions); - } - ); - registerBuilder(ChainedKeyInput.class, - combination -> combination.keys().stream().map(PathBuilder::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) - ); - - /* Mouse */ -// registerBuilder(MouseInput.class, -// mouseInput -> ); - registerBuilder(MouseWheelInput.class, - mouseWheelInput -> { - - LinkedList conditions = new LinkedList<>(); - // Placeholder for now - //conditions.add(new KeyPressCondition(0, TIMEOUT_THRESHOLD)); + private ConditionPath path; + private RadixTree.ActivationType type; + private HashMap finalPath; + + public static PathBuilder instance; + public static PathBuilder getInstance() { + if (instance == null) + instance = new PathBuilder(); + instance.reset(); + return instance; + } - return conditions; + public PathBuilder path(Condition... conditions) { - } - ); + return this; } - - @SuppressWarnings("unchecked") - public static void registerBuilder(Class type, Function> builder) { - CONDITION_BUILDERS.put(type, (Function>) builder); + public PathBuilder type(RadixTree.ActivationType type) { + this.type = type; + return this; + } + public HashMap build() { + finalPath = new HashMap<>(); + finalPath.put(type, path); + reset(); + return this.finalPath; } - // TODO turn a linked list of conditions into a connected node tree. - - public static LinkedList buildPathFrom(T data) { - return CONDITION_BUILDERS.get(data.getClass()).apply(data); + public void reset() { + this.type = null; + this.path = null; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index f1054a67..36dd6f02 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -3,7 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; -import com.amuzil.omegasource.magus.radix.path.PathBuilder; +import com.amuzil.omegasource.magus.radix.path.InputConverter; import java.util.LinkedList; import java.util.List; @@ -46,12 +46,12 @@ public static ChainedCondition createSequentialCondition(MultiCondition conditio } public ConditionBuilder fromInputData(List formExecutionInputs) { - formExecutionInputs.forEach(inputData -> conditionList.addAll(PathBuilder.buildPathFrom(inputData))); + formExecutionInputs.forEach(inputData -> conditionList.addAll(InputConverter.buildPathFrom(inputData))); return this; } public ConditionBuilder fromInputData(InputData formExecutionInput) { - conditionList.addAll(PathBuilder.buildPathFrom(formExecutionInput)); + conditionList.addAll(InputConverter.buildPathFrom(formExecutionInput)); return this; } From ac60cdb093975558d9b913fb76cda6b2fdf73fde Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 18 Sep 2024 14:34:23 +1000 Subject: [PATCH 242/469] Finished the path builder --- .../omegasource/magus/radix/path/PathBuilder.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index 3e90ee1d..f7acdea5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -3,8 +3,11 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; // Creates a path for a given object. public class PathBuilder { @@ -21,9 +24,17 @@ public static PathBuilder getInstance() { } public PathBuilder path(Condition... conditions) { - + List emptyData = new ArrayList<>(); + if (path == null) + path = new ConditionPath(List.of(conditions)); + else { + for (Condition condition : conditions) { + path.addStep(condition, emptyData); + } + } return this; } + public PathBuilder type(RadixTree.ActivationType type) { this.type = type; return this; From e501ed417b353e899025c1970215e10798402931 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 18 Sep 2024 14:38:12 +1000 Subject: [PATCH 243/469] Cleaned up code for the PathBuilder Also ensured no mutability issues for a hashmap would arise --- .../omegasource/magus/radix/path/PathBuilder.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java index f7acdea5..a6e95dcd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java @@ -11,22 +11,19 @@ // Creates a path for a given object. public class PathBuilder { + public static PathBuilder instance; private ConditionPath path; private RadixTree.ActivationType type; - private HashMap finalPath; - public static PathBuilder instance; public static PathBuilder getInstance() { - if (instance == null) - instance = new PathBuilder(); + if (instance == null) instance = new PathBuilder(); instance.reset(); return instance; } public PathBuilder path(Condition... conditions) { List emptyData = new ArrayList<>(); - if (path == null) - path = new ConditionPath(List.of(conditions)); + if (path == null) path = new ConditionPath(List.of(conditions)); else { for (Condition condition : conditions) { path.addStep(condition, emptyData); @@ -39,11 +36,12 @@ public PathBuilder type(RadixTree.ActivationType type) { this.type = type; return this; } + public HashMap build() { - finalPath = new HashMap<>(); + HashMap finalPath = new HashMap<>(); finalPath.put(type, path); reset(); - return this.finalPath; + return finalPath; } public void reset() { From 41320a325959248961ada507765a2d0587938276 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 18 Sep 2024 18:56:06 +1000 Subject: [PATCH 244/469] Adjusted builders. Have to finalise InputConverter next. --- .../omegasource/magus/radix/RadixTree.java | 6 +++ .../{path => builders}/InputConverter.java | 2 +- .../radix/builders/InputPathBuilder.java | 50 +++++++++++++++++++ .../radix/{path => builders}/PathBuilder.java | 26 ++++++---- .../skill/conditionals/ConditionBuilder.java | 2 +- 5 files changed, 75 insertions(+), 11 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/radix/{path => builders}/InputConverter.java (98%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/builders/InputPathBuilder.java rename src/main/java/com/amuzil/omegasource/magus/radix/{path => builders}/PathBuilder.java (66%) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index a08324f3..66cbf14f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -340,4 +340,10 @@ public void setOwner(Entity entity) { public enum ActivationType { MULTIKEY, MENU, HOTKEY, VR } + + // Essentially which input module to use. + // Used for VR, multikey, and hotkey activation types. + public enum InputType { + KEYBOARD, MOUSE, MOUSE_MOTION, VR + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java similarity index 98% rename from src/main/java/com/amuzil/omegasource/magus/radix/path/InputConverter.java rename to src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index e301a07f..52397177 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.radix.path; +package com.amuzil.omegasource.magus.radix.builders; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputPathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputPathBuilder.java new file mode 100644 index 00000000..977852c8 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputPathBuilder.java @@ -0,0 +1,50 @@ +package com.amuzil.omegasource.magus.radix.builders; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +// Creates a path for a given object. Designed for things which directly require raw input. + +/** + * Creates an input-based ConditionPath for a given object. Useful for forms or things that exist predominantly client-side. + */ +public class InputPathBuilder { + public static InputPathBuilder instance; + private ConditionPath path; + // Todo: Change this to input type? Skills should use the activation type, forms input type? + private RadixTree.InputType type; + + public static InputPathBuilder getInstance() { + if (instance == null) instance = new InputPathBuilder(); + instance.reset(); + return instance; + } + + public InputPathBuilder path(Condition... conditions) { + PathBuilder.addSteps(path, conditions); + return this; + } + + public InputPathBuilder type(RadixTree.InputType type) { + this.type = type; + return this; + } + + public HashMap build() { + HashMap finalPath = new HashMap<>(); + finalPath.put(type, path); + reset(); + return finalPath; + } + + public void reset() { + this.type = null; + this.path = null; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java similarity index 66% rename from src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java rename to src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java index a6e95dcd..e92a4376 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/path/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.radix.path; +package com.amuzil.omegasource.magus.radix.builders; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; @@ -9,12 +9,26 @@ import java.util.HashMap; import java.util.List; -// Creates a path for a given object. +// Creates a path for a given object. Designed for things which directly require raw input. + +/** + * Creates a path for a given objecct. Uses different activation types to denote what kind of tree to use these conditions for. + * If using raw input, use InputPathBuilder instead. + */ public class PathBuilder { public static PathBuilder instance; private ConditionPath path; + // Todo: Change this to input type? Skills should use the activation type, forms input type? private RadixTree.ActivationType type; + protected static void addSteps(ConditionPath path, Condition... conditions) { + List emptyData = new ArrayList<>(); + if (path == null) path = new ConditionPath(List.of(conditions)); + for (Condition condition : conditions) { + path.addStep(condition, emptyData); + } + } + public static PathBuilder getInstance() { if (instance == null) instance = new PathBuilder(); instance.reset(); @@ -22,13 +36,7 @@ public static PathBuilder getInstance() { } public PathBuilder path(Condition... conditions) { - List emptyData = new ArrayList<>(); - if (path == null) path = new ConditionPath(List.of(conditions)); - else { - for (Condition condition : conditions) { - path.addStep(condition, emptyData); - } - } + addSteps(path, conditions); return this; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 36dd6f02..27e1ddd2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -3,7 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; -import com.amuzil.omegasource.magus.radix.path.InputConverter; +import com.amuzil.omegasource.magus.radix.builders.InputConverter; import java.util.LinkedList; import java.util.List; From 9bd01d9df5254a8db0d85edc1a9bfd05c094151b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 19 Sep 2024 01:47:03 +1000 Subject: [PATCH 245/469] Trying to figure out how to fix input converting --- .../magus/radix/builders/InputConverter.java | 30 +++++-------------- .../magus/radix/condition/MultiCondition.java | 11 ++++--- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index 52397177..aa3260c3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -61,32 +61,18 @@ public class InputConverter { // List of multiconditions List allConditions = new LinkedList<>(); allConditions.add(ConditionBuilder.createMultiCondition(conditions)); - - MultiCondition timedCondition, releaseCondition; - Condition timed, release; - - // Moved the time delay code from the input path to here so it is not combined. - for (int i = 0; i < conditions.size(); i++) { - KeyInput input = permutation.keys().get(i); - - if (input.minDelay() > 0) { - //TODO: Fix this to account for "action keys". -// timed = new TickTimedCondition( -// TickEvent.Type.CLIENT, TickEvent.Phase.START, -// input.maxDelay(), Result.SUCCESS, -// new KeyPressedCondition(TIMEOUT_THRESHOLD), Result.FAILURE, Result.SUCCESS -// ); -// timedCondition = ConditionBuilder.createMultiCondition(timed); -// allConditions.add(timedCondition); - } - - } return new LinkedList<>(allConditions); } ); registerBuilder(ChainedKeyInput.class, - combination -> combination.keys().stream().map(InputConverter::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll) + combination -> { + LinkedList allConditions = new LinkedList<>(); + int minDelay = 0, maxDelay = 0; + for (MultiKeyInput multi : combination.keys()) { + + } + return (LinkedList) multiConditions; + } ); /* Mouse */ diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 44b66d5d..ed482530 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -12,12 +12,12 @@ import java.util.function.Consumer; public class MultiCondition extends Condition { + private static final int TIMEOUT_IN_TICKS = 15; private final List concurrentConditions; private Runnable onCompleteSuccess; private Runnable onCompleteFailure; private Dictionary conditionsMet; private Consumer clientTickListener; - private static int TIMEOUT_IN_TICKS = 15; private int executionTime = 0; private boolean startedExecuting = false; @@ -39,14 +39,17 @@ private void checkConditionMet() { this.reset(); } + public List getSubConditions() { + return concurrentConditions; + } + @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - if(startedExecuting) - { + if (startedExecuting) { executionTime++; - if(executionTime > TIMEOUT_IN_TICKS) { + if (executionTime > TIMEOUT_IN_TICKS) { this.onCompleteFailure.run(); LogManager.getLogger().info("MULTI CONDITION TIMED OUT"); From 8009edeeb16a76a0c1bed09a08df8fb574b3a938 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 19 Sep 2024 01:56:11 -0400 Subject: [PATCH 246/469] add init method for ease --- .../com/amuzil/omegasource/magus/input/InputModule.java | 7 +++++++ .../amuzil/omegasource/magus/server/ServerEvents.java | 9 +++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 74d8f880..de4c6f70 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.Map; + public abstract class InputModule { protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); @@ -66,6 +67,12 @@ public Form getLastActivatedForm() { return this.lastActivatedForm; } + public void init() { + resetKeys(); + registerInputs(); + registerListeners(); + } + public abstract void registerListeners(); public abstract void registerInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 8ebb15f0..1705589c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -133,12 +133,9 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } else { if (event.getEntity() instanceof Player) { AvatarFormRegistry.registerForms(); - Magus.keyboardInputModule.resetKeys(); - Magus.mouseInputModule.resetKeys(); - Magus.keyboardInputModule.registerListeners(); - Magus.mouseInputModule.registerListeners(); - Magus.keyboardInputModule.registerInputs(); - Magus.mouseInputModule.registerInputs(); + Magus.keyboardInputModule.init(); + Magus.mouseInputModule.init(); + Magus.mouseMotionModule.init(); } } } From 4b4171ff54b635395c71e6b7184b9c7895686c41 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 20 Sep 2024 03:02:21 +1000 Subject: [PATCH 247/469] Finished input converter dear god --- .../magus/radix/builders/InputConverter.java | 26 ++++++---- .../conditionals/key/KeyDataBuilder.java | 48 +++++++++++++------ .../skill/conditionals/key/KeyInput.java | 8 ++-- .../skill/test/avatar/AvatarFormRegistry.java | 15 +++--- 4 files changed, 64 insertions(+), 33 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index aa3260c3..dcd3bc92 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -57,21 +57,31 @@ public class InputConverter { List conditions = new LinkedList<>(permutation.keys().stream().map(InputConverter::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + // Create a MultiCondition from the flattened conditions + MultiCondition multiCondition = ConditionBuilder.createMultiCondition(conditions); + LinkedList multiConditions = new LinkedList<>(); + multiConditions.add(multiCondition); - // List of multiconditions - List allConditions = new LinkedList<>(); - allConditions.add(ConditionBuilder.createMultiCondition(conditions)); - return new LinkedList<>(allConditions); + // Return a list containing the MultiCondition + return multiConditions; } ); registerBuilder(ChainedKeyInput.class, combination -> { - LinkedList allConditions = new LinkedList<>(); - int minDelay = 0, maxDelay = 0; - for (MultiKeyInput multi : combination.keys()) { + List conditions = new LinkedList<>(combination.keys().stream().map(InputConverter::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + + + LinkedList chained = new LinkedList<>(); + for (Condition condition : conditions) { + if (condition instanceof MultiCondition) + chained.add(ConditionBuilder.createSequentialCondition((MultiCondition) condition)); + else chained.add(ConditionBuilder.createSequentialCondition(condition)); } - return (LinkedList) multiConditions; + + // Return a list containing the ChainedCondition + return chained; } ); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java index 049cebf1..a726edc9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyDataBuilder.java @@ -14,31 +14,51 @@ public class KeyDataBuilder { /* Look at #InputConstants for key names, codes, and types. */ - public static KeyInput createInput(int key, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key, -1), false, minDelay, maxDelay, held, -1); + /* Integers */ + public static KeyInput createInput(int key, int held) { + return new KeyInput(InputConstants.getKey(key, -1), false, held, -1); } - public static KeyInput createInput(int key, boolean released, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key, -1), released, minDelay, maxDelay, held, -1); + public static KeyInput createInput(int key, int held, int timeout) { + return new KeyInput(InputConstants.getKey(key, -1), false, held, timeout); } - public static KeyInput createInput(String key, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key), false, minDelay, maxDelay, held, -1); + public static KeyInput createInput(int key, boolean released, int held) { + return new KeyInput(InputConstants.getKey(key, -1), released, held, -1); } - public static KeyInput createInput(String key, boolean released, int minDelay, int maxDelay, int held) { - return new KeyInput(InputConstants.getKey(key), released, minDelay, maxDelay, held, -1); + public static KeyInput createInput(int key, boolean released, int held, int timeout) { + return new KeyInput(InputConstants.getKey(key, -1), released, held, timeout); } - public static KeyInput createInput(InputConstants.Key key, boolean released, int minDelay, int maxDelay, int held) { - return new KeyInput(key, released, minDelay, maxDelay, held, -1); + + /* Strings */ + public static KeyInput createInput(String key, int held) { + return new KeyInput(InputConstants.getKey(key), false, held, -1); + } + + public static KeyInput createInput(String key, boolean released, int held) { + return new KeyInput(InputConstants.getKey(key), released, held, -1); + } + + public static KeyInput createInput(String key, boolean released, int held, int timeout) { + return new KeyInput(InputConstants.getKey(key), released, held, timeout); + } + + public static KeyInput createInput(String key, int held, int timeout) { + return new KeyInput(InputConstants.getKey(key), false, held, timeout); + } + + /* Input Constants */ + public static KeyInput createInput(InputConstants.Key key, boolean released,int held) { + return new KeyInput(key, released, held, -1); } - public static KeyInput createInput(InputConstants.Key key, int minDelay, int maxDelay, int held) { - return new KeyInput(key, false, minDelay, maxDelay, held, -1); + public static KeyInput createInput(InputConstants.Key key, int held) { + return new KeyInput(key, false, held, -1); } - public static KeyInput createInput(InputConstants.Key key, int minDelay, int maxDelay, int held, int timeout) { - return new KeyInput(key, false, minDelay, maxDelay, held, timeout); + public static KeyInput createInput(InputConstants.Key key, int held, int timeout) { + return new KeyInput(key, false, held, timeout); } //TODO: Remove these methods due to InputDataBuilder? diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java index 56a6f1ad..e86647a6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/KeyInput.java @@ -8,9 +8,9 @@ * * @param key The key. * @param release Whether the key should be released after. - * @param minDelay Minimum delay that must pass between the current key input and the next. - * @param maxDelay Has to be at least equal to minDelay. The maximum amount of time that can pass in between - * the current key input, and the next. + * @param timeout Maximum amount of time this takes before it expires. Rather than using maxDelay, just set the timeout + * of the next Condition in the path to be whatever you need. * @param held How long the key should be held for. */ -public record KeyInput(InputConstants.Key key, boolean release, int minDelay, int maxDelay, int held, int timeout) implements InputData {} \ No newline at end of file +// Note: For minDelay and maxDelay, adjust an object's condition path. +public record KeyInput(InputConstants.Key key, boolean release, int held, int timeout) implements InputData {} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 39b32606..b2f2120d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -18,11 +18,11 @@ public class AvatarFormRegistry { public static void registerForms() { - KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0, 0, 0); - KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0, 0, 0); - KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 0); - KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, 20); - KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 0, 0); + KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0); + KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0); + KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0); + KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 20); + KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0); MouseWheelInput forwards = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.FORWARDS, 1); MouseWheelInput back = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.BACK, 1); @@ -58,8 +58,9 @@ public static void registerForms() { KeyInput first, second; // Problem: The tick delay is being combined with the key press into a simultaneous condition. // Not good. - first = KeyDataBuilder.createInput(key.getValue(), true, 0, 70, 0); - second = KeyDataBuilder.createInput(key.getValue(), 0, 0, 0); + first = KeyDataBuilder.createInput(key.getValue(), true, 0); + // Has to be a relatively quick input. + second = KeyDataBuilder.createInput(key.getValue(), 0, 15); inputs.add(KeyDataBuilder.createChainedInput(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP, InputConstants.Type.KEYSYM); } From 435de3aff52d4c000ffef6d8fdbb1bc0a5ee785d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 19 Sep 2024 23:05:38 -0400 Subject: [PATCH 248/469] MouseMotionModule integrated --- .../com/amuzil/omegasource/magus/Magus.java | 3 + .../omegasource/magus/input/InputModule.java | 7 +- .../magus/input/KeyboardInputModule.java | 7 +- .../magus/input/MouseInputModule.java | 40 ++--- .../magus/input/MouseMotionModule.java | 138 +++++++++++++++++- .../minecraft/forge/key/KeyHoldCondition.java | 32 ++-- .../magus/server/ServerEvents.java | 24 +-- .../conditionals/mouse/MouseDataBuilder.java | 36 ++--- ...tMouseInput.java => MouseMotionInput.java} | 14 +- .../mouse/MousePathComparator.java | 126 ++++++++-------- ...ntMouseInput.java => MousePointInput.java} | 2 +- .../conditionals/mouse/MouseShapeInput.java | 15 ++ .../skill/conditionals/mouse/MouseVircle.java | 60 ++++++++ .../conditionals/mouse/ShapeMouseInput.java | 15 -- .../skill/test/avatar/AvatarFormRegistry.java | 2 +- 15 files changed, 340 insertions(+), 181 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/{SegmentMouseInput.java => MouseMotionInput.java} (84%) rename src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/{PointMouseInput.java => MousePointInput.java} (92%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseShapeInput.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseVircle.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 7540f425..335569ab 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.input.MouseInputModule; +import com.amuzil.omegasource.magus.input.MouseMotionModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -40,6 +41,7 @@ public class Magus { //todo: make multiple input modules public static InputModule keyboardInputModule; public static InputModule mouseInputModule; + public static InputModule mouseMotionModule; public Magus() { // Register ourselves for server and other game events we are interested in @@ -47,6 +49,7 @@ public Magus() { //Register the input modules keyboardInputModule = new KeyboardInputModule(); mouseInputModule = new MouseInputModule(); + mouseMotionModule = new MouseMotionModule(); // Register capabilities FMLJavaModLoadingContext.get().getModEventBus().addListener(CapabilityHandler::registerCapabilities); // attach capabilities diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index de4c6f70..35644cbe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -73,11 +73,16 @@ public void init() { registerListeners(); } + public void terminate() { + resetKeys(); + unRegisterInputs(); + } + public abstract void registerListeners(); public abstract void registerInputs(); - public abstract void unregisterInputs(); + public abstract void unRegisterInputs(); public void unregisterModifiers() { modifierListeners.forEach(ModifierListener::unregister); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 7d8c4c19..65909f0f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -3,8 +3,6 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import com.mojang.blaze3d.platform.InputConstants; @@ -20,7 +18,6 @@ import java.util.function.Consumer; - public class KeyboardInputModule extends InputModule { private List glfwKeysDown; @@ -164,7 +161,7 @@ public void registerListeners() { } @Override - public void unregisterInputs() { + public void unRegisterInputs() { MinecraftForge.EVENT_BUS.unregister(keyboardListener); MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); formInputs.forEach((condition, form) -> condition.unregister()); @@ -184,7 +181,7 @@ public void toggleListeners() { registerInputs(); listen = true; } else { - unregisterInputs(); + unRegisterInputs(); listen = false; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index 224c40fe..9bb18059 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -18,6 +18,7 @@ import java.util.*; import java.util.function.Consumer; + public class MouseInputModule extends InputModule { private final Consumer tickEventConsumer; @@ -52,22 +53,21 @@ public MouseInputModule() { this.mouseListener = mouseEvent -> { int keyPressed = mouseEvent.getButton(); - switch (mouseEvent.getAction()) { - case InputConstants.PRESS -> { - if (!glfwKeysDown.contains(keyPressed)) - glfwKeysDown.add(keyPressed); - } - case InputConstants.REPEAT -> { - if (!glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.add(keyPressed); - } + switch (mouseEvent.getAction()) { + case InputConstants.PRESS -> { + if (!glfwKeysDown.contains(keyPressed)) + glfwKeysDown.add(keyPressed); + } + case InputConstants.REPEAT -> { + if (!glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.add(keyPressed); } - case InputConstants.RELEASE -> { - if (glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.remove((Integer) keyPressed); - } + } + case InputConstants.RELEASE -> { + if (glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.remove((Integer) keyPressed); } - // } + } } }; @@ -87,10 +87,10 @@ public MouseInputModule() { if(activeForm.name() != null) { ticksSinceActivated++; if(ticksSinceActivated >= tickActivationThreshold) { - if (lastActivatedForm != null) - LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); - else - LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); +// if (lastActivatedForm != null) +// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); +// else +// LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; activeForm = new Form(); @@ -175,7 +175,7 @@ public void registerListeners() { } @Override - public void unregisterInputs() { + public void unRegisterInputs() { MinecraftForge.EVENT_BUS.unregister(mouseListener); MinecraftForge.EVENT_BUS.unregister(mouseScrollListener); MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); @@ -196,7 +196,7 @@ public void toggleListeners() { listen = true; System.out.println("Enabled!"); } else { - unregisterInputs(); + unRegisterInputs(); listen = false; System.out.println("Disabled!"); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index 4489b32e..123dc6e8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -1,35 +1,161 @@ package com.amuzil.omegasource.magus.input; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseVircle; import com.amuzil.omegasource.magus.skill.forms.Form; +import net.minecraft.client.Minecraft; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; +import org.apache.logging.log4j.LogManager; +import java.util.ArrayList; import java.util.List; +import java.util.function.Consumer; + public class MouseMotionModule extends InputModule { + private final Consumer tickEventConsumer; + public List mouseGesture; + public MouseVircle vircle; + private Form activeForm = new Form(); + private int ticksSinceActivated = 0; + private int ticksSinceModifiersSent = 0; + + private final int tickActivationThreshold = 15; + private final int tickTimeoutThreshold = 60; + private final int modifierTickThreshold = 10; + private boolean listen; + Minecraft mc = Minecraft.getInstance(); + + public MouseMotionModule() { + this.mouseGesture = new ArrayList<>(); + this.listen = true; + + this.tickEventConsumer = tickEvent -> { + + ticksSinceModifiersSent++; + if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { + sendModifierData(); + } + + if (Magus.keyboardInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { + Minecraft mci = Minecraft.getInstance(); + assert mci.player != null; + double x = mci.mouseHandler.xpos(); + double y = mci.mouseHandler.ypos(); + Vec3 lookAngle = mci.player.getLookAngle(); + if (vircle == null) { + vircle = new MouseVircle(new MousePointInput(x, y, lookAngle)); + } else { + vircle.track(new MousePointInput(x, y, lookAngle)); + if (vircle.hasMotionDirection()) { + mouseGesture.add(vircle.popMotionDirection()); + } + } + } else { + if (!mouseGesture.isEmpty()) { +// System.out.println("Mouse Gesture: " + mouseGesture); + mouseGesture.clear(); + } + } + + if(activeForm.name() != null) { + ticksSinceActivated++; + if(ticksSinceActivated >= tickActivationThreshold) { +// if (lastActivatedForm != null) +// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); +// else +// LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); +// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); + lastActivatedForm = activeForm; + activeForm = new Form(); + ticksSinceActivated = 0; + } + } + else { + ticksSinceActivated++; + if (ticksSinceActivated >= tickTimeoutThreshold) { + lastActivatedForm = null; + ticksSinceActivated = 0; + } + } + }; + } + + private void sendModifierData() { + LogManager.getLogger().info("SENDING MODIFIER DATA"); + synchronized (modifierQueue) { + MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); + ticksSinceModifiersSent = 0; + modifierQueue.clear(); + } + } + @Override public void registerInputData(List formExecutionInputs, Form formToExecute, Condition condition) { + //generate condition from InputData. + Runnable onSuccess = () -> { + if(mc.level != null) { + //this section is to prevent re-activating + // single condition forms when you hold the activation key for Held modifiers + if(formToExecute != lastActivatedForm) { + //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); + activeForm = formToExecute; + } + ticksSinceActivated = 0; + } + }; + Runnable onFailure = () -> { + activeForm = new Form(); + //reset conditions? + // Magus.radixTree.burn(); + }; + if(condition != null) { + //Register listeners for condition created. + condition.register(formToExecute.name(), onSuccess, onFailure); + //add condition to InputModule registry so that it can be tracked. + formInputs.put(condition, formToExecute); + } else { + //todo errors/logging + } } @Override public void registerListeners() { - + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); } @Override - public void registerInputs() { - + public void unRegisterInputs() { + MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); + formInputs.forEach((condition, form) -> condition.unregister()); } @Override - public void unregisterInputs() { - + public void registerInputs() { + formInputs.forEach((condition, form) -> { + condition.register(); + }); } @Override public void toggleListeners() { - + if (!listen) { + registerListeners(); + registerInputs(); + listen = true; + } else { + unRegisterInputs(); + listen = false; + } } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 0e4eccfe..763c803b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -3,8 +3,8 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.PointMouseInput; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.SegmentMouseInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; import net.minecraft.client.Minecraft; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.MinecraftForge; @@ -26,7 +26,7 @@ public class KeyHoldCondition extends Condition { // False by default. private final boolean release; private boolean started = false; - public List mouseInputs = new ArrayList<>(); + public List mouseInputs = new ArrayList<>(); public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (duration < 0) @@ -44,21 +44,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.started = true; this.currentHolding++; Minecraft mci = Minecraft.getInstance(); - if (mci.player != null) { - double x = mci.mouseHandler.xpos(); - double y = mci.mouseHandler.ypos(); - Vec3 lookAngle = mci.player.getLookAngle(); - PointMouseInput pointMouseInput = new PointMouseInput(x, y, lookAngle); - mouseInputs.add(pointMouseInput); - } } else { - if (!mouseInputs.isEmpty()) { - List inputs = new ArrayList<>(mouseInputs); - SegmentMouseInput segment = new SegmentMouseInput(inputs); -// System.out.println("SEGMENT MOTION DIRECTION: " + segment.getMotionDirection()); -// System.out.println("SEGMENT AIM DIRECTION: " + segment.getAimDirection()); - mouseInputs.clear(); - } if (pressed(this.currentHolding, duration)) { // If the Condition requires the key being released.... if (release) { @@ -72,12 +58,12 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } } // If the duration is <= 3, then we want the Condition to act as a key press, rather than a hold. - if (pressed(this.currentHolding, duration)) { - // If the Condition doesn't require the key being released.... - if (!release) { - this.onSuccess.run(); - } - } +// if (pressed(this.currentHolding, duration)) { +// // If the Condition doesn't require the key being released.... +// if (!release) { +// this.onSuccess.run(); +// } +// } if (this.started) { // Timeout of -1 means that this should wait forever. if (timeout > -1 && this.currentTotal >= timeout) { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 1705589c..81e69dfe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -1,30 +1,14 @@ package com.amuzil.omegasource.magus.server; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardInputModule; -import com.amuzil.omegasource.magus.network.MagusNetwork; -import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; -import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; -import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; -import com.amuzil.omegasource.magus.radix.condition.input.FormCondition; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; -import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.EntityType; -import net.minecraft.world.entity.LightningBolt; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.level.Level; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.EntityLeaveLevelEvent; @@ -32,9 +16,6 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import java.util.ArrayList; -import java.util.List; - @Mod.EventBusSubscriber public class ServerEvents { @@ -159,8 +140,9 @@ public static void tickEvent(TickEvent.PlayerTickEvent event) { @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { if (event.getLevel().isClientSide() && event.getEntity() instanceof Player) { - Magus.keyboardInputModule.unregisterInputs(); - Magus.keyboardInputModule.resetKeys(); + Magus.keyboardInputModule.terminate(); + Magus.mouseInputModule.terminate(); + Magus.mouseMotionModule.terminate(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java index b9a70f7f..1924bd02 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java @@ -32,45 +32,45 @@ public static MouseWheelInput createWheelInput(Direction direction, int time) { return new MouseWheelInput(direction, time); } - public static SegmentMouseInput createSegmentMouseInput(PointMouseInput... inputs) { - return new SegmentMouseInput(List.of(inputs)); + public static MouseMotionInput createSegmentMouseInput(MousePointInput... inputs) { + return new MouseMotionInput(List.of(inputs)); } - public static ShapeMouseInput createChainedMouseInput(SegmentMouseInput... inputs) { - return new ShapeMouseInput(new LinkedList<>(List.of(inputs))); + public static MouseShapeInput createChainedMouseInput(MouseMotionInput... inputs) { + return new MouseShapeInput(new LinkedList<>(List.of(inputs))); } // Utility to create a line from a start to an end with linear interpolation - public static SegmentMouseInput createLine(PointMouseInput start, PointMouseInput end, int numPoints) { - List points = new LinkedList<>(); + public static MouseMotionInput createLine(MousePointInput start, MousePointInput end, int numPoints) { + List points = new LinkedList<>(); for (int i = 0; i <= numPoints; i++) { double t = i / (double) numPoints; double x = (1 - t) * start.x() + t * end.x(); double y = (1 - t) * start.y() + t * end.y(); if(Minecraft.getInstance().player != null) - points.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + points.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } - return new SegmentMouseInput(points); + return new MouseMotionInput(points); } // Utility to create a polygon from a list of vertices - public static ShapeMouseInput createPolygon(List vertices) { - List segments = new LinkedList<>(); + public static MouseShapeInput createPolygon(List vertices) { + List segments = new LinkedList<>(); for (int i = 0; i < vertices.size(); i++) { - PointMouseInput start = vertices.get(i); - PointMouseInput end = vertices.get((i + 1) % vertices.size()); // Wrap around to close the shape + MousePointInput start = vertices.get(i); + MousePointInput end = vertices.get((i + 1) % vertices.size()); // Wrap around to close the shape segments.add(createLine(start, end, 10)); // Adjust numPoints as needed } - return new ShapeMouseInput(segments); + return new MouseShapeInput(segments); } // Create a polygon with interpolated points between vertices based on distanceBetweenPoints - public static ShapeMouseInput createPolygonWithInterpolation(List vertices, double distanceBetweenPoints) { - List segments = new LinkedList<>(); + public static MouseShapeInput createPolygonWithInterpolation(List vertices, double distanceBetweenPoints) { + List segments = new LinkedList<>(); for (int i = 0; i < vertices.size(); i++) { - PointMouseInput start = vertices.get(i); - PointMouseInput end = vertices.get((i + 1) % vertices.size()); // Wrap around to close the shape + MousePointInput start = vertices.get(i); + MousePointInput end = vertices.get((i + 1) % vertices.size()); // Wrap around to close the shape // Calculate distance between start and end double dx = end.x() - start.x(); @@ -83,6 +83,6 @@ public static ShapeMouseInput createPolygonWithInterpolation(List mouseInputs) { +public record MouseMotionInput(List mouseInputs) { - public PointMouseInput start() { + public MousePointInput start() { return mouseInputs.get(0); } - public PointMouseInput end() { + public MousePointInput end() { return mouseInputs().get(mouseInputs().size() - 1); } @@ -22,16 +22,16 @@ public Vec3 getAimDirection() { } public String getMotionDirection() { - PointMouseInput first = start(); + MousePointInput first = start(); Vec3 mouseDirection = getMouseDirection(); String direction = ""; - double degree_span = 45.0D; // Note: 45° doesn't cover the entire unit circle, leaving room to recognize diagonals + double degree_span = 90.0D; // Note: 45° doesn't cover the entire unit circle, leaving room to recognize diagonals Vec3 right = new Vec3(-first.lookAngle().z(), first.lookAngle().y(), first.lookAngle().x()).normalize(); Vec3 left = new Vec3(first.lookAngle().z(), first.lookAngle().y(), -first.lookAngle().x()).normalize(); - if (mouseDirection.y() > 0.7D) { + if (mouseDirection.y() > 0.45D) { direction = "up"; - } else if (mouseDirection.y() < -0.7D) { + } else if (mouseDirection.y() < -0.45D) { direction = "down"; } else if (getAngle2D(right, mouseDirection) <= degree_span) { direction = "right"; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java index aa8d93ce..e4034a3a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePathComparator.java @@ -12,8 +12,8 @@ public MousePathComparator(double errorMargin) { } // Generate a circular shape centered at the player's mouse position with rotation and scaling - public static ShapeMouseInput generateCircle(PointMouseInput center, double scale, double rotationDegrees, double distanceBetweenPoints) { - List points = new ArrayList<>(); + public static MouseShapeInput generateCircle(MousePointInput center, double scale, double rotationDegrees, double distanceBetweenPoints) { + List points = new ArrayList<>(); // Calculate the number of points based on circumference and desired distance between points double circumference = 2 * Math.PI * scale; @@ -27,15 +27,15 @@ public static ShapeMouseInput generateCircle(PointMouseInput center, double scal double x = center.x() + scale * Math.cos(angle + rotationRadians); double y = center.y() - scale * Math.sin(angle + rotationRadians); // Flip y-axis if(Minecraft.getInstance().player != null) - points.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + points.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } - SegmentMouseInput segmentInput = new SegmentMouseInput(points); - return new ShapeMouseInput(List.of(segmentInput)); + MouseMotionInput segmentInput = new MouseMotionInput(points); + return new MouseShapeInput(List.of(segmentInput)); } // Generate a straight line starting from the player's mouse position with rotation and scaling - public static ShapeMouseInput generateLine(PointMouseInput start, double scale, double rotationDegrees, double distanceBetweenPoints) { - List points = new ArrayList<>(); + public static MouseShapeInput generateLine(MousePointInput start, double scale, double rotationDegrees, double distanceBetweenPoints) { + List points = new ArrayList<>(); // Calculate the number of points based on length and desired distance between points int numPoints = Math.max(2, (int) (scale / distanceBetweenPoints)); @@ -50,15 +50,15 @@ public static ShapeMouseInput generateLine(PointMouseInput start, double scale, double x = start.x() + t * (endX - start.x()); double y = start.y() + t * (endY - start.y()); if (Minecraft.getInstance().player != null) - points.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + points.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } - SegmentMouseInput line = new SegmentMouseInput(points); - return new ShapeMouseInput(List.of(line)); + MouseMotionInput line = new MouseMotionInput(points); + return new MouseShapeInput(List.of(line)); } // Generate a polygon centered at the player's mouse position with rotation and scaling - public static ShapeMouseInput generatePolygon(PointMouseInput center, int sides, double scale, double rotationDegrees, double distanceBetweenPoints, boolean isDiamond) { - List vertices = new ArrayList<>(); + public static MouseShapeInput generatePolygon(MousePointInput center, int sides, double scale, double rotationDegrees, double distanceBetweenPoints, boolean isDiamond) { + List vertices = new ArrayList<>(); double angleIncrement = 2 * Math.PI / sides; double rotationRadians = Math.toRadians(rotationDegrees); @@ -73,7 +73,7 @@ public static ShapeMouseInput generatePolygon(PointMouseInput center, int sides, double x = center.x() + scale * Math.cos(angle); double y = center.y() - scale * Math.sin(angle); // Flip y-axis if (Minecraft.getInstance().player != null) - vertices.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + vertices.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } // Interpolate points between vertices based on distanceBetweenPoints @@ -81,8 +81,8 @@ public static ShapeMouseInput generatePolygon(PointMouseInput center, int sides, } // Generate a star shape centered at the player's mouse position with rotation and scaling - public static ShapeMouseInput generateStar(PointMouseInput center, int pointsCount, double scale, double rotationDegrees, double distanceBetweenPoints) { - List vertices = new ArrayList<>(); + public static MouseShapeInput generateStar(MousePointInput center, int pointsCount, double scale, double rotationDegrees, double distanceBetweenPoints) { + List vertices = new ArrayList<>(); double angleIncrement = Math.PI / pointsCount; double rotationRadians = Math.toRadians(rotationDegrees); @@ -96,7 +96,7 @@ public static ShapeMouseInput generateStar(PointMouseInput center, int pointsCou double x = center.x() + radius * Math.cos(angle); double y = center.y() - radius * Math.sin(angle); // Flip y-axis if (Minecraft.getInstance().player != null) - vertices.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + vertices.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } // Interpolate points between vertices based on distanceBetweenPoints @@ -104,8 +104,8 @@ public static ShapeMouseInput generateStar(PointMouseInput center, int pointsCou } // Spiral!!! - public static ShapeMouseInput generateSpiral(PointMouseInput center, int turns, double initialRadius, double finalRadius, double rotationDegrees, double distanceBetweenPoints) { - List points = new ArrayList<>(); + public static MouseShapeInput generateSpiral(MousePointInput center, int turns, double initialRadius, double finalRadius, double rotationDegrees, double distanceBetweenPoints) { + List points = new ArrayList<>(); double rotationRadians = Math.toRadians(rotationDegrees); double totalAngle = 2 * Math.PI * turns; @@ -119,34 +119,34 @@ public static ShapeMouseInput generateSpiral(PointMouseInput center, int turns, double x = center.x() + radius * Math.cos(angle + rotationRadians); double y = center.y() - radius * Math.sin(angle + rotationRadians); // Flip y-axis if (Minecraft.getInstance().player != null) - points.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + points.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); angle += angleIncrement; radius += radiusIncrement * angleIncrement; } - SegmentMouseInput segmentInput = new SegmentMouseInput(points); - return new ShapeMouseInput(List.of(segmentInput)); + MouseMotionInput segmentInput = new MouseMotionInput(points); + return new MouseShapeInput(List.of(segmentInput)); } - public static boolean compare(ShapeMouseInput playerInput, ShapeMouseInput targetShape, double errorMargin) { + public static boolean compare(MouseShapeInput playerInput, MouseShapeInput targetShape, double errorMargin) { // Resample the player's input to have a fixed number of points - List resampledPlayerPoints = resamplePoints(playerInput.getFullPath(), 64); + List resampledPlayerPoints = resamplePoints(playerInput.getFullPath(), 64); // Rotate to align with the target shape - List rotatedPlayerPoints = rotateToZero(resampledPlayerPoints); + List rotatedPlayerPoints = rotateToZero(resampledPlayerPoints); // Scale to a reference square - List scaledPlayerPoints = scaleToSquare(rotatedPlayerPoints, 250); + List scaledPlayerPoints = scaleToSquare(rotatedPlayerPoints, 250); // Translate to origin - List normalizedPlayerPoints = translateToOrigin(scaledPlayerPoints); + List normalizedPlayerPoints = translateToOrigin(scaledPlayerPoints); // Prepare the target shape in the same way - List resampledTargetPoints = resamplePoints(targetShape.getFullPath(), 64); - List rotatedTargetPoints = rotateToZero(resampledTargetPoints); - List scaledTargetPoints = scaleToSquare(rotatedTargetPoints, 250); - List normalizedTargetPoints = translateToOrigin(scaledTargetPoints); + List resampledTargetPoints = resamplePoints(targetShape.getFullPath(), 64); + List rotatedTargetPoints = rotateToZero(resampledTargetPoints); + List scaledTargetPoints = scaleToSquare(rotatedTargetPoints, 250); + List normalizedTargetPoints = translateToOrigin(scaledTargetPoints); // Compute the path distance between the two point paths double distance = pathDistance(normalizedPlayerPoints, normalizedTargetPoints); @@ -155,11 +155,11 @@ public static boolean compare(ShapeMouseInput playerInput, ShapeMouseInput targe } // Resample the points to a fixed number - private static List resamplePoints(List points, int n) { + private static List resamplePoints(List points, int n) { double pathLength = getPathLength(points); double interval = pathLength / (n - 1); double D = 0.0; - List newPoints = new ArrayList<>(); + List newPoints = new ArrayList<>(); newPoints.add(points.get(0)); for (int i = 1; i < points.size(); i++) { @@ -168,9 +168,9 @@ private static List resamplePoints(List points double t = (interval - D) / d; double x = points.get(i - 1).x() + t * (points.get(i).x() - points.get(i - 1).x()); double y = points.get(i - 1).y() + t * (points.get(i).y() - points.get(i - 1).y()); - PointMouseInput newPoint = null; + MousePointInput newPoint = null; if (Minecraft.getInstance().player != null) - newPoint = new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle()); + newPoint = new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle()); newPoints.add(newPoint); points.add(i, newPoint); D = 0.0; @@ -185,59 +185,59 @@ private static List resamplePoints(List points } // Rotate the points so that the indicative angle is at zero - private static List rotateToZero(List points) { - PointMouseInput centroid = getCentroid(points); + private static List rotateToZero(List points) { + MousePointInput centroid = getCentroid(points); double theta = Math.atan2(points.get(0).y() - centroid.y(), points.get(0).x() - centroid.x()); return rotateBy(points, -theta); } - private static List rotateBy(List points, double angle) { - PointMouseInput centroid = getCentroid(points); - List newPoints = new ArrayList<>(); - for (PointMouseInput point : points) { + private static List rotateBy(List points, double angle) { + MousePointInput centroid = getCentroid(points); + List newPoints = new ArrayList<>(); + for (MousePointInput point : points) { double x = (point.x() - centroid.x()) * Math.cos(angle) - (point.y() - centroid.y()) * Math.sin(angle) + centroid.x(); double y = (point.x() - centroid.x()) * Math.sin(angle) + (point.y() - centroid.y()) * Math.cos(angle) + centroid.y(); if (Minecraft.getInstance().player != null) - newPoints.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + newPoints.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } return newPoints; } // Scale the points to a reference square - private static List scaleToSquare(List points, double size) { - double minX = points.stream().mapToDouble(PointMouseInput::x).min().orElse(0); - double maxX = points.stream().mapToDouble(PointMouseInput::x).max().orElse(0); - double minY = points.stream().mapToDouble(PointMouseInput::y).min().orElse(0); - double maxY = points.stream().mapToDouble(PointMouseInput::y).max().orElse(0); + private static List scaleToSquare(List points, double size) { + double minX = points.stream().mapToDouble(MousePointInput::x).min().orElse(0); + double maxX = points.stream().mapToDouble(MousePointInput::x).max().orElse(0); + double minY = points.stream().mapToDouble(MousePointInput::y).min().orElse(0); + double maxY = points.stream().mapToDouble(MousePointInput::y).max().orElse(0); double width = maxX - minX; double height = maxY - minY; - List newPoints = new ArrayList<>(); - for (PointMouseInput point : points) { + List newPoints = new ArrayList<>(); + for (MousePointInput point : points) { double x = (point.x() - minX) * (size / width); double y = (point.y() - minY) * (size / height); if (Minecraft.getInstance().player != null) - newPoints.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + newPoints.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } return newPoints; } // Translate the points so that the centroid is at the origin - private static List translateToOrigin(List points) { - PointMouseInput centroid = getCentroid(points); - List newPoints = new ArrayList<>(); - for (PointMouseInput point : points) { + private static List translateToOrigin(List points) { + MousePointInput centroid = getCentroid(points); + List newPoints = new ArrayList<>(); + for (MousePointInput point : points) { double x = point.x() - centroid.x(); double y = point.y() - centroid.y(); if (Minecraft.getInstance().player != null) - newPoints.add(new PointMouseInput(x, y, Minecraft.getInstance().player.getLookAngle())); + newPoints.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } return newPoints; } // Calculate the path distance between two point paths - private static double pathDistance(List path1, List path2) { + private static double pathDistance(List path1, List path2) { double distance = 0.0; for (int i = 0; i < path1.size(); i++) { distance += euclideanDistance(path1.get(i), path2.get(i)); @@ -246,11 +246,11 @@ private static double pathDistance(List path1, List points) { + private static double getPathLength(List points) { double length = 0.0; for (int i = 1; i < points.size(); i++) { length += euclideanDistance(points.get(i - 1), points.get(i)); @@ -258,16 +258,16 @@ private static double getPathLength(List points) { return length; } - private static PointMouseInput getCentroid(List points) { - double xSum = points.stream().mapToDouble(PointMouseInput::x).sum(); - double ySum = points.stream().mapToDouble(PointMouseInput::y).sum(); + private static MousePointInput getCentroid(List points) { + double xSum = points.stream().mapToDouble(MousePointInput::x).sum(); + double ySum = points.stream().mapToDouble(MousePointInput::y).sum(); assert Minecraft.getInstance().player != null; - return new PointMouseInput(xSum / points.size(), ySum / points.size(), Minecraft.getInstance().player.getLookAngle()); + return new MousePointInput(xSum / points.size(), ySum / points.size(), Minecraft.getInstance().player.getLookAngle()); } // Helper method to normalize the number of points - private static List normalizePoints(List points, int desiredSize) { - List normalizedPoints = new ArrayList<>(); + private static List normalizePoints(List points, int desiredSize) { + List normalizedPoints = new ArrayList<>(); double step = (points.size() - 1) / (double) (desiredSize - 1); for (int i = 0; i < desiredSize; i++) { int index = (int) Math.round(i * step); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePointInput.java similarity index 92% rename from src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java rename to src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePointInput.java index 1fdc1a4b..63256713 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/PointMouseInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePointInput.java @@ -14,5 +14,5 @@ * * Get a Bézier curve function working. This tracks input segments, then we path through the input segments. */ -public record PointMouseInput(double x, double y, Vec3 lookAngle) implements InputData { +public record MousePointInput(double x, double y, Vec3 lookAngle) implements InputData { } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseShapeInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseShapeInput.java new file mode 100644 index 00000000..13b4cd9d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseShapeInput.java @@ -0,0 +1,15 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +import java.util.LinkedList; +import java.util.List; + +public record MouseShapeInput(List mouseInputs) { + + public List getFullPath() { + List path = new LinkedList<>(); + for (MouseMotionInput segment : mouseInputs()) { + path.addAll(segment.mouseInputs()); + } + return path; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseVircle.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseVircle.java new file mode 100644 index 00000000..d3767e4a --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseVircle.java @@ -0,0 +1,60 @@ +package com.amuzil.omegasource.magus.skill.conditionals.mouse; + +import net.minecraft.world.phys.Vec3; + +import java.util.ArrayList; +import java.util.List; + +public class MouseVircle { + // Class that represents a virtual circle around the cursor + + private float sphereRadius = 0.7F; + private Vec3 centroid, aimDirection; + private String motionDirection = ""; + public List mouseInputs = new ArrayList<>(); + + public MouseVircle(MousePointInput point) { + this.centroid = point.lookAngle(); + this.mouseInputs.add(point); + } + + public void track(MousePointInput point) { + mouseInputs.add(point); + generateVircle(point.lookAngle()); + } + + public void generateVircle(Vec3 point) { + if (!hasPoint(point)) { + centroid = point; + MouseMotionInput motionInputs = new MouseMotionInput(mouseInputs); + motionDirection = motionInputs.getMotionDirection(); + aimDirection = motionInputs.getAimDirection(); + mouseInputs.clear(); +// System.out.println("Moved -> " + motionDirection); + } + } + + public boolean hasPoint(Vec3 point) { + // Let the sphere's centre coordinates be (cx, cy, cz) and its radius be r, + // then point (x, y, z) is in the sphere if sqrt( (x−cx)^2 + (y−cy)^2 + (z−cz)^2 ) <= r. + double xcx = Math.pow(point.x - centroid.x, 2); + double ycy = Math.pow(point.y - centroid.y, 2); + double zcz = Math.pow(point.z - centroid.z, 2); + double radial_dist = Math.sqrt(xcx + ycy + zcz); + return radial_dist <= sphereRadius; + } + + public boolean hasMotionDirection() { + return !motionDirection.isEmpty(); + } + + public String popMotionDirection() { + String popValue = motionDirection; + motionDirection = ""; + return popValue; + } + + public Vec3 getAimDirection() { + return aimDirection; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java deleted file mode 100644 index 836691fc..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/ShapeMouseInput.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.amuzil.omegasource.magus.skill.conditionals.mouse; - -import java.util.LinkedList; -import java.util.List; - -public record ShapeMouseInput(List mouseInputs) { - - public List getFullPath() { - List path = new LinkedList<>(); - for (SegmentMouseInput segment : mouseInputs()) { - path.addAll(segment.mouseInputs()); - } - return path; - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index b2f2120d..e8cdb311 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -33,11 +33,11 @@ public static void registerForms() { FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, InputConstants.Type.MOUSE); FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, InputConstants.Type.MOUSE); FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, InputConstants.Type.KEYSYM); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.BREATHE, InputConstants.Type.KEYSYM); FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, InputConstants.Type.MOUSE); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(held), Forms.BREATHE); // FormDataRegistry.registerForm(Forms.PUSH); // FormDataRegistry.registerForm(Forms.PULL); // FormDataRegistry.registerForm(Forms.RAISE); From 7c9de1358391f85d9340c6da07eccefc7471ed7b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 20 Sep 2024 13:31:47 +1000 Subject: [PATCH 249/469] Pulling before doing more work on the form registry --- .../magus/input/InputModuleData.java | 18 +++++++++++++++++ .../magus/server/ServerEvents.java | 2 +- .../magus/skill/forms/FormDataRegistry.java | 20 +++++++++++++------ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java new file mode 100644 index 00000000..69b14489 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java @@ -0,0 +1,18 @@ +package com.amuzil.omegasource.magus.input; + +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; + +import java.util.HashMap; + +public class InputModuleData { + private HashMap inputTypes; + private HashMap conditionTypes; + +// public InputModuleData() { +// this. +// } + + +} diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 1705589c..41c3bd82 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -135,7 +135,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { AvatarFormRegistry.registerForms(); Magus.keyboardInputModule.init(); Magus.mouseInputModule.init(); - Magus.mouseMotionModule.init(); +// Magus.mouseMotionModule.init(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 98d7636d..72e7e47e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.mojang.blaze3d.platform.InputConstants; @@ -13,7 +14,7 @@ public class FormDataRegistry { - //TODO: Change this to use Conditions rather than a list of input data + //TODO: Change this to use Conditions rather than a list of input data, and use a hashmap of input types private static Map, Form> formTypes; private static Map> formConditions; @@ -32,7 +33,7 @@ public static List getInputsForForm(Form formToModify) { } - public static void registerForm(List inputs, Form form, InputConstants.Type inputType) { + public static void registerForm(List inputs, Form form, RadixTree.InputType type) { formTypes.put(inputs, form); // Register the requisite conditions List conditions = new ArrayList<>(); @@ -43,10 +44,17 @@ public static void registerForm(List inputs, Form form, InputConstant conditions.add(condition); formConditions.put(form, conditions); // Register the raw input data - if (inputType == InputConstants.Type.KEYSYM) - Magus.keyboardInputModule.registerInputData(inputs, form, condition); - else - Magus.mouseInputModule.registerInputData(inputs, form, condition); + switch (type) { + // I can dream... + case VR -> { + } + case KEYBOARD -> Magus.keyboardInputModule.registerInputData(inputs, form, condition); + case MOUSE -> Magus.mouseInputModule.registerInputData(inputs, form, condition); + + } + Magus.keyboardInputModule.registerInputData(inputs, form, condition); +// else +// Magus.mouseInputModule.registerInputData(inputs, form, condition); } public static List getConditionsFrom(Form form) { From 3ece2efee9d252b614d39ae5ad9746d428be2f5d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 20 Sep 2024 13:35:33 +1000 Subject: [PATCH 250/469] Fixed compilation errors --- .../magus/skill/forms/FormDataRegistry.java | 7 ++----- .../skill/test/avatar/AvatarFormRegistry.java | 14 +++++++------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 72e7e47e..f355c9ea 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -34,7 +34,6 @@ public static List getInputsForForm(Form formToModify) { public static void registerForm(List inputs, Form form, RadixTree.InputType type) { - formTypes.put(inputs, form); // Register the requisite conditions List conditions = new ArrayList<>(); if (formConditions.containsKey(form)) { @@ -50,11 +49,9 @@ public static void registerForm(List inputs, Form form, RadixTree.Inp } case KEYBOARD -> Magus.keyboardInputModule.registerInputData(inputs, form, condition); case MOUSE -> Magus.mouseInputModule.registerInputData(inputs, form, condition); + case MOUSE_MOTION -> Magus.mouseMotionModule.registerInputData(inputs, form, condition); } - Magus.keyboardInputModule.registerInputData(inputs, form, condition); -// else -// Magus.mouseInputModule.registerInputData(inputs, form, condition); } public static List getConditionsFrom(Form form) { @@ -64,6 +61,6 @@ public static List getConditionsFrom(Form form) { public static void registerForm(InputData input, Form form) { List singleton = new ArrayList<>(); singleton.add(input); - registerForm(singleton, form, InputConstants.Type.KEYSYM); + registerForm(singleton, form, RadixTree.InputType.KEYBOARD); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index e8cdb311..bf3607a5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.test.avatar; import com.amuzil.omegasource.magus.input.KeyboardInputModule; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; @@ -9,7 +10,6 @@ import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; -import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import java.util.LinkedList; @@ -30,11 +30,11 @@ public static void registerForms() { // TODO: Rather than having "push", "pull", "raise", and "lower" as Forms, // make them Effects using the Force Form, Direction modifier & Target Modifier - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, InputConstants.Type.MOUSE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, InputConstants.Type.MOUSE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, InputConstants.Type.KEYSYM); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.BREATHE, InputConstants.Type.KEYSYM); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, InputConstants.Type.MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, RadixTree.InputType.MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, RadixTree.InputType.MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, RadixTree.InputType.KEYBOARD); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.BREATHE, RadixTree.InputType.KEYBOARD); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, RadixTree.InputType.MOUSE); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); @@ -62,7 +62,7 @@ public static void registerForms() { // Has to be a relatively quick input. second = KeyDataBuilder.createInput(key.getValue(), 0, 15); inputs.add(KeyDataBuilder.createChainedInput(first, second)); - FormDataRegistry.registerForm(inputs, Forms.STEP, InputConstants.Type.KEYSYM); + FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD); } } } From fb9e4d4c4d087a0345287fe08e9f54b479dbe43d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 20 Sep 2024 13:49:56 +1000 Subject: [PATCH 251/469] Trying to fix our formdataregistry --- .../magus/input/InputModuleData.java | 34 ++++++++++++++--- .../minecraft/forge/key/KeyHoldCondition.java | 4 ++ .../magus/skill/forms/FormDataRegistry.java | 15 ++------ .../listeners/KeyHeldModifierListener.java | 37 ++++++++++--------- 4 files changed, 56 insertions(+), 34 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java index 69b14489..fe0f6f3e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java @@ -5,14 +5,38 @@ import com.amuzil.omegasource.magus.skill.conditionals.InputData; import java.util.HashMap; +import java.util.List; public class InputModuleData { - private HashMap inputTypes; - private HashMap conditionTypes; + private HashMap> inputTypes; + private HashMap> conditionTypes; -// public InputModuleData() { -// this. -// } + public InputModuleData() { + this.inputTypes = new HashMap<>(); + this.conditionTypes = new HashMap<>(); + } + + public void addTypeConditions(RadixTree.InputType type, List conditions) { + if (!conditionTypes.containsKey(type)) { + this.conditionTypes.put(type, conditions); + } + else { + List existingConditions = this.conditionTypes.get(type); + existingConditions.addAll(conditions); + this.conditionTypes.put(type, existingConditions); + } + } + + public void addTypeInputs(RadixTree.InputType type, List inputs) { + if (!inputTypes.containsKey(type)) { + this.inputTypes.put(type, inputs); + } + else { + List existingInputs = this.inputTypes.get(type); + existingInputs.addAll(inputTypes.get(type)); + this.inputTypes.put(type, existingInputs); + } + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 763c803b..727708dc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -77,6 +77,10 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.registerEntry(); } + public int getHeld() { + return this.currentHolding; + } + public boolean pressed(int held, int duration) { boolean pressed = held >= duration || held > 0 && duration <= KEY_PRESS_TIMEOUT; // LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration + ", result: " + pressed); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index f355c9ea..6f26f134 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -5,12 +5,8 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.mojang.blaze3d.platform.InputConstants; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public class FormDataRegistry { @@ -24,21 +20,18 @@ public static void init() { formConditions = new HashMap<>(); } - public static Form getFormByName(String formName) { - return formTypes.entrySet().stream().filter(form -> form.getValue().name().equals(formName)).findFirst().get().getValue(); - } - - public static List getInputsForForm(Form formToModify) { + public static List getInputsForForm(Form formToModify, RadixTree.InputType type) { return formTypes.entrySet().stream().filter(form -> form.getValue().name().equals(formToModify.name())).findFirst().get().getKey(); } public static void registerForm(List inputs, Form form, RadixTree.InputType type) { // Register the requisite conditions - List conditions = new ArrayList<>(); + List conditions; if (formConditions.containsKey(form)) { conditions = formConditions.get(form); } + else conditions = new LinkedList<>(); Condition condition = ConditionBuilder.instance().fromInputData(inputs).build(); conditions.add(condition); formConditions.put(form, conditions); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 3cc6cfba..3d1cf389 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardInputModule; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -41,24 +42,24 @@ public void unregister() { @Override public void setupListener(CompoundTag compoundTag) { - Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); - List formConditions = FormDataRegistry.getInputsForForm(formToModify); - - int keyToHold = ((KeyHoldCondition) new ConditionBuilder().fromInputData(formConditions.get(formConditions.size() - 1)).build()).getKey(); - - this.clientTickListener = event -> { - if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - if (((KeyboardInputModule)Magus.keyboardInputModule).keyPressed(keyToHold)) { - this.isHeld = true; - this.currentHolding++; - } else { - if(this.isHeld) { - this.wasHeld = true; - this.isHeld = false; - } - } - } - }; +// Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); +// List formConditions = FormDataRegistry.getInputsForForm(formToModify, RadixTree.InputType.KEYBOARD); +// +// int keyToHold = ((KeyHoldCondition) new ConditionBuilder().fromInputData(formConditions.get(formConditions.size() - 1)).build()).getKey(); +// +// this.clientTickListener = event -> { +// if (event.phase == TickEvent.ClientTickEvent.Phase.START) { +// if (((KeyboardInputModule)Magus.keyboardInputModule).keyPressed(keyToHold)) { +// this.isHeld = true; +// this.currentHolding++; +// } else { +// if(this.isHeld) { +// this.wasHeld = true; +// this.isHeld = false; +// } +// } +// } +// }; } @Override From 5d0060cddca267dfc07dfe282b49268d9f67f885 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 19 Sep 2024 23:54:32 -0400 Subject: [PATCH 252/469] delete un-used method --- .../omegasource/magus/server/ServerEvents.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index c1e29d8f..074d7324 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -121,22 +121,6 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } - @SubscribeEvent - public static void tickEvent(TickEvent.PlayerTickEvent event) { - Minecraft minecraft = Minecraft.getInstance(); - Player player = event.player; - // Get the current mouse X and Y positions - double mouseX = minecraft.mouseHandler.xpos(); - double mouseY = minecraft.mouseHandler.ypos(); - - // Print the mouse coordinates -// System.out.println("Mouse X: " + mouseX + ", Mouse Y: " + mouseY); -// if (player.tickCount % 10 == 0) { -// System.out.println("Mouse X : " + mouseX + ", Mouse Y: " + mouseY); -// } - - } - @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { if (event.getLevel().isClientSide() && event.getEntity() instanceof Player) { From 303d5d7e2d6eca9c9f9e20fcce0375cf32e224eb Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 20 Sep 2024 14:48:26 +1000 Subject: [PATCH 253/469] Form Data Registry functional! --- .../omegasource/magus/input/InputModule.java | 2 +- .../magus/input/InputModuleData.java | 60 ++++++++++----- .../magus/input/KeyboardInputModule.java | 74 +++++++++++-------- .../magus/input/MouseInputModule.java | 2 +- .../magus/input/MouseMotionModule.java | 8 +- .../omegasource/magus/skill/forms/Form.java | 18 +++++ .../magus/skill/forms/FormDataRegistry.java | 49 +++++++----- 7 files changed, 138 insertions(+), 75 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 35644cbe..172e90dd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -23,7 +23,7 @@ public abstract class InputModule { protected final Map modifierQueue = new HashMap<>(); protected Form lastActivatedForm = null; - public abstract void registerInputData(List formExecutionInputs, Form formToExecute, Condition condition); + public abstract void registerInputData(List formExecutionInputs, Form formToExecute, List conditions); public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { listener.setupListener(treeData); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java index fe0f6f3e..0333a991 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModuleData.java @@ -2,41 +2,67 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.radix.builders.InputConverter; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import java.util.HashMap; import java.util.List; +/** + * These exist per form. + */ public class InputModuleData { - private HashMap> inputTypes; - private HashMap> conditionTypes; + private final HashMap> inputs; + private final HashMap> conditions; public InputModuleData() { - this.inputTypes = new HashMap<>(); - this.conditionTypes = new HashMap<>(); + this.inputs = new HashMap<>(); + this.conditions = new HashMap<>(); } public void addTypeConditions(RadixTree.InputType type, List conditions) { - if (!conditionTypes.containsKey(type)) { - this.conditionTypes.put(type, conditions); - } - else { - List existingConditions = this.conditionTypes.get(type); + if (!this.conditions.containsKey(type)) { + this.conditions.put(type, conditions); + } else { + List existingConditions = this.conditions.get(type); existingConditions.addAll(conditions); - this.conditionTypes.put(type, existingConditions); + this.conditions.put(type, existingConditions); } } public void addTypeInputs(RadixTree.InputType type, List inputs) { - if (!inputTypes.containsKey(type)) { - this.inputTypes.put(type, inputs); - } - else { - List existingInputs = this.inputTypes.get(type); - existingInputs.addAll(inputTypes.get(type)); - this.inputTypes.put(type, existingInputs); + if (!this.inputs.containsKey(type)) { + this.inputs.put(type, inputs); + } else { + List existingInputs = this.inputs.get(type); + existingInputs.addAll(this.inputs.get(type)); + this.inputs.put(type, existingInputs); } } + /** + * Automatically fills out the type conditions based on its corresponding inputs. + * @param type What type of input module the inputs are for. + */ + public void fillConditions(RadixTree.InputType type) { + List inputs = getInputs(type); + List conditions = InputConverter.buildPathFrom(inputs); + addTypeConditions(type, conditions); + } + + public HashMap> getConditions() { + return conditions; + } + + public HashMap> getInputs() { + return inputs; + } + public List getConditions(RadixTree.InputType type) { + return getConditions().get(type); + } + + public List getInputs(RadixTree.InputType type) { + return getInputs().get(type); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 65909f0f..470bf7fd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import com.mojang.blaze3d.platform.InputConstants; @@ -119,38 +120,47 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute, Condition formCondition) { - //generate condition from InputData. - Runnable onSuccess = () -> { - if(mc.level != null) { - //this section is to prevent re-activating - // single condition forms when you hold the activation key for Held modifiers - - //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. - // I.e account for modifiers here. - if(formToExecute != lastActivatedForm) { - //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); - activeForm = formToExecute; - } - - ticksSinceActivated = 0; - } - //Reset condition - }; - Runnable onFailure = () -> { - activeForm = new Form(); - //reset conditions? - // Magus.radixTree.burn(); - }; - - if(formCondition != null) { - //Register listeners for condition created. - formCondition.register(formToExecute.name(), onSuccess, onFailure); - //add condition to InputModule registry so that it can be tracked. - formInputs.put(formCondition, formToExecute); - } else { - //todo errors/logging - } + public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { + // TODO: + // - Change formCondition to be a list of Conditions. + // - Have a createConditionPath(List conditions) method for each Form. + // - Call it here, then add the condition path to the radixtree. + + // Now, we call: + ConditionPath path = formToExecute.createPath(formCondition); + // add the path to the tree + +// //generate condition from InputData. +// Runnable onSuccess = () -> { +// if(mc.level != null) { +// //this section is to prevent re-activating +// // single condition forms when you hold the activation key for Held modifiers +// +// //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. +// // I.e account for modifiers here. +// if(formToExecute != lastActivatedForm) { +// //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); +// activeForm = formToExecute; +// } +// +// ticksSinceActivated = 0; +// } +// //Reset condition +// }; +// Runnable onFailure = () -> { +// activeForm = new Form(); +// //reset conditions? +// // Magus.radixTree.burn(); +// }; +// +// if(formCondition != null) { +// //Register listeners for condition created. +// formCondition.register(formToExecute.name(), onSuccess, onFailure); +// //add condition to InputModule registry so that it can be tracked. +// formInputs.put(formCondition, formToExecute); +// } else { +// //todo errors/logging +// } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index 9bb18059..42dbce2e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -131,7 +131,7 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute, Condition condition) { + public void registerInputData(List formExecutionInputs, Form formToExecute, List conditions) { //generate condition from InputData. Runnable onSuccess = () -> { if(mc.level != null) { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index 123dc6e8..b2ebf50b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -99,7 +99,7 @@ private void sendModifierData() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute, Condition condition) { + public void registerInputData(List formExecutionInputs, Form formToExecute, List conditions) { //generate condition from InputData. Runnable onSuccess = () -> { if(mc.level != null) { @@ -118,11 +118,11 @@ public void registerInputData(List formExecutionInputs, Form formToEx // Magus.radixTree.burn(); }; - if(condition != null) { + if(conditions != null) { //Register listeners for condition created. - condition.register(formToExecute.name(), onSuccess, onFailure); + conditions.register(formToExecute.name(), onSuccess, onFailure); //add condition to InputModule registry so that it can be tracked. - formInputs.put(condition, formToExecute); + formInputs.put(conditions, formToExecute); } else { //todo errors/logging } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 75602f3a..7c2944a5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -1,6 +1,12 @@ package com.amuzil.omegasource.magus.skill.forms; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; + +import java.util.ArrayList; +import java.util.List; public class Form { private String name; @@ -26,4 +32,16 @@ public Form(String name, String modID) { public String name() { return name; } + + // Can be freely overridden to alter a Form's path. + // Specifically, if InputData isn't specific enough for what you want to, feel free to alter it here. + public ConditionPath createPath(List conditions) { + ConditionPath path = new ConditionPath(); + List emptyData = new ArrayList<>(); + for (Condition condition : conditions) { + path.addStep(condition, emptyData); + } + + return path; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 6f26f134..1f332fb1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -1,54 +1,63 @@ package com.amuzil.omegasource.magus.skill.forms; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.InputModuleData; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import net.minecraft.resources.ResourceLocation; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class FormDataRegistry { - //TODO: Change this to use Conditions rather than a list of input data, and use a hashmap of input types - private static Map, Form> formTypes; - private static Map> formConditions; + private static Map formData; //Remember to see #InputConstants for the key names. public static void init() { - formTypes = new HashMap<>(); - formConditions = new HashMap<>(); + formData = new HashMap<>(); } + public static Form getFormByName(String formName) { + return Registries.FORMS.get().getValue(new ResourceLocation(formName)); + } public static List getInputsForForm(Form formToModify, RadixTree.InputType type) { - return formTypes.entrySet().stream().filter(form -> form.getValue().name().equals(formToModify.name())).findFirst().get().getKey(); + return formData.get(formToModify).getInputs(type); } public static void registerForm(List inputs, Form form, RadixTree.InputType type) { // Register the requisite conditions - List conditions; - if (formConditions.containsKey(form)) { - conditions = formConditions.get(form); + InputModuleData data; + if (formData.get(form) != null) { + data = formData.get(form); } - else conditions = new LinkedList<>(); - Condition condition = ConditionBuilder.instance().fromInputData(inputs).build(); - conditions.add(condition); - formConditions.put(form, conditions); + else data = new InputModuleData(); + data.addTypeInputs(type, inputs); + data.fillConditions(type); + // This replaces the value, and since our InputModuleData automatically adds conditions and input data to itself when necessary... + formData.put(form, data); + + // Need to pass this + List conditions = data.getConditions(type); // Register the raw input data switch (type) { // I can dream... case VR -> { } - case KEYBOARD -> Magus.keyboardInputModule.registerInputData(inputs, form, condition); - case MOUSE -> Magus.mouseInputModule.registerInputData(inputs, form, condition); - case MOUSE_MOTION -> Magus.mouseMotionModule.registerInputData(inputs, form, condition); + case KEYBOARD -> Magus.keyboardInputModule.registerInputData(inputs, form, conditions); + case MOUSE -> Magus.mouseInputModule.registerInputData(inputs, form, conditions); + case MOUSE_MOTION -> Magus.mouseMotionModule.registerInputData(inputs, form, conditions); } } - public static List getConditionsFrom(Form form) { - return formConditions.get(form); + public static List getConditionsFrom(Form form, RadixTree.InputType type) { + return formData.get(form).getConditions(type); } public static void registerForm(InputData input, Form form) { From f6e589f9fb36929efdbbd8104e31fe29f8383769 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 20 Sep 2024 14:50:05 +1000 Subject: [PATCH 254/469] made sure stuff compiles --- .../magus/input/MouseMotionModule.java | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index b2ebf50b..fbbddbfc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -101,31 +101,31 @@ private void sendModifierData() { @Override public void registerInputData(List formExecutionInputs, Form formToExecute, List conditions) { //generate condition from InputData. - Runnable onSuccess = () -> { - if(mc.level != null) { - //this section is to prevent re-activating - // single condition forms when you hold the activation key for Held modifiers - if(formToExecute != lastActivatedForm) { - //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); - activeForm = formToExecute; - } - ticksSinceActivated = 0; - } - }; - Runnable onFailure = () -> { - activeForm = new Form(); - //reset conditions? - // Magus.radixTree.burn(); - }; - - if(conditions != null) { - //Register listeners for condition created. - conditions.register(formToExecute.name(), onSuccess, onFailure); - //add condition to InputModule registry so that it can be tracked. - formInputs.put(conditions, formToExecute); - } else { - //todo errors/logging - } +// Runnable onSuccess = () -> { +// if(mc.level != null) { +// //this section is to prevent re-activating +// // single condition forms when you hold the activation key for Held modifiers +// if(formToExecute != lastActivatedForm) { +// //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); +// activeForm = formToExecute; +// } +// ticksSinceActivated = 0; +// } +// }; +// Runnable onFailure = () -> { +// activeForm = new Form(); +// //reset conditions? +// // Magus.radixTree.burn(); +// }; +// +// if(conditions != null) { +// //Register listeners for condition created. +// conditions.register(formToExecute.name(), onSuccess, onFailure); +// //add condition to InputModule registry so that it can be tracked. +// formInputs.put(conditions, formToExecute); +// } else { +// //todo errors/logging +// } } @Override From 48235e615e2cb8a5cd48112c6d37587f62baccd3 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 23 Sep 2024 00:48:51 +1000 Subject: [PATCH 255/469] Trying to fix the modifier listeners --- .../conditionals/key/ChainedKeyInput.java | 18 ++++++ .../skill/conditionals/key/MultiKeyInput.java | 11 +++- .../listeners/KeyHeldModifierListener.java | 58 +++++++++++-------- 3 files changed, 63 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/ChainedKeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/ChainedKeyInput.java index 70d86a96..cbdcd6d0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/ChainedKeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/ChainedKeyInput.java @@ -8,4 +8,22 @@ * Stores all possible permutations. */ public record ChainedKeyInput(LinkedList keys) implements InputData { + + public MultiKeyInput first() { + return keys.get(0); + } + + public MultiKeyInput last() { + return keys.get(keys.size() - 1); + } + + // First KeyInput in the record. + public KeyInput trueFirst() { + return first().first(); + } + + // Last KeyInput in the record. + public KeyInput trueLast() { + return last().last(); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/MultiKeyInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/MultiKeyInput.java index 4e9622ff..cfe7d4c5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/MultiKeyInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/key/MultiKeyInput.java @@ -11,4 +11,13 @@ * ONLY SUPPORTS MULTIPLE KEYS AT ONCE. DELAY IS USELESS HERE. If multiple keys are passed with *different* delay, * the key with the most delay will be read. */ -public record MultiKeyInput(LinkedList keys) implements InputData {} +public record MultiKeyInput(LinkedList keys) implements InputData { + + public KeyInput first() { + return keys.get(0); + } + + public KeyInput last() { + return keys.get(keys.size() - 1); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 3d1cf389..e0769b08 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -1,11 +1,11 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; @@ -42,33 +42,45 @@ public void unregister() { @Override public void setupListener(CompoundTag compoundTag) { -// Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); -// List formConditions = FormDataRegistry.getInputsForForm(formToModify, RadixTree.InputType.KEYBOARD); -// -// int keyToHold = ((KeyHoldCondition) new ConditionBuilder().fromInputData(formConditions.get(formConditions.size() - 1)).build()).getKey(); -// -// this.clientTickListener = event -> { -// if (event.phase == TickEvent.ClientTickEvent.Phase.START) { -// if (((KeyboardInputModule)Magus.keyboardInputModule).keyPressed(keyToHold)) { -// this.isHeld = true; -// this.currentHolding++; -// } else { -// if(this.isHeld) { -// this.wasHeld = true; -// this.isHeld = false; -// } -// } -// } -// }; + Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); + List formInputs = FormDataRegistry.getInputsForForm(formToModify, RadixTree.InputType.KEYBOARD); + + InputData lastInput = formInputs.get(formInputs.size() - 1); + int key; + if (lastInput instanceof ChainedKeyInput) { + key = ((ChainedKeyInput) lastInput).trueLast().key().getValue(); + } + else if (lastInput instanceof MultiKeyInput) { + key = ((MultiKeyInput) lastInput).last().key().getValue(); + } + else { + // If it's registered to the keyboard mouse input module, it's going to be some variant + // of KeyInput. + key = ((KeyInput) lastInput).key().getValue(); + } + + this.clientTickListener = event -> { + if (event.phase == TickEvent.ClientTickEvent.Phase.START) { + if (Magus.keyboardInputModule.keyPressed(key)) { + this.isHeld = true; + this.currentHolding++; + } else { + if (this.isHeld) { + this.wasHeld = true; + this.isHeld = false; + } + } + } + }; } @Override public boolean shouldCollectModifierData(TickEvent event) { - if(isHeld && currentHolding > 0) { + if (isHeld && currentHolding > 0) { return true; } //so that we send a packet to say we've stopped holding(for continuous cast ability support) - if(!this.isHeld && this.wasHeld) { + if (!this.isHeld && this.wasHeld) { this.wasHeld = false; Magus.keyboardInputModule.resetLastActivated(); return true; From c8624bd3b78dba69c21fc232756b9e349e78610f Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 25 Sep 2024 22:46:43 +1000 Subject: [PATCH 256/469] adjusted KeyHeldModifier for mouse vs keyboard modules --- .../listeners/KeyHeldModifierListener.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index e0769b08..5c924d35 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; @@ -16,6 +17,7 @@ import net.minecraftforge.event.TickEvent; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; public class KeyHeldModifierListener extends ModifierListener { @@ -23,9 +25,15 @@ public class KeyHeldModifierListener extends ModifierListener { private int currentHolding; private boolean isHeld = true; private boolean wasHeld = true; + private RadixTree.InputType type; public KeyHeldModifierListener() { + this(RadixTree.InputType.KEYBOARD); + } + + public KeyHeldModifierListener(RadixTree.InputType type) { this.modifierData = new HeldModifierData(); + this.type = type; } @Override @@ -43,7 +51,7 @@ public void unregister() { @Override public void setupListener(CompoundTag compoundTag) { Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); - List formInputs = FormDataRegistry.getInputsForForm(formToModify, RadixTree.InputType.KEYBOARD); + List formInputs = FormDataRegistry.getInputsForForm(formToModify, type); InputData lastInput = formInputs.get(formInputs.size() - 1); int key; @@ -59,9 +67,16 @@ else if (lastInput instanceof MultiKeyInput) { key = ((KeyInput) lastInput).key().getValue(); } + InputModule module; + if (Objects.requireNonNull(type) == RadixTree.InputType.MOUSE) { + module = Magus.mouseInputModule; + } else { + module = Magus.keyboardInputModule; + } + this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - if (Magus.keyboardInputModule.keyPressed(key)) { + if (module.keyPressed(key)) { this.isHeld = true; this.currentHolding++; } else { From a977a683820678f10c4417fef6ad4e1425760550 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 25 Sep 2024 22:47:39 +1000 Subject: [PATCH 257/469] Override method signature fix for KeyHeldModifier --- .../skill/modifiers/listeners/KeyHeldModifierListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 5c924d35..3627806d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -111,7 +111,7 @@ public ModifierData collectModifierDataFromEvent(TickEvent event) { } @Override - public ModifierListener copy() { + public KeyHeldModifierListener copy() { return new KeyHeldModifierListener(); } } From cb38d929855aecee0c9378201a797316cc9ae094 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 26 Sep 2024 01:50:46 +1000 Subject: [PATCH 258/469] trying to sort out forms for cali --- .../omegasource/magus/skill/forms/Forms.java | 1 + .../listeners/TargetModifierListener.java | 1 + .../skill/test/avatar/AvatarFormRegistry.java | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 44c715d0..8db72ff3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -12,6 +12,7 @@ public class Forms { public static final Form EXPAND = new Form("expand"); public static final Form TWIST = new Form("twist"); public static final Form SWIRL = new Form("swirl"); + public static final Form SLASH = new Form("slash"); public static final Form STRIKE = new Form("strike"); public static final Form FORCE = new Form("force"); public static final Form BREATHE = new Form("breathe"); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index bd5e60e3..4be3d0be 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.List; +// TODO: Configure which key this listener uses public class TargetModifierListener extends ModifierListener { private Vec3 lastTargetPosition; private Discipline activeDiscipline; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index bf3607a5..ae68576b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -30,11 +30,22 @@ public static void registerForms() { // TODO: Rather than having "push", "pull", "raise", and "lower" as Forms, // make them Effects using the Force Form, Direction modifier & Target Modifier + /* Mouse Button Forms */ FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, RadixTree.InputType.MOUSE); FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, RadixTree.InputType.MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, RadixTree.InputType.MOUSE); + + /* Mouse Motion Forms */ + // TODO: Figure out a way to pass a condition that specifies when to track data for this Form and other mouse motion Forms. + + // Forms.SLASH; Sharp mouse motion in a direction. Used for things like air slash. + // Forms.TWIST; Circular mouse motion in front of the player. + // Forms.RAISE; Slower mouse motion up. Good for bending material manipulation, especially for Earth. + // Forms.LOWER; Slower mouse motion down. + + /* Keyboard Forms */ FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, RadixTree.InputType.KEYBOARD); FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.BREATHE, RadixTree.InputType.KEYBOARD); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, RadixTree.InputType.MOUSE); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); @@ -64,5 +75,8 @@ public static void registerForms() { inputs.add(KeyDataBuilder.createChainedInput(first, second)); FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD); } + + /* Combination Forms */ + } } From fbb62d6b969d392a0cbf96af0fdcb11898c68310 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 26 Sep 2024 02:13:20 +1000 Subject: [PATCH 259/469] Commented more forms --- .../magus/skill/test/avatar/AvatarFormRegistry.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index ae68576b..2f740b00 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -46,9 +46,8 @@ public static void registerForms() { /* Keyboard Forms */ FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, RadixTree.InputType.KEYBOARD); FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.BREATHE, RadixTree.InputType.KEYBOARD); + // Forms.SPIN; Clockwise or anticlockwise cardinal directions. (WDSA or WASD). -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); -// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); // FormDataRegistry.registerForm(Forms.PUSH); // FormDataRegistry.registerForm(Forms.PULL); // FormDataRegistry.registerForm(Forms.RAISE); @@ -77,6 +76,9 @@ public static void registerForms() { } /* Combination Forms */ - + // Forms.COMPRESS; Shift and mouse wheel maybe? + // Forms.EXPAND; Shift and mouse wheel in other direction. + // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); +// FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); } } From 53d4e448e27ee58248ddaf5b3a54c91bf0913c6a Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 25 Sep 2024 21:11:02 -0400 Subject: [PATCH 260/469] Implemented MouseMotionModifier/GestureModifier builds, but setupListener() not fully implemented --- .../omegasource/magus/input/InputModule.java | 7 ++ .../magus/input/KeyboardInputModule.java | 1 + .../magus/input/MouseInputModule.java | 68 +++++------ .../magus/input/MouseMotionModule.java | 1 - .../magus/skill/conditionals/InputData.java | 3 +- .../conditionals/mouse/MouseMotionInput.java | 3 +- .../conditionals/mouse/MousePointInput.java | 3 +- .../skill/conditionals/mouse/MouseVircle.java | 2 +- .../skill/modifiers/ModifiersRegistry.java | 13 ++- .../magus/skill/modifiers/api/Modifier.java | 3 - .../skill/modifiers/api/ModifierData.java | 4 +- .../skill/modifiers/api/ModifierListener.java | 1 - .../modifiers/data/GestureModifierData.java | 83 +++++++++++++ .../listeners/GestureModifierListener.java | 109 ++++++++++++++++++ .../skill/test/avatar/AvatarFormRegistry.java | 3 + 15 files changed, 253 insertions(+), 51 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/GestureModifierData.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 172e90dd..44301777 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -18,6 +19,8 @@ public abstract class InputModule { + protected static final RadixTree formsTree = new RadixTree(); + protected static final List activeFormInputs = new ArrayList<>(); protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); protected final Map modifierQueue = new HashMap<>(); @@ -67,6 +70,10 @@ public Form getLastActivatedForm() { return this.lastActivatedForm; } + public RadixTree getFormsTree() { + return formsTree; + } + public void init() { resetKeys(); registerInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 470bf7fd..47253468 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -128,6 +128,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx // Now, we call: ConditionPath path = formToExecute.createPath(formCondition); + formsTree.insert(path.conditions); // add the path to the tree // //generate condition from InputData. diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index 42dbce2e..d0224d4b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -3,7 +3,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import com.mojang.blaze3d.platform.InputConstants; @@ -131,39 +131,41 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute, List conditions) { + public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { //generate condition from InputData. - Runnable onSuccess = () -> { - if(mc.level != null) { - //this section is to prevent re-activating - // single condition forms when you hold the activation key for Held modifiers - - //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. - // I.e account for modifiers here. - if(formToExecute != lastActivatedForm) { - //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); - activeForm = formToExecute; - } - - ticksSinceActivated = 0; - } - //Reset condition - }; - Runnable onFailure = () -> { - activeForm = new Form(); - //reset conditions? - }; - Condition formCondition = ConditionBuilder.instance() - .fromInputData(formExecutionInputs) - .build(); - if(formCondition != null) { - //Register listeners for condition created. - formCondition.register(formToExecute.name(), onSuccess, onFailure); - //add condition to InputModule registry so that it can be tracked. - formInputs.put(formCondition, formToExecute); - } else { - //todo errors/logging - } + ConditionPath path = formToExecute.createPath(formCondition); + formsTree.insert(path.conditions); +// Runnable onSuccess = () -> { +// if(mc.level != null) { +// //this section is to prevent re-activating +// // single condition forms when you hold the activation key for Held modifiers +// +// //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. +// // I.e account for modifiers here. +// if(formToExecute != lastActivatedForm) { +// //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); +// activeForm = formToExecute; +// } +// +// ticksSinceActivated = 0; +// } +// //Reset condition +// }; +// Runnable onFailure = () -> { +// activeForm = new Form(); +// //reset conditions? +// }; +// Condition formCondition = ConditionBuilder.instance() +// .fromInputData(formExecutionInputs) +// .build(); +// if(formCondition != null) { +// //Register listeners for condition created. +// formCondition.register(formToExecute.name(), onSuccess, onFailure); +// //add condition to InputModule registry so that it can be tracked. +// formInputs.put(formCondition, formToExecute); +// } else { +// //todo errors/logging +// } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index fbbddbfc..b8bc18fb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -32,7 +32,6 @@ public class MouseMotionModule extends InputModule { private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; private boolean listen; - Minecraft mc = Minecraft.getInstance(); public MouseMotionModule() { this.mouseGesture = new ArrayList<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputData.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputData.java index ed20cf89..0c6c685d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/InputData.java @@ -1,4 +1,3 @@ package com.amuzil.omegasource.magus.skill.conditionals; -public interface InputData { -} +public interface InputData {} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java index 30f33a8f..10684efd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseMotionInput.java @@ -1,10 +1,11 @@ package com.amuzil.omegasource.magus.skill.conditionals.mouse; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; import net.minecraft.world.phys.Vec3; import java.util.List; -public record MouseMotionInput(List mouseInputs) { +public record MouseMotionInput(List mouseInputs) implements InputData { public MousePointInput start() { return mouseInputs.get(0); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePointInput.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePointInput.java index 63256713..9e533ba1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePointInput.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MousePointInput.java @@ -14,5 +14,4 @@ * * Get a Bézier curve function working. This tracks input segments, then we path through the input segments. */ -public record MousePointInput(double x, double y, Vec3 lookAngle) implements InputData { -} +public record MousePointInput(double x, double y, Vec3 lookAngle) {} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseVircle.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseVircle.java index d3767e4a..240dc59c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseVircle.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseVircle.java @@ -8,7 +8,7 @@ public class MouseVircle { // Class that represents a virtual circle around the cursor - private float sphereRadius = 0.7F; + final float sphereRadius = 0.7F; private Vec3 centroid, aimDirection; private String motionDirection = ""; public List mouseInputs = new ArrayList<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index c5c8734d..cfd63f0d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -2,11 +2,9 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; -import com.amuzil.omegasource.magus.skill.modifiers.data.DirectionModifierData; -import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; -import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; -import com.amuzil.omegasource.magus.skill.modifiers.data.TargetModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.data.*; import com.amuzil.omegasource.magus.skill.modifiers.listeners.DirectionModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.listeners.GestureModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.listeners.KeyHeldModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.listeners.TargetModifierListener; import net.minecraft.nbt.CompoundTag; @@ -23,6 +21,7 @@ public class ModifiersRegistry { public static Modifier MULTI; public static Modifier DIRECTION; public static Modifier TARGET; + public static Modifier GESTURE; public static void init() { modifierDataTypes = new HashMap<>(); @@ -35,15 +34,17 @@ public static void init() { MULTI = new Modifier(multiModifierData, null); modifierDataTypes.put(multiModifierData.getName(), MULTI); - ModifierData directionModifierData = new DirectionModifierData(); DIRECTION = new Modifier(directionModifierData, new DirectionModifierListener()); modifierDataTypes.put(directionModifierData.getName(), DIRECTION); - ModifierData targetModifierData = new TargetModifierData(); TARGET = new Modifier(targetModifierData, new TargetModifierListener()); modifierDataTypes.put(targetModifierData.getName(), TARGET); + + ModifierData gestureModifierData = new GestureModifierData(); + GESTURE = new Modifier(gestureModifierData, new GestureModifierListener()); + modifierDataTypes.put(gestureModifierData.getName(), GESTURE); } public static ModifierData fromCompoundTag(CompoundTag compoundTag) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java index 6ec72080..c1469fd1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java @@ -1,10 +1,7 @@ package com.amuzil.omegasource.magus.skill.modifiers.api; -import com.amuzil.omegasource.magus.skill.forms.Form; import net.minecraft.nbt.CompoundTag; -import java.util.Objects; - public final class Modifier { private ModifierData data; private final ModifierListener listener; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java index 3fd41b7d..ee584687 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierData.java @@ -3,7 +3,7 @@ import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; -// actually adding data is handled by sub-class implementations, this is just for generics. +// actually adding data is handled by subclass implementations, this is just for generics. public abstract class ModifierData implements DataTrait { @@ -24,10 +24,12 @@ public void add(ModifierData modifierData) { } protected abstract void mergeFields(ModifierData modifierData); + public abstract boolean serversideOnly(); public abstract void print(); public abstract void reset(); + public abstract ModifierData copy(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java index e8884434..53aa74ab 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java @@ -3,7 +3,6 @@ import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; -import org.apache.logging.log4j.LogManager; import java.util.function.Consumer; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/GestureModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/GestureModifierData.java new file mode 100644 index 00000000..4609d7e9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/GestureModifierData.java @@ -0,0 +1,83 @@ +package com.amuzil.omegasource.magus.skill.modifiers.data; + +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseShapeInput; +import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.world.phys.Vec3; +import org.apache.logging.log4j.LogManager; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +public class GestureModifierData extends BaseModifierData { + + private List mouseGestures; + private HashMap shapeCounter; + + public GestureModifierData() { + this.mouseGestures = new ArrayList<>(); + this.shapeCounter = new HashMap<>(); + } + + public GestureModifierData(List gestures) { + this.mouseGestures = gestures; + } + + @Override + public String getName() { + return "GestureModifier"; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag compoundTag = super.serializeNBT(); + ListTag listTag = new ListTag(); + + this.mouseGestures.forEach(gesture -> { + CompoundTag mouseGestures = new CompoundTag(); + mouseGestures.putString("gesture", gesture); + listTag.add(mouseGestures); + }); + compoundTag.put("mouseGestures", listTag); + + return compoundTag; + } + + @Override + public GestureModifierData copy() { + return new GestureModifierData(); + } + + @Override + public void deserializeNBT(CompoundTag compoundTag) { + this.mouseGestures = new ArrayList<>(); + + ListTag listTag = (ListTag) compoundTag.get("mouseGestures"); + assert listTag != null; + listTag.forEach(mouseGesture -> { + CompoundTag gesture = (CompoundTag) mouseGesture; + this.mouseGestures.add(gesture.getString("gesture")); + }); + } + + //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking + @Override + protected void mergeFields(ModifierData modifierData) { + GestureModifierData gestureModifierData = (GestureModifierData) modifierData; + this.mouseGestures.addAll(gestureModifierData.mouseGestures); + } + + @Override + public void reset() { + this.mouseGestures = new ArrayList<>(); + this.shapeCounter = new HashMap<>(); + } + + @Override + public void print() { + LogManager.getLogger().info("GestureModifier mouseGestures: " + mouseGestures); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java new file mode 100644 index 00000000..095528d9 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java @@ -0,0 +1,109 @@ +package com.amuzil.omegasource.magus.skill.modifiers.listeners; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.InputModule; +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseShapeInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseVircle; +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.data.GestureModifierData; +import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.Minecraft; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Objects; +import java.util.function.Consumer; + +public class GestureModifierListener extends ModifierListener { + private Consumer clientTickListener; + public List mouseGestures; + public MouseVircle vircle; + private HashMap shapeCounter; + private final RadixTree.InputType type; + + public GestureModifierListener() { + this(RadixTree.InputType.MOUSE_MOTION); + } + + public GestureModifierListener(RadixTree.InputType type) { + this.modifierData = new GestureModifierData(); + this.type = type; + } + + @Override + public void register(Runnable onSuccess) { + super.register(onSuccess); + MinecraftForge.EVENT_BUS.addListener(clientTickListener); + } + + @Override + public void unregister() { + super.unregister(); + MinecraftForge.EVENT_BUS.unregister(clientTickListener); + } + + @Override + public void setupListener(CompoundTag compoundTag) { + Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); + List formInputs = FormDataRegistry.getInputsForForm(formToModify, type); + + InputData lastInput = formInputs.get(formInputs.size() - 1); + + this.clientTickListener = event -> { + if (Magus.keyboardInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { + Minecraft mci = Minecraft.getInstance(); + assert mci.player != null; + double x = mci.mouseHandler.xpos(); + double y = mci.mouseHandler.ypos(); + Vec3 lookAngle = mci.player.getLookAngle(); + if (vircle == null) { + vircle = new MouseVircle(new MousePointInput(x, y, lookAngle)); + } else { + vircle.track(new MousePointInput(x, y, lookAngle)); + if (vircle.hasMotionDirection()) { + mouseGestures.add(vircle.popMotionDirection()); + } + } + } + }; + } + + @Override + public boolean shouldCollectModifierData(TickEvent event) { + if (!Magus.keyboardInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { + if (!mouseGestures.isEmpty()) { + mouseGestures.clear(); + return false; + } + } + return true; + } + + @Override + public ModifierData collectModifierDataFromEvent(TickEvent event) { + GestureModifierData data = new GestureModifierData(mouseGestures); + this.mouseGestures = new ArrayList<>(); + return data; + } + + @Override + public GestureModifierListener copy() { + return new GestureModifierListener(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 2f740b00..3fb84ae9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.test.avatar; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -80,5 +81,7 @@ public static void registerForms() { // Forms.EXPAND; Shift and mouse wheel in other direction. // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); + Magus.keyboardInputModule.getFormsTree().printAllConditions(); + Magus.keyboardInputModule.getFormsTree().printAllBranches(); } } From 75ec78a72aa88afd3f32ae872b3c30a33b9178b3 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 25 Sep 2024 21:15:12 -0400 Subject: [PATCH 261/469] inserting forms into RadixTree now all InputModules are inserting into static formsTree field --- .../amuzil/omegasource/magus/input/MouseMotionModule.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index b8bc18fb..db86fc9e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseVircle; @@ -98,8 +99,10 @@ private void sendModifierData() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute, List conditions) { + public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { //generate condition from InputData. + ConditionPath path = formToExecute.createPath(formCondition); + formsTree.insert(path.conditions); // Runnable onSuccess = () -> { // if(mc.level != null) { // //this section is to prevent re-activating From d7bd11c7af60affd13980965d770ab394d8afc9f Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 27 Sep 2024 01:26:03 -0400 Subject: [PATCH 262/469] builds and runs... fixed InputConverter.buildPathFrom() --- .../magus/radix/ConditionPath.java | 1 + .../magus/radix/builders/InputConverter.java | 86 +++++++++++-------- 2 files changed, 50 insertions(+), 37 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java index 38a53e58..2a11d125 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java @@ -20,6 +20,7 @@ public class ConditionPath implements INBTSerializable { public ConditionPath() { activationPath = new LinkedList<>(); + conditions = new LinkedList<>(); } public ConditionPath(List activatedConditions) { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index dcd3bc92..8619a5ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.radix.condition.MultiCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; @@ -27,25 +28,27 @@ public class InputConverter { /* Keys. */ //TODO: Account for max delay - registerBuilder(KeyInput.class, keyInput -> { - + registerBuilder(KeyInput.class, keyInputs -> { LinkedList conditions = new LinkedList<>(); - - // Any time less than this is just a key press. - // TODO: Adjust timeout to be per node. - // Use a configurable value to be our default timeout. If the condition should never time out, - // dont add the threshold value. - int timeout = TIMEOUT_THRESHOLD + keyInput.timeout(); - if (keyInput.timeout() < 0) - timeout = keyInput.timeout(); - - // Default is about 0 ticks. - - KeyHoldCondition keyPress = new KeyHoldCondition(keyInput.key().getValue(), - keyInput.held(), timeout, keyInput.release()); - // We can change these runnables later if need be. - keyPress.register("key_press", keyPress::reset, keyPress::reset); - conditions.add(keyPress); + if (keyInputs instanceof List) + for (Object obj: (List) keyInputs) { + KeyInput keyInput = (KeyInput) obj; + // Any time less than this is just a key press. + // TODO: Adjust timeout to be per node. + // Use a configurable value to be our default timeout. If the condition should never time out, + // dont add the threshold value. + int timeout = TIMEOUT_THRESHOLD + keyInput.timeout(); + if (keyInput.timeout() < 0) + timeout = keyInput.timeout(); + + // Default is about 0 ticks. + + KeyHoldCondition keyPress = new KeyHoldCondition(keyInput.key().getValue(), + keyInput.held(), timeout, keyInput.release()); + // We can change these runnables later if need be. + keyPress.register("key_press", keyPress::reset, keyPress::reset); + conditions.add(keyPress); + } return conditions; @@ -53,33 +56,34 @@ public class InputConverter { // TODO: Need to print these out and test how they work, // TODO: in order to finalise ConditionBuilder.java. registerBuilder(MultiKeyInput.class, - permutation -> { - List conditions = new LinkedList<>(permutation.keys().stream().map(InputConverter::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - - // Create a MultiCondition from the flattened conditions - MultiCondition multiCondition = ConditionBuilder.createMultiCondition(conditions); + obj -> { LinkedList multiConditions = new LinkedList<>(); - multiConditions.add(multiCondition); + if (obj instanceof MultiKeyInput permutation) { + List conditions = new LinkedList<>(permutation.keys().stream().map(InputConverter::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + + // Create a MultiCondition from the flattened conditions + MultiCondition multiCondition = ConditionBuilder.createMultiCondition(conditions); + multiConditions.add(multiCondition); + } // Return a list containing the MultiCondition return multiConditions; } ); registerBuilder(ChainedKeyInput.class, - combination -> { - List conditions = new LinkedList<>(combination.keys().stream().map(InputConverter::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - - - + obj -> { LinkedList chained = new LinkedList<>(); - for (Condition condition : conditions) { - if (condition instanceof MultiCondition) - chained.add(ConditionBuilder.createSequentialCondition((MultiCondition) condition)); - else chained.add(ConditionBuilder.createSequentialCondition(condition)); + if (obj instanceof ChainedKeyInput combination) { + List conditions = new LinkedList<>(combination.keys().stream().map(InputConverter::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + + for (Condition condition : conditions) { + if (condition instanceof MultiCondition) + chained.add(ConditionBuilder.createSequentialCondition((MultiCondition) condition)); + else chained.add(ConditionBuilder.createSequentialCondition(condition)); + } } - // Return a list containing the ChainedCondition return chained; } @@ -102,7 +106,7 @@ public class InputConverter { } @SuppressWarnings("unchecked") - public static void registerBuilder(Class type, Function> builder) { + public static void registerBuilder(Class type, Function> builder) { CONDITION_BUILDERS.put(type, (Function>) builder); } @@ -111,4 +115,12 @@ public static void registerBuilder(Class type, Function LinkedList buildPathFrom(T data) { return CONDITION_BUILDERS.get(data.getClass()).apply(data); } + + public static LinkedList buildPathFrom(List data) { + if (data.isEmpty()) + return new LinkedList<>(); + Class type = data.get(0).getClass(); + Function> function = CONDITION_BUILDERS.get(type); + return function.apply(data); + } } From 838a8edf50febb5323dd688dd72845c8e1be1289 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 27 Sep 2024 02:45:56 -0400 Subject: [PATCH 263/469] ensure formData and formsTree are reset --- .../amuzil/omegasource/magus/input/InputModule.java | 8 +++++++- .../omegasource/magus/input/KeyboardInputModule.java | 1 + .../minecraft/forge/key/KeyHoldCondition.java | 11 +++++++++-- .../amuzil/omegasource/magus/server/ServerEvents.java | 4 ++++ .../magus/skill/test/avatar/AvatarFormRegistry.java | 2 -- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 44301777..8eeb836a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.mojang.blaze3d.platform.InputConstants; @@ -19,7 +20,7 @@ public abstract class InputModule { - protected static final RadixTree formsTree = new RadixTree(); + protected static RadixTree formsTree = new RadixTree(); protected static final List activeFormInputs = new ArrayList<>(); protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); @@ -74,6 +75,11 @@ public RadixTree getFormsTree() { return formsTree; } + public static void resetFormsTree() { + FormDataRegistry.init(); // Re-initialize formData since it's a static field + formsTree = new RadixTree(); + } + public void init() { resetKeys(); registerInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 47253468..5aad7dad 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -127,6 +127,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx // - Call it here, then add the condition path to the radixtree. // Now, we call: + System.out.println("Inserting " + formToExecute.name() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); ConditionPath path = formToExecute.createPath(formCondition); formsTree.insert(path.conditions); // add the path to the tree diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 727708dc..bab4950e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -22,7 +22,7 @@ public class KeyHoldCondition extends Condition { private final Consumer clientTickListener; private int currentTotal; private int currentHolding; - private final int key; + private final int key, duration, timeout; // False by default. private final boolean release; private boolean started = false; @@ -34,6 +34,8 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.currentTotal = 0; this.currentHolding = 0; + this.duration = duration; + this.timeout = timeout; this.release = release; this.key = key; this.started = false; @@ -43,7 +45,6 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { this.started = true; this.currentHolding++; - Minecraft mci = Minecraft.getInstance(); } else { if (pressed(this.currentHolding, duration)) { // If the Condition requires the key being released.... @@ -120,4 +121,10 @@ public void unregister() { public String name() { return "key_hold"; } + + @Override + public String toString() { + return String.format("%s[ %s, key=%s, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), name(), + key, duration, timeout, release); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 074d7324..7ae54323 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.server; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; @@ -113,7 +114,10 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } else { if (event.getEntity() instanceof Player) { + InputModule.resetFormsTree(); AvatarFormRegistry.registerForms(); + Magus.keyboardInputModule.getFormsTree().printAllConditions(); + Magus.keyboardInputModule.getFormsTree().printAllBranches(); Magus.keyboardInputModule.init(); Magus.mouseInputModule.init(); // Magus.mouseMotionModule.init(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 3fb84ae9..a81a6534 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -81,7 +81,5 @@ public static void registerForms() { // Forms.EXPAND; Shift and mouse wheel in other direction. // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); - Magus.keyboardInputModule.getFormsTree().printAllConditions(); - Magus.keyboardInputModule.getFormsTree().printAllBranches(); } } From ac87fbef2243112994acbd868650f77578729786 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 27 Sep 2024 02:59:15 -0400 Subject: [PATCH 264/469] reset listeners OnPlayerLeaveWorld() method not working for client side --- .../java/com/amuzil/omegasource/magus/server/ServerEvents.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 7ae54323..5ae04e05 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -114,6 +114,9 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } else { if (event.getEntity() instanceof Player) { + Magus.keyboardInputModule.terminate(); + Magus.mouseInputModule.terminate(); + Magus.mouseMotionModule.terminate(); InputModule.resetFormsTree(); AvatarFormRegistry.registerForms(); Magus.keyboardInputModule.getFormsTree().printAllConditions(); From 98e18198be8972efacbe4f924ae445e07f968488 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 27 Sep 2024 15:13:06 -0400 Subject: [PATCH 265/469] Update Form.java --- .../java/com/amuzil/omegasource/magus/skill/forms/Form.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 7c2944a5..1abdfc1a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -9,7 +9,7 @@ import java.util.List; public class Form { - private String name; + private final String name; public Form(String name) { this.name = name; From 78c04760a8b7b7565f9e92ee7ff8147bf4e1b87b Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 27 Sep 2024 15:13:47 -0400 Subject: [PATCH 266/469] Update PathBuilder.java --- .../amuzil/omegasource/magus/radix/builders/PathBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java index e92a4376..e4da8b68 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java @@ -23,7 +23,8 @@ public class PathBuilder { protected static void addSteps(ConditionPath path, Condition... conditions) { List emptyData = new ArrayList<>(); - if (path == null) path = new ConditionPath(List.of(conditions)); + if (path == null) + path = new ConditionPath(List.of(conditions)); for (Condition condition : conditions) { path.addStep(condition, emptyData); } From 6024587e2bcaf0027bb298eb0141b2a125359c91 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sat, 28 Sep 2024 01:01:27 -0400 Subject: [PATCH 267/469] init --- .../magus/input/KeyboardInputModule.java | 37 +++++++++++-- .../minecraft/forge/key/KeyHoldCondition.java | 53 +++++++++++++++++-- .../magus/skill/forms/FormDataRegistry.java | 17 +++--- 3 files changed, 92 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 5aad7dad..5a869063 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -4,8 +4,10 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; @@ -23,6 +25,7 @@ public class KeyboardInputModule extends InputModule { private List glfwKeysDown; private static final Map movementKeys = new HashMap<>(); + private static LinkedHashMap activeConditions = new LinkedHashMap<>(); private final Consumer keyboardListener; private final Consumer tickEventConsumer; private Form activeForm = new Form(); @@ -46,33 +49,50 @@ public KeyboardInputModule() { this.listen = true; this.keyboardListener = keyboardEvent -> { int keyPressed = keyboardEvent.getKey(); + // Get the Conditions list if one already exists for that key + switch (keyboardEvent.getAction()) { case InputConstants.PRESS -> { - if (!glfwKeysDown.contains(keyPressed)) + if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); + KeyHoldCondition newCondition = new KeyHoldCondition(keyPressed, 0); + KeyHoldCondition condition = (KeyHoldCondition) activeConditions.getOrDefault(keyPressed, newCondition); + activeConditions.put(keyPressed, condition); + checkForForm(); + } } case InputConstants.REPEAT -> { + // NOTE: Minecraft's InputEvent.Key can only listen to the action InputConstants.REPEAT of one key at a time + // tldr: it only fires the repeat event for the last key if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); + KeyHoldCondition condition = (KeyHoldCondition) activeConditions.get(keyPressed); + activeConditions.put(keyPressed, condition); } + } case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); + activeConditions.remove(keyPressed); } } } }; this.tickEventConsumer = tickEvent -> { + for (Condition condition: activeConditions.values()) { + KeyHoldCondition keyHoldCondition = (KeyHoldCondition) condition; + if (glfwKeysDown.contains(keyHoldCondition.getKey())) { + keyHoldCondition.iterateDuration(); + } + } ticksSinceModifiersSent++; if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { sendModifierData(); } - //cleanMCKeys(); - if(activeForm.name() != null) { ticksSinceActivated++; if(ticksSinceActivated >= tickActivationThreshold) { @@ -96,6 +116,15 @@ public KeyboardInputModule() { }; } + private void checkForForm() { + List conditions = activeConditions.values().stream().toList(); + List recognized = formsTree.search(conditions); + if (recognized != null) { + Form form = FormDataRegistry.formsNamespace.get(recognized.hashCode()); + System.out.println("RECOGNIZED FORM: " + form.name() + " " + recognized); + } + } + private void sendModifierData() { LogManager.getLogger().info("SENDING MODIFIER DATA"); synchronized (modifierQueue) { @@ -127,7 +156,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx // - Call it here, then add the condition path to the radixtree. // Now, we call: - System.out.println("Inserting " + formToExecute.name() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); + System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); ConditionPath path = formToExecute.createPath(formCondition); formsTree.insert(path.conditions); // add the path to the tree diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index bab4950e..1b520b97 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -14,20 +14,32 @@ import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; public class KeyHoldCondition extends Condition { - //TODO: Make this configurable public static final int KEY_PRESS_TIMEOUT = 3; - private final Consumer clientTickListener; + private Consumer clientTickListener; private int currentTotal; private int currentHolding; - private final int key, duration, timeout; + private int key; + private int duration; + private int timeout = -1; // False by default. - private final boolean release; + private boolean release = false; private boolean started = false; public List mouseInputs = new ArrayList<>(); + public KeyHoldCondition(int key, int duration) { + if (duration < 0) + RadixUtil.getLogger().warn("You should not be defining a key press duration of less than 0."); + + this.currentTotal = 0; + this.currentHolding = 0; + this.duration = duration; + this.key = key; + } + public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (duration < 0) RadixUtil.getLogger().warn("You should not be defining a key press duration of less than 0."); @@ -100,6 +112,39 @@ public int getKey() { return this.key; } + public void setKey(int key) { + this.key = key; + } + + public int getDuration() { + return duration; + } + + public void setDuration(int duration) { + this.duration = duration; + } + + public void iterateDuration() { + this.duration++; + } + + @Override + public int hashCode() { + return Objects.hash(key, duration); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } else if (!(obj instanceof KeyHoldCondition other)) { + return false; + } else { + return Objects.equals(key, other.getKey()) && + Objects.equals(duration, other.getDuration()); + } + } + @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 1f332fb1..8c0142ea 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -15,32 +15,35 @@ public class FormDataRegistry { - private static Map formData; + private static Map formsData; + public static HashMap formsNamespace; //Remember to see #InputConstants for the key names. public static void init() { - formData = new HashMap<>(); + formsData = new HashMap<>(); + formsNamespace = new HashMap<>(); } public static Form getFormByName(String formName) { return Registries.FORMS.get().getValue(new ResourceLocation(formName)); } public static List getInputsForForm(Form formToModify, RadixTree.InputType type) { - return formData.get(formToModify).getInputs(type); + return formsData.get(formToModify).getInputs(type); } public static void registerForm(List inputs, Form form, RadixTree.InputType type) { // Register the requisite conditions InputModuleData data; - if (formData.get(form) != null) { - data = formData.get(form); + if (formsData.get(form) != null) { + data = formsData.get(form); } else data = new InputModuleData(); data.addTypeInputs(type, inputs); data.fillConditions(type); // This replaces the value, and since our InputModuleData automatically adds conditions and input data to itself when necessary... - formData.put(form, data); + formsData.put(form, data); + formsNamespace.put(data.getConditions(type).hashCode(), form); // Need to pass this List conditions = data.getConditions(type); @@ -57,7 +60,7 @@ public static void registerForm(List inputs, Form form, RadixTree.Inp } public static List getConditionsFrom(Form form, RadixTree.InputType type) { - return formData.get(form).getConditions(type); + return formsData.get(form).getConditions(type); } public static void registerForm(InputData input, Form form) { From 9d78d90347f8b6fc16491d1c5f109fbec9d3368d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 30 Sep 2024 00:29:45 +1000 Subject: [PATCH 268/469] massively improved code --- .../magus/input/KeyboardInputModule.java | 79 +++++++++---------- .../omegasource/magus/radix/Condition.java | 8 ++ 2 files changed, 46 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 5a869063..a7d8c220 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -23,21 +23,20 @@ public class KeyboardInputModule extends InputModule { - private List glfwKeysDown; private static final Map movementKeys = new HashMap<>(); - private static LinkedHashMap activeConditions = new LinkedHashMap<>(); + private final LinkedList activeConditions = new LinkedList<>(); private final Consumer keyboardListener; private final Consumer tickEventConsumer; - private Form activeForm = new Form(); - private int ticksSinceActivated = 0; - private int ticksSinceModifiersSent = 0; - //todo make these thresholds configurable and make them longer. Especially the timeout threshold. private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; - private boolean listen; Minecraft mc = Minecraft.getInstance(); + private List glfwKeysDown; + private Form activeForm = new Form(); + private int ticksSinceActivated = 0; + private int ticksSinceModifiersSent = 0; + private boolean listen; // TODO: Fix this such that any tree requiring a form relies on the input // module activating a form rather than relying on the raw input data for those forms. @@ -52,36 +51,26 @@ public KeyboardInputModule() { // Get the Conditions list if one already exists for that key switch (keyboardEvent.getAction()) { - case InputConstants.PRESS -> { + case InputConstants.PRESS, InputConstants.REPEAT -> { if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); - KeyHoldCondition newCondition = new KeyHoldCondition(keyPressed, 0); - KeyHoldCondition condition = (KeyHoldCondition) activeConditions.getOrDefault(keyPressed, newCondition); - activeConditions.put(keyPressed, condition); checkForForm(); } } - case InputConstants.REPEAT -> { - // NOTE: Minecraft's InputEvent.Key can only listen to the action InputConstants.REPEAT of one key at a time - // tldr: it only fires the repeat event for the last key - if (!glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.add(keyPressed); - KeyHoldCondition condition = (KeyHoldCondition) activeConditions.get(keyPressed); - activeConditions.put(keyPressed, condition); - } - - } + // NOTE: Minecraft's InputEvent.Key can only listen to the action InputConstants.REPEAT of one key at a time + // tldr: it only fires the repeat event for the last key case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); activeConditions.remove(keyPressed); + checkForForm(); } } } }; this.tickEventConsumer = tickEvent -> { - for (Condition condition: activeConditions.values()) { + for (Condition condition : activeConditions) { KeyHoldCondition keyHoldCondition = (KeyHoldCondition) condition; if (glfwKeysDown.contains(keyHoldCondition.getKey())) { keyHoldCondition.iterateDuration(); @@ -93,20 +82,18 @@ public KeyboardInputModule() { sendModifierData(); } - if(activeForm.name() != null) { + if (activeForm.name() != null) { ticksSinceActivated++; - if(ticksSinceActivated >= tickActivationThreshold) { + if (ticksSinceActivated >= tickActivationThreshold) { if (lastActivatedForm != null) LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); - else - LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); + else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; activeForm = new Form(); ticksSinceActivated = 0; } - } - else { + } else { ticksSinceActivated++; if (ticksSinceActivated >= tickTimeoutThreshold) { lastActivatedForm = null; @@ -116,10 +103,23 @@ public KeyboardInputModule() { }; } + public static void determineMotionKeys() { + Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { + if (keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { + movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); + } + }); + } + + public static Map getMovementKeys() { + return movementKeys; + } + private void checkForForm() { - List conditions = activeConditions.values().stream().toList(); + List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); if (recognized != null) { + // TODO: Clear activeConditions. Form form = FormDataRegistry.formsNamespace.get(recognized.hashCode()); System.out.println("RECOGNIZED FORM: " + form.name() + " " + recognized); } @@ -157,6 +157,15 @@ public void registerInputData(List formExecutionInputs, Form formToEx // Now, we call: System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); + List updatedConditions = formCondition.stream().toList(); + for (Condition condition : updatedConditions) { + condition.register(condition.name(), () -> { + condition.onSuccess(); + // Just do this instead and it's so much easier... + if (!activeConditions.contains(condition)) + activeConditions.add(condition); + }, condition.onFailure()); + } ConditionPath path = formToExecute.createPath(formCondition); formsTree.insert(path.conditions); // add the path to the tree @@ -231,18 +240,6 @@ public boolean keyPressed(int key) { return glfwKeysDown.contains(key); } - public static void determineMotionKeys() { - Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { - if(keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { - movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); - } - }); - } - - public static Map getMovementKeys() { - return movementKeys; - } - public boolean isDirectionKey(int key) { return movementKeys.containsValue(Integer.valueOf(key)); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 7595c2e6..97608c78 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -86,4 +86,12 @@ public static boolean startsWith(List conditions, List sub public String toString() { return this.getClass().getSimpleName() + "[ " + name + " ]"; } + + public Runnable onSuccess() { + return this.onSuccess; + } + + public Runnable onFailure() { + return this.onFailure; + } } From 36f12b2f2a7451102dc95177c6e942b9606dfb72 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 30 Sep 2024 01:25:42 +1000 Subject: [PATCH 269/469] woops --- .../com/amuzil/omegasource/magus/input/KeyboardInputModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index a7d8c220..ce28ed75 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -166,7 +166,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx activeConditions.add(condition); }, condition.onFailure()); } - ConditionPath path = formToExecute.createPath(formCondition); + ConditionPath path = formToExecute.createPath(updatedConditions); formsTree.insert(path.conditions); // add the path to the tree From 9c1d555fd4a08a17c247bf7a2a1611834d040622 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 30 Sep 2024 01:53:33 +1000 Subject: [PATCH 270/469] forgot to make the original runnable run --- .../com/amuzil/omegasource/magus/input/KeyboardInputModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index ce28ed75..454021ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -160,7 +160,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx List updatedConditions = formCondition.stream().toList(); for (Condition condition : updatedConditions) { condition.register(condition.name(), () -> { - condition.onSuccess(); + condition.onSuccess().run(); // Just do this instead and it's so much easier... if (!activeConditions.contains(condition)) activeConditions.add(condition); From 790e3d7d65cc78c3ccf0ceccd65cc440c3f4d0d0 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 30 Sep 2024 21:04:49 -0400 Subject: [PATCH 271/469] KeyHoldCondition working Arc and Breathe forms recognized. The condiditions for running onSuccess and onFailure to run can be adjusted via the clientTickListener and the requisites to match tree stored conditions with activeConditions can also be adjusted --- .../omegasource/magus/input/InputModule.java | 6 ++-- .../magus/input/KeyboardInputModule.java | 28 +++++++---------- .../omegasource/magus/radix/Condition.java | 4 ++- .../radix/condition/ChainedCondition.java | 2 +- .../minecraft/forge/key/KeyHoldCondition.java | 31 +++++-------------- 5 files changed, 24 insertions(+), 47 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 8eeb836a..40034723 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -13,14 +13,12 @@ import net.minecraftforge.client.event.InputEvent; import org.apache.logging.log4j.LogManager; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public abstract class InputModule { protected static RadixTree formsTree = new RadixTree(); + protected static LinkedList activeConditions = new LinkedList<>(); protected static final List activeFormInputs = new ArrayList<>(); protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 454021ba..eaa10a47 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -1,10 +1,10 @@ package com.amuzil.omegasource.magus.input; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -24,7 +24,6 @@ public class KeyboardInputModule extends InputModule { private static final Map movementKeys = new HashMap<>(); - private final LinkedList activeConditions = new LinkedList<>(); private final Consumer keyboardListener; private final Consumer tickEventConsumer; //todo make these thresholds configurable and make them longer. Especially the timeout threshold. @@ -62,7 +61,6 @@ public KeyboardInputModule() { case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); - activeConditions.remove(keyPressed); checkForForm(); } } @@ -70,13 +68,6 @@ public KeyboardInputModule() { }; this.tickEventConsumer = tickEvent -> { - for (Condition condition : activeConditions) { - KeyHoldCondition keyHoldCondition = (KeyHoldCondition) condition; - if (glfwKeysDown.contains(keyHoldCondition.getKey())) { - keyHoldCondition.iterateDuration(); - } - } - ticksSinceModifiersSent++; if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { sendModifierData(); @@ -118,10 +109,12 @@ public static Map getMovementKeys() { private void checkForForm() { List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); + System.out.println("activeConditions: " + activeConditions); if (recognized != null) { - // TODO: Clear activeConditions. - Form form = FormDataRegistry.formsNamespace.get(recognized.hashCode()); - System.out.println("RECOGNIZED FORM: " + form.name() + " " + recognized); + activeConditions.clear(); + Form activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); + System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); + Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); } } @@ -156,17 +149,18 @@ public void registerInputData(List formExecutionInputs, Form formToEx // - Call it here, then add the condition path to the radixtree. // Now, we call: - System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); List updatedConditions = formCondition.stream().toList(); for (Condition condition : updatedConditions) { condition.register(condition.name(), () -> { - condition.onSuccess().run(); - // Just do this instead and it's so much easier... if (!activeConditions.contains(condition)) activeConditions.add(condition); - }, condition.onFailure()); + }, () -> { + activeConditions.remove(condition); + condition.reset(); + }); } ConditionPath path = formToExecute.createPath(updatedConditions); + System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); // add the path to the tree diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 97608c78..a5f79938 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -15,7 +15,7 @@ public enum Result { protected static final Runnable NO_OPERATION = () -> RadixUtil.getLogger().debug("Result: No Operation"); - private String name; + protected String name; protected Runnable onSuccess; protected Runnable onFailure; @@ -68,6 +68,8 @@ public String modID() { return Magus.MOD_ID; } + public void reset() {} + public static boolean startsWith(List conditions, List subConditions) { try { return conditions.subList(0, subConditions.size()).equals(subConditions); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index 19fa0763..de0a53f4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -52,7 +52,7 @@ private void finishCurrentCondition() { } - private void reset() { + public void reset() { currentConditionIndex = 0; currentCondition.unregister(); currentCondition = conditionSequence.get(currentConditionIndex); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 1b520b97..7e279251 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -57,7 +57,9 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { this.started = true; this.currentHolding++; + this.onSuccess.run(); } else { + this.onFailure.run(); if (pressed(this.currentHolding, duration)) { // If the Condition requires the key being released.... if (release) { @@ -112,22 +114,6 @@ public int getKey() { return this.key; } - public void setKey(int key) { - this.key = key; - } - - public int getDuration() { - return duration; - } - - public void setDuration(int duration) { - this.duration = duration; - } - - public void iterateDuration() { - this.duration++; - } - @Override public int hashCode() { return Objects.hash(key, duration); @@ -140,8 +126,10 @@ public boolean equals(Object obj) { } else if (!(obj instanceof KeyHoldCondition other)) { return false; } else { +// System.out.println("this: stored in tree -> " + this); +// System.out.println("other: activeCondition from user input -> " + other); return Objects.equals(key, other.getKey()) && - Objects.equals(duration, other.getDuration()); + other.currentHolding >= duration; } } @@ -162,14 +150,9 @@ public void unregister() { MinecraftForge.EVENT_BUS.unregister(clientTickListener); } - @Override - public String name() { - return "key_hold"; - } - @Override public String toString() { - return String.format("%s[ %s, key=%s, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), name(), - key, duration, timeout, release); + return String.format("%s[ %s, key=%s, held=%d, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), name(), + key, currentHolding, duration, timeout, release); } } From b529269f68ab8da3375335e379a6ce3687d77593 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 1 Oct 2024 13:04:57 +1000 Subject: [PATCH 272/469] Improved code quality and fixed 2 crashes --- .../magus/input/KeyboardInputModule.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index eaa10a47..469c8bba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -32,7 +32,7 @@ public class KeyboardInputModule extends InputModule { private final int modifierTickThreshold = 10; Minecraft mc = Minecraft.getInstance(); private List glfwKeysDown; - private Form activeForm = new Form(); + private Form activeForm = null; private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; private boolean listen; @@ -73,7 +73,7 @@ public KeyboardInputModule() { sendModifierData(); } - if (activeForm.name() != null) { + if (activeForm != null && activeForm.name() != null) { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { if (lastActivatedForm != null) @@ -81,7 +81,7 @@ public KeyboardInputModule() { else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; - activeForm = new Form(); + activeForm = null; ticksSinceActivated = 0; } } else { @@ -113,6 +113,7 @@ private void checkForForm() { if (recognized != null) { activeConditions.clear(); Form activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); + this.activeForm = activeForm; System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); } @@ -159,6 +160,17 @@ public void registerInputData(List formExecutionInputs, Form formToEx condition.reset(); }); } + // And if the list has multiple conditions that won't all necessarily fail.... + if (!formCondition.isEmpty()) { + Condition lastCondition = formCondition.get(formCondition.size() - 1); + Runnable failure = lastCondition.onFailure(); + lastCondition.register(lastCondition.name(), lastCondition.onSuccess(), () -> { + if (failure != null) + failure.run(); + activeConditions.removeAll(formCondition); + }); + } + ConditionPath path = formToExecute.createPath(updatedConditions); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); From 9940efe6b3d57850a1140459cc4059a6eccc0c7c Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 1 Oct 2024 13:47:27 +1000 Subject: [PATCH 273/469] Struggling there --- .../magus/input/KeyboardInputModule.java | 3 ++ .../minecraft/forge/key/KeyHoldCondition.java | 32 ++++++++++--------- .../skill/test/avatar/AvatarFormRegistry.java | 17 +++++----- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 469c8bba..ed14f22d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -83,11 +83,14 @@ public KeyboardInputModule() { lastActivatedForm = activeForm; activeForm = null; ticksSinceActivated = 0; + activeConditions.clear(); } } else { ticksSinceActivated++; if (ticksSinceActivated >= tickTimeoutThreshold) { lastActivatedForm = null; + // Have to clear currently active conditions + activeConditions.clear(); ticksSinceActivated = 0; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 7e279251..423cbccc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -4,9 +4,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; import net.minecraft.client.Minecraft; -import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent.ClientTickEvent; @@ -19,16 +17,16 @@ public class KeyHoldCondition extends Condition { public static final int KEY_PRESS_TIMEOUT = 3; + public List mouseInputs = new ArrayList<>(); private Consumer clientTickListener; private int currentTotal; private int currentHolding; - private int key; - private int duration; + private final int key; + private final int duration; private int timeout = -1; // False by default. private boolean release = false; private boolean started = false; - public List mouseInputs = new ArrayList<>(); public KeyHoldCondition(int key, int duration) { if (duration < 0) @@ -57,28 +55,30 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { this.started = true; this.currentHolding++; - this.onSuccess.run(); + if (pressed(this.currentHolding, duration)) { +// // If the Condition doesn't require the key being released.... + if (!release) { + this.onSuccess.run(); + this.reset(); + } + } } else { - this.onFailure.run(); if (pressed(this.currentHolding, duration)) { // If the Condition requires the key being released.... if (release) { this.onSuccess.run(); + this.reset(); } } else { // Not held for long enough if (this.currentHolding > 0) { this.onFailure.run(); + this.reset(); } } } // If the duration is <= 3, then we want the Condition to act as a key press, rather than a hold. -// if (pressed(this.currentHolding, duration)) { -// // If the Condition doesn't require the key being released.... -// if (!release) { -// this.onSuccess.run(); -// } -// } +// if (this.started) { // Timeout of -1 means that this should wait forever. if (timeout > -1 && this.currentTotal >= timeout) { @@ -97,9 +97,11 @@ public int getHeld() { } public boolean pressed(int held, int duration) { - boolean pressed = held >= duration || held > 0 && duration <= KEY_PRESS_TIMEOUT; + if (duration <= KEY_PRESS_TIMEOUT) { + return held > 0; + } + else return held >= duration; // LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration + ", result: " + pressed); - return pressed; } // Should be called in either runnable by other methods, rather than manually here. Calling it manually in the class can lead diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index a81a6534..55c54325 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -14,6 +14,7 @@ import net.minecraft.client.Minecraft; import java.util.LinkedList; +import java.util.List; import java.util.Map; public class AvatarFormRegistry { @@ -62,18 +63,18 @@ public static void registerForms() { // Left, right, up, down, jump, sneak, sprint. LinkedList inputs = new LinkedList<>(); for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { - inputs.clear(); - // TODO: Add in a mandatory key release condition so you can't activate these by holding down a key. - // Also account for the direction modifier. + System.out.println(key.getKey()); +// inputs.clear(); KeyInput first, second; - // Problem: The tick delay is being combined with the key press into a simultaneous condition. - // Not good. + + // key.right is 68 first = KeyDataBuilder.createInput(key.getValue(), true, 0); // Has to be a relatively quick input. - second = KeyDataBuilder.createInput(key.getValue(), 0, 15); - inputs.add(KeyDataBuilder.createChainedInput(first, second)); - FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD); +// second = KeyDataBuilder.createInput(68 /*key.getValue()*/, 0, 15); +// inputs.add(first); +// inputs.add(second); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(first), Forms.STEP, RadixTree.InputType.KEYBOARD); } /* Combination Forms */ From 1f0f116c1f4f9c27102869796dd0648d7c99ec8b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 1 Oct 2024 14:10:02 +1000 Subject: [PATCH 274/469] Getting closer fr --- .../magus/input/KeyboardInputModule.java | 10 +++++----- .../minecraft/forge/key/KeyHoldCondition.java | 5 +---- .../magus/skill/forms/FormDataRegistry.java | 6 +----- .../magus/skill/test/avatar/AvatarFormRegistry.java | 13 +++++++------ 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index ed14f22d..d565883d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -27,7 +27,7 @@ public class KeyboardInputModule extends InputModule { private final Consumer keyboardListener; private final Consumer tickEventConsumer; //todo make these thresholds configurable and make them longer. Especially the timeout threshold. - private final int tickActivationThreshold = 15; + private final int tickActivationThreshold = 20; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; Minecraft mc = Minecraft.getInstance(); @@ -83,7 +83,7 @@ public KeyboardInputModule() { lastActivatedForm = activeForm; activeForm = null; ticksSinceActivated = 0; - activeConditions.clear(); +// activeConditions.clear(); } } else { ticksSinceActivated++; @@ -114,9 +114,8 @@ private void checkForForm() { List recognized = formsTree.search(conditions); System.out.println("activeConditions: " + activeConditions); if (recognized != null) { - activeConditions.clear(); - Form activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); - this.activeForm = activeForm; +// activeConditions.clear(); + activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); } @@ -158,6 +157,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx condition.register(condition.name(), () -> { if (!activeConditions.contains(condition)) activeConditions.add(condition); + condition.reset(); }, () -> { activeConditions.remove(condition); condition.reset(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 423cbccc..c3041acc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -59,7 +59,6 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { // // If the Condition doesn't require the key being released.... if (!release) { this.onSuccess.run(); - this.reset(); } } } else { @@ -67,13 +66,11 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { // If the Condition requires the key being released.... if (release) { this.onSuccess.run(); - this.reset(); } } else { // Not held for long enough if (this.currentHolding > 0) { this.onFailure.run(); - this.reset(); } } } @@ -101,11 +98,11 @@ public boolean pressed(int held, int duration) { return held > 0; } else return held >= duration; -// LogManager.getLogger().info("Checking pressed. held:" + held + ", duration: " + duration + ", result: " + pressed); } // Should be called in either runnable by other methods, rather than manually here. Calling it manually in the class can lead // to race conditions and other weird bugs, none of which are ideal. + @Override public void reset() { this.currentTotal = 0; this.currentHolding = 0; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 8c0142ea..6965463e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -34,11 +34,7 @@ public static List getInputsForForm(Form formToModify, RadixTree.Inpu public static void registerForm(List inputs, Form form, RadixTree.InputType type) { // Register the requisite conditions - InputModuleData data; - if (formsData.get(form) != null) { - data = formsData.get(form); - } - else data = new InputModuleData(); + InputModuleData data = new InputModuleData(); data.addTypeInputs(type, inputs); data.fillConditions(type); // This replaces the value, and since our InputModuleData automatically adds conditions and input data to itself when necessary... diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 55c54325..4d9c6ddf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; @@ -63,18 +64,18 @@ public static void registerForms() { // Left, right, up, down, jump, sneak, sprint. LinkedList inputs = new LinkedList<>(); for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { - System.out.println(key.getKey()); -// inputs.clear(); + RadixUtil.getLogger().debug("Movement Direction: " + key.getKey() + ", Key Value: " + key.getValue()); + inputs.clear(); KeyInput first, second; // key.right is 68 first = KeyDataBuilder.createInput(key.getValue(), true, 0); // Has to be a relatively quick input. -// second = KeyDataBuilder.createInput(68 /*key.getValue()*/, 0, 15); -// inputs.add(first); -// inputs.add(second); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(first), Forms.STEP, RadixTree.InputType.KEYBOARD); + second = KeyDataBuilder.createInput(key.getValue(), 0, 15); + inputs.add(first); + inputs.add(second); + FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD); } /* Combination Forms */ From c7d85474c4142d9b19b40519a8e38c4213f1ba79 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 1 Oct 2024 14:16:14 +1000 Subject: [PATCH 275/469] trying to fix step --- .../magus/input/KeyboardInputModule.java | 22 +++++++++---------- .../skill/test/avatar/AvatarFormRegistry.java | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index d565883d..f0485fdf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -27,7 +27,7 @@ public class KeyboardInputModule extends InputModule { private final Consumer keyboardListener; private final Consumer tickEventConsumer; //todo make these thresholds configurable and make them longer. Especially the timeout threshold. - private final int tickActivationThreshold = 20; + private final int tickActivationThreshold = 30; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; Minecraft mc = Minecraft.getInstance(); @@ -159,20 +159,20 @@ public void registerInputData(List formExecutionInputs, Form formToEx activeConditions.add(condition); condition.reset(); }, () -> { - activeConditions.remove(condition); +// activeConditions.remove(condition); condition.reset(); }); } // And if the list has multiple conditions that won't all necessarily fail.... - if (!formCondition.isEmpty()) { - Condition lastCondition = formCondition.get(formCondition.size() - 1); - Runnable failure = lastCondition.onFailure(); - lastCondition.register(lastCondition.name(), lastCondition.onSuccess(), () -> { - if (failure != null) - failure.run(); - activeConditions.removeAll(formCondition); - }); - } +// if (!formCondition.isEmpty()) { +// Condition lastCondition = formCondition.get(formCondition.size() - 1); +// Runnable failure = lastCondition.onFailure(); +// lastCondition.register(lastCondition.name(), lastCondition.onSuccess(), () -> { +// if (failure != null) +// failure.run(); +// activeConditions.removeAll(formCondition); +// }); +// } ConditionPath path = formToExecute.createPath(updatedConditions); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 4d9c6ddf..e980eba8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -72,7 +72,7 @@ public static void registerForms() { // key.right is 68 first = KeyDataBuilder.createInput(key.getValue(), true, 0); // Has to be a relatively quick input. - second = KeyDataBuilder.createInput(key.getValue(), 0, 15); + second = KeyDataBuilder.createInput(key.getValue(), 0, 20); inputs.add(first); inputs.add(second); FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD); From 1131c51513eb9b5356c9d18aa7f16c62c71a089f Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 01:04:08 -0400 Subject: [PATCH 276/469] a few comments --- .../java/com/amuzil/omegasource/magus/radix/RadixTree.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 66cbf14f..9a59505a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -111,7 +111,7 @@ public void insert(List conditions) { break; } - int splitIndex = getFirstMismatchCondition(currCondition, currentBranch.path.conditions); + int splitIndex = getFirstMismatchCondition(currCondition, currentBranch.path.conditions); // uses equals if (splitIndex == NO_MISMATCH) { // The branch and leftover conditions are the same length // so finish and update the next node as a complete node @@ -159,12 +159,12 @@ public List search(List conditions) { int currIndex = 0; while (currIndex < conditions.size()) { Condition currentCondition = conditions.get(currIndex); - RadixBranch branch = current.getTransition(currentCondition); + RadixBranch branch = current.getTransition(currentCondition); // uses hashcode // RadixBranch branch = current.getMatchedPath(currentCondition); if (branch == null) return null; List currSubCondition = conditions.subList(currIndex, conditions.size()); - if (!Condition.startsWith(currSubCondition, branch.path.conditions)) return null; + if (!Condition.startsWith(currSubCondition, branch.path.conditions)) return null; // uses equals currIndex += branch.path.conditions.size(); current = branch.next; From 037adce5c5606add54ce0fff569b57bec5a4b21b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 1 Oct 2024 15:08:44 +1000 Subject: [PATCH 277/469] immense suffering --- .../magus/input/KeyboardInputModule.java | 51 +++++++++++++++---- .../minecraft/forge/key/KeyHoldCondition.java | 15 ++++-- 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index f0485fdf..d5610e3f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -27,7 +28,7 @@ public class KeyboardInputModule extends InputModule { private final Consumer keyboardListener; private final Consumer tickEventConsumer; //todo make these thresholds configurable and make them longer. Especially the timeout threshold. - private final int tickActivationThreshold = 30; + private final int tickActivationThreshold = 5; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; Minecraft mc = Minecraft.getInstance(); @@ -35,7 +36,9 @@ public class KeyboardInputModule extends InputModule { private Form activeForm = null; private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; + private int timeout = 0; private boolean listen; + private boolean checkForm = false; // TODO: Fix this such that any tree requiring a form relies on the input // module activating a form rather than relying on the raw input data for those forms. @@ -61,7 +64,7 @@ public KeyboardInputModule() { case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); - checkForForm(); + checkForm = true; } } } @@ -73,6 +76,13 @@ public KeyboardInputModule() { sendModifierData(); } + // Every tick... Yay... + // Needed so that key releases actually work. + if (checkForm) { + checkForForm(); + checkForm = false; + } + if (activeForm != null && activeForm.name() != null) { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { @@ -83,17 +93,29 @@ public KeyboardInputModule() { lastActivatedForm = activeForm; activeForm = null; ticksSinceActivated = 0; -// activeConditions.clear(); + timeout = 0; + activeConditions.clear(); + } + } else { - ticksSinceActivated++; - if (ticksSinceActivated >= tickTimeoutThreshold) { - lastActivatedForm = null; - // Have to clear currently active conditions - activeConditions.clear(); - ticksSinceActivated = 0; + timeout++; + if (timeout > tickTimeoutThreshold) { + if (!activeConditions.isEmpty()) { + activeConditions.clear(); + lastActivatedForm = null; + timeout = 0; + } } } + //else { +// ticksSinceActivated++; +// if (ticksSinceActivated >= tickTimeoutThreshold) { +// lastActivatedForm = null; +// // Have to clear currently active conditions +// activeConditions.clear(); +// ticksSinceActivated = 0; +// } }; } @@ -155,8 +177,17 @@ public void registerInputData(List formExecutionInputs, Form formToEx List updatedConditions = formCondition.stream().toList(); for (Condition condition : updatedConditions) { condition.register(condition.name(), () -> { - if (!activeConditions.contains(condition)) + + RadixUtil.getLogger().debug("Condition being added: " + condition); + if (!activeConditions.isEmpty()) { + System.out.println(activeConditions.get(0)); + } + + if (!activeConditions.contains(condition)) { +// RadixUtil.getLogger().debug("Condition being added: " + condition); activeConditions.add(condition); + } + this.timeout = 0; condition.reset(); }, () -> { // activeConditions.remove(condition); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index c3041acc..a3e9764d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -79,6 +79,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { if (this.started) { // Timeout of -1 means that this should wait forever. if (timeout > -1 && this.currentTotal >= timeout) { + RadixUtil.getLogger().warn("Condition is failing. " + this); this.onFailure.run(); } this.currentTotal++; @@ -86,7 +87,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } }; - this.registerEntry(); +// this.registerEntry(); } public int getHeld() { @@ -115,7 +116,7 @@ public int getKey() { @Override public int hashCode() { - return Objects.hash(key, duration); + return Objects.hash(key, duration, release, timeout); } @Override @@ -125,10 +126,14 @@ public boolean equals(Object obj) { } else if (!(obj instanceof KeyHoldCondition other)) { return false; } else { -// System.out.println("this: stored in tree -> " + this); -// System.out.println("other: activeCondition from user input -> " + other); + System.out.println("this: stored in tree -> " + this); + System.out.println("other: activeCondition from user input -> " + other); return Objects.equals(key, other.getKey()) && - other.currentHolding >= duration; + /* Makes sure an alternative key condition that's been pressed has been pressed at least as long + * as the currently compared condition. */ + other.currentHolding >= duration + && other.release == release + && timeout == other.timeout; } } From 8477cabb0800f433e3d4a3fb988d3dd7efff6e31 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 01:59:24 -0400 Subject: [PATCH 278/469] fix by activating all conditions in tree can make it register as we search/traverse through tree later ig --- .../omegasource/magus/input/InputModule.java | 1 + .../omegasource/magus/radix/RadixTree.java | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 40034723..f68b15c5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -87,6 +87,7 @@ public void init() { public void terminate() { resetKeys(); unRegisterInputs(); + activeConditions.clear(); } public abstract void registerListeners(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 9a59505a..34a6f622 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -48,6 +48,18 @@ private void activateBranchConditions(List conditions) { } } + private void activateAllConditions() { + activateAllConditions(root, new ArrayList<>()); + } + + private void activateAllConditions(Node current, List result) { + if (current.isComplete) for (Condition condition : result) + condition.register(); + + for (RadixBranch branch : current.branches.values()) + activateAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); + } + private void deactivateAllConditions() { deactivateAllConditions(root, new ArrayList<>()); } @@ -147,9 +159,10 @@ public void insert(List conditions) { } // Only register immediate children conditions - deactivateAllConditions(); - for (Condition condition : root.getImmediateBranches()) - condition.register(); +// deactivateAllConditions(); +// for (Condition condition : root.getImmediateBranches()) +// condition.register(); + activateAllConditions(); } // Returns matched condition path if found and null if not found - O(n) From 259a5d2ae8d336d91b9ce7e09717f6a15fe12dc5 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 02:00:09 -0400 Subject: [PATCH 279/469] the ol' switcher roo! --- .../magus/skill/test/avatar/AvatarFormRegistry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index e980eba8..4c46267b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -70,9 +70,9 @@ public static void registerForms() { KeyInput first, second; // key.right is 68 - first = KeyDataBuilder.createInput(key.getValue(), true, 0); + first = KeyDataBuilder.createInput(key.getValue(), 0, 20); // Has to be a relatively quick input. - second = KeyDataBuilder.createInput(key.getValue(), 0, 20); + second = KeyDataBuilder.createInput(key.getValue(), true, 0); inputs.add(first); inputs.add(second); FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD); From 07aee55c08085b4592afe6d9bf93a8333398a81a Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 02:02:15 -0400 Subject: [PATCH 280/469] comment out issue wasn't here but can save for debugging just in case --- .../radix/condition/minecraft/forge/key/KeyHoldCondition.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index a3e9764d..8335be67 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -126,8 +126,8 @@ public boolean equals(Object obj) { } else if (!(obj instanceof KeyHoldCondition other)) { return false; } else { - System.out.println("this: stored in tree -> " + this); - System.out.println("other: activeCondition from user input -> " + other); +// System.out.println("this: stored in tree -> " + this); +// System.out.println("other: activeCondition from user input -> " + other); return Objects.equals(key, other.getKey()) && /* Makes sure an alternative key condition that's been pressed has been pressed at least as long * as the currently compared condition. */ From 6d92d9cea8eb2a2ecc767ea681d19a74235bf453 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 02:03:27 -0400 Subject: [PATCH 281/469] remove debug log --- .../omegasource/magus/skill/test/avatar/AvatarFormRegistry.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 4c46267b..0cc45e0d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -64,7 +64,6 @@ public static void registerForms() { // Left, right, up, down, jump, sneak, sprint. LinkedList inputs = new LinkedList<>(); for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { - RadixUtil.getLogger().debug("Movement Direction: " + key.getKey() + ", Key Value: " + key.getValue()); inputs.clear(); KeyInput first, second; From adff04add8f6012b6831a0d2e7575f73081ca80c Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 02:09:02 -0400 Subject: [PATCH 282/469] Update ServerEvents.java --- .../java/com/amuzil/omegasource/magus/server/ServerEvents.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 5ae04e05..8f2b8f05 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -119,7 +119,9 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { Magus.mouseMotionModule.terminate(); InputModule.resetFormsTree(); AvatarFormRegistry.registerForms(); + System.out.println("All RadixTree Forms Conditions:"); Magus.keyboardInputModule.getFormsTree().printAllConditions(); + System.out.println("All RadixTree Branches:"); Magus.keyboardInputModule.getFormsTree().printAllBranches(); Magus.keyboardInputModule.init(); Magus.mouseInputModule.init(); From f597c180012f7880676d491ed43c52a789c651a7 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 02:41:39 -0400 Subject: [PATCH 283/469] fix some bugs --- src/main/java/com/amuzil/omegasource/magus/Magus.java | 6 ++++-- .../com/amuzil/omegasource/magus/input/InputModule.java | 1 + .../com/amuzil/omegasource/magus/server/ServerEvents.java | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 335569ab..394f8eac 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -124,7 +124,9 @@ public static void onClientSetup(FMLClientSetupEvent event) { public static void sendDebugMsg(String msg) { LocalPlayer player = Minecraft.getInstance().player; Component text = Component.literal(msg); - assert player != null; - player.sendSystemMessage(text); + if (player != null) + player.sendSystemMessage(text); + else + System.err.println("sendDebugMsg failed: player is null"); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index f68b15c5..bd2e562b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -88,6 +88,7 @@ public void terminate() { resetKeys(); unRegisterInputs(); activeConditions.clear(); + formsTree.deactivateAllConditions(); } public abstract void registerListeners(); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 8f2b8f05..72a7e21a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -132,10 +132,11 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { - if (event.getLevel().isClientSide() && event.getEntity() instanceof Player) { + if (event.getLevel().isClientSide()) { Magus.keyboardInputModule.terminate(); Magus.mouseInputModule.terminate(); Magus.mouseMotionModule.terminate(); + } } } From dcf389cad0464accfa495f64672e3f609c9b015a Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 02:41:44 -0400 Subject: [PATCH 284/469] Update RadixTree.java --- .../java/com/amuzil/omegasource/magus/radix/RadixTree.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 34a6f622..a3917b09 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -48,7 +48,7 @@ private void activateBranchConditions(List conditions) { } } - private void activateAllConditions() { + public void activateAllConditions() { activateAllConditions(root, new ArrayList<>()); } @@ -60,7 +60,7 @@ private void activateAllConditions(Node current, List result) { activateAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); } - private void deactivateAllConditions() { + public void deactivateAllConditions() { deactivateAllConditions(root, new ArrayList<>()); } From 05d0e24a4ebf1c0801032c7132a0a5c7a4f8b54b Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 02:45:14 -0400 Subject: [PATCH 285/469] woop --- .../java/com/amuzil/omegasource/magus/input/InputModule.java | 1 - .../java/com/amuzil/omegasource/magus/server/ServerEvents.java | 1 - 2 files changed, 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index bd2e562b..f68b15c5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -88,7 +88,6 @@ public void terminate() { resetKeys(); unRegisterInputs(); activeConditions.clear(); - formsTree.deactivateAllConditions(); } public abstract void registerListeners(); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 72a7e21a..f649b143 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -136,7 +136,6 @@ public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { Magus.keyboardInputModule.terminate(); Magus.mouseInputModule.terminate(); Magus.mouseMotionModule.terminate(); - } } } From 194be88797a892d9e3e87a65c13f057f804fb52d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 1 Oct 2024 03:33:47 -0400 Subject: [PATCH 286/469] working but a bit inconsistent --- .../magus/input/KeyboardInputModule.java | 24 ++++------ .../magus/input/MouseInputModule.java | 47 +++++++++++++++---- .../magus/server/ServerEvents.java | 5 +- 3 files changed, 50 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index d5610e3f..4e9d1788 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -86,9 +86,9 @@ public KeyboardInputModule() { if (activeForm != null && activeForm.name() != null) { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { - if (lastActivatedForm != null) - LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); - else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); +// if (lastActivatedForm != null) +// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); +// else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; activeForm = null; @@ -134,9 +134,9 @@ public static Map getMovementKeys() { private void checkForForm() { List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); - System.out.println("activeConditions: " + activeConditions); + System.out.println("activeConditions KIM: " + activeConditions); if (recognized != null) { -// activeConditions.clear(); + activeConditions.clear(); activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); @@ -177,20 +177,12 @@ public void registerInputData(List formExecutionInputs, Form formToEx List updatedConditions = formCondition.stream().toList(); for (Condition condition : updatedConditions) { condition.register(condition.name(), () -> { - - RadixUtil.getLogger().debug("Condition being added: " + condition); - if (!activeConditions.isEmpty()) { - System.out.println(activeConditions.get(0)); - } - - if (!activeConditions.contains(condition)) { -// RadixUtil.getLogger().debug("Condition being added: " + condition); + if (!activeConditions.contains(condition)) activeConditions.add(condition); - } this.timeout = 0; - condition.reset(); +// condition.reset(); }, () -> { -// activeConditions.remove(condition); + activeConditions.remove(condition); condition.reset(); }); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index d0224d4b..a0dc1683 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -1,11 +1,13 @@ package com.amuzil.omegasource.magus.input; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; @@ -40,7 +42,7 @@ public class MouseInputModule extends InputModule { private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; private boolean listen; - Minecraft mc = Minecraft.getInstance(); + private boolean checkForm = false; // TODO: Fix this such that any tree requiring a form relies on the input // module activating a form rather than relying on the raw input data for those forms. @@ -54,18 +56,16 @@ public MouseInputModule() { this.mouseListener = mouseEvent -> { int keyPressed = mouseEvent.getButton(); switch (mouseEvent.getAction()) { - case InputConstants.PRESS -> { - if (!glfwKeysDown.contains(keyPressed)) - glfwKeysDown.add(keyPressed); - } - case InputConstants.REPEAT -> { + case InputConstants.PRESS, InputConstants.REPEAT -> { if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); + checkForForm(); } } case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); + checkForm = true; } } } @@ -82,6 +82,11 @@ public MouseInputModule() { sendModifierData(); } + if (checkForm) { + checkForForm(); + checkForm = false; + } + //cleanMCKeys(); if(activeForm.name() != null) { @@ -95,6 +100,7 @@ public MouseInputModule() { lastActivatedForm = activeForm; activeForm = new Form(); ticksSinceActivated = 0; + activeConditions.clear(); } } else { @@ -102,11 +108,24 @@ public MouseInputModule() { if (ticksSinceActivated >= tickTimeoutThreshold) { lastActivatedForm = null; ticksSinceActivated = 0; + activeConditions.clear(); } } }; } + private void checkForForm() { + List conditions = activeConditions.stream().toList(); + List recognized = formsTree.search(conditions); + System.out.println("activeConditions MIM: " + activeConditions); + if (recognized != null) { + activeConditions.clear(); + activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); + System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); + Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); + } + } + private void sendModifierData() { LogManager.getLogger().info("SENDING MODIFIER DATA"); synchronized (modifierQueue) { @@ -132,8 +151,19 @@ public void cleanMCKeys() { @Override public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { - //generate condition from InputData. - ConditionPath path = formToExecute.createPath(formCondition); + List updatedConditions = formCondition.stream().toList(); + for (Condition condition : updatedConditions) { + condition.register(condition.name(), () -> { + if (!activeConditions.contains(condition)) + activeConditions.add(condition); + condition.reset(); + }, () -> { + activeConditions.remove(condition); + condition.reset(); + }); + } + ConditionPath path = formToExecute.createPath(updatedConditions); + System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); // Runnable onSuccess = () -> { // if(mc.level != null) { @@ -201,6 +231,7 @@ public void toggleListeners() { unRegisterInputs(); listen = false; System.out.println("Disabled!"); + activeConditions.clear(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index f649b143..594c28dd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -132,10 +132,11 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { - if (event.getLevel().isClientSide()) { + if (event.getEntity() instanceof Player) { + Magus.keyboardInputModule.getFormsTree().deactivateAllConditions(); Magus.keyboardInputModule.terminate(); Magus.mouseInputModule.terminate(); Magus.mouseMotionModule.terminate(); } } -} +} \ No newline at end of file From 095cdab0e3c9ea8e6cd53656420fe5f87cd934b5 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 1 Oct 2024 18:11:32 +1000 Subject: [PATCH 287/469] Figured out the issue --- .../omegasource/magus/input/InputModule.java | 2 +- .../omegasource/magus/radix/RadixTree.java | 26 ++++++++++++++++--- .../minecraft/forge/key/KeyHoldCondition.java | 2 ++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 40034723..7115b67f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -17,7 +17,7 @@ public abstract class InputModule { - protected static RadixTree formsTree = new RadixTree(); + protected static RadixTree formsTree = new RadixTree(RadixTree.Side.CLIENT); protected static LinkedList activeConditions = new LinkedList<>(); protected static final List activeFormInputs = new ArrayList<>(); protected final Map formInputs = new HashMap<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 9a59505a..0b54043f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -22,14 +22,25 @@ public class RadixTree { private Discipline activeDiscipline = null; //Disciplines.FIRE; private ConditionPath path; private Entity owner; + private Side side = Side.COMMON; + + public RadixTree(Node root, Side side) { + this(root); + this.side = side; + } public RadixTree(Node root) { this.root = root; this.active = root; } + public RadixTree(Side side) { + this(); + this.side = side; + } + public RadixTree() { - root = new Node(false); + this(new Node(false)); } private int getFirstMismatchCondition(List conditions, List edgeCondition) { @@ -174,8 +185,6 @@ public List search(List conditions) { return ret; } - // ---------- Cali's RadixTree Impl ---------- - public void burn() { if (active.terminateCondition() != null) { active.terminateCondition().unregister(); @@ -185,6 +194,8 @@ public void burn() { activeDiscipline = null; } + // ---------- Cali's RadixTree Impl ---------- + public void start() { setActive(root); path = new ConditionPath(); @@ -209,7 +220,10 @@ private void setActive(Node node) { currentCondition.register(currentCondition.name(), () -> { currentCondition.onSuccess.run(); currentCondition.unregister(); - MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); + switch (side) { + default -> MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); + } + }, currentCondition.onFailure); currentCondition.register(); } @@ -336,6 +350,10 @@ public void setOwner(Entity entity) { this.owner = entity; } + public enum Side { + CLIENT, COMMON, SERVER + } + // Menu = radial menu or a HUD. Other activation types are self explanatory. public enum ActivationType { MULTIKEY, MENU, HOTKEY, VR diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index a3e9764d..d9e3eff1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -52,6 +52,8 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { + if (timeout > 0) + RadixUtil.getLogger().debug("Listening on timed condition."); if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { this.started = true; this.currentHolding++; From db10e36f8d23ba3516338f5918ae3d9caebc34ae Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 1 Oct 2024 19:10:40 +1000 Subject: [PATCH 288/469] Figured out the issue; I'll work on it with Cali --- .../java/com/amuzil/omegasource/magus/input/InputModule.java | 4 ++++ .../amuzil/omegasource/magus/input/KeyboardInputModule.java | 5 ++++- .../java/com/amuzil/omegasource/magus/radix/RadixTree.java | 4 ++-- .../condition/minecraft/forge/key/KeyHoldCondition.java | 2 -- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 3e2eeb99..ca50c2ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -4,6 +4,8 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; @@ -76,6 +78,8 @@ public RadixTree getFormsTree() { public static void resetFormsTree() { FormDataRegistry.init(); // Re-initialize formData since it's a static field formsTree = new RadixTree(); + // Default is air. + formsTree.setDiscipline(Disciplines.AIR); } public void init() { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 4e9d1788..adbcd3ec 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -5,8 +5,8 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; -import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.mojang.blaze3d.platform.InputConstants; @@ -46,6 +46,8 @@ public class KeyboardInputModule extends InputModule { // remain functionally the same, they just check different input modules for whether the same // forms are activated. public KeyboardInputModule() { + formsTree.setDiscipline(Disciplines.AIR); + this.glfwKeysDown = new ArrayList<>(); this.listen = true; this.keyboardListener = keyboardEvent -> { @@ -179,6 +181,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx condition.register(condition.name(), () -> { if (!activeConditions.contains(condition)) activeConditions.add(condition); + formsTree.moveDown(condition); this.timeout = 0; // condition.reset(); }, () -> { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 348f9760..d48bf0c7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -173,7 +173,7 @@ public void insert(List conditions) { // deactivateAllConditions(); // for (Condition condition : root.getImmediateBranches()) // condition.register(); - activateAllConditions(); +// activateAllConditions(); } // Returns matched condition path if found and null if not found - O(n) @@ -214,7 +214,7 @@ public void start() { path = new ConditionPath(); } - private void setActive(Discipline discipline) { + public void setDiscipline(Discipline discipline) { this.activeDiscipline = discipline; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 0e30c17e..8335be67 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -52,8 +52,6 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { - if (timeout > 0) - RadixUtil.getLogger().debug("Listening on timed condition."); if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { this.started = true; this.currentHolding++; From 9d36c6f4968156fb6d24639d44a994bc43608334 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 2 Oct 2024 14:21:07 +1000 Subject: [PATCH 289/469] runnable adjusting --- .../omegasource/magus/input/InputModule.java | 1 + .../magus/input/KeyboardInputModule.java | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index ca50c2ba..48f76e2c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -21,6 +21,7 @@ public abstract class InputModule { protected static RadixTree formsTree = new RadixTree(RadixTree.Side.CLIENT); protected static LinkedList activeConditions = new LinkedList<>(); + protected static LinkedList activeForms = new LinkedList<>(); protected static final List activeFormInputs = new ArrayList<>(); protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index adbcd3ec..67111d68 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -190,15 +190,22 @@ public void registerInputData(List formExecutionInputs, Form formToEx }); } // And if the list has multiple conditions that won't all necessarily fail.... -// if (!formCondition.isEmpty()) { -// Condition lastCondition = formCondition.get(formCondition.size() - 1); -// Runnable failure = lastCondition.onFailure(); -// lastCondition.register(lastCondition.name(), lastCondition.onSuccess(), () -> { -// if (failure != null) -// failure.run(); -// activeConditions.removeAll(formCondition); -// }); -// } + if (!formCondition.isEmpty()) { + Condition lastCondition = formCondition.get(formCondition.size() - 1); + Runnable failure = lastCondition.onFailure(); + Runnable success = lastCondition.onSuccess(); + lastCondition.register(lastCondition.name(), () -> { + if (success != null) + success.run(); + // Then add the form to a linked list + if (!activeForms.contains(formToExecute)) + activeForms.add(formToExecute); + }, () -> { + if (failure != null) + failure.run(); + activeConditions.removeAll(formCondition); + }); + } ConditionPath path = formToExecute.createPath(updatedConditions); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); From 2f00bbe4db57faaf0eefc29745712263c63ec4df Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 2 Oct 2024 01:31:09 -0400 Subject: [PATCH 290/469] implement moveDown logic --- .../omegasource/magus/radix/RadixTree.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index d48bf0c7..b3675c76 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -19,7 +19,7 @@ public class RadixTree { private Node active; private Condition lastActivated = null; // Fire is a test - private Discipline activeDiscipline = null; //Disciplines.FIRE; + private Discipline activeDiscipline = null; // Disciplines.FIRE; private ConditionPath path; private Entity owner; private Side side = Side.COMMON; @@ -83,6 +83,12 @@ private void deactivateAllConditions(Node current, List result) { deactivateAllConditions(branch.next, Stream.concat(result.stream(), branch.path.conditions.stream()).toList()); } + public void resetTree() { + deactivateAllConditions(); + for (Condition condition : root.getImmediateBranches()) + condition.register(); + } + // Helpful method to debug and to see all the conditions public void printAllConditions() { printAllConditions(root, new ArrayList<>()); @@ -170,9 +176,7 @@ public void insert(List conditions) { } // Only register immediate children conditions -// deactivateAllConditions(); -// for (Condition condition : root.getImmediateBranches()) -// condition.register(); + resetTree(); // activateAllConditions(); } @@ -187,8 +191,16 @@ public List search(List conditions) { // RadixBranch branch = current.getMatchedPath(currentCondition); if (branch == null) return null; + if (!branch.path.conditions.isEmpty()) { // Move down logic + branch.path.conditions.get(0).unregister(); // Stop listening to current condition + for (Condition condition: branch.next.branches.keySet()) { + condition.register(); // Start listening to next child conditions + } + } + List currSubCondition = conditions.subList(currIndex, conditions.size()); - if (!Condition.startsWith(currSubCondition, branch.path.conditions)) return null; // uses equals + if (!Condition.startsWith(currSubCondition, branch.path.conditions)) + return null; // uses equals currIndex += branch.path.conditions.size(); current = branch.next; From 8d7e84ececc9fb33b66f28d28e9591a8c73951de Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 2 Oct 2024 01:50:10 -0400 Subject: [PATCH 291/469] Update KeyHoldCondition.java --- .../radix/condition/minecraft/forge/key/KeyHoldCondition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 8335be67..5c81d1b8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -75,7 +75,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { } } // If the duration is <= 3, then we want the Condition to act as a key press, rather than a hold. -// + if (this.started) { // Timeout of -1 means that this should wait forever. if (timeout > -1 && this.currentTotal >= timeout) { From 4e3de5c5f0c7c7a53693518acdfc8b94408b627f Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 2 Oct 2024 02:34:36 -0400 Subject: [PATCH 292/469] implemented debugging command --- .../com/amuzil/omegasource/magus/Magus.java | 5 +- .../omegasource/magus/radix/Condition.java | 1 + .../minecraft/forge/key/KeyHoldCondition.java | 4 +- .../skill/test/avatar/AvatarCommand.java | 49 +++++++++++++++++++ 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 394f8eac..34a43753 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -9,12 +9,14 @@ import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.test.avatar.AvatarCommand; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.Entity; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.server.ServerStartingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.*; @@ -90,9 +92,10 @@ private void processIMC(final InterModProcessEvent event) { // You can use SubscribeEvent and let the Event Bus discover methods to call @SubscribeEvent - public void onServerStarting(FMLDedicatedServerSetupEvent event) { + public void onServerStarting(ServerStartingEvent event) { // do something when the server starts LOGGER.info("HELLO from server starting"); + AvatarCommand.register(event.getServer().getCommands().getDispatcher()); } // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index a5f79938..892c228b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -16,6 +16,7 @@ public enum Result { protected static final Runnable NO_OPERATION = () -> RadixUtil.getLogger().debug("Result: No Operation"); protected String name; + protected boolean active = false; protected Runnable onSuccess; protected Runnable onFailure; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 5c81d1b8..d6d42583 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -145,18 +145,20 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { @Override public void register() { super.register(); + active = true; MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); } @Override public void unregister() { + active = false; MinecraftForge.EVENT_BUS.unregister(clientTickListener); } @Override public String toString() { - return String.format("%s[ %s, key=%s, held=%d, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), name(), + return String.format("%s[ active=%b, key=%s, held=%d, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), active, key, currentHolding, duration, timeout, release); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java new file mode 100644 index 00000000..fb37c7bd --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -0,0 +1,49 @@ +package com.amuzil.omegasource.magus.skill.test.avatar; + +import com.amuzil.omegasource.magus.Magus; +import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.arguments.BoolArgumentType; +import net.minecraft.commands.CommandSourceStack; +import net.minecraft.commands.Commands; + + +public class AvatarCommand { + // Class for registering the '/gesture' command + public static void register(CommandDispatcher dispatcher) { + dispatcher.register(Commands.literal("avatar") + .then(Commands.literal("record") + .then(Commands.argument("value", BoolArgumentType.bool()) + .executes(c -> record(BoolArgumentType.getBool(c, "value"))) + ) + .executes(c -> record()) + ) + .then(Commands.literal("tree") + .executes(c -> tree()) + ) + .then(Commands.literal("save") + .executes(c -> save()) + ) + .executes(c -> { + Magus.sendDebugMsg("Possible modes: record, tree, save"); + return 1; + }) + ); + } + + private static int record(boolean mode) { + return 1; + } + + private static int record() { + return 1; + } + + private static int tree() { + Magus.keyboardInputModule.getFormsTree().printAllBranches(); + return 1; + } + + private static int save() { + return 1; + } +} \ No newline at end of file From bf4e73123759bf46fdbbde46ae930763a6c5286c Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 3 Oct 2024 01:16:57 -0400 Subject: [PATCH 293/469] add more debug help --- .../magus/input/KeyboardInputModule.java | 5 +++- .../omegasource/magus/radix/Condition.java | 4 +++ .../minecraft/forge/key/KeyHoldCondition.java | 4 ++- .../skill/test/avatar/AvatarCommand.java | 25 +++++++++++-------- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 67111d68..63b5126e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -39,6 +39,8 @@ public class KeyboardInputModule extends InputModule { private int timeout = 0; private boolean listen; private boolean checkForm = false; + public List testConditions; + public int testKey = 68; // TODO: Fix this such that any tree requiring a form relies on the input // module activating a form rather than relying on the raw input data for those forms. @@ -52,7 +54,8 @@ public KeyboardInputModule() { this.listen = true; this.keyboardListener = keyboardEvent -> { int keyPressed = keyboardEvent.getKey(); - // Get the Conditions list if one already exists for that key + // NOTE: Minecraft's InputEvent.Key can only listen to the action InputConstants.REPEAT of one key at a time + // tldr: it only fires the repeat event for the last key switch (keyboardEvent.getAction()) { case InputConstants.PRESS, InputConstants.REPEAT -> { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 892c228b..6068be2e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -71,6 +71,10 @@ public String modID() { public void reset() {} + public boolean getActiveStatus() { + return active; + } + public static boolean startsWith(List conditions, List subConditions) { try { return conditions.subList(0, subConditions.size()).equals(subConditions); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index d6d42583..d5eaedd7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; +import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -159,6 +160,7 @@ public void unregister() { @Override public String toString() { return String.format("%s[ active=%b, key=%s, held=%d, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), active, - key, currentHolding, duration, timeout, release); + InputConstants.getKey(key, -1).getName().replace("key.", ""), + currentHolding, duration, timeout, release); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index fb37c7bd..7d955c43 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -1,8 +1,9 @@ package com.amuzil.omegasource.magus.skill.test.avatar; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.mojang.brigadier.CommandDispatcher; -import com.mojang.brigadier.arguments.BoolArgumentType; +import com.mojang.brigadier.arguments.IntegerArgumentType; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; @@ -11,26 +12,28 @@ public class AvatarCommand { // Class for registering the '/gesture' command public static void register(CommandDispatcher dispatcher) { dispatcher.register(Commands.literal("avatar") - .then(Commands.literal("record") - .then(Commands.argument("value", BoolArgumentType.bool()) - .executes(c -> record(BoolArgumentType.getBool(c, "value"))) + .then(Commands.literal("key") + .then(Commands.argument("value", IntegerArgumentType.integer()) + .executes(c -> key(IntegerArgumentType.getInteger(c, "value"))) ) .executes(c -> record()) ) .then(Commands.literal("tree") + .then(Commands.literal("reset") + .executes(c -> reset()) + ) .executes(c -> tree()) ) - .then(Commands.literal("save") - .executes(c -> save()) - ) .executes(c -> { - Magus.sendDebugMsg("Possible modes: record, tree, save"); + Magus.sendDebugMsg("Possible modes: record, tree, reset"); return 1; }) ); } - private static int record(boolean mode) { + private static int key(int keyValue) { + KeyboardInputModule kim = (KeyboardInputModule) Magus.keyboardInputModule; + kim.testKey = keyValue; return 1; } @@ -43,7 +46,9 @@ private static int tree() { return 1; } - private static int save() { + private static int reset() { + Magus.keyboardInputModule.getFormsTree().resetTree(); + Magus.sendDebugMsg("Reset Forms RadixTree"); return 1; } } \ No newline at end of file From ca269731723b8f0fa29281d3e3710b2d47d99232 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 3 Oct 2024 02:36:28 -0400 Subject: [PATCH 294/469] made breathe a prefix for the down step another debug command --- .../com/amuzil/omegasource/magus/input/InputModule.java | 6 ++++++ .../com/amuzil/omegasource/magus/server/ServerEvents.java | 4 ++-- .../omegasource/magus/skill/test/avatar/AvatarCommand.java | 4 +++- .../magus/skill/test/avatar/AvatarFormRegistry.java | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 48f76e2c..21a663ac 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -76,6 +76,10 @@ public RadixTree getFormsTree() { return formsTree; } + public List getActiveConditions() { + return activeConditions; + } + public static void resetFormsTree() { FormDataRegistry.init(); // Re-initialize formData since it's a static field formsTree = new RadixTree(); @@ -110,4 +114,6 @@ public void unregisterModifiers() { public abstract void resetKeys(); public abstract boolean keyPressed(int key); + + } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 594c28dd..c0f5c780 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -119,8 +119,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { Magus.mouseMotionModule.terminate(); InputModule.resetFormsTree(); AvatarFormRegistry.registerForms(); - System.out.println("All RadixTree Forms Conditions:"); - Magus.keyboardInputModule.getFormsTree().printAllConditions(); +// System.out.println("All RadixTree Forms Conditions:"); +// Magus.keyboardInputModule.getFormsTree().printAllConditions(); System.out.println("All RadixTree Branches:"); Magus.keyboardInputModule.getFormsTree().printAllBranches(); Magus.keyboardInputModule.init(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index 7d955c43..4de94eb1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -43,12 +43,14 @@ private static int record() { private static int tree() { Magus.keyboardInputModule.getFormsTree().printAllBranches(); + System.out.println("Current Active Forms: " + Magus.keyboardInputModule.getActiveConditions()); return 1; } private static int reset() { Magus.keyboardInputModule.getFormsTree().resetTree(); - Magus.sendDebugMsg("Reset Forms RadixTree"); + Magus.keyboardInputModule.getActiveConditions().clear(); + Magus.sendDebugMsg("Reset Forms RadixTree & Active Conditions"); return 1; } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 0cc45e0d..a5cfa4c4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -25,7 +25,7 @@ public static void registerForms() { KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0); KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0); KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 20); - KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0); + KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 20); MouseWheelInput forwards = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.FORWARDS, 1); MouseWheelInput back = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.BACK, 1); From e5f1b1f8aec199342e3ec4dadee7204adf7cd2ea Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 3 Oct 2024 02:37:00 -0400 Subject: [PATCH 295/469] probs shouldn't do moveDown here like this --- .../amuzil/omegasource/magus/radix/RadixTree.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index b3675c76..94b15083 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -191,12 +191,12 @@ public List search(List conditions) { // RadixBranch branch = current.getMatchedPath(currentCondition); if (branch == null) return null; - if (!branch.path.conditions.isEmpty()) { // Move down logic - branch.path.conditions.get(0).unregister(); // Stop listening to current condition - for (Condition condition: branch.next.branches.keySet()) { - condition.register(); // Start listening to next child conditions - } - } +// if (!branch.path.conditions.isEmpty()) { // Move down logic +// branch.path.conditions.get(0).unregister(); // Stop listening to current condition +// for (Condition condition: branch.next.branches.keySet()) { +// condition.register(); // Start listening to next child conditions +// } +// } List currSubCondition = conditions.subList(currIndex, conditions.size()); if (!Condition.startsWith(currSubCondition, branch.path.conditions)) From bcad00c4524285f17d3d5faac003e0ef111d1dda Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 3 Oct 2024 19:34:09 -0400 Subject: [PATCH 296/469] implemented traversing registration for tree --- .../omegasource/magus/input/InputModule.java | 7 + .../magus/input/KeyboardInputModule.java | 212 +++++++++--------- .../magus/input/MouseInputModule.java | 10 +- .../magus/input/MouseMotionModule.java | 6 + .../omegasource/magus/radix/RadixBranch.java | 6 + .../omegasource/magus/radix/RadixTree.java | 19 +- .../minecraft/forge/key/KeyHoldCondition.java | 53 +++-- .../skill/test/avatar/AvatarCommand.java | 11 +- 8 files changed, 185 insertions(+), 139 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 21a663ac..e5019a73 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -99,6 +100,12 @@ public void terminate() { activeConditions.clear(); } + public void registerRunnables(RadixTree tree) { + registerRunnables(tree.getRoot()); + } + + public abstract void registerRunnables(Node current); + public abstract void registerListeners(); public abstract void registerInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 63b5126e..7afb810a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -3,8 +3,8 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.*; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -29,7 +29,7 @@ public class KeyboardInputModule extends InputModule { private final Consumer tickEventConsumer; //todo make these thresholds configurable and make them longer. Especially the timeout threshold. private final int tickActivationThreshold = 5; - private final int tickTimeoutThreshold = 60; + private final int tickTimeoutThreshold = 100; private final int modifierTickThreshold = 10; Minecraft mc = Minecraft.getInstance(); private List glfwKeysDown; @@ -58,18 +58,16 @@ public KeyboardInputModule() { // tldr: it only fires the repeat event for the last key switch (keyboardEvent.getAction()) { - case InputConstants.PRESS, InputConstants.REPEAT -> { + case InputConstants.PRESS -> { if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); checkForForm(); } } - // NOTE: Minecraft's InputEvent.Key can only listen to the action InputConstants.REPEAT of one key at a time - // tldr: it only fires the repeat event for the last key case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); - checkForm = true; + checkForForm(); } } } @@ -81,46 +79,51 @@ public KeyboardInputModule() { sendModifierData(); } +// checkForForm(); + // Every tick... Yay... // Needed so that key releases actually work. - if (checkForm) { - checkForForm(); - checkForm = false; - } - - if (activeForm != null && activeForm.name() != null) { - ticksSinceActivated++; - if (ticksSinceActivated >= tickActivationThreshold) { -// if (lastActivatedForm != null) -// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); -// else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); -// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); - lastActivatedForm = activeForm; - activeForm = null; - ticksSinceActivated = 0; - timeout = 0; - activeConditions.clear(); - - } +// if (checkForm) { +// checkForForm(); +// checkForm = false; +// } - } else { - timeout++; - if (timeout > tickTimeoutThreshold) { - if (!activeConditions.isEmpty()) { - activeConditions.clear(); - lastActivatedForm = null; - timeout = 0; - } - } - } - //else { +// if (activeForm != null && activeForm.name() != null) { // ticksSinceActivated++; -// if (ticksSinceActivated >= tickTimeoutThreshold) { -// lastActivatedForm = null; -// // Have to clear currently active conditions -// activeConditions.clear(); +// if (ticksSinceActivated >= tickActivationThreshold) { +//// if (lastActivatedForm != null) +//// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); +//// else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); +//// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); +// lastActivatedForm = activeForm; +// activeForm = null; // ticksSinceActivated = 0; +// timeout = 0; +// activeConditions.clear(); +// // } + +// } else { +// timeout++; +// if (timeout > tickTimeoutThreshold) { +// if (!activeConditions.isEmpty()) { +// System.out.println("Resetting..."); +// formsTree.resetTree(); +// activeConditions.clear(); +// lastActivatedForm = null; +// timeout = 0; +// } +// } +// } + //else { + ticksSinceActivated++; + if (ticksSinceActivated >= tickTimeoutThreshold) { +// System.out.println("RESET STATE!"); + lastActivatedForm = null; + activeConditions.clear(); + formsTree.resetTree(); + ticksSinceActivated = 0; + } }; } @@ -137,14 +140,21 @@ public static Map getMovementKeys() { } private void checkForForm() { - List conditions = activeConditions.stream().toList(); - List recognized = formsTree.search(conditions); - System.out.println("activeConditions KIM: " + activeConditions); - if (recognized != null) { - activeConditions.clear(); - activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); - System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); - Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); + if (!activeConditions.isEmpty()) { + System.out.println("activeConditions KIM: " + activeConditions + " | " + glfwKeysDown); + System.out.println("FOUND STEP D FORM: " + formsTree.search(testConditions)); +// System.out.println("STEP SNEAK FORM: " + testConditions); +// testConditions.forEach(condition -> System.out.print(condition.getActiveStatus() + " ")); +// System.out.println(); +// formsTree.printAllConditions(); + List conditions = activeConditions.stream().toList(); + List recognized = formsTree.search(conditions); + if (recognized != null) { +// activeConditions.clear(); formsTree.resetTree(); + activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); + System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); + Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); + } } } @@ -173,80 +183,66 @@ public void cleanMCKeys() { @Override public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { - // TODO: - // - Change formCondition to be a list of Conditions. - // - Have a createConditionPath(List conditions) method for each Form. - // - Call it here, then add the condition path to the radixtree. - - // Now, we call: List updatedConditions = formCondition.stream().toList(); - for (Condition condition : updatedConditions) { + for (int i=0; i < updatedConditions.size(); i++) { + Condition condition = updatedConditions.get(i); + Condition nextCondition; + if (i+1 < updatedConditions.size()) + nextCondition = updatedConditions.get(i+1); + else + nextCondition = null; condition.register(condition.name(), () -> { - if (!activeConditions.contains(condition)) + if (!activeConditions.contains(condition)) { activeConditions.add(condition); - formsTree.moveDown(condition); + condition.unregister(); + if (nextCondition != null) + nextCondition.register(); + } this.timeout = 0; -// condition.reset(); + condition.reset(); }, () -> { activeConditions.remove(condition); condition.reset(); }); } - // And if the list has multiple conditions that won't all necessarily fail.... - if (!formCondition.isEmpty()) { - Condition lastCondition = formCondition.get(formCondition.size() - 1); - Runnable failure = lastCondition.onFailure(); - Runnable success = lastCondition.onSuccess(); - lastCondition.register(lastCondition.name(), () -> { - if (success != null) - success.run(); - // Then add the form to a linked list - if (!activeForms.contains(formToExecute)) - activeForms.add(formToExecute); - }, () -> { - if (failure != null) - failure.run(); - activeConditions.removeAll(formCondition); - }); - } ConditionPath path = formToExecute.createPath(updatedConditions); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); - // add the path to the tree + registerRunnables(formsTree); + if (formCondition.get(0) instanceof KeyHoldCondition keyCondition) + if (keyCondition.getKey() == testKey) + testConditions = updatedConditions; -// //generate condition from InputData. -// Runnable onSuccess = () -> { -// if(mc.level != null) { -// //this section is to prevent re-activating -// // single condition forms when you hold the activation key for Held modifiers -// -// //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. -// // I.e account for modifiers here. -// if(formToExecute != lastActivatedForm) { -// //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); -// activeForm = formToExecute; -// } -// -// ticksSinceActivated = 0; -// } -// //Reset condition -// }; -// Runnable onFailure = () -> { -// activeForm = new Form(); -// //reset conditions? -// // Magus.radixTree.burn(); -// }; -// -// if(formCondition != null) { -// //Register listeners for condition created. -// formCondition.register(formToExecute.name(), onSuccess, onFailure); -// //add condition to InputModule registry so that it can be tracked. -// formInputs.put(formCondition, formToExecute); -// } else { -// //todo errors/logging -// } + } + public void registerRunnables(RadixTree tree) { + registerRunnables(tree.getRoot()); + } + + @Override + public void registerRunnables(Node current) { + for (RadixBranch branch : current.branches.values()) { + if (!branch.next.branches.keySet().isEmpty()) + System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); + for (Condition condition: branch.conditions()) { + Runnable onSuccess = () -> { + if (!activeConditions.contains(condition)) { + activeConditions.add(condition); + condition.unregister(); // unregister parent to give child nodes a shot to be heard + List childConditions = branch.next.branches.keySet().stream().toList(); + RadixTree.registerConditions(childConditions); + } + this.timeout = 0; + }; + Runnable onFailure = () -> { + activeConditions.remove(condition); + condition.reset(); + }; + condition.register(condition.name(), onSuccess, onFailure); + } + registerRunnables(branch.next); + } } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index a0dc1683..abd3f466 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -100,7 +101,7 @@ public MouseInputModule() { lastActivatedForm = activeForm; activeForm = new Form(); ticksSinceActivated = 0; - activeConditions.clear(); +// activeConditions.clear(); } } else { @@ -108,7 +109,7 @@ public MouseInputModule() { if (ticksSinceActivated >= tickTimeoutThreshold) { lastActivatedForm = null; ticksSinceActivated = 0; - activeConditions.clear(); +// activeConditions.clear(); } } }; @@ -199,6 +200,11 @@ public void registerInputData(List formExecutionInputs, Form formToEx } + @Override + public void registerRunnables(Node current) { + + } + @Override public void registerListeners() { MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index db86fc9e..fcfdf7be 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.Node; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseVircle; @@ -130,6 +131,11 @@ public void registerInputData(List formExecutionInputs, Form formToEx // } } + @Override + public void registerRunnables(Node current) { + + } + @Override public void registerListeners() { MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java index b5ee288e..ee508d44 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixBranch.java @@ -1,6 +1,8 @@ package com.amuzil.omegasource.magus.radix; +import java.util.List; + public class RadixBranch { // Class that represents a valid condition path leading from a previous Node and stores the Condition(s) @@ -16,6 +18,10 @@ public RadixBranch(ConditionPath path, Node next) { this.next = next; } + public List conditions() { + return path.conditions; + } + @Override public String toString() { return "RadixBranch[Conditions=" + path + "]"; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 94b15083..757d637f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -43,6 +43,10 @@ public RadixTree() { this(new Node(false)); } + public Node getRoot() { + return root; + } + private int getFirstMismatchCondition(List conditions, List edgeCondition) { int LENGTH = Math.min(conditions.size(), edgeCondition.size()); for (int i = 1; i < LENGTH; i++) { @@ -53,7 +57,7 @@ private int getFirstMismatchCondition(List conditions, List conditions) { + public static void registerConditions(List conditions) { for (Condition condition : conditions) { condition.register(); } @@ -114,9 +118,16 @@ private void printAllBranches(Node current, String indent) { else System.out.println(indent.replace("+", "|") + branch.path); int length1 = indent.length() / 2 == 0 ? 4 : indent.length() / 2; int length2 = branch.path.toString().length() / 3; - String oldIndent = new String(new char[length1]).replace("\0", " "); - String lineIndent = new String(new char[length2]).replace("\0", "-"); - String newIndent = oldIndent + "+" + lineIndent + "->"; + String lineIndent = new String(new char[length2]).replace("\0", "─"); + String oldIndent, newIndent; + if (i != lastValue) { + length1 = length1 - 4; + oldIndent = new String(new char[length1]).replace("\0", " "); + newIndent = " |" + oldIndent + "+" + lineIndent + "─>"; + } else { + oldIndent = new String(new char[length1]).replace("\0", " "); + newIndent = oldIndent + "+" + lineIndent + "─>"; + } i++; printAllBranches(branch.next, newIndent); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index d5eaedd7..341644eb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -54,37 +54,46 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { - this.started = true; this.currentHolding++; if (pressed(this.currentHolding, duration)) { // // If the Condition doesn't require the key being released.... - if (!release) { + if (!started) { + this.started = true; this.onSuccess.run(); } } } else { - if (pressed(this.currentHolding, duration)) { - // If the Condition requires the key being released.... - if (release) { - this.onSuccess.run(); - } - } else { - // Not held for long enough - if (this.currentHolding > 0) { - this.onFailure.run(); - } + if (started) { + this.onSuccess.run(); + this.started = false; } +// if (pressed(this.currentHolding, duration)) { +// // If the Condition requires the key being released.... +// if (release) { +// this.onSuccess.run(); +// } +// } +// if (started) { +// started = false; +// this.onFailure.run(); +// } +// else { +// // Not held for long enough +// if (this.currentHolding > 0) { +// this.onFailure.run(); +// } +// } } // If the duration is <= 3, then we want the Condition to act as a key press, rather than a hold. - if (this.started) { - // Timeout of -1 means that this should wait forever. - if (timeout > -1 && this.currentTotal >= timeout) { - RadixUtil.getLogger().warn("Condition is failing. " + this); - this.onFailure.run(); - } - this.currentTotal++; - } +// if (this.started) { +// // Timeout of -1 means that this should wait forever. +// if (timeout > -1 && this.currentTotal >= timeout) { +// RadixUtil.getLogger().warn("Condition is failing. " + this); +// this.onFailure.run(); +// } +// this.currentTotal++; +// } } }; @@ -146,15 +155,15 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { @Override public void register() { super.register(); - active = true; MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); + active = true; } @Override public void unregister() { - active = false; MinecraftForge.EVENT_BUS.unregister(clientTickListener); + active = false; } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index 4de94eb1..3440da88 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.test.avatar; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.IntegerArgumentType; @@ -48,9 +49,13 @@ private static int tree() { } private static int reset() { - Magus.keyboardInputModule.getFormsTree().resetTree(); - Magus.keyboardInputModule.getActiveConditions().clear(); - Magus.sendDebugMsg("Reset Forms RadixTree & Active Conditions"); + KeyboardInputModule kim = (KeyboardInputModule) Magus.keyboardInputModule; + kim.getFormsTree().resetTree(); + kim.getActiveConditions().clear(); + InputModule.resetFormsTree(); + AvatarFormRegistry.registerForms(); + kim.registerRunnables(Magus.keyboardInputModule.getFormsTree()); + Magus.sendDebugMsg("Reset Forms RadixTree"); return 1; } } \ No newline at end of file From 2204e42cdcc819d3d84d30e0e75b402457ddf59c Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 3 Oct 2024 22:35:01 -0400 Subject: [PATCH 297/469] register next condition in path for Step Form --- .../omegasource/magus/input/KeyboardInputModule.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 7afb810a..7aebdf1a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -225,11 +225,19 @@ public void registerRunnables(Node current) { for (RadixBranch branch : current.branches.values()) { if (!branch.next.branches.keySet().isEmpty()) System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); - for (Condition condition: branch.conditions()) { + for (int i=0; i < branch.conditions().size(); i++) { + Condition condition = branch.conditions().get(i); + Condition nextCondition; + if (i+1 < branch.conditions().size()) + nextCondition = branch.conditions().get(i+1); + else + nextCondition = null; Runnable onSuccess = () -> { if (!activeConditions.contains(condition)) { activeConditions.add(condition); condition.unregister(); // unregister parent to give child nodes a shot to be heard + if (nextCondition != null) + nextCondition.register(); // register next condition in the path if it exists List childConditions = branch.next.branches.keySet().stream().toList(); RadixTree.registerConditions(childConditions); } From 0226aa9e068411f0908e7f41643b7a78cc70e6f0 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 4 Oct 2024 14:42:43 +1000 Subject: [PATCH 298/469] unlimited suffering --- .../magus/input/KeyboardInputModule.java | 142 +++++++++--------- .../skill/test/avatar/AvatarFormRegistry.java | 6 +- 2 files changed, 76 insertions(+), 72 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 7aebdf1a..e219cf84 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -28,9 +28,11 @@ public class KeyboardInputModule extends InputModule { private final Consumer keyboardListener; private final Consumer tickEventConsumer; //todo make these thresholds configurable and make them longer. Especially the timeout threshold. - private final int tickActivationThreshold = 5; - private final int tickTimeoutThreshold = 100; + private final int tickActivationThreshold = 15; + private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; + public List testConditions; + public int testKey = 68; Minecraft mc = Minecraft.getInstance(); private List glfwKeysDown; private Form activeForm = null; @@ -39,8 +41,6 @@ public class KeyboardInputModule extends InputModule { private int timeout = 0; private boolean listen; private boolean checkForm = false; - public List testConditions; - public int testKey = 68; // TODO: Fix this such that any tree requiring a form relies on the input // module activating a form rather than relying on the raw input data for those forms. @@ -83,25 +83,26 @@ public KeyboardInputModule() { // Every tick... Yay... // Needed so that key releases actually work. -// if (checkForm) { -// checkForForm(); -// checkForm = false; -// } + if (checkForm) { + checkForForm(); + checkForm = false; + } -// if (activeForm != null && activeForm.name() != null) { -// ticksSinceActivated++; -// if (ticksSinceActivated >= tickActivationThreshold) { -//// if (lastActivatedForm != null) -//// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); -//// else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); -//// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); -// lastActivatedForm = activeForm; -// activeForm = null; -// ticksSinceActivated = 0; -// timeout = 0; -// activeConditions.clear(); -// -// } + if (activeForm != null && activeForm.name() != null) { + ticksSinceActivated++; + if (ticksSinceActivated >= tickActivationThreshold) { +// if (lastActivatedForm != null) +// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); +// else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); +// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); + lastActivatedForm = activeForm; + activeForm = null; + ticksSinceActivated = 0; + timeout = 0; + resetConditions(); + + } + } // } else { // timeout++; @@ -116,17 +117,25 @@ public KeyboardInputModule() { // } // } //else { - ticksSinceActivated++; - if (ticksSinceActivated >= tickTimeoutThreshold) { + ticksSinceActivated++; + if (ticksSinceActivated >= tickTimeoutThreshold) { // System.out.println("RESET STATE!"); - lastActivatedForm = null; - activeConditions.clear(); - formsTree.resetTree(); - ticksSinceActivated = 0; - } + lastActivatedForm = null; + resetConditions(); + formsTree.resetTree(); + ticksSinceActivated = 0; + } }; } + public void resetConditions() { + if (!activeConditions.isEmpty()) { + for (Condition condition : activeConditions) + condition.reset(); + activeConditions.clear(); + } + } + public static void determineMotionKeys() { Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { if (keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { @@ -150,7 +159,7 @@ private void checkForForm() { List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); if (recognized != null) { -// activeConditions.clear(); formsTree.resetTree(); + resetConditions(); activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); @@ -184,22 +193,19 @@ public void cleanMCKeys() { @Override public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { List updatedConditions = formCondition.stream().toList(); - for (int i=0; i < updatedConditions.size(); i++) { + for (int i = 0; i < updatedConditions.size(); i++) { Condition condition = updatedConditions.get(i); Condition nextCondition; - if (i+1 < updatedConditions.size()) - nextCondition = updatedConditions.get(i+1); - else - nextCondition = null; + if (i + 1 < updatedConditions.size()) nextCondition = updatedConditions.get(i + 1); + else nextCondition = null; condition.register(condition.name(), () -> { if (!activeConditions.contains(condition)) { activeConditions.add(condition); condition.unregister(); - if (nextCondition != null) - nextCondition.register(); + if (nextCondition != null) nextCondition.register(); } - this.timeout = 0; condition.reset(); + this.timeout = 0; }, () -> { activeConditions.remove(condition); condition.reset(); @@ -211,8 +217,7 @@ public void registerInputData(List formExecutionInputs, Form formToEx formsTree.insert(path.conditions); registerRunnables(formsTree); if (formCondition.get(0) instanceof KeyHoldCondition keyCondition) - if (keyCondition.getKey() == testKey) - testConditions = updatedConditions; + if (keyCondition.getKey() == testKey) testConditions = updatedConditions; } @@ -222,35 +227,34 @@ public void registerRunnables(RadixTree tree) { @Override public void registerRunnables(Node current) { - for (RadixBranch branch : current.branches.values()) { - if (!branch.next.branches.keySet().isEmpty()) - System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); - for (int i=0; i < branch.conditions().size(); i++) { - Condition condition = branch.conditions().get(i); - Condition nextCondition; - if (i+1 < branch.conditions().size()) - nextCondition = branch.conditions().get(i+1); - else - nextCondition = null; - Runnable onSuccess = () -> { - if (!activeConditions.contains(condition)) { - activeConditions.add(condition); - condition.unregister(); // unregister parent to give child nodes a shot to be heard - if (nextCondition != null) - nextCondition.register(); // register next condition in the path if it exists - List childConditions = branch.next.branches.keySet().stream().toList(); - RadixTree.registerConditions(childConditions); - } - this.timeout = 0; - }; - Runnable onFailure = () -> { - activeConditions.remove(condition); - condition.reset(); - }; - condition.register(condition.name(), onSuccess, onFailure); - } - registerRunnables(branch.next); - } +// for (RadixBranch branch : current.branches.values()) { +// if (!branch.next.branches.keySet().isEmpty()) +// System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); +// for (int i = 0; i < branch.conditions().size(); i++) { +// Condition condition = branch.conditions().get(i); +// Condition nextCondition; +// if (i + 1 < branch.conditions().size()) nextCondition = branch.conditions().get(i + 1); +// else nextCondition = null; +// Runnable onSuccess = () -> { +// if (!activeConditions.contains(condition)) { +// activeConditions.add(condition); +// condition.unregister(); // unregister parent to give child nodes a shot to be heard +// if (nextCondition != null) +// nextCondition.register(); // register next condition in the path if it exists +// List childConditions = branch.next.branches.keySet().stream().toList(); +// RadixTree.registerConditions(childConditions); +// } +// this.timeout = 0; +// condition.reset(); +// }; +// Runnable onFailure = () -> { +// activeConditions.remove(condition); +// condition.reset(); +// }; +// condition.register(condition.name(), onSuccess, onFailure); +// } +// registerRunnables(branch.next); +// } } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index a5cfa4c4..5d919bb9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -25,7 +25,7 @@ public static void registerForms() { KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0); KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0); KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 20); - KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 0, 20); + KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 16); MouseWheelInput forwards = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.FORWARDS, 1); MouseWheelInput back = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.BACK, 1); @@ -69,9 +69,9 @@ public static void registerForms() { KeyInput first, second; // key.right is 68 - first = KeyDataBuilder.createInput(key.getValue(), 0, 20); + first = KeyDataBuilder.createInput(key.getValue(), true,0); // Has to be a relatively quick input. - second = KeyDataBuilder.createInput(key.getValue(), true, 0); + second = KeyDataBuilder.createInput(key.getValue(), 0, 15); inputs.add(first); inputs.add(second); FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD); From 7a542ba85982200fb2848c39471c955d6ef483de Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 4 Oct 2024 23:31:26 -0400 Subject: [PATCH 299/469] bump --- .../magus/input/KeyboardInputModule.java | 124 ++++++++++-------- .../minecraft/forge/key/KeyHoldCondition.java | 4 +- .../omegasource/magus/skill/forms/Form.java | 5 + 3 files changed, 74 insertions(+), 59 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index e219cf84..828016bb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -35,7 +35,7 @@ public class KeyboardInputModule extends InputModule { public int testKey = 68; Minecraft mc = Minecraft.getInstance(); private List glfwKeysDown; - private Form activeForm = null; + private Form activeForm, lastActivatedForm = null; private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; private int timeout = 0; @@ -58,16 +58,16 @@ public KeyboardInputModule() { // tldr: it only fires the repeat event for the last key switch (keyboardEvent.getAction()) { - case InputConstants.PRESS -> { + case InputConstants.PRESS-> { if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); - checkForForm(); +// checkForForm(); } } case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); - checkForForm(); +// checkForForm(); } } } @@ -79,8 +79,6 @@ public KeyboardInputModule() { sendModifierData(); } -// checkForForm(); - // Every tick... Yay... // Needed so that key releases actually work. if (checkForm) { @@ -151,13 +149,13 @@ public static Map getMovementKeys() { private void checkForForm() { if (!activeConditions.isEmpty()) { System.out.println("activeConditions KIM: " + activeConditions + " | " + glfwKeysDown); + List conditions = activeConditions.stream().toList(); + List recognized = formsTree.search(conditions); System.out.println("FOUND STEP D FORM: " + formsTree.search(testConditions)); // System.out.println("STEP SNEAK FORM: " + testConditions); // testConditions.forEach(condition -> System.out.print(condition.getActiveStatus() + " ")); // System.out.println(); // formsTree.printAllConditions(); - List conditions = activeConditions.stream().toList(); - List recognized = formsTree.search(conditions); if (recognized != null) { resetConditions(); activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); @@ -165,6 +163,15 @@ private void checkForForm() { Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); } } + + if (ticksSinceActivated >= tickTimeoutThreshold) { + lastActivatedForm = null; + activeConditions.clear(); + formsTree.resetTree(); + ticksSinceActivated = 0; +// System.out.println("RESET"); + } + ticksSinceActivated++; } private void sendModifierData() { @@ -192,33 +199,33 @@ public void cleanMCKeys() { @Override public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { - List updatedConditions = formCondition.stream().toList(); - for (int i = 0; i < updatedConditions.size(); i++) { - Condition condition = updatedConditions.get(i); - Condition nextCondition; - if (i + 1 < updatedConditions.size()) nextCondition = updatedConditions.get(i + 1); - else nextCondition = null; - condition.register(condition.name(), () -> { - if (!activeConditions.contains(condition)) { - activeConditions.add(condition); - condition.unregister(); - if (nextCondition != null) nextCondition.register(); - } - condition.reset(); - this.timeout = 0; - }, () -> { - activeConditions.remove(condition); - condition.reset(); - }); - } +// List updatedConditions = formCondition.stream().toList(); +// for (int i = 0; i < updatedConditions.size(); i++) { +// Condition condition = updatedConditions.get(i); +// Condition nextCondition; +// if (i + 1 < updatedConditions.size()) nextCondition = updatedConditions.get(i + 1); +// else nextCondition = null; +// condition.register(condition.name(), () -> { +// if (!activeConditions.contains(condition)) { +// activeConditions.add(condition); +// condition.unregister(); +// if (nextCondition != null) nextCondition.register(); +// } +// condition.reset(); +// this.timeout = 0; +// }, () -> { +// activeConditions.remove(condition); +// condition.reset(); +// }); +// } - ConditionPath path = formToExecute.createPath(updatedConditions); + ConditionPath path = formToExecute.createPath(formCondition); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); registerRunnables(formsTree); if (formCondition.get(0) instanceof KeyHoldCondition keyCondition) - if (keyCondition.getKey() == testKey) testConditions = updatedConditions; - + if (keyCondition.getKey() == testKey) + testConditions = formCondition; } public void registerRunnables(RadixTree tree) { @@ -227,34 +234,35 @@ public void registerRunnables(RadixTree tree) { @Override public void registerRunnables(Node current) { -// for (RadixBranch branch : current.branches.values()) { -// if (!branch.next.branches.keySet().isEmpty()) -// System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); -// for (int i = 0; i < branch.conditions().size(); i++) { -// Condition condition = branch.conditions().get(i); -// Condition nextCondition; -// if (i + 1 < branch.conditions().size()) nextCondition = branch.conditions().get(i + 1); -// else nextCondition = null; -// Runnable onSuccess = () -> { -// if (!activeConditions.contains(condition)) { -// activeConditions.add(condition); -// condition.unregister(); // unregister parent to give child nodes a shot to be heard -// if (nextCondition != null) -// nextCondition.register(); // register next condition in the path if it exists -// List childConditions = branch.next.branches.keySet().stream().toList(); -// RadixTree.registerConditions(childConditions); -// } -// this.timeout = 0; -// condition.reset(); -// }; -// Runnable onFailure = () -> { -// activeConditions.remove(condition); -// condition.reset(); -// }; -// condition.register(condition.name(), onSuccess, onFailure); -// } -// registerRunnables(branch.next); -// } + for (RadixBranch branch : current.branches.values()) { + if (!branch.next.branches.keySet().isEmpty()) + System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); + for (int i=0; i < branch.conditions().size(); i++) { + Condition condition = branch.conditions().get(i); + Condition nextCondition; + if (i+1 < branch.conditions().size()) + nextCondition = branch.conditions().get(i+1); + else + nextCondition = null; + Runnable onSuccess = () -> { + if (!activeConditions.contains(condition)) { + activeConditions.add(condition); + condition.unregister(); // unregister parent to give child nodes a shot to be heard + if (nextCondition != null) + nextCondition.register(); // register next condition in the path if it exists + List childConditions = branch.next.branches.keySet().stream().toList(); + RadixTree.registerConditions(childConditions); // register any next of kin if they exist + } + this.timeout = 0; + }; + Runnable onFailure = () -> { + activeConditions.remove(condition); + condition.reset(); + }; + condition.register(condition.name(), onSuccess, onFailure); + } + registerRunnables(branch.next); + } } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 341644eb..23a650bd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -59,12 +59,14 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { // // If the Condition doesn't require the key being released.... if (!started) { this.started = true; + if (key == 68 && !release) + System.out.println("2nd CONDITION: " + active); this.onSuccess.run(); } } } else { if (started) { - this.onSuccess.run(); + this.onFailure.run(); this.started = false; } // if (pressed(this.currentHolding, duration)) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 1abdfc1a..13e3aa22 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -44,4 +44,9 @@ public ConditionPath createPath(List conditions) { return path; } + + @Override + public String toString() { + return "Form[ " + name().toUpperCase() + " ]"; + } } From 821fde8593f95bdd8a86fb8133b64d6c89847ec3 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 13:33:03 +1000 Subject: [PATCH 300/469] added a space for formatting --- .../omegasource/magus/skill/test/avatar/AvatarFormRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 5d919bb9..eb3effd5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -69,7 +69,7 @@ public static void registerForms() { KeyInput first, second; // key.right is 68 - first = KeyDataBuilder.createInput(key.getValue(), true,0); + first = KeyDataBuilder.createInput(key.getValue(), true, 0); // Has to be a relatively quick input. second = KeyDataBuilder.createInput(key.getValue(), 0, 15); inputs.add(first); From f873e9fde80f9e881c3132aedeb4616dc37659ce Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 13:36:44 +1000 Subject: [PATCH 301/469] reverted keyhold changes... --- .../minecraft/forge/key/KeyHoldCondition.java | 78 +++++++------------ 1 file changed, 30 insertions(+), 48 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 23a650bd..4b576a51 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -18,20 +18,19 @@ public class KeyHoldCondition extends Condition { public static final int KEY_PRESS_TIMEOUT = 3; + private final int key; + private final int duration; public List mouseInputs = new ArrayList<>(); private Consumer clientTickListener; private int currentTotal; private int currentHolding; - private final int key; - private final int duration; private int timeout = -1; // False by default. private boolean release = false; private boolean started = false; public KeyHoldCondition(int key, int duration) { - if (duration < 0) - RadixUtil.getLogger().warn("You should not be defining a key press duration of less than 0."); + if (duration < 0) RadixUtil.getLogger().warn("You should not be defining a key press duration of less than 0."); this.currentTotal = 0; this.currentHolding = 0; @@ -40,8 +39,7 @@ public KeyHoldCondition(int key, int duration) { } public KeyHoldCondition(int key, int duration, int timeout, boolean release) { - if (duration < 0) - RadixUtil.getLogger().warn("You should not be defining a key press duration of less than 0."); + if (duration < 0) RadixUtil.getLogger().warn("You should not be defining a key press duration of less than 0."); this.currentTotal = 0; this.currentHolding = 0; @@ -54,48 +52,38 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { + this.started = true; this.currentHolding++; if (pressed(this.currentHolding, duration)) { // // If the Condition doesn't require the key being released.... - if (!started) { - this.started = true; - if (key == 68 && !release) - System.out.println("2nd CONDITION: " + active); + if (!release) { this.onSuccess.run(); } } } else { - if (started) { - this.onFailure.run(); - this.started = false; + if (pressed(this.currentHolding, duration)) { + // If the Condition requires the key being released.... + if (release) { + this.onSuccess.run(); + } + } + else { + // Not held for long enough + if (this.currentHolding > 0) { + this.onFailure.run(); + } } -// if (pressed(this.currentHolding, duration)) { -// // If the Condition requires the key being released.... -// if (release) { -// this.onSuccess.run(); -// } -// } -// if (started) { -// started = false; -// this.onFailure.run(); -// } -// else { -// // Not held for long enough -// if (this.currentHolding > 0) { -// this.onFailure.run(); -// } -// } } // If the duration is <= 3, then we want the Condition to act as a key press, rather than a hold. -// if (this.started) { -// // Timeout of -1 means that this should wait forever. -// if (timeout > -1 && this.currentTotal >= timeout) { -// RadixUtil.getLogger().warn("Condition is failing. " + this); -// this.onFailure.run(); -// } -// this.currentTotal++; -// } + if (this.started) { + // Timeout of -1 means that this should wait forever. + if (timeout > -1 && this.currentTotal >= timeout) { + RadixUtil.getLogger().warn("Condition is failing. " + this); + this.onFailure.run(); + } + this.currentTotal++; + } } }; @@ -109,8 +97,7 @@ public int getHeld() { public boolean pressed(int held, int duration) { if (duration <= KEY_PRESS_TIMEOUT) { return held > 0; - } - else return held >= duration; + } else return held >= duration; } // Should be called in either runnable by other methods, rather than manually here. Calling it manually in the class can lead @@ -142,10 +129,8 @@ public boolean equals(Object obj) { // System.out.println("other: activeCondition from user input -> " + other); return Objects.equals(key, other.getKey()) && /* Makes sure an alternative key condition that's been pressed has been pressed at least as long - * as the currently compared condition. */ - other.currentHolding >= duration - && other.release == release - && timeout == other.timeout; + * as the currently compared condition. */ + other.currentHolding >= duration && other.release == release && timeout == other.timeout; } } @@ -157,8 +142,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { @Override public void register() { super.register(); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, - clientTickListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); active = true; } @@ -170,8 +154,6 @@ public void unregister() { @Override public String toString() { - return String.format("%s[ active=%b, key=%s, held=%d, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), active, - InputConstants.getKey(key, -1).getName().replace("key.", ""), - currentHolding, duration, timeout, release); + return String.format("%s[ active=%b, key=%s, held=%d, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), active, InputConstants.getKey(key, -1).getName().replace("key.", ""), currentHolding, duration, timeout, release); } } From 36ab7fb7f25ea9669cbb86f31f88c7e90a2b8c4f Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 14:15:12 +1000 Subject: [PATCH 302/469] Now they're only working the first time... --- .../magus/input/KeyboardInputModule.java | 99 ++++++++++--------- .../skill/test/avatar/AvatarFormRegistry.java | 3 - 2 files changed, 50 insertions(+), 52 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 828016bb..48e8469b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -4,7 +4,6 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.*; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -58,7 +57,7 @@ public KeyboardInputModule() { // tldr: it only fires the repeat event for the last key switch (keyboardEvent.getAction()) { - case InputConstants.PRESS-> { + case InputConstants.PRESS -> { if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); // checkForForm(); @@ -68,11 +67,13 @@ public KeyboardInputModule() { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); // checkForForm(); + checkForm = true; } } } }; + this.tickEventConsumer = tickEvent -> { ticksSinceModifiersSent++; if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { @@ -86,9 +87,17 @@ public KeyboardInputModule() { checkForm = false; } + // Check every couple of ticks + if (ticksSinceActivated % (tickActivationThreshold - 1) == 0 + || timeout % tickActivationThreshold - 1 == 0) + checkForForm(); + +// if (timeout % 20 == 0) +// RadixUtil.getLogger().debug("Timeout: " + timeout); if (activeForm != null && activeForm.name() != null) { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { + ticksSinceActivated++; // if (lastActivatedForm != null) // LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); // else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); @@ -98,42 +107,32 @@ public KeyboardInputModule() { ticksSinceActivated = 0; timeout = 0; resetConditions(); + } + } else { + timeout++; + if (timeout > tickTimeoutThreshold) { + if (!activeConditions.isEmpty()) { + System.out.println("Resetting..."); + resetConditions(); + timeout = 0; + } } } +// resetConditions(); -// } else { -// timeout++; -// if (timeout > tickTimeoutThreshold) { -// if (!activeConditions.isEmpty()) { -// System.out.println("Resetting..."); -// formsTree.resetTree(); -// activeConditions.clear(); -// lastActivatedForm = null; -// timeout = 0; -// } -// } -// } //else { - ticksSinceActivated++; - if (ticksSinceActivated >= tickTimeoutThreshold) { -// System.out.println("RESET STATE!"); - lastActivatedForm = null; - resetConditions(); - formsTree.resetTree(); - ticksSinceActivated = 0; - } +// ticksSinceActivated++; +// if (ticksSinceActivated >= tickTimeoutThreshold) { +//// System.out.println("RESET STATE!"); +// lastActivatedForm = null; +// resetConditions(); +// formsTree.resetTree(); +// ticksSinceActivated = 0; +// } }; } - public void resetConditions() { - if (!activeConditions.isEmpty()) { - for (Condition condition : activeConditions) - condition.reset(); - activeConditions.clear(); - } - } - public static void determineMotionKeys() { Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { if (keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { @@ -146,32 +145,31 @@ public static Map getMovementKeys() { return movementKeys; } + public void resetConditions() { + if (!activeConditions.isEmpty()) { +// for (Condition condition : activeConditions) +// condition.reset(); + activeConditions.clear(); + } + } + private void checkForForm() { if (!activeConditions.isEmpty()) { - System.out.println("activeConditions KIM: " + activeConditions + " | " + glfwKeysDown); +// System.out.println("activeConditions KIM: " + activeConditions + " | " + glfwKeysDown); List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); - System.out.println("FOUND STEP D FORM: " + formsTree.search(testConditions)); +// System.out.println("FOUND STEP D FORM: " + formsTree.search(testConditions)); // System.out.println("STEP SNEAK FORM: " + testConditions); // testConditions.forEach(condition -> System.out.print(condition.getActiveStatus() + " ")); // System.out.println(); // formsTree.printAllConditions(); if (recognized != null) { - resetConditions(); +// resetConditions(); activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); } } - - if (ticksSinceActivated >= tickTimeoutThreshold) { - lastActivatedForm = null; - activeConditions.clear(); - formsTree.resetTree(); - ticksSinceActivated = 0; -// System.out.println("RESET"); - } - ticksSinceActivated++; } private void sendModifierData() { @@ -223,9 +221,8 @@ public void registerInputData(List formExecutionInputs, Form formToEx System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); registerRunnables(formsTree); - if (formCondition.get(0) instanceof KeyHoldCondition keyCondition) - if (keyCondition.getKey() == testKey) - testConditions = formCondition; +// if (formCondition.get(0) instanceof KeyHoldCondition keyCondition) +// if (keyCondition.getKey() == testKey) testConditions = formCondition; } public void registerRunnables(RadixTree tree) { @@ -237,17 +234,21 @@ public void registerRunnables(Node current) { for (RadixBranch branch : current.branches.values()) { if (!branch.next.branches.keySet().isEmpty()) System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); - for (int i=0; i < branch.conditions().size(); i++) { + for (int i = 0; i < branch.conditions().size(); i++) { Condition condition = branch.conditions().get(i); Condition nextCondition; - if (i+1 < branch.conditions().size()) - nextCondition = branch.conditions().get(i+1); + + if (i + 1 < branch.conditions().size()) + nextCondition = branch.conditions().get(i + 1); else nextCondition = null; + + Runnable onSuccess = () -> { if (!activeConditions.contains(condition)) { activeConditions.add(condition); - condition.unregister(); // unregister parent to give child nodes a shot to be heard + //condition.unregister(); // unregister parent to give child nodes a shot to be heard + condition.unregister(); if (nextCondition != null) nextCondition.register(); // register next condition in the path if it exists List childConditions = branch.next.branches.keySet().stream().toList(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index eb3effd5..e724d6d0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,9 +1,7 @@ package com.amuzil.omegasource.magus.skill.test.avatar; -import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; @@ -15,7 +13,6 @@ import net.minecraft.client.Minecraft; import java.util.LinkedList; -import java.util.List; import java.util.Map; public class AvatarFormRegistry { From 541ae05be7441c62bd13cae29d03d28b56b8ceda Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 14:22:55 +1000 Subject: [PATCH 303/469] IT WORKS LET'S GOO --- .../magus/input/KeyboardInputModule.java | 29 ++--- .../magus/input/MouseInputModule.java | 112 +++++++++--------- 2 files changed, 66 insertions(+), 75 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 48e8469b..f8075e28 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -88,8 +88,7 @@ public KeyboardInputModule() { } // Check every couple of ticks - if (ticksSinceActivated % (tickActivationThreshold - 1) == 0 - || timeout % tickActivationThreshold - 1 == 0) + if (ticksSinceActivated % (tickActivationThreshold - 1) == 0 || timeout % tickActivationThreshold - 1 == 0) checkForForm(); // if (timeout % 20 == 0) @@ -107,16 +106,16 @@ public KeyboardInputModule() { ticksSinceActivated = 0; timeout = 0; resetConditions(); + formsTree.resetTree(); } } else { timeout++; if (timeout > tickTimeoutThreshold) { - if (!activeConditions.isEmpty()) { - System.out.println("Resetting..."); - resetConditions(); - timeout = 0; - } +// System.out.println("Resetting..."); + resetConditions(); + formsTree.resetTree(); + timeout = 0; } } // resetConditions(); @@ -147,8 +146,8 @@ public static Map getMovementKeys() { public void resetConditions() { if (!activeConditions.isEmpty()) { -// for (Condition condition : activeConditions) -// condition.reset(); + for (Condition condition : activeConditions) + condition.reset(); activeConditions.clear(); } } @@ -158,13 +157,7 @@ private void checkForForm() { // System.out.println("activeConditions KIM: " + activeConditions + " | " + glfwKeysDown); List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); -// System.out.println("FOUND STEP D FORM: " + formsTree.search(testConditions)); -// System.out.println("STEP SNEAK FORM: " + testConditions); -// testConditions.forEach(condition -> System.out.print(condition.getActiveStatus() + " ")); -// System.out.println(); -// formsTree.printAllConditions(); if (recognized != null) { -// resetConditions(); activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); @@ -238,10 +231,8 @@ public void registerRunnables(Node current) { Condition condition = branch.conditions().get(i); Condition nextCondition; - if (i + 1 < branch.conditions().size()) - nextCondition = branch.conditions().get(i + 1); - else - nextCondition = null; + if (i + 1 < branch.conditions().size()) nextCondition = branch.conditions().get(i + 1); + else nextCondition = null; Runnable onSuccess = () -> { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index abd3f466..b1aa5c4d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -78,53 +78,53 @@ public MouseInputModule() { this.tickEventConsumer = tickEvent -> { - ticksSinceModifiersSent++; - if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { - sendModifierData(); - } - - if (checkForm) { - checkForForm(); - checkForm = false; - } - - //cleanMCKeys(); - - if(activeForm.name() != null) { - ticksSinceActivated++; - if(ticksSinceActivated >= tickActivationThreshold) { -// if (lastActivatedForm != null) -// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); -// else -// LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); -// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); - lastActivatedForm = activeForm; - activeForm = new Form(); - ticksSinceActivated = 0; -// activeConditions.clear(); - } - } - else { - ticksSinceActivated++; - if (ticksSinceActivated >= tickTimeoutThreshold) { - lastActivatedForm = null; - ticksSinceActivated = 0; -// activeConditions.clear(); - } - } +// ticksSinceModifiersSent++; +// if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { +// sendModifierData(); +// } +// +// if (checkForm) { +// checkForForm(); +// checkForm = false; +// } +// +// //cleanMCKeys(); +// +// if(activeForm.name() != null) { +// ticksSinceActivated++; +// if(ticksSinceActivated >= tickActivationThreshold) { +//// if (lastActivatedForm != null) +//// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); +//// else +//// LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); +//// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); +// lastActivatedForm = activeForm; +// activeForm = new Form(); +// ticksSinceActivated = 0; +//// activeConditions.clear(); +// } +// } +// else { +// ticksSinceActivated++; +// if (ticksSinceActivated >= tickTimeoutThreshold) { +// lastActivatedForm = null; +// ticksSinceActivated = 0; +//// activeConditions.clear(); +// } +// } }; } private void checkForForm() { - List conditions = activeConditions.stream().toList(); - List recognized = formsTree.search(conditions); - System.out.println("activeConditions MIM: " + activeConditions); - if (recognized != null) { - activeConditions.clear(); - activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); - System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); - Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); - } +// List conditions = activeConditions.stream().toList(); +// List recognized = formsTree.search(conditions); +// System.out.println("activeConditions MIM: " + activeConditions); +// if (recognized != null) { +// activeConditions.clear(); +// activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); +// System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); +// Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); +// } } private void sendModifierData() { @@ -152,20 +152,20 @@ public void cleanMCKeys() { @Override public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { - List updatedConditions = formCondition.stream().toList(); - for (Condition condition : updatedConditions) { - condition.register(condition.name(), () -> { - if (!activeConditions.contains(condition)) - activeConditions.add(condition); - condition.reset(); - }, () -> { - activeConditions.remove(condition); - condition.reset(); - }); - } - ConditionPath path = formToExecute.createPath(updatedConditions); +// List updatedConditions = formCondition.stream().toList(); +// for (Condition condition : updatedConditions) { +// condition.register(condition.name(), () -> { +// if (!activeConditions.contains(condition)) +// activeConditions.add(condition); +// condition.reset(); +// }, () -> { +// activeConditions.remove(condition); +// condition.reset(); +// }); +// } +// ConditionPath path = formToExecute.createPath(updatedConditions); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); - formsTree.insert(path.conditions); +// formsTree.insert(path.conditions); // Runnable onSuccess = () -> { // if(mc.level != null) { // //this section is to prevent re-activating From d262687815f93bd25c937c71a7c078bd9645b591 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 14:30:50 +1000 Subject: [PATCH 304/469] IT WORKSSSS --- .../magus/input/KeyboardInputModule.java | 71 +++++-------------- 1 file changed, 18 insertions(+), 53 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index f8075e28..189b8241 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -60,13 +60,11 @@ public KeyboardInputModule() { case InputConstants.PRESS -> { if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); -// checkForForm(); } } case InputConstants.RELEASE -> { if (glfwKeysDown.contains(keyPressed)) { glfwKeysDown.remove((Integer) keyPressed); -// checkForForm(); checkForm = true; } } @@ -88,47 +86,33 @@ public KeyboardInputModule() { } // Check every couple of ticks - if (ticksSinceActivated % (tickActivationThreshold - 1) == 0 || timeout % tickActivationThreshold - 1 == 0) + if (timeout % 5 == 0) checkForForm(); -// if (timeout % 20 == 0) -// RadixUtil.getLogger().debug("Timeout: " + timeout); if (activeForm != null && activeForm.name() != null) { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { - ticksSinceActivated++; -// if (lastActivatedForm != null) -// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); -// else LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); -// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); + if (lastActivatedForm.name().equals(activeForm.name())) { + // Send modifier data of it being held. + } + else { + // Send packet + } lastActivatedForm = activeForm; + Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); activeForm = null; ticksSinceActivated = 0; timeout = 0; - resetConditions(); - formsTree.resetTree(); + resetTreeConditions(); } } else { timeout++; if (timeout > tickTimeoutThreshold) { -// System.out.println("Resetting..."); - resetConditions(); - formsTree.resetTree(); + resetTreeConditions(); timeout = 0; } } -// resetConditions(); - - //else { -// ticksSinceActivated++; -// if (ticksSinceActivated >= tickTimeoutThreshold) { -//// System.out.println("RESET STATE!"); -// lastActivatedForm = null; -// resetConditions(); -// formsTree.resetTree(); -// ticksSinceActivated = 0; -// } }; } @@ -144,6 +128,11 @@ public static Map getMovementKeys() { return movementKeys; } + public void resetTreeConditions() { + resetConditions(); + formsTree.resetTree(); + } + public void resetConditions() { if (!activeConditions.isEmpty()) { for (Condition condition : activeConditions) @@ -154,13 +143,12 @@ public void resetConditions() { private void checkForForm() { if (!activeConditions.isEmpty()) { -// System.out.println("activeConditions KIM: " + activeConditions + " | " + glfwKeysDown); List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); if (recognized != null) { activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); - System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); - Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); +// System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); +// Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); } } } @@ -190,32 +178,10 @@ public void cleanMCKeys() { @Override public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { -// List updatedConditions = formCondition.stream().toList(); -// for (int i = 0; i < updatedConditions.size(); i++) { -// Condition condition = updatedConditions.get(i); -// Condition nextCondition; -// if (i + 1 < updatedConditions.size()) nextCondition = updatedConditions.get(i + 1); -// else nextCondition = null; -// condition.register(condition.name(), () -> { -// if (!activeConditions.contains(condition)) { -// activeConditions.add(condition); -// condition.unregister(); -// if (nextCondition != null) nextCondition.register(); -// } -// condition.reset(); -// this.timeout = 0; -// }, () -> { -// activeConditions.remove(condition); -// condition.reset(); -// }); -// } - ConditionPath path = formToExecute.createPath(formCondition); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); registerRunnables(formsTree); -// if (formCondition.get(0) instanceof KeyHoldCondition keyCondition) -// if (keyCondition.getKey() == testKey) testConditions = formCondition; } public void registerRunnables(RadixTree tree) { @@ -238,8 +204,7 @@ public void registerRunnables(Node current) { Runnable onSuccess = () -> { if (!activeConditions.contains(condition)) { activeConditions.add(condition); - //condition.unregister(); // unregister parent to give child nodes a shot to be heard - condition.unregister(); + condition.unregister(); // unregister parent to give child nodes a shot to be heard if (nextCondition != null) nextCondition.register(); // register next condition in the path if it exists List childConditions = branch.next.branches.keySet().stream().toList(); From c9390a5e0bb1f667d851cdfa63ea22497a0d2e00 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 14:35:32 +1000 Subject: [PATCH 305/469] Going to start trying to fix multi soon --- .../omegasource/magus/input/KeyboardInputModule.java | 7 +++++++ .../omegasource/magus/radix/condition/MultiCondition.java | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 189b8241..c11ff8af 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -201,6 +201,7 @@ public void registerRunnables(Node current) { else nextCondition = null; + Runnable originalSuccess = condition.onSuccess(); Runnable onSuccess = () -> { if (!activeConditions.contains(condition)) { activeConditions.add(condition); @@ -211,10 +212,16 @@ public void registerRunnables(Node current) { RadixTree.registerConditions(childConditions); // register any next of kin if they exist } this.timeout = 0; + if (originalSuccess != null) + originalSuccess.run(); }; + + Runnable originalFailure = condition.onFailure(); Runnable onFailure = () -> { activeConditions.remove(condition); condition.reset(); + if (originalFailure != null) + originalFailure.run(); }; condition.register(condition.name(), onSuccess, onFailure); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index ed482530..252443df 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -77,12 +77,14 @@ public void reset() { startedExecuting = true; conditionsMet.put(id, true); condition.unregister(); + condition.reset(); } checkConditionMet(); }, () -> { synchronized (conditionsMet) { conditionsMet.put(id, false); condition.unregister(); + condition.reset(); } checkConditionMet(); }); From a8c5f34ddafdb92ec88b48e4a6fa4820bfdf77b7 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 14:38:15 +1000 Subject: [PATCH 306/469] Fixed a crash, my bad --- .../omegasource/magus/input/KeyboardInputModule.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index c11ff8af..29ffd8e4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -92,9 +92,11 @@ public KeyboardInputModule() { if (activeForm != null && activeForm.name() != null) { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { - if (lastActivatedForm.name().equals(activeForm.name())) { - // Send modifier data of it being held. + if (lastActivatedForm != null && lastActivatedForm.name().equals(activeForm.name())) { } + + // Send modifier data of it being held. + else { // Send packet } @@ -177,7 +179,8 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { + public void registerInputData(List formExecutionInputs, Form + formToExecute, List formCondition) { ConditionPath path = formToExecute.createPath(formCondition); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); From 2252c7d7b1db5be8e9ee517a0c824e13f94e9260 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 14:49:20 +1000 Subject: [PATCH 307/469] Slight logic adjustments for lastActivatedForm --- .../omegasource/magus/input/KeyboardInputModule.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 29ffd8e4..912c1a59 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -93,15 +93,13 @@ public KeyboardInputModule() { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { if (lastActivatedForm != null && lastActivatedForm.name().equals(activeForm.name())) { + // Send modifier data of it being held and/or multi. } - - // Send modifier data of it being held. - else { // Send packet } lastActivatedForm = activeForm; - Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); +// Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); activeForm = null; ticksSinceActivated = 0; timeout = 0; @@ -112,6 +110,8 @@ public KeyboardInputModule() { timeout++; if (timeout > tickTimeoutThreshold) { resetTreeConditions(); + // Timed out enough where multi is no longer valid. + lastActivatedForm = null; timeout = 0; } } From de050bdea82bcc74d966de26c8c216e170788339 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sat, 5 Oct 2024 01:21:48 -0400 Subject: [PATCH 308/469] stable also did refactoring --- .../omegasource/magus/input/InputModule.java | 32 +++ .../magus/input/KeyboardInputModule.java | 68 ++---- .../magus/input/MouseInputModule.java | 219 ++++++++---------- 3 files changed, 140 insertions(+), 179 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index e5019a73..4b5e0164 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -12,6 +12,8 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.mojang.blaze3d.platform.InputConstants; +import net.minecraft.client.KeyMapping; +import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.client.event.InputEvent; import org.apache.logging.log4j.LogManager; @@ -24,6 +26,7 @@ public abstract class InputModule { protected static LinkedList activeConditions = new LinkedList<>(); protected static LinkedList activeForms = new LinkedList<>(); protected static final List activeFormInputs = new ArrayList<>(); + protected static final Map movementKeys = new HashMap<>(); protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); protected final Map modifierQueue = new HashMap<>(); @@ -64,6 +67,22 @@ public static EventCondition keyToCondition(InputConstants.Key key, int actio == actionCondition); } + public static void determineMotionKeys() { + Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { + if (keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { + movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); + } + }); + } + + public static Map getMovementKeys() { + return movementKeys; + } + + public static boolean isDirectionKey(int key) { + return movementKeys.containsValue(Integer.valueOf(key)); + } + public void resetLastActivated() { LogManager.getLogger().info("RESETTING LAST ACTIVATED FORM"); this.lastActivatedForm = null; @@ -81,6 +100,19 @@ public List getActiveConditions() { return activeConditions; } + public void resetTreeConditions() { + resetConditions(); + formsTree.resetTree(); + } + + public void resetConditions() { + if (!activeConditions.isEmpty()) { + for (Condition condition : activeConditions) + condition.reset(); + activeConditions.clear(); + } + } + public static void resetFormsTree() { FormDataRegistry.init(); // Re-initialize formData since it's a static field formsTree = new RadixTree(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index 912c1a59..e1b3284d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -23,16 +23,12 @@ public class KeyboardInputModule extends InputModule { - private static final Map movementKeys = new HashMap<>(); private final Consumer keyboardListener; private final Consumer tickEventConsumer; - //todo make these thresholds configurable and make them longer. Especially the timeout threshold. private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; - public List testConditions; public int testKey = 68; - Minecraft mc = Minecraft.getInstance(); private List glfwKeysDown; private Form activeForm, lastActivatedForm = null; private int ticksSinceActivated = 0; @@ -41,11 +37,11 @@ public class KeyboardInputModule extends InputModule { private boolean listen; private boolean checkForm = false; - // TODO: Fix this such that any tree requiring a form relies on the input // module activating a form rather than relying on the raw input data for those forms. // This way, the trees for different complex methods (such as VR and multikey) // remain functionally the same, they just check different input modules for whether the same // forms are activated. + public KeyboardInputModule() { formsTree.setDiscipline(Disciplines.AIR); @@ -92,12 +88,12 @@ public KeyboardInputModule() { if (activeForm != null && activeForm.name() != null) { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { - if (lastActivatedForm != null && lastActivatedForm.name().equals(activeForm.name())) { - // Send modifier data of it being held and/or multi. - } - else { - // Send packet - } +// if (lastActivatedForm != null && lastActivatedForm.name().equals(activeForm.name())) { +// // Send modifier data of it being held and/or multi. +// } +// else { +// // Send packet +// } lastActivatedForm = activeForm; // Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); activeForm = null; @@ -118,31 +114,6 @@ public KeyboardInputModule() { }; } - public static void determineMotionKeys() { - Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { - if (keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { - movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); - } - }); - } - - public static Map getMovementKeys() { - return movementKeys; - } - - public void resetTreeConditions() { - resetConditions(); - formsTree.resetTree(); - } - - public void resetConditions() { - if (!activeConditions.isEmpty()) { - for (Condition condition : activeConditions) - condition.reset(); - activeConditions.clear(); - } - } - private void checkForForm() { if (!activeConditions.isEmpty()) { List conditions = activeConditions.stream().toList(); @@ -179,23 +150,19 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, Form - formToExecute, List formCondition) { - ConditionPath path = formToExecute.createPath(formCondition); - System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); + public void registerInputData(List formExecutionInputs, + Form formToExecute, List formConditions) { + ConditionPath path = formToExecute.createPath(formConditions); + System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formConditions + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); registerRunnables(formsTree); } - public void registerRunnables(RadixTree tree) { - registerRunnables(tree.getRoot()); - } - @Override public void registerRunnables(Node current) { for (RadixBranch branch : current.branches.values()) { - if (!branch.next.branches.keySet().isEmpty()) - System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); +// if (!branch.next.branches.keySet().isEmpty()) +// System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); for (int i = 0; i < branch.conditions().size(); i++) { Condition condition = branch.conditions().get(i); Condition nextCondition; @@ -203,7 +170,6 @@ public void registerRunnables(Node current) { if (i + 1 < branch.conditions().size()) nextCondition = branch.conditions().get(i + 1); else nextCondition = null; - Runnable originalSuccess = condition.onSuccess(); Runnable onSuccess = () -> { if (!activeConditions.contains(condition)) { @@ -247,9 +213,7 @@ public void unRegisterInputs() { @Override public void registerInputs() { - formInputs.forEach((condition, form) -> { - condition.register(); - }); + formInputs.forEach((condition, form) -> condition.register()); } @Override @@ -267,8 +231,4 @@ public void toggleListeners() { public boolean keyPressed(int key) { return glfwKeysDown.contains(key); } - - public boolean isDirectionKey(int key) { - return movementKeys.containsValue(Integer.valueOf(key)); - } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index b1aa5c4d..5b416dbe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -3,9 +3,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.ConditionPath; -import com.amuzil.omegasource.magus.radix.Node; +import com.amuzil.omegasource.magus.radix.*; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -26,30 +24,24 @@ public class MouseInputModule extends InputModule { private final Consumer tickEventConsumer; private List glfwKeysDown; - private static final Map movementKeys = new HashMap<>(); - //How scroll delta works: every physical "tick" forwards on the mouse is 1.0, and backwards + // How scroll delta works: every physical "tick" forwards on the mouse is 1.0, and backwards // is -1.0. Therefore, you'd need a tracker over time, like a key held event, for the mouse wheel. // Except you're not pressing it, you're spinning it.... private double mouseScrollDelta; private final Consumer mouseListener; private final Consumer mouseScrollListener; - private Form activeForm = new Form(); + private Form activeForm, lastActivatedForm = null; private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; - //todo make these thresholds configurable and make them longer. Especially the timeout threshold. private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; + private int timeout = 0; private boolean listen; private boolean checkForm = false; - // TODO: Fix this such that any tree requiring a form relies on the input - // module activating a form rather than relying on the raw input data for those forms. - // This way, the trees for different complex methods (such as VR and multikey) - // remain functionally the same, they just check different input modules for whether the same - // forms are activated. public MouseInputModule() { this.glfwKeysDown = new ArrayList<>(); this.listen = true; @@ -57,10 +49,9 @@ public MouseInputModule() { this.mouseListener = mouseEvent -> { int keyPressed = mouseEvent.getButton(); switch (mouseEvent.getAction()) { - case InputConstants.PRESS, InputConstants.REPEAT -> { + case InputConstants.PRESS-> { if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); - checkForForm(); } } case InputConstants.RELEASE -> { @@ -77,54 +68,57 @@ public MouseInputModule() { }; this.tickEventConsumer = tickEvent -> { + ticksSinceModifiersSent++; + if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { + sendModifierData(); + } + + if (checkForm) { + checkForForm(); + checkForm = false; + } -// ticksSinceModifiersSent++; -// if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { -// sendModifierData(); -// } -// -// if (checkForm) { -// checkForForm(); -// checkForm = false; -// } -// -// //cleanMCKeys(); -// -// if(activeForm.name() != null) { -// ticksSinceActivated++; -// if(ticksSinceActivated >= tickActivationThreshold) { -//// if (lastActivatedForm != null) -//// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); -//// else -//// LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); -//// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); -// lastActivatedForm = activeForm; -// activeForm = new Form(); -// ticksSinceActivated = 0; -//// activeConditions.clear(); -// } -// } -// else { -// ticksSinceActivated++; -// if (ticksSinceActivated >= tickTimeoutThreshold) { -// lastActivatedForm = null; -// ticksSinceActivated = 0; -//// activeConditions.clear(); -// } -// } + // Check every couple of ticks + if (timeout % 5 == 0) + checkForForm(); + + if (activeForm != null && activeForm.name() != null) { + ticksSinceActivated++; + if(ticksSinceActivated >= tickActivationThreshold) { +// if (lastActivatedForm != null) +// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); +// else +// LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); +// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); + lastActivatedForm = activeForm; + Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); + activeForm = null; + ticksSinceActivated = 0; + timeout = 0; + resetTreeConditions(); + } + } else { + timeout++; + if (timeout > tickTimeoutThreshold) { + resetTreeConditions(); + // Timed out enough where multi is no longer valid. + lastActivatedForm = null; + timeout = 0; + } + } }; } private void checkForForm() { -// List conditions = activeConditions.stream().toList(); -// List recognized = formsTree.search(conditions); -// System.out.println("activeConditions MIM: " + activeConditions); -// if (recognized != null) { -// activeConditions.clear(); -// activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); -// System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); -// Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); -// } + if (!activeConditions.isEmpty()) { + List conditions = activeConditions.stream().toList(); + List recognized = formsTree.search(conditions); + if (recognized != null) { + activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); +// System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); +// Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); + } + } } private void sendModifierData() { @@ -151,58 +145,52 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, Form formToExecute, List formCondition) { -// List updatedConditions = formCondition.stream().toList(); -// for (Condition condition : updatedConditions) { -// condition.register(condition.name(), () -> { -// if (!activeConditions.contains(condition)) -// activeConditions.add(condition); -// condition.reset(); -// }, () -> { -// activeConditions.remove(condition); -// condition.reset(); -// }); -// } -// ConditionPath path = formToExecute.createPath(updatedConditions); - System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formCondition + " | Inputs: " + formExecutionInputs); -// formsTree.insert(path.conditions); -// Runnable onSuccess = () -> { -// if(mc.level != null) { -// //this section is to prevent re-activating -// // single condition forms when you hold the activation key for Held modifiers -// -// //TODO: Fix an issue where it doesn't let players re-activate forms outside of the held modifier. -// // I.e account for modifiers here. -// if(formToExecute != lastActivatedForm) { -// //LogManager.getLogger().info("FORM ACTIVATED: " + formToExecute.name()); -// activeForm = formToExecute; -// } -// -// ticksSinceActivated = 0; -// } -// //Reset condition -// }; -// Runnable onFailure = () -> { -// activeForm = new Form(); -// //reset conditions? -// }; -// Condition formCondition = ConditionBuilder.instance() -// .fromInputData(formExecutionInputs) -// .build(); -// if(formCondition != null) { -// //Register listeners for condition created. -// formCondition.register(formToExecute.name(), onSuccess, onFailure); -// //add condition to InputModule registry so that it can be tracked. -// formInputs.put(formCondition, formToExecute); -// } else { -// //todo errors/logging -// } - + public void registerInputData(List formExecutionInputs, + Form formToExecute, List formConditions) { + ConditionPath path = formToExecute.createPath(formConditions); + System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formConditions + " | Inputs: " + formExecutionInputs); + formsTree.insert(path.conditions); + registerRunnables(formsTree); } @Override public void registerRunnables(Node current) { - + for (RadixBranch branch : current.branches.values()) { +// if (!branch.next.branches.keySet().isEmpty()) +// System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); + for (int i = 0; i < branch.conditions().size(); i++) { + Condition condition = branch.conditions().get(i); + Condition nextCondition; + + if (i + 1 < branch.conditions().size()) nextCondition = branch.conditions().get(i + 1); + else nextCondition = null; + + Runnable originalSuccess = condition.onSuccess(); + Runnable onSuccess = () -> { + if (!activeConditions.contains(condition)) { + activeConditions.add(condition); + condition.unregister(); // unregister parent to give child nodes a shot to be heard + if (nextCondition != null) + nextCondition.register(); // register next condition in the path if it exists + List childConditions = branch.next.branches.keySet().stream().toList(); + RadixTree.registerConditions(childConditions); // register any next of kin if they exist + } + this.timeout = 0; + if (originalSuccess != null) + originalSuccess.run(); + }; + + Runnable originalFailure = condition.onFailure(); + Runnable onFailure = () -> { + activeConditions.remove(condition); + condition.reset(); + if (originalFailure != null) + originalFailure.run(); + }; + condition.register(condition.name(), onSuccess, onFailure); + } + registerRunnables(branch.next); + } } @Override @@ -221,9 +209,7 @@ public void unRegisterInputs() { } public void registerInputs() { - formInputs.forEach((condition, form) -> { - condition.register(); - }); + formInputs.forEach((condition, form) -> condition.register()); } @Override @@ -237,27 +223,10 @@ public void toggleListeners() { unRegisterInputs(); listen = false; System.out.println("Disabled!"); - activeConditions.clear(); } } public boolean keyPressed(int key) { return glfwKeysDown.contains(key); } - - public static void determineMotionKeys() { - Arrays.stream(Minecraft.getInstance().options.keyMappings).toList().forEach(keyMapping -> { - if(keyMapping.getCategory().equals(KeyMapping.CATEGORY_MOVEMENT)) { - movementKeys.put(keyMapping.getName(), keyMapping.getKey().getValue()); - } - }); - } - - public static Map getMovementKeys() { - return movementKeys; - } - - public boolean isDirectionKey(int key) { - return movementKeys.containsValue(Integer.valueOf(key)); - } } From 114cc720ee5dd6bc237f4fb5784054702fc6881b Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sat, 5 Oct 2024 01:42:51 -0400 Subject: [PATCH 309/469] just some refactoring, no logic changes organizing field attributes --- .../magus/input/KeyboardInputModule.java | 7 +++---- .../magus/input/MouseInputModule.java | 19 +++++++++---------- .../skill/test/avatar/AvatarCommand.java | 2 -- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java index e1b3284d..77a6981f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java @@ -23,16 +23,15 @@ public class KeyboardInputModule extends InputModule { - private final Consumer keyboardListener; private final Consumer tickEventConsumer; + private final Consumer keyboardListener; private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; - public int testKey = 68; - private List glfwKeysDown; - private Form activeForm, lastActivatedForm = null; private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; + private List glfwKeysDown; + private Form activeForm; private int timeout = 0; private boolean listen; private boolean checkForm = false; diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index 5b416dbe..db654744 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -23,25 +23,24 @@ public class MouseInputModule extends InputModule { private final Consumer tickEventConsumer; - private List glfwKeysDown; - - // How scroll delta works: every physical "tick" forwards on the mouse is 1.0, and backwards - // is -1.0. Therefore, you'd need a tracker over time, like a key held event, for the mouse wheel. - // Except you're not pressing it, you're spinning it.... - private double mouseScrollDelta; private final Consumer mouseListener; private final Consumer mouseScrollListener; - private Form activeForm, lastActivatedForm = null; - private int ticksSinceActivated = 0; - private int ticksSinceModifiersSent = 0; - private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; + private int ticksSinceActivated = 0; + private int ticksSinceModifiersSent = 0; + private List glfwKeysDown; + private Form activeForm; + private double mouseScrollDelta; private int timeout = 0; private boolean listen; private boolean checkForm = false; + // How scroll delta works: every physical "tick" forwards on the mouse is 1.0, and backwards + // is -1.0. Therefore, you'd need a tracker over time, like a key held event, for the mouse wheel. + // Except you're not pressing it, you're spinning it.... + public MouseInputModule() { this.glfwKeysDown = new ArrayList<>(); this.listen = true; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index 3440da88..ee878bb8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -33,8 +33,6 @@ public static void register(CommandDispatcher dispatcher) { } private static int key(int keyValue) { - KeyboardInputModule kim = (KeyboardInputModule) Magus.keyboardInputModule; - kim.testKey = keyValue; return 1; } From 295920ad9c9b769ecef006eafbbf66b404bb3742 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 5 Oct 2024 22:13:45 +1000 Subject: [PATCH 310/469] fixed sub conditions being null --- .../magus/radix/builders/InputConverter.java | 21 +++++++++++++------ .../magus/radix/condition/MultiCondition.java | 2 ++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index 8619a5ba..79d30ca9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -56,14 +56,22 @@ public class InputConverter { // TODO: Need to print these out and test how they work, // TODO: in order to finalise ConditionBuilder.java. registerBuilder(MultiKeyInput.class, - obj -> { + multiKeyInputs -> { LinkedList multiConditions = new LinkedList<>(); - if (obj instanceof MultiKeyInput permutation) { - List conditions = new LinkedList<>(permutation.keys().stream().map(InputConverter::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + for (Object obj : (List) multiKeyInputs) { + MultiKeyInput permutation = (MultiKeyInput) obj; + // THis list isn't working. + List conditions = new LinkedList<>(); + for (KeyInput input : permutation.keys()) { + conditions.addAll(buildPathFrom(List.of(input))); + } + + //= new LinkedList<>(permutation.keys().stream().map(InputConverter::buildPathFrom) + //.collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); // Create a MultiCondition from the flattened conditions MultiCondition multiCondition = ConditionBuilder.createMultiCondition(conditions); + multiCondition.register("multi_key_press", multiCondition::reset, multiCondition::reset); multiConditions.add(multiCondition); } @@ -72,9 +80,10 @@ public class InputConverter { } ); registerBuilder(ChainedKeyInput.class, - obj -> { + chainedKeyInputs -> { LinkedList chained = new LinkedList<>(); - if (obj instanceof ChainedKeyInput combination) { + for (Object obj : (List) chainedKeyInputs) { + ChainedKeyInput combination = (ChainedKeyInput) obj; List conditions = new LinkedList<>(combination.keys().stream().map(InputConverter::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 252443df..151ce722 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -101,4 +101,6 @@ public void register() { public void unregister() { concurrentConditions.forEach(Condition::unregister); } + + //TODO: Hashing, equals function like in KeyHoldCondition } \ No newline at end of file From 6aeff27d9d75937f476976bb9500bc7f9a872a7d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sat, 5 Oct 2024 23:35:25 -0400 Subject: [PATCH 311/469] Update RadixTree.java --- src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 757d637f..a028bb2e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -13,6 +13,7 @@ import java.util.List; import java.util.stream.Stream; + public class RadixTree { private static final int NO_MISMATCH = -1; private final Node root; From 3e3221888c4a91b81207bf8a268189e3a1ce2cd1 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 6 Oct 2024 14:41:48 +1100 Subject: [PATCH 312/469] Updated hashing and debugging --- .../magus/input/MouseInputModule.java | 1 + .../magus/radix/condition/MultiCondition.java | 34 ++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index db654744..8323a51e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -111,6 +111,7 @@ public MouseInputModule() { private void checkForForm() { if (!activeConditions.isEmpty()) { List conditions = activeConditions.stream().toList(); +// System.out.println("Active Conditions: " + activeConditions); List recognized = formsTree.search(conditions); if (recognized != null) { activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 151ce722..c59113cf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -1,13 +1,11 @@ package com.amuzil.omegasource.magus.radix.condition; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import net.minecraftforge.event.TickEvent; import org.apache.logging.log4j.LogManager; -import java.util.Dictionary; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; +import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; @@ -45,6 +43,7 @@ public List getSubConditions() { @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { + super.register(name, onSuccess, onFailure); this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { if (startedExecuting) { @@ -71,6 +70,7 @@ public void reset() { concurrentConditions.forEach(condition -> { int id = counter.getAndIncrement(); condition.register(condition.name(), () -> { + System.out.println("First Condition Met: " + condition); synchronized (conditionsMet) { // Debugging statement: // LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); @@ -102,5 +102,31 @@ public void unregister() { concurrentConditions.forEach(Condition::unregister); } + @Override + public int hashCode() { + int hashSum = 0; + for (Condition condition : concurrentConditions) + hashSum += condition.hashCode(); + return Objects.hash(name, hashSum); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } else if (!(obj instanceof MultiCondition other)) { + return false; + } else { +// System.out.println("this: stored in tree -> " + this); +// System.out.println("other: activeCondition from user input -> " + other); + return Objects.equals(concurrentConditions.size(), ((MultiCondition) obj).concurrentConditions.size()) + && + /* Makes sure an alternative key condition that's been pressed has been pressed at least as long + * as the currently compared condition. */ + obj.hashCode() == this.hashCode(); + } + } + + //TODO: Hashing, equals function like in KeyHoldCondition } \ No newline at end of file From 0d2d83389b5519a528ba263fd567c49c715cfa26 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 6 Oct 2024 14:51:36 +1100 Subject: [PATCH 313/469] Adjusting for client-side shenanigans --- .../magus/radix/builders/InputConverter.java | 3 +- .../magus/radix/condition/MultiCondition.java | 10 +- .../radix/condition/MultiKeyCondition.java | 137 ++++++++++++++++++ 3 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index 79d30ca9..c7cd6aff 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; +import com.amuzil.omegasource.magus.radix.condition.MultiKeyCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -70,7 +71,7 @@ public class InputConverter { //.collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); // Create a MultiCondition from the flattened conditions - MultiCondition multiCondition = ConditionBuilder.createMultiCondition(conditions); + MultiKeyCondition multiCondition = new MultiKeyCondition(conditions); multiCondition.register("multi_key_press", multiCondition::reset, multiCondition::reset); multiConditions.add(multiCondition); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index c59113cf..66859c78 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -1,8 +1,11 @@ package com.amuzil.omegasource.magus.radix.condition; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; import org.apache.logging.log4j.LogManager; import java.util.*; @@ -46,7 +49,9 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { + System.out.println("Ticking."); if (startedExecuting) { + System.out.println("Started Executing."); executionTime++; if (executionTime > TIMEOUT_IN_TICKS) { this.onCompleteFailure.run(); @@ -94,7 +99,10 @@ public void reset() { @Override public void register() { - this.reset(); + super.register(); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); + for (Condition condition : getSubConditions()) + condition.register(); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java new file mode 100644 index 00000000..0fc6db16 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java @@ -0,0 +1,137 @@ +package com.amuzil.omegasource.magus.radix.condition; + +import com.amuzil.omegasource.magus.radix.Condition; +import net.minecraft.client.Minecraft; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; +import org.apache.logging.log4j.LogManager; + +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; + +public class MultiKeyCondition extends Condition { + private static final int TIMEOUT_IN_TICKS = 15; + private final List concurrentConditions; + private Dictionary conditionsMet; + private Consumer clientTickListener; + private int executionTime = 0; + private boolean startedExecuting = false; + + public MultiKeyCondition(List concurrentConditions) { + this.concurrentConditions = concurrentConditions; + this.registerEntry(); + } + + public MultiKeyCondition(Condition condition) { + this(List.of(condition)); + } + + private void checkConditionMet() { + for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { + // none/not all conditions have been met yet, exit loop and dont execute. + if (!it.next()) return; + } + this.onSuccess.run(); + this.reset(); + } + + public List getSubConditions() { + return concurrentConditions; + } + + @Override + public void register(String name, Runnable onSuccess, Runnable onFailure) { + super.register(name, onSuccess, onFailure); + this.clientTickListener = event -> { + if (event.phase == TickEvent.ClientTickEvent.Phase.START + && Minecraft.getInstance().getOverlay() == null) { +// System.out.println("Ticking."); + if (startedExecuting) { + System.out.println("Started Executing."); + executionTime++; + if (executionTime > TIMEOUT_IN_TICKS) { + this.onFailure().run(); + + LogManager.getLogger().info("MULTI CONDITION TIMED OUT"); + this.reset(); + } + } + } + }; + this.reset(); + } + + public void reset() { + AtomicInteger counter = new AtomicInteger(); + conditionsMet = new Hashtable<>(); + this.startedExecuting = false; + this.executionTime = 0; + concurrentConditions.forEach(condition -> { + int id = counter.getAndIncrement(); + condition.register(condition.name(), () -> { + System.out.println("First Condition Met: " + condition); + synchronized (conditionsMet) { + // Debugging statement: +// LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); + startedExecuting = true; + conditionsMet.put(id, true); + condition.unregister(); + condition.reset(); + } + checkConditionMet(); + }, () -> { + synchronized (conditionsMet) { + conditionsMet.put(id, false); + condition.unregister(); + condition.reset(); + } + checkConditionMet(); + }); + conditionsMet.put(id, false); + }); + } + + @Override + public void register() { + super.register(); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); + for (Condition condition : getSubConditions()) + condition.register(); + } + + @Override + public void unregister() { + MinecraftForge.EVENT_BUS.unregister(clientTickListener); + concurrentConditions.forEach(Condition::unregister); + } + + @Override + public int hashCode() { + int hashSum = 0; + for (Condition condition : concurrentConditions) + hashSum += condition.hashCode(); + return Objects.hash(name, hashSum); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } else if (!(obj instanceof MultiKeyCondition other)) { + return false; + } else { +// System.out.println("this: stored in tree -> " + this); +// System.out.println("other: activeCondition from user input -> " + other); + return Objects.equals(concurrentConditions.size(), ((MultiKeyCondition) obj).concurrentConditions.size()) + && + /* Makes sure an alternative key condition that's been pressed has been pressed at least as long + * as the currently compared condition. */ + obj.hashCode() == this.hashCode(); + } + } + + + //TODO: Hashing, equals function like in KeyHoldCondition +} \ No newline at end of file From dba327c0f2b7886748240598d2ce6dcd1477024e Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 6 Oct 2024 14:57:55 +1100 Subject: [PATCH 314/469] it's successfully being fulfilled... --- .../magus/input/MouseInputModule.java | 2 +- .../radix/condition/MultiKeyCondition.java | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index 8323a51e..cff5ccb8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -111,7 +111,7 @@ public MouseInputModule() { private void checkForForm() { if (!activeConditions.isEmpty()) { List conditions = activeConditions.stream().toList(); -// System.out.println("Active Conditions: " + activeConditions); + System.out.println("Active Conditions: " + activeConditions); List recognized = formsTree.search(conditions); if (recognized != null) { activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java index 0fc6db16..d0171f41 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java @@ -29,12 +29,18 @@ public MultiKeyCondition(Condition condition) { } private void checkConditionMet() { - for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { - // none/not all conditions have been met yet, exit loop and dont execute. - if (!it.next()) return; + if (conditionsMet.size() == concurrentConditions.size()) { + boolean success = true; + for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { + success = it.next(); + } + if (success) { + System.out.println("Success!"); + this.onSuccess.run(); + this.reset(); + } } - this.onSuccess.run(); - this.reset(); + } public List getSubConditions() { @@ -49,7 +55,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { && Minecraft.getInstance().getOverlay() == null) { // System.out.println("Ticking."); if (startedExecuting) { - System.out.println("Started Executing."); +// System.out.println("Started Executing."); executionTime++; if (executionTime > TIMEOUT_IN_TICKS) { this.onFailure().run(); From 94ef980cb4cd3bd969b5281a1f02823a17509708 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 6 Oct 2024 00:03:17 -0400 Subject: [PATCH 315/469] remove debug prints & implemented toString --- .../omegasource/magus/radix/condition/MultiCondition.java | 2 -- .../omegasource/magus/radix/condition/MultiKeyCondition.java | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 66859c78..86d222a1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -49,9 +49,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - System.out.println("Ticking."); if (startedExecuting) { - System.out.println("Started Executing."); executionTime++; if (executionTime > TIMEOUT_IN_TICKS) { this.onCompleteFailure.run(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java index d0171f41..0331696a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java @@ -138,6 +138,9 @@ public boolean equals(Object obj) { } } + @Override + public String toString() { + return String.format("%s[ %s ]", this.getClass().getSimpleName() , concurrentConditions); + } - //TODO: Hashing, equals function like in KeyHoldCondition } \ No newline at end of file From 442a478f46916b3a1a22b81a00471d0692156849 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 6 Oct 2024 00:04:36 -0400 Subject: [PATCH 316/469] Update KeyHoldCondition.java --- .../radix/condition/minecraft/forge/key/KeyHoldCondition.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 4b576a51..840ed5e9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -16,6 +16,7 @@ import java.util.Objects; import java.util.function.Consumer; + public class KeyHoldCondition extends Condition { public static final int KEY_PRESS_TIMEOUT = 3; private final int key; From d553bc94f058914f1eef4cc01e2ae46858b4ad9a Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 6 Oct 2024 15:15:35 +1100 Subject: [PATCH 317/469] renaming --- .../magus/radix/builders/InputConverter.java | 4 ++-- ...ondition.java => MultiClientTickCondition.java} | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/radix/condition/{MultiKeyCondition.java => MultiClientTickCondition.java} (90%) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index c7cd6aff..2912c5a2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -2,7 +2,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; -import com.amuzil.omegasource.magus.radix.condition.MultiKeyCondition; +import com.amuzil.omegasource.magus.radix.condition.MultiClientTickCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -71,7 +71,7 @@ public class InputConverter { //.collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); // Create a MultiCondition from the flattened conditions - MultiKeyCondition multiCondition = new MultiKeyCondition(conditions); + MultiClientTickCondition multiCondition = new MultiClientTickCondition(conditions); multiCondition.register("multi_key_press", multiCondition::reset, multiCondition::reset); multiConditions.add(multiCondition); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientTickCondition.java similarity index 90% rename from src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java rename to src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientTickCondition.java index d0171f41..b0d3cdd1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiKeyCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientTickCondition.java @@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; -public class MultiKeyCondition extends Condition { +public class MultiClientTickCondition extends Condition { private static final int TIMEOUT_IN_TICKS = 15; private final List concurrentConditions; private Dictionary conditionsMet; @@ -19,12 +19,12 @@ public class MultiKeyCondition extends Condition { private int executionTime = 0; private boolean startedExecuting = false; - public MultiKeyCondition(List concurrentConditions) { + public MultiClientTickCondition(List concurrentConditions) { this.concurrentConditions = concurrentConditions; this.registerEntry(); } - public MultiKeyCondition(Condition condition) { + public MultiClientTickCondition(Condition condition) { this(List.of(condition)); } @@ -52,7 +52,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START - && Minecraft.getInstance().getOverlay() == null) { + && Minecraft.getInstance().getOverlay() == null) { // System.out.println("Ticking."); if (startedExecuting) { // System.out.println("Started Executing."); @@ -79,8 +79,6 @@ public void reset() { condition.register(condition.name(), () -> { System.out.println("First Condition Met: " + condition); synchronized (conditionsMet) { - // Debugging statement: -// LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); startedExecuting = true; conditionsMet.put(id, true); condition.unregister(); @@ -125,12 +123,12 @@ public int hashCode() { public boolean equals(Object obj) { if (this == obj) { return true; - } else if (!(obj instanceof MultiKeyCondition other)) { + } else if (!(obj instanceof MultiClientTickCondition other)) { return false; } else { // System.out.println("this: stored in tree -> " + this); // System.out.println("other: activeCondition from user input -> " + other); - return Objects.equals(concurrentConditions.size(), ((MultiKeyCondition) obj).concurrentConditions.size()) + return Objects.equals(concurrentConditions.size(), ((MultiClientTickCondition) obj).concurrentConditions.size()) && /* Makes sure an alternative key condition that's been pressed has been pressed at least as long * as the currently compared condition. */ From b445ff5f3a9cd12ca5272a184e2c2bdd73355f71 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 6 Oct 2024 00:19:36 -0400 Subject: [PATCH 318/469] prioritize MultiKeyCondition --- .../omegasource/magus/radix/RadixTree.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index a028bb2e..403a37b7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; +import com.amuzil.omegasource.magus.radix.condition.MultiClientTickCondition; import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; @@ -94,6 +95,17 @@ public void resetTree() { condition.register(); } + private List prioritizeConditions(List conditions) { + List prioritizedConditions = new ArrayList<>(); + for (Condition condition: conditions) { + if (condition instanceof MultiClientTickCondition) { + prioritizedConditions.add(condition); + break; + } + } + return prioritizedConditions.isEmpty() ? conditions : prioritizedConditions; + } + // Helpful method to debug and to see all the conditions public void printAllConditions() { printAllConditions(root, new ArrayList<>()); @@ -194,6 +206,7 @@ public void insert(List conditions) { // Returns matched condition path if found and null if not found - O(n) public List search(List conditions) { + conditions = prioritizeConditions(conditions); List ret = null; Node current = root; int currIndex = 0; @@ -203,13 +216,6 @@ public List search(List conditions) { // RadixBranch branch = current.getMatchedPath(currentCondition); if (branch == null) return null; -// if (!branch.path.conditions.isEmpty()) { // Move down logic -// branch.path.conditions.get(0).unregister(); // Stop listening to current condition -// for (Condition condition: branch.next.branches.keySet()) { -// condition.register(); // Start listening to next child conditions -// } -// } - List currSubCondition = conditions.subList(currIndex, conditions.size()); if (!Condition.startsWith(currSubCondition, branch.path.conditions)) return null; // uses equals From b3405a951f24380280ed7c8665738f321c575df2 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 6 Oct 2024 15:27:04 +1100 Subject: [PATCH 319/469] fixed multi conditions being weird --- .../omegasource/magus/radix/RadixTree.java | 4 +-- .../magus/radix/builders/InputConverter.java | 4 +-- ...ndition.java => MultiClientCondition.java} | 29 ++++++++++--------- 3 files changed, 19 insertions(+), 18 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/radix/condition/{MultiClientTickCondition.java => MultiClientCondition.java} (86%) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 403a37b7..69edd8f5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -2,7 +2,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; -import com.amuzil.omegasource.magus.radix.condition.MultiClientTickCondition; +import com.amuzil.omegasource.magus.radix.condition.MultiClientCondition; import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; @@ -98,7 +98,7 @@ public void resetTree() { private List prioritizeConditions(List conditions) { List prioritizedConditions = new ArrayList<>(); for (Condition condition: conditions) { - if (condition instanceof MultiClientTickCondition) { + if (condition instanceof MultiClientCondition) { prioritizedConditions.add(condition); break; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index 2912c5a2..449e22bd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -1,8 +1,8 @@ package com.amuzil.omegasource.magus.radix.builders; import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.MultiClientCondition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; -import com.amuzil.omegasource.magus.radix.condition.MultiClientTickCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -71,7 +71,7 @@ public class InputConverter { //.collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); // Create a MultiCondition from the flattened conditions - MultiClientTickCondition multiCondition = new MultiClientTickCondition(conditions); + MultiClientCondition multiCondition = new MultiClientCondition(conditions); multiCondition.register("multi_key_press", multiCondition::reset, multiCondition::reset); multiConditions.add(multiCondition); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientTickCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java similarity index 86% rename from src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientTickCondition.java rename to src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java index b394dc8d..5e6a6d40 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientTickCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java @@ -11,34 +11,35 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; -public class MultiClientTickCondition extends Condition { - private static final int TIMEOUT_IN_TICKS = 15; +public class MultiClientCondition extends Condition { + private static final int TIMEOUT_IN_TICKS = 3; private final List concurrentConditions; private Dictionary conditionsMet; private Consumer clientTickListener; private int executionTime = 0; private boolean startedExecuting = false; - public MultiClientTickCondition(List concurrentConditions) { + public MultiClientCondition(List concurrentConditions) { this.concurrentConditions = concurrentConditions; this.registerEntry(); } - public MultiClientTickCondition(Condition condition) { + public MultiClientCondition(Condition condition) { this(List.of(condition)); } private void checkConditionMet() { if (conditionsMet.size() == concurrentConditions.size()) { - boolean success = true; + boolean success; for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { success = it.next(); + if (!success) + return; } - if (success) { - System.out.println("Success!"); - this.onSuccess.run(); - this.reset(); - } + System.out.println("Success!"); + this.onSuccess.run(); + startedExecuting = false; + this.reset(); } } @@ -77,7 +78,6 @@ public void reset() { concurrentConditions.forEach(condition -> { int id = counter.getAndIncrement(); condition.register(condition.name(), () -> { - System.out.println("First Condition Met: " + condition); synchronized (conditionsMet) { startedExecuting = true; conditionsMet.put(id, true); @@ -97,6 +97,7 @@ public void reset() { }); } + @Override public void register() { super.register(); @@ -123,12 +124,12 @@ public int hashCode() { public boolean equals(Object obj) { if (this == obj) { return true; - } else if (!(obj instanceof MultiClientTickCondition other)) { + } else if (!(obj instanceof MultiClientCondition other)) { return false; } else { // System.out.println("this: stored in tree -> " + this); // System.out.println("other: activeCondition from user input -> " + other); - return Objects.equals(concurrentConditions.size(), ((MultiClientTickCondition) obj).concurrentConditions.size()) + return Objects.equals(concurrentConditions.size(), ((MultiClientCondition) obj).concurrentConditions.size()) && /* Makes sure an alternative key condition that's been pressed has been pressed at least as long * as the currently compared condition. */ @@ -138,7 +139,7 @@ public boolean equals(Object obj) { @Override public String toString() { - return String.format("%s[ %s ]", this.getClass().getSimpleName() , concurrentConditions); + return String.format("%s[ %s ]", this.getClass().getSimpleName(), concurrentConditions); } } \ No newline at end of file From 51b7750f7c155d45897ad1f3c491b61b23d72f4b Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 6 Oct 2024 00:29:39 -0400 Subject: [PATCH 320/469] Update InputConverter.java --- .../amuzil/omegasource/magus/radix/builders/InputConverter.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index 449e22bd..2355a66f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -54,7 +54,6 @@ public class InputConverter { return conditions; }); - // TODO: Need to print these out and test how they work, // TODO: in order to finalise ConditionBuilder.java. registerBuilder(MultiKeyInput.class, multiKeyInputs -> { From 6fe9b8f637aa02f6a6d44e65b97d48a1bd2f7e6e Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 6 Oct 2024 01:20:00 -0400 Subject: [PATCH 321/469] (stable) merged Keyboard & Mouse InputModules every current registered Form is working... --- .../com/amuzil/omegasource/magus/Magus.java | 19 ++++---- .../omegasource/magus/input/InputModule.java | 21 +++++++-- .../omegasource/magus/input/KeyBindings.java | 3 +- ...ule.java => KeyboardMouseInputModule.java} | 43 ++++++++++++++++--- .../magus/input/MouseInputModule.java | 4 -- .../magus/input/MouseMotionModule.java | 2 +- .../magus/network/ClientPacketHandler.java | 4 +- .../omegasource/magus/radix/RadixTree.java | 22 +++++----- .../radix/condition/MultiClientCondition.java | 1 + .../minecraft/forge/key/KeyHoldCondition.java | 2 +- .../magus/server/ServerEvents.java | 20 +++------ .../magus/skill/forms/FormDataRegistry.java | 6 +-- .../listeners/GestureModifierListener.java | 12 +----- .../listeners/KeyHeldModifierListener.java | 15 +++---- .../skill/test/avatar/AvatarCommand.java | 10 ++--- .../skill/test/avatar/AvatarFormRegistry.java | 10 ++--- 16 files changed, 112 insertions(+), 82 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/input/{KeyboardInputModule.java => KeyboardMouseInputModule.java} (83%) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 34a43753..3d0ef3ec 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,8 +1,7 @@ package com.amuzil.omegasource.magus; import com.amuzil.omegasource.magus.input.InputModule; -import com.amuzil.omegasource.magus.input.KeyboardInputModule; -import com.amuzil.omegasource.magus.input.MouseInputModule; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.input.MouseMotionModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; @@ -19,7 +18,10 @@ import net.minecraftforge.event.server.ServerStartingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.event.lifecycle.*; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; +import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -41,16 +43,16 @@ public class Magus { //todo: move these to a better place //todo: make multiple input modules - public static InputModule keyboardInputModule; - public static InputModule mouseInputModule; + public static InputModule keyboardMouseInputModule; +// public static InputModule mouseInputModule; public static InputModule mouseMotionModule; public Magus() { // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); //Register the input modules - keyboardInputModule = new KeyboardInputModule(); - mouseInputModule = new MouseInputModule(); + keyboardMouseInputModule = new KeyboardMouseInputModule(); +// mouseInputModule = new MouseInputModule(); mouseMotionModule = new MouseMotionModule(); // Register capabilities FMLJavaModLoadingContext.get().getModEventBus().addListener(CapabilityHandler::registerCapabilities); @@ -95,6 +97,7 @@ private void processIMC(final InterModProcessEvent event) { public void onServerStarting(ServerStartingEvent event) { // do something when the server starts LOGGER.info("HELLO from server starting"); + LOGGER.info("Setting up Avatar commands..."); AvatarCommand.register(event.getServer().getCommands().getDispatcher()); } @@ -117,7 +120,7 @@ public static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); - KeyboardInputModule.determineMotionKeys(); + KeyboardMouseInputModule.determineMotionKeys(); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 4b5e0164..fe523784 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -92,14 +92,14 @@ public Form getLastActivatedForm() { return this.lastActivatedForm; } - public RadixTree getFormsTree() { - return formsTree; - } - public List getActiveConditions() { return activeConditions; } + public RadixTree getFormsTree() { + return formsTree; + } + public void resetTreeConditions() { resetConditions(); formsTree.resetTree(); @@ -120,6 +120,19 @@ public static void resetFormsTree() { formsTree.setDiscipline(Disciplines.AIR); } +// private Form checkForForm() { +// if (!activeConditions.isEmpty()) { +// List conditions = activeConditions.stream().toList(); +// List recognized = formsTree.search(conditions); +// if (recognized != null) { +// return FormDataRegistry.formsNamespace.get(recognized.hashCode()); +// System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); +// Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); +// } +// } +// return new Form(); +// } + public void init() { resetKeys(); registerInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java index 55b0d269..f57fc411 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java @@ -26,8 +26,7 @@ public static void registerBindings(RegisterKeyMappingsEvent event) { public static void keyBindPress(InputEvent.Key press) { if (press.getKey() == keyToggleTree.getKey().getValue()) { if (press.getAction() == GLFW.GLFW_RELEASE) { - Magus.keyboardInputModule.toggleListeners(); - Magus.mouseInputModule.toggleListeners(); + Magus.keyboardMouseInputModule.toggleListeners(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java similarity index 83% rename from src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java rename to src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 77a6981f..c3dfe680 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -21,16 +21,19 @@ import java.util.function.Consumer; -public class KeyboardInputModule extends InputModule { +public class KeyboardMouseInputModule extends InputModule { private final Consumer tickEventConsumer; private final Consumer keyboardListener; + private final Consumer mouseListener; + private final Consumer mouseScrollListener; private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; private List glfwKeysDown; + private double mouseScrollDelta; private Form activeForm; private int timeout = 0; private boolean listen; @@ -41,7 +44,7 @@ public class KeyboardInputModule extends InputModule { // remain functionally the same, they just check different input modules for whether the same // forms are activated. - public KeyboardInputModule() { + public KeyboardMouseInputModule() { formsTree.setDiscipline(Disciplines.AIR); this.glfwKeysDown = new ArrayList<>(); @@ -66,6 +69,27 @@ public KeyboardInputModule() { } }; + this.mouseListener = mouseEvent -> { + int keyPressed = mouseEvent.getButton(); + switch (mouseEvent.getAction()) { + case InputConstants.PRESS-> { + if (!glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.add(keyPressed); + } + } + case InputConstants.RELEASE -> { + if (glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.remove((Integer) keyPressed); + checkForm = true; + } + } + } + }; + + this.mouseScrollListener = mouseScrollingEvent -> { + this.mouseScrollDelta = mouseScrollingEvent.getScrollDelta(); + }; + this.tickEventConsumer = tickEvent -> { ticksSinceModifiersSent++; @@ -92,9 +116,10 @@ public KeyboardInputModule() { // } // else { // // Send packet +// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); // } lastActivatedForm = activeForm; -// Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); + Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); activeForm = null; ticksSinceActivated = 0; timeout = 0; @@ -117,6 +142,8 @@ private void checkForForm() { if (!activeConditions.isEmpty()) { List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); + System.out.println("activeConditions: " + activeConditions + "| GLFW: " + glfwKeysDown); +// System.out.println("recognized: " + recognized); if (recognized != null) { activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); // System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); @@ -199,14 +226,18 @@ public void registerRunnables(Node current) { @Override public void registerListeners() { - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseScrollingEvent.class, mouseScrollListener); } @Override public void unRegisterInputs() { - MinecraftForge.EVENT_BUS.unregister(keyboardListener); MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); + MinecraftForge.EVENT_BUS.unregister(keyboardListener); + MinecraftForge.EVENT_BUS.unregister(mouseListener); + MinecraftForge.EVENT_BUS.unregister(mouseScrollListener); formInputs.forEach((condition, form) -> condition.unregister()); } @@ -221,9 +252,11 @@ public void toggleListeners() { registerListeners(); registerInputs(); listen = true; + System.out.println("Enabled!"); } else { unRegisterInputs(); listen = false; + System.out.println("Disabled!"); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java index cff5ccb8..a82aa2b9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java @@ -88,7 +88,6 @@ public MouseInputModule() { // LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); // else // LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); -// MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); lastActivatedForm = activeForm; Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); activeForm = null; @@ -111,7 +110,6 @@ public MouseInputModule() { private void checkForForm() { if (!activeConditions.isEmpty()) { List conditions = activeConditions.stream().toList(); - System.out.println("Active Conditions: " + activeConditions); List recognized = formsTree.search(conditions); if (recognized != null) { activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); @@ -218,11 +216,9 @@ public void toggleListeners() { registerListeners(); registerInputs(); listen = true; - System.out.println("Enabled!"); } else { unRegisterInputs(); listen = false; - System.out.println("Disabled!"); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index fcfdf7be..47b81223 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -46,7 +46,7 @@ public MouseMotionModule() { sendModifierData(); } - if (Magus.keyboardInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { + if (Magus.keyboardMouseInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { Minecraft mci = Minecraft.getInstance(); assert mci.player != null; double x = mci.mouseHandler.xpos(); diff --git a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java index afaefc6d..fe6c8174 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java @@ -27,7 +27,7 @@ public static boolean handlePacket(RegisterModifierListenersPacket packet, Suppl ctx.get().enqueueWork(() -> { packet.modifierTypes.forEach(modifierType -> { LogManager.getLogger().info("REGISTERING MODIFIER: " + modifierType); - Magus.keyboardInputModule.registerModifierListener(ModifiersRegistry.fromName(modifierType).listener(), packet.treeData); + Magus.keyboardMouseInputModule.registerModifierListener(ModifiersRegistry.fromName(modifierType).listener(), packet.treeData); }); }); @@ -37,7 +37,7 @@ public static boolean handlePacket(RegisterModifierListenersPacket packet, Suppl public static boolean handlePacket(UnregisterModifierListenersPacket packet, Supplier ctx) { ctx.get().enqueueWork(() -> { LogManager.getLogger().info("UNREGISTERING MODIFIERS"); - Magus.keyboardInputModule.unregisterModifiers(); + Magus.keyboardMouseInputModule.unregisterModifiers(); }); return true; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 69edd8f5..4a21e522 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -95,17 +95,6 @@ public void resetTree() { condition.register(); } - private List prioritizeConditions(List conditions) { - List prioritizedConditions = new ArrayList<>(); - for (Condition condition: conditions) { - if (condition instanceof MultiClientCondition) { - prioritizedConditions.add(condition); - break; - } - } - return prioritizedConditions.isEmpty() ? conditions : prioritizedConditions; - } - // Helpful method to debug and to see all the conditions public void printAllConditions() { printAllConditions(root, new ArrayList<>()); @@ -146,6 +135,17 @@ private void printAllBranches(Node current, String indent) { } } + private List prioritizeConditions(List conditions) { + List prioritizedConditions = new ArrayList<>(); + for (Condition condition: conditions) { + if (condition instanceof MultiClientCondition) { + prioritizedConditions.add(condition); + break; + } + } + return prioritizedConditions.isEmpty() ? conditions : prioritizedConditions; + } + // Add conditions to RadixTree - O(n) public void insert(List conditions) { Node current = root; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java index 5e6a6d40..7709d6cc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java @@ -11,6 +11,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; + public class MultiClientCondition extends Condition { private static final int TIMEOUT_IN_TICKS = 3; private final List concurrentConditions; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 840ed5e9..04e4d979 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -52,7 +52,7 @@ public KeyHoldCondition(int key, int duration, int timeout, boolean release) { this.clientTickListener = event -> { if (event.phase == ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { - if (Magus.keyboardInputModule.keyPressed(key) || Magus.mouseInputModule.keyPressed(key)) { + if (Magus.keyboardMouseInputModule.keyPressed(key)) { this.started = true; this.currentHolding++; if (pressed(this.currentHolding, duration)) { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index c0f5c780..0215d236 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -8,22 +8,19 @@ import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; -import net.minecraft.client.Minecraft; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.EntityLeaveLevelEvent; import net.minecraftforge.event.level.LevelEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; + @Mod.EventBusSubscriber public class ServerEvents { @SubscribeEvent - public static void worldStart(LevelEvent event) { - - } + public static void worldStart(LevelEvent event) {} @SubscribeEvent public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @@ -114,17 +111,15 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } else { if (event.getEntity() instanceof Player) { - Magus.keyboardInputModule.terminate(); - Magus.mouseInputModule.terminate(); + Magus.keyboardMouseInputModule.terminate(); Magus.mouseMotionModule.terminate(); InputModule.resetFormsTree(); AvatarFormRegistry.registerForms(); // System.out.println("All RadixTree Forms Conditions:"); // Magus.keyboardInputModule.getFormsTree().printAllConditions(); System.out.println("All RadixTree Branches:"); - Magus.keyboardInputModule.getFormsTree().printAllBranches(); - Magus.keyboardInputModule.init(); - Magus.mouseInputModule.init(); + Magus.keyboardMouseInputModule.getFormsTree().printAllBranches(); + Magus.keyboardMouseInputModule.init(); // Magus.mouseMotionModule.init(); } } @@ -133,9 +128,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { if (event.getEntity() instanceof Player) { - Magus.keyboardInputModule.getFormsTree().deactivateAllConditions(); - Magus.keyboardInputModule.terminate(); - Magus.mouseInputModule.terminate(); + Magus.keyboardMouseInputModule.getFormsTree().deactivateAllConditions(); + Magus.keyboardMouseInputModule.terminate(); Magus.mouseMotionModule.terminate(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 6965463e..aa32c916 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -13,6 +13,7 @@ import java.util.List; import java.util.Map; + public class FormDataRegistry { private static Map formsData; @@ -27,11 +28,11 @@ public static void init() { public static Form getFormByName(String formName) { return Registries.FORMS.get().getValue(new ResourceLocation(formName)); } + public static List getInputsForForm(Form formToModify, RadixTree.InputType type) { return formsData.get(formToModify).getInputs(type); } - public static void registerForm(List inputs, Form form, RadixTree.InputType type) { // Register the requisite conditions InputModuleData data = new InputModuleData(); @@ -48,8 +49,7 @@ public static void registerForm(List inputs, Form form, RadixTree.Inp // I can dream... case VR -> { } - case KEYBOARD -> Magus.keyboardInputModule.registerInputData(inputs, form, conditions); - case MOUSE -> Magus.mouseInputModule.registerInputData(inputs, form, conditions); + case KEYBOARD -> Magus.keyboardMouseInputModule.registerInputData(inputs, form, conditions); case MOUSE_MOTION -> Magus.mouseMotionModule.registerInputData(inputs, form, conditions); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java index 095528d9..cdd9fc0a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java @@ -1,13 +1,8 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseShapeInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseVircle; @@ -16,18 +11,15 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.GestureModifierData; -import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Objects; import java.util.function.Consumer; public class GestureModifierListener extends ModifierListener { @@ -66,7 +58,7 @@ public void setupListener(CompoundTag compoundTag) { InputData lastInput = formInputs.get(formInputs.size() - 1); this.clientTickListener = event -> { - if (Magus.keyboardInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { + if (Magus.keyboardMouseInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { Minecraft mci = Minecraft.getInstance(); assert mci.player != null; double x = mci.mouseHandler.xpos(); @@ -86,7 +78,7 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent event) { - if (!Magus.keyboardInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { + if (!Magus.keyboardMouseInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { if (!mouseGestures.isEmpty()) { mouseGestures.clear(); return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 3627806d..9a1c96ac 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -17,7 +17,6 @@ import net.minecraftforge.event.TickEvent; import java.util.List; -import java.util.Objects; import java.util.function.Consumer; public class KeyHeldModifierListener extends ModifierListener { @@ -67,12 +66,12 @@ else if (lastInput instanceof MultiKeyInput) { key = ((KeyInput) lastInput).key().getValue(); } - InputModule module; - if (Objects.requireNonNull(type) == RadixTree.InputType.MOUSE) { - module = Magus.mouseInputModule; - } else { - module = Magus.keyboardInputModule; - } + InputModule module = Magus.keyboardMouseInputModule; +// if (Objects.requireNonNull(type) == RadixTree.InputType.MOUSE) { +// module = Magus.mouseInputModule; +// } else { +// module = Magus.keyboardInputModule; +// } this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { @@ -97,7 +96,7 @@ public boolean shouldCollectModifierData(TickEvent event) { //so that we send a packet to say we've stopped holding(for continuous cast ability support) if (!this.isHeld && this.wasHeld) { this.wasHeld = false; - Magus.keyboardInputModule.resetLastActivated(); + Magus.keyboardMouseInputModule.resetLastActivated(); return true; } return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index ee878bb8..a0710714 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -2,7 +2,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.InputModule; -import com.amuzil.omegasource.magus.input.KeyboardInputModule; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.IntegerArgumentType; import net.minecraft.commands.CommandSourceStack; @@ -41,18 +41,18 @@ private static int record() { } private static int tree() { - Magus.keyboardInputModule.getFormsTree().printAllBranches(); - System.out.println("Current Active Forms: " + Magus.keyboardInputModule.getActiveConditions()); + Magus.keyboardMouseInputModule.getFormsTree().printAllBranches(); + System.out.println("Current Active Forms: " + Magus.keyboardMouseInputModule.getActiveConditions()); return 1; } private static int reset() { - KeyboardInputModule kim = (KeyboardInputModule) Magus.keyboardInputModule; + KeyboardMouseInputModule kim = (KeyboardMouseInputModule) Magus.keyboardMouseInputModule; kim.getFormsTree().resetTree(); kim.getActiveConditions().clear(); InputModule.resetFormsTree(); AvatarFormRegistry.registerForms(); - kim.registerRunnables(Magus.keyboardInputModule.getFormsTree()); + kim.registerRunnables(Magus.keyboardMouseInputModule.getFormsTree()); Magus.sendDebugMsg("Reset Forms RadixTree"); return 1; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index e724d6d0..c0f87a3d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,6 +1,6 @@ package com.amuzil.omegasource.magus.skill.test.avatar; -import com.amuzil.omegasource.magus.input.KeyboardInputModule; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; @@ -31,9 +31,9 @@ public static void registerForms() { // make them Effects using the Force Form, Direction modifier & Target Modifier /* Mouse Button Forms */ - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, RadixTree.InputType.MOUSE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, RadixTree.InputType.MOUSE); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, RadixTree.InputType.MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, RadixTree.InputType.KEYBOARD); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, RadixTree.InputType.KEYBOARD); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, RadixTree.InputType.KEYBOARD); /* Mouse Motion Forms */ // TODO: Figure out a way to pass a condition that specifies when to track data for this Form and other mouse motion Forms. @@ -60,7 +60,7 @@ public static void registerForms() { // Motion! 7 different movement options. // Left, right, up, down, jump, sneak, sprint. LinkedList inputs = new LinkedList<>(); - for (Map.Entry key : KeyboardInputModule.getMovementKeys().entrySet()) { + for (Map.Entry key : KeyboardMouseInputModule.getMovementKeys().entrySet()) { inputs.clear(); KeyInput first, second; From 875d5c3f3aa25d69b1966dfb8e75a93bec2d8261 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 6 Oct 2024 01:33:39 -0400 Subject: [PATCH 322/469] maybe not printing it solved ConcurrentModificationException --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index c3dfe680..1f769758 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -142,7 +142,7 @@ private void checkForForm() { if (!activeConditions.isEmpty()) { List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); - System.out.println("activeConditions: " + activeConditions + "| GLFW: " + glfwKeysDown); + System.out.println("activeConditions: " + conditions); // System.out.println("recognized: " + recognized); if (recognized != null) { activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); From 451d48cca8a007902b5e5b2d20fae0bc5ef66d93 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 6 Oct 2024 01:35:24 -0400 Subject: [PATCH 323/469] (stable) refactored a bit --- .../magus/input/KeyboardMouseInputModule.java | 2 +- .../amuzil/omegasource/magus/radix/RadixTree.java | 2 +- .../magus/skill/forms/FormDataRegistry.java | 4 ++-- .../listeners/KeyHeldModifierListener.java | 2 +- .../magus/skill/test/avatar/AvatarFormRegistry.java | 13 +++++++------ 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 1f769758..60ab0ca2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -142,7 +142,7 @@ private void checkForForm() { if (!activeConditions.isEmpty()) { List conditions = activeConditions.stream().toList(); List recognized = formsTree.search(conditions); - System.out.println("activeConditions: " + conditions); +// System.out.println("activeConditions: " + conditions); // System.out.println("recognized: " + recognized); if (recognized != null) { activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 4a21e522..91778213 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -405,6 +405,6 @@ public enum ActivationType { // Essentially which input module to use. // Used for VR, multikey, and hotkey activation types. public enum InputType { - KEYBOARD, MOUSE, MOUSE_MOTION, VR + KEYBOARD_MOUSE, MOUSE, MOUSE_MOTION, VR } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index aa32c916..305196aa 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -49,7 +49,7 @@ public static void registerForm(List inputs, Form form, RadixTree.Inp // I can dream... case VR -> { } - case KEYBOARD -> Magus.keyboardMouseInputModule.registerInputData(inputs, form, conditions); + case KEYBOARD_MOUSE -> Magus.keyboardMouseInputModule.registerInputData(inputs, form, conditions); case MOUSE_MOTION -> Magus.mouseMotionModule.registerInputData(inputs, form, conditions); } @@ -62,6 +62,6 @@ public static List getConditionsFrom(Form form, RadixTree.InputType t public static void registerForm(InputData input, Form form) { List singleton = new ArrayList<>(); singleton.add(input); - registerForm(singleton, form, RadixTree.InputType.KEYBOARD); + registerForm(singleton, form, RadixTree.InputType.KEYBOARD_MOUSE); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 9a1c96ac..3648b880 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -27,7 +27,7 @@ public class KeyHeldModifierListener extends ModifierListener { private RadixTree.InputType type; public KeyHeldModifierListener() { - this(RadixTree.InputType.KEYBOARD); + this(RadixTree.InputType.KEYBOARD_MOUSE); } public KeyHeldModifierListener(RadixTree.InputType type) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index c0f87a3d..079640e5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -15,6 +15,7 @@ import java.util.LinkedList; import java.util.Map; + public class AvatarFormRegistry { public static void registerForms() { @@ -31,9 +32,9 @@ public static void registerForms() { // make them Effects using the Force Form, Direction modifier & Target Modifier /* Mouse Button Forms */ - FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, RadixTree.InputType.KEYBOARD); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, RadixTree.InputType.KEYBOARD); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, RadixTree.InputType.KEYBOARD); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, RadixTree.InputType.KEYBOARD_MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, RadixTree.InputType.KEYBOARD_MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, RadixTree.InputType.KEYBOARD_MOUSE); /* Mouse Motion Forms */ // TODO: Figure out a way to pass a condition that specifies when to track data for this Form and other mouse motion Forms. @@ -44,8 +45,8 @@ public static void registerForms() { // Forms.LOWER; Slower mouse motion down. /* Keyboard Forms */ - FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, RadixTree.InputType.KEYBOARD); - FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.BREATHE, RadixTree.InputType.KEYBOARD); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(initializer), Forms.ARC, RadixTree.InputType.KEYBOARD_MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak), Forms.BREATHE, RadixTree.InputType.KEYBOARD_MOUSE); // Forms.SPIN; Clockwise or anticlockwise cardinal directions. (WDSA or WASD). // FormDataRegistry.registerForm(Forms.PUSH); @@ -71,7 +72,7 @@ public static void registerForms() { second = KeyDataBuilder.createInput(key.getValue(), 0, 15); inputs.add(first); inputs.add(second); - FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD); + FormDataRegistry.registerForm(inputs, Forms.STEP, RadixTree.InputType.KEYBOARD_MOUSE); } /* Combination Forms */ From 6968caa427c00ae6b77d20230720f1a1e14348a4 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 7 Oct 2024 17:34:34 -0400 Subject: [PATCH 324/469] remove unecessary stuff stable --- .../omegasource/magus/input/InputModule.java | 3 +- .../magus/input/MouseInputModule.java | 228 ------------------ .../omegasource/magus/radix/RadixTree.java | 25 +- 3 files changed, 6 insertions(+), 250 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index fe523784..f81a6bf8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -5,7 +5,6 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -22,7 +21,7 @@ public abstract class InputModule { - protected static RadixTree formsTree = new RadixTree(RadixTree.Side.CLIENT); + protected static RadixTree formsTree = new RadixTree(); protected static LinkedList activeConditions = new LinkedList<>(); protected static LinkedList activeForms = new LinkedList<>(); protected static final List activeFormInputs = new ArrayList<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java deleted file mode 100644 index a82aa2b9..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseInputModule.java +++ /dev/null @@ -1,228 +0,0 @@ -package com.amuzil.omegasource.magus.input; - -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.network.MagusNetwork; -import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; -import com.amuzil.omegasource.magus.radix.*; -import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; -import com.mojang.blaze3d.platform.InputConstants; -import net.minecraft.client.KeyMapping; -import net.minecraft.client.Minecraft; -import net.minecraftforge.client.event.InputEvent; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.TickEvent; -import net.minecraftforge.eventbus.api.EventPriority; -import org.apache.logging.log4j.LogManager; - -import java.util.*; -import java.util.function.Consumer; - - -public class MouseInputModule extends InputModule { - - private final Consumer tickEventConsumer; - private final Consumer mouseListener; - private final Consumer mouseScrollListener; - private final int tickActivationThreshold = 15; - private final int tickTimeoutThreshold = 60; - private final int modifierTickThreshold = 10; - private int ticksSinceActivated = 0; - private int ticksSinceModifiersSent = 0; - private List glfwKeysDown; - private Form activeForm; - private double mouseScrollDelta; - private int timeout = 0; - private boolean listen; - private boolean checkForm = false; - - // How scroll delta works: every physical "tick" forwards on the mouse is 1.0, and backwards - // is -1.0. Therefore, you'd need a tracker over time, like a key held event, for the mouse wheel. - // Except you're not pressing it, you're spinning it.... - - public MouseInputModule() { - this.glfwKeysDown = new ArrayList<>(); - this.listen = true; - - this.mouseListener = mouseEvent -> { - int keyPressed = mouseEvent.getButton(); - switch (mouseEvent.getAction()) { - case InputConstants.PRESS-> { - if (!glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.add(keyPressed); - } - } - case InputConstants.RELEASE -> { - if (glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.remove((Integer) keyPressed); - checkForm = true; - } - } - } - }; - - this.mouseScrollListener = mouseScrollingEvent -> { - this.mouseScrollDelta = mouseScrollingEvent.getScrollDelta(); - }; - - this.tickEventConsumer = tickEvent -> { - ticksSinceModifiersSent++; - if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { - sendModifierData(); - } - - if (checkForm) { - checkForForm(); - checkForm = false; - } - - // Check every couple of ticks - if (timeout % 5 == 0) - checkForForm(); - - if (activeForm != null && activeForm.name() != null) { - ticksSinceActivated++; - if(ticksSinceActivated >= tickActivationThreshold) { -// if (lastActivatedForm != null) -// LogManager.getLogger().info("LAST FORM ACTIVATED: " + lastActivatedForm.name() + " | FORM ACTIVATED: " + activeForm.name()); -// else -// LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); - lastActivatedForm = activeForm; - Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); - activeForm = null; - ticksSinceActivated = 0; - timeout = 0; - resetTreeConditions(); - } - } else { - timeout++; - if (timeout > tickTimeoutThreshold) { - resetTreeConditions(); - // Timed out enough where multi is no longer valid. - lastActivatedForm = null; - timeout = 0; - } - } - }; - } - - private void checkForForm() { - if (!activeConditions.isEmpty()) { - List conditions = activeConditions.stream().toList(); - List recognized = formsTree.search(conditions); - if (recognized != null) { - activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); -// System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); -// Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); - } - } - } - - private void sendModifierData() { - LogManager.getLogger().info("SENDING MODIFIER DATA"); - synchronized (modifierQueue) { - MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); - ticksSinceModifiersSent = 0; - modifierQueue.clear(); - } - } - - public void resetKeys() { - glfwKeysDown = new ArrayList<>(); - } - - public void cleanMCKeys() { - // Fixes some weird mouse and other key issues. - for (KeyMapping key : Minecraft.getInstance().options.keyMappings) { - if (!key.isDown()) { - if (glfwKeysDown.contains(key.getKey().getValue())) - glfwKeysDown.remove((Integer) key.getKey().getValue()); - } - } - } - - @Override - public void registerInputData(List formExecutionInputs, - Form formToExecute, List formConditions) { - ConditionPath path = formToExecute.createPath(formConditions); - System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formConditions + " | Inputs: " + formExecutionInputs); - formsTree.insert(path.conditions); - registerRunnables(formsTree); - } - - @Override - public void registerRunnables(Node current) { - for (RadixBranch branch : current.branches.values()) { -// if (!branch.next.branches.keySet().isEmpty()) -// System.out.println(branch.conditions() + " | THE KIDS: " + branch.next.branches.keySet()); - for (int i = 0; i < branch.conditions().size(); i++) { - Condition condition = branch.conditions().get(i); - Condition nextCondition; - - if (i + 1 < branch.conditions().size()) nextCondition = branch.conditions().get(i + 1); - else nextCondition = null; - - Runnable originalSuccess = condition.onSuccess(); - Runnable onSuccess = () -> { - if (!activeConditions.contains(condition)) { - activeConditions.add(condition); - condition.unregister(); // unregister parent to give child nodes a shot to be heard - if (nextCondition != null) - nextCondition.register(); // register next condition in the path if it exists - List childConditions = branch.next.branches.keySet().stream().toList(); - RadixTree.registerConditions(childConditions); // register any next of kin if they exist - } - this.timeout = 0; - if (originalSuccess != null) - originalSuccess.run(); - }; - - Runnable originalFailure = condition.onFailure(); - Runnable onFailure = () -> { - activeConditions.remove(condition); - condition.reset(); - if (originalFailure != null) - originalFailure.run(); - }; - condition.register(condition.name(), onSuccess, onFailure); - } - registerRunnables(branch.next); - } - } - - @Override - public void registerListeners() { - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseScrollingEvent.class, mouseScrollListener); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); - } - - @Override - public void unRegisterInputs() { - MinecraftForge.EVENT_BUS.unregister(mouseListener); - MinecraftForge.EVENT_BUS.unregister(mouseScrollListener); - MinecraftForge.EVENT_BUS.unregister(tickEventConsumer); - formInputs.forEach((condition, form) -> condition.unregister()); - } - - public void registerInputs() { - formInputs.forEach((condition, form) -> condition.register()); - } - - @Override - public void toggleListeners() { - if (!listen) { - registerListeners(); - registerInputs(); - listen = true; - } else { - unRegisterInputs(); - listen = false; - } - } - - public boolean keyPressed(int key) { - return glfwKeysDown.contains(key); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 91778213..617d65fe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -24,23 +24,12 @@ public class RadixTree { private Discipline activeDiscipline = null; // Disciplines.FIRE; private ConditionPath path; private Entity owner; - private Side side = Side.COMMON; - - public RadixTree(Node root, Side side) { - this(root); - this.side = side; - } public RadixTree(Node root) { this.root = root; this.active = root; } - public RadixTree(Side side) { - this(); - this.side = side; - } - public RadixTree() { this(new Node(false)); } @@ -263,9 +252,9 @@ private void setActive(Node node) { currentCondition.register(currentCondition.name(), () -> { currentCondition.onSuccess.run(); currentCondition.unregister(); - switch (side) { - default -> MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); - } +// switch (side) { +// default -> MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); +// } }, currentCondition.onFailure); currentCondition.register(); @@ -393,11 +382,7 @@ public void setOwner(Entity entity) { this.owner = entity; } - public enum Side { - CLIENT, COMMON, SERVER - } - - // Menu = radial menu or a HUD. Other activation types are self explanatory. + // Menu = radial menu or a HUD. Other activation types are self-explanatory. public enum ActivationType { MULTIKEY, MENU, HOTKEY, VR } @@ -405,6 +390,6 @@ public enum ActivationType { // Essentially which input module to use. // Used for VR, multikey, and hotkey activation types. public enum InputType { - KEYBOARD_MOUSE, MOUSE, MOUSE_MOTION, VR + KEYBOARD_MOUSE, MOUSE_MOTION, VR } } \ No newline at end of file From 91fb02112f6a251d0e2704b793e9b42247c72c75 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 7 Oct 2024 17:51:14 -0400 Subject: [PATCH 325/469] Update InputConverter.java --- .../omegasource/magus/radix/builders/InputConverter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index 2355a66f..522e957d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -54,7 +54,7 @@ public class InputConverter { return conditions; }); - // TODO: in order to finalise ConditionBuilder.java. + registerBuilder(MultiKeyInput.class, multiKeyInputs -> { LinkedList multiConditions = new LinkedList<>(); @@ -79,6 +79,7 @@ public class InputConverter { return multiConditions; } ); + registerBuilder(ChainedKeyInput.class, chainedKeyInputs -> { LinkedList chained = new LinkedList<>(); @@ -101,6 +102,7 @@ public class InputConverter { /* Mouse */ // registerBuilder(MouseInput.class, // mouseInput -> ); + registerBuilder(MouseWheelInput.class, mouseWheelInput -> { From a943f998431be96a5924702f559d14aeac47b579 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 9 Oct 2024 12:43:34 +1100 Subject: [PATCH 326/469] condition registry update --- .../omegasource/magus/radix/Condition.java | 4 ++- .../radix/condition/ChainedCondition.java | 28 +++++++++++-------- .../radix/condition/ConditionRegistry.java | 8 ++++-- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java index 6068be2e..f9a60d0e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Condition.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.radix; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.registry.Registries; import java.util.List; @@ -31,6 +32,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { // RadixUtil.getLogger().debug("Result: failure: " + getClass()); // Thread.dumpStack(); this.onFailure = onFailure; + registerEntry(); } // TODO: Change this to registerListeners() @@ -38,7 +40,7 @@ public void register() {} // Every Condition needs to call this in their constructor public void registerEntry() { - Registries.registerCondition(this); + ConditionRegistry.register(this); } public void unregister() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java index de0a53f4..baf21ae8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java @@ -7,19 +7,16 @@ public class ChainedCondition extends Condition { private final List conditionSequence; - private Runnable onCompleteSuccess; - private Runnable onCompleteFailure; private int currentConditionIndex = 0; private Condition currentCondition = null; - private final Runnable onPartialSuccess; - private final Runnable onPartialFailure; + private Runnable onPartialSuccess; + private Runnable onPartialFailure; public ChainedCondition(List conditionSequence) { this.conditionSequence = conditionSequence; this.onPartialSuccess = this::finishCurrentCondition; this.onPartialFailure = this::reset; - this.registerEntry(); } public ChainedCondition(Condition condition) { @@ -29,22 +26,20 @@ public ChainedCondition(Condition condition) { private void finishCurrentCondition() { if(currentCondition == null) return; if (currentConditionIndex == (conditionSequence.size() - 1)) { - onCompleteSuccess.run(); + onSuccess.run(); reset(); return; } else { currentConditionIndex++; } - //Debugging statement - // LogManager.getLogger().info("UNREGISTERING CURRENT CONDITION: " + currentCondition.getClass()); currentCondition.unregister(); currentCondition = conditionSequence.get(currentConditionIndex); if(currentConditionIndex == conditionSequence.size() - 1) { - currentCondition.register(currentCondition.name(), onCompleteSuccess, () -> { + currentCondition.register(currentCondition.name(), onSuccess, () -> { onPartialFailure.run(); - onCompleteFailure.run(); + onFailure.run(); }); } else { currentCondition.register(currentCondition.name(), onPartialSuccess, onPartialFailure); @@ -53,6 +48,10 @@ private void finishCurrentCondition() { } public void reset() { + for (Condition condition : conditionSequence) { + condition.reset(); + condition.unregister(); + } currentConditionIndex = 0; currentCondition.unregister(); currentCondition = conditionSequence.get(currentConditionIndex); @@ -61,12 +60,17 @@ public void reset() { @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { - this.onCompleteSuccess = onSuccess; - this.onCompleteFailure = onFailure; + super.register(name, onSuccess, onFailure); + } + + public void partialRegister(Runnable onPartialSuccess, Runnable onPartialFailure) { + this.onPartialSuccess = onPartialSuccess; + this.onPartialFailure = onPartialFailure; } @Override public void register() { + super.register(); currentCondition = conditionSequence.get(currentConditionIndex); currentCondition.register(currentCondition.name(), onPartialSuccess, onPartialFailure); // Divorce register(runnable, runnable) from the regular register method. diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java index 6b7ccc36..141ce830 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java @@ -16,9 +16,11 @@ public class ConditionRegistry { static int id = 0; public static void register(Condition condition) { - conditions.put(id, condition); - conditionIDs.put(condition, id); - id++; + if (!conditions.containsValue(condition)) { + conditions.put(id, condition); + conditionIDs.put(condition, id); + id++; + } } public static Condition getCondition(int id) { From afb4b64dfda2890407027c07e32886da007a8f3b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 9 Oct 2024 14:57:02 +1100 Subject: [PATCH 327/469] Removed chained condition; updated Multi condition --- .../magus/radix/builders/InputConverter.java | 8 +- .../radix/condition/ChainedCondition.java | 87 ------------------- .../radix/condition/MultiClientCondition.java | 79 ++--------------- .../magus/radix/condition/MultiCondition.java | 47 +++++----- .../skill/conditionals/ConditionBuilder.java | 16 +--- 5 files changed, 34 insertions(+), 203 deletions(-) delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index 522e957d..94ed7900 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -2,9 +2,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.MultiClientCondition; -import com.amuzil.omegasource.magus.radix.condition.MultiCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; @@ -88,11 +86,7 @@ public class InputConverter { List conditions = new LinkedList<>(combination.keys().stream().map(InputConverter::buildPathFrom) .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - for (Condition condition : conditions) { - if (condition instanceof MultiCondition) - chained.add(ConditionBuilder.createSequentialCondition((MultiCondition) condition)); - else chained.add(ConditionBuilder.createSequentialCondition(condition)); - } + chained.addAll(conditions); } // Return a list containing the ChainedCondition return chained; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java deleted file mode 100644 index baf21ae8..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ChainedCondition.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.amuzil.omegasource.magus.radix.condition; - -import com.amuzil.omegasource.magus.radix.Condition; - -import java.util.List; - -public class ChainedCondition extends Condition { - - private final List conditionSequence; - private int currentConditionIndex = 0; - private Condition currentCondition = null; - - private Runnable onPartialSuccess; - private Runnable onPartialFailure; - - public ChainedCondition(List conditionSequence) { - this.conditionSequence = conditionSequence; - this.onPartialSuccess = this::finishCurrentCondition; - this.onPartialFailure = this::reset; - } - - public ChainedCondition(Condition condition) { - this(List.of(condition)); - } - - private void finishCurrentCondition() { - if(currentCondition == null) return; - if (currentConditionIndex == (conditionSequence.size() - 1)) { - onSuccess.run(); - reset(); - return; - } else { - currentConditionIndex++; - } - - currentCondition.unregister(); - - currentCondition = conditionSequence.get(currentConditionIndex); - if(currentConditionIndex == conditionSequence.size() - 1) { - currentCondition.register(currentCondition.name(), onSuccess, () -> { - onPartialFailure.run(); - onFailure.run(); - }); - } else { - currentCondition.register(currentCondition.name(), onPartialSuccess, onPartialFailure); - } - - } - - public void reset() { - for (Condition condition : conditionSequence) { - condition.reset(); - condition.unregister(); - } - currentConditionIndex = 0; - currentCondition.unregister(); - currentCondition = conditionSequence.get(currentConditionIndex); - currentCondition.register(currentCondition.name(), onPartialSuccess, onPartialFailure); - } - - @Override - public void register(String name, Runnable onSuccess, Runnable onFailure) { - super.register(name, onSuccess, onFailure); - } - - public void partialRegister(Runnable onPartialSuccess, Runnable onPartialFailure) { - this.onPartialSuccess = onPartialSuccess; - this.onPartialFailure = onPartialFailure; - } - - @Override - public void register() { - super.register(); - currentCondition = conditionSequence.get(currentConditionIndex); - currentCondition.register(currentCondition.name(), onPartialSuccess, onPartialFailure); - // Divorce register(runnable, runnable) from the regular register method. - // This method should add requisite listeners to the forge event bus. - // The other method should just adjust runnables as needed. - currentCondition.register(); - } - - @Override - public void unregister() { - if (currentCondition != null) - currentCondition.unregister(); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java index 7709d6cc..c44b7b41 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java @@ -7,42 +7,21 @@ import net.minecraftforge.eventbus.api.EventPriority; import org.apache.logging.log4j.LogManager; -import java.util.*; -import java.util.concurrent.atomic.AtomicInteger; +import java.util.List; import java.util.function.Consumer; -public class MultiClientCondition extends Condition { +public class MultiClientCondition extends MultiCondition { private static final int TIMEOUT_IN_TICKS = 3; - private final List concurrentConditions; - private Dictionary conditionsMet; private Consumer clientTickListener; - private int executionTime = 0; - private boolean startedExecuting = false; + public MultiClientCondition(List concurrentConditions) { - this.concurrentConditions = concurrentConditions; - this.registerEntry(); + super(concurrentConditions); } public MultiClientCondition(Condition condition) { - this(List.of(condition)); - } - - private void checkConditionMet() { - if (conditionsMet.size() == concurrentConditions.size()) { - boolean success; - for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { - success = it.next(); - if (!success) - return; - } - System.out.println("Success!"); - this.onSuccess.run(); - startedExecuting = false; - this.reset(); - } - + super(condition); } public List getSubConditions() { @@ -71,37 +50,8 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { this.reset(); } - public void reset() { - AtomicInteger counter = new AtomicInteger(); - conditionsMet = new Hashtable<>(); - this.startedExecuting = false; - this.executionTime = 0; - concurrentConditions.forEach(condition -> { - int id = counter.getAndIncrement(); - condition.register(condition.name(), () -> { - synchronized (conditionsMet) { - startedExecuting = true; - conditionsMet.put(id, true); - condition.unregister(); - condition.reset(); - } - checkConditionMet(); - }, () -> { - synchronized (conditionsMet) { - conditionsMet.put(id, false); - condition.unregister(); - condition.reset(); - } - checkConditionMet(); - }); - conditionsMet.put(id, false); - }); - } - - @Override public void register() { - super.register(); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); for (Condition condition : getSubConditions()) condition.register(); @@ -115,27 +65,12 @@ public void unregister() { @Override public int hashCode() { - int hashSum = 0; - for (Condition condition : concurrentConditions) - hashSum += condition.hashCode(); - return Objects.hash(name, hashSum); + return super.hashCode(); } @Override public boolean equals(Object obj) { - if (this == obj) { - return true; - } else if (!(obj instanceof MultiClientCondition other)) { - return false; - } else { -// System.out.println("this: stored in tree -> " + this); -// System.out.println("other: activeCondition from user input -> " + other); - return Objects.equals(concurrentConditions.size(), ((MultiClientCondition) obj).concurrentConditions.size()) - && - /* Makes sure an alternative key condition that's been pressed has been pressed at least as long - * as the currently compared condition. */ - obj.hashCode() == this.hashCode(); - } + return super.equals(obj); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 86d222a1..1777d419 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -1,8 +1,6 @@ package com.amuzil.omegasource.magus.radix.condition; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.EventPriority; @@ -13,14 +11,12 @@ import java.util.function.Consumer; public class MultiCondition extends Condition { - private static final int TIMEOUT_IN_TICKS = 15; - private final List concurrentConditions; - private Runnable onCompleteSuccess; - private Runnable onCompleteFailure; - private Dictionary conditionsMet; - private Consumer clientTickListener; - private int executionTime = 0; - private boolean startedExecuting = false; + protected static final int TIMEOUT_IN_TICKS = 15; + protected final List concurrentConditions; + protected Dictionary conditionsMet; + protected Consumer levelTickListener; + protected int executionTime = 0; + protected boolean startedExecuting = false; public MultiCondition(List concurrentConditions) { this.concurrentConditions = concurrentConditions; @@ -31,13 +27,18 @@ public MultiCondition(Condition condition) { this(List.of(condition)); } - private void checkConditionMet() { - for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { - // none/not all conditions have been met yet, exit loop and dont execute. - if (!it.next()) return; + protected void checkConditionMet() { + if (conditionsMet.size() == concurrentConditions.size()) { + boolean success; + for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { + success = it.next(); + if (!success) + return; + } + this.onSuccess.run(); + startedExecuting = false; + this.reset(); } - this.onCompleteSuccess.run(); - this.reset(); } public List getSubConditions() { @@ -47,12 +48,12 @@ public List getSubConditions() { @Override public void register(String name, Runnable onSuccess, Runnable onFailure) { super.register(name, onSuccess, onFailure); - this.clientTickListener = event -> { - if (event.phase == TickEvent.ClientTickEvent.Phase.START) { + this.levelTickListener = event -> { + if (event.phase == TickEvent.LevelTickEvent.Phase.START) { if (startedExecuting) { executionTime++; if (executionTime > TIMEOUT_IN_TICKS) { - this.onCompleteFailure.run(); + this.onFailure.run(); LogManager.getLogger().info("MULTI CONDITION TIMED OUT"); this.reset(); @@ -60,8 +61,8 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { } } }; - this.onCompleteSuccess = onSuccess; - this.onCompleteFailure = onFailure; + this.onSuccess = onSuccess; + this.onFailure = onFailure; this.reset(); } @@ -73,7 +74,6 @@ public void reset() { concurrentConditions.forEach(condition -> { int id = counter.getAndIncrement(); condition.register(condition.name(), () -> { - System.out.println("First Condition Met: " + condition); synchronized (conditionsMet) { // Debugging statement: // LogManager.getLogger().info("MARKING CONDITION MET: " + concurrentConditions.get(id).getClass()); @@ -98,13 +98,14 @@ public void reset() { @Override public void register() { super.register(); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTickListener); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.LevelTickEvent.class, levelTickListener); for (Condition condition : getSubConditions()) condition.register(); } @Override public void unregister() { + super.unregister(); concurrentConditions.forEach(Condition::unregister); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java index 27e1ddd2..e338553c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionBuilder.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.skill.conditionals; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.condition.ChainedCondition; import com.amuzil.omegasource.magus.radix.condition.MultiCondition; import com.amuzil.omegasource.magus.radix.builders.InputConverter; @@ -36,15 +35,6 @@ public static MultiCondition createMultiCondition(List condition) { return new MultiCondition(condition); } - // This is designed for simple conditions/singular. - public static ChainedCondition createSequentialCondition(Condition condition) { - return new ChainedCondition(createMultiCondition(condition)); - } - - public static ChainedCondition createSequentialCondition(MultiCondition condition) { - return new ChainedCondition(condition); - } - public ConditionBuilder fromInputData(List formExecutionInputs) { formExecutionInputs.forEach(inputData -> conditionList.addAll(InputConverter.buildPathFrom(inputData))); return this; @@ -59,7 +49,7 @@ public ConditionBuilder fromInputData(InputData formExecutionInput) { * @return A CombinationCondition combining all of the prequisite InputData * for an input group. */ - public Condition build() { + public LinkedList build() { //Creates a copy of the list List conditions = conditionList.stream().toList(); @@ -68,10 +58,8 @@ public Condition build() { if (conditions.size() == 0) return null; - if (conditions.size() == 1) - return conditions.get(0); - return new ChainedCondition(conditions); + return new LinkedList<>(conditions); } public void reset() { From 0c1f2b076affb92e027b467dc40cbe36f793db75 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 9 Oct 2024 23:03:58 +1100 Subject: [PATCH 328/469] Form activated packet --- .../client_executed/FormActivatedPacket.java | 43 +++++++++++++++++++ .../omegasource/magus/radix/RadixTree.java | 4 -- 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java new file mode 100644 index 00000000..e35beb6e --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -0,0 +1,43 @@ +package com.amuzil.omegasource.magus.network.packets.client_executed; + +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +public class FormActivatedPacket implements MagusPacket { + + private final Form form; + + public FormActivatedPacket(com.amuzil.omegasource.magus.skill.forms.Form condition) { + this.form = condition; + } + + public void toBytes(FriendlyByteBuf buf) { + if (form != null) { + buf.writeUtf(form.name()); + } + } + + public static FormActivatedPacket fromBytes(FriendlyByteBuf buf) { + String name = buf.readUtf(); + Form form = Registries.FORMS.get().getValue(new ResourceLocation(name)); + return new FormActivatedPacket(form); + } + + public boolean handle(Supplier ctx) { + ctx.get().enqueueWork(() -> { + // Publish Form Event here + Player player = ctx.get().getSender(); + }); + return true; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 617d65fe..998c8dd7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -252,10 +252,6 @@ private void setActive(Node node) { currentCondition.register(currentCondition.name(), () -> { currentCondition.onSuccess.run(); currentCondition.unregister(); -// switch (side) { -// default -> MagusNetwork.sendToServer(new ConditionActivatedPacket(currentCondition)); -// } - }, currentCondition.onFailure); currentCondition.register(); } From b86875e03216309d02817a9c6e9f420fa8c39785 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 9 Oct 2024 23:08:49 +1100 Subject: [PATCH 329/469] debugging for motion input --- .../amuzil/omegasource/magus/input/KeyboardMouseInputModule.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 60ab0ca2..9c9942ed 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -87,6 +87,7 @@ public KeyboardMouseInputModule() { }; this.mouseScrollListener = mouseScrollingEvent -> { + // 1.0 = away from player, -1 = towards player this.mouseScrollDelta = mouseScrollingEvent.getScrollDelta(); }; From 8e831e73ba26e0834165b852b2cc59af7cd57c68 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 9 Oct 2024 12:23:42 -0400 Subject: [PATCH 330/469] (stable) using HashTable instead of obsolete Dictionary also simplified code a bit --- .../magus/input/KeyboardMouseInputModule.java | 3 +-- .../magus/radix/condition/MultiCondition.java | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 9c9942ed..7c991f56 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -91,7 +91,6 @@ public KeyboardMouseInputModule() { this.mouseScrollDelta = mouseScrollingEvent.getScrollDelta(); }; - this.tickEventConsumer = tickEvent -> { ticksSinceModifiersSent++; if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { @@ -205,7 +204,7 @@ public void registerRunnables(Node current) { if (nextCondition != null) nextCondition.register(); // register next condition in the path if it exists List childConditions = branch.next.branches.keySet().stream().toList(); - RadixTree.registerConditions(childConditions); // register any next of kin if they exist + RadixTree.registerConditions(childConditions); // register any next of kin children if they exist } this.timeout = 0; if (originalSuccess != null) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 1777d419..6a86bc5e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -6,14 +6,16 @@ import net.minecraftforge.eventbus.api.EventPriority; import org.apache.logging.log4j.LogManager; -import java.util.*; +import java.util.Hashtable; +import java.util.List; +import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; public class MultiCondition extends Condition { protected static final int TIMEOUT_IN_TICKS = 15; protected final List concurrentConditions; - protected Dictionary conditionsMet; + protected final Hashtable conditionsMet = new Hashtable<>(); protected Consumer levelTickListener; protected int executionTime = 0; protected boolean startedExecuting = false; @@ -29,10 +31,8 @@ public MultiCondition(Condition condition) { protected void checkConditionMet() { if (conditionsMet.size() == concurrentConditions.size()) { - boolean success; - for (Iterator it = conditionsMet.elements().asIterator(); it.hasNext(); ) { - success = it.next(); - if (!success) + for (Boolean conditionIsMet: conditionsMet.values()) { + if (!conditionIsMet) return; } this.onSuccess.run(); @@ -68,7 +68,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { public void reset() { AtomicInteger counter = new AtomicInteger(); - conditionsMet = new Hashtable<>(); + conditionsMet.clear(); this.startedExecuting = false; this.executionTime = 0; concurrentConditions.forEach(condition -> { From 2adff7ca1f8308d840ed216b92420114066db145 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 10 Oct 2024 17:04:43 +1100 Subject: [PATCH 331/469] setting up mouse scrolling --- .../forge/mouse/MouseScrollCondition.java | 38 +++++++++++++ .../conditionals/mouse/MouseDataBuilder.java | 57 ++++++++++++------- .../conditionals/mouse/MouseWheelInput.java | 5 +- 3 files changed, 79 insertions(+), 21 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java new file mode 100644 index 00000000..675fb10a --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java @@ -0,0 +1,38 @@ +package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.mouse; + +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; +import net.minecraftforge.client.event.InputEvent; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.EventPriority; + +import java.util.function.Consumer; +import java.util.function.Function; + +public class MouseScrollCondition extends EventCondition { + + private final int timeout; + private final int duration; + private int currentScrolling; + private float currentScrollTotal; + private float currentScrollDelta; + private Consumer clientTicker; + public MouseScrollCondition(Class eventType, Function condition) { + super(eventType, condition); + this.clientTicker = event -> { + + }; + } + + @Override + public void register() { + super.register(); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, clientTicker); + } + + @Override + public void unregister() { + super.unregister(); + MinecraftForge.EVENT_BUS.unregister(clientTicker); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java index 1924bd02..d6e402a9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/mouse/MouseDataBuilder.java @@ -7,29 +7,28 @@ public class MouseDataBuilder { - /** - * Number corresponds to the MC mouse wheel direction. - */ - public enum Direction { + public static MouseWheelInput createWheelInput(Direction direction) { + return createWheelInput(direction, -1, -1, -1); + } - // Away from the user - FORWARDS(1), - // Towards the user - BACK(-1), - NEUTRAL(0); + public static MouseWheelInput createWheelInput(Direction direction, int duration) { + return createWheelInput(direction, -1, duration, -1); + } - private final int dir; - Direction(int dir) { - this.dir = dir; - } + public static MouseWheelInput createWheelInput(Direction direction, int duration, int timeout) { + return createWheelInput(direction, -1, duration, timeout); + } - public int getDirection() { - return this.dir; - } + public static MouseWheelInput createWheelInput(Direction direction, float totalChange, int duration, int timeout) { + return new MouseWheelInput(direction, totalChange, duration, timeout); + } + + public static MouseWheelInput createWheelInput(Direction direction, float totalChange, int timeout) { + return createWheelInput(direction, totalChange, -1, timeout); } - public static MouseWheelInput createWheelInput(Direction direction, int time) { - return new MouseWheelInput(direction, time); + public static MouseWheelInput createWheelInput(Direction direction, float totalChange) { + return createWheelInput(direction, totalChange, -1); } public static MouseMotionInput createSegmentMouseInput(MousePointInput... inputs) { @@ -47,7 +46,7 @@ public static MouseMotionInput createLine(MousePointInput start, MousePointInput double t = i / (double) numPoints; double x = (1 - t) * start.x() + t * end.x(); double y = (1 - t) * start.y() + t * end.y(); - if(Minecraft.getInstance().player != null) + if (Minecraft.getInstance().player != null) points.add(new MousePointInput(x, y, Minecraft.getInstance().player.getLookAngle())); } return new MouseMotionInput(points); @@ -85,4 +84,24 @@ public static MouseShapeInput createPolygonWithInterpolation(List Date: Thu, 10 Oct 2024 19:47:26 +1100 Subject: [PATCH 332/469] mouse scroll condition done --- .../magus/input/KeyboardMouseInputModule.java | 6 ++ .../magus/radix/builders/InputConverter.java | 17 +++- .../forge/mouse/MouseScrollCondition.java | 77 +++++++++++++++++-- 3 files changed, 90 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 7c991f56..b0d0fdb3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -263,4 +263,10 @@ public void toggleListeners() { public boolean keyPressed(int key) { return glfwKeysDown.contains(key); } + + public double getMouseScrollDelta() { + return this.mouseScrollDelta; + } + + } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index 94ed7900..cb891e51 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -3,11 +3,14 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.MultiClientCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.mouse.MouseScrollCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; +import net.minecraftforge.client.event.InputEvent; import java.util.HashMap; import java.util.LinkedList; @@ -98,11 +101,19 @@ public class InputConverter { // mouseInput -> ); registerBuilder(MouseWheelInput.class, - mouseWheelInput -> { + mouseWheelInputs -> { LinkedList conditions = new LinkedList<>(); - // Placeholder for now - //conditions.add(new KeyPressCondition(0, TIMEOUT_THRESHOLD)); + if (mouseWheelInputs instanceof List) { + for (Object obj : (List) mouseWheelInputs) { + MouseWheelInput input = (MouseWheelInput) obj; + MouseScrollCondition scroll = new MouseScrollCondition(input.direction(), input.duration(), input.totalChange(), + input.timeout()); + scroll.register("mouse_scroll", scroll::reset, scroll::reset); + conditions.add(scroll); + } + } + return conditions; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java index 675fb10a..ad32af83 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java @@ -1,6 +1,10 @@ package com.amuzil.omegasource.magus.radix.condition.minecraft.forge.mouse; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseDataBuilder; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -9,18 +13,77 @@ import java.util.function.Consumer; import java.util.function.Function; -public class MouseScrollCondition extends EventCondition { +public class MouseScrollCondition extends Condition { - private final int timeout; - private final int duration; + private int timeout; + private int timer; + private int duration; private int currentScrolling; private float currentScrollTotal; - private float currentScrollDelta; + private double maxScrollTotal; + private double currentScrollDelta; + private MouseDataBuilder.Direction direction; private Consumer clientTicker; - public MouseScrollCondition(Class eventType, Function condition) { - super(eventType, condition); - this.clientTicker = event -> { + public MouseScrollCondition(MouseDataBuilder.Direction direction, int duration, float total, int timeout) { + this.direction = direction; + this.duration = duration; + this.maxScrollTotal = total; + this.timeout = timeout; + this.timer = 0; + + this.clientTicker = tickEvent -> { + + currentScrollDelta = ((KeyboardMouseInputModule) Magus.keyboardMouseInputModule).getMouseScrollDelta(); + currentScrollTotal += ((KeyboardMouseInputModule) Magus.keyboardMouseInputModule).getMouseScrollDelta(); + + + // Any instant of the required direction being fulfilled + if (duration < 0) { + if (total != 0) { + // If the current total is equal to the max total... + if (currentScrollTotal == maxScrollTotal) { + this.onSuccess.run(); + this.reset(); + } + } + else { + if (this.direction.getDirection() == (int) currentScrollDelta) { + this.onSuccess.run(); + this.reset(); + } + } + } + + // Otherwise, we need to track over the duration + else { + if (currentScrollDelta == direction.getDirection()) { + currentScrolling++; + } + if (currentScrolling >= duration) { + this.onSuccess.run(); + this.reset(); + } + } + + + // Time out + if (timer > timeout && timeout > -1) { + this.onFailure.run(); + reset(); + } + + // Fail because wrong direction. Works when we need a specific direction for a certain amount of ticks. + if (duration > -1) { + if (maxScrollTotal == 0) { + if (currentScrollDelta != direction.getDirection()) { + this.onFailure.run(); + this.reset(); + } + } + } + + timer++; }; } From 78d2df7c019afcca53cc68136f87d6857a7e7b76 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 10 Oct 2024 19:50:12 +1100 Subject: [PATCH 333/469] Added a hash function for mouse scrolling --- .../forge/mouse/MouseScrollCondition.java | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java index ad32af83..bc3c12f8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java @@ -4,12 +4,15 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseDataBuilder; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.EventPriority; +import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; @@ -18,7 +21,7 @@ public class MouseScrollCondition extends Condition { private int timeout; private int timer; private int duration; - private int currentScrolling; + protected int currentScrolling; private float currentScrollTotal; private double maxScrollTotal; private double currentScrollDelta; @@ -44,13 +47,11 @@ public MouseScrollCondition(MouseDataBuilder.Direction direction, int duration, // If the current total is equal to the max total... if (currentScrollTotal == maxScrollTotal) { this.onSuccess.run(); - this.reset(); } } else { if (this.direction.getDirection() == (int) currentScrollDelta) { this.onSuccess.run(); - this.reset(); } } } @@ -62,7 +63,6 @@ public MouseScrollCondition(MouseDataBuilder.Direction direction, int duration, } if (currentScrolling >= duration) { this.onSuccess.run(); - this.reset(); } } @@ -70,7 +70,6 @@ public MouseScrollCondition(MouseDataBuilder.Direction direction, int duration, // Time out if (timer > timeout && timeout > -1) { this.onFailure.run(); - reset(); } // Fail because wrong direction. Works when we need a specific direction for a certain amount of ticks. @@ -78,7 +77,6 @@ public MouseScrollCondition(MouseDataBuilder.Direction direction, int duration, if (maxScrollTotal == 0) { if (currentScrollDelta != direction.getDirection()) { this.onFailure.run(); - this.reset(); } } } @@ -98,4 +96,26 @@ public void unregister() { super.unregister(); MinecraftForge.EVENT_BUS.unregister(clientTicker); } + + @Override + public int hashCode() { + return Objects.hash(direction.getDirection(), duration, maxScrollTotal, timeout); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } else if (!(obj instanceof MouseScrollCondition other)) { + return false; + } else { +// System.out.println("this: stored in tree -> " + this); +// System.out.println("other: activeCondition from user input -> " + other); + return Objects.equals(direction.getDirection(), other.direction.getDirection()) && + /* Makes sure an alternative key condition that's been pressed has been pressed at least as long + * as the currently compared condition. */ + other.currentScrolling >= duration && other.maxScrollTotal == maxScrollTotal && timeout == other.timeout; + } + } + } From 54d8b4611cf0ad858e5c0f481656aa0375676d77 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 12 Oct 2024 02:51:17 +1100 Subject: [PATCH 334/469] compress and expand forms done Also fixed mouse scrolling --- .../magus/input/KeyboardMouseInputModule.java | 9 +++ .../forge/mouse/MouseScrollCondition.java | 80 +++++++++++-------- .../skill/test/avatar/AvatarFormRegistry.java | 8 +- 3 files changed, 61 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index b0d0fdb3..4724c4d9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -36,6 +36,7 @@ public class KeyboardMouseInputModule extends InputModule { private double mouseScrollDelta; private Form activeForm; private int timeout = 0; + private int scrollTimeout = 0; private boolean listen; private boolean checkForm = false; @@ -87,12 +88,20 @@ public KeyboardMouseInputModule() { }; this.mouseScrollListener = mouseScrollingEvent -> { + this.scrollTimeout = 0; // 1.0 = away from player, -1 = towards player this.mouseScrollDelta = mouseScrollingEvent.getScrollDelta(); + }; this.tickEventConsumer = tickEvent -> { ticksSinceModifiersSent++; + scrollTimeout++; + + // Resets mouse scrolling delta + if (scrollTimeout >= tickActivationThreshold) + this.mouseScrollDelta = 0; + if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { sendModifierData(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java index bc3c12f8..69b04710 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/mouse/MouseScrollCondition.java @@ -7,6 +7,7 @@ import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; +import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -27,6 +28,7 @@ public class MouseScrollCondition extends Condition { private double currentScrollDelta; private MouseDataBuilder.Direction direction; private Consumer clientTicker; + private boolean started; public MouseScrollCondition(MouseDataBuilder.Direction direction, int duration, float total, int timeout) { this.direction = direction; @@ -34,57 +36,70 @@ public MouseScrollCondition(MouseDataBuilder.Direction direction, int duration, this.maxScrollTotal = total; this.timeout = timeout; this.timer = 0; + this.started = false; this.clientTicker = tickEvent -> { - currentScrollDelta = ((KeyboardMouseInputModule) Magus.keyboardMouseInputModule).getMouseScrollDelta(); - currentScrollTotal += ((KeyboardMouseInputModule) Magus.keyboardMouseInputModule).getMouseScrollDelta(); - - - // Any instant of the required direction being fulfilled - if (duration < 0) { - if (total != 0) { - // If the current total is equal to the max total... - if (currentScrollTotal == maxScrollTotal) { - this.onSuccess.run(); + if (tickEvent.phase == TickEvent.ClientTickEvent.Phase.START && Minecraft.getInstance().getOverlay() == null) { + currentScrollDelta = ((KeyboardMouseInputModule) Magus.keyboardMouseInputModule).getMouseScrollDelta(); + currentScrollTotal += ((KeyboardMouseInputModule) Magus.keyboardMouseInputModule).getMouseScrollDelta(); + + // Wait until the player touches the mouse. + if (currentScrollDelta != 0) + started = true; + + + // Any instant of the required direction being fulfilled + if (duration < 0) { + if (total != 0) { + // If the current total is equal to the max total... + if (currentScrollTotal == maxScrollTotal) { + this.onSuccess.run(); + } + } else { + if (this.direction.getDirection() == (int) currentScrollDelta) { + this.onSuccess.run(); + } } } + + // Otherwise, we need to track over the duration else { - if (this.direction.getDirection() == (int) currentScrollDelta) { + if (currentScrollDelta == direction.getDirection()) { + currentScrolling++; + } + if (currentScrolling >= duration) { this.onSuccess.run(); } } - } - // Otherwise, we need to track over the duration - else { - if (currentScrollDelta == direction.getDirection()) { - currentScrolling++; - } - if (currentScrolling >= duration) { - this.onSuccess.run(); + // Fail because wrong direction. Works when we need a specific direction for a certain amount of ticks. + if (duration > -1) { + if (maxScrollTotal == 0) { + if (currentScrollDelta != direction.getDirection()) { + this.onFailure.run(); + } + } } - } + timer++; + } // Time out - if (timer > timeout && timeout > -1) { + if (started && timer > timeout && timeout > -1) { this.onFailure.run(); } - - // Fail because wrong direction. Works when we need a specific direction for a certain amount of ticks. - if (duration > -1) { - if (maxScrollTotal == 0) { - if (currentScrollDelta != direction.getDirection()) { - this.onFailure.run(); - } - } - } - - timer++; }; } + @Override + public void reset() { + this.currentScrolling = 0; + this.currentScrollDelta = 0; + this.currentScrollTotal = 0; + this.timer = 0; + } + @Override public void register() { super.register(); @@ -93,7 +108,6 @@ public void register() { @Override public void unregister() { - super.unregister(); MinecraftForge.EVENT_BUS.unregister(clientTicker); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 079640e5..6a42eade 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.radix.builders.InputPathBuilder; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.InputDataBuilder; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyDataBuilder; @@ -22,10 +23,9 @@ public static void registerForms() { KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0); KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0); KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0); - KeyInput held = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 20); KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 16); - MouseWheelInput forwards = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.FORWARDS, 1); - MouseWheelInput back = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.BACK, 1); + MouseWheelInput forwards = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.FORWARDS, 2); + MouseWheelInput back = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.BACK, 2); // TODO: Rather than having "push", "pull", "raise", and "lower" as Forms, @@ -35,6 +35,8 @@ public static void registerForms() { FormDataRegistry.registerForm(InputDataBuilder.toInputs(left), Forms.STRIKE, RadixTree.InputType.KEYBOARD_MOUSE); FormDataRegistry.registerForm(InputDataBuilder.toInputs(right), Forms.FORCE, RadixTree.InputType.KEYBOARD_MOUSE); FormDataRegistry.registerForm(InputDataBuilder.toInputs(KeyDataBuilder.createMultiInput(left, right)), Forms.BURST, RadixTree.InputType.KEYBOARD_MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(forwards), Forms.EXPAND, RadixTree.InputType.KEYBOARD_MOUSE); + FormDataRegistry.registerForm(InputDataBuilder.toInputs(back), Forms.COMPRESS, RadixTree.InputType.KEYBOARD_MOUSE); /* Mouse Motion Forms */ // TODO: Figure out a way to pass a condition that specifies when to track data for this Form and other mouse motion Forms. From 05bd891f8e146ced4cc4b1f7b47f2084ce6ee002 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 12 Oct 2024 02:55:50 +1100 Subject: [PATCH 335/469] Fixed multi inputs for key held modifier --- .../listeners/KeyHeldModifierListener.java | 20 ++++++++++++++----- .../MouseScrollModifierListener.java | 4 ++++ 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 3648b880..d322b971 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -16,6 +16,7 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; +import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; @@ -53,17 +54,19 @@ public void setupListener(CompoundTag compoundTag) { List formInputs = FormDataRegistry.getInputsForForm(formToModify, type); InputData lastInput = formInputs.get(formInputs.size() - 1); - int key; + List keyCodes = new ArrayList<>(); if (lastInput instanceof ChainedKeyInput) { - key = ((ChainedKeyInput) lastInput).trueLast().key().getValue(); + keyCodes.add(((ChainedKeyInput) lastInput).trueLast().key().getValue()); } + /// I need to fix multi :( else if (lastInput instanceof MultiKeyInput) { - key = ((MultiKeyInput) lastInput).last().key().getValue(); + for (KeyInput key: ((MultiKeyInput) lastInput).keys()) + keyCodes.add(key.key().getValue()); } else { // If it's registered to the keyboard mouse input module, it's going to be some variant // of KeyInput. - key = ((KeyInput) lastInput).key().getValue(); + keyCodes.add(((KeyInput) lastInput).key().getValue()); } InputModule module = Magus.keyboardMouseInputModule; @@ -75,7 +78,14 @@ else if (lastInput instanceof MultiKeyInput) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - if (module.keyPressed(key)) { + boolean pressed = true; + for (int key : keyCodes) { + if (!module.keyPressed(key)) { + pressed = false; + break; + } + } + if (pressed) { this.isHeld = true; this.currentHolding++; } else { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java new file mode 100644 index 00000000..42af1d5d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java @@ -0,0 +1,4 @@ +package com.amuzil.omegasource.magus.skill.modifiers.listeners; + +public class MouseScrollModifierListener { +} From 1ffb88e8e563b78b7e26dff5c0ab1fc4e0e32eb6 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 14 Oct 2024 03:18:47 +1100 Subject: [PATCH 336/469] mouse scroll modifier data --- .../magus/input/KeyboardMouseInputModule.java | 10 +++- .../skill/modifiers/ModifiersRegistry.java | 12 ++-- .../data/MouseScrollModifierData.java | 58 +++++++++++++++++++ .../listeners/KeyHeldModifierListener.java | 6 +- .../MouseScrollModifierListener.java | 36 +++++++++++- 5 files changed, 112 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 4724c4d9..159f4055 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -17,7 +17,8 @@ import net.minecraftforge.eventbus.api.EventPriority; import org.apache.logging.log4j.LogManager; -import java.util.*; +import java.util.ArrayList; +import java.util.List; import java.util.function.Consumer; @@ -73,7 +74,7 @@ public KeyboardMouseInputModule() { this.mouseListener = mouseEvent -> { int keyPressed = mouseEvent.getButton(); switch (mouseEvent.getAction()) { - case InputConstants.PRESS-> { + case InputConstants.PRESS -> { if (!glfwKeysDown.contains(keyPressed)) { glfwKeysDown.add(keyPressed); } @@ -120,13 +121,16 @@ public KeyboardMouseInputModule() { if (activeForm != null && activeForm.name() != null) { ticksSinceActivated++; if (ticksSinceActivated >= tickActivationThreshold) { + // Always to send modifier data right when the form is activated + sendModifierData(); // if (lastActivatedForm != null && lastActivatedForm.name().equals(activeForm.name())) { -// // Send modifier data of it being held and/or multi. +// // Send modifier data of it being multi. // } // else { // // Send packet // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); // } + lastActivatedForm = activeForm; Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); activeForm = null; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index cfd63f0d..440512a6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -3,10 +3,7 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.*; -import com.amuzil.omegasource.magus.skill.modifiers.listeners.DirectionModifierListener; -import com.amuzil.omegasource.magus.skill.modifiers.listeners.GestureModifierListener; -import com.amuzil.omegasource.magus.skill.modifiers.listeners.KeyHeldModifierListener; -import com.amuzil.omegasource.magus.skill.modifiers.listeners.TargetModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.listeners.*; import net.minecraft.nbt.CompoundTag; import java.util.HashMap; @@ -23,6 +20,8 @@ public class ModifiersRegistry { public static Modifier TARGET; public static Modifier GESTURE; + public static Modifier CONTROL; + public static void init() { modifierDataTypes = new HashMap<>(); @@ -45,6 +44,11 @@ public static void init() { ModifierData gestureModifierData = new GestureModifierData(); GESTURE = new Modifier(gestureModifierData, new GestureModifierListener()); modifierDataTypes.put(gestureModifierData.getName(), GESTURE); + + ModifierData scrollModifierData = new MouseScrollModifierData(); + CONTROL = new Modifier(scrollModifierData, new MouseScrollModifierListener()); + modifierDataTypes.put(scrollModifierData.getName(), CONTROL); + } public static ModifierData fromCompoundTag(CompoundTag compoundTag) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java new file mode 100644 index 00000000..14c532ea --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java @@ -0,0 +1,58 @@ +package com.amuzil.omegasource.magus.skill.modifiers.data; + +import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.listeners.MouseScrollModifierListener; +import net.minecraft.nbt.CompoundTag; +import org.apache.logging.log4j.LogManager; + +public class MouseScrollModifierData extends BaseModifierData { + private float totalScrollDelta; + + + public MouseScrollModifierData(float totalScrollDelta) { + this.totalScrollDelta = totalScrollDelta; + } + + public MouseScrollModifierData() { + this(0); + } + + @Override + protected void mergeFields(ModifierData modifierData) { + MouseScrollModifierData scrollData = (MouseScrollModifierData) modifierData; + this.totalScrollDelta += scrollData.totalScrollDelta; + } + + @Override + public void print() { + LogManager.getLogger().info("Total Mouse Scroll Delta: " + totalScrollDelta); + } + + @Override + public void reset() { + this.totalScrollDelta = 0; + } + + @Override + public ModifierData copy() { + return new MouseScrollModifierData(); + } + + @Override + public String getName() { + return "MouseScrollModifier"; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + this.totalScrollDelta = nbt.getFloat("total_scroll_delta"); + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = super.serializeNBT(); + tag.putFloat("total_scroll_delta", totalScrollDelta); + return tag; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index d322b971..d8b0219e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -56,11 +56,12 @@ public void setupListener(CompoundTag compoundTag) { InputData lastInput = formInputs.get(formInputs.size() - 1); List keyCodes = new ArrayList<>(); if (lastInput instanceof ChainedKeyInput) { - keyCodes.add(((ChainedKeyInput) lastInput).trueLast().key().getValue()); + for (KeyInput key : ((ChainedKeyInput) lastInput).last().keys()) + keyCodes.add(key.key().getValue()); } /// I need to fix multi :( else if (lastInput instanceof MultiKeyInput) { - for (KeyInput key: ((MultiKeyInput) lastInput).keys()) + for (KeyInput key : ((MultiKeyInput) lastInput).keys()) keyCodes.add(key.key().getValue()); } else { @@ -79,6 +80,7 @@ else if (lastInput instanceof MultiKeyInput) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { boolean pressed = true; + // If all requisite keys aren't pressed, don't iterate modifier data for (int key : keyCodes) { if (!module.keyPressed(key)) { pressed = false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java index 42af1d5d..9188ad14 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java @@ -1,4 +1,38 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; -public class MouseScrollModifierListener { +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.data.MouseScrollModifierData; +import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.event.TickEvent; + +import java.util.function.Consumer; + +public class MouseScrollModifierListener extends ModifierListener { + private float totalScrollDelta = 0; + KeyboardMouseInputModule inputModule = (KeyboardMouseInputModule) Magus.keyboardMouseInputModule; + + @Override + public void setupListener(CompoundTag compoundTag) { + + } + + @Override + public boolean shouldCollectModifierData(TickEvent event) { + return inputModule.getMouseScrollDelta() != 0; + } + + @Override + public ModifierData collectModifierDataFromEvent(TickEvent event) { + this.totalScrollDelta += inputModule.getMouseScrollDelta(); + MouseScrollModifierData data = new MouseScrollModifierData(totalScrollDelta); + return data; + } + + @Override + public ModifierListener copy() { + return new MouseScrollModifierListener(); + } } From dfe2cb7f7b948069cca68a277d3d91ae12a72d4b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Mon, 14 Oct 2024 03:38:32 +1100 Subject: [PATCH 337/469] Debugging; figured out why it wasn't working --- .../magus/input/KeyboardMouseInputModule.java | 7 +++++++ .../server_executed/SendModifierDataPacket.java | 1 - .../magus/skill/modifiers/api/ModifierListener.java | 3 ++- .../skill/modifiers/data/MouseScrollModifierData.java | 1 + .../listeners/MouseScrollModifierListener.java | 10 +++++----- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 159f4055..54785ee9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -8,6 +8,7 @@ import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; @@ -123,6 +124,7 @@ public KeyboardMouseInputModule() { if (ticksSinceActivated >= tickActivationThreshold) { // Always to send modifier data right when the form is activated sendModifierData(); + // if (lastActivatedForm != null && lastActivatedForm.name().equals(activeForm.name())) { // // Send modifier data of it being multi. // } @@ -167,6 +169,11 @@ private void checkForForm() { private void sendModifierData() { LogManager.getLogger().info("SENDING MODIFIER DATA"); + System.out.println("Modifier Listener Size: " + modifierListeners.size()); + System.out.println("Modifier Data Size: " + modifierQueue.size()); + for (ModifierData modData : modifierQueue.values()) + modData.print(); + synchronized (modifierQueue) { MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); ticksSinceModifiersSent = 0; diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java index 2100ffa0..9407256a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java @@ -9,7 +9,6 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; -import org.apache.logging.log4j.LogManager; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java index 53aa74ab..7cda3b57 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java @@ -3,6 +3,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.Event; +import net.minecraftforge.eventbus.api.EventPriority; import java.util.function.Consumer; @@ -12,7 +13,7 @@ public abstract class ModifierListener implements Consumer { protected ModifierData modifierData; public void register(Runnable onSuccess) { - MinecraftForge.EVENT_BUS.addListener(this); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, this); this.onSuccess = onSuccess; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java index 14c532ea..aeac9e06 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.modifiers.data; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.listeners.MouseScrollModifierListener; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java index 9188ad14..58eb2be6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java @@ -2,15 +2,14 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.MouseScrollModifierData; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.event.TickEvent; -import java.util.function.Consumer; - -public class MouseScrollModifierListener extends ModifierListener { +public class MouseScrollModifierListener extends ModifierListener { private float totalScrollDelta = 0; KeyboardMouseInputModule inputModule = (KeyboardMouseInputModule) Magus.keyboardMouseInputModule; @@ -20,12 +19,13 @@ public void setupListener(CompoundTag compoundTag) { } @Override - public boolean shouldCollectModifierData(TickEvent event) { + public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { + RadixUtil.getLogger().info("Mouse Scroll Listener:" + inputModule.getMouseScrollDelta()); return inputModule.getMouseScrollDelta() != 0; } @Override - public ModifierData collectModifierDataFromEvent(TickEvent event) { + public ModifierData collectModifierDataFromEvent(TickEvent.ClientTickEvent event) { this.totalScrollDelta += inputModule.getMouseScrollDelta(); MouseScrollModifierData data = new MouseScrollModifierData(totalScrollDelta); return data; From ae7b99d648f1d64e4d4525cb0a8887cc046765c4 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 14 Oct 2024 13:01:26 -0400 Subject: [PATCH 338/469] adjust spacing --- .../com/amuzil/omegasource/magus/Magus.java | 7 +- .../magus/radix/builders/InputConverter.java | 101 ++++++++---------- 2 files changed, 45 insertions(+), 63 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 3d0ef3ec..f97f101d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -70,7 +70,6 @@ public Magus() { Forms.init(); FormDataRegistry.init(); ModifiersRegistry.init(); - } private void setup(final FMLCommonSetupEvent event) { @@ -86,11 +85,9 @@ private void doClientStuff(final FMLClientSetupEvent event) { //todo call this anytime the key mappings are updated } - private void enqueueIMC(final InterModEnqueueEvent event) { - } + private void enqueueIMC(final InterModEnqueueEvent event) {} - private void processIMC(final InterModProcessEvent event) { - } + private void processIMC(final InterModProcessEvent event) {} // You can use SubscribeEvent and let the Event Bus discover methods to call @SubscribeEvent diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java index cb891e51..bf07f5e2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/InputConverter.java @@ -51,74 +51,59 @@ public class InputConverter { keyPress.register("key_press", keyPress::reset, keyPress::reset); conditions.add(keyPress); } - - return conditions; }); - registerBuilder(MultiKeyInput.class, - multiKeyInputs -> { - LinkedList multiConditions = new LinkedList<>(); - for (Object obj : (List) multiKeyInputs) { - MultiKeyInput permutation = (MultiKeyInput) obj; - // THis list isn't working. - List conditions = new LinkedList<>(); - for (KeyInput input : permutation.keys()) { - conditions.addAll(buildPathFrom(List.of(input))); - } - - //= new LinkedList<>(permutation.keys().stream().map(InputConverter::buildPathFrom) - //.collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - - // Create a MultiCondition from the flattened conditions - MultiClientCondition multiCondition = new MultiClientCondition(conditions); - multiCondition.register("multi_key_press", multiCondition::reset, multiCondition::reset); - multiConditions.add(multiCondition); - } - - // Return a list containing the MultiCondition - return multiConditions; + registerBuilder(MultiKeyInput.class, multiKeyInputs -> { + LinkedList multiConditions = new LinkedList<>(); + for (Object obj : (List) multiKeyInputs) { + MultiKeyInput permutation = (MultiKeyInput) obj; + // THis list isn't working. + List conditions = new LinkedList<>(); + for (KeyInput input : permutation.keys()) { + conditions.addAll(buildPathFrom(List.of(input))); } - ); - - registerBuilder(ChainedKeyInput.class, - chainedKeyInputs -> { - LinkedList chained = new LinkedList<>(); - for (Object obj : (List) chainedKeyInputs) { - ChainedKeyInput combination = (ChainedKeyInput) obj; - List conditions = new LinkedList<>(combination.keys().stream().map(InputConverter::buildPathFrom) - .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); - - chained.addAll(conditions); - } - // Return a list containing the ChainedCondition - return chained; - } - ); + //= new LinkedList<>(permutation.keys().stream().map(InputConverter::buildPathFrom) + //.collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + // Create a MultiCondition from the flattened conditions + MultiClientCondition multiCondition = new MultiClientCondition(conditions); + multiCondition.register("multi_key_press", multiCondition::reset, multiCondition::reset); + multiConditions.add(multiCondition); + } + // Return a list containing the MultiCondition + return multiConditions; + }); + + registerBuilder(ChainedKeyInput.class, chainedKeyInputs -> { + LinkedList chained = new LinkedList<>(); + for (Object obj : (List) chainedKeyInputs) { + ChainedKeyInput combination = (ChainedKeyInput) obj; + List conditions = new LinkedList<>(combination.keys().stream().map(InputConverter::buildPathFrom) + .collect(LinkedList::new, LinkedList::addAll, LinkedList::addAll)); + + chained.addAll(conditions); + } + // Return a list containing the ChainedCondition + return chained; + }); /* Mouse */ // registerBuilder(MouseInput.class, // mouseInput -> ); - registerBuilder(MouseWheelInput.class, - mouseWheelInputs -> { - - LinkedList conditions = new LinkedList<>(); - if (mouseWheelInputs instanceof List) { - for (Object obj : (List) mouseWheelInputs) { - MouseWheelInput input = (MouseWheelInput) obj; - MouseScrollCondition scroll = new MouseScrollCondition(input.direction(), input.duration(), input.totalChange(), - input.timeout()); - scroll.register("mouse_scroll", scroll::reset, scroll::reset); - conditions.add(scroll); - } - } - - - return conditions; - + registerBuilder(MouseWheelInput.class, mouseWheelInputs -> { + LinkedList conditions = new LinkedList<>(); + if (mouseWheelInputs instanceof List) { + for (Object obj : (List) mouseWheelInputs) { + MouseWheelInput input = (MouseWheelInput) obj; + MouseScrollCondition scroll = new MouseScrollCondition(input.direction(), input.duration(), input.totalChange(), + input.timeout()); + scroll.register("mouse_scroll", scroll::reset, scroll::reset); + conditions.add(scroll); } - ); + } + return conditions; + }); } @SuppressWarnings("unchecked") From 06ef13664f54703283eb080b9269e4204a31f360 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 14 Oct 2024 13:26:58 -0400 Subject: [PATCH 339/469] upgrade forge version to recommended latest upgrade gradle --- build.gradle | 197 ++++++++++++----------- gradle.properties | 57 ++++++- gradle/wrapper/gradle-wrapper.jar | Bin 60756 -> 62076 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 19 ++- gradlew.bat | 1 + settings.gradle | 13 ++ src/main/resources/META-INF/mods.toml | 62 +++---- 8 files changed, 220 insertions(+), 132 deletions(-) create mode 100644 settings.gradle diff --git a/build.gradle b/build.gradle index 11463483..0d01a7c4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,26 +1,16 @@ -buildscript { - repositories { - // These repositories are only for Gradle plugins, put any other repositories in the repository block further below - maven { url = 'https://maven.minecraftforge.net' } - mavenCentral() - maven { url "https://plugins.gradle.org/m2/" } - - } - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true - } +plugins { + id 'eclipse' + id 'idea' + id 'maven-publish' + id 'net.minecraftforge.gradle' version '[6.0,6.2)' } -// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. -plugins { - //In case people use the inferior IDE - id ('eclipse') - id ('maven-publish') +version = mod_version +group = mod_group_id + +base { + archivesName = mod_id } -apply plugin: 'net.minecraftforge.gradle' -version = '1.0' -group = 'com.amuzil.omegasource' // http://maven.apache.org/guides/mini/guide-naming-conventions.html -archivesBaseName = 'magus' // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) @@ -36,18 +26,40 @@ minecraft { // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md // // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge - // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started + // Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. - mappings channel: 'official', version: '1.19.4' - - // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. + mappings channel: mapping_channel, version: mapping_version + + // When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game. + // In most cases, it is not necessary to enable. + // enableEclipsePrepareRuns = true + // enableIdeaPrepareRuns = true + + // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game. + // It is REQUIRED to be set to true for this template to function. + // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html + copyIdeResources = true + + // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations. + // The folder name can be set on a run configuration using the "folderName" property. + // By default, the folder name of a run configuration is the name of the Gradle project containing it. + // generateRunFolders = true + + // This property enables access transformers for use in development. + // They will be applied to the Minecraft artifact. + // The access transformer file can be anywhere in the project. + // However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge. + // This default location is a best practice to automatically put the file in the right place in the final jar. + // See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information. + // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. // These can be tweaked, removed, or duplicated as needed. runs { - client { + // applies to all the run configs below + configureEach { workingDirectory project.file('run') // Recommended logging data for a userdev environment @@ -63,65 +75,38 @@ minecraft { property 'forge.logging.console.level', 'debug' // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. - property 'forge.enabledGameTestNamespaces', 'magus' + property 'forge.enabledGameTestNamespaces', mod_id mods { - magus { + "${mod_id}" { source sourceSets.main } } } - server { - workingDirectory project.file('run') - - property 'forge.logging.markers', 'REGISTRIES' - - property 'forge.logging.console.level', 'debug' - - property 'forge.enabledGameTestNamespaces', 'magus' + client { + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', mod_id + } - mods { - magus { - source sourceSets.main - } - } + server { + property 'forge.enabledGameTestNamespaces', mod_id + args '--nogui' } // This run config launches GameTestServer and runs all registered gametests, then exits. // By default, the server will crash when no gametests are provided. // The gametest system is also enabled by default for other run configs under the /test command. gameTestServer { - workingDirectory project.file('run') - - property 'forge.logging.markers', 'REGISTRIES' - - property 'forge.logging.console.level', 'debug' - - property 'forge.enabledGameTestNamespaces', 'magus' - - mods { - magus { - source sourceSets.main - } - } + property 'forge.enabledGameTestNamespaces', mod_id } data { - workingDirectory project.file('run') - - property 'forge.logging.markers', 'REGISTRIES' - - property 'forge.logging.console.level', 'debug' + // example of overriding the workingDirectory set in configureEach above + workingDirectory project.file('run-data') // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. - args '--mod', 'magus', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') - - mods { - magus { - source sourceSets.main - } - } + args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } @@ -133,55 +118,83 @@ repositories { // Put repositories for dependencies here // ForgeGradle automatically adds the Forge maven and Maven Central for you - // If you have mod jar dependencies in ./libs, you can declare them as a repository like so: + // If you have mod jar dependencies in ./libs, you can declare them as a repository like so. + // See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver // flatDir { // dir 'libs' // } } dependencies { - // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed - // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied. - // The userdev artifact is a special name and will get all sorts of transformations applied to it. - minecraft 'net.minecraftforge:forge:1.19.4-45.1.0' - - // Real mod deobf dependency examples - these get remapped to your current mappings - // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency - // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency - // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency - - // Examples using mod jars from ./libs + // Specify the version of Minecraft to use. + // Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact. + // The "userdev" classifier will be requested and setup by ForgeGradle. + // If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"], + // then special handling is done to allow a setup of a vanilla dependency without the use of an external repository. + minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" + + // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings + // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime + // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") + // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}") + // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}") + + // Example mod dependency using a mod jar from ./libs with a flat dir repository + // This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar + // The group id is ignored when searching -- in this case, it is "blank" // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}") - // For more info... + // For more info: // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } +// This block of code expands all declared replace properties in the specified resource targets. +// A missing property will result in an error. Properties are expanded using ${} Groovy notation. +// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments. +// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html +tasks.named('processResources', ProcessResources).configure { + var replaceProperties = [ + minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range, + forge_version: forge_version, forge_version_range: forge_version_range, + loader_version_range: loader_version_range, + mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version, + mod_authors: mod_authors, mod_description: mod_description, + ] + inputs.properties replaceProperties + + filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { + expand replaceProperties + [project: project] + } +} + // Example for how to get properties into the manifest for reading at runtime. -jar { +tasks.named('jar', Jar).configure { manifest { attributes([ - "Specification-Title" : "magus", - "Specification-Vendor" : "Omega Source", - "Specification-Version" : "1", // We are version 1 of ourselves - "Implementation-Title" : project.name, - "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "omegasource", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + 'Specification-Title' : mod_id, + 'Specification-Vendor' : "Omega Source", + 'Specification-Version' : '1', // We are version 1 of ourselves + 'Implementation-Title' : project.name, + 'Implementation-Version' : project.jar.archiveVersion, + 'Implementation-Vendor' : "omegasource", + 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } + + // This is the preferred method to reobfuscate your jar file + finalizedBy 'reobfJar' } -// Example configuration to allow publishing using the maven-publish plugin -// This is the preferred method to reobfuscate your jar file -jar.finalizedBy('reobfJar') -// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing -// publish.dependsOn('reobfJar') +// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing: +// tasks.named('publish').configure { +// dependsOn 'reobfJar' +// } +// Example configuration to allow publishing using the maven-publish plugin publishing { publications { - mavenJava(MavenPublication) { + register('mavenJava', MavenPublication) { artifact jar } } diff --git a/gradle.properties b/gradle.properties index 878bf1f7..48418e38 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,59 @@ # Sets default memory used for gradle commands. Can be overridden by user or command line properties. # This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs=-Xmx3G -org.gradle.daemon=false \ No newline at end of file +org.gradle.daemon=false + + +## Environment Properties + +# The Minecraft version must agree with the Forge version to get a valid artifact +minecraft_version=1.19.4 +# The Minecraft version range can use any release version of Minecraft as bounds. +# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly +# as they do not follow standard versioning conventions. +minecraft_version_range=[1.19.4,1.20) +# The Forge version must agree with the Minecraft version to get a valid artifact +forge_version=45.3.7 +# The Forge version range can use any version of Forge as bounds or match the loader version range +forge_version_range=[45,) +# The loader version range can only use the major version of Forge/FML as bounds +loader_version_range=[45,) +# The mapping channel to use for mappings. +# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"]. +# Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin. +# +# | Channel | Version | | +# |-----------|----------------------|--------------------------------------------------------------------------------| +# | official | MCVersion | Official field/method names from Mojang mapping files | +# | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official | +# +# You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. +# See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md +# +# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge. +# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started +mapping_channel=official +# The mapping version to query from the mapping channel. +# This must match the format required by the mapping channel. +mapping_version=1.19.4 + + +## Mod Properties + +# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63} +# Must match the String constant located in the main mod class annotated with @Mod. +mod_id=magus +# The human-readable display name for the mod. +mod_name=Magus +# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. +mod_license=All Rights Reserved +# The mod version. See https://semver.org/ +mod_version=1.0.0 +# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. +# This should match the base package used for the mod sources. +# See https://maven.apache.org/guides/mini/guide-naming-conventions.html +mod_group_id=com.amuzil.omegasource +# The authors of the mod. This is a simple text string that is used for display purposes in the mod list. +mod_authors=FavouriteDragon, Caliburs, AidanDavis99, Mahtaran +# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list. +mod_description=Skill API part of Magus. \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e5832f090a2944b7473328c07c9755baa3196..c1962a79e29d3e0ab67b14947c167a862655af9b 100644 GIT binary patch delta 39834 zcmY(qV{|1@vn?9iwrv|7+qP{xJ5I+=$F`jv+ji1XM;+U~ea?CBp8Ne-wZ>TWb5_k- zRW+A?gMS=?Ln_OGLtrEoU?$j+Jtg0hJQDi3-TohW5u_A^b9Act5-!5t~)TlFb=zVn=`t z9)^XDzg&l+L`qLt4olX*h+!l<%~_&Vw6>AM&UIe^bzcH_^nRaxG56Ee#O9PxC z4a@!??RT zo4;dqbZam)(h|V!|2u;cvr6(c-P?g0}dxtQKZt;3GPM9 zb3C?9mvu{uNjxfbxF&U!oHPX_Mh66L6&ImBPkxp}C+u}czdQFuL*KYy=J!)$3RL`2 zqtm^$!Q|d&5A@eW6F3|jf)k<^7G_57E7(W%Z-g@%EQTXW$uLT1fc=8&rTbN1`NG#* zxS#!!9^zE}^AA5*OxN3QKC)aXWJ&(_c+cmnbAjJ}1%2gSeLqNCa|3mqqRs&md+8Mp zBgsSj5P#dVCsJ#vFU5QX9ALs^$NBl*H+{)+33-JcbyBO5p4^{~3#Q-;D8(`P%_cH> zD}cDevkaj zWb`w02`yhKPM;9tw=AI$|IsMFboCRp-Bi6@6-rq1_?#Cfp|vGDDlCs6d6dZ6dA!1P zUOtbCT&AHlgT$B10zV3zSH%b6clr3Z7^~DJ&cQM1ViJ3*l+?p-byPh-=Xfi#!`MFK zlCw?u)HzAoB^P>2Gnpe2vYf>)9|_WZg5)|X_)`HhgffSe7rX8oWNgz3@e*Oh;fSSl zCIvL>tl%0!;#qdhBR4nDK-C;_BQX0=Xg$ zbMtfdrHf$N8H?ft=h8%>;*={PQS0MC%KL*#`8bBZlChij69=7&$8*k4%Sl{L+p=1b zq1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Subject: [PATCH 340/469] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 48418e38..cf69738d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ minecraft_version=1.19.4 # as they do not follow standard versioning conventions. minecraft_version_range=[1.19.4,1.20) # The Forge version must agree with the Minecraft version to get a valid artifact -forge_version=45.3.7 +forge_version=45.3.0 # The Forge version range can use any version of Forge as bounds or match the loader version range forge_version_range=[45,) # The loader version range can only use the major version of Forge/FML as bounds From 479e34792b35e2917086275e9db2d25f0c9f1aa9 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 14 Oct 2024 19:38:50 -0400 Subject: [PATCH 341/469] add photon dependencies --- build.gradle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 0d01a7c4..7460122b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,9 @@ plugins { id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' + id 'org.spongepowered.mixin' version '0.7.+' } - +apply plugin: 'org.spongepowered.mixin' version = mod_version group = mod_group_id @@ -117,7 +118,7 @@ sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { // Put repositories for dependencies here // ForgeGradle automatically adds the Forge maven and Maven Central for you - + maven { url = "https://maven.firstdarkdev.xyz/snapshots" } // LDLib, Photon // If you have mod jar dependencies in ./libs, you can declare them as a repository like so. // See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver // flatDir { @@ -132,7 +133,8 @@ dependencies { // If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"], // then special handling is done to allow a setup of a vanilla dependency without the use of an external repository. minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" - + implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.19.4:1.0.5") { transitive = false } + implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.19.4:1.0.14.a") { transitive = false } // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") From 550a3aab5055e623044b6cd87b32b9eb3bd29051 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 15 Oct 2024 12:56:00 +1100 Subject: [PATCH 342/469] Fixed crashing with race conditions!! --- .../com/amuzil/omegasource/magus/Magus.java | 20 ++-- .../omegasource/magus/input/InputModule.java | 9 +- .../magus/input/KeyboardMouseInputModule.java | 91 +++++++++++-------- .../magus/input/MouseMotionModule.java | 2 +- .../amuzil/omegasource/magus/radix/Node.java | 4 +- .../omegasource/magus/radix/RadixTree.java | 11 +++ .../magus/radix/condition/MultiCondition.java | 4 +- .../omegasource/magus/skill/forms/Forms.java | 2 + .../listeners/DirectionModifierListener.java | 1 + 9 files changed, 91 insertions(+), 53 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 3d0ef3ec..f1004282 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -128,11 +128,19 @@ public static void onClientSetup(FMLClientSetupEvent event) { // Send a message to in-game chat public static void sendDebugMsg(String msg) { - LocalPlayer player = Minecraft.getInstance().player; - Component text = Component.literal(msg); - if (player != null) - player.sendSystemMessage(text); - else - System.err.println("sendDebugMsg failed: player is null"); + Minecraft minecraft = Minecraft.getInstance(); + if (minecraft == null) { + System.err.println("sendDebugMsg failed: Minecraft instance is null"); + return; + } + minecraft.execute(() -> { + LocalPlayer player = minecraft.player; + if (player != null) { + Component text = Component.literal(msg); + player.sendSystemMessage(text); + } else { + System.err.println("sendDebugMsg failed: player is null"); + } + }); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index f81a6bf8..60c7ba49 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -8,6 +8,7 @@ import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.mojang.blaze3d.platform.InputConstants; @@ -16,20 +17,22 @@ import net.minecraft.nbt.CompoundTag; import net.minecraftforge.client.event.InputEvent; import org.apache.logging.log4j.LogManager; +import org.checkerframework.checker.units.qual.A; import java.util.*; +import java.util.concurrent.atomic.AtomicReference; public abstract class InputModule { protected static RadixTree formsTree = new RadixTree(); - protected static LinkedList activeConditions = new LinkedList<>(); + protected final List activeConditions = Collections.synchronizedList(new LinkedList<>()); protected static LinkedList activeForms = new LinkedList<>(); protected static final List activeFormInputs = new ArrayList<>(); protected static final Map movementKeys = new HashMap<>(); protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); protected final Map modifierQueue = new HashMap<>(); - protected Form lastActivatedForm = null; + protected AtomicReference lastActivatedForm = new AtomicReference<>(Forms.NULL); public abstract void registerInputData(List formExecutionInputs, Form formToExecute, List conditions); @@ -88,7 +91,7 @@ public void resetLastActivated() { } public Form getLastActivatedForm() { - return this.lastActivatedForm; + return this.lastActivatedForm.get(); } public List getActiveConditions() { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 54785ee9..019c9b7a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -8,6 +8,7 @@ import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; @@ -20,6 +21,8 @@ import java.util.ArrayList; import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; @@ -32,12 +35,14 @@ public class KeyboardMouseInputModule extends InputModule { private final int tickActivationThreshold = 15; private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; - private int ticksSinceActivated = 0; + // Maybe? + private final Object lock = new Object(); + private final AtomicInteger ticksSinceActivated = new AtomicInteger(0); + private final AtomicReference activeForm = new AtomicReference<>(Forms.NULL); + private final AtomicInteger timeout = new AtomicInteger(0); private int ticksSinceModifiersSent = 0; private List glfwKeysDown; private double mouseScrollDelta; - private Form activeForm; - private int timeout = 0; private int scrollTimeout = 0; private boolean listen; private boolean checkForm = false; @@ -101,8 +106,7 @@ public KeyboardMouseInputModule() { scrollTimeout++; // Resets mouse scrolling delta - if (scrollTimeout >= tickActivationThreshold) - this.mouseScrollDelta = 0; + if (scrollTimeout >= tickActivationThreshold) this.mouseScrollDelta = 0; if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { sendModifierData(); @@ -116,12 +120,12 @@ public KeyboardMouseInputModule() { } // Check every couple of ticks - if (timeout % 5 == 0) - checkForForm(); + if (timeout.get() % 5 == 0) checkForForm(); + - if (activeForm != null && activeForm.name() != null) { - ticksSinceActivated++; - if (ticksSinceActivated >= tickActivationThreshold) { + if (activeForm.get() != null && !activeForm.get().name().equals("null")) { + ticksSinceActivated.getAndIncrement(); + if (ticksSinceActivated.get() >= tickActivationThreshold) { // Always to send modifier data right when the form is activated sendModifierData(); @@ -133,36 +137,42 @@ public KeyboardMouseInputModule() { // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); // } - lastActivatedForm = activeForm; - Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.name()); - activeForm = null; - ticksSinceActivated = 0; - timeout = 0; + lastActivatedForm.set(activeForm.get()); + // Extra check for race conditions. Probably wont' help... + synchronized (lastActivatedForm.get()) { + if (!lastActivatedForm.get().name().equals("null")) + Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); + } + activeForm.set(Forms.NULL); + ticksSinceActivated.set(0); + timeout.set(0); resetTreeConditions(); } } else { - timeout++; - if (timeout > tickTimeoutThreshold) { + timeout.getAndIncrement(); + if (timeout.get() > tickTimeoutThreshold) { resetTreeConditions(); // Timed out enough where multi is no longer valid. - lastActivatedForm = null; - timeout = 0; + lastActivatedForm.set(Forms.NULL); + timeout.set(0); } } }; } private void checkForForm() { - if (!activeConditions.isEmpty()) { - List conditions = activeConditions.stream().toList(); - List recognized = formsTree.search(conditions); + synchronized (activeConditions) { + if (!activeConditions.isEmpty()) { + List conditions = activeConditions.stream().toList(); + List recognized = formsTree.search(conditions); // System.out.println("activeConditions: " + conditions); // System.out.println("recognized: " + recognized); - if (recognized != null) { - activeForm = FormDataRegistry.formsNamespace.get(recognized.hashCode()); + if (recognized != null) { + activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); // System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); // Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); + } } } } @@ -196,8 +206,7 @@ public void cleanMCKeys() { } @Override - public void registerInputData(List formExecutionInputs, - Form formToExecute, List formConditions) { + public void registerInputData(List formExecutionInputs, Form formToExecute, List formConditions) { ConditionPath path = formToExecute.createPath(formConditions); System.out.println("Inserting " + formToExecute.name().toUpperCase() + " into tree with Conditions: " + formConditions + " | Inputs: " + formExecutionInputs); formsTree.insert(path.conditions); @@ -218,25 +227,27 @@ public void registerRunnables(Node current) { Runnable originalSuccess = condition.onSuccess(); Runnable onSuccess = () -> { - if (!activeConditions.contains(condition)) { - activeConditions.add(condition); - condition.unregister(); // unregister parent to give child nodes a shot to be heard - if (nextCondition != null) - nextCondition.register(); // register next condition in the path if it exists - List childConditions = branch.next.branches.keySet().stream().toList(); - RadixTree.registerConditions(childConditions); // register any next of kin children if they exist + synchronized (activeConditions) { + if (!activeConditions.contains(condition)) { + activeConditions.add(condition); + condition.unregister(); // unregister parent to give child nodes a shot to be heard + if (nextCondition != null) + nextCondition.register(); // register next condition in the path if it exists + List childConditions = branch.next.branches.keySet().stream().toList(); + RadixTree.registerConditions(childConditions); // register any next of kin children if they exist + } + this.timeout.set(0); + if (originalSuccess != null) originalSuccess.run(); } - this.timeout = 0; - if (originalSuccess != null) - originalSuccess.run(); }; Runnable originalFailure = condition.onFailure(); Runnable onFailure = () -> { - activeConditions.remove(condition); - condition.reset(); - if (originalFailure != null) - originalFailure.run(); + synchronized (activeConditions) { + activeConditions.remove(condition); + condition.reset(); + if (originalFailure != null) originalFailure.run(); + } }; condition.register(condition.name(), onSuccess, onFailure); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index 47b81223..9113c0cd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -75,7 +75,7 @@ public MouseMotionModule() { // else // LogManager.getLogger().info("FORM ACTIVATED: " + activeForm.name()); // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); - lastActivatedForm = activeForm; + lastActivatedForm.set(activeForm); activeForm = new Form(); ticksSinceActivated = 0; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index c3ea609e..aa1788db 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.mojang.datafixers.util.Pair; @@ -67,7 +68,6 @@ public Node (boolean isComplete) { this.branches = new HashMap<>(); this.isComplete = isComplete; } - public RadixBranch getTransition(Condition transitionCondition) { return branches.get(transitionCondition); } @@ -136,6 +136,8 @@ public void registerModifierListeners(Discipline activeDiscipline, ServerPlayer List modifierTypes = new ArrayList<>(); List modifiers = getModifiers(); + Modifier modifier = ModifiersRegistry.CONTROL; + synchronized (modifiers) { modifiers.stream() .filter(modifierData -> !modifierData.serversideOnly()) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 998c8dd7..7d44d63b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.radix.condition.MultiClientCondition; import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; import net.minecraft.server.level.ServerPlayer; @@ -165,6 +166,16 @@ public void insert(List conditions) { List suffix = currentBranch.path.conditions.subList(currCondition.size() - 1, currCondition.size()); currentBranch.path.conditions = currCondition; Node newNext = new Node(true); + + // Add modifiers for all available types... + newNext.addModifierData(ModifiersRegistry.DIRECTION.data()); + newNext.addModifierData(ModifiersRegistry.MULTI.data()); + newNext.addModifierData(ModifiersRegistry.FOCUS.data()); + newNext.addModifierData(ModifiersRegistry.TARGET.data()); + newNext.addModifierData(ModifiersRegistry.CONTROL.data()); + newNext.addModifierData(ModifiersRegistry.GESTURE.data()); + + Node afterNewNext = currentBranch.next; currentBranch.next = newNext; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java index 6a86bc5e..8d82af93 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiCondition.java @@ -20,6 +20,8 @@ public class MultiCondition extends Condition { protected int executionTime = 0; protected boolean startedExecuting = false; + private final Object lock = new Object(); + public MultiCondition(List concurrentConditions) { this.concurrentConditions = concurrentConditions; this.registerEntry(); @@ -54,8 +56,6 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { executionTime++; if (executionTime > TIMEOUT_IN_TICKS) { this.onFailure.run(); - - LogManager.getLogger().info("MULTI CONDITION TIMED OUT"); this.reset(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 8db72ff3..186305de 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -2,6 +2,8 @@ public class Forms { // FORMS + // bank form + public static final Form NULL = new Form("null"); public static final Form PUSH = new Form("push"); public static final Form PULL = new Form("pull"); public static final Form RAISE = new Form("raise"); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java index 485dafe1..e2ddbecc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java @@ -27,6 +27,7 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(LivingEvent.LivingTickEvent event) { if(!(event.getEntity() instanceof Player)) return false; + //TODO: Need to check for direction key presses instead of motion if((event.getEntity().getDeltaMovement().length() > motionThreshold)) { LogManager.getLogger().info("MOVE MOTION: " + event.getEntity().getDeltaMovement().length()); LogManager.getLogger().info("MOVE DIRECTION: " + event.getEntity().getMotionDirection()); From 063cae8769aa5ce393139a8dc457bc11aaafdbf0 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 15 Oct 2024 13:11:55 +1100 Subject: [PATCH 343/469] code cleanup --- .../magus/input/KeyboardMouseInputModule.java | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 019c9b7a..65ba8f03 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -19,7 +19,7 @@ import net.minecraftforge.eventbus.api.EventPriority; import org.apache.logging.log4j.LogManager; -import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -36,12 +36,11 @@ public class KeyboardMouseInputModule extends InputModule { private final int tickTimeoutThreshold = 60; private final int modifierTickThreshold = 10; // Maybe? - private final Object lock = new Object(); - private final AtomicInteger ticksSinceActivated = new AtomicInteger(0); - private final AtomicReference activeForm = new AtomicReference<>(Forms.NULL); - private final AtomicInteger timeout = new AtomicInteger(0); + private final AtomicInteger ticksSinceActivated; + private final AtomicReference activeForm; + private final AtomicInteger timeout; private int ticksSinceModifiersSent = 0; - private List glfwKeysDown; + private final List glfwKeysDown; private double mouseScrollDelta; private int scrollTimeout = 0; private boolean listen; @@ -55,8 +54,12 @@ public class KeyboardMouseInputModule extends InputModule { public KeyboardMouseInputModule() { formsTree.setDiscipline(Disciplines.AIR); - this.glfwKeysDown = new ArrayList<>(); + this.ticksSinceActivated = new AtomicInteger(0); + this.activeForm = new AtomicReference<>(Forms.NULL); + this.timeout = new AtomicInteger(0); + this.glfwKeysDown = new LinkedList<>(); this.listen = true; + this.keyboardListener = keyboardEvent -> { int keyPressed = keyboardEvent.getKey(); // NOTE: Minecraft's InputEvent.Key can only listen to the action InputConstants.REPEAT of one key at a time @@ -79,16 +82,18 @@ public KeyboardMouseInputModule() { this.mouseListener = mouseEvent -> { int keyPressed = mouseEvent.getButton(); - switch (mouseEvent.getAction()) { - case InputConstants.PRESS -> { - if (!glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.add(keyPressed); + synchronized (glfwKeysDown) { + switch (mouseEvent.getAction()) { + case InputConstants.PRESS -> { + if (!glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.add(keyPressed); + } } - } - case InputConstants.RELEASE -> { - if (glfwKeysDown.contains(keyPressed)) { - glfwKeysDown.remove((Integer) keyPressed); - checkForm = true; + case InputConstants.RELEASE -> { + if (glfwKeysDown.contains(keyPressed)) { + glfwKeysDown.remove((Integer) keyPressed); + checkForm = true; + } } } } @@ -192,7 +197,7 @@ private void sendModifierData() { } public void resetKeys() { - glfwKeysDown = new ArrayList<>(); + glfwKeysDown.clear(); } public void cleanMCKeys() { From e8065ff90c274f9786482d6ad5a63e7bb57250e1 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 15 Oct 2024 12:34:24 -0400 Subject: [PATCH 344/469] added junit --- build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.gradle b/build.gradle index 7460122b..abd426c7 100644 --- a/build.gradle +++ b/build.gradle @@ -127,6 +127,8 @@ repositories { } dependencies { + testImplementation 'junit:junit:4.13.1' + // Specify the version of Minecraft to use. // Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact. // The "userdev" classifier will be requested and setup by ForgeGradle. @@ -135,6 +137,8 @@ dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.19.4:1.0.5") { transitive = false } implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.19.4:1.0.14.a") { transitive = false } + testImplementation(platform('org.junit:junit-bom:5.9.1')) + testImplementation('org.junit.jupiter:junit-jupiter') // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") @@ -210,3 +214,10 @@ publishing { tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } + +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } +} \ No newline at end of file From 1e9ff3c85fb877835a0c1d5fa511fd35a6a451e2 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 15 Oct 2024 12:34:53 -0400 Subject: [PATCH 345/469] Create MagusTest.java --- .../com/amuzil/omegasource/MagusTest.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/test/java/com/amuzil/omegasource/MagusTest.java diff --git a/src/test/java/com/amuzil/omegasource/MagusTest.java b/src/test/java/com/amuzil/omegasource/MagusTest.java new file mode 100644 index 00000000..a5de65bc --- /dev/null +++ b/src/test/java/com/amuzil/omegasource/MagusTest.java @@ -0,0 +1,26 @@ +package com.amuzil.omegasource; + +import com.lowdragmc.photon.client.fx.FX; +import com.lowdragmc.photon.client.fx.FXHelper; +import net.minecraft.resources.ResourceLocation; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class MagusTest { + + @Test + public void checkResource(){ + System.out.println("Executing Test..."); + ResourceLocation resource; FX fx; + + resource = new ResourceLocation("magus", "blue_fire"); + fx = FXHelper.getFX(resource); + System.out.println("resource: " + resource.getNamespace()); + System.out.println("resource: " + resource.getPath()); + System.out.println("resource: " + resource.toDebugFileName()); + System.out.println("fx: " + fx); + + assertNotNull(fx, "FX object not found!"); + } +} From bd8ef6e7a67152804f7a7151353e5105a60360cb Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 15 Oct 2024 13:00:59 -0400 Subject: [PATCH 346/469] added fx assets resources --- build.gradle | 2 +- .../resources/assets/magus/fx/blue_fire.fx | Bin 0 -> 2614 bytes .../resources/assets/magus/fx/fire_bloom.fx | Bin 0 -> 2286 bytes .../resources/assets/magus/fx/blue_fire.fx | Bin 0 -> 2616 bytes .../resources/assets/magus/fx/fire_bloom.fx | Bin 0 -> 2286 bytes .../tags/blocks/airbending_material.json | 5 +++ .../tags/blocks/earthbending_material.json | 38 ++++++++++++++++++ .../tags/blocks/firebending_material.json | 10 +++++ .../tags/blocks/waterbending_material.json | 9 +++++ 9 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/magus/fx/blue_fire.fx create mode 100644 src/main/resources/assets/magus/fx/fire_bloom.fx create mode 100644 src/test/resources/assets/magus/fx/blue_fire.fx create mode 100644 src/test/resources/assets/magus/fx/fire_bloom.fx create mode 100644 src/test/resources/data/magus/tags/blocks/airbending_material.json create mode 100644 src/test/resources/data/magus/tags/blocks/earthbending_material.json create mode 100644 src/test/resources/data/magus/tags/blocks/firebending_material.json create mode 100644 src/test/resources/data/magus/tags/blocks/waterbending_material.json diff --git a/build.gradle b/build.gradle index abd426c7..38b3b7d7 100644 --- a/build.gradle +++ b/build.gradle @@ -104,7 +104,7 @@ minecraft { data { // example of overriding the workingDirectory set in configureEach above - workingDirectory project.file('run-data') +// workingDirectory project.file('run-data') // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') diff --git a/src/main/resources/assets/magus/fx/blue_fire.fx b/src/main/resources/assets/magus/fx/blue_fire.fx new file mode 100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pLHMQO;kUm#dctC{;Hhas?TqvkK6K@ENa&6mZ!L}OJ;q|e3+iC#bY2uIVciPb< zV0Bs~`3T70T7~4?;C~d7VMHV+=q3t8-5es;^FT|_;5#pTZ0i61(a;U^9FFUHgtDZI zCp2r$b^U;lmLFU>((;3mBW>r>7sr3)4O?Gs3qDs1{PvSIDtJB<_`Y4i-tNKBpKokR z6kCzF5=zhwePmr#)ek!mPpRmL$8|U)?ukZf8h~alTqr~3PotQu2OR37T-48KFjmy1 zC)xX$r1k$HGr*Nt4Jf$q#v!EGxLTFkJY5S^nKZGB7-ws)VAD0m@Yr@MTUxkos|2tG zqvheK6)WG^u$cHl0i?Eb!xR?)c__X6 z6t)marn`q}TQhQ&ZDSK~)mrud-+rb9t?olTJbx!MwAmldW(;k{&~B3*8AH2s3~gt8 z!1m+juf_`4e%$;M|HhhbZqvl=j#Z+!LaDB9Dend3DzM9MW|xvpI4sT zKt)Ed-s6848#zZtux147JxZ|dT=ALlk#`~=S&nmWd3nR!d$;qEF>R3Xk+;J~Zd(+~ zh{w-}cwBCkDJAcP5%VXH1f@$qoxw389^;47Uw*TU Date: Wed, 16 Oct 2024 01:46:22 -0400 Subject: [PATCH 347/469] comment out unit tests --- .../com/amuzil/omegasource/MagusTest.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test/java/com/amuzil/omegasource/MagusTest.java b/src/test/java/com/amuzil/omegasource/MagusTest.java index a5de65bc..ec00886e 100644 --- a/src/test/java/com/amuzil/omegasource/MagusTest.java +++ b/src/test/java/com/amuzil/omegasource/MagusTest.java @@ -9,18 +9,18 @@ public class MagusTest { - @Test - public void checkResource(){ - System.out.println("Executing Test..."); - ResourceLocation resource; FX fx; - - resource = new ResourceLocation("magus", "blue_fire"); - fx = FXHelper.getFX(resource); - System.out.println("resource: " + resource.getNamespace()); - System.out.println("resource: " + resource.getPath()); - System.out.println("resource: " + resource.toDebugFileName()); - System.out.println("fx: " + fx); - - assertNotNull(fx, "FX object not found!"); - } +// @Test +// public void checkResource(){ +// System.out.println("Executing Test..."); +// ResourceLocation resource; FX fx; +// +// resource = new ResourceLocation("magus", "blue_fire"); +// fx = FXHelper.getFX(resource); +// System.out.println("resource: " + resource.getNamespace()); +// System.out.println("resource: " + resource.getPath()); +// System.out.println("resource: " + resource.toDebugFileName()); +// System.out.println("fx: " + fx); +// +// assertNotNull(fx, "FX object not found!"); +// } } From 28aeea2d6fd8d2ec6b9cf490f1b68a01188010af Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 16 Oct 2024 02:04:01 -0400 Subject: [PATCH 348/469] Update fire_bloom.fx --- .../resources/assets/magus/fx/fire_bloom.fx | Bin 2286 -> 2313 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/magus/fx/fire_bloom.fx b/src/main/resources/assets/magus/fx/fire_bloom.fx index 2372e4edbe4e54b97bbaa55962471620baafa109..d2dd7cb72fb96d6c2d0ba21287ee711b179d27d6 100644 GIT binary patch literal 2313 zcmV+k3HJ6MiwFP!00000|Ls~|XdK5GpY>^VcPm-8Yqy2g52jGshmxj|DXEBVb^7DD zL9&G;+w>1r=Jw`vgZ6gUGrO`*g;aU!OK>15B+64tp#-}R4J6?7rNJR~3QpoawUo3Z zw1EU#NFE9)v~j<0_TNc5-Kn-J+wmTl(e8Zn%{SkCe}7(skRmCt2KRj?q(KPDX{4Xa z*`P8Jz9a?GGKW@drooGva2q<&mVdiS2#n2WT)~kTWRLIStQpOYJRi>D zGa(x3tJtpFn5fm5<%6iYO`9Nd?@5oI4Hzu%lYE7ZHfKG?aCdw%fSpcyouE-+V))v% zH`6nXxsLRy(P_88bB}OsI~Sh>C)=J@_qcD>yVK>G^jtS8AnWx7 znE3(n8P=TO4l7YU8n4ryT%;yc( zDuLF9jYjsPF_e|%$TKJcko5*j%4GAizF=@#gB-A2+Z8C?WW>1$8q|Sn51tK$jQ_!e z*lMD()x<*EiB#Z+1+8+X6g!ZJq7-%8M;)W75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q3t8-5es;^FT|_;5#pTZ0i61(a;U^9FFUHgtDZI zCp2r$b^U;lmLFU>((;3mBW>r>7sr3)4O?Gs3qDs1{PvSIDtJB<_`Y4i-tNKBpKokR z6kCzF5=zhwePmr#)ek!mPpRmL$8|U)?ukZf8h~alTqr~3PotQu2OR37T-48KFjmy1 zC)xX$r1k$HGr*Nt4Jf$q#v!EGxLTFkJY5S^nKZGB7-ws)VAD0m@Yr@MTUxkos|2tG zqvheK6)WG^u$cHl0i?Eb!xR?)c__X6 z6t)marn`q}TQhQ&ZDSK~)mrud-+rb9t?olTJbx!MwAmldW(;k{&~B3*8AH2s3~gt8 z!1m+juf_`4e%$;M|HhhbZqvl=j#Z+!LaDB9Dend3DzM9MW|xvpI4sT zKt)Ed-s6848#zZtux147JxZ|dT=ALlk#`~=S&nmWd3nR!d$;qEF>R3Xk+;J~Zd(+~ zh{w-}cwBCkDJAcP5%VXH1f@$qoxw389^;47Uw*TU Date: Thu, 17 Oct 2024 22:07:16 -0400 Subject: [PATCH 349/469] rename classes to MouseGesture... --- .../magus/skill/modifiers/ModifiersRegistry.java | 4 ++-- ...erData.java => MouseGestureModifierData.java} | 15 +++++++-------- ...er.java => MouseGestureModifierListener.java} | 16 ++++++++-------- 3 files changed, 17 insertions(+), 18 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/{GestureModifierData.java => MouseGestureModifierData.java} (83%) rename src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/{GestureModifierListener.java => MouseGestureModifierListener.java} (86%) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 440512a6..b4f2df65 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -41,8 +41,8 @@ public static void init() { TARGET = new Modifier(targetModifierData, new TargetModifierListener()); modifierDataTypes.put(targetModifierData.getName(), TARGET); - ModifierData gestureModifierData = new GestureModifierData(); - GESTURE = new Modifier(gestureModifierData, new GestureModifierListener()); + ModifierData gestureModifierData = new MouseGestureModifierData(); + GESTURE = new Modifier(gestureModifierData, new MouseGestureModifierListener()); modifierDataTypes.put(gestureModifierData.getName(), GESTURE); ModifierData scrollModifierData = new MouseScrollModifierData(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/GestureModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseGestureModifierData.java similarity index 83% rename from src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/GestureModifierData.java rename to src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseGestureModifierData.java index 4609d7e9..2ea5f7c4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/GestureModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseGestureModifierData.java @@ -5,24 +5,23 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; -import net.minecraft.world.phys.Vec3; import org.apache.logging.log4j.LogManager; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -public class GestureModifierData extends BaseModifierData { +public class MouseGestureModifierData extends BaseModifierData { private List mouseGestures; private HashMap shapeCounter; - public GestureModifierData() { + public MouseGestureModifierData() { this.mouseGestures = new ArrayList<>(); this.shapeCounter = new HashMap<>(); } - public GestureModifierData(List gestures) { + public MouseGestureModifierData(List gestures) { this.mouseGestures = gestures; } @@ -47,8 +46,8 @@ public CompoundTag serializeNBT() { } @Override - public GestureModifierData copy() { - return new GestureModifierData(); + public MouseGestureModifierData copy() { + return new MouseGestureModifierData(); } @Override @@ -66,8 +65,8 @@ public void deserializeNBT(CompoundTag compoundTag) { //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking @Override protected void mergeFields(ModifierData modifierData) { - GestureModifierData gestureModifierData = (GestureModifierData) modifierData; - this.mouseGestures.addAll(gestureModifierData.mouseGestures); + MouseGestureModifierData mouseGestureModifierData = (MouseGestureModifierData) modifierData; + this.mouseGestures.addAll(mouseGestureModifierData.mouseGestures); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java similarity index 86% rename from src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java rename to src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java index cdd9fc0a..ddb63b19 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/GestureModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java @@ -10,7 +10,7 @@ import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; -import com.amuzil.omegasource.magus.skill.modifiers.data.GestureModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.data.MouseGestureModifierData; import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.phys.Vec3; @@ -22,19 +22,19 @@ import java.util.List; import java.util.function.Consumer; -public class GestureModifierListener extends ModifierListener { +public class MouseGestureModifierListener extends ModifierListener { private Consumer clientTickListener; public List mouseGestures; public MouseVircle vircle; private HashMap shapeCounter; private final RadixTree.InputType type; - public GestureModifierListener() { + public MouseGestureModifierListener() { this(RadixTree.InputType.MOUSE_MOTION); } - public GestureModifierListener(RadixTree.InputType type) { - this.modifierData = new GestureModifierData(); + public MouseGestureModifierListener(RadixTree.InputType type) { + this.modifierData = new MouseGestureModifierData(); this.type = type; } @@ -89,13 +89,13 @@ public boolean shouldCollectModifierData(TickEvent event) { @Override public ModifierData collectModifierDataFromEvent(TickEvent event) { - GestureModifierData data = new GestureModifierData(mouseGestures); + MouseGestureModifierData data = new MouseGestureModifierData(mouseGestures); this.mouseGestures = new ArrayList<>(); return data; } @Override - public GestureModifierListener copy() { - return new GestureModifierListener(); + public MouseGestureModifierListener copy() { + return new MouseGestureModifierListener(); } } From bc20309efe36ebff628c43256e765abad1f5e0fd Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 18 Oct 2024 13:27:01 +1100 Subject: [PATCH 350/469] Slowly getting modifiers working --- .../com/amuzil/omegasource/magus/Magus.java | 10 +-- .../omegasource/magus/input/InputModule.java | 86 ++++++++++--------- .../magus/input/KeyboardMouseInputModule.java | 11 ++- .../amuzil/omegasource/magus/radix/Node.java | 1 - .../omegasource/magus/radix/RadixTree.java | 10 --- .../magus/server/ServerEvents.java | 2 + .../skill/modifiers/ModifiersRegistry.java | 5 ++ .../MouseScrollModifierListener.java | 13 +-- 8 files changed, 75 insertions(+), 63 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 36280206..b077172f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -66,10 +66,7 @@ public Magus() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); // Register the doClientStuff method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); - //Assign input data to forms - Forms.init(); - FormDataRegistry.init(); - ModifiersRegistry.init(); + } private void setup(final FMLCommonSetupEvent event) { @@ -77,12 +74,15 @@ private void setup(final FMLCommonSetupEvent event) { Registries.init(); CapabilityHandler.initialiseCaps(); MagusNetwork.registerMessages(); - + Forms.init(); } private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client //todo call this anytime the key mappings are updated + //Assign input data to forms + FormDataRegistry.init(); + ModifiersRegistry.init(); } private void enqueueIMC(final InterModEnqueueEvent event) {} diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 60c7ba49..23127bf1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -9,6 +9,8 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.mojang.blaze3d.platform.InputConstants; @@ -17,56 +19,31 @@ import net.minecraft.nbt.CompoundTag; import net.minecraftforge.client.event.InputEvent; import org.apache.logging.log4j.LogManager; -import org.checkerframework.checker.units.qual.A; import java.util.*; import java.util.concurrent.atomic.AtomicReference; public abstract class InputModule { - protected static RadixTree formsTree = new RadixTree(); - protected final List activeConditions = Collections.synchronizedList(new LinkedList<>()); - protected static LinkedList activeForms = new LinkedList<>(); + public boolean resetScrolling; protected static final List activeFormInputs = new ArrayList<>(); protected static final Map movementKeys = new HashMap<>(); + protected static RadixTree formsTree = new RadixTree(); + protected static LinkedList activeForms = new LinkedList<>(); + protected final List activeConditions = Collections.synchronizedList(new LinkedList<>()); protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); protected final Map modifierQueue = new HashMap<>(); protected AtomicReference lastActivatedForm = new AtomicReference<>(Forms.NULL); - public abstract void registerInputData(List formExecutionInputs, Form formToExecute, List conditions); - - public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { - listener.setupListener(treeData); - listener.register(() -> { - LogManager.getLogger().info("QUEUEING MODIFIER DATA"); - queueModifierData(listener.getModifierData()); - }); - - modifierListeners.add(listener); - } - - public synchronized void queueModifierData(ModifierData data) { - synchronized (modifierQueue) { - if(modifierQueue.get(data.getName()) != null) { - ModifierData existingData = modifierQueue.get(data.getName()); - existingData.add(data); - modifierQueue.put(data.getName(), existingData); - } else { - modifierQueue.put(data.getName(), data); - } - } - } - public static EventCondition keyToCondition(InputConstants.Key key, int actionCondition) { if (key.getType().equals(InputConstants.Type.MOUSE)) { return new EventCondition<>(InputEvent.MouseButton.class, event -> event.getButton() == key.getValue() && - event.getAction() == actionCondition); - } - else return new EventCondition<>(InputEvent.Key.class, + event.getAction() == actionCondition); + } else return new EventCondition<>(InputEvent.Key.class, event -> event.getKey() == key.getValue() && event.getAction() - == actionCondition); + == actionCondition); } public static void determineMotionKeys() { @@ -85,6 +62,44 @@ public static boolean isDirectionKey(int key) { return movementKeys.containsValue(Integer.valueOf(key)); } + public static void resetFormsTree() { + FormDataRegistry.init(); // Re-initialize formData since it's a static field + formsTree = new RadixTree(); + // Default is air. + formsTree.setDiscipline(Disciplines.AIR); + } + + public abstract void registerInputData(List formExecutionInputs, Form formToExecute, List conditions); + + public void registerModifiers() { + registerModifierListener(ModifiersRegistry.CONTROL.listener(), Minecraft.getInstance().player.getPersistentData()); + // Need to register this to the player's compound tag... +// for (Modifier modifiers : ModifiersRegistry.getModifiers()) { +// registerModifierListener(modifiers.listener(), Minecraft.getInstance().player.getPersistentData()); +// } + } + public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { + listener.setupListener(treeData); + listener.register(() -> { + LogManager.getLogger().info("QUEUEING MODIFIER DATA"); + queueModifierData(listener.getModifierData()); + }); + + modifierListeners.add(listener); + } + + public synchronized void queueModifierData(ModifierData data) { + synchronized (modifierQueue) { + if (modifierQueue.get(data.getName()) != null) { + ModifierData existingData = modifierQueue.get(data.getName()); + existingData.add(data); + modifierQueue.put(data.getName(), existingData); + } else { + modifierQueue.put(data.getName(), data); + } + } + } + public void resetLastActivated() { LogManager.getLogger().info("RESETTING LAST ACTIVATED FORM"); this.lastActivatedForm = null; @@ -115,13 +130,6 @@ public void resetConditions() { } } - public static void resetFormsTree() { - FormDataRegistry.init(); // Re-initialize formData since it's a static field - formsTree = new RadixTree(); - // Default is air. - formsTree.setDiscipline(Disciplines.AIR); - } - // private Form checkForForm() { // if (!activeConditions.isEmpty()) { // List conditions = activeConditions.stream().toList(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 65ba8f03..e12a9f27 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -39,11 +39,12 @@ public class KeyboardMouseInputModule extends InputModule { private final AtomicInteger ticksSinceActivated; private final AtomicReference activeForm; private final AtomicInteger timeout; - private int ticksSinceModifiersSent = 0; private final List glfwKeysDown; + private int ticksSinceModifiersSent = 0; private double mouseScrollDelta; private int scrollTimeout = 0; private boolean listen; + // Used for modifier data private boolean checkForm = false; // module activating a form rather than relying on the raw input data for those forms. @@ -59,6 +60,8 @@ public KeyboardMouseInputModule() { this.timeout = new AtomicInteger(0); this.glfwKeysDown = new LinkedList<>(); this.listen = true; + this.resetScrolling = false; + this.previousScrollDelta = 0; this.keyboardListener = keyboardEvent -> { int keyPressed = keyboardEvent.getKey(); @@ -111,7 +114,11 @@ public KeyboardMouseInputModule() { scrollTimeout++; // Resets mouse scrolling delta - if (scrollTimeout >= tickActivationThreshold) this.mouseScrollDelta = 0; + if (scrollTimeout >= tickActivationThreshold) { + this.mouseScrollDelta = 0; + this.scrollTimeout = 0; + this.resetScrolling = true; + } if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { sendModifierData(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index aa1788db..9032acb4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -136,7 +136,6 @@ public void registerModifierListeners(Discipline activeDiscipline, ServerPlayer List modifierTypes = new ArrayList<>(); List modifiers = getModifiers(); - Modifier modifier = ModifiersRegistry.CONTROL; synchronized (modifiers) { modifiers.stream() diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 7d44d63b..d8a71dfd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -166,16 +166,6 @@ public void insert(List conditions) { List suffix = currentBranch.path.conditions.subList(currCondition.size() - 1, currCondition.size()); currentBranch.path.conditions = currCondition; Node newNext = new Node(true); - - // Add modifiers for all available types... - newNext.addModifierData(ModifiersRegistry.DIRECTION.data()); - newNext.addModifierData(ModifiersRegistry.MULTI.data()); - newNext.addModifierData(ModifiersRegistry.FOCUS.data()); - newNext.addModifierData(ModifiersRegistry.TARGET.data()); - newNext.addModifierData(ModifiersRegistry.CONTROL.data()); - newNext.addModifierData(ModifiersRegistry.GESTURE.data()); - - Node afterNewNext = currentBranch.next; currentBranch.next = newNext; diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 0215d236..64acec14 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -30,6 +30,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { if (capability != null && event.getEntity() instanceof Player) { + // initialise the radix tree and set the player as an instance property for sending packets. //todo this is temporary manual tree construction for testing purposes. the true tree will be // generated at runtime based on available skills for the player/entity. @@ -120,6 +121,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { System.out.println("All RadixTree Branches:"); Magus.keyboardMouseInputModule.getFormsTree().printAllBranches(); Magus.keyboardMouseInputModule.init(); + Magus.keyboardMouseInputModule.registerModifiers(); // Magus.mouseMotionModule.init(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 440512a6..691e2665 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -7,6 +7,7 @@ import net.minecraft.nbt.CompoundTag; import java.util.HashMap; +import java.util.List; import java.util.Map; public class ModifiersRegistry { @@ -51,6 +52,10 @@ public static void init() { } + public static List getModifiers() { + return modifierDataTypes.values().stream().toList(); + } + public static ModifierData fromCompoundTag(CompoundTag compoundTag) { ModifierData data = modifierDataTypes.get(compoundTag.getString("dataIdentifier")).copy().data(); data.deserializeNBT(compoundTag); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java index 58eb2be6..f7884136 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java @@ -2,7 +2,6 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; -import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.MouseScrollModifierData; @@ -20,15 +19,17 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { - RadixUtil.getLogger().info("Mouse Scroll Listener:" + inputModule.getMouseScrollDelta()); - return inputModule.getMouseScrollDelta() != 0; + return inputModule.getMouseScrollDelta() != 0 || inputModule.resetScrolling; } @Override public ModifierData collectModifierDataFromEvent(TickEvent.ClientTickEvent event) { - this.totalScrollDelta += inputModule.getMouseScrollDelta(); - MouseScrollModifierData data = new MouseScrollModifierData(totalScrollDelta); - return data; + if (inputModule.resetScrolling) { + this.totalScrollDelta = 0; + inputModule.resetScrolling = false; + } + else this.totalScrollDelta += inputModule.getMouseScrollDelta(); + return new MouseScrollModifierData(totalScrollDelta); } @Override From 1c389febffe1d317def15f5fd73e18f0997a617d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 18 Oct 2024 13:27:17 +1100 Subject: [PATCH 351/469] woops lmao --- .../amuzil/omegasource/magus/input/KeyboardMouseInputModule.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index e12a9f27..8deec892 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -61,7 +61,6 @@ public KeyboardMouseInputModule() { this.glfwKeysDown = new LinkedList<>(); this.listen = true; this.resetScrolling = false; - this.previousScrollDelta = 0; this.keyboardListener = keyboardEvent -> { int keyPressed = keyboardEvent.getKey(); From f425596f15b18fb5f153cf49f0fb538446863007 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 18 Oct 2024 13:52:15 +1100 Subject: [PATCH 352/469] now it's cali's lmao --- .../com/amuzil/omegasource/magus/Magus.java | 2 +- .../omegasource/magus/input/InputModule.java | 18 ++++++++++------ .../magus/input/KeyboardMouseInputModule.java | 21 ++++++++++++------- .../skill/modifiers/ModifiersRegistry.java | 3 ++- .../MouseScrollModifierListener.java | 6 +++++- 5 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index b077172f..b2ff9916 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -39,7 +39,7 @@ public class Magus { //MODID reference public static final String MOD_ID = "magus"; // Directly reference a log4j logger. - private static final Logger LOGGER = LogManager.getLogger(); + public static final Logger LOGGER = LogManager.getLogger(); //todo: move these to a better place //todo: make multiple input modules diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 23127bf1..17b9c6d3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -25,7 +26,7 @@ public abstract class InputModule { - public boolean resetScrolling; + protected static Discipline activeDiscipline = Disciplines.AIR; protected static final List activeFormInputs = new ArrayList<>(); protected static final Map movementKeys = new HashMap<>(); protected static RadixTree formsTree = new RadixTree(); @@ -34,6 +35,7 @@ public abstract class InputModule { protected final Map formInputs = new HashMap<>(); protected final List modifierListeners = new ArrayList<>(); protected final Map modifierQueue = new HashMap<>(); + public boolean resetScrolling; protected AtomicReference lastActivatedForm = new AtomicReference<>(Forms.NULL); public static EventCondition keyToCondition(InputConstants.Key key, int actionCondition) { @@ -66,18 +68,22 @@ public static void resetFormsTree() { FormDataRegistry.init(); // Re-initialize formData since it's a static field formsTree = new RadixTree(); // Default is air. - formsTree.setDiscipline(Disciplines.AIR); + formsTree.setDiscipline(activeDiscipline); } public abstract void registerInputData(List formExecutionInputs, Form formToExecute, List conditions); public void registerModifiers() { - registerModifierListener(ModifiersRegistry.CONTROL.listener(), Minecraft.getInstance().player.getPersistentData()); +// registerModifierListener(ModifiersRegistry.CONTROL.listener(), Minecraft.getInstance().player.getPersistentData()); // Need to register this to the player's compound tag... -// for (Modifier modifiers : ModifiersRegistry.getModifiers()) { -// registerModifierListener(modifiers.listener(), Minecraft.getInstance().player.getPersistentData()); -// } + CompoundTag listenerInstanceData = new CompoundTag(); + listenerInstanceData.putString("activeElement", activeDiscipline.name()); + for (Modifier modifier : ModifiersRegistry.getModifiers()) { + if (modifier.listener() != null) + registerModifierListener(modifier.listener(), listenerInstanceData); + } } + public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { listener.setupListener(treeData); listener.register(() -> { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 8deec892..537ddfac 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.*; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; @@ -27,14 +28,13 @@ public class KeyboardMouseInputModule extends InputModule { - - private final Consumer tickEventConsumer; + private final Consumer tickEventConsumer; private final Consumer keyboardListener; private final Consumer mouseListener; private final Consumer mouseScrollListener; - private final int tickActivationThreshold = 15; - private final int tickTimeoutThreshold = 60; - private final int modifierTickThreshold = 10; + private final int tickActivationThreshold = 5; + private final int tickTimeoutThreshold = 15; + private final int modifierTickThreshold = 5; // Maybe? private final AtomicInteger ticksSinceActivated; private final AtomicReference activeForm; @@ -42,7 +42,7 @@ public class KeyboardMouseInputModule extends InputModule { private final List glfwKeysDown; private int ticksSinceModifiersSent = 0; private double mouseScrollDelta; - private int scrollTimeout = 0; + public int scrollTimeout = 0; private boolean listen; // Used for modifier data private boolean checkForm = false; @@ -53,7 +53,7 @@ public class KeyboardMouseInputModule extends InputModule { // forms are activated. public KeyboardMouseInputModule() { - formsTree.setDiscipline(Disciplines.AIR); + formsTree.setDiscipline(activeDiscipline); this.ticksSinceActivated = new AtomicInteger(0); this.activeForm = new AtomicReference<>(Forms.NULL); @@ -172,6 +172,11 @@ public KeyboardMouseInputModule() { }; } + public static void setActiveDiscipline(Discipline discipline) { + activeDiscipline = discipline; + formsTree.setDiscipline(discipline); + } + private void checkForForm() { synchronized (activeConditions) { if (!activeConditions.isEmpty()) { @@ -268,7 +273,7 @@ public void registerRunnables(Node current) { @Override public void registerListeners() { - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, tickEventConsumer); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseScrollingEvent.class, mouseScrollListener); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index fd459586..6bbe7695 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.skill.modifiers; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.*; @@ -49,7 +51,6 @@ public static void init() { ModifierData scrollModifierData = new MouseScrollModifierData(); CONTROL = new Modifier(scrollModifierData, new MouseScrollModifierListener()); modifierDataTypes.put(scrollModifierData.getName(), CONTROL); - } public static List getModifiers() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java index f7884136..1ae0e637 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java @@ -19,7 +19,11 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { - return inputModule.getMouseScrollDelta() != 0 || inputModule.resetScrolling; + // Half a second, or 20 ticks +// Magus.LOGGER.warn(System.currentTimeMillis()); + return inputModule.scrollTimeout % 3 == 0 && + inputModule.getMouseScrollDelta() != 0 || + inputModule.resetScrolling; } @Override From 9fda546180f2506fed5945b676c9eb35843af16b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 18 Oct 2024 13:57:18 +1100 Subject: [PATCH 353/469] cali please fix --- .../amuzil/omegasource/magus/server/ServerEvents.java | 2 +- .../listeners/MouseGestureModifierListener.java | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 64acec14..c592fb18 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -122,7 +122,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { Magus.keyboardMouseInputModule.getFormsTree().printAllBranches(); Magus.keyboardMouseInputModule.init(); Magus.keyboardMouseInputModule.registerModifiers(); -// Magus.mouseMotionModule.init(); + Magus.mouseMotionModule.init(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java index ddb63b19..e3c4e3d4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java @@ -2,12 +2,9 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseShapeInput; import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseVircle; -import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.MouseGestureModifierData; @@ -19,6 +16,7 @@ import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.function.Consumer; @@ -36,6 +34,7 @@ public MouseGestureModifierListener() { public MouseGestureModifierListener(RadixTree.InputType type) { this.modifierData = new MouseGestureModifierData(); this.type = type; + this.mouseGestures = new LinkedList<>(); } @Override @@ -52,11 +51,6 @@ public void unregister() { @Override public void setupListener(CompoundTag compoundTag) { - Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); - List formInputs = FormDataRegistry.getInputsForForm(formToModify, type); - - InputData lastInput = formInputs.get(formInputs.size() - 1); - this.clientTickListener = event -> { if (Magus.keyboardMouseInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { Minecraft mci = Minecraft.getInstance(); From b51c2ce1f16ffae02c3022d48c3594e194161795 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 17 Oct 2024 23:55:21 -0400 Subject: [PATCH 354/469] adjust MouseMotion tick stuff and remove last of MouseInputModule --- .../amuzil/omegasource/magus/input/MouseMotionModule.java | 8 ++++---- .../modifiers/listeners/KeyHeldModifierListener.java | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index 9113c0cd..15d3a73b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -23,15 +23,15 @@ public class MouseMotionModule extends InputModule { - private final Consumer tickEventConsumer; + private final Consumer tickEventConsumer; public List mouseGesture; public MouseVircle vircle; private Form activeForm = new Form(); private int ticksSinceActivated = 0; private int ticksSinceModifiersSent = 0; - private final int tickActivationThreshold = 15; - private final int tickTimeoutThreshold = 60; + private final int tickActivationThreshold = 10; + private final int tickTimeoutThreshold = 30; private final int modifierTickThreshold = 10; private boolean listen; @@ -138,7 +138,7 @@ public void registerRunnables(Node current) { @Override public void registerListeners() { - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.class, tickEventConsumer); + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, tickEventConsumer); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index d8b0219e..6ee1af65 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -71,11 +71,6 @@ else if (lastInput instanceof MultiKeyInput) { } InputModule module = Magus.keyboardMouseInputModule; -// if (Objects.requireNonNull(type) == RadixTree.InputType.MOUSE) { -// module = Magus.mouseInputModule; -// } else { -// module = Magus.keyboardInputModule; -// } this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { From 79e4cb1c8719e1363bb988e71864c388b49aa51a Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 18 Oct 2024 00:22:13 -0400 Subject: [PATCH 355/469] added test projectile QUEUEING MODIFIER DATA getting spammed --- .../com/amuzil/omegasource/magus/Magus.java | 15 ++-- .../magus/input/KeyboardMouseInputModule.java | 30 +++++++- .../skill/test/avatar/AvatarEntities.java | 23 +++++++ .../test/avatar/TestProjectileEntity.java | 69 +++++++++++++++++++ 4 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarEntities.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index b2ff9916..b4439dc7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,17 +1,18 @@ package com.amuzil.omegasource.magus; -import com.amuzil.omegasource.magus.input.InputModule; -import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; -import com.amuzil.omegasource.magus.input.MouseMotionModule; +import com.amuzil.omegasource.magus.input.*; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarCommand; +import com.amuzil.omegasource.magus.skill.test.avatar.AvatarEntities; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; +import net.minecraft.client.renderer.entity.EntityRenderers; +import net.minecraft.client.renderer.entity.ThrownItemRenderer; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.Entity; import net.minecraftforge.common.MinecraftForge; @@ -36,15 +37,13 @@ @Mod(Magus.MOD_ID) public class Magus { - //MODID reference + // MOD ID reference public static final String MOD_ID = "magus"; // Directly reference a log4j logger. public static final Logger LOGGER = LogManager.getLogger(); //todo: move these to a better place - //todo: make multiple input modules public static InputModule keyboardMouseInputModule; -// public static InputModule mouseInputModule; public static InputModule mouseMotionModule; public Magus() { @@ -52,7 +51,6 @@ public Magus() { MinecraftForge.EVENT_BUS.register(this); //Register the input modules keyboardMouseInputModule = new KeyboardMouseInputModule(); -// mouseInputModule = new MouseInputModule(); mouseMotionModule = new MouseMotionModule(); // Register capabilities FMLJavaModLoadingContext.get().getModEventBus().addListener(CapabilityHandler::registerCapabilities); @@ -67,6 +65,8 @@ public Magus() { // Register the doClientStuff method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); + // Register Testing Entities + AvatarEntities.register(FMLJavaModLoadingContext.get().getModEventBus()); } private void setup(final FMLCommonSetupEvent event) { @@ -118,6 +118,7 @@ public static void onClientSetup(FMLClientSetupEvent event) { LOGGER.info("HELLO FROM CLIENT SETUP"); KeyboardMouseInputModule.determineMotionKeys(); + EntityRenderers.register(AvatarEntities.TEST_PROJECTILE.get(), ThrownItemRenderer::new); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 537ddfac..974ea7de 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -11,9 +11,16 @@ import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.test.avatar.TestProjectileEntity; +import com.lowdragmc.photon.client.fx.EntityEffect; +import com.lowdragmc.photon.client.fx.FX; +import com.lowdragmc.photon.client.fx.FXHelper; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.player.Player; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -29,13 +36,13 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer tickEventConsumer; + private final Consumer tickServerEventConsumer; private final Consumer keyboardListener; private final Consumer mouseListener; private final Consumer mouseScrollListener; private final int tickActivationThreshold = 5; private final int tickTimeoutThreshold = 15; private final int modifierTickThreshold = 5; - // Maybe? private final AtomicInteger ticksSinceActivated; private final AtomicReference activeForm; private final AtomicInteger timeout; @@ -170,6 +177,26 @@ public KeyboardMouseInputModule() { } } }; + + this.tickServerEventConsumer = event -> { + synchronized (lastActivatedForm.get()) { + if (!lastActivatedForm.get().name().equals("null") && !lastActivatedForm.get().name().equals("strike")) { + ServerLevel level = event.getServer().getAllLevels().iterator().next(); + if (!level.isClientSide) { + Player player = Minecraft.getInstance().player; + assert player != null; + TestProjectileEntity element = new TestProjectileEntity(level, player); +// element.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); + element.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); + level.addFreshEntity(element); + ResourceLocation fireResource = new ResourceLocation(Magus.MOD_ID, "fire_bloom"); + FX fx = FXHelper.getFX(fireResource); + EntityEffect entityEffect = new EntityEffect(fx, level, element); + entityEffect.start(); + } + } + } + }; } public static void setActiveDiscipline(Discipline discipline) { @@ -273,6 +300,7 @@ public void registerRunnables(Node current) { @Override public void registerListeners() { + MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ServerTickEvent.class, tickServerEventConsumer); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, tickEventConsumer); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarEntities.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarEntities.java new file mode 100644 index 00000000..cf4afc75 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarEntities.java @@ -0,0 +1,23 @@ +package com.amuzil.omegasource.magus.skill.test.avatar; + +import com.amuzil.omegasource.magus.Magus; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.MobCategory; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + + +public class AvatarEntities { + public static final DeferredRegister> ENTITY_TYPES = + DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, Magus.MOD_ID); + + public static final RegistryObject> TEST_PROJECTILE = + ENTITY_TYPES.register("test_projectile", () -> EntityType.Builder.of(TestProjectileEntity::new, MobCategory.MISC) + .sized(0.5f, 0.5f).build("test_projectile")); + + public static void register(IEventBus eventBus) { + ENTITY_TYPES.register(eventBus); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java new file mode 100644 index 00000000..6aeacd03 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -0,0 +1,69 @@ +package com.amuzil.omegasource.magus.skill.test.avatar; + +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.monster.Blaze; +import net.minecraft.world.entity.projectile.AbstractArrow; +import net.minecraft.world.entity.projectile.ItemSupplier; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.phys.EntityHitResult; +import net.minecraft.world.phys.HitResult; + + +public class TestProjectileEntity extends AbstractArrow implements ItemSupplier { + public static final ItemStack PROJECTILE_ITEM = new ItemStack(Blocks.AIR); + + public TestProjectileEntity(EntityType type, Level level) { + super(type, level); + } + + public TestProjectileEntity(Level Level, LivingEntity livingEntity) { + super(AvatarEntities.TEST_PROJECTILE.get(), livingEntity, Level); + } + + public TestProjectileEntity(Level Level, double x, double y, double z) { + super(AvatarEntities.TEST_PROJECTILE.get(), x, y, z, Level); + } + + public void handleEntityEvent(byte data) { + if (data == 3) { + for(int i = 0; i < 8; ++i) { + this.level.addParticle(this.getParticle(), this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); + } + } + } + + protected void onHitEntity(EntityHitResult entityHitResult) { + super.onHitEntity(entityHitResult); + Entity entity = entityHitResult.getEntity(); + int i = entity instanceof Blaze ? 0 : 15; // Deal 15 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + } + + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); + if (!this.level.isClientSide) { + this.level.broadcastEntityEvent(this, (byte)3); + this.discard(); + } + } + + private ParticleOptions getParticle() { + return ParticleTypes.FLAME; + } + + @Override + protected ItemStack getPickupItem() { + return PROJECTILE_ITEM; + } + + @Override + public ItemStack getItem() { + return PROJECTILE_ITEM; + } +} \ No newline at end of file From d9f6bc5058e1dc44950b421eb8cb90ccbc0ce182 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 18 Oct 2024 01:12:39 -0400 Subject: [PATCH 356/469] use both photon test fx --- .../magus/input/KeyboardMouseInputModule.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 974ea7de..e6862407 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -180,17 +180,21 @@ public KeyboardMouseInputModule() { this.tickServerEventConsumer = event -> { synchronized (lastActivatedForm.get()) { - if (!lastActivatedForm.get().name().equals("null") && !lastActivatedForm.get().name().equals("strike")) { + if (!lastActivatedForm.get().name().equals("null")) { + ResourceLocation resource = null; + if (lastActivatedForm.get().name().equals("strike")) + resource = new ResourceLocation(Magus.MOD_ID, "fire_bloom"); + if (lastActivatedForm.get().name().equals("force")) + resource = new ResourceLocation(Magus.MOD_ID, "blue_fire"); ServerLevel level = event.getServer().getAllLevels().iterator().next(); - if (!level.isClientSide) { + if (!level.isClientSide && resource != null) { Player player = Minecraft.getInstance().player; assert player != null; TestProjectileEntity element = new TestProjectileEntity(level, player); // element.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); element.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); level.addFreshEntity(element); - ResourceLocation fireResource = new ResourceLocation(Magus.MOD_ID, "fire_bloom"); - FX fx = FXHelper.getFX(fireResource); + FX fx = FXHelper.getFX(resource); EntityEffect entityEffect = new EntityEffect(fx, level, element); entityEffect.start(); } From 7ad0294e3a15cfdfe5eaff125e918f88f10f66f0 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 18 Oct 2024 01:27:41 -0400 Subject: [PATCH 357/469] fx firing because of multiple server ticks at once --- .../magus/input/KeyboardMouseInputModule.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index e6862407..c3dfa621 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -179,14 +179,15 @@ public KeyboardMouseInputModule() { }; this.tickServerEventConsumer = event -> { - synchronized (lastActivatedForm.get()) { - if (!lastActivatedForm.get().name().equals("null")) { + synchronized (activeForm.get()) { + if (!activeForm.get().name().equals("null")) { ResourceLocation resource = null; - if (lastActivatedForm.get().name().equals("strike")) + if (activeForm.get().name().equals("strike")) resource = new ResourceLocation(Magus.MOD_ID, "fire_bloom"); - if (lastActivatedForm.get().name().equals("force")) + if (activeForm.get().name().equals("force")) resource = new ResourceLocation(Magus.MOD_ID, "blue_fire"); ServerLevel level = event.getServer().getAllLevels().iterator().next(); + System.out.println("LEVEL: " + level); if (!level.isClientSide && resource != null) { Player player = Minecraft.getInstance().player; assert player != null; From 127606d3890c25a824d542aceb6ff9d79b9ae7ea Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 19 Oct 2024 00:03:09 +1100 Subject: [PATCH 358/469] gonna start cleaning up modifiers --- .../com/amuzil/omegasource/magus/input/InputModule.java | 6 +++++- .../skill/modifiers/listeners/TargetModifierListener.java | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 17b9c6d3..8db8c649 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -26,7 +26,7 @@ public abstract class InputModule { - protected static Discipline activeDiscipline = Disciplines.AIR; + public static Discipline activeDiscipline = Disciplines.AIR; protected static final List activeFormInputs = new ArrayList<>(); protected static final Map movementKeys = new HashMap<>(); protected static RadixTree formsTree = new RadixTree(); @@ -56,6 +56,10 @@ public static void determineMotionKeys() { }); } + public static Discipline getDiscipline() { + return activeDiscipline; + } + public static Map getMovementKeys() { return movementKeys; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index 4be3d0be..0db2f4b7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -1,5 +1,7 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; @@ -40,6 +42,10 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(InputEvent.MouseButton event) { + + //TODO: Fix this + this.activeDiscipline = InputModule.getDiscipline(); + if(event instanceof InputEvent.MouseButton.Post && // prevents double activation(Pre- and Post-event firing) event.getButton() == InputConstants.MOUSE_BUTTON_MIDDLE && event.getAction() == InputConstants.PRESS) { Minecraft mc = Minecraft.getInstance(); From d48f0980c6edae1b622b46bf86ee6189fcbb864e Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 20 Oct 2024 14:35:02 -0400 Subject: [PATCH 359/469] added deflection test --- .../magus/input/KeyboardMouseInputModule.java | 50 ++++++++++-------- .../test/avatar/TestProjectileEntity.java | 20 +++++-- .../resources/assets/magus/fx/blue_fire.fx | Bin 2614 -> 2451 bytes .../resources/assets/magus/fx/fire_bloom.fx | Bin 2313 -> 2317 bytes 4 files changed, 44 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index c3dfa621..9c3ed0a2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -53,6 +53,7 @@ public class KeyboardMouseInputModule extends InputModule { private boolean listen; // Used for modifier data private boolean checkForm = false; + private int c = 0; // module activating a form rather than relying on the raw input data for those forms. // This way, the trees for different complex methods (such as VR and multikey) @@ -157,10 +158,10 @@ public KeyboardMouseInputModule() { lastActivatedForm.set(activeForm.get()); // Extra check for race conditions. Probably wont' help... - synchronized (lastActivatedForm.get()) { - if (!lastActivatedForm.get().name().equals("null")) - Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); - } +// synchronized (lastActivatedForm.get()) { +// if (!lastActivatedForm.get().name().equals("null")) +// Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); +// } activeForm.set(Forms.NULL); ticksSinceActivated.set(0); timeout.set(0); @@ -179,27 +180,32 @@ public KeyboardMouseInputModule() { }; this.tickServerEventConsumer = event -> { - synchronized (activeForm.get()) { - if (!activeForm.get().name().equals("null")) { - ResourceLocation resource = null; - if (activeForm.get().name().equals("strike")) - resource = new ResourceLocation(Magus.MOD_ID, "fire_bloom"); - if (activeForm.get().name().equals("force")) - resource = new ResourceLocation(Magus.MOD_ID, "blue_fire"); - ServerLevel level = event.getServer().getAllLevels().iterator().next(); - System.out.println("LEVEL: " + level); - if (!level.isClientSide && resource != null) { - Player player = Minecraft.getInstance().player; - assert player != null; - TestProjectileEntity element = new TestProjectileEntity(level, player); + if (c == 0) { + synchronized (activeForm.get()) { + if (!activeForm.get().name().equals("null")) { + ResourceLocation resource = null; + if (activeForm.get().name().equals("strike")) + resource = new ResourceLocation(Magus.MOD_ID, "fire_bloom"); + if (activeForm.get().name().equals("force")) + resource = new ResourceLocation(Magus.MOD_ID, "blue_fire"); + ServerLevel level = event.getServer().getAllLevels().iterator().next(); + System.out.println("LEVEL: " + level); + if (!level.isClientSide && resource != null) { + c = 20; + Player player = Minecraft.getInstance().player; + assert player != null; + TestProjectileEntity element = new TestProjectileEntity(level, player); // element.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); - element.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); - level.addFreshEntity(element); - FX fx = FXHelper.getFX(resource); - EntityEffect entityEffect = new EntityEffect(fx, level, element); - entityEffect.start(); + element.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); + level.addFreshEntity(element); + FX fx = FXHelper.getFX(resource); + EntityEffect entityEffect = new EntityEffect(fx, level, element); + entityEffect.start(); + } } } + } else { + c--; } }; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index 6aeacd03..be9f6240 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -1,7 +1,13 @@ package com.amuzil.omegasource.magus.skill.test.avatar; +import com.amuzil.omegasource.magus.Magus; +import com.lowdragmc.photon.client.fx.EntityEffect; +import com.lowdragmc.photon.client.fx.FX; +import com.lowdragmc.photon.client.fx.FXHelper; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; @@ -39,17 +45,23 @@ public void handleEntityEvent(byte data) { } protected void onHitEntity(EntityHitResult entityHitResult) { - super.onHitEntity(entityHitResult); +// super.onHitEntity(entityHitResult); Entity entity = entityHitResult.getEntity(); - int i = entity instanceof Blaze ? 0 : 15; // Deal 15 damage - entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + if (entity instanceof Blaze) { + if (this.getOwner() != null) { + this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); + } + } else { + int i = 15; // Deal 15 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + } } protected void onHit(HitResult hitResult) { super.onHit(hitResult); if (!this.level.isClientSide) { this.level.broadcastEntityEvent(this, (byte)3); - this.discard(); +// this.discard(); } } diff --git a/src/main/resources/assets/magus/fx/blue_fire.fx b/src/main/resources/assets/magus/fx/blue_fire.fx index 40bb8ede7bdf0e02d4cdb17e1ed7eb335ac24291..f438d4d713e2ab86db435e3cc3f63d53dcbe2a02 100644 GIT binary patch literal 2451 zcmV;E32gQsiwFP!00000|Lt2{Y#c`&pY?g~W9`^U6F{me6a*4|DB;5uDptJf^G9lm z6I-^Ms1)JO?alc{-rHTz>^eSI0v9AIq!JJ>Re36+pp?Qx)jR|wp!9+AkwQd4MW!IC ziU-~jBt$_#_|NRe-Pz~cOR&#zIZM%acmDI=|NQ6w`SV0WD2KA7LOqW#t|5d{3hJkP z-Y-lBFHsit+PFfH$}7$?$s%>ptGWbbUCcacT0}!>)3Hl*Nkdsi>>^==Wsw&AdfF)x zlpCX#Rd6sXYN*%rElWXZV&j5E6nIf$PDMq^+K)C6g0UKo>taM2>hT;gYlO3-PY1K& z86gGr6)eZ8OqNQ-^gvYA!c~wtJ>%jPpTP1yPS?p;b>1aJd|fZG&b#i3Y`61#*oGDdw=fL|_Y8YyifB5o}cDCI*cljq(X%(h9b? zvXw0U!T@k7I+faYG&IN@4|~+H!`-(3y=MqzFhwv^vKH?+#els z%Z}&R!zN`iRAhXcmK;{8F+Mi#bI+;FOZw9x17MZ|%e9N*FtTW%$i2MfmhmZUdJaRq zpPZbV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ssw(=ctVUtQX=(>7tlD(j zJ;y{?*Xe=hZAk6962Ik=h^pI?3RI>uEwySG#58gsHjNooaEAVSXo-O?KxOMA;a*h+ zfw%J-XQG?kL5X5>hf#so-`!fYt`39O-?cC*kUm#bxKC{rmG+gLg}|obbaWsP%B|HT z^LJIKb>SfrZ&wAtJB=N;^-kAy5?IC-Nj|jrZ*4I7+|YlN$-{^yAG<+lMD08$;&Xq> zXXu?5J~s7#|7iHSc^1blT}MgM#$}S?bW4XJBz2g}M^lFxJ=&s|z9>;Bx7qo++~x~) zU$$!2sGxo(@qH_UeeI*BTx@QO6nmDaWQwgDdd-H)#nVybT^G39vgJz{04QY+5G33*waNCn+u`gZf zD-GTEg!zr1=SuHC{Df&8c-$<0_)O?!KomciUwbfb{$Tkr^LyVuVRF+pe>^&Gj`v?l zQj~!QKN306O(d$;$}UP;TUK_^!Sw@|mX3baz&c4A8xc0bNxX;BWZw*{cdsef`v___|AP zz4dl%Jw|K`!!KSvY>r-jt@PUY@0bY7K62rr`Pip7Hd@uX1*Hcsy@Cr$-bWwfg5gV- zUctGC$m-*8OFJ1iU9F8Gm j89kK#@|#s0H~#P3-33|RYt8em!j|N}(y?2Sb3gz9qb- Date: Sun, 20 Oct 2024 14:41:16 -0400 Subject: [PATCH 360/469] Update TestProjectileEntity.java --- .../magus/skill/test/avatar/TestProjectileEntity.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index be9f6240..93416101 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -1,13 +1,7 @@ package com.amuzil.omegasource.magus.skill.test.avatar; -import com.amuzil.omegasource.magus.Magus; -import com.lowdragmc.photon.client.fx.EntityEffect; -import com.lowdragmc.photon.client.fx.FX; -import com.lowdragmc.photon.client.fx.FXHelper; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; From 5ec2412bd616db8b7851c768526b1f9be6db3868 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 20 Oct 2024 14:43:41 -0400 Subject: [PATCH 361/469] Update KeyboardMouseInputModule.java --- .../amuzil/omegasource/magus/input/KeyboardMouseInputModule.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 9c3ed0a2..d0141f20 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -180,6 +180,7 @@ public KeyboardMouseInputModule() { }; this.tickServerEventConsumer = event -> { + // NOTE: This is strictly for testing and to be deleted later if (c == 0) { synchronized (activeForm.get()) { if (!activeForm.get().name().equals("null")) { From f029049bf2e2c217a612ec4efd7bb5ab6c131086 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 20 Oct 2024 15:16:02 -0400 Subject: [PATCH 362/469] Update Magus.java --- src/main/java/com/amuzil/omegasource/magus/Magus.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index b4439dc7..2dfbfe27 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -66,6 +66,7 @@ public Magus() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); // Register Testing Entities + // NOTE: This is strictly for testing and to be deleted later AvatarEntities.register(FMLJavaModLoadingContext.get().getModEventBus()); } From d0d96f1e90557cf162fd7e5c1d0f56834cdb9d9e Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 20 Oct 2024 16:39:34 -0400 Subject: [PATCH 363/469] Update TestProjectileEntity.java --- .../magus/skill/test/avatar/TestProjectileEntity.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index 93416101..aca938ce 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -11,6 +11,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.EntityHitResult; import net.minecraft.world.phys.HitResult; @@ -51,6 +52,11 @@ protected void onHitEntity(EntityHitResult entityHitResult) { } } + protected void onHitBlock(BlockHitResult blockHitResult) { +// super.onHitBlock(blockHitResult); + this.discard(); + } + protected void onHit(HitResult hitResult) { super.onHit(hitResult); if (!this.level.isClientSide) { From b425e4080aec8b80cfcef4198ef36383cd564c00 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 02:02:55 -0400 Subject: [PATCH 364/469] init --- .../magus/input/KeyboardMouseInputModule.java | 7 +- .../test/avatar/TestProjectileEntity.java | 255 ++++++++++++++++-- 2 files changed, 242 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index d0141f20..857c6b36 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -6,7 +6,6 @@ import com.amuzil.omegasource.magus.radix.*; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; @@ -190,12 +189,12 @@ public KeyboardMouseInputModule() { if (activeForm.get().name().equals("force")) resource = new ResourceLocation(Magus.MOD_ID, "blue_fire"); ServerLevel level = event.getServer().getAllLevels().iterator().next(); - System.out.println("LEVEL: " + level); +// System.out.println("LEVEL: " + level); if (!level.isClientSide && resource != null) { - c = 20; + c = 5; Player player = Minecraft.getInstance().player; assert player != null; - TestProjectileEntity element = new TestProjectileEntity(level, player); + TestProjectileEntity element = new TestProjectileEntity(player, level); // element.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); element.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); level.addFreshEntity(element); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index aca938ce..9cc26b3b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -1,34 +1,251 @@ package com.amuzil.omegasource.magus.skill.test.avatar; +import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.monster.Blaze; -import net.minecraft.world.entity.projectile.AbstractArrow; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.ItemSupplier; +import net.minecraft.world.entity.projectile.Projectile; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.ClipContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.EntityHitResult; -import net.minecraft.world.phys.HitResult; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.VoxelShape; +import javax.annotation.Nullable; +import java.util.Optional; +import java.util.function.Predicate; -public class TestProjectileEntity extends AbstractArrow implements ItemSupplier { + +public class TestProjectileEntity extends Projectile implements ItemSupplier { public static final ItemStack PROJECTILE_ITEM = new ItemStack(Blocks.AIR); + private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(TestProjectileEntity.class, EntityDataSerializers.BYTE); + private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(TestProjectileEntity.class, EntityDataSerializers.BYTE); + private boolean leftOwner; + private boolean hasBeenShot; + private int life; public TestProjectileEntity(EntityType type, Level level) { super(type, level); + this.setNoGravity(true); + } + + public TestProjectileEntity(double x, double y, double z, Level level) { + this(AvatarEntities.TEST_PROJECTILE.get(), level); + this.setPos(x, y, z); + } + + public TestProjectileEntity(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + this.setOwner(livingEntity); + } + + public void projectileTick() { + if (!this.hasBeenShot) { + this.gameEvent(GameEvent.PROJECTILE_SHOOT, this.getOwner()); + this.hasBeenShot = true; + } + + if (!this.leftOwner) { + this.leftOwner = this.checkLeftOwner(); + } + + super.tick(); + } + + public void tick() { + this.projectileTick(); + boolean flag = this.isNoPhysics(); + Vec3 deltaMovement = this.getDeltaMovement(); + if (this.xRotO == 0.0F && this.yRotO == 0.0F) { + double distance = deltaMovement.horizontalDistance(); + this.setYRot((float)(Mth.atan2(deltaMovement.x, deltaMovement.z) * (double)(180F / (float)Math.PI))); + this.setXRot((float)(Mth.atan2(deltaMovement.y, distance) * (double)(180F / (float)Math.PI))); + this.yRotO = this.getYRot(); + this.xRotO = this.getXRot(); + } + + BlockPos blockpos = this.blockPosition(); + BlockState blockstate = this.level.getBlockState(blockpos); + if (!blockstate.isAir() && !flag) { + VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + if (!voxelshape.isEmpty()) { + Vec3 vec31 = this.position(); + + for(AABB aabb : voxelshape.toAabbs()) { + if (aabb.move(blockpos).contains(vec31)) { + break; + } + } + } + } + + if (this.isInWaterOrRain() || blockstate.is(Blocks.POWDER_SNOW) || this.isInFluidType((fluidType, height) -> this.canFluidExtinguish(fluidType))) { + this.clearFire(); + } + + Vec3 pos = this.position(); + Vec3 delta = pos.add(deltaMovement); + HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + if (hitresult.getType() != HitResult.Type.MISS) { + delta = hitresult.getLocation(); + } + + while(!this.isRemoved()) { + if (!this.level.isClientSide) { + this.tickDespawn(); + } + EntityHitResult entityhitresult = this.findHitEntity(pos, delta); + if (entityhitresult != null) { + hitresult = entityhitresult; + } + + if (hitresult != null && hitresult.getType() == HitResult.Type.ENTITY) { + assert hitresult instanceof EntityHitResult; + Entity entity = ((EntityHitResult)hitresult).getEntity(); + Entity owner = this.getOwner(); + if (entity instanceof Player && owner instanceof Player && !((Player)owner).canHarmPlayer((Player)entity)) { + hitresult = null; + entityhitresult = null; + } + } + + if (hitresult != null && hitresult.getType() != HitResult.Type.MISS && !flag) { + if (net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, hitresult)) + break; + this.onHit(hitresult); + this.hasImpulse = true; + } + + if (entityhitresult == null) { + break; + } + + hitresult = null; + } + deltaMovement = this.getDeltaMovement(); + double d5 = deltaMovement.x; + double d6 = deltaMovement.y; + double d1 = deltaMovement.z; + + double d7 = this.getX() + d5; + double d2 = this.getY() + d6; + double d3 = this.getZ() + d1; + double d4 = deltaMovement.horizontalDistance(); + if (flag) { + this.setYRot((float)(Mth.atan2(-d5, -d1) * (double)(180F / (float)Math.PI))); + } else { + this.setYRot((float)(Mth.atan2(d5, d1) * (double)(180F / (float)Math.PI))); + } + + this.setXRot((float)(Mth.atan2(d6, d4) * (double)(180F / (float)Math.PI))); + this.setXRot(lerpRotation(this.xRotO, this.getXRot())); + this.setYRot(lerpRotation(this.yRotO, this.getYRot())); + + float f = 0.99F; + this.setDeltaMovement(deltaMovement.scale((double)f)); + if (!this.isNoGravity() && !flag) { + Vec3 vec34 = this.getDeltaMovement(); + this.setDeltaMovement(vec34.x, vec34.y - (double)0.05F, vec34.z); + } + + this.setPos(d7, d2, d3); + this.checkInsideBlocks(); + } + + @Nullable + protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { + return getEntityHitResult(this.level, this, pos, delta, + this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), + this::canHitEntity, 0.3F); + } + + @Nullable + public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Vec3 pos, Vec3 delta, AABB thisAABB, Predicate canBeHit, float scale) { + double maxDist = Double.MAX_VALUE; + Entity entity = null; + + for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { + System.out.println("ENTITY NEARBY: " + otherEntity); + AABB aabb = otherEntity.getBoundingBox().inflate(scale); + Optional optional = aabb.clip(pos, delta); + if (optional.isPresent()) { + double dist = pos.distanceToSqr(optional.get()); + if (dist < maxDist) { + entity = otherEntity; + maxDist = dist; + } + } + } + + return entity == null ? null : new EntityHitResult(entity); + } + + public boolean canHitEntity(Entity otherEntity) { + if (!otherEntity.canBeHitByProjectile()) { + return false; + } else { + Entity entity = this.getOwner(); +// if (entity != null) { +// if (otherEntity instanceof TestProjectileEntity other) { +// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); +// System.out.println("THAT OWNER: " + other.getOwner()); +// } +// } + return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); + } + } + + protected void tickDespawn() { + ++this.life; + if (this.life >= 600) { + System.out.println("BYE BYE BBY"); + this.discard(); + } } - public TestProjectileEntity(Level Level, LivingEntity livingEntity) { - super(AvatarEntities.TEST_PROJECTILE.get(), livingEntity, Level); + @Override + public boolean isPickable() { + return true; + } + + @Override + protected void defineSynchedData() { + this.entityData.define(ID_FLAGS, (byte)0); + this.entityData.define(PIERCE_LEVEL, (byte)0); + } + + private boolean checkLeftOwner() { + Entity owner = this.getOwner(); + if (owner != null) { + for(Entity entity1 : this.level.getEntities(this, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(1.0D), (entity) -> { + return !entity.isSpectator() && entity.isPickable(); + })) { + if (entity1.getRootVehicle() == owner.getRootVehicle()) { + return false; + } + } + } + return true; } - public TestProjectileEntity(Level Level, double x, double y, double z) { - super(AvatarEntities.TEST_PROJECTILE.get(), x, y, z, Level); + public boolean isNoPhysics() { + if (!this.level.isClientSide) { + return this.noPhysics; + } else { + return (this.entityData.get(ID_FLAGS) & 2) != 0; + } } public void handleEntityEvent(byte data) { @@ -40,15 +257,21 @@ public void handleEntityEvent(byte data) { } protected void onHitEntity(EntityHitResult entityHitResult) { -// super.onHitEntity(entityHitResult); Entity entity = entityHitResult.getEntity(); if (entity instanceof Blaze) { if (this.getOwner() != null) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } - } else { - int i = 15; // Deal 15 damage + } else if (entity instanceof TestProjectileEntity) { + System.out.println("SUCCESS MADE IT HIT!!!"); + if (this.getOwner() != null) { + this.discard(); // kys asap +// this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); + } + } else { + int i = 10; // Deal 10 damage entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + this.discard(); } } @@ -69,10 +292,10 @@ private ParticleOptions getParticle() { return ParticleTypes.FLAME; } - @Override - protected ItemStack getPickupItem() { - return PROJECTILE_ITEM; - } +// @Override +// protected ItemStack getPickupItem() { +// return PROJECTILE_ITEM; +// } @Override public ItemStack getItem() { From 880f029c2416b3f66bd09462f28f665c2629b0e8 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 02:04:32 -0400 Subject: [PATCH 365/469] Update TestProjectileEntity.java --- .../magus/skill/test/avatar/TestProjectileEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index 9cc26b3b..a170602a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -209,7 +209,7 @@ public boolean canHitEntity(Entity otherEntity) { protected void tickDespawn() { ++this.life; - if (this.life >= 600) { + if (this.life >= 200) { System.out.println("BYE BYE BBY"); this.discard(); } From 2c3e9e95382f6620712a26930a0fe4817cb410c5 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 02:54:21 -0400 Subject: [PATCH 366/469] collision working lowkey --- .../skill/test/avatar/TestProjectileEntity.java | 9 +++++++++ src/main/resources/assets/magus/fx/orb_bloom.fx | Bin 0 -> 2393 bytes 2 files changed, 9 insertions(+) create mode 100644 src/main/resources/assets/magus/fx/orb_bloom.fx diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index a170602a..1be5da03 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -1,11 +1,16 @@ package com.amuzil.omegasource.magus.skill.test.avatar; +import com.amuzil.omegasource.magus.Magus; +import com.lowdragmc.photon.client.fx.EntityEffect; +import com.lowdragmc.photon.client.fx.FX; +import com.lowdragmc.photon.client.fx.FXHelper; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -126,6 +131,7 @@ public void tick() { break; this.onHit(hitresult); this.hasImpulse = true; + break; } if (entityhitresult == null) { @@ -265,6 +271,9 @@ protected void onHitEntity(EntityHitResult entityHitResult) { } else if (entity instanceof TestProjectileEntity) { System.out.println("SUCCESS MADE IT HIT!!!"); if (this.getOwner() != null) { + FX fx = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "orb_bloom")); + EntityEffect entityEffect = new EntityEffect(fx, level, entity); + entityEffect.start(); this.discard(); // kys asap // this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } diff --git a/src/main/resources/assets/magus/fx/orb_bloom.fx b/src/main/resources/assets/magus/fx/orb_bloom.fx new file mode 100644 index 0000000000000000000000000000000000000000..a93ad863d40dab32fd77ad6805ae8d586332cab7 GIT binary patch literal 2393 zcmV-f38wZRiwFP!00000|Lt2{XdTBDp7qt$y>}&BR&AH0LZH(!E+)v7{??7tCmPXU?8EbIv#Ce4eW#R6|wbQXvTAIznhbL&KEM zh4ty^A*!MQ54!{nT9jE1siN|NXaxjS1Iz@4Cpx_Hy#`&>QI!$TCXBEu(xX2w`Zhte z3FW=Tb(~SnP1n63Ja0`?knrGPKPG}KNfQ%tdSIIb>T+PZ5i{*x}m7Zs`|} zffUz%y*pp*_Hz;tY&_{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+YFiPI z4}e+nl9*+{mZ>o7%$YNrFl$6fAM-){Si&$+4`pF%=dAX*E}(T-7}A{|BE5%-L!`UN zs6JCLst1!%&0>~pjU?ZSeMxmnPoX>tptcqzV~MlH8XZJN^$R_JT(5}1f?M4Nw~GD; Lx8DL9{8In`bJ?4j literal 0 HcmV?d00001 From 93f8ae92c693b0235c254224245805fd83631bcc Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 15:00:05 -0400 Subject: [PATCH 367/469] Update TestProjectileEntity.java --- .../magus/skill/test/avatar/TestProjectileEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index 1be5da03..19f94ead 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -215,7 +215,7 @@ public boolean canHitEntity(Entity otherEntity) { protected void tickDespawn() { ++this.life; - if (this.life >= 200) { + if (this.life >= 150) { System.out.println("BYE BYE BBY"); this.discard(); } From 4e346f1525aac576ca1e553a54f5b277beab4d3d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 15:29:55 -0400 Subject: [PATCH 368/469] fix runServer error --- .../com/amuzil/omegasource/magus/Magus.java | 33 +++++-------------- .../omegasource/magus/input/InputModule.java | 33 +++++++++++-------- .../skill/test/avatar/AvatarCommand.java | 4 +-- 3 files changed, 30 insertions(+), 40 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 2dfbfe27..05c6b1ec 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -47,11 +47,6 @@ public class Magus { public static InputModule mouseMotionModule; public Magus() { - // Register ourselves for server and other game events we are interested in - MinecraftForge.EVENT_BUS.register(this); - //Register the input modules - keyboardMouseInputModule = new KeyboardMouseInputModule(); - mouseMotionModule = new MouseMotionModule(); // Register capabilities FMLJavaModLoadingContext.get().getModEventBus().addListener(CapabilityHandler::registerCapabilities); // attach capabilities @@ -65,6 +60,9 @@ public Magus() { // Register the doClientStuff method for mod loading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); + // Register ourselves for server and other game events we are interested in + MinecraftForge.EVENT_BUS.register(this); + // Register Testing Entities // NOTE: This is strictly for testing and to be deleted later AvatarEntities.register(FMLJavaModLoadingContext.get().getModEventBus()); @@ -80,8 +78,11 @@ private void setup(final FMLCommonSetupEvent event) { private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client - //todo call this anytime the key mappings are updated - //Assign input data to forms + // Register the input modules + keyboardMouseInputModule = new KeyboardMouseInputModule(); + mouseMotionModule = new MouseMotionModule(); + // TODO - call this anytime the key mappings are updated + // Assign input data to forms FormDataRegistry.init(); ModifiersRegistry.init(); } @@ -124,22 +125,4 @@ public static void onClientSetup(FMLClientSetupEvent event) { LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); } } - - // Send a message to in-game chat - public static void sendDebugMsg(String msg) { - Minecraft minecraft = Minecraft.getInstance(); - if (minecraft == null) { - System.err.println("sendDebugMsg failed: Minecraft instance is null"); - return; - } - minecraft.execute(() -> { - LocalPlayer player = minecraft.player; - if (player != null) { - Component text = Component.literal(msg); - player.sendSystemMessage(text); - } else { - System.err.println("sendDebugMsg failed: player is null"); - } - }); - } } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 8db8c649..46d4ffbd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -17,7 +17,9 @@ import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; +import net.minecraft.client.player.LocalPlayer; import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; import net.minecraftforge.client.event.InputEvent; import org.apache.logging.log4j.LogManager; @@ -38,6 +40,24 @@ public abstract class InputModule { public boolean resetScrolling; protected AtomicReference lastActivatedForm = new AtomicReference<>(Forms.NULL); + // Send a message to in-game chat + public static void sendDebugMsg(String msg) { + Minecraft minecraft = Minecraft.getInstance(); + if (minecraft == null) { + System.err.println("sendDebugMsg failed: Minecraft instance is null"); + return; + } + minecraft.execute(() -> { + LocalPlayer player = minecraft.player; + if (player != null) { + Component text = Component.literal(msg); + player.sendSystemMessage(text); + } else { + System.err.println("sendDebugMsg failed: player is null"); + } + }); + } + public static EventCondition keyToCondition(InputConstants.Key key, int actionCondition) { if (key.getType().equals(InputConstants.Type.MOUSE)) { return new EventCondition<>(InputEvent.MouseButton.class, @@ -140,19 +160,6 @@ public void resetConditions() { } } -// private Form checkForForm() { -// if (!activeConditions.isEmpty()) { -// List conditions = activeConditions.stream().toList(); -// List recognized = formsTree.search(conditions); -// if (recognized != null) { -// return FormDataRegistry.formsNamespace.get(recognized.hashCode()); -// System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); -// Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); -// } -// } -// return new Form(); -// } - public void init() { resetKeys(); registerInputs(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index a0710714..06eee371 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -26,7 +26,7 @@ public static void register(CommandDispatcher dispatcher) { .executes(c -> tree()) ) .executes(c -> { - Magus.sendDebugMsg("Possible modes: record, tree, reset"); + InputModule.sendDebugMsg("Possible modes: record, tree, reset"); return 1; }) ); @@ -53,7 +53,7 @@ private static int reset() { InputModule.resetFormsTree(); AvatarFormRegistry.registerForms(); kim.registerRunnables(Magus.keyboardMouseInputModule.getFormsTree()); - Magus.sendDebugMsg("Reset Forms RadixTree"); + InputModule.sendDebugMsg("Reset Forms RadixTree"); return 1; } } \ No newline at end of file From 399710176e21326c67bdc54bc2d7c01e5a4cb869 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 15:31:16 -0400 Subject: [PATCH 369/469] comment out unnecessary code --- .../omegasource/magus/server/ServerEvents.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index c592fb18..eb2fa31a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -34,13 +34,13 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // initialise the radix tree and set the player as an instance property for sending packets. //todo this is temporary manual tree construction for testing purposes. the true tree will be // generated at runtime based on available skills for the player/entity. - Node secondNode = NodeBuilder.middle() - .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), - ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) - .build(); - //Resets the tree; for testing purposes. - if (capability.getTree() != null) - capability.getTree().burn(); +// Node secondNode = NodeBuilder.middle() +// .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), +// ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) +// .build(); +// //Resets the tree; for testing purposes. +// if (capability.getTree() != null) +// capability.getTree().burn(); // TODO: Need a way to convert forms into conditions // Need to test out the condition tree. use left alt/arc > strike (left click). // While this test code will directly use conditions, Skills will reference Forms @@ -81,7 +81,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // // Condition arc2 = new FormCondition(Forms.ARC, -1, Magus.keyboardInputModule); // arc2.register("ARC", () -> { -// Magus.sendDebugMsg("ARC FORM TRIGGERED"); +// Magus.keyboardMouseInputModule.sendDebugMsg("ARC FORM TRIGGERED"); // }, () -> {}); // // System.out.println("Test RadixTree"); @@ -121,7 +121,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { System.out.println("All RadixTree Branches:"); Magus.keyboardMouseInputModule.getFormsTree().printAllBranches(); Magus.keyboardMouseInputModule.init(); - Magus.keyboardMouseInputModule.registerModifiers(); +// Magus.keyboardMouseInputModule.registerModifiers(); Magus.mouseMotionModule.init(); } } From b06d17a3dc8b5dcc8a9316f85781cdef7db21e55 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 15:38:36 -0400 Subject: [PATCH 370/469] Update TestProjectileEntity.java --- .../magus/skill/test/avatar/TestProjectileEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index 19f94ead..c49509bc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -215,7 +215,7 @@ public boolean canHitEntity(Entity otherEntity) { protected void tickDespawn() { ++this.life; - if (this.life >= 150) { + if (this.life >= 100) { System.out.println("BYE BYE BBY"); this.discard(); } From 97c205eaaa82d1dfa4f381c61031105deb441105 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 15:42:34 -0400 Subject: [PATCH 371/469] refactor sendDebugMsg method --- .../magus/input/KeyboardMouseInputModule.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 857c6b36..62e5f469 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -157,10 +157,10 @@ public KeyboardMouseInputModule() { lastActivatedForm.set(activeForm.get()); // Extra check for race conditions. Probably wont' help... -// synchronized (lastActivatedForm.get()) { -// if (!lastActivatedForm.get().name().equals("null")) -// Magus.sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); -// } + synchronized (lastActivatedForm.get()) { + if (!lastActivatedForm.get().name().equals("null")) + sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); + } activeForm.set(Forms.NULL); ticksSinceActivated.set(0); timeout.set(0); @@ -225,7 +225,7 @@ private void checkForForm() { if (recognized != null) { activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); // System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); -// Magus.sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); +// sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); } } } From 5769e30e6b406b25f327c3e46758705759ebc5b3 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 23 Oct 2024 15:55:48 -0400 Subject: [PATCH 372/469] Update ServerEvents.java --- .../java/com/amuzil/omegasource/magus/server/ServerEvents.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index eb2fa31a..eab40025 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -130,6 +130,9 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { if (event.getEntity() instanceof Player) { + // TODO - Causes whole server to crash when player leaves + // java.lang.NullPointerException: Cannot invoke "com.amuzil.omegasource.magus.input.InputModule.getFormsTree()" + // because "com.amuzil.omegasource.magus.Magus.keyboardMouseInputModule" is null Magus.keyboardMouseInputModule.getFormsTree().deactivateAllConditions(); Magus.keyboardMouseInputModule.terminate(); Magus.mouseMotionModule.terminate(); From bc075e0b8733cc80b1b6697a59f374f80e32d64b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 25 Oct 2024 17:53:02 +1100 Subject: [PATCH 373/469] working on modifiers, capability refactoring --- .../magus/server/ServerEvents.java | 1 + .../listeners/TargetModifierListener.java | 5 +-- .../skill/util/capability/entity/Magi.java | 44 +++++++++++++++++++ .../util/traits/skilltraits/SourceTrait.java | 13 +++--- 4 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index c592fb18..eda9d398 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -26,6 +26,7 @@ public static void worldStart(LevelEvent event) {} public static void onEntityJoinLevel(EntityJoinLevelEvent event) { if (!event.getLevel().isClientSide()) { + // TODO: Add a wrapper class for getting capabilities and data. Maybe SkillUser? MagusEntity? Data capability = CapabilityHandler.getCapability(event.getEntity(), CapabilityHandler.LIVING_DATA); if (capability != null && event.getEntity() instanceof Player) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index 0db2f4b7..e9f4f6b5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.input.InputModule; +import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; @@ -45,7 +44,7 @@ public boolean shouldCollectModifierData(InputEvent.MouseButton event) { //TODO: Fix this this.activeDiscipline = InputModule.getDiscipline(); - + if(event instanceof InputEvent.MouseButton.Post && // prevents double activation(Pre- and Post-event firing) event.getButton() == InputConstants.MOUSE_BUTTON_MIDDLE && event.getAction() == InputConstants.PRESS) { Minecraft mc = Minecraft.getInstance(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java new file mode 100644 index 00000000..0ba3e4ca --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -0,0 +1,44 @@ +package com.amuzil.omegasource.magus.skill.util.capability.entity; + +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.world.entity.LivingEntity; + +import java.util.LinkedList; +import java.util.List; + +public class Magi { + + + private final Data capabilityData; + + public Magi(Data capabilityData) { + this.capabilityData = capabilityData; + } + + public static Magi get(LivingEntity entity) { + return new Magi(CapabilityHandler.getCapability(entity, CapabilityHandler.LIVING_DATA)); + } + + public LivingDataCapability.LivingDataCapabilityImp getMagusData() { + return (LivingDataCapability.LivingDataCapabilityImp) capabilityData; + } + public RadixTree getTree() { + return capabilityData.getTree(); + } + + public List getTraits() { + return getMagusData().getTraits(); + } + + public List getSkillTraits(Skill skill) { + // Get skill data based on the skill, + // then get the list of its traits. + + // Empty for now... + return new LinkedList<>(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SourceTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SourceTrait.java index bed31d00..fb2b8aae 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SourceTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/SourceTrait.java @@ -2,7 +2,6 @@ import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.core.BlockPos; -import net.minecraft.core.Registry; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -15,12 +14,12 @@ public class SourceTrait extends SkillTrait { //TODO: Change this to an IForgeBlockState and make it support modded blocks. Right now it only supports vanilla. - private BlockState state; + private IForgeBlockState state; private BlockPos pos; //Note: If you want to know how long a usable blockstate has been selected, use another //TimedTrait. - public SourceTrait(String name, BlockState state, BlockPos pos) { + public SourceTrait(String name, IForgeBlockState state, BlockPos pos) { super(name); this.state = state; this.pos = pos; @@ -29,7 +28,7 @@ public SourceTrait(String name, BlockState state, BlockPos pos) { @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putInt(getName() + " State", Block.getId(state)); + tag.putInt(getName() + " State", Block.getId((BlockState) state)); tag.putIntArray(getName() + " Pos", new int[] { pos.getX(), pos.getY(), pos.getZ() }); @@ -55,7 +54,11 @@ public void setPos(BlockPos pos) { } public BlockState getState() { - return state; + return (BlockState) state; + } + + public IForgeBlockState getForgeState() { + return this.state; } public BlockPos getPos() { From 71b61af21a0e6d4275a0e85834cf8e75449db902 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 25 Oct 2024 03:11:18 -0400 Subject: [PATCH 374/469] run multiple clients with dif users --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index 38b3b7d7..5aeda251 100644 --- a/build.gradle +++ b/build.gradle @@ -88,6 +88,8 @@ minecraft { client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id + // Set custom username + jvmArgs += ["--username", "Dev####"] } server { From 7ef6106fdc2ac54d6c3dfe251167d9019b36a403 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 25 Oct 2024 03:11:59 -0400 Subject: [PATCH 375/469] multiplayer fx working! stable so far --- .../com/amuzil/omegasource/magus/Magus.java | 4 +- .../magus/input/KeyboardMouseInputModule.java | 24 +++--- .../magus/network/MagusNetwork.java | 8 ++ .../network/packets/api/MagusPacket.java | 6 +- .../client_executed/FormActivatedPacket.java | 77 ++++++++++++++++--- .../radix/condition/MultiClientCondition.java | 2 +- .../magus/registry/Registries.java | 9 ++- .../magus/server/ServerEvents.java | 13 +++- .../omegasource/magus/skill/forms/Form.java | 1 + .../skill/test/avatar/AvatarFormRegistry.java | 7 ++ .../test/avatar/TestProjectileEntity.java | 13 +++- 11 files changed, 130 insertions(+), 34 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 05c6b1ec..da3c8bb6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -9,11 +9,14 @@ import com.amuzil.omegasource.magus.skill.test.avatar.AvatarCommand; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarEntities; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import com.lowdragmc.photon.client.fx.FX; +import com.lowdragmc.photon.client.fx.FXHelper; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.entity.EntityRenderers; import net.minecraft.client.renderer.entity.ThrownItemRenderer; import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.server.ServerStartingEvent; @@ -73,7 +76,6 @@ private void setup(final FMLCommonSetupEvent event) { Registries.init(); CapabilityHandler.initialiseCaps(); MagusNetwork.registerMessages(); - Forms.init(); } private void doClientStuff(final FMLClientSetupEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 62e5f469..2f226836 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.*; import com.amuzil.omegasource.magus.skill.conditionals.InputData; @@ -145,7 +146,7 @@ public KeyboardMouseInputModule() { ticksSinceActivated.getAndIncrement(); if (ticksSinceActivated.get() >= tickActivationThreshold) { // Always to send modifier data right when the form is activated - sendModifierData(); +// sendModifierData(); // if (lastActivatedForm != null && lastActivatedForm.name().equals(activeForm.name())) { // // Send modifier data of it being multi. @@ -158,8 +159,12 @@ public KeyboardMouseInputModule() { lastActivatedForm.set(activeForm.get()); // Extra check for race conditions. Probably wont' help... synchronized (lastActivatedForm.get()) { - if (!lastActivatedForm.get().name().equals("null")) + if (!lastActivatedForm.get().name().equals("null")) { + if (Minecraft.getInstance().getConnection() != null) { + MagusNetwork.sendToServer(new FormActivatedPacket(activeForm.get(), 0)); + } sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); + } } activeForm.set(Forms.NULL); ticksSinceActivated.set(0); @@ -194,13 +199,13 @@ public KeyboardMouseInputModule() { c = 5; Player player = Minecraft.getInstance().player; assert player != null; - TestProjectileEntity element = new TestProjectileEntity(player, level); -// element.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); - element.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); - level.addFreshEntity(element); - FX fx = FXHelper.getFX(resource); - EntityEffect entityEffect = new EntityEffect(fx, level, element); - entityEffect.start(); +// TestProjectileEntity element = new TestProjectileEntity(player, level, activeForm.get()); +// element.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); +// element.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); +// level.addFreshEntity(element); +// FX fx = FXHelper.getFX(resource); +// EntityEffect entityEffect = new EntityEffect(fx, level, element); +// entityEffect.start(); } } } @@ -311,7 +316,6 @@ public void registerRunnables(Node current) { @Override public void registerListeners() { - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ServerTickEvent.class, tickServerEventConsumer); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, tickEventConsumer); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.Key.class, keyboardListener); MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, InputEvent.MouseButton.class, mouseListener); diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java index c919eca9..9fa5d375 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; +import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.SkillTriggeredPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; @@ -14,6 +15,7 @@ import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; + public class MagusNetwork { private static final String PROTOCOL_VERSION = "1.0.0"; private static int packetId = 0; @@ -29,6 +31,12 @@ private static int nextID() { } public static void registerMessages() { + CHANNEL.messageBuilder(FormActivatedPacket.class, nextID()) + .encoder(FormActivatedPacket::toBytes) + .decoder(FormActivatedPacket::fromBytes) + .consumerMainThread(FormActivatedPacket::handle) + .add(); + CHANNEL.messageBuilder(ConditionActivatedPacket.class, nextID()) .encoder(ConditionActivatedPacket::toBytes) .decoder(ConditionActivatedPacket::fromBytes) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/api/MagusPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/api/MagusPacket.java index 34043a80..882ba598 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/api/MagusPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/api/MagusPacket.java @@ -7,6 +7,10 @@ public interface MagusPacket { void toBytes(FriendlyByteBuf buffer); + static MagusPacket fromBytes(FriendlyByteBuf buffer) { return null; } - boolean handle(Supplier context); + + static boolean handle(MagusPacket packet, Supplier context) { + return false; + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index e35beb6e..ff76629d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -1,42 +1,101 @@ package com.amuzil.omegasource.magus.network.packets.client_executed; +import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import com.amuzil.omegasource.magus.skill.test.avatar.TestProjectileEntity; +import com.lowdragmc.photon.client.fx.EntityEffect; +import com.lowdragmc.photon.client.fx.FX; +import net.minecraft.client.Minecraft; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.network.NetworkEvent; +import org.apache.logging.log4j.core.jmx.Server; +import java.util.Objects; +import java.util.function.Predicate; import java.util.function.Supplier; +import static com.amuzil.omegasource.magus.Magus.MOD_ID; +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.blue_fire; +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.fire_bloom; + + public class FormActivatedPacket implements MagusPacket { private final Form form; + private final int entityId; - public FormActivatedPacket(com.amuzil.omegasource.magus.skill.forms.Form condition) { - this.form = condition; + public FormActivatedPacket(com.amuzil.omegasource.magus.skill.forms.Form form, int entityId) { + this.form = Objects.requireNonNullElseGet(form, Form::new); + this.entityId = entityId; } public void toBytes(FriendlyByteBuf buf) { if (form != null) { buf.writeUtf(form.name()); + buf.writeInt(entityId); } } public static FormActivatedPacket fromBytes(FriendlyByteBuf buf) { String name = buf.readUtf(); - Form form = Registries.FORMS.get().getValue(new ResourceLocation(name)); - return new FormActivatedPacket(form); + int entityId = buf.readInt(); + Form form = Registries.FORMS.get().getValue(new ResourceLocation(MOD_ID, name)); + return new FormActivatedPacket(form, entityId); + } + + // Client-side handler method + @OnlyIn(Dist.CLIENT) + private static void handleClientSide(Form form, int entityId) { + System.out.println("Packet received on client"); + // Perform client-side particle effect or other rendering logic here + Player player = Minecraft.getInstance().player; + assert player != null; + Level level = player.level; + FX fx = null; + if (form.name().equals("strike")) + fx = fire_bloom; + if (form.name().equals("force")) + fx = blue_fire; + if (fx != null && entityId != -1) { + TestProjectileEntity entity = (TestProjectileEntity) player.level.getEntity(entityId); + EntityEffect entityEffect = new EntityEffect(fx, level, entity); + entityEffect.start(); + System.out.println("HANDLE CLIENT PACKET ---> " + form); + } } public boolean handle(Supplier ctx) { ctx.get().enqueueWork(() -> { - // Publish Form Event here - Player player = ctx.get().getSender(); + if (ctx.get().getDirection().getReceptionSide().isClient()) { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> handleClientSide(form, entityId)); + } else { + // Publish Form Event here + ServerPlayer player = ctx.get().getSender(); + assert player != null; + ServerLevel level = player.getLevel(); + TestProjectileEntity entity = new TestProjectileEntity(player, level, form); + entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); + level.addFreshEntity(entity); + MagusNetwork.sendToClient(new FormActivatedPacket(form, entity.getId()), player); + Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500; + for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { + MagusNetwork.sendToClient(new FormActivatedPacket(form, entity.getId()), nearbyPlayer); + } + System.out.println("HANDLE SERVER PACKET ---> " + form); + } }); return true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java index c44b7b41..d40752eb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/MultiClientCondition.java @@ -41,7 +41,7 @@ public void register(String name, Runnable onSuccess, Runnable onFailure) { if (executionTime > TIMEOUT_IN_TICKS) { this.onFailure().run(); - LogManager.getLogger().info("MULTI CONDITION TIMED OUT"); +// LogManager.getLogger().info("MULTI CONDITION TIMED OUT"); this.reset(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 0f882adc..da352b77 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -5,6 +5,7 @@ import com.amuzil.omegasource.magus.skill.elements.Discipline; import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillActive; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; @@ -120,9 +121,9 @@ public static void onRegistryRegister(NewRegistryEvent event) { SKILLS = event.create(skills); //Forms - RegistryBuilder forms = new RegistryBuilder<>(); - forms.setName(new ResourceLocation(Magus.MOD_ID, "forms")); - FORMS = event.create(forms); + RegistryBuilder formRegistryBuilder = new RegistryBuilder<>(); + formRegistryBuilder.setName(new ResourceLocation(Magus.MOD_ID, "forms")); + FORMS = event.create(formRegistryBuilder); //Modifiers } @@ -148,6 +149,7 @@ public static void onMissing(MissingMappingsEvent event) { @SubscribeEvent public static void gameRegistry(RegisterEvent event) { + Forms.init(); // Moved here so that forms registry gets populated /* Skill Categories. */ if (event.getRegistryKey().equals(SKILL_CATEGORIES.get().getRegistryKey())) { IForgeRegistry registry = SKILL_CATEGORIES.get(); @@ -174,7 +176,6 @@ public static void gameRegistry(RegisterEvent event) { IForgeRegistry registry = FORMS.get(); ResourceKey> resKey = registry.getRegistryKey(); - event.register(resKey, helper -> { for (Form form : forms) registry.register(form.name(), form); diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index eab40025..5bad4f74 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -8,6 +8,9 @@ import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.EntityLeaveLevelEvent; @@ -129,13 +132,15 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { @SubscribeEvent public static void OnPlayerLeaveWorld(EntityLeaveLevelEvent event) { - if (event.getEntity() instanceof Player) { + if (event.getEntity() instanceof ServerPlayer) { // TODO - Causes whole server to crash when player leaves // java.lang.NullPointerException: Cannot invoke "com.amuzil.omegasource.magus.input.InputModule.getFormsTree()" // because "com.amuzil.omegasource.magus.Magus.keyboardMouseInputModule" is null - Magus.keyboardMouseInputModule.getFormsTree().deactivateAllConditions(); - Magus.keyboardMouseInputModule.terminate(); - Magus.mouseMotionModule.terminate(); + if (Magus.keyboardMouseInputModule != null) { // Temporary fix until we decide which side to make InputModules + Magus.keyboardMouseInputModule.getFormsTree().deactivateAllConditions(); + Magus.keyboardMouseInputModule.terminate(); + Magus.mouseMotionModule.terminate(); + } } } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java index 13e3aa22..c6dc50d1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Form.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.List; + public class Form { private final String name; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 6a42eade..5025a1f4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.test.avatar; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.builders.InputPathBuilder; @@ -11,13 +12,19 @@ import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; +import com.lowdragmc.photon.client.fx.FX; +import com.lowdragmc.photon.client.fx.FXHelper; import net.minecraft.client.Minecraft; +import net.minecraft.resources.ResourceLocation; import java.util.LinkedList; import java.util.Map; public class AvatarFormRegistry { + public static FX fire_bloom = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "fire_bloom")); + public static FX blue_fire = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "blue_fire")); + public static FX orb_bloom =FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "orb_bloom")); public static void registerForms() { KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index c49509bc..7533edae 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -1,6 +1,9 @@ package com.amuzil.omegasource.magus.skill.test.avatar; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; import com.lowdragmc.photon.client.fx.FX; import com.lowdragmc.photon.client.fx.FXHelper; @@ -11,6 +14,7 @@ import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +36,8 @@ import java.util.Optional; import java.util.function.Predicate; +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; + public class TestProjectileEntity extends Projectile implements ItemSupplier { public static final ItemStack PROJECTILE_ITEM = new ItemStack(Blocks.AIR); @@ -51,7 +57,7 @@ public TestProjectileEntity(double x, double y, double z, Level level) { this.setPos(x, y, z); } - public TestProjectileEntity(LivingEntity livingEntity, Level level) { + public TestProjectileEntity(LivingEntity livingEntity, Level level, Form form) { this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); this.setOwner(livingEntity); } @@ -270,9 +276,8 @@ protected void onHitEntity(EntityHitResult entityHitResult) { } } else if (entity instanceof TestProjectileEntity) { System.out.println("SUCCESS MADE IT HIT!!!"); - if (this.getOwner() != null) { - FX fx = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "orb_bloom")); - EntityEffect entityEffect = new EntityEffect(fx, level, entity); + if (this.getOwner() != null && this.level.isClientSide) { + EntityEffect entityEffect = new EntityEffect(orb_bloom, level, entity); entityEffect.start(); this.discard(); // kys asap // this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); From caf1577f8fedfd4b4200db3425750713b6181115 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 25 Oct 2024 03:18:44 -0400 Subject: [PATCH 376/469] clean up some prints --- .../network/packets/client_executed/FormActivatedPacket.java | 1 - .../magus/skill/test/avatar/TestProjectileEntity.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index ff76629d..d2dcc915 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -59,7 +59,6 @@ public static FormActivatedPacket fromBytes(FriendlyByteBuf buf) { // Client-side handler method @OnlyIn(Dist.CLIENT) private static void handleClientSide(Form form, int entityId) { - System.out.println("Packet received on client"); // Perform client-side particle effect or other rendering logic here Player player = Minecraft.getInstance().player; assert player != null; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index 7533edae..194b47ad 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -189,7 +189,7 @@ public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Entity entity = null; for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { - System.out.println("ENTITY NEARBY: " + otherEntity); +// System.out.println("ENTITY NEARBY: " + otherEntity); AABB aabb = otherEntity.getBoundingBox().inflate(scale); Optional optional = aabb.clip(pos, delta); if (optional.isPresent()) { @@ -222,7 +222,7 @@ public boolean canHitEntity(Entity otherEntity) { protected void tickDespawn() { ++this.life; if (this.life >= 100) { - System.out.println("BYE BYE BBY"); +// System.out.println("BYE BYE BBY"); this.discard(); } } From e287b695c834deff5d6eeb3ad0bc8b8a7e6d01bd Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 25 Oct 2024 03:32:02 -0400 Subject: [PATCH 377/469] fix custom username arg --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5aeda251..87655afa 100644 --- a/build.gradle +++ b/build.gradle @@ -89,7 +89,7 @@ minecraft { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id // Set custom username - jvmArgs += ["--username", "Dev####"] + args "--username", "Dev####" } server { From bea2005ff3d52b99f151a7a022e98ada28576080 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 25 Oct 2024 03:40:55 -0400 Subject: [PATCH 378/469] exclude player that fires --- .../packets/client_executed/FormActivatedPacket.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index d2dcc915..a10b4fb8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -86,10 +86,12 @@ public boolean handle(Supplier ctx) { assert player != null; ServerLevel level = player.getLevel(); TestProjectileEntity entity = new TestProjectileEntity(player, level, form); - entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); + entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); level.addFreshEntity(entity); MagusNetwork.sendToClient(new FormActivatedPacket(form, entity.getId()), player); - Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500; + Predicate predicate = (serverPlayer) -> { + return player.distanceToSqr(serverPlayer) < 2500 && !player.equals(serverPlayer); + }; for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { MagusNetwork.sendToClient(new FormActivatedPacket(form, entity.getId()), nearbyPlayer); } From 431fbea4aca7fb32b9b43b7928fac73fa4bad47a Mon Sep 17 00:00:00 2001 From: David Jake Morfe Date: Fri, 25 Oct 2024 05:06:15 -0400 Subject: [PATCH 379/469] no need to check entityId Signed-off-by: David Jake Morfe --- .../network/packets/client_executed/FormActivatedPacket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index a10b4fb8..09d1d878 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -68,7 +68,7 @@ private static void handleClientSide(Form form, int entityId) { fx = fire_bloom; if (form.name().equals("force")) fx = blue_fire; - if (fx != null && entityId != -1) { + if (fx != null) { TestProjectileEntity entity = (TestProjectileEntity) player.level.getEntity(entityId); EntityEffect entityEffect = new EntityEffect(fx, level, entity); entityEffect.start(); From b76f9dd0d4f8ba27e239a3300260053d03b2c0ae Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 25 Oct 2024 23:43:49 +1100 Subject: [PATCH 380/469] slowly setting up generic Magi class for usage --- .../magus/level/event/FormActivatedEvent.java | 28 +++++++++++++++++++ .../skill/util/capability/entity/Magi.java | 14 +++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/level/event/FormActivatedEvent.java diff --git a/src/main/java/com/amuzil/omegasource/magus/level/event/FormActivatedEvent.java b/src/main/java/com/amuzil/omegasource/magus/level/event/FormActivatedEvent.java new file mode 100644 index 00000000..f3ae12ae --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/level/event/FormActivatedEvent.java @@ -0,0 +1,28 @@ +package com.amuzil.omegasource.magus.level.event; + +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraftforge.eventbus.api.Event; + +import java.util.List; + +public class FormActivatedEvent extends Event { + private Form form; + private List modifiers; + + public FormActivatedEvent(Form form) { + this.form = form; + } + + public FormActivatedEvent(Form form, List modifierData) { + this(form); + this.modifiers = modifierData; + } + public Form getForm() { + return this.form; + } + + public List getModifierData() { + return this.modifiers; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index 0ba3e4ca..d8b09174 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -3,9 +3,13 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import com.amuzil.omegasource.magus.skill.util.data.SkillData; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.common.util.FakePlayer; import java.util.LinkedList; import java.util.List; @@ -26,6 +30,7 @@ public static Magi get(LivingEntity entity) { public LivingDataCapability.LivingDataCapabilityImp getMagusData() { return (LivingDataCapability.LivingDataCapabilityImp) capabilityData; } + public RadixTree getTree() { return capabilityData.getTree(); } @@ -37,8 +42,15 @@ public List getTraits() { public List getSkillTraits(Skill skill) { // Get skill data based on the skill, // then get the list of its traits. - // Empty for now... return new LinkedList<>(); } + + public static boolean isEntitySupported(Entity entity) { + return entity instanceof LivingEntity; + } + + public SkillData getSkillData(Skill skill) { + return null; + } } From bd9723c3d07ff4d165b0a13da2058eb51a42a8ba Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 25 Oct 2024 14:50:21 -0400 Subject: [PATCH 381/469] use PacketDistributor to send to nearby clients --- .../client_executed/FormActivatedPacket.java | 18 +++++++++++------- .../test/avatar/TestProjectileEntity.java | 9 +-------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 09d1d878..595161d0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -21,6 +21,7 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.network.NetworkEvent; +import net.minecraftforge.network.PacketDistributor; import org.apache.logging.log4j.core.jmx.Server; import java.util.Objects; @@ -88,13 +89,16 @@ public boolean handle(Supplier ctx) { TestProjectileEntity entity = new TestProjectileEntity(player, level, form); entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); level.addFreshEntity(entity); - MagusNetwork.sendToClient(new FormActivatedPacket(form, entity.getId()), player); - Predicate predicate = (serverPlayer) -> { - return player.distanceToSqr(serverPlayer) < 2500 && !player.equals(serverPlayer); - }; - for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { - MagusNetwork.sendToClient(new FormActivatedPacket(form, entity.getId()), nearbyPlayer); - } + FormActivatedPacket packet = new FormActivatedPacket(form, entity.getId()); +// MagusNetwork.sendToClient(packet, player); +// Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500 && !player.equals(serverPlayer); +// for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { +// MagusNetwork.sendToClient(packet, nearbyPlayer); +// } + + MagusNetwork.CHANNEL.send(PacketDistributor.NEAR.with( + () -> new PacketDistributor.TargetPoint(player.getX(), player.getY(), player.getZ(), + 500, level.dimension())), packet); System.out.println("HANDLE SERVER PACKET ---> " + form); } }); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index 194b47ad..19fac195 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -1,20 +1,13 @@ package com.amuzil.omegasource.magus.skill.test.avatar; -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.network.MagusNetwork; -import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; -import com.lowdragmc.photon.client.fx.FX; -import com.lowdragmc.photon.client.fx.FXHelper; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -275,10 +268,10 @@ protected void onHitEntity(EntityHitResult entityHitResult) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } } else if (entity instanceof TestProjectileEntity) { - System.out.println("SUCCESS MADE IT HIT!!!"); if (this.getOwner() != null && this.level.isClientSide) { EntityEffect entityEffect = new EntityEffect(orb_bloom, level, entity); entityEffect.start(); + System.out.println("SUCCESS COLLISION!!!"); this.discard(); // kys asap // this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } From c13b688934f3b5ff5c343ca70146862e0b9e2780 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 26 Oct 2024 12:45:03 +1100 Subject: [PATCH 382/469] Slowly adding in special logic so that avatar is get up and go --- .../skill/util/capability/entity/Magi.java | 30 ++++++++- .../util/traits/entitytraits/EnergyTrait.java | 61 +++++++++++++++++++ .../util/traits/skilltraits/ColourTrait.java | 3 +- 3 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/entitytraits/EnergyTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index d8b09174..69b856f1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -3,9 +3,11 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; +import com.amuzil.omegasource.magus.skill.util.data.SkillCategoryData; import com.amuzil.omegasource.magus.skill.util.data.SkillData; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; @@ -13,11 +15,14 @@ import java.util.LinkedList; import java.util.List; +import java.util.stream.Collectors; public class Magi { private final Data capabilityData; + private List skillData; + private List skillCategoryData; public Magi(Data capabilityData) { this.capabilityData = capabilityData; @@ -43,14 +48,35 @@ public List getSkillTraits(Skill skill) { // Get skill data based on the skill, // then get the list of its traits. // Empty for now... - return new LinkedList<>(); + return getSkillData(skill).getSkillTraits(); } public static boolean isEntitySupported(Entity entity) { return entity instanceof LivingEntity; } + // Returns appropriate SkillData from a list of SkillData public SkillData getSkillData(Skill skill) { - return null; + return getSkillData(skill.getId()); } + + public SkillData getSkillData(ResourceLocation id) { + return skillData.stream().filter(skillData1 -> skillData1.getSkillId().equals(id)).toList().get(0); + } + + public SkillData getSkillData(String id) { + ResourceLocation loc = new ResourceLocation(id); + return getSkillData(loc); + } + + // Called per tick + public void onUpdate() { + + } + + public void onDeath() { + + } + + } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/entitytraits/EnergyTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/entitytraits/EnergyTrait.java new file mode 100644 index 00000000..f598e3aa --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/entitytraits/EnergyTrait.java @@ -0,0 +1,61 @@ +package com.amuzil.omegasource.magus.skill.util.traits.entitytraits; + +import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; +import net.minecraft.nbt.CompoundTag; + +/** + * This serves as a generic wrapper for any kind of meter/energy bar for the player. + * Chi, mana, qi, nen, stamina, whatever. Other such classes should extend this, because this is the class that will be + * ticked and adjusted in Magi.java + * + * Example of a custom implementation: Chi.java for the Avatar Mod rework. + * Instead of just the values contained in this class, it will also track your "available" amount of energy, and adjust + * based on that. + * + * Of course, if you need more specific custom behaviour in terms of when to regenerate, how to regenerate energy, e.t.c, + * then make a child class extending Magi and add your logic there. + */ +public class EnergyTrait implements DataTrait { + private String name; + private double maxEnergy; + private double currentEnergy; + private boolean isDirty = false; + + public EnergyTrait(String name, double maxEnergy) { + this.name = name; + this.maxEnergy = maxEnergy; + this.currentEnergy = maxEnergy; + } + + @Override + public String getName() { + return name; + } + + @Override + public void markDirty() { + this.isDirty = true; + } + + @Override + public void markClean() { + this.isDirty = false; + } + + @Override + public boolean isDirty() { + return this.isDirty; + } + + @Override + public CompoundTag serializeNBT() { + return null; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + this.name = nbt.getString("name"); + this.maxEnergy = nbt.getDouble("max_energy"); + this.currentEnergy = nbt.getDouble("current_energy"); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java index 081bfe68..8cd803af 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/ColourTrait.java @@ -4,8 +4,7 @@ import net.minecraft.nbt.CompoundTag; /** - * Supports an R, G, and B value. Designed for 0 - 1D, but you can use an int if you divide - * by 255D. + * Supports an R, G, and B value. Designed for 0 - 1D, but you can pass an int. */ public class ColourTrait extends SkillTrait { From e3b0ad9322e2ef6c23cb39c763a1a145ea82867f Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 26 Oct 2024 15:43:35 +1100 Subject: [PATCH 383/469] finished generic energy trait wrapper --- .../util/traits/entitytraits/EnergyTrait.java | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/entitytraits/EnergyTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/entitytraits/EnergyTrait.java index f598e3aa..21261be1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/entitytraits/EnergyTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/entitytraits/EnergyTrait.java @@ -27,6 +27,28 @@ public EnergyTrait(String name, double maxEnergy) { this.currentEnergy = maxEnergy; } + public void setCurrentEnergy(double currentEnergy) { + this.currentEnergy = currentEnergy; + markDirty(); + } + + public void changeEnergy(double changeAmount) { + setCurrentEnergy(currentEnergy + changeAmount); + } + + public void setMaxEnergy(double maxEnergy) { + this.maxEnergy = maxEnergy; + markDirty(); + } + + public double getMaxEnergy() { + return this.maxEnergy; + } + + public double getCurrentEnergy() { + return this.currentEnergy; + } + @Override public String getName() { return name; @@ -49,7 +71,11 @@ public boolean isDirty() { @Override public CompoundTag serializeNBT() { - return null; + CompoundTag tag = new CompoundTag(); + tag.putString("name", getName()); + tag.putDouble("max_energy", maxEnergy); + tag.putDouble("current_energy", currentEnergy); + return tag; } @Override From 5d06917f3df71ef9af072d0dedb7baabf133d5eb Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 27 Oct 2024 00:02:28 +1100 Subject: [PATCH 384/469] testing out new abstraction layer --- .../magus/level/event/MagusEvents.java | 33 +++++++++++++++++++ .../magus/server/ServerEvents.java | 13 +++++--- .../entity/LivingDataCapability.java | 10 +++++- .../skill/util/capability/entity/Magi.java | 14 ++++++-- 4 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java diff --git a/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java b/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java new file mode 100644 index 00000000..f985ace5 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java @@ -0,0 +1,33 @@ +package com.amuzil.omegasource.magus.level.event; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.util.capability.entity.Magi; +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.event.entity.living.LivingDeathEvent; +import net.minecraftforge.event.entity.living.LivingEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(modid = Magus.MOD_ID) +public class MagusEvents { + + @SubscribeEvent + public static void tickEvent(LivingEvent.LivingTickEvent event) { + if (event.getEntity() != null) { + Magi magi = Magi.get(event.getEntity()); + if (magi != null) { + magi.onUpdate(); + } + } + } + + @SubscribeEvent + public static void deathEvent(LivingDeathEvent event) { + if (event.getEntity() != null) { + Magi magi = Magi.get(event.getEntity()); + if (magi != null) { + magi.onDeath(); + } + } + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index eda9d398..744d466f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -8,6 +8,8 @@ import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import com.amuzil.omegasource.magus.skill.util.capability.entity.Magi; +import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.event.entity.EntityJoinLevelEvent; import net.minecraftforge.event.entity.EntityLeaveLevelEvent; @@ -25,10 +27,11 @@ public static void worldStart(LevelEvent event) {} @SubscribeEvent public static void onEntityJoinLevel(EntityJoinLevelEvent event) { - if (!event.getLevel().isClientSide()) { + if (!event.getLevel().isClientSide() && event.getEntity() instanceof LivingEntity) { // TODO: Add a wrapper class for getting capabilities and data. Maybe SkillUser? MagusEntity? - Data capability = CapabilityHandler.getCapability(event.getEntity(), CapabilityHandler.LIVING_DATA); - if (capability != null && event.getEntity() instanceof Player) { + + Magi magi = Magi.get((LivingEntity) event.getEntity()); + if (magi != null && event.getEntity() instanceof Player) { @@ -40,8 +43,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) .build(); //Resets the tree; for testing purposes. - if (capability.getTree() != null) - capability.getTree().burn(); + if (magi.getTree() != null) + magi.getTree().burn(); // TODO: Need a way to convert forms into conditions // Need to test out the condition tree. use left alt/arc > strike (left click). // While this test code will directly use conditions, Skills will reference Forms diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java index 5395091e..b25e3148 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -15,6 +15,7 @@ import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.LivingEntity; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.capabilities.ICapabilitySerializable; @@ -49,6 +50,8 @@ public static class LivingDataCapabilityImp implements Data { private final List categories = new ArrayList<>(); private final List skills = new ArrayList<>(); private boolean isDirty; + // Instance of skill/magus supported entity, essentially. + private Magi magi = null; //Gets the tree from the event bus. private RadixTree tree; @@ -58,10 +61,15 @@ public LivingDataCapabilityImp() { //TODO: Data generation methods for each skill fillCategories(); fillSkills(); - markDirty(); } + public Magi getMagi(LivingEntity entity) { + if (magi == null) + magi = new Magi(this, entity); + return this.magi; + } + @Override public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index 69b856f1..9ee11f21 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -12,6 +12,7 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.common.util.FakePlayer; +import org.jetbrains.annotations.Nullable; import java.util.LinkedList; import java.util.List; @@ -23,13 +24,16 @@ public class Magi { private final Data capabilityData; private List skillData; private List skillCategoryData; + private LivingEntity magi; - public Magi(Data capabilityData) { + public Magi(Data capabilityData, LivingEntity entity) { this.capabilityData = capabilityData; + this.magi = entity; } + @Nullable public static Magi get(LivingEntity entity) { - return new Magi(CapabilityHandler.getCapability(entity, CapabilityHandler.LIVING_DATA)); + return ((LivingDataCapability.LivingDataCapabilityImp) (CapabilityHandler.getCapability(entity, CapabilityHandler.LIVING_DATA))).getMagi(entity); } public LivingDataCapability.LivingDataCapabilityImp getMagusData() { @@ -72,11 +76,17 @@ public SkillData getSkillData(String id) { // Called per tick public void onUpdate() { + if (getMagi().isOnGround()) { + System.out.println("Magi is on the ground."); + } } public void onDeath() { } + public LivingEntity getMagi() { + return this.magi; + } } From ac3d6a99217421a6019d8c395c1b8d2463ab72ff Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 27 Oct 2024 00:36:51 -0400 Subject: [PATCH 385/469] create a command to trigger forms on specified player --- .../skill/test/avatar/AvatarCommand.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index 06eee371..df45f849 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -3,10 +3,20 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.forms.Form; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.IntegerArgumentType; +import com.mojang.brigadier.arguments.StringArgumentType; +import com.mojang.brigadier.builder.LiteralArgumentBuilder; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; +import net.minecraft.commands.arguments.EntityArgument; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; + +import static com.amuzil.omegasource.magus.Magus.MOD_ID; public class AvatarCommand { @@ -25,13 +35,25 @@ public static void register(CommandDispatcher dispatcher) { ) .executes(c -> tree()) ) + .then(createActivateFormCommand()) .executes(c -> { - InputModule.sendDebugMsg("Possible modes: record, tree, reset"); + InputModule.sendDebugMsg("Options: activate_form, tree, reset"); return 1; }) ); } + private static LiteralArgumentBuilder createActivateFormCommand() { + return Commands.literal("activate") + .then(Commands.argument("form", StringArgumentType.string()) + .then(Commands.argument("target", EntityArgument.player()) + .executes(c -> activateForm( + StringArgumentType.getString(c, "form"), + EntityArgument.getPlayer(c, "target"))) + ) + ); + } + private static int key(int keyValue) { return 1; } @@ -56,4 +78,10 @@ private static int reset() { InputModule.sendDebugMsg("Reset Forms RadixTree"); return 1; } + + private static int activateForm(String name, ServerPlayer player) { + Form form = Registries.FORMS.get().getValue(new ResourceLocation(MOD_ID, name)); + FormActivatedPacket.handleServerSide(form, player); + return 1; + } } \ No newline at end of file From 09f642fd36615825e1dd63d2e05d5b1d1c9b48a9 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 28 Oct 2024 01:57:07 -0400 Subject: [PATCH 386/469] improved entity collision --- .../magus/input/KeyboardMouseInputModule.java | 6 +-- .../client_executed/FormActivatedPacket.java | 49 +++++++++--------- .../test/avatar/TestProjectileEntity.java | 20 ++++--- .../resources/assets/magus/fx/orb_bloom.fx | Bin 2393 -> 2391 bytes 4 files changed, 40 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 2f226836..1cbab3ae 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -11,10 +11,6 @@ import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; -import com.amuzil.omegasource.magus.skill.test.avatar.TestProjectileEntity; -import com.lowdragmc.photon.client.fx.EntityEffect; -import com.lowdragmc.photon.client.fx.FX; -import com.lowdragmc.photon.client.fx.FXHelper; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; @@ -163,7 +159,7 @@ public KeyboardMouseInputModule() { if (Minecraft.getInstance().getConnection() != null) { MagusNetwork.sendToServer(new FormActivatedPacket(activeForm.get(), 0)); } - sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); +// sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); } } activeForm.set(Forms.NULL); diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 595161d0..e4c06a5b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -12,20 +12,15 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; -import net.minecraft.world.phys.AABB; -import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.network.NetworkEvent; import net.minecraftforge.network.PacketDistributor; -import org.apache.logging.log4j.core.jmx.Server; import java.util.Objects; -import java.util.function.Predicate; import java.util.function.Supplier; import static com.amuzil.omegasource.magus.Magus.MOD_ID; @@ -36,9 +31,9 @@ public class FormActivatedPacket implements MagusPacket { private final Form form; - private final int entityId; + private final int entityId; // Entity ID to send back to client for FX - public FormActivatedPacket(com.amuzil.omegasource.magus.skill.forms.Form form, int entityId) { + public FormActivatedPacket(Form form, int entityId) { this.form = Objects.requireNonNullElseGet(form, Form::new); this.entityId = entityId; } @@ -57,7 +52,7 @@ public static FormActivatedPacket fromBytes(FriendlyByteBuf buf) { return new FormActivatedPacket(form, entityId); } - // Client-side handler method + // Client-side handler @OnlyIn(Dist.CLIENT) private static void handleClientSide(Form form, int entityId) { // Perform client-side particle effect or other rendering logic here @@ -77,29 +72,35 @@ private static void handleClientSide(Form form, int entityId) { } } + // Server-side handler + @OnlyIn(Dist.DEDICATED_SERVER) + public static void handleServerSide(Form form, ServerPlayer player) { + // Perform server-side entity spawning and updating logic and fire Form Event here + ServerLevel level = player.getLevel(); + TestProjectileEntity entity = new TestProjectileEntity(player, level); + entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); + level.addFreshEntity(entity); + FormActivatedPacket packet = new FormActivatedPacket(form, entity.getId()); + +// Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500; +// for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { +// MagusNetwork.sendToClient(packet, nearbyPlayer); +// } // Keep this in case we want a more specific client packet distribution filter + + MagusNetwork.CHANNEL.send(PacketDistributor.NEAR.with( + () -> new PacketDistributor.TargetPoint(player.getX(), player.getY(), player.getZ(), + 500, level.dimension())), packet); + System.out.println("HANDLE SERVER PACKET ---> " + form); + } + public boolean handle(Supplier ctx) { ctx.get().enqueueWork(() -> { if (ctx.get().getDirection().getReceptionSide().isClient()) { DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> handleClientSide(form, entityId)); } else { - // Publish Form Event here ServerPlayer player = ctx.get().getSender(); assert player != null; - ServerLevel level = player.getLevel(); - TestProjectileEntity entity = new TestProjectileEntity(player, level, form); - entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); - level.addFreshEntity(entity); - FormActivatedPacket packet = new FormActivatedPacket(form, entity.getId()); -// MagusNetwork.sendToClient(packet, player); -// Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500 && !player.equals(serverPlayer); -// for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { -// MagusNetwork.sendToClient(packet, nearbyPlayer); -// } - - MagusNetwork.CHANNEL.send(PacketDistributor.NEAR.with( - () -> new PacketDistributor.TargetPoint(player.getX(), player.getY(), player.getZ(), - 500, level.dimension())), packet); - System.out.println("HANDLE SERVER PACKET ---> " + form); + DistExecutor.unsafeRunWhenOn(Dist.DEDICATED_SERVER, () -> () -> handleServerSide(form, player)); } }); return true; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index 19fac195..da668809 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -39,6 +39,7 @@ public class TestProjectileEntity extends Projectile implements ItemSupplier { private boolean leftOwner; private boolean hasBeenShot; private int life; + private int ttk = 100; public TestProjectileEntity(EntityType type, Level level) { super(type, level); @@ -50,7 +51,7 @@ public TestProjectileEntity(double x, double y, double z, Level level) { this.setPos(x, y, z); } - public TestProjectileEntity(LivingEntity livingEntity, Level level, Form form) { + public TestProjectileEntity(LivingEntity livingEntity, Level level) { this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); this.setOwner(livingEntity); } @@ -212,9 +213,13 @@ public boolean canHitEntity(Entity otherEntity) { } } + protected void setTimeToKill(int ticks) { + this.ttk = ticks; + } + protected void tickDespawn() { ++this.life; - if (this.life >= 100) { + if (this.life >= ttk) { // System.out.println("BYE BYE BBY"); this.discard(); } @@ -267,13 +272,16 @@ protected void onHitEntity(EntityHitResult entityHitResult) { if (this.getOwner() != null) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } - } else if (entity instanceof TestProjectileEntity) { + } else if (entity instanceof TestProjectileEntity testProjectileEntity) { if (this.getOwner() != null && this.level.isClientSide) { - EntityEffect entityEffect = new EntityEffect(orb_bloom, level, entity); + TestProjectileEntity collisionEntity = new TestProjectileEntity(this.getX(), this.getY(), this.getZ(), level); + collisionEntity.setTimeToKill(5); + level.addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); entityEffect.start(); System.out.println("SUCCESS COLLISION!!!"); - this.discard(); // kys asap -// this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); + this.discard(); + testProjectileEntity.discard(); } } else { int i = 10; // Deal 10 damage diff --git a/src/main/resources/assets/magus/fx/orb_bloom.fx b/src/main/resources/assets/magus/fx/orb_bloom.fx index a93ad863d40dab32fd77ad6805ae8d586332cab7..1b2bbb90de25423d9f37a7058c08fdca76f5c645 100644 GIT binary patch delta 991 zcmV<510ej_64w&2hXsEkP#jj7T3W>RSK^j$(P+VEW5ew!`atFj)rLiSAx~Mo-D^Np zg=gmmw~xex)}|hE@{m$H4?&?&c?h(|xqml|kIfn5`@c}F>Xh6VZ@qt8weSAuhB^B8 zma+c$HS@X252H@;jd}9jADZ<$SB!r={hImFU%zPH{Eg_yXmo#Rov}EqHsv#E$^THY z8K^^sK}x3ns{C8-U^#6|~?aYLXU;gSP^P5+GZ@m73adv6+p82JJ zJ^TDOKHME{GxDij;5H9X1uaMQ4PQB6`K&lMSx}V)RasD#hYe^C*15?xRSDOpqAJbI zQp+pxn!$h62YPrK)C1K!Ow|0xde3%C(^GlAcxJpS7DMbBQqfu~` z#d*r&JY~OgmBo3={ytBs#d&EBRU(f+-Rbi3k}j{@A6(wJ|N1AYP=&U83eam3@d*;nkj~Q=TAItV&(WU88&_^8Gq4oAjP?a$hCqO?1 zqgsFFuD?`Jss*K5P^tx`T2QKe_EYp*w{As0MgOGDvF`k*=*EAqzikeE`<0DM>mDBp z9oz<^YV5{O(R&EZVN?@9-TDA&!KfCDYQd-$jB3HC<}#}LmzExK0`f>qKpxp40jX_8 zKt2Fw$xC9E0b8cRtTSiMY{IM&C4I~X@ncsB!$3Whg{_^l+UL4})?r~tcYcWU9x4uz z?joc5Ou?ugOhz?}S+X^fd@J@P)hRuN@+g4XT9k|>&K7HQ5E<1k^!#zXA_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fe84 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 28 Oct 2024 12:40:31 -0400 Subject: [PATCH 387/469] fixed bugs with singleplayer/multiplayer vs client/server --- .../packets/client_executed/FormActivatedPacket.java | 9 ++++----- .../magus/skill/test/avatar/TestProjectileEntity.java | 7 +------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index e4c06a5b..89441461 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -65,15 +65,14 @@ private static void handleClientSide(Form form, int entityId) { if (form.name().equals("force")) fx = blue_fire; if (fx != null) { - TestProjectileEntity entity = (TestProjectileEntity) player.level.getEntity(entityId); - EntityEffect entityEffect = new EntityEffect(fx, level, entity); - entityEffect.start(); +// TestProjectileEntity entity = (TestProjectileEntity) player.level.getEntity(entityId); +// EntityEffect entityEffect = new EntityEffect(fx, level, entity); +// entityEffect.start(); System.out.println("HANDLE CLIENT PACKET ---> " + form); } } // Server-side handler - @OnlyIn(Dist.DEDICATED_SERVER) public static void handleServerSide(Form form, ServerPlayer player) { // Perform server-side entity spawning and updating logic and fire Form Event here ServerLevel level = player.getLevel(); @@ -100,7 +99,7 @@ public boolean handle(Supplier ctx) { } else { ServerPlayer player = ctx.get().getSender(); assert player != null; - DistExecutor.unsafeRunWhenOn(Dist.DEDICATED_SERVER, () -> () -> handleServerSide(form, player)); + handleServerSide(form, player); } }); return true; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index da668809..c5f69758 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.magus.skill.test.avatar; -import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; @@ -284,6 +283,7 @@ protected void onHitEntity(EntityHitResult entityHitResult) { testProjectileEntity.discard(); } } else { + // TODO - Check if player entity has countered int i = 10; // Deal 10 damage entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); this.discard(); @@ -307,11 +307,6 @@ private ParticleOptions getParticle() { return ParticleTypes.FLAME; } -// @Override -// protected ItemStack getPickupItem() { -// return PROJECTILE_ITEM; -// } - @Override public ItemStack getItem() { return PROJECTILE_ITEM; From 0e784cd502732562f58039a0bbdb0ab4daeecb82 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 28 Oct 2024 12:49:13 -0400 Subject: [PATCH 388/469] move gravity setting --- .../magus/skill/test/avatar/TestProjectileEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java index c5f69758..6813f600 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java @@ -42,7 +42,6 @@ public class TestProjectileEntity extends Projectile implements ItemSupplier { public TestProjectileEntity(EntityType type, Level level) { super(type, level); - this.setNoGravity(true); } public TestProjectileEntity(double x, double y, double z, Level level) { @@ -53,6 +52,7 @@ public TestProjectileEntity(double x, double y, double z, Level level) { public TestProjectileEntity(LivingEntity livingEntity, Level level) { this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); this.setOwner(livingEntity); + this.setNoGravity(true); } public void projectileTick() { From 7cd1c3352317f995b6d9abbc29982b4731b3db52 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 28 Oct 2024 15:36:53 -0400 Subject: [PATCH 389/469] refactor --- .../test/avatar => entity}/AvatarEntities.java | 2 +- .../avatar => entity}/TestProjectileEntity.java | 17 +++++++++-------- .../omegasource/magus/input/InputModule.java | 1 - .../client_executed/FormActivatedPacket.java | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) rename src/main/java/com/amuzil/omegasource/magus/{skill/test/avatar => entity}/AvatarEntities.java (94%) rename src/main/java/com/amuzil/omegasource/magus/{skill/test/avatar => entity}/TestProjectileEntity.java (96%) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarEntities.java b/src/main/java/com/amuzil/omegasource/magus/entity/AvatarEntities.java similarity index 94% rename from src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarEntities.java rename to src/main/java/com/amuzil/omegasource/magus/entity/AvatarEntities.java index cf4afc75..3c0301db 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarEntities.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/AvatarEntities.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.test.avatar; +package com.amuzil.omegasource.magus.entity; import com.amuzil.omegasource.magus.Magus; import net.minecraft.world.entity.EntityType; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/entity/TestProjectileEntity.java similarity index 96% rename from src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java rename to src/main/java/com/amuzil/omegasource/magus/entity/TestProjectileEntity.java index 6813f600..f209c049 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/TestProjectileEntity.java @@ -1,4 +1,4 @@ -package com.amuzil.omegasource.magus.skill.test.avatar; +package com.amuzil.omegasource.magus.entity; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; @@ -257,13 +257,14 @@ public boolean isNoPhysics() { } } - public void handleEntityEvent(byte data) { - if (data == 3) { - for(int i = 0; i < 8; ++i) { - this.level.addParticle(this.getParticle(), this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); - } - } - } +// public void handleEntityEvent(byte data) { +// if (data == 3) { +// System.out.println("HANDLE ENTITY EVENT"); +// for(int i = 0; i < 8; ++i) { +// this.level.addParticle(this.getParticle(), this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); +// } +// } +// } protected void onHitEntity(EntityHitResult entityHitResult) { Entity entity = entityHitResult.getEntity(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 46d4ffbd..10ab8464 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -194,5 +194,4 @@ public void unregisterModifiers() { public abstract boolean keyPressed(int key); - } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 89441461..2db04bda 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -4,7 +4,7 @@ import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.test.avatar.TestProjectileEntity; +import com.amuzil.omegasource.magus.entity.TestProjectileEntity; import com.lowdragmc.photon.client.fx.EntityEffect; import com.lowdragmc.photon.client.fx.FX; import net.minecraft.client.Minecraft; @@ -65,9 +65,9 @@ private static void handleClientSide(Form form, int entityId) { if (form.name().equals("force")) fx = blue_fire; if (fx != null) { -// TestProjectileEntity entity = (TestProjectileEntity) player.level.getEntity(entityId); -// EntityEffect entityEffect = new EntityEffect(fx, level, entity); -// entityEffect.start(); + TestProjectileEntity entity = (TestProjectileEntity) player.level.getEntity(entityId); + EntityEffect entityEffect = new EntityEffect(fx, level, entity); + entityEffect.start(); System.out.println("HANDLE CLIENT PACKET ---> " + form); } } From 8674a3117d6abb19da5dc869411bf4e895f423e7 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 29 Oct 2024 01:24:43 -0400 Subject: [PATCH 390/469] started implementing generic element entity handling system also improved commands --- .../com/amuzil/omegasource/magus/Magus.java | 17 +- .../magus/entity/AvatarEntities.java | 27 +- .../magus/entity/ElementProjectile.java | 235 ++++++++++++++++ .../entity/collision/ElementCollision.java | 262 ++++++++++++++++++ .../entity/projectile/AirProjectile.java | 260 +++++++++++++++++ .../entity/projectile/EarthProjectile.java | 260 +++++++++++++++++ .../FireProjectile.java} | 72 ++--- .../entity/projectile/WaterProjectile.java | 260 +++++++++++++++++ .../omegasource/magus/input/InputModule.java | 18 +- .../magus/input/KeyboardMouseInputModule.java | 15 +- .../client_executed/FormActivatedPacket.java | 46 ++- .../amuzil/omegasource/magus/radix/Node.java | 7 +- .../omegasource/magus/radix/RadixTree.java | 15 +- .../magus/registry/Registries.java | 13 +- .../magus/skill/elements/Disciplines.java | 17 -- .../{Discipline.java => Element.java} | 17 +- .../magus/skill/elements/Elements.java | 24 ++ .../omegasource/magus/skill/forms/Forms.java | 3 +- .../listeners/TargetModifierListener.java | 13 +- .../magus/skill/skill/SkillCategory.java | 2 + .../skill/test/avatar/AvatarCommand.java | 80 +++--- .../util/bending/BendingMaterialUtil.java | 6 +- 22 files changed, 1477 insertions(+), 192 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java rename src/main/java/com/amuzil/omegasource/magus/entity/{TestProjectileEntity.java => projectile/FireProjectile.java} (81%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/elements/Disciplines.java rename src/main/java/com/amuzil/omegasource/magus/skill/elements/{Discipline.java => Element.java} (51%) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index da3c8bb6..196d21ab 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -1,22 +1,18 @@ package com.amuzil.omegasource.magus; -import com.amuzil.omegasource.magus.input.*; +import com.amuzil.omegasource.magus.entity.AvatarEntities; +import com.amuzil.omegasource.magus.input.InputModule; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.input.MouseMotionModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; -import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarCommand; -import com.amuzil.omegasource.magus.skill.test.avatar.AvatarEntities; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; -import com.lowdragmc.photon.client.fx.FX; -import com.lowdragmc.photon.client.fx.FXHelper; import net.minecraft.client.Minecraft; -import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.entity.EntityRenderers; import net.minecraft.client.renderer.entity.ThrownItemRenderer; -import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.server.ServerStartingEvent; @@ -122,7 +118,10 @@ public static void onClientSetup(FMLClientSetupEvent event) { LOGGER.info("HELLO FROM CLIENT SETUP"); KeyboardMouseInputModule.determineMotionKeys(); - EntityRenderers.register(AvatarEntities.TEST_PROJECTILE.get(), ThrownItemRenderer::new); + EntityRenderers.register(AvatarEntities.AIR_PROJECTILE_ENTITY_TYPE.get(), ThrownItemRenderer::new); + EntityRenderers.register(AvatarEntities.WATER_PROJECTILE_ENTITY_TYPE.get(), ThrownItemRenderer::new); + EntityRenderers.register(AvatarEntities.EARTH_PROJECTILE_ENTITY_TYPE.get(), ThrownItemRenderer::new); + EntityRenderers.register(AvatarEntities.FIRE_PROJECTILE_ENTITY_TYPE.get(), ThrownItemRenderer::new); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/AvatarEntities.java b/src/main/java/com/amuzil/omegasource/magus/entity/AvatarEntities.java index 3c0301db..29af4c55 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/AvatarEntities.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/AvatarEntities.java @@ -1,6 +1,11 @@ package com.amuzil.omegasource.magus.entity; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.entity.collision.ElementCollision; +import com.amuzil.omegasource.magus.entity.projectile.AirProjectile; +import com.amuzil.omegasource.magus.entity.projectile.EarthProjectile; +import com.amuzil.omegasource.magus.entity.projectile.FireProjectile; +import com.amuzil.omegasource.magus.entity.projectile.WaterProjectile; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MobCategory; import net.minecraftforge.eventbus.api.IEventBus; @@ -13,9 +18,25 @@ public class AvatarEntities { public static final DeferredRegister> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, Magus.MOD_ID); - public static final RegistryObject> TEST_PROJECTILE = - ENTITY_TYPES.register("test_projectile", () -> EntityType.Builder.of(TestProjectileEntity::new, MobCategory.MISC) - .sized(0.5f, 0.5f).build("test_projectile")); + public static final RegistryObject> AIR_PROJECTILE_ENTITY_TYPE = + ENTITY_TYPES.register("air_projectile", () -> EntityType.Builder.of(AirProjectile::new, MobCategory.MISC) + .sized(0.5f, 0.5f).build("air_projectile")); + + public static final RegistryObject> WATER_PROJECTILE_ENTITY_TYPE = + ENTITY_TYPES.register("water_projectile", () -> EntityType.Builder.of(WaterProjectile::new, MobCategory.MISC) + .sized(0.5f, 0.5f).build("water_projectile")); + + public static final RegistryObject> EARTH_PROJECTILE_ENTITY_TYPE = + ENTITY_TYPES.register("earth_projectile", () -> EntityType.Builder.of(EarthProjectile::new, MobCategory.MISC) + .sized(0.5f, 0.5f).build("earth_projectile")); + + public static final RegistryObject> FIRE_PROJECTILE_ENTITY_TYPE = + ENTITY_TYPES.register("fire_projectile", () -> EntityType.Builder.of(FireProjectile::new, MobCategory.MISC) + .sized(0.5f, 0.5f).build("fire_projectile")); + + public static final RegistryObject> COLLISION_ENTITY_TYPE = + ENTITY_TYPES.register("element_collision", () -> EntityType.Builder.of(ElementCollision::new, MobCategory.MISC) + .sized(0.5f, 0.5f).build("element_collision")); public static void register(IEventBus eventBus) { ENTITY_TYPES.register(eventBus); diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java new file mode 100644 index 00000000..a57a3e84 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java @@ -0,0 +1,235 @@ +package com.amuzil.omegasource.magus.entity; + +import com.amuzil.omegasource.magus.entity.projectile.AirProjectile; +import com.amuzil.omegasource.magus.entity.projectile.EarthProjectile; +import com.amuzil.omegasource.magus.entity.projectile.FireProjectile; +import com.amuzil.omegasource.magus.entity.projectile.WaterProjectile; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.lowdragmc.photon.client.fx.EntityEffect; +import com.lowdragmc.photon.client.fx.FX; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.monster.Blaze; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.projectile.ItemSupplier; +import net.minecraft.world.entity.projectile.Projectile; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.phys.*; + +import javax.annotation.Nullable; +import java.util.Optional; +import java.util.function.Predicate; + +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.*; + + +public abstract class ElementProjectile extends Projectile implements ItemSupplier { + public static final ItemStack PROJECTILE_ITEM = new ItemStack(Blocks.AIR); + private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(ElementProjectile.class, EntityDataSerializers.BYTE); + private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(ElementProjectile.class, EntityDataSerializers.BYTE); + protected boolean leftOwner; + private boolean hasBeenShot; + private int life; + private int ttk = 100; + + public ElementProjectile(EntityType type, Level level) { + super(type, level); + } + + public ElementProjectile(EntityType entityType, double x, double y, double z, Level level) { + this(entityType, level); + this.setPos(x, y, z); + } + + public ElementProjectile(EntityType entityType, LivingEntity livingEntity, Level level) { + this(entityType, livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + this.setOwner(livingEntity); + this.setNoGravity(true); + } + + public void tick() { + if (!this.hasBeenShot) { + this.gameEvent(GameEvent.PROJECTILE_SHOOT, this.getOwner()); + this.hasBeenShot = true; + } + + if (!this.leftOwner) { + this.leftOwner = this.checkLeftOwner(); + } + + super.tick(); + } + + @Nullable + protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { + return getEntityHitResult(this.level, this, pos, delta, + this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), + this::canHitEntity, 0.3F); + } + + @Nullable + public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Vec3 pos, Vec3 delta, AABB thisAABB, Predicate canBeHit, float scale) { + double maxDist = Double.MAX_VALUE; + Entity entity = null; + + for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { +// System.out.println("ENTITY NEARBY: " + otherEntity); + AABB aabb = otherEntity.getBoundingBox().inflate(scale); + Optional optional = aabb.clip(pos, delta); + if (optional.isPresent()) { + double dist = pos.distanceToSqr(optional.get()); + if (dist < maxDist) { + entity = otherEntity; + maxDist = dist; + } + } + } + + return entity == null ? null : new EntityHitResult(entity); + } + + public boolean canHitEntity(Entity otherEntity) { + if (!otherEntity.canBeHitByProjectile()) { + return false; + } else { + Entity entity = this.getOwner(); +// if (entity != null) { +// if (otherEntity instanceof TestProjectileEntity other) { +// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); +// System.out.println("THAT OWNER: " + other.getOwner()); +// } +// } + return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); + } + } + + public void setTimeToKill(int ticks) { + this.ttk = ticks; + } + + protected void tickDespawn() { + ++this.life; + if (this.life >= ttk) { +// System.out.println("BYE BYE BBY"); + this.discard(); + } + } + + @Override + public boolean isPickable() { + return true; + } + + @Override + protected void defineSynchedData() { + this.entityData.define(ID_FLAGS, (byte)0); + this.entityData.define(PIERCE_LEVEL, (byte)0); + } + + private boolean checkLeftOwner() { + Entity owner = this.getOwner(); + if (owner != null) { + for(Entity entity1 : this.level.getEntities(this, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(1.0D), (entity) -> { + return !entity.isSpectator() && entity.isPickable(); + })) { + if (entity1.getRootVehicle() == owner.getRootVehicle()) { + return false; + } + } + } + return true; + } + + public boolean isNoPhysics() { + if (!this.level.isClientSide) { + return this.noPhysics; + } else { + return (this.entityData.get(ID_FLAGS) & 2) != 0; + } + } + +// public void handleEntityEvent(byte data) { +// if (data == 3) { +// System.out.println("HANDLE ENTITY EVENT"); +// for(int i = 0; i < 8; ++i) { +// this.level.addParticle(this.getParticle(), this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); +// } +// } +// } + + protected void onHitEntity(EntityHitResult entityHitResult) { + Entity entity = entityHitResult.getEntity(); + if (entity instanceof Blaze) { + if (this.getOwner() != null) { + this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); + } + } else if (entity instanceof ElementProjectile testProjectileEntity) { + if (this.getOwner() != null && this.level.isClientSide) { + ElementProjectile collisionEntity = new FireProjectile(this.getX(), this.getY(), this.getZ(), level); + collisionEntity.setTimeToKill(5); + level.addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + entityEffect.start(); + System.out.println("SUCCESS COLLISION!!!"); + this.discard(); + testProjectileEntity.discard(); + } + } else { + // TODO - Check if player entity has countered + int i = 10; // Deal 10 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + this.discard(); + } + } + + protected void onHitBlock(BlockHitResult blockHitResult) { +// super.onHitBlock(blockHitResult); + this.discard(); + } + + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); + if (!this.level.isClientSide) { + this.level.broadcastEntityEvent(this, (byte)3); +// this.discard(); + } + } + + @Override + public ItemStack getItem() { + return PROJECTILE_ITEM; + } + + public static ElementProjectile createElementEntity(Form form, Element element, ServerPlayer player, ServerLevel level) { + return switch (element.type()) { + case AIR -> new AirProjectile(player, level); + case WATER -> new WaterProjectile(player, level); + case EARTH -> new EarthProjectile(player, level); + case FIRE -> new FireProjectile(player, level); + }; + } + + public void startEffect(Form form, Player player) { + FX fx = null; + if (form.name().equals("strike")) + fx = fire_bloom; + if (form.name().equals("force")) + fx = blue_fire; + if (fx != null) { + EntityEffect entityEffect = new EntityEffect(fx, level, this); + entityEffect.start(); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java new file mode 100644 index 00000000..17b8bc91 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java @@ -0,0 +1,262 @@ +package com.amuzil.omegasource.magus.entity.collision; + +import com.amuzil.omegasource.magus.entity.AvatarEntities; +import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.lowdragmc.photon.client.fx.EntityEffect; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.monster.Blaze; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; +import java.util.Optional; +import java.util.function.Predicate; + +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; + + +public class ElementCollision extends ElementProjectile { + private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(ElementCollision.class, EntityDataSerializers.BYTE); + private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(ElementCollision.class, EntityDataSerializers.BYTE); + private boolean leftOwner; + private boolean hasBeenShot; + private int life; + private int ttk = 10; + + public ElementCollision(EntityType type, Level level) { + super(type, level); + } + + public ElementCollision(double x, double y, double z, Level level) { + this(AvatarEntities.COLLISION_ENTITY_TYPE.get(), level); + this.setPos(x, y, z); + } + + public ElementCollision(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + this.setOwner(livingEntity); + this.setNoGravity(true); + } + + public void tick() { + super.tick(); + boolean flag = this.isNoPhysics(); + Vec3 deltaMovement = this.getDeltaMovement(); + if (this.xRotO == 0.0F && this.yRotO == 0.0F) { + double distance = deltaMovement.horizontalDistance(); + this.setYRot((float)(Mth.atan2(deltaMovement.x, deltaMovement.z) * (double)(180F / (float)Math.PI))); + this.setXRot((float)(Mth.atan2(deltaMovement.y, distance) * (double)(180F / (float)Math.PI))); + this.yRotO = this.getYRot(); + this.xRotO = this.getXRot(); + } + + BlockPos blockpos = this.blockPosition(); + BlockState blockstate = this.level.getBlockState(blockpos); + if (!blockstate.isAir() && !flag) { + VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + if (!voxelshape.isEmpty()) { + Vec3 vec31 = this.position(); + + for(AABB aabb : voxelshape.toAabbs()) { + if (aabb.move(blockpos).contains(vec31)) { + break; + } + } + } + } + + if (this.isInWaterOrRain() || blockstate.is(Blocks.POWDER_SNOW) || this.isInFluidType((fluidType, height) -> this.canFluidExtinguish(fluidType))) { + this.clearFire(); + } + + Vec3 pos = this.position(); + Vec3 delta = pos.add(deltaMovement); + HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + if (hitresult.getType() != HitResult.Type.MISS) { + delta = hitresult.getLocation(); + } + + while(!this.isRemoved()) { + if (!this.level.isClientSide) { + this.tickDespawn(); + } + EntityHitResult entityhitresult = this.findHitEntity(pos, delta); + if (entityhitresult != null) { + hitresult = entityhitresult; + } + + if (hitresult != null && hitresult.getType() == HitResult.Type.ENTITY) { + assert hitresult instanceof EntityHitResult; + Entity entity = ((EntityHitResult)hitresult).getEntity(); + Entity owner = this.getOwner(); + if (entity instanceof Player && owner instanceof Player && !((Player)owner).canHarmPlayer((Player)entity)) { + hitresult = null; + entityhitresult = null; + } + } + + if (hitresult != null && hitresult.getType() != HitResult.Type.MISS && !flag) { + if (net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, hitresult)) + break; + this.onHit(hitresult); + this.hasImpulse = true; + break; + } + + if (entityhitresult == null) { + break; + } + + hitresult = null; + } + deltaMovement = this.getDeltaMovement(); + double d5 = deltaMovement.x; + double d6 = deltaMovement.y; + double d1 = deltaMovement.z; + + double d7 = this.getX() + d5; + double d2 = this.getY() + d6; + double d3 = this.getZ() + d1; + double d4 = deltaMovement.horizontalDistance(); + if (flag) { + this.setYRot((float)(Mth.atan2(-d5, -d1) * (double)(180F / (float)Math.PI))); + } else { + this.setYRot((float)(Mth.atan2(d5, d1) * (double)(180F / (float)Math.PI))); + } + + this.setXRot((float)(Mth.atan2(d6, d4) * (double)(180F / (float)Math.PI))); + this.setXRot(lerpRotation(this.xRotO, this.getXRot())); + this.setYRot(lerpRotation(this.yRotO, this.getYRot())); + + float f = 0.99F; + this.setDeltaMovement(deltaMovement.scale((double)f)); + if (!this.isNoGravity() && !flag) { + Vec3 vec34 = this.getDeltaMovement(); + this.setDeltaMovement(vec34.x, vec34.y - (double)0.05F, vec34.z); + } + + this.setPos(d7, d2, d3); + this.checkInsideBlocks(); + } + + @Nullable + protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { + return getEntityHitResult(this.level, this, pos, delta, + this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), + this::canHitEntity, 0.3F); + } + + @Nullable + public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Vec3 pos, Vec3 delta, AABB thisAABB, Predicate canBeHit, float scale) { + double maxDist = Double.MAX_VALUE; + Entity entity = null; + + for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { +// System.out.println("ENTITY NEARBY: " + otherEntity); + AABB aabb = otherEntity.getBoundingBox().inflate(scale); + Optional optional = aabb.clip(pos, delta); + if (optional.isPresent()) { + double dist = pos.distanceToSqr(optional.get()); + if (dist < maxDist) { + entity = otherEntity; + maxDist = dist; + } + } + } + + return entity == null ? null : new EntityHitResult(entity); + } + + public boolean canHitEntity(Entity otherEntity) { + if (!otherEntity.canBeHitByProjectile()) { + return false; + } else { + Entity entity = this.getOwner(); +// if (entity != null) { +// if (otherEntity instanceof TestProjectileEntity other) { +// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); +// System.out.println("THAT OWNER: " + other.getOwner()); +// } +// } + return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); + } + } + + public void setTimeToKill(int ticks) { + this.ttk = ticks; + } + + protected void tickDespawn() { + ++this.life; + if (this.life >= ttk) { +// System.out.println("BYE BYE BBY"); + this.discard(); + } + } + + @Override + protected void defineSynchedData() { + this.entityData.define(ID_FLAGS, (byte)0); + this.entityData.define(PIERCE_LEVEL, (byte)0); + } + + public boolean isNoPhysics() { + if (!this.level.isClientSide) { + return this.noPhysics; + } else { + return (this.entityData.get(ID_FLAGS) & 2) != 0; + } + } + + protected void onHitEntity(EntityHitResult entityHitResult) { + Entity entity = entityHitResult.getEntity(); + if (entity instanceof Blaze) { + if (this.getOwner() != null) { + this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); + } + } else if (entity instanceof ElementCollision fireProjectileEntity) { + if (this.getOwner() != null && this.level.isClientSide) { + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); + collisionEntity.setTimeToKill(5); + level.addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + entityEffect.start(); + System.out.println("SUCCESS COLLISION!!!"); + this.discard(); + fireProjectileEntity.discard(); + } + } else { + // TODO - Check if player entity has countered + int i = 10; // Deal 10 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + this.discard(); + } + } + + protected void onHitBlock(BlockHitResult blockHitResult) { +// super.onHitBlock(blockHitResult); + this.discard(); + } + + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); + if (!this.level.isClientSide) { + this.level.broadcastEntityEvent(this, (byte)3); +// this.discard(); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java new file mode 100644 index 00000000..2b11f498 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java @@ -0,0 +1,260 @@ +package com.amuzil.omegasource.magus.entity.projectile; + +import com.amuzil.omegasource.magus.entity.AvatarEntities; +import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.lowdragmc.photon.client.fx.EntityEffect; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.monster.Blaze; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; +import java.util.Optional; +import java.util.function.Predicate; + +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; + + +public class AirProjectile extends ElementProjectile { + private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(AirProjectile.class, EntityDataSerializers.BYTE); + private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(AirProjectile.class, EntityDataSerializers.BYTE); + private int life; + private int ttk = 100; + + public AirProjectile(EntityType type, Level level) { + super(type, level); + } + + public AirProjectile(double x, double y, double z, Level level) { + this(AvatarEntities.AIR_PROJECTILE_ENTITY_TYPE.get(), level); + this.setPos(x, y, z); + } + + public AirProjectile(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + this.setOwner(livingEntity); + this.setNoGravity(true); + } + + public void tick() { + super.tick(); + boolean flag = this.isNoPhysics(); + Vec3 deltaMovement = this.getDeltaMovement(); + if (this.xRotO == 0.0F && this.yRotO == 0.0F) { + double distance = deltaMovement.horizontalDistance(); + this.setYRot((float)(Mth.atan2(deltaMovement.x, deltaMovement.z) * (double)(180F / (float)Math.PI))); + this.setXRot((float)(Mth.atan2(deltaMovement.y, distance) * (double)(180F / (float)Math.PI))); + this.yRotO = this.getYRot(); + this.xRotO = this.getXRot(); + } + + BlockPos blockpos = this.blockPosition(); + BlockState blockstate = this.level.getBlockState(blockpos); + if (!blockstate.isAir() && !flag) { + VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + if (!voxelshape.isEmpty()) { + Vec3 vec31 = this.position(); + + for(AABB aabb : voxelshape.toAabbs()) { + if (aabb.move(blockpos).contains(vec31)) { + break; + } + } + } + } + + if (this.isInWaterOrRain() || blockstate.is(Blocks.POWDER_SNOW) || this.isInFluidType((fluidType, height) -> this.canFluidExtinguish(fluidType))) { + this.clearFire(); + } + + Vec3 pos = this.position(); + Vec3 delta = pos.add(deltaMovement); + HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + if (hitresult.getType() != HitResult.Type.MISS) { + delta = hitresult.getLocation(); + } + + while(!this.isRemoved()) { + if (!this.level.isClientSide) { + this.tickDespawn(); + } + EntityHitResult entityhitresult = this.findHitEntity(pos, delta); + if (entityhitresult != null) { + hitresult = entityhitresult; + } + + if (hitresult != null && hitresult.getType() == HitResult.Type.ENTITY) { + assert hitresult instanceof EntityHitResult; + Entity entity = ((EntityHitResult)hitresult).getEntity(); + Entity owner = this.getOwner(); + if (entity instanceof Player && owner instanceof Player && !((Player)owner).canHarmPlayer((Player)entity)) { + hitresult = null; + entityhitresult = null; + } + } + + if (hitresult != null && hitresult.getType() != HitResult.Type.MISS && !flag) { + if (net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, hitresult)) + break; + this.onHit(hitresult); + this.hasImpulse = true; + break; + } + + if (entityhitresult == null) { + break; + } + + hitresult = null; + } + deltaMovement = this.getDeltaMovement(); + double d5 = deltaMovement.x; + double d6 = deltaMovement.y; + double d1 = deltaMovement.z; + + double d7 = this.getX() + d5; + double d2 = this.getY() + d6; + double d3 = this.getZ() + d1; + double d4 = deltaMovement.horizontalDistance(); + if (flag) { + this.setYRot((float)(Mth.atan2(-d5, -d1) * (double)(180F / (float)Math.PI))); + } else { + this.setYRot((float)(Mth.atan2(d5, d1) * (double)(180F / (float)Math.PI))); + } + + this.setXRot((float)(Mth.atan2(d6, d4) * (double)(180F / (float)Math.PI))); + this.setXRot(lerpRotation(this.xRotO, this.getXRot())); + this.setYRot(lerpRotation(this.yRotO, this.getYRot())); + + float f = 0.99F; + this.setDeltaMovement(deltaMovement.scale((double)f)); + if (!this.isNoGravity() && !flag) { + Vec3 vec34 = this.getDeltaMovement(); + this.setDeltaMovement(vec34.x, vec34.y - (double)0.05F, vec34.z); + } + + this.setPos(d7, d2, d3); + this.checkInsideBlocks(); + } + + @Nullable + protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { + return getEntityHitResult(this.level, this, pos, delta, + this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), + this::canHitEntity, 0.3F); + } + + @Nullable + public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Vec3 pos, Vec3 delta, AABB thisAABB, Predicate canBeHit, float scale) { + double maxDist = Double.MAX_VALUE; + Entity entity = null; + + for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { +// System.out.println("ENTITY NEARBY: " + otherEntity); + AABB aabb = otherEntity.getBoundingBox().inflate(scale); + Optional optional = aabb.clip(pos, delta); + if (optional.isPresent()) { + double dist = pos.distanceToSqr(optional.get()); + if (dist < maxDist) { + entity = otherEntity; + maxDist = dist; + } + } + } + + return entity == null ? null : new EntityHitResult(entity); + } + + public boolean canHitEntity(Entity otherEntity) { + if (!otherEntity.canBeHitByProjectile()) { + return false; + } else { + Entity entity = this.getOwner(); +// if (entity != null) { +// if (otherEntity instanceof TestProjectileEntity other) { +// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); +// System.out.println("THAT OWNER: " + other.getOwner()); +// } +// } + return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); + } + } + + public void setTimeToKill(int ticks) { + this.ttk = ticks; + } + + protected void tickDespawn() { + ++this.life; + if (this.life >= ttk) { +// System.out.println("BYE BYE BBY"); + this.discard(); + } + } + + @Override + protected void defineSynchedData() { + this.entityData.define(ID_FLAGS, (byte)0); + this.entityData.define(PIERCE_LEVEL, (byte)0); + } + + public boolean isNoPhysics() { + if (!this.level.isClientSide) { + return this.noPhysics; + } else { + return (this.entityData.get(ID_FLAGS) & 2) != 0; + } + } + + protected void onHitEntity(EntityHitResult entityHitResult) { + Entity entity = entityHitResult.getEntity(); + if (entity instanceof Blaze) { + if (this.getOwner() != null) { + this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); + } + } else if (entity instanceof AirProjectile fireProjectileEntity) { + if (this.getOwner() != null && this.level.isClientSide) { + AirProjectile collisionEntity = new AirProjectile(this.getX(), this.getY(), this.getZ(), level); + collisionEntity.setTimeToKill(5); + level.addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + entityEffect.start(); + System.out.println("SUCCESS COLLISION!!!"); + this.discard(); + fireProjectileEntity.discard(); + } + } else { + // TODO - Check if player entity has countered + int i = 10; // Deal 10 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + this.discard(); + } + } + + protected void onHitBlock(BlockHitResult blockHitResult) { +// super.onHitBlock(blockHitResult); + this.discard(); + } + + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); + if (!this.level.isClientSide) { + this.level.broadcastEntityEvent(this, (byte)3); +// this.discard(); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java new file mode 100644 index 00000000..b633400c --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java @@ -0,0 +1,260 @@ +package com.amuzil.omegasource.magus.entity.projectile; + +import com.amuzil.omegasource.magus.entity.AvatarEntities; +import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.lowdragmc.photon.client.fx.EntityEffect; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.monster.Blaze; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; +import java.util.Optional; +import java.util.function.Predicate; + +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; + + +public class EarthProjectile extends ElementProjectile { + private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(EarthProjectile.class, EntityDataSerializers.BYTE); + private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(EarthProjectile.class, EntityDataSerializers.BYTE); + private int life; + private int ttk = 100; + + public EarthProjectile(EntityType type, Level level) { + super(type, level); + } + + public EarthProjectile(double x, double y, double z, Level level) { + this(AvatarEntities.EARTH_PROJECTILE_ENTITY_TYPE.get(), level); + this.setPos(x, y, z); + } + + public EarthProjectile(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + this.setOwner(livingEntity); + this.setNoGravity(true); + } + + public void tick() { + super.tick(); + boolean flag = this.isNoPhysics(); + Vec3 deltaMovement = this.getDeltaMovement(); + if (this.xRotO == 0.0F && this.yRotO == 0.0F) { + double distance = deltaMovement.horizontalDistance(); + this.setYRot((float)(Mth.atan2(deltaMovement.x, deltaMovement.z) * (double)(180F / (float)Math.PI))); + this.setXRot((float)(Mth.atan2(deltaMovement.y, distance) * (double)(180F / (float)Math.PI))); + this.yRotO = this.getYRot(); + this.xRotO = this.getXRot(); + } + + BlockPos blockpos = this.blockPosition(); + BlockState blockstate = this.level.getBlockState(blockpos); + if (!blockstate.isAir() && !flag) { + VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + if (!voxelshape.isEmpty()) { + Vec3 vec31 = this.position(); + + for(AABB aabb : voxelshape.toAabbs()) { + if (aabb.move(blockpos).contains(vec31)) { + break; + } + } + } + } + + if (this.isInWaterOrRain() || blockstate.is(Blocks.POWDER_SNOW) || this.isInFluidType((fluidType, height) -> this.canFluidExtinguish(fluidType))) { + this.clearFire(); + } + + Vec3 pos = this.position(); + Vec3 delta = pos.add(deltaMovement); + HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + if (hitresult.getType() != HitResult.Type.MISS) { + delta = hitresult.getLocation(); + } + + while(!this.isRemoved()) { + if (!this.level.isClientSide) { + this.tickDespawn(); + } + EntityHitResult entityhitresult = this.findHitEntity(pos, delta); + if (entityhitresult != null) { + hitresult = entityhitresult; + } + + if (hitresult != null && hitresult.getType() == HitResult.Type.ENTITY) { + assert hitresult instanceof EntityHitResult; + Entity entity = ((EntityHitResult)hitresult).getEntity(); + Entity owner = this.getOwner(); + if (entity instanceof Player && owner instanceof Player && !((Player)owner).canHarmPlayer((Player)entity)) { + hitresult = null; + entityhitresult = null; + } + } + + if (hitresult != null && hitresult.getType() != HitResult.Type.MISS && !flag) { + if (net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, hitresult)) + break; + this.onHit(hitresult); + this.hasImpulse = true; + break; + } + + if (entityhitresult == null) { + break; + } + + hitresult = null; + } + deltaMovement = this.getDeltaMovement(); + double d5 = deltaMovement.x; + double d6 = deltaMovement.y; + double d1 = deltaMovement.z; + + double d7 = this.getX() + d5; + double d2 = this.getY() + d6; + double d3 = this.getZ() + d1; + double d4 = deltaMovement.horizontalDistance(); + if (flag) { + this.setYRot((float)(Mth.atan2(-d5, -d1) * (double)(180F / (float)Math.PI))); + } else { + this.setYRot((float)(Mth.atan2(d5, d1) * (double)(180F / (float)Math.PI))); + } + + this.setXRot((float)(Mth.atan2(d6, d4) * (double)(180F / (float)Math.PI))); + this.setXRot(lerpRotation(this.xRotO, this.getXRot())); + this.setYRot(lerpRotation(this.yRotO, this.getYRot())); + + float f = 0.99F; + this.setDeltaMovement(deltaMovement.scale((double)f)); + if (!this.isNoGravity() && !flag) { + Vec3 vec34 = this.getDeltaMovement(); + this.setDeltaMovement(vec34.x, vec34.y - (double)0.05F, vec34.z); + } + + this.setPos(d7, d2, d3); + this.checkInsideBlocks(); + } + + @Nullable + protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { + return getEntityHitResult(this.level, this, pos, delta, + this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), + this::canHitEntity, 0.3F); + } + + @Nullable + public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Vec3 pos, Vec3 delta, AABB thisAABB, Predicate canBeHit, float scale) { + double maxDist = Double.MAX_VALUE; + Entity entity = null; + + for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { +// System.out.println("ENTITY NEARBY: " + otherEntity); + AABB aabb = otherEntity.getBoundingBox().inflate(scale); + Optional optional = aabb.clip(pos, delta); + if (optional.isPresent()) { + double dist = pos.distanceToSqr(optional.get()); + if (dist < maxDist) { + entity = otherEntity; + maxDist = dist; + } + } + } + + return entity == null ? null : new EntityHitResult(entity); + } + + public boolean canHitEntity(Entity otherEntity) { + if (!otherEntity.canBeHitByProjectile()) { + return false; + } else { + Entity entity = this.getOwner(); +// if (entity != null) { +// if (otherEntity instanceof TestProjectileEntity other) { +// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); +// System.out.println("THAT OWNER: " + other.getOwner()); +// } +// } + return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); + } + } + + public void setTimeToKill(int ticks) { + this.ttk = ticks; + } + + protected void tickDespawn() { + ++this.life; + if (this.life >= ttk) { +// System.out.println("BYE BYE BBY"); + this.discard(); + } + } + + @Override + protected void defineSynchedData() { + this.entityData.define(ID_FLAGS, (byte)0); + this.entityData.define(PIERCE_LEVEL, (byte)0); + } + + public boolean isNoPhysics() { + if (!this.level.isClientSide) { + return this.noPhysics; + } else { + return (this.entityData.get(ID_FLAGS) & 2) != 0; + } + } + + protected void onHitEntity(EntityHitResult entityHitResult) { + Entity entity = entityHitResult.getEntity(); + if (entity instanceof Blaze) { + if (this.getOwner() != null) { + this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); + } + } else if (entity instanceof EarthProjectile fireProjectileEntity) { + if (this.getOwner() != null && this.level.isClientSide) { + EarthProjectile collisionEntity = new EarthProjectile(this.getX(), this.getY(), this.getZ(), level); + collisionEntity.setTimeToKill(5); + level.addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + entityEffect.start(); + System.out.println("SUCCESS COLLISION!!!"); + this.discard(); + fireProjectileEntity.discard(); + } + } else { + // TODO - Check if player entity has countered + int i = 10; // Deal 10 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + this.discard(); + } + } + + protected void onHitBlock(BlockHitResult blockHitResult) { +// super.onHitBlock(blockHitResult); + this.discard(); + } + + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); + if (!this.level.isClientSide) { + this.level.broadcastEntityEvent(this, (byte)3); +// this.discard(); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/TestProjectileEntity.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java similarity index 81% rename from src/main/java/com/amuzil/omegasource/magus/entity/TestProjectileEntity.java rename to src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java index f209c049..53341521 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/TestProjectileEntity.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java @@ -1,5 +1,8 @@ -package com.amuzil.omegasource.magus.entity; +package com.amuzil.omegasource.magus.entity.projectile; +import com.amuzil.omegasource.magus.entity.AvatarEntities; +import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.amuzil.omegasource.magus.entity.collision.ElementCollision; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; @@ -13,14 +16,10 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.monster.Blaze; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.entity.projectile.ItemSupplier; -import net.minecraft.world.entity.projectile.Projectile; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.ClipContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.phys.*; import net.minecraft.world.phys.shapes.VoxelShape; @@ -31,45 +30,29 @@ import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; -public class TestProjectileEntity extends Projectile implements ItemSupplier { - public static final ItemStack PROJECTILE_ITEM = new ItemStack(Blocks.AIR); - private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(TestProjectileEntity.class, EntityDataSerializers.BYTE); - private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(TestProjectileEntity.class, EntityDataSerializers.BYTE); - private boolean leftOwner; - private boolean hasBeenShot; +public class FireProjectile extends ElementProjectile { + private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(FireProjectile.class, EntityDataSerializers.BYTE); + private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(FireProjectile.class, EntityDataSerializers.BYTE); private int life; private int ttk = 100; - public TestProjectileEntity(EntityType type, Level level) { + public FireProjectile(EntityType type, Level level) { super(type, level); } - public TestProjectileEntity(double x, double y, double z, Level level) { - this(AvatarEntities.TEST_PROJECTILE.get(), level); + public FireProjectile(double x, double y, double z, Level level) { + this(AvatarEntities.FIRE_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); } - public TestProjectileEntity(LivingEntity livingEntity, Level level) { + public FireProjectile(LivingEntity livingEntity, Level level) { this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); this.setOwner(livingEntity); this.setNoGravity(true); } - public void projectileTick() { - if (!this.hasBeenShot) { - this.gameEvent(GameEvent.PROJECTILE_SHOOT, this.getOwner()); - this.hasBeenShot = true; - } - - if (!this.leftOwner) { - this.leftOwner = this.checkLeftOwner(); - } - - super.tick(); - } - public void tick() { - this.projectileTick(); + super.tick(); boolean flag = this.isNoPhysics(); Vec3 deltaMovement = this.getDeltaMovement(); if (this.xRotO == 0.0F && this.yRotO == 0.0F) { @@ -212,7 +195,7 @@ public boolean canHitEntity(Entity otherEntity) { } } - protected void setTimeToKill(int ticks) { + public void setTimeToKill(int ticks) { this.ttk = ticks; } @@ -235,20 +218,6 @@ protected void defineSynchedData() { this.entityData.define(PIERCE_LEVEL, (byte)0); } - private boolean checkLeftOwner() { - Entity owner = this.getOwner(); - if (owner != null) { - for(Entity entity1 : this.level.getEntities(this, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(1.0D), (entity) -> { - return !entity.isSpectator() && entity.isPickable(); - })) { - if (entity1.getRootVehicle() == owner.getRootVehicle()) { - return false; - } - } - } - return true; - } - public boolean isNoPhysics() { if (!this.level.isClientSide) { return this.noPhysics; @@ -272,16 +241,16 @@ protected void onHitEntity(EntityHitResult entityHitResult) { if (this.getOwner() != null) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } - } else if (entity instanceof TestProjectileEntity testProjectileEntity) { + } else if (entity instanceof ElementProjectile elementProjectile) { if (this.getOwner() != null && this.level.isClientSide) { - TestProjectileEntity collisionEntity = new TestProjectileEntity(this.getX(), this.getY(), this.getZ(), level); + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); collisionEntity.setTimeToKill(5); level.addFreshEntity(collisionEntity); EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); entityEffect.start(); System.out.println("SUCCESS COLLISION!!!"); this.discard(); - testProjectileEntity.discard(); + elementProjectile.discard(); } } else { // TODO - Check if player entity has countered @@ -303,13 +272,4 @@ protected void onHit(HitResult hitResult) { // this.discard(); } } - - private ParticleOptions getParticle() { - return ParticleTypes.FLAME; - } - - @Override - public ItemStack getItem() { - return PROJECTILE_ITEM; - } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java new file mode 100644 index 00000000..fca79fd2 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java @@ -0,0 +1,260 @@ +package com.amuzil.omegasource.magus.entity.projectile; + +import com.amuzil.omegasource.magus.entity.AvatarEntities; +import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.lowdragmc.photon.client.fx.EntityEffect; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.monster.Blaze; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; +import java.util.Optional; +import java.util.function.Predicate; + +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; + + +public class WaterProjectile extends ElementProjectile { + private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(WaterProjectile.class, EntityDataSerializers.BYTE); + private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(WaterProjectile.class, EntityDataSerializers.BYTE); + private int life; + private int ttk = 100; + + public WaterProjectile(EntityType type, Level level) { + super(type, level); + } + + public WaterProjectile(double x, double y, double z, Level level) { + this(AvatarEntities.WATER_PROJECTILE_ENTITY_TYPE.get(), level); + this.setPos(x, y, z); + } + + public WaterProjectile(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + this.setOwner(livingEntity); + this.setNoGravity(true); + } + + public void tick() { + super.tick(); + boolean flag = this.isNoPhysics(); + Vec3 deltaMovement = this.getDeltaMovement(); + if (this.xRotO == 0.0F && this.yRotO == 0.0F) { + double distance = deltaMovement.horizontalDistance(); + this.setYRot((float)(Mth.atan2(deltaMovement.x, deltaMovement.z) * (double)(180F / (float)Math.PI))); + this.setXRot((float)(Mth.atan2(deltaMovement.y, distance) * (double)(180F / (float)Math.PI))); + this.yRotO = this.getYRot(); + this.xRotO = this.getXRot(); + } + + BlockPos blockpos = this.blockPosition(); + BlockState blockstate = this.level.getBlockState(blockpos); + if (!blockstate.isAir() && !flag) { + VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + if (!voxelshape.isEmpty()) { + Vec3 vec31 = this.position(); + + for(AABB aabb : voxelshape.toAabbs()) { + if (aabb.move(blockpos).contains(vec31)) { + break; + } + } + } + } + + if (this.isInWaterOrRain() || blockstate.is(Blocks.POWDER_SNOW) || this.isInFluidType((fluidType, height) -> this.canFluidExtinguish(fluidType))) { + this.clearFire(); + } + + Vec3 pos = this.position(); + Vec3 delta = pos.add(deltaMovement); + HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + if (hitresult.getType() != HitResult.Type.MISS) { + delta = hitresult.getLocation(); + } + + while(!this.isRemoved()) { + if (!this.level.isClientSide) { + this.tickDespawn(); + } + EntityHitResult entityhitresult = this.findHitEntity(pos, delta); + if (entityhitresult != null) { + hitresult = entityhitresult; + } + + if (hitresult != null && hitresult.getType() == HitResult.Type.ENTITY) { + assert hitresult instanceof EntityHitResult; + Entity entity = ((EntityHitResult)hitresult).getEntity(); + Entity owner = this.getOwner(); + if (entity instanceof Player && owner instanceof Player && !((Player)owner).canHarmPlayer((Player)entity)) { + hitresult = null; + entityhitresult = null; + } + } + + if (hitresult != null && hitresult.getType() != HitResult.Type.MISS && !flag) { + if (net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, hitresult)) + break; + this.onHit(hitresult); + this.hasImpulse = true; + break; + } + + if (entityhitresult == null) { + break; + } + + hitresult = null; + } + deltaMovement = this.getDeltaMovement(); + double d5 = deltaMovement.x; + double d6 = deltaMovement.y; + double d1 = deltaMovement.z; + + double d7 = this.getX() + d5; + double d2 = this.getY() + d6; + double d3 = this.getZ() + d1; + double d4 = deltaMovement.horizontalDistance(); + if (flag) { + this.setYRot((float)(Mth.atan2(-d5, -d1) * (double)(180F / (float)Math.PI))); + } else { + this.setYRot((float)(Mth.atan2(d5, d1) * (double)(180F / (float)Math.PI))); + } + + this.setXRot((float)(Mth.atan2(d6, d4) * (double)(180F / (float)Math.PI))); + this.setXRot(lerpRotation(this.xRotO, this.getXRot())); + this.setYRot(lerpRotation(this.yRotO, this.getYRot())); + + float f = 0.99F; + this.setDeltaMovement(deltaMovement.scale((double)f)); + if (!this.isNoGravity() && !flag) { + Vec3 vec34 = this.getDeltaMovement(); + this.setDeltaMovement(vec34.x, vec34.y - (double)0.05F, vec34.z); + } + + this.setPos(d7, d2, d3); + this.checkInsideBlocks(); + } + + @Nullable + protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { + return getEntityHitResult(this.level, this, pos, delta, + this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), + this::canHitEntity, 0.3F); + } + + @Nullable + public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Vec3 pos, Vec3 delta, AABB thisAABB, Predicate canBeHit, float scale) { + double maxDist = Double.MAX_VALUE; + Entity entity = null; + + for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { +// System.out.println("ENTITY NEARBY: " + otherEntity); + AABB aabb = otherEntity.getBoundingBox().inflate(scale); + Optional optional = aabb.clip(pos, delta); + if (optional.isPresent()) { + double dist = pos.distanceToSqr(optional.get()); + if (dist < maxDist) { + entity = otherEntity; + maxDist = dist; + } + } + } + + return entity == null ? null : new EntityHitResult(entity); + } + + public boolean canHitEntity(Entity otherEntity) { + if (!otherEntity.canBeHitByProjectile()) { + return false; + } else { + Entity entity = this.getOwner(); +// if (entity != null) { +// if (otherEntity instanceof TestProjectileEntity other) { +// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); +// System.out.println("THAT OWNER: " + other.getOwner()); +// } +// } + return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); + } + } + + public void setTimeToKill(int ticks) { + this.ttk = ticks; + } + + protected void tickDespawn() { + ++this.life; + if (this.life >= ttk) { +// System.out.println("BYE BYE BBY"); + this.discard(); + } + } + + @Override + protected void defineSynchedData() { + this.entityData.define(ID_FLAGS, (byte)0); + this.entityData.define(PIERCE_LEVEL, (byte)0); + } + + public boolean isNoPhysics() { + if (!this.level.isClientSide) { + return this.noPhysics; + } else { + return (this.entityData.get(ID_FLAGS) & 2) != 0; + } + } + + protected void onHitEntity(EntityHitResult entityHitResult) { + Entity entity = entityHitResult.getEntity(); + if (entity instanceof Blaze) { + if (this.getOwner() != null) { + this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); + } + } else if (entity instanceof WaterProjectile fireProjectileEntity) { + if (this.getOwner() != null && this.level.isClientSide) { + WaterProjectile collisionEntity = new WaterProjectile(this.getX(), this.getY(), this.getZ(), level); + collisionEntity.setTimeToKill(5); + level.addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + entityEffect.start(); + System.out.println("SUCCESS COLLISION!!!"); + this.discard(); + fireProjectileEntity.discard(); + } + } else { + // TODO - Check if player entity has countered + int i = 10; // Deal 10 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + this.discard(); + } + } + + protected void onHitBlock(BlockHitResult blockHitResult) { +// super.onHitBlock(blockHitResult); + this.discard(); + } + + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); + if (!this.level.isClientSide) { + this.level.broadcastEntityEvent(this, (byte)3); +// this.discard(); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 10ab8464..98afccf1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -5,8 +5,8 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.elements.Disciplines; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; @@ -28,7 +28,7 @@ public abstract class InputModule { - public static Discipline activeDiscipline = Disciplines.AIR; + public static Element activeElement = Elements.FIRE; protected static final List activeFormInputs = new ArrayList<>(); protected static final Map movementKeys = new HashMap<>(); protected static RadixTree formsTree = new RadixTree(); @@ -76,8 +76,12 @@ public static void determineMotionKeys() { }); } - public static Discipline getDiscipline() { - return activeDiscipline; + public static Element getDiscipline() { + return activeElement; + } + + public static void setDiscipline(Element element) { + activeElement = element; } public static Map getMovementKeys() { @@ -92,7 +96,7 @@ public static void resetFormsTree() { FormDataRegistry.init(); // Re-initialize formData since it's a static field formsTree = new RadixTree(); // Default is air. - formsTree.setDiscipline(activeDiscipline); + formsTree.setDiscipline(activeElement); } public abstract void registerInputData(List formExecutionInputs, Form formToExecute, List conditions); @@ -101,7 +105,7 @@ public void registerModifiers() { // registerModifierListener(ModifiersRegistry.CONTROL.listener(), Minecraft.getInstance().player.getPersistentData()); // Need to register this to the player's compound tag... CompoundTag listenerInstanceData = new CompoundTag(); - listenerInstanceData.putString("activeElement", activeDiscipline.name()); + listenerInstanceData.putString("activeElement", activeElement.name()); for (Modifier modifier : ModifiersRegistry.getModifiers()) { if (modifier.listener() != null) registerModifierListener(modifier.listener(), listenerInstanceData); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 1cbab3ae..fc09f29c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -6,7 +6,7 @@ import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.*; import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; @@ -57,7 +57,7 @@ public class KeyboardMouseInputModule extends InputModule { // forms are activated. public KeyboardMouseInputModule() { - formsTree.setDiscipline(activeDiscipline); + formsTree.setDiscipline(activeElement); this.ticksSinceActivated = new AtomicInteger(0); this.activeForm = new AtomicReference<>(Forms.NULL); @@ -156,9 +156,8 @@ public KeyboardMouseInputModule() { // Extra check for race conditions. Probably wont' help... synchronized (lastActivatedForm.get()) { if (!lastActivatedForm.get().name().equals("null")) { - if (Minecraft.getInstance().getConnection() != null) { - MagusNetwork.sendToServer(new FormActivatedPacket(activeForm.get(), 0)); - } + if (Minecraft.getInstance().getConnection() != null) + MagusNetwork.sendToServer(new FormActivatedPacket(activeForm.get(), activeElement, 0)); // sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); } } @@ -211,9 +210,9 @@ public KeyboardMouseInputModule() { }; } - public static void setActiveDiscipline(Discipline discipline) { - activeDiscipline = discipline; - formsTree.setDiscipline(discipline); + public static void setActiveDiscipline(Element element) { + activeElement = element; + formsTree.setDiscipline(element); } private void checkForForm() { diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 2db04bda..07714cdb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -1,19 +1,17 @@ package com.amuzil.omegasource.magus.network.packets.client_executed; +import com.amuzil.omegasource.magus.entity.ElementProjectile; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.entity.TestProjectileEntity; -import com.lowdragmc.photon.client.fx.EntityEffect; -import com.lowdragmc.photon.client.fx.FX; import net.minecraft.client.Minecraft; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; @@ -24,32 +22,35 @@ import java.util.function.Supplier; import static com.amuzil.omegasource.magus.Magus.MOD_ID; -import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.blue_fire; -import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.fire_bloom; public class FormActivatedPacket implements MagusPacket { private final Form form; + private final Element element; private final int entityId; // Entity ID to send back to client for FX - public FormActivatedPacket(Form form, int entityId) { + public FormActivatedPacket(Form form, Element element, int entityId) { this.form = Objects.requireNonNullElseGet(form, Form::new); + this.element = element; this.entityId = entityId; } public void toBytes(FriendlyByteBuf buf) { if (form != null) { buf.writeUtf(form.name()); + buf.writeUtf(element.name()); buf.writeInt(entityId); } } public static FormActivatedPacket fromBytes(FriendlyByteBuf buf) { - String name = buf.readUtf(); + String formName = buf.readUtf(); + String elementName = buf.readUtf(); int entityId = buf.readInt(); - Form form = Registries.FORMS.get().getValue(new ResourceLocation(MOD_ID, name)); - return new FormActivatedPacket(form, entityId); + Form form = Registries.FORMS.get().getValue(new ResourceLocation(MOD_ID, formName)); + Element element = (Element) Registries.SKILL_CATEGORIES.get().getValue(new ResourceLocation(MOD_ID, elementName)); + return new FormActivatedPacket(form, element, entityId); } // Client-side handler @@ -58,28 +59,21 @@ private static void handleClientSide(Form form, int entityId) { // Perform client-side particle effect or other rendering logic here Player player = Minecraft.getInstance().player; assert player != null; - Level level = player.level; - FX fx = null; - if (form.name().equals("strike")) - fx = fire_bloom; - if (form.name().equals("force")) - fx = blue_fire; - if (fx != null) { - TestProjectileEntity entity = (TestProjectileEntity) player.level.getEntity(entityId); - EntityEffect entityEffect = new EntityEffect(fx, level, entity); - entityEffect.start(); - System.out.println("HANDLE CLIENT PACKET ---> " + form); - } + ElementProjectile elementProjectile = (ElementProjectile) player.level.getEntity(entityId); + assert elementProjectile != null; + elementProjectile.startEffect(form, player); + System.out.println("HANDLE CLIENT PACKET ---> " + form); } // Server-side handler - public static void handleServerSide(Form form, ServerPlayer player) { + public static void handleServerSide(Form form, Element element, ServerPlayer player) { // Perform server-side entity spawning and updating logic and fire Form Event here ServerLevel level = player.getLevel(); - TestProjectileEntity entity = new TestProjectileEntity(player, level); + // TODO - Create/perform certain entity updates based on form and element + ElementProjectile entity = ElementProjectile.createElementEntity(form, element, player, level); entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); level.addFreshEntity(entity); - FormActivatedPacket packet = new FormActivatedPacket(form, entity.getId()); + FormActivatedPacket packet = new FormActivatedPacket(form, element, entity.getId()); // Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500; // for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { @@ -99,7 +93,7 @@ public boolean handle(Supplier ctx) { } else { ServerPlayer player = ctx.get().getSender(); assert player != null; - handleServerSide(form, player); + handleServerSide(form, element, player); } }); return true; diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java index 9032acb4..109530e8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/Node.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/Node.java @@ -3,8 +3,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; -import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.mojang.datafixers.util.Pair; @@ -128,11 +127,11 @@ public synchronized List getModifiers() { return modifiers; } - public void registerModifierListeners(Discipline activeDiscipline, ServerPlayer player) { + public void registerModifierListeners(Element activeElement, ServerPlayer player) { CompoundTag listenerInstanceData = new CompoundTag(); //here we can send information to the client to help build the Modifier Listeners appropriately. - listenerInstanceData.putString("activeElement", activeDiscipline.name()); + listenerInstanceData.putString("activeElement", activeElement.name()); List modifierTypes = new ArrayList<>(); List modifiers = getModifiers(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index d8a71dfd..6872a9ae 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -3,8 +3,7 @@ import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.radix.condition.MultiClientCondition; -import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; import net.minecraft.server.level.ServerPlayer; @@ -22,7 +21,7 @@ public class RadixTree { private Node active; private Condition lastActivated = null; // Fire is a test - private Discipline activeDiscipline = null; // Disciplines.FIRE; + private Element activeElement = null; // Disciplines.FIRE; private ConditionPath path; private Entity owner; @@ -224,7 +223,7 @@ public void burn() { } active = null; - activeDiscipline = null; + activeElement = null; } // ---------- Cali's RadixTree Impl ---------- @@ -234,8 +233,8 @@ public void start() { path = new ConditionPath(); } - public void setDiscipline(Discipline discipline) { - this.activeDiscipline = discipline; + public void setDiscipline(Element element) { + this.activeElement = element; } private void setActive(Node node) { @@ -281,7 +280,7 @@ private void setActive(Node node) { if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) - active.registerModifierListeners(activeDiscipline, player); + active.registerModifierListeners(activeElement, player); if (active.onEnter() != null) { active.onEnter().accept(this); @@ -317,7 +316,7 @@ private void terminate() { // TODO: // Rather than relying on the input module to send packets, handle everything in the condition runnables? public void moveDown(Condition executedCondition) { - if (activeDiscipline == null) { + if (activeElement == null) { LogManager.getLogger().info("NO ELEMENT SELECTED"); return; } diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index da352b77..9017adc3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -2,8 +2,8 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.elements.Disciplines; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.skill.Skill; @@ -91,9 +91,9 @@ public static void registerCondition(Condition registryCondition) { conditions.add(registryCondition); } - public static void registerDiscipline(Discipline discipline) { - categories.add(discipline); - Disciplines.DISCIPLINES.add(discipline); + public static void registerDiscipline(Element element) { + categories.add(element); + Elements.ELEMENTS.add(element); } @@ -149,6 +149,7 @@ public static void onMissing(MissingMappingsEvent event) { @SubscribeEvent public static void gameRegistry(RegisterEvent event) { + Elements.init(); Forms.init(); // Moved here so that forms registry gets populated /* Skill Categories. */ if (event.getRegistryKey().equals(SKILL_CATEGORIES.get().getRegistryKey())) { @@ -157,6 +158,8 @@ public static void gameRegistry(RegisterEvent event) { event.register(resKey, helper -> { + for (SkillCategory category : categories) + registry.register(category.name(), category); }); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Disciplines.java b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Disciplines.java deleted file mode 100644 index 5e9439ca..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Disciplines.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.amuzil.omegasource.magus.skill.elements; - -import java.util.ArrayList; -import java.util.List; - -public class Disciplines { - public static final List DISCIPLINES = new ArrayList<>(); - - public static final Discipline AIR = new Discipline("air"); - public static final Discipline WATER = new Discipline("water"); - public static final Discipline EARTH = new Discipline("earth"); - public static final Discipline FIRE = new Discipline("fire"); - - public static Discipline fromName(String name) { - return DISCIPLINES.stream().filter(element -> element.name().equals(name)).findFirst().get(); - } -} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Discipline.java b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java similarity index 51% rename from src/main/java/com/amuzil/omegasource/magus/skill/elements/Discipline.java rename to src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java index 6e9563a2..5b81390a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Discipline.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Element.java @@ -3,15 +3,26 @@ import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; -public class Discipline extends SkillCategory { + +public class Element extends SkillCategory { private final String name; + private final Art art; - public Discipline(String name) { - this.name = name; + public Element(Element.Art art) { + this.name = art.name().toLowerCase(); + this.art = art; Registries.registerDiscipline(this); } public String name() { return name; } + + public Art type() { + return art; + } + + public enum Art { + AIR, WATER, EARTH, FIRE + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java new file mode 100644 index 00000000..3308a764 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/elements/Elements.java @@ -0,0 +1,24 @@ +package com.amuzil.omegasource.magus.skill.elements; + +import java.util.ArrayList; +import java.util.List; + + +public class Elements { + public static final List ELEMENTS = new ArrayList<>(); + + public static final Element AIR = new Element(Element.Art.AIR); + public static final Element WATER = new Element(Element.Art.WATER); + public static final Element EARTH = new Element(Element.Art.EARTH); + public static final Element FIRE = new Element(Element.Art.FIRE); + + public static Element fromName(String name) { + return ELEMENTS.stream().filter(element -> element.name().equals(name)).findFirst().get(); + } + + public static Element fromArt(Element.Art art) { + return ELEMENTS.stream().filter(element -> element.type().equals(art)).findFirst().get(); + } + + public static void init() {} +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java index 186305de..ae4e3c73 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/Forms.java @@ -25,6 +25,5 @@ public class Forms { public static final Form MENU = new Form("menu"); public static final Form HOTKEY = new Form("hotkey"); - public static void init() { - } + public static void init() {} } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index 0db2f4b7..f13f15ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -1,9 +1,8 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; -import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.InputModule; -import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.elements.Disciplines; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.TargetModifierData; @@ -29,7 +28,7 @@ // TODO: Configure which key this listener uses public class TargetModifierListener extends ModifierListener { private Vec3 lastTargetPosition; - private Discipline activeDiscipline; + private Element activeElement; public TargetModifierListener() { this.modifierData = new TargetModifierData(); @@ -37,14 +36,14 @@ public TargetModifierListener() { @Override public void setupListener(CompoundTag compoundTag) { - this.activeDiscipline = Disciplines.fromName(compoundTag.getString("activeElement")); + this.activeElement = Elements.fromName(compoundTag.getString("activeElement")); } @Override public boolean shouldCollectModifierData(InputEvent.MouseButton event) { //TODO: Fix this - this.activeDiscipline = InputModule.getDiscipline(); + this.activeElement = InputModule.getDiscipline(); if(event instanceof InputEvent.MouseButton.Post && // prevents double activation(Pre- and Post-event firing) event.getButton() == InputConstants.MOUSE_BUTTON_MIDDLE && event.getAction() == InputConstants.PRESS) { @@ -54,7 +53,7 @@ public boolean shouldCollectModifierData(InputEvent.MouseButton event) { Vec3 vector3d1 = mc.player.getViewVector(1.0F); double distance = 20; //todo max distance make this configurable Vec3 vector3d2 = vector3d.add(vector3d1.x * distance, vector3d1.y * distance, vector3d1.z * distance); - List> bendableMaterials = BendingMaterialUtil.getBendableMaterialsForElement(activeDiscipline); + List> bendableMaterials = BendingMaterialUtil.getBendableMaterialsForElement(activeElement); BlockHitResult hitresult = mc.player.level.clip(new ClipContext(vector3d, vector3d2, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, player)); if (hitresult.getType() == HitResult.Type.BLOCK) { BlockPos locationHit = hitresult.getBlockPos(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java index eeb5be97..0a8cc249 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillCategory.java @@ -7,5 +7,7 @@ public class SkillCategory { //List of all skills available within the category public LinkedList skills = new LinkedList<>(); + public String name() { return "SkillCategory[ Blank ]"; } + //TODO: GUI stuff as data } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index df45f849..97dfb543 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -5,61 +5,66 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.mojang.brigadier.CommandDispatcher; -import com.mojang.brigadier.arguments.IntegerArgumentType; import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.builder.LiteralArgumentBuilder; +import com.mojang.brigadier.context.CommandContext; +import com.mojang.brigadier.exceptions.CommandSyntaxException; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import net.minecraft.commands.arguments.EntityArgument; +import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; +import java.util.Arrays; + import static com.amuzil.omegasource.magus.Magus.MOD_ID; public class AvatarCommand { - // Class for registering the '/gesture' command + private static LiteralArgumentBuilder builder = Commands.literal("avatar"); + // Class for registering the '/avatar' command public static void register(CommandDispatcher dispatcher) { - dispatcher.register(Commands.literal("avatar") - .then(Commands.literal("key") - .then(Commands.argument("value", IntegerArgumentType.integer()) - .executes(c -> key(IntegerArgumentType.getInteger(c, "value"))) - ) - .executes(c -> record()) - ) - .then(Commands.literal("tree") - .then(Commands.literal("reset") - .executes(c -> reset()) - ) - .executes(c -> tree()) - ) - .then(createActivateFormCommand()) - .executes(c -> { - InputModule.sendDebugMsg("Options: activate_form, tree, reset"); - return 1; - }) + builder.then( + Commands.literal("tree") + .executes(c -> tree()) + .then(Commands.literal("reset") + .executes(c -> reset())) + ) + .executes(c -> { + // Default message when no options are provided. + InputModule.sendDebugMsg("Options: activate, tree, reset"); + return 1; + }); + + createActivateArtCommand(); + createActivateFormCommand(); + dispatcher.register(builder); + } + + private static void createActivateArtCommand() { + Arrays.stream(Element.Art.values()).toList().forEach(elem -> + builder.then(Commands.literal("activate") + .then(Commands.literal(elem.name().toLowerCase()).executes(c -> activateElement(c, elem)))) ); } - private static LiteralArgumentBuilder createActivateFormCommand() { - return Commands.literal("activate") - .then(Commands.argument("form", StringArgumentType.string()) + private static void createActivateFormCommand() { + var commandBuilder = builder.then(Commands.literal("activate")); + Registries.forms.forEach(form -> commandBuilder.then(Commands.literal("form") + .then(Commands.literal(form.name().toLowerCase()) .then(Commands.argument("target", EntityArgument.player()) .executes(c -> activateForm( - StringArgumentType.getString(c, "form"), + form.name().toLowerCase(), EntityArgument.getPlayer(c, "target"))) ) - ); - } - - private static int key(int keyValue) { - return 1; - } - - private static int record() { - return 1; + ) + )); } private static int tree() { @@ -81,7 +86,14 @@ private static int reset() { private static int activateForm(String name, ServerPlayer player) { Form form = Registries.FORMS.get().getValue(new ResourceLocation(MOD_ID, name)); - FormActivatedPacket.handleServerSide(form, player); + FormActivatedPacket.handleServerSide(form, InputModule.activeElement, player); + return 1; + } + + private static int activateElement(CommandContext ctx, Element.Art art) throws CommandSyntaxException { + InputModule.setDiscipline(Elements.fromArt(art)); + ServerPlayer player = ctx.getSource().getPlayerOrException(); + player.sendSystemMessage(Component.literal("Bending set to " + art)); return 1; } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java index 9971cf22..94016479 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java @@ -1,7 +1,7 @@ package com.amuzil.omegasource.magus.skill.util.bending; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.skill.elements.Discipline; +import com.amuzil.omegasource.magus.skill.elements.Element; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; import net.minecraft.tags.TagKey; @@ -15,10 +15,10 @@ public class BendingMaterialUtil { public static final TagKey WATERBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "waterbending_material")); public static final TagKey EARTHBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "earthbending_material")); public static final TagKey FIREBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "firebending_material")); - public static List> getBendableMaterialsForElement(Discipline discipline) { + public static List> getBendableMaterialsForElement(Element element) { List> toReturn = new ArrayList<>(); - switch (discipline.name()) { + switch (element.name()) { case "air": //add nothing toReturn.add(AIRBENDING_MATERIAL); From 1fa53dde37c6807a7fff87258c4036f83a37f0ac Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 29 Oct 2024 01:29:50 -0400 Subject: [PATCH 391/469] Update AvatarCommand.java --- .../omegasource/magus/skill/test/avatar/AvatarCommand.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index 97dfb543..e6060b7d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -55,8 +55,7 @@ private static void createActivateArtCommand() { } private static void createActivateFormCommand() { - var commandBuilder = builder.then(Commands.literal("activate")); - Registries.forms.forEach(form -> commandBuilder.then(Commands.literal("form") + Registries.forms.forEach(form -> builder.then(Commands.literal("form") .then(Commands.literal(form.name().toLowerCase()) .then(Commands.argument("target", EntityArgument.player()) .executes(c -> activateForm( From f544186c8acd0158d1ab2faa2c8ba7a068a73e28 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 29 Oct 2024 01:40:42 -0400 Subject: [PATCH 392/469] Update ElementCollision.java --- .../entity/collision/ElementCollision.java | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java index 17b8bc91..2cf60780 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java @@ -224,27 +224,9 @@ public boolean isNoPhysics() { protected void onHitEntity(EntityHitResult entityHitResult) { Entity entity = entityHitResult.getEntity(); - if (entity instanceof Blaze) { - if (this.getOwner() != null) { - this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); - } - } else if (entity instanceof ElementCollision fireProjectileEntity) { - if (this.getOwner() != null && this.level.isClientSide) { - ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); - collisionEntity.setTimeToKill(5); - level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); - entityEffect.start(); - System.out.println("SUCCESS COLLISION!!!"); - this.discard(); - fireProjectileEntity.discard(); - } - } else { - // TODO - Check if player entity has countered - int i = 10; // Deal 10 damage - entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); - this.discard(); - } + int i = 5; + entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + this.discard(); } protected void onHitBlock(BlockHitResult blockHitResult) { From 400dad609edd883847f0159d017efcdc7b5687b0 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 29 Oct 2024 01:41:53 -0400 Subject: [PATCH 393/469] Update ElementCollision.java --- .../omegasource/magus/entity/collision/ElementCollision.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java index 2cf60780..acad32c4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java @@ -32,8 +32,6 @@ public class ElementCollision extends ElementProjectile { private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(ElementCollision.class, EntityDataSerializers.BYTE); private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(ElementCollision.class, EntityDataSerializers.BYTE); - private boolean leftOwner; - private boolean hasBeenShot; private int life; private int ttk = 10; From 73325d14f75d9177a2046d04729323e3a0403619 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 29 Oct 2024 01:44:52 -0400 Subject: [PATCH 394/469] clean up --- .../magus/input/KeyboardMouseInputModule.java | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index fc09f29c..182aab82 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.magus.input; -import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; @@ -14,9 +13,6 @@ import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.entity.player.Player; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -32,7 +28,6 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer tickEventConsumer; - private final Consumer tickServerEventConsumer; private final Consumer keyboardListener; private final Consumer mouseListener; private final Consumer mouseScrollListener; @@ -177,37 +172,6 @@ public KeyboardMouseInputModule() { } } }; - - this.tickServerEventConsumer = event -> { - // NOTE: This is strictly for testing and to be deleted later - if (c == 0) { - synchronized (activeForm.get()) { - if (!activeForm.get().name().equals("null")) { - ResourceLocation resource = null; - if (activeForm.get().name().equals("strike")) - resource = new ResourceLocation(Magus.MOD_ID, "fire_bloom"); - if (activeForm.get().name().equals("force")) - resource = new ResourceLocation(Magus.MOD_ID, "blue_fire"); - ServerLevel level = event.getServer().getAllLevels().iterator().next(); -// System.out.println("LEVEL: " + level); - if (!level.isClientSide && resource != null) { - c = 5; - Player player = Minecraft.getInstance().player; - assert player != null; -// TestProjectileEntity element = new TestProjectileEntity(player, level, activeForm.get()); -// element.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F); -// element.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 2, 1); -// level.addFreshEntity(element); -// FX fx = FXHelper.getFX(resource); -// EntityEffect entityEffect = new EntityEffect(fx, level, element); -// entityEffect.start(); - } - } - } - } else { - c--; - } - }; } public static void setActiveDiscipline(Element element) { @@ -353,5 +317,4 @@ public double getMouseScrollDelta() { return this.mouseScrollDelta; } - } From 4e4c93dc13c2de63b31fa82135d37f16a18f3077 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 29 Oct 2024 02:50:21 -0400 Subject: [PATCH 395/469] entity spawning system stable --- .../client_executed/FormActivatedPacket.java | 3 +-- .../resources/assets/magus/fx/orb_bloom.fx | Bin 2391 -> 2311 bytes 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 07714cdb..eb746231 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -70,16 +70,15 @@ public static void handleServerSide(Form form, Element element, ServerPlayer pla // Perform server-side entity spawning and updating logic and fire Form Event here ServerLevel level = player.getLevel(); // TODO - Create/perform certain entity updates based on form and element + // - All Skills/techniques should be determined and handled here ElementProjectile entity = ElementProjectile.createElementEntity(form, element, player, level); entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); level.addFreshEntity(entity); FormActivatedPacket packet = new FormActivatedPacket(form, element, entity.getId()); - // Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500; // for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { // MagusNetwork.sendToClient(packet, nearbyPlayer); // } // Keep this in case we want a more specific client packet distribution filter - MagusNetwork.CHANNEL.send(PacketDistributor.NEAR.with( () -> new PacketDistributor.TargetPoint(player.getX(), player.getY(), player.getZ(), 500, level.dimension())), packet); diff --git a/src/main/resources/assets/magus/fx/orb_bloom.fx b/src/main/resources/assets/magus/fx/orb_bloom.fx index 1b2bbb90de25423d9f37a7058c08fdca76f5c645..150ec89ec192b7b09cc396a2a1fd2fcd66ec05ca 100644 GIT binary patch literal 2311 zcmV+i3HbIOiwFP!00000|Lt2%Y#d1yuJ*V+Gi}FC*nn7xgJC6(EZMAtvI${(riYnj zpjk7pZ4J#47dLH!;6aOdj*hhM`|x%sdr{e!CDhLdPuA9>+NkWy5+M!EH*L>z)>|!N z3eZ)zaSxQ9-)7k5c3=`$fQ)%g`(&lJuQY_C&-(#R9 z<_RpQ=SHKQ{LQn>v+exR>OK`_C%;{(hwtak3z&{znA%`@i}$G|I=A)++m=uCxa-h> z)2=%DvO`_!1kN481nI6(`P?K|-g{zz9on=-1a(MO18syD4V{<9&`{>X?@AS**<7%v z?6$lm7=h6m=z{6l9+TQ#k0e)N26gE#a%@t`_zx=BxQgbuiuTBgRN?P2Y|+q`7ZX*~ zM4g%*6$b-6Pz=sowTLe|H!$DLK8Jba9Sj(N&iNfrcT? zwp9BYkpK`@1*hMZLTL3XvOBD3 zDCb(>nyA!RTMLD)%8876y#&2>ZhZgd?X8`y&DEX8^^G?hq3mp{YEp;dQEwA2G%bWR z>F5`!+X3yxMud*4yOz44hF;28Tx?BX&pMNSE2kTb5+?aB6`fcJN6LK#+=lXo@Sy}I zFc`e^9VnZF!KF*dtj@>y0A0{1BL;U?&tfB*L(x@7AOARBeR(}!V@hU6LnTzP0yPt^ zgeOC7PMpK7ffnMQn_wUbKz#T5<3Ek?>?)dT28;`iLhwmCE6=X1cVR`T+fL?Hp=Bbp zu{;LWs$pYT!KCfgaS&McJ3UTK0Jrl^4@{42`HWyoYM+mv3t^YljzqP57)w#U+-7)> zirkG0_W2IxU>i1-)1tvtw-`0$%%|Yn|LDz;+8LpC2Zu6BH+az^gbLWUiGAC*poiQ= zT#s@RZN>STrlYIG`&<4DR(y|Bp)5!1rsnc^q`Angeu6gryf)y-)fOZ70^*vz(A>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0dc7c72440a Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 30 Oct 2024 17:54:37 -0400 Subject: [PATCH 396/469] fix commands --- .../magus/skill/test/avatar/AvatarCommand.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index e6060b7d..15ccb481 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -30,15 +30,13 @@ public class AvatarCommand { private static LiteralArgumentBuilder builder = Commands.literal("avatar"); // Class for registering the '/avatar' command public static void register(CommandDispatcher dispatcher) { - builder.then( - Commands.literal("tree") - .executes(c -> tree()) - .then(Commands.literal("reset") + builder.then(Commands.literal("tree") + .then(Commands.literal("reset") .executes(c -> reset())) - ) + .executes(c -> tree())) .executes(c -> { // Default message when no options are provided. - InputModule.sendDebugMsg("Options: activate, tree, reset"); + InputModule.sendDebugMsg("Options: activate, form, tree"); return 1; }); From 4f1c3d1cc805f896ac6cb6e0129eb90834f6125d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 30 Oct 2024 17:55:09 -0400 Subject: [PATCH 397/469] Update InputModule.java --- .../java/com/amuzil/omegasource/magus/input/InputModule.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 98afccf1..66e40537 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -43,10 +43,6 @@ public abstract class InputModule { // Send a message to in-game chat public static void sendDebugMsg(String msg) { Minecraft minecraft = Minecraft.getInstance(); - if (minecraft == null) { - System.err.println("sendDebugMsg failed: Minecraft instance is null"); - return; - } minecraft.execute(() -> { LocalPlayer player = minecraft.player; if (player != null) { From 31c9a6c24352229cd25d67b9491d8b4948edb5e9 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 30 Oct 2024 18:17:54 -0400 Subject: [PATCH 398/469] fix toString --- .../condition/minecraft/forge/key/KeyHoldCondition.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java index 04e4d979..aa6e97fb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/minecraft/forge/key/KeyHoldCondition.java @@ -155,6 +155,11 @@ public void unregister() { @Override public String toString() { - return String.format("%s[ active=%b, key=%s, held=%d, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), active, InputConstants.getKey(key, -1).getName().replace("key.", ""), currentHolding, duration, timeout, release); + String keyString = InputConstants.getKey(key, -1).getName().replace("key.", ""); + if (keyString.equals("keyboard.0")) + keyString = "mouse.left"; + if (keyString.equals("keyboard.1")) + keyString = "mouse.right"; + return String.format("%s[ active=%b, key=%s, held=%d, d=%d, t=%d, r=%b ]", this.getClass().getSimpleName(), active, keyString, currentHolding, duration, timeout, release); } } From 31e70cb85043c47073fc00c11020348111e0d16f Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 31 Oct 2024 23:18:16 -0400 Subject: [PATCH 399/469] implemented arc form & collisions stable --- .../magus/entity/ElementProjectile.java | 65 +++++-- .../entity/projectile/AirProjectile.java | 15 +- .../entity/projectile/EarthProjectile.java | 15 +- .../entity/projectile/FireProjectile.java | 174 +++++++++++------- .../entity/projectile/WaterProjectile.java | 15 +- .../magus/input/KeyboardMouseInputModule.java | 4 +- .../client_executed/FormActivatedPacket.java | 20 +- 7 files changed, 198 insertions(+), 110 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java index a57a3e84..1680f605 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.entity; +import com.amuzil.omegasource.magus.entity.collision.ElementCollision; import com.amuzil.omegasource.magus.entity.projectile.AirProjectile; import com.amuzil.omegasource.magus.entity.projectile.EarthProjectile; import com.amuzil.omegasource.magus.entity.projectile.FireProjectile; @@ -8,8 +9,7 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; import com.lowdragmc.photon.client.fx.FX; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; @@ -29,6 +29,7 @@ import net.minecraft.world.phys.*; import javax.annotation.Nullable; +import java.util.List; import java.util.Optional; import java.util.function.Predicate; @@ -43,20 +44,23 @@ public abstract class ElementProjectile extends Projectile implements ItemSuppli private boolean hasBeenShot; private int life; private int ttk = 100; + public boolean arcActive = false; + public Form form; public ElementProjectile(EntityType type, Level level) { super(type, level); } - public ElementProjectile(EntityType entityType, double x, double y, double z, Level level) { + public ElementProjectile(EntityType entityType, double x, double y, double z, Level level, Form form) { this(entityType, level); this.setPos(x, y, z); + this.setNoGravity(true); + this.form = form; } - public ElementProjectile(EntityType entityType, LivingEntity livingEntity, Level level) { - this(entityType, livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + public ElementProjectile(EntityType entityType, LivingEntity livingEntity, Level level, Form form) { + this(entityType, livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); this.setOwner(livingEntity); - this.setNoGravity(true); } public void tick() { @@ -105,12 +109,13 @@ public boolean canHitEntity(Entity otherEntity) { return false; } else { Entity entity = this.getOwner(); -// if (entity != null) { -// if (otherEntity instanceof TestProjectileEntity other) { -// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); -// System.out.println("THAT OWNER: " + other.getOwner()); -// } -// } + if (entity != null) { + if (otherEntity instanceof ElementProjectile other) { +// System.out.println("arcActive: " + other.arcActive); + if (other.arcActive) + return true; + } + } return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); } } @@ -124,6 +129,7 @@ protected void tickDespawn() { if (this.life >= ttk) { // System.out.println("BYE BYE BBY"); this.discard(); +// this.arcActive = false; } } @@ -138,7 +144,7 @@ protected void defineSynchedData() { this.entityData.define(PIERCE_LEVEL, (byte)0); } - private boolean checkLeftOwner() { + public boolean checkLeftOwner() { Entity owner = this.getOwner(); if (owner != null) { for(Entity entity1 : this.level.getEntities(this, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(1.0D), (entity) -> { @@ -177,7 +183,7 @@ protected void onHitEntity(EntityHitResult entityHitResult) { } } else if (entity instanceof ElementProjectile testProjectileEntity) { if (this.getOwner() != null && this.level.isClientSide) { - ElementProjectile collisionEntity = new FireProjectile(this.getX(), this.getY(), this.getZ(), level); + ElementProjectile collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); collisionEntity.setTimeToKill(5); level.addFreshEntity(collisionEntity); EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); @@ -207,6 +213,16 @@ protected void onHit(HitResult hitResult) { } } + public void arc(float scale, float offset) { + this.arcActive = true; + Entity owner = this.getOwner(); + assert owner != null; + Vec3[] pose = new Vec3[]{owner.position(), this.getOwner().getLookAngle()}; + pose[1] = pose[1].scale((scale)).add((0), (this.getOwner().getEyeHeight()), (0)); + Vec3 newPos = pose[1].add(pose[0]); + this.setPos(newPos.x, newPos.y, newPos.z); + } + @Override public ItemStack getItem() { return PROJECTILE_ITEM; @@ -214,22 +230,35 @@ public ItemStack getItem() { public static ElementProjectile createElementEntity(Form form, Element element, ServerPlayer player, ServerLevel level) { return switch (element.type()) { - case AIR -> new AirProjectile(player, level); - case WATER -> new WaterProjectile(player, level); - case EARTH -> new EarthProjectile(player, level); - case FIRE -> new FireProjectile(player, level); + case AIR -> new AirProjectile(player, level, form); + case WATER -> new WaterProjectile(player, level, form); + case EARTH -> new EarthProjectile(player, level, form); + case FIRE -> new FireProjectile(player, level, form); }; } public void startEffect(Form form, Player player) { + this.form = form; // NOTE: Need this to ensure form is set client-side before onHit event FX fx = null; if (form.name().equals("strike")) fx = fire_bloom; if (form.name().equals("force")) fx = blue_fire; + if (form.name().equals("arc")) { + // TODO - Make perma fire and allow it to be shootable. Also stop catching fire from damaging receiver + // Also allow user to curve shot projectiles. + fx = fire_bloom; + arcActive = true; + } if (fx != null) { EntityEffect entityEffect = new EntityEffect(fx, level, this); entityEffect.start(); } } + + public static List getNearbyEntities(Entity entity, double blocksRadius) { + AABB aabb = entity.getBoundingBox().expandTowards(entity.getDeltaMovement()).inflate(blocksRadius); + assert Minecraft.getInstance().level != null; + return Minecraft.getInstance().level.getEntities(entity, aabb).stream().toList(); + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java index 2b11f498..eb0d9c11 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java @@ -2,6 +2,8 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.amuzil.omegasource.magus.entity.collision.ElementCollision; +import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; @@ -39,13 +41,14 @@ public AirProjectile(EntityType type, Level level) { super(type, level); } - public AirProjectile(double x, double y, double z, Level level) { + public AirProjectile(double x, double y, double z, Level level, Form form) { this(AvatarEntities.AIR_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); +// this.form = form; } - public AirProjectile(LivingEntity livingEntity, Level level) { - this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + public AirProjectile(LivingEntity livingEntity, Level level, Form form) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); this.setOwner(livingEntity); this.setNoGravity(true); } @@ -226,16 +229,16 @@ protected void onHitEntity(EntityHitResult entityHitResult) { if (this.getOwner() != null) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } - } else if (entity instanceof AirProjectile fireProjectileEntity) { + } else if (entity instanceof ElementProjectile elementProjectile) { if (this.getOwner() != null && this.level.isClientSide) { - AirProjectile collisionEntity = new AirProjectile(this.getX(), this.getY(), this.getZ(), level); + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); collisionEntity.setTimeToKill(5); level.addFreshEntity(collisionEntity); EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); entityEffect.start(); System.out.println("SUCCESS COLLISION!!!"); this.discard(); - fireProjectileEntity.discard(); + elementProjectile.discard(); } } else { // TODO - Check if player entity has countered diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java index b633400c..569a8417 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java @@ -2,6 +2,8 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.amuzil.omegasource.magus.entity.collision.ElementCollision; +import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; @@ -39,13 +41,14 @@ public EarthProjectile(EntityType type, Level level) { super(type, level); } - public EarthProjectile(double x, double y, double z, Level level) { + public EarthProjectile(double x, double y, double z, Level level, Form form) { this(AvatarEntities.EARTH_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); +// this.form = form; } - public EarthProjectile(LivingEntity livingEntity, Level level) { - this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + public EarthProjectile(LivingEntity livingEntity, Level level, Form form) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); this.setOwner(livingEntity); this.setNoGravity(true); } @@ -226,16 +229,16 @@ protected void onHitEntity(EntityHitResult entityHitResult) { if (this.getOwner() != null) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } - } else if (entity instanceof EarthProjectile fireProjectileEntity) { + } else if (entity instanceof ElementProjectile elementProjectile) { if (this.getOwner() != null && this.level.isClientSide) { - EarthProjectile collisionEntity = new EarthProjectile(this.getX(), this.getY(), this.getZ(), level); + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); collisionEntity.setTimeToKill(5); level.addFreshEntity(collisionEntity); EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); entityEffect.start(); System.out.println("SUCCESS COLLISION!!!"); this.discard(); - fireProjectileEntity.discard(); + elementProjectile.discard(); } } else { // TODO - Check if player entity has countered diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java index 53341521..bc95fa59 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java @@ -3,10 +3,9 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; import com.amuzil.omegasource.magus.entity.collision.ElementCollision; +import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; @@ -16,6 +15,7 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.monster.Blaze; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.projectile.Fireball; import net.minecraft.world.level.ClipContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; @@ -40,13 +40,14 @@ public FireProjectile(EntityType type, Level level) { super(type, level); } - public FireProjectile(double x, double y, double z, Level level) { + public FireProjectile(double x, double y, double z, Level level, Form form) { this(AvatarEntities.FIRE_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); + this.form = form; } - public FireProjectile(LivingEntity livingEntity, Level level) { - this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + public FireProjectile(LivingEntity livingEntity, Level level, Form form) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); this.setOwner(livingEntity); this.setNoGravity(true); } @@ -123,77 +124,94 @@ public void tick() { hitresult = null; } deltaMovement = this.getDeltaMovement(); - double d5 = deltaMovement.x; - double d6 = deltaMovement.y; - double d1 = deltaMovement.z; + double x = deltaMovement.x; + double y = deltaMovement.y; + double z = deltaMovement.z; - double d7 = this.getX() + d5; - double d2 = this.getY() + d6; - double d3 = this.getZ() + d1; + double finalX = this.getX() + x; + double finalY = this.getY() + y; + double finalZ = this.getZ() + z; double d4 = deltaMovement.horizontalDistance(); if (flag) { - this.setYRot((float)(Mth.atan2(-d5, -d1) * (double)(180F / (float)Math.PI))); + this.setYRot((float)(Mth.atan2(-x, -z) * (double)(180F / (float)Math.PI))); } else { - this.setYRot((float)(Mth.atan2(d5, d1) * (double)(180F / (float)Math.PI))); + this.setYRot((float)(Mth.atan2(x, z) * (double)(180F / (float)Math.PI))); } - this.setXRot((float)(Mth.atan2(d6, d4) * (double)(180F / (float)Math.PI))); + this.setXRot((float)(Mth.atan2(y, d4) * (double)(180F / (float)Math.PI))); this.setXRot(lerpRotation(this.xRotO, this.getXRot())); this.setYRot(lerpRotation(this.yRotO, this.getYRot())); - float f = 0.99F; - this.setDeltaMovement(deltaMovement.scale((double)f)); - if (!this.isNoGravity() && !flag) { + float f = 0.49F; // Scale speed + this.setDeltaMovement(deltaMovement.scale(f)); + if (!this.isNoGravity() && !flag) { // Apply gravity Vec3 vec34 = this.getDeltaMovement(); this.setDeltaMovement(vec34.x, vec34.y - (double)0.05F, vec34.z); } - this.setPos(d7, d2, d3); - this.checkInsideBlocks(); - } - - @Nullable - protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { - return getEntityHitResult(this.level, this, pos, delta, - this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), - this::canHitEntity, 0.3F); - } - - @Nullable - public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Vec3 pos, Vec3 delta, AABB thisAABB, Predicate canBeHit, float scale) { - double maxDist = Double.MAX_VALUE; - Entity entity = null; - - for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { -// System.out.println("ENTITY NEARBY: " + otherEntity); - AABB aabb = otherEntity.getBoundingBox().inflate(scale); - Optional optional = aabb.clip(pos, delta); - if (optional.isPresent()) { - double dist = pos.distanceToSqr(optional.get()); - if (dist < maxDist) { - entity = otherEntity; - maxDist = dist; - } + Entity owner = this.getOwner(); + if (arcActive) { + if (owner != null) { + Vec3[] pose = new Vec3[]{owner.position(), this.getOwner().getLookAngle()}; + pose[1] = pose[1].scale((1.5)).add((0), (this.getOwner().getEyeHeight()), (0)); + Vec3 newPos = pose[1].add(pose[0]); +// System.out.println("pos: " + newPos); + this.setPos(newPos.x, newPos.y, newPos.z); } + } else { + if (owner != null) { + Vec3 vec34 = this.getDeltaMovement(); + Vec3 aim = this.getOwner().getLookAngle().multiply(.3, .3, .3); + this.setDeltaMovement(vec34.add(aim)); + } + this.setPos(finalX, finalY, finalZ); } - return entity == null ? null : new EntityHitResult(entity); + this.checkInsideBlocks(); } - public boolean canHitEntity(Entity otherEntity) { - if (!otherEntity.canBeHitByProjectile()) { - return false; - } else { - Entity entity = this.getOwner(); -// if (entity != null) { -// if (otherEntity instanceof TestProjectileEntity other) { -// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); -// System.out.println("THAT OWNER: " + other.getOwner()); +// @Nullable +// protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { +// return getEntityHitResult(this.level, this, pos, delta, +// this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), +// this::canHitEntity, 0.3F); +// } + +// @Nullable +// public static EntityHitResult getEntityHitResult(Level level, Entity thisEntity, Vec3 pos, Vec3 delta, AABB thisAABB, Predicate canBeHit, float scale) { +// double maxDist = Double.MAX_VALUE; +// Entity entity = null; +// +// for(Entity otherEntity : level.getEntities(thisEntity, thisAABB, canBeHit)) { +//// System.out.println("ENTITY NEARBY: " + otherEntity); +// AABB aabb = otherEntity.getBoundingBox().inflate(scale); +// Optional optional = aabb.clip(pos, delta); +// if (optional.isPresent()) { +// double dist = pos.distanceToSqr(optional.get()); +// if (dist < maxDist) { +// entity = otherEntity; +// maxDist = dist; // } // } - return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); - } - } +// } +// +// return entity == null ? null : new EntityHitResult(entity); +// } + +// public boolean canHitEntity(Entity otherEntity) { +// if (!otherEntity.canBeHitByProjectile()) { +// return false; +// } else { +// Entity entity = this.getOwner(); +//// if (entity != null) { +//// if (otherEntity instanceof TestProjectileEntity other) { +//// System.out.println("THIS OWNER: " + entity + " | " + !entity.isPassengerOfSameVehicle(otherEntity)); +//// System.out.println("THAT OWNER: " + other.getOwner()); +//// } +//// } +// return entity == null || this.leftOwner || !entity.isPassengerOfSameVehicle(otherEntity); +// } +// } public void setTimeToKill(int ticks) { this.ttk = ticks; @@ -239,24 +257,42 @@ protected void onHitEntity(EntityHitResult entityHitResult) { Entity entity = entityHitResult.getEntity(); if (entity instanceof Blaze) { if (this.getOwner() != null) { - this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); +// this.setNoGravity(false); + this.setOwner(entity); + this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y, entity.getViewVector(1).z, 0.75F, 1); + this.leftOwner = true; } - } else if (entity instanceof ElementProjectile elementProjectile) { + } else if (entity instanceof FireProjectile elementProjectile) { if (this.getOwner() != null && this.level.isClientSide) { - ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); - collisionEntity.setTimeToKill(5); - level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); - entityEffect.start(); - System.out.println("SUCCESS COLLISION!!!"); - this.discard(); - elementProjectile.discard(); +// System.out.println("this form: " + this.form + " | checkLeftOwner: " + this.checkLeftOwner()); +// System.out.println("other form: " + elementProjectile.form + " | arcActive: " + elementProjectile.arcActive); + if (elementProjectile.arcActive && this.checkLeftOwner()) { + this.setOwner(elementProjectile.getOwner()); // Give control to receiver + this.setDeltaMovement(0,0,0); // Full stop + this.arcActive = true; // Enable control + this.setTimeToKill(500); + System.out.println("SUCCESS ARC!!!"); + } else { + if (!this.getOwner().equals(elementProjectile.getOwner())) { + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); + collisionEntity.setTimeToKill(5); + level.addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + entityEffect.start(); + this.discard(); + elementProjectile.discard(); +// System.out.println("SUCCESS COLLISION!!!"); + } + } + } + } else if (entity instanceof Fireball fireBall) { + if (!this.getOwner().equals(fireBall.getOwner())) { + fireBall.discard(); } - } else { - // TODO - Check if player entity has countered + } else { int i = 10; // Deal 10 damage entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); - this.discard(); +// this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java index fca79fd2..4e5649c1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java @@ -2,6 +2,8 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.amuzil.omegasource.magus.entity.collision.ElementCollision; +import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; @@ -39,13 +41,14 @@ public WaterProjectile(EntityType type, Level level) { super(type, level); } - public WaterProjectile(double x, double y, double z, Level level) { + public WaterProjectile(double x, double y, double z, Level level, Form form) { this(AvatarEntities.WATER_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); +// this.form = form; } - public WaterProjectile(LivingEntity livingEntity, Level level) { - this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); + public WaterProjectile(LivingEntity livingEntity, Level level, Form form) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); this.setOwner(livingEntity); this.setNoGravity(true); } @@ -226,16 +229,16 @@ protected void onHitEntity(EntityHitResult entityHitResult) { if (this.getOwner() != null) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } - } else if (entity instanceof WaterProjectile fireProjectileEntity) { + } else if (entity instanceof ElementProjectile elementProjectile) { if (this.getOwner() != null && this.level.isClientSide) { - WaterProjectile collisionEntity = new WaterProjectile(this.getX(), this.getY(), this.getZ(), level); + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); collisionEntity.setTimeToKill(5); level.addFreshEntity(collisionEntity); EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); entityEffect.start(); System.out.println("SUCCESS COLLISION!!!"); this.discard(); - fireProjectileEntity.discard(); + elementProjectile.discard(); } } else { // TODO - Check if player entity has countered diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 182aab82..8fe12f82 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -44,7 +44,6 @@ public class KeyboardMouseInputModule extends InputModule { private boolean listen; // Used for modifier data private boolean checkForm = false; - private int c = 0; // module activating a form rather than relying on the raw input data for those forms. // This way, the trees for different complex methods (such as VR and multikey) @@ -151,8 +150,9 @@ public KeyboardMouseInputModule() { // Extra check for race conditions. Probably wont' help... synchronized (lastActivatedForm.get()) { if (!lastActivatedForm.get().name().equals("null")) { - if (Minecraft.getInstance().getConnection() != null) + if (Minecraft.getInstance().getConnection() != null) { MagusNetwork.sendToServer(new FormActivatedPacket(activeForm.get(), activeElement, 0)); + } // sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index eb746231..22c312e6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -6,12 +6,15 @@ import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.Forms; import net.minecraft.client.Minecraft; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; @@ -60,9 +63,14 @@ private static void handleClientSide(Form form, int entityId) { Player player = Minecraft.getInstance().player; assert player != null; ElementProjectile elementProjectile = (ElementProjectile) player.level.getEntity(entityId); + /** + NOTE: Need to ensure ElementProjectile's extra constructor args are set client-side. + @see ElementProjectile#ElementProjectile(EntityType, Level) This gets called first and server-side only. + Can't change this default constructor because it's needed to register entities. Add/use any extra args to Packet. + */ assert elementProjectile != null; elementProjectile.startEffect(form, player); - System.out.println("HANDLE CLIENT PACKET ---> " + form); +// System.out.println("HANDLE CLIENT PACKET ---> " + form); } // Server-side handler @@ -72,17 +80,23 @@ public static void handleServerSide(Form form, Element element, ServerPlayer pla // TODO - Create/perform certain entity updates based on form and element // - All Skills/techniques should be determined and handled here ElementProjectile entity = ElementProjectile.createElementEntity(form, element, player, level); - entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); + if (form == Forms.ARC) { + entity.arc(1.5f, 1); + } else { + entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); + } level.addFreshEntity(entity); FormActivatedPacket packet = new FormActivatedPacket(form, element, entity.getId()); // Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500; // for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { // MagusNetwork.sendToClient(packet, nearbyPlayer); // } // Keep this in case we want a more specific client packet distribution filter + + // Distribute packet to clients within 500 blocks MagusNetwork.CHANNEL.send(PacketDistributor.NEAR.with( () -> new PacketDistributor.TargetPoint(player.getX(), player.getY(), player.getZ(), 500, level.dimension())), packet); - System.out.println("HANDLE SERVER PACKET ---> " + form); +// System.out.println("HANDLE SERVER PACKET ---> " + form); } public boolean handle(Supplier ctx) { From aab7b4a72e866cb19d6794b421441b3f9945157f Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sat, 2 Nov 2024 22:58:13 -0400 Subject: [PATCH 400/469] update fx --- .../com/amuzil/omegasource/magus/Magus.java | 2 +- .../skill/test/avatar/AvatarFormRegistry.java | 1 + .../resources/assets/magus/fx/blue_fire.fx | Bin 2451 -> 2449 bytes .../resources/assets/magus/fx/fire_bloom.fx | Bin 2317 -> 2318 bytes .../assets/magus/fx/fire_bloom_perma.fx | Bin 0 -> 2319 bytes .../resources/assets/magus/fx/orb_bloom.fx | Bin 2311 -> 2318 bytes .../resources/assets/magus/textures/fire.png | Bin 0 -> 10601 bytes .../resources/assets/magus/textures/orbit.png | Bin 0 -> 67880 bytes 8 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/magus/fx/fire_bloom_perma.fx create mode 100644 src/main/resources/assets/magus/textures/fire.png create mode 100644 src/main/resources/assets/magus/textures/orbit.png diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 196d21ab..7f5a71a8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -117,7 +117,7 @@ public static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); - KeyboardMouseInputModule.determineMotionKeys(); + InputModule.determineMotionKeys(); EntityRenderers.register(AvatarEntities.AIR_PROJECTILE_ENTITY_TYPE.get(), ThrownItemRenderer::new); EntityRenderers.register(AvatarEntities.WATER_PROJECTILE_ENTITY_TYPE.get(), ThrownItemRenderer::new); EntityRenderers.register(AvatarEntities.EARTH_PROJECTILE_ENTITY_TYPE.get(), ThrownItemRenderer::new); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 5025a1f4..e5161c67 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -23,6 +23,7 @@ public class AvatarFormRegistry { public static FX fire_bloom = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "fire_bloom")); + public static FX fire_bloom_perma = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "fire_bloom_perma")); public static FX blue_fire = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "blue_fire")); public static FX orb_bloom =FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "orb_bloom")); diff --git a/src/main/resources/assets/magus/fx/blue_fire.fx b/src/main/resources/assets/magus/fx/blue_fire.fx index f438d4d713e2ab86db435e3cc3f63d53dcbe2a02..2d4f7130d92f03d90719224f8f4737fe40e63ca7 100644 GIT binary patch delta 2422 zcmV-+35oWT6Oj{tABzY8000000RQb}BlONfSV-Dij0~eJJ7L3Kc7! z@%oaQ;>4EiCMrd^XJ^lPk32WenQ^?X1TIKaNF^X%s`6AsK`DiYs(A=VKjRf z842}MHt&}vgO@0edM#`cBs0@qCV3<;dNqfjyn|hj>IP9zR=2GRT~biqC03cZ#LXim z`1Q11Ca5q*4WndZx2&LE-8T#gWr>AL29e-J#kEZtNozmaKnTWKIIi;%DX7P@`K%Vs zjy@gC@@Is9B-B?jY}=fyREX|@sIq};Aai!c!7Dz2<$a88bJzW z6GW#bHkh=PEdIg(a4Fkn{W}U8bZrlN)V9Liw*TdSUe`8^Otcd|*>tzELp{BkPM4|S z^J!E-mi1gr4Y0X^^R(<$XI6>3z~96wZP;*qsf^xXQj40td6u{yS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|Dc5VXOcE literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/magus/textures/orbit.png b/src/main/resources/assets/magus/textures/orbit.png new file mode 100644 index 0000000000000000000000000000000000000000..4dd50a24b6c83d7ac75d70a66b6992d0e526c7af GIT binary patch literal 67880 zcmcF~^K&Iku=Y90NpfP_+Ss-?wyljfwry@U&Kujdy&K!MZGL;d`#0PlrexB>qt^`y*XM;2(KMnw&^aDWh#xfkvq@8ilEw|1&CuItl|LhyrYK zYbkm9nEJeGT9R@f!PL~dITY_+ zVcL$OtA0Loqy+q%_;x4*sBYbrA5RA8ISyr}(E(d`qqtZ!AsmJcRG6 zYIa7pp#{)Yd!Rf2UvBI_yP=@yAzk`dy6)*m-YvN~^MLk;B_0Xt0d1f7|E>6>2)Kf9 zc+A+U0{Gzd8Ul?BpOWJo;r)^Pq5Sb{cK4n!0zkbtkRJG(u~aua@22ncpAZB+cZ=sj zp*<1tJ5&yFnmy-FKv+!pPqx_j68)!GLj6x*^Fer>qzk0AD;?>X_s+DXLlW{CX{H^i|k@wUh% z5m5E>#=$B0e-We)pzB5gZ{LgwAsTki&;>XHo`~K@=;*c)2me8SvnC=DAZ+Y`f#{zh z445I=#zuy@)aCX=jr%%x+Tk*=?oCGN1h)PIz8en|AQa{wPCS5omwMy*F3*3}ixj`7 z?2{@;>!fdjNb}#O{*t16<}JS$Bq!jr88XMqA(jsHSzz*ij?n=FMsThNp6?Q`#hl!I zf5$)d3AuEv>}kC{@c*fu`I9#Ly1EwLP@Q~v@Ur{kNnosm+4$v_`foD$o#^PFhCIXB ziQW*lMk4>g76s>QbPl!@mVKaXnn~(U-*q2%5wSc;67IDle^lHKq86X=SNF7iHTG@7 z8zFCp+CSpA?VfGZ!Z{2*Dji zm>k@8DLFIW>P7L#RT=ay0^y&~`!`q?%}|nC`B!aU0m`8LzIW#?-TwzANI>P=)?@S5 zRCSMn#9ru;{LT4X4(LEz%wqy#?nV6*Nxvh z^XJp@_Ky8BU&n5XlPjnd;&~V8qss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A}Lqt-l3RjzAcN*qal(bTeKNNn0)~wA}z=GZfgX zwh0(Opyc<&HEBvWF%5T<^|^p3=Ci-wj#odIShGqfymX~AiOZ!cFQ^J6QtTC}vh#65 zdwoaajm8VV9(&YnKv+PI81CeqO;4Z?h{P*{mz7==f~ZUFQj5^|9KuC{l;#WfYE>@b z68n21W57Vhkt+Ca#_^+-^F36B#b`+{^1!p*NGHHV3t&_k? zD}ZWC>oYiXslb5D8N%gnvK~>Zv((>amqaJFJDxZ1NOdURQL}&I9DfD)CjW*EA5%tL zDw6SAVkZ|_az&2-e0#)_T`M%RW#ygWig-3^cQ^P<9qSJ2R>-=}wtf6EHEG|6A0Y#t zP0-P9TJd3D3}VK8q0DA03FDK!i1m^Yvz?}dP>GfNe(SXE1+IzBWf4o)9zTZmfPbn~ z^M;G4a!v{R)_nZ@`twc9&TxTgAcWdh(E-0ZShog0<$7>z=OeMNJ92I=N5`}%03+(e zz7u}Hf>(atAzJ-A3uqXawE(HnxHlstIWhgmk!d}`)=8%NiV!(P^yds3q&^u7ej)41 zTA1DFW}=6|xUvkOg)x*oSEcbxjq_Wq3^4}!dS}(;(YZ5MHH)tC8Qx+UwD*`EWHhT zPiH^aHkQ7`QU(31lmS;IvYtzA;)JQZVH+(yVcnCBv!$CxHH-5ZV(C|z<1Z)mYA1#t1k>x*dE}9Gxoyn3! zmavXx!o6!~ONzp1Y`chNdq^z7>nkf;8_yg`<#3)T@P|3f2{%GuA-7?zQjsd~y1(^n zU{OTJ*Uwyw;QIl^pvN~PmH)Qbh$-ag<3P%Gt>zr2zfBN*I-_jo74OF|O1XnKF&-Mu zr5A-0a#(Gg)I*S_j~|AKzt<87R?E2AV*>gwyXXaqOB<%&9s&Koiz Date: Sat, 2 Nov 2024 23:08:24 -0400 Subject: [PATCH 401/469] improve form activation consistency --- .../magus/input/KeyboardMouseInputModule.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 8fe12f82..ba881dfe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -4,6 +4,7 @@ import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.*; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.forms.Form; @@ -19,6 +20,7 @@ import net.minecraftforge.eventbus.api.EventPriority; import org.apache.logging.log4j.LogManager; +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; @@ -190,6 +192,18 @@ private void checkForForm() { activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); // System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); // sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); + } else { // Retry w/o movementConditions + List nonMovementConditions = new ArrayList<>(); + conditions.forEach(condition -> { + if (condition instanceof KeyHoldCondition keyHoldCondition) { + if (!getMovementKeys().containsValue(keyHoldCondition.getKey())) { + nonMovementConditions.add(condition); + } + } + }); + recognized = formsTree.search(nonMovementConditions); + if (recognized != null) + activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); } } } From 1c5148badeef43a7af522a856956536d8f4b6a58 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Sun, 3 Nov 2024 01:00:36 -0500 Subject: [PATCH 402/469] started to implement FormActivatedEvent --- .../magus/entity/ElementProjectile.java | 4 +- .../entity/projectile/FireProjectile.java | 53 +++++++++++++++---- .../client_executed/FormActivatedPacket.java | 17 ++++-- .../magus/server/ServerEvents.java | 1 + .../skill/test/avatar/AvatarCommand.java | 4 +- 5 files changed, 62 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java index 1680f605..c93a3ee6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java @@ -237,6 +237,7 @@ public static ElementProjectile createElementEntity(Form form, Element element, }; } + // Method to start initial visual effect public void startEffect(Form form, Player player) { this.form = form; // NOTE: Need this to ensure form is set client-side before onHit event FX fx = null; @@ -246,8 +247,7 @@ public void startEffect(Form form, Player player) { fx = blue_fire; if (form.name().equals("arc")) { // TODO - Make perma fire and allow it to be shootable. Also stop catching fire from damaging receiver - // Also allow user to curve shot projectiles. - fx = fire_bloom; + fx = null; arcActive = true; } if (fx != null) { diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java index bc95fa59..451db912 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java @@ -3,7 +3,12 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; import com.amuzil.omegasource.magus.entity.collision.ElementCollision; +import com.amuzil.omegasource.magus.level.event.FormActivatedEvent; +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; import net.minecraft.network.syncher.EntityDataAccessor; @@ -22,11 +27,16 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.*; import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; import javax.annotation.Nullable; import java.util.Optional; import java.util.function.Predicate; +import static com.amuzil.omegasource.magus.Magus.MOD_ID; +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.fire_bloom_perma; import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; @@ -38,6 +48,7 @@ public class FireProjectile extends ElementProjectile { public FireProjectile(EntityType type, Level level) { super(type, level); + MinecraftForge.EVENT_BUS.register(this); } public FireProjectile(double x, double y, double z, Level level, Form form) { @@ -52,6 +63,14 @@ public FireProjectile(LivingEntity livingEntity, Level level, Form form) { this.setNoGravity(true); } + @Override + public void remove(RemovalReason reason) { + super.remove(reason); + + // Unregister from the event bus + MinecraftForge.EVENT_BUS.unregister(this); + } + public void tick() { super.tick(); boolean flag = this.isNoPhysics(); @@ -155,13 +174,14 @@ public void tick() { Vec3[] pose = new Vec3[]{owner.position(), this.getOwner().getLookAngle()}; pose[1] = pose[1].scale((1.5)).add((0), (this.getOwner().getEyeHeight()), (0)); Vec3 newPos = pose[1].add(pose[0]); -// System.out.println("pos: " + newPos); + // Listen for FormActivatedEvent to determine whether to shoot this or not this.setPos(newPos.x, newPos.y, newPos.z); } } else { if (owner != null) { Vec3 vec34 = this.getDeltaMovement(); - Vec3 aim = this.getOwner().getLookAngle().multiply(.3, .3, .3); + double rateOfControl = 0.4; // Control/curve the shot projectile + Vec3 aim = this.getOwner().getLookAngle().multiply(rateOfControl, rateOfControl, rateOfControl); this.setDeltaMovement(vec34.add(aim)); } this.setPos(finalX, finalY, finalZ); @@ -170,6 +190,17 @@ public void tick() { this.checkInsideBlocks(); } + @SubscribeEvent + public void onFormEvent(FormActivatedEvent event) { + if (event.getForm().equals(Forms.STRIKE) && this.arcActive && !this.level.isClientSide()) { + System.out.println("FormActivatedEvent EVENT POSTED & RECEIVED!"); + Entity entity = this.getOwner(); + assert entity != null; + this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y, entity.getViewVector(1).z, 0.75F, 1); + this.discard(); + } + } + // @Nullable // protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { // return getEntityHitResult(this.level, this, pos, delta, @@ -214,13 +245,14 @@ public void tick() { // } public void setTimeToKill(int ticks) { +// System.out.println("setTimeToKill isClientSide: " + this.level.isClientSide()); this.ttk = ticks; } protected void tickDespawn() { ++this.life; - if (this.life >= ttk) { -// System.out.println("BYE BYE BBY"); + if (this.life >= ttk && ttk != -1) { +// System.out.println("BYE BYE BBY " + life + " / " + ttk); this.discard(); } } @@ -269,8 +301,12 @@ protected void onHitEntity(EntityHitResult entityHitResult) { if (elementProjectile.arcActive && this.checkLeftOwner()) { this.setOwner(elementProjectile.getOwner()); // Give control to receiver this.setDeltaMovement(0,0,0); // Full stop - this.arcActive = true; // Enable control - this.setTimeToKill(500); + this.arcActive = true; // Enable control of this shot projectile + elementProjectile.setTimeToKill(1600); + MagusNetwork.sendToServer(new FormActivatedPacket(Forms.ARC, Elements.FIRE, elementProjectile.getId())); + System.out.println("onHitEntity isClientSide: " + this.level.isClientSide()); + EntityEffect entityEffect = new EntityEffect(fire_bloom_perma, level, elementProjectile); + entityEffect.start(); System.out.println("SUCCESS ARC!!!"); } else { if (!this.getOwner().equals(elementProjectile.getOwner())) { @@ -281,7 +317,6 @@ protected void onHitEntity(EntityHitResult entityHitResult) { entityEffect.start(); this.discard(); elementProjectile.discard(); -// System.out.println("SUCCESS COLLISION!!!"); } } } @@ -290,8 +325,8 @@ protected void onHitEntity(EntityHitResult entityHitResult) { fireBall.discard(); } } else { - int i = 10; // Deal 10 damage - entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + float i = 4; // Deal 4 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), i); // this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 22c312e6..b6b1be0d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.network.packets.client_executed; import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.amuzil.omegasource.magus.level.event.FormActivatedEvent; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; import com.amuzil.omegasource.magus.registry.Registries; @@ -17,6 +18,7 @@ import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.network.NetworkEvent; import net.minecraftforge.network.PacketDistributor; @@ -74,12 +76,21 @@ private static void handleClientSide(Form form, int entityId) { } // Server-side handler - public static void handleServerSide(Form form, Element element, ServerPlayer player) { + public static void handleServerSide(Form form, Element element, int entityId, ServerPlayer player) { // Perform server-side entity spawning and updating logic and fire Form Event here + MinecraftForge.EVENT_BUS.post(new FormActivatedEvent(form)); ServerLevel level = player.getLevel(); // TODO - Create/perform certain entity updates based on form and element // - All Skills/techniques should be determined and handled here - ElementProjectile entity = ElementProjectile.createElementEntity(form, element, player, level); + ElementProjectile entity; + if (entityId != 0) { + entity = (ElementProjectile) player.level.getEntity(entityId); + assert entity != null; + entity.setTimeToKill(800); + } else { + entity = ElementProjectile.createElementEntity(form, element, player, level); + } + assert entity != null; if (form == Forms.ARC) { entity.arc(1.5f, 1); } else { @@ -106,7 +117,7 @@ public boolean handle(Supplier ctx) { } else { ServerPlayer player = ctx.get().getSender(); assert player != null; - handleServerSide(form, element, player); + handleServerSide(form, element, entityId, player); } }); return true; diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index b76fcbfb..68983f5c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -119,6 +119,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { } } else { if (event.getEntity() instanceof Player) { + // TODO - Fix so that this doesn't run for every player on server Magus.keyboardMouseInputModule.terminate(); Magus.mouseMotionModule.terminate(); InputModule.resetFormsTree(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index 15ccb481..ceb964e0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -8,9 +8,7 @@ import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.mojang.brigadier.CommandDispatcher; -import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import com.mojang.brigadier.context.CommandContext; import com.mojang.brigadier.exceptions.CommandSyntaxException; @@ -83,7 +81,7 @@ private static int reset() { private static int activateForm(String name, ServerPlayer player) { Form form = Registries.FORMS.get().getValue(new ResourceLocation(MOD_ID, name)); - FormActivatedPacket.handleServerSide(form, InputModule.activeElement, player); + FormActivatedPacket.handleServerSide(form, InputModule.activeElement, 0, player); return 1; } From d52a5b01199d2abd074e4b6aca7ae17a5ee3d5b1 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 4 Nov 2024 01:03:30 -0500 Subject: [PATCH 403/469] update blue fire fx --- .../magus/entity/ElementProjectile.java | 12 +++++------- .../skill/test/avatar/AvatarFormRegistry.java | 1 + .../resources/assets/magus/fx/blue_fire_perma.fx | Bin 0 -> 2451 bytes 3 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 src/main/resources/assets/magus/fx/blue_fire_perma.fx diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java index c93a3ee6..0169a355 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java @@ -125,11 +125,10 @@ public void setTimeToKill(int ticks) { } protected void tickDespawn() { - ++this.life; - if (this.life >= ttk) { -// System.out.println("BYE BYE BBY"); + ++life; + if (life >= ttk) { +// System.out.println("BYE BYE BBY " + life + " / " + ttk); this.discard(); -// this.arcActive = false; } } @@ -242,11 +241,10 @@ public void startEffect(Form form, Player player) { this.form = form; // NOTE: Need this to ensure form is set client-side before onHit event FX fx = null; if (form.name().equals("strike")) - fx = fire_bloom; + fx = fire_bloom_perma; if (form.name().equals("force")) - fx = blue_fire; + fx = blue_fire_perma; if (form.name().equals("arc")) { - // TODO - Make perma fire and allow it to be shootable. Also stop catching fire from damaging receiver fx = null; arcActive = true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index e5161c67..ec252784 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -25,6 +25,7 @@ public class AvatarFormRegistry { public static FX fire_bloom = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "fire_bloom")); public static FX fire_bloom_perma = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "fire_bloom_perma")); public static FX blue_fire = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "blue_fire")); + public static FX blue_fire_perma = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "blue_fire_perma")); public static FX orb_bloom =FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "orb_bloom")); public static void registerForms() { diff --git a/src/main/resources/assets/magus/fx/blue_fire_perma.fx b/src/main/resources/assets/magus/fx/blue_fire_perma.fx new file mode 100644 index 0000000000000000000000000000000000000000..2ef3a40ac961ef4665757529d826c7cbde2bf26c GIT binary patch literal 2451 zcmV;E32gQsiwFP!00000|Lt2_Y#dh^KI8T5W$f5V6F{me6a*4|DBE1YDTRlsc?d{A=>z4GLPSADrXZ?{ z2i_7SL_t9K&zZ~4+UuQ7u-9=}OVRPn`OiQ9`Okm-e4-#!KzU+P&m%5V5JDLV^;0(Q zmnMUkD35wAY!W0h(_SWdBrke3hoHQJU61MpQBYR5tqNUIP~Ih0nYhHwBPICtv|T2s zFh&idWMj9ipkCcK3<+h4g-ZsJ;6=r?O&LjRKiWVD##%V8^ARbi$FupY7S4`79nA7) zge25gGHlzNtW=2ZfvB>9YanxW#=$E-f#rRSu9LCayh8~8I)74tos6=UZ!9uCl2F-dJ4T`r4rZSWfMfFCN`L~ zl`Q_k0B|YWX8k(~8gy+Bd(^hV-M0VbUe`8^Otcd|*>tzELp{BkPM4|S^J!E-mi1gr z4Y0X^^R(<$XI6>3z~96wZP;*qsf^xXQj40td6u{yS(~8zy-rSk<240L(4ZCKQIjMk zkeaZO&|z*2MPWJY92Wt|vi_RSNuxj!2$Im=Czc@cP zzF3@|ohk;rlT?Lx4n@0OAk34bAfjTW2ZqX~-qL`@lj9x^ktTW|eCJM!{f>ieGgruN927e=mKyUq#KyDvT)S&<-AANkW8g7BGuPz6qcaN#$< zjjSpl{M74z5QJ;MIY|f{n^;*rMW77Imwllk3;29O5&4QScvMh-^y?g0PCasbt5Rv= z@&%MF`7ZMq3ZhcHSh#$Cat)4}T1&CQ!!WuvAdem$8sgD&v{gU`0}gn=iEn42PG5P2 zvrwOU>T4}n|WCUz8F zX2Ce_yQ^SjhYed_21Xv_^I4l(o&*-J^Ep=FSuplR?sxq2!u2ba%9e;WWzpB+@P+LeaG37 z+GQbr;*gN2+u{n8)n^j5Y7oREbR;s3IZ<#1{(EedfG$8~jgjz>D1*S;X@wFutwMkj z#h@0!Ee)Mw4syWWo!ZE0*n9f7L(5m|67kcz^Z$dA9VWJRjv-@?qL6@o?OKMgras5p5 z_elnW&7&q;uC+zVdzP?dimV%YO;hCJ*)Z}pL~awbL>;4+=D0k3_^U9{T7RjcSJW=-8q*(f^Y;MJasa$3q9Y zg+!IC?82nAV`T>&Tt9G0w6wXaZJ`J`kF0sVOVGPayyUat@R5D6LS1sgv6kX54K4&z z5r81`MjCeKmKUn90OD-<p;p+kV)J1f=h;A3r-Ca4li0=L&x{dLHHz_yrU;GYlQf}NmySc6DYa8g@w|aF8 zV0)?^z_vL|xLbg27#v4myk)?41VRyKG4i*UzT6SOHa*xS5SiTsY}enIN&{?D`|tl> zz&3D>E@0aQY`cJMYruB@s?;vNd3)lUVU{j#w9L{69pBUfzFmCtf5A697RI_j<{kl= z8}))lbuNx+pMAhnpL=|PkAf(AQ2+S-4L)xDo87?zGSix8AP#>6J!R)apx|ndc(f>> z!xLMuOfeTL;_cLS?-k$)()(nQV=QR2GR4m&qubU#Kp+vH!rC7UH+c>I~bj7*R`pDK~!%<^ z?sF3$F;972ka+Jd!9KJ((!zQ=jvcpy*>(au?tCh}wM($izgwMs@{;y}e_m199d~M9 zs(x2}_Ln`{qwiS_u;cJS-Mr)P+QTbf)k@EQMg6h&*Mo^2@9HJk@UKrD!yWjl?KlH} RyC>)``Y(naygblA006>+%pCv# literal 0 HcmV?d00001 From bc9c0b3a175ffcb4ff7f0d3ebc7794f6668a85c1 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 4 Nov 2024 02:19:16 -0500 Subject: [PATCH 404/469] improved arc catching & shooting need to figure out why arc doesn't fire immediately and stacks in multiplayer (mp) --- .../magus/entity/ElementProjectile.java | 6 +++ .../entity/projectile/FireProjectile.java | 51 +++++++++---------- .../magus/level/event/FormActivatedEvent.java | 16 ++++-- .../client_executed/FormActivatedPacket.java | 12 ++--- 4 files changed, 44 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java index 0169a355..e3f2ec33 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java @@ -214,6 +214,7 @@ protected void onHit(HitResult hitResult) { public void arc(float scale, float offset) { this.arcActive = true; + this.setTimeToKill(24000); Entity owner = this.getOwner(); assert owner != null; Vec3[] pose = new Vec3[]{owner.position(), this.getOwner().getLookAngle()}; @@ -248,6 +249,11 @@ public void startEffect(Form form, Player player) { fx = null; arcActive = true; } + if (form.name().equals("null")) { + fx = fire_bloom_perma; + arcActive = true; + this.setTimeToKill(24000); + } if (fx != null) { EntityEffect entityEffect = new EntityEffect(fx, level, this); entityEffect.start(); diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java index 451db912..6db33062 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java @@ -20,6 +20,7 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.monster.Blaze; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.projectile.AbstractArrow; import net.minecraft.world.entity.projectile.Fireball; import net.minecraft.world.level.ClipContext; import net.minecraft.world.level.Level; @@ -43,8 +44,6 @@ public class FireProjectile extends ElementProjectile { private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(FireProjectile.class, EntityDataSerializers.BYTE); private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(FireProjectile.class, EntityDataSerializers.BYTE); - private int life; - private int ttk = 100; public FireProjectile(EntityType type, Level level) { super(type, level); @@ -192,12 +191,17 @@ public void tick() { @SubscribeEvent public void onFormEvent(FormActivatedEvent event) { - if (event.getForm().equals(Forms.STRIKE) && this.arcActive && !this.level.isClientSide()) { - System.out.println("FormActivatedEvent EVENT POSTED & RECEIVED!"); - Entity entity = this.getOwner(); - assert entity != null; - this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y, entity.getViewVector(1).z, 0.75F, 1); - this.discard(); + Entity owner = this.getOwner(); + if (owner != null && event.getEntity().getId() == owner.getId()) { + if (event.getForm().equals(Forms.STRIKE) && this.arcActive) { + this.arcActive = false; + this.setTimeToKill(100); +// this.discard(); + if (!this.level.isClientSide()) { + this.shoot(owner.getViewVector(1).x, owner.getViewVector(1).y, owner.getViewVector(1).z, 0.75F, 1); + System.out.println("FormActivatedEvent SERVER-SIDE!"); + } + } } } @@ -244,19 +248,6 @@ public void onFormEvent(FormActivatedEvent event) { // } // } - public void setTimeToKill(int ticks) { -// System.out.println("setTimeToKill isClientSide: " + this.level.isClientSide()); - this.ttk = ticks; - } - - protected void tickDespawn() { - ++this.life; - if (this.life >= ttk && ttk != -1) { -// System.out.println("BYE BYE BBY " + life + " / " + ttk); - this.discard(); - } - } - @Override public boolean isPickable() { return true; @@ -302,12 +293,12 @@ protected void onHitEntity(EntityHitResult entityHitResult) { this.setOwner(elementProjectile.getOwner()); // Give control to receiver this.setDeltaMovement(0,0,0); // Full stop this.arcActive = true; // Enable control of this shot projectile - elementProjectile.setTimeToKill(1600); - MagusNetwork.sendToServer(new FormActivatedPacket(Forms.ARC, Elements.FIRE, elementProjectile.getId())); - System.out.println("onHitEntity isClientSide: " + this.level.isClientSide()); - EntityEffect entityEffect = new EntityEffect(fire_bloom_perma, level, elementProjectile); - entityEffect.start(); - System.out.println("SUCCESS ARC!!!"); + MagusNetwork.sendToServer(new FormActivatedPacket(Forms.NULL, Elements.FIRE, this.getId())); + this.discard(); + elementProjectile.discard(); +// System.out.println("THIS CLIENT-SIDE: " + this.ttk); +// System.out.println("THAT CLIENT-SIDE: " + elementProjectile.ttk); +// elementProjectile.discard(); } else { if (!this.getOwner().equals(elementProjectile.getOwner())) { ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); @@ -324,8 +315,12 @@ protected void onHitEntity(EntityHitResult entityHitResult) { if (!this.getOwner().equals(fireBall.getOwner())) { fireBall.discard(); } + } else if (entity instanceof AbstractArrow arrow) { + if (!this.getOwner().equals(arrow.getOwner())) { + arrow.discard(); + } } else { - float i = 4; // Deal 4 damage + float i = 10; // Deal 10 damage entity.hurt(this.damageSources().thrown(this, this.getOwner()), i); // this.discard(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/level/event/FormActivatedEvent.java b/src/main/java/com/amuzil/omegasource/magus/level/event/FormActivatedEvent.java index f3ae12ae..1a2ce6d3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/level/event/FormActivatedEvent.java +++ b/src/main/java/com/amuzil/omegasource/magus/level/event/FormActivatedEvent.java @@ -2,26 +2,34 @@ import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import net.minecraft.world.entity.LivingEntity; import net.minecraftforge.eventbus.api.Event; import java.util.List; + public class FormActivatedEvent extends Event { - private Form form; + private final Form form; + private final LivingEntity entity; private List modifiers; - public FormActivatedEvent(Form form) { + public FormActivatedEvent(Form form, LivingEntity entity) { this.form = form; + this.entity = entity; } - public FormActivatedEvent(Form form, List modifierData) { - this(form); + public FormActivatedEvent(Form form, List modifierData, LivingEntity entity) { + this(form, entity); this.modifiers = modifierData; } public Form getForm() { return this.form; } + public LivingEntity getEntity() { + return this.entity; + } + public List getModifierData() { return this.modifiers; } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index b6b1be0d..9c312c26 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -78,20 +78,14 @@ private static void handleClientSide(Form form, int entityId) { // Server-side handler public static void handleServerSide(Form form, Element element, int entityId, ServerPlayer player) { // Perform server-side entity spawning and updating logic and fire Form Event here - MinecraftForge.EVENT_BUS.post(new FormActivatedEvent(form)); + MinecraftForge.EVENT_BUS.post(new FormActivatedEvent(form, player)); ServerLevel level = player.getLevel(); // TODO - Create/perform certain entity updates based on form and element // - All Skills/techniques should be determined and handled here ElementProjectile entity; - if (entityId != 0) { - entity = (ElementProjectile) player.level.getEntity(entityId); - assert entity != null; - entity.setTimeToKill(800); - } else { - entity = ElementProjectile.createElementEntity(form, element, player, level); - } + entity = ElementProjectile.createElementEntity(form, element, player, level); assert entity != null; - if (form == Forms.ARC) { + if (form == Forms.ARC || form == Forms.NULL) { entity.arc(1.5f, 1); } else { entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); From 0ec509f7df8d9c3be565d3f7f0085cb4f1824144 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 5 Nov 2024 18:56:04 +1100 Subject: [PATCH 405/469] code cleanup, hopefully held modifier works --- .../omegasource/magus/input/InputModule.java | 5 +++ .../magus/input/KeyboardMouseInputModule.java | 8 +++-- .../listeners/KeyHeldModifierListener.java | 34 ++++++++++++++----- .../entity/LivingDataCapability.java | 5 +++ .../skill/util/capability/entity/Magi.java | 14 +++++--- 5 files changed, 51 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 8db8c649..99ed549e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -119,6 +119,11 @@ public Form getLastActivatedForm() { return this.lastActivatedForm.get(); } + // Should be overridden.. + public Form getActiveForm() { + return this.lastActivatedForm.get(); + } + public List getActiveConditions() { return activeConditions; } diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index d0141f20..75bf733a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -6,7 +6,6 @@ import com.amuzil.omegasource.magus.radix.*; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.elements.Discipline; -import com.amuzil.omegasource.magus.skill.elements.Disciplines; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; @@ -47,9 +46,9 @@ public class KeyboardMouseInputModule extends InputModule { private final AtomicReference activeForm; private final AtomicInteger timeout; private final List glfwKeysDown; + public int scrollTimeout = 0; private int ticksSinceModifiersSent = 0; private double mouseScrollDelta; - public int scrollTimeout = 0; private boolean listen; // Used for modifier data private boolean checkForm = false; @@ -216,6 +215,11 @@ public static void setActiveDiscipline(Discipline discipline) { formsTree.setDiscipline(discipline); } + @Override + public Form getActiveForm() { + return this.activeForm.get(); + } + private void checkForForm() { synchronized (activeConditions) { if (!activeConditions.isEmpty()) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 6ee1af65..8d58dd8f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -17,15 +17,17 @@ import net.minecraftforge.event.TickEvent; import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; import java.util.function.Consumer; public class KeyHeldModifierListener extends ModifierListener { + private final RadixTree.InputType type; private Consumer clientTickListener; private int currentHolding; private boolean isHeld = true; private boolean wasHeld = true; - private RadixTree.InputType type; + private List activeKeyCodes; public KeyHeldModifierListener() { this(RadixTree.InputType.KEYBOARD_MOUSE); @@ -34,6 +36,7 @@ public KeyHeldModifierListener() { public KeyHeldModifierListener(RadixTree.InputType type) { this.modifierData = new HeldModifierData(); this.type = type; + this.activeKeyCodes = new LinkedList<>(); } @Override @@ -48,10 +51,8 @@ public void unregister() { MinecraftForge.EVENT_BUS.unregister(clientTickListener); } - @Override - public void setupListener(CompoundTag compoundTag) { - Form formToModify = FormDataRegistry.getFormByName(compoundTag.getString("lastFormActivated")); - List formInputs = FormDataRegistry.getInputsForForm(formToModify, type); + public List getKeyCodes(Form form, RadixTree.InputType type) { + List formInputs = FormDataRegistry.getInputsForForm(form, type); InputData lastInput = formInputs.get(formInputs.size() - 1); List keyCodes = new ArrayList<>(); @@ -63,20 +64,28 @@ public void setupListener(CompoundTag compoundTag) { else if (lastInput instanceof MultiKeyInput) { for (KeyInput key : ((MultiKeyInput) lastInput).keys()) keyCodes.add(key.key().getValue()); - } - else { + } else { // If it's registered to the keyboard mouse input module, it's going to be some variant // of KeyInput. keyCodes.add(((KeyInput) lastInput).key().getValue()); } + return keyCodes; + } - InputModule module = Magus.keyboardMouseInputModule; + public InputModule getTypedModule(RadixTree.InputType type) { + return Magus.keyboardMouseInputModule; + } + + @Override + public void setupListener(CompoundTag compoundTag) { + // TODO: FIx this + InputModule module = Magus.keyboardMouseInputModule; this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { boolean pressed = true; // If all requisite keys aren't pressed, don't iterate modifier data - for (int key : keyCodes) { + for (int key : activeKeyCodes) { if (!module.keyPressed(key)) { pressed = false; break; @@ -97,6 +106,13 @@ else if (lastInput instanceof MultiKeyInput) { @Override public boolean shouldCollectModifierData(TickEvent event) { + InputModule module = getTypedModule(type); + if (module.getActiveForm() != null && !module.getActiveForm().name().equals(module.getLastActivatedForm().name())) { + activeKeyCodes = getKeyCodes(module.getActiveForm(), type); + } + + if (activeKeyCodes.isEmpty()) return false; + if (isHeld && currentHolding > 0) { return true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java index b25e3148..1791bb2d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -78,6 +78,10 @@ public CompoundTag serializeNBT() { tag.put(trait.getName(), trait.serializeNBT()); } }); +// if (magi != null && magi.isDirty()) { +// tag = magi.serialiseNBT(tag); +// } + return tag; } @@ -85,6 +89,7 @@ public CompoundTag serializeNBT() { public void deserializeNBT(CompoundTag nbt) { markClean(); traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); + magi.deserialiseNBT(nbt); } public void setTree(RadixTree tree) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index 9ee11f21..10158b06 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -7,11 +7,13 @@ import com.amuzil.omegasource.magus.skill.util.data.SkillData; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.common.util.FakePlayer; +import org.checkerframework.checker.units.qual.C; import org.jetbrains.annotations.Nullable; import java.util.LinkedList; @@ -75,10 +77,6 @@ public SkillData getSkillData(String id) { // Called per tick public void onUpdate() { - - if (getMagi().isOnGround()) { - System.out.println("Magi is on the ground."); - } } public void onDeath() { @@ -89,4 +87,12 @@ public LivingEntity getMagi() { return this.magi; } + public CompoundTag serialiseNBT(CompoundTag tag) { + return tag; + } + + public void deserialiseNBT(CompoundTag tag) { + + } + } From 06f5a0d5026fb01284bdf33658c8441b733fa973 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 00:15:11 +1100 Subject: [PATCH 406/469] capability error handling - just have to figure out why modifier data isn't printing --- .../client_executed/FormActivatedPacket.java | 2 +- .../listeners/TargetModifierListener.java | 4 +-- .../entity/LivingDataCapability.java | 27 +++++++++---------- .../skill/util/capability/entity/Magi.java | 11 +++++++- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 9c312c26..c39816d1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -101,7 +101,7 @@ public static void handleServerSide(Form form, Element element, int entityId, Se MagusNetwork.CHANNEL.send(PacketDistributor.NEAR.with( () -> new PacketDistributor.TargetPoint(player.getX(), player.getY(), player.getZ(), 500, level.dimension())), packet); -// System.out.println("HANDLE SERVER PACKET ---> " + form); + System.out.println("HANDLE SERVER PACKET ---> " + form); } public boolean handle(Supplier ctx) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index 86a8947d..05e5fcf6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -36,7 +36,7 @@ public TargetModifierListener() { @Override public void setupListener(CompoundTag compoundTag) { - this.activeElement = Elements.fromName(compoundTag.getString("activeElement")); +// this.activeElement = Elements.fromName(compoundTag.getString("activeElement")); } @Override @@ -52,7 +52,7 @@ public boolean shouldCollectModifierData(InputEvent.MouseButton event) { Vec3 vector3d1 = mc.player.getViewVector(1.0F); double distance = 20; //todo max distance make this configurable Vec3 vector3d2 = vector3d.add(vector3d1.x * distance, vector3d1.y * distance, vector3d1.z * distance); - List> bendableMaterials = BendingMaterialUtil.getBendableMaterialsForElement(activeElement); + List> bendableMaterials = new ArrayList<>();//BendingMaterialUtil.getBendableMaterialsForElement(activeElement); BlockHitResult hitresult = mc.player.level.clip(new ClipContext(vector3d, vector3d2, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, player)); if (hitresult.getType() == HitResult.Type.BLOCK) { BlockPos locationHit = hitresult.getBlockPos(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java index 1791bb2d..917bb6af 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -1,12 +1,8 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.radix.Node; -import com.amuzil.omegasource.magus.radix.NodeBuilder; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.registry.Registries; -import com.amuzil.omegasource.magus.skill.forms.Forms; -import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -72,15 +68,15 @@ public Magi getMagi(LivingEntity entity) { @Override public CompoundTag serializeNBT() { - CompoundTag tag = new CompoundTag(); + CompoundTag tag; + if (magi != null && magi.isDirty()) { + tag = magi.serialiseNBT(new CompoundTag()); + } else tag = new CompoundTag(); traits.forEach(trait -> { if (trait.isDirty() || isDirty()) { tag.put(trait.getName(), trait.serializeNBT()); } }); -// if (magi != null && magi.isDirty()) { -// tag = magi.serialiseNBT(tag); -// } return tag; } @@ -89,7 +85,12 @@ public CompoundTag serializeNBT() { public void deserializeNBT(CompoundTag nbt) { markClean(); traits.forEach(trait -> trait.deserializeNBT((CompoundTag) nbt.get(trait.getName()))); - magi.deserialiseNBT(nbt); + if (magi != null) + magi.deserialiseNBT(nbt); + } + + public RadixTree getTree() { + return tree; } public void setTree(RadixTree tree) { @@ -97,10 +98,6 @@ public void setTree(RadixTree tree) { markDirty(); } - public RadixTree getTree() { - return tree; - } - public void fillTraits() { traits.addAll(Registries.DATA_TRAITS.get().getValues()); } @@ -177,11 +174,11 @@ public boolean isDirty() { public static class LivingDataProvider implements ICapabilityProvider, ICapabilitySerializable { + private final LazyOptional instance = LazyOptional.of(LivingDataCapabilityImp::new); + public static void init() { } - private final LazyOptional instance = LazyOptional.of(LivingDataCapabilityImp::new); - @Override public CompoundTag serializeNBT() { return instance.orElseThrow(NullPointerException::new).serializeNBT(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index 10158b06..15c870cd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -35,13 +35,22 @@ public Magi(Data capabilityData, LivingEntity entity) { @Nullable public static Magi get(LivingEntity entity) { - return ((LivingDataCapability.LivingDataCapabilityImp) (CapabilityHandler.getCapability(entity, CapabilityHandler.LIVING_DATA))).getMagi(entity); + LivingDataCapability.LivingDataCapabilityImp cap = ((LivingDataCapability.LivingDataCapabilityImp) (CapabilityHandler.getCapability(entity, CapabilityHandler.LIVING_DATA))); + if (cap == null) { + // Capability isn't ready yet. + return null; + } + return cap.getMagi(entity); } public LivingDataCapability.LivingDataCapabilityImp getMagusData() { return (LivingDataCapability.LivingDataCapabilityImp) capabilityData; } + // Need to sync this with given skills, traits, e.t.c + public boolean isDirty() { + return false; + } public RadixTree getTree() { return capabilityData.getTree(); } From f90c81ba5ef18469d73c52b24c2db4528fb79ca3 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 09:37:30 -0500 Subject: [PATCH 407/469] improved entity projectile testing system improved catching fire and started water projectile, improved single player & mp compatibility --- .../magus/entity/ElementProjectile.java | 77 +++++++++----- .../entity/collision/ElementCollision.java | 8 +- .../entity/projectile/AirProjectile.java | 20 ++-- .../entity/projectile/EarthProjectile.java | 19 ++-- .../entity/projectile/FireProjectile.java | 44 ++++---- .../entity/projectile/WaterProjectile.java | 94 +++++++++--------- .../magus/level/event/MagusEvents.java | 18 ++-- .../client_executed/FormActivatedPacket.java | 22 ++-- .../magus/server/ServerEvents.java | 18 ++-- .../skill/test/avatar/AvatarCommand.java | 2 +- .../skill/test/avatar/AvatarFormRegistry.java | 4 +- .../skill/util/capability/entity/Magi.java | 1 + src/main/resources/assets/magus/fx/steam.fx | Bin 0 -> 1891 bytes src/main/resources/assets/magus/fx/water.fx | Bin 0 -> 559 bytes 14 files changed, 186 insertions(+), 141 deletions(-) create mode 100644 src/main/resources/assets/magus/fx/steam.fx create mode 100644 src/main/resources/assets/magus/fx/water.fx diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java index e3f2ec33..6fc1a5c8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java @@ -6,7 +6,9 @@ import com.amuzil.omegasource.magus.entity.projectile.FireProjectile; import com.amuzil.omegasource.magus.entity.projectile.WaterProjectile; import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.lowdragmc.photon.client.fx.EntityEffect; import com.lowdragmc.photon.client.fx.FX; import net.minecraft.client.Minecraft; @@ -41,10 +43,11 @@ public abstract class ElementProjectile extends Projectile implements ItemSuppli private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(ElementProjectile.class, EntityDataSerializers.BYTE); private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(ElementProjectile.class, EntityDataSerializers.BYTE); protected boolean leftOwner; - private boolean hasBeenShot; + protected boolean hasBeenShot; private int life; - private int ttk = 100; + public int ttk = 100; public boolean arcActive = false; + public boolean hasElement = false; public Form form; public ElementProjectile(EntityType type, Level level) { @@ -63,6 +66,8 @@ public ElementProjectile(EntityType entityType, Liv this.setOwner(livingEntity); } + public abstract Element getElement(); + public void tick() { if (!this.hasBeenShot) { this.gameEvent(GameEvent.PROJECTILE_SHOOT, this.getOwner()); @@ -192,8 +197,7 @@ protected void onHitEntity(EntityHitResult entityHitResult) { testProjectileEntity.discard(); } } else { - // TODO - Check if player entity has countered - int i = 10; // Deal 10 damage + int i = 10; // Deal 10 damage entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); this.discard(); } @@ -212,13 +216,16 @@ protected void onHit(HitResult hitResult) { } } - public void arc(float scale, float offset) { + public void control(float scale, Form form) { this.arcActive = true; - this.setTimeToKill(24000); + if (form == Forms.NULL) { + this.hasElement = true; + this.setTimeToKill(2400); + } Entity owner = this.getOwner(); assert owner != null; - Vec3[] pose = new Vec3[]{owner.position(), this.getOwner().getLookAngle()}; - pose[1] = pose[1].scale((scale)).add((0), (this.getOwner().getEyeHeight()), (0)); + Vec3[] pose = new Vec3[]{owner.position(), owner.getLookAngle()}; + pose[1] = pose[1].scale((scale)).add((0), (owner.getEyeHeight()), (0)); Vec3 newPos = pose[1].add(pose[0]); this.setPos(newPos.x, newPos.y, newPos.z); } @@ -230,10 +237,10 @@ public ItemStack getItem() { public static ElementProjectile createElementEntity(Form form, Element element, ServerPlayer player, ServerLevel level) { return switch (element.type()) { - case AIR -> new AirProjectile(player, level, form); - case WATER -> new WaterProjectile(player, level, form); - case EARTH -> new EarthProjectile(player, level, form); - case FIRE -> new FireProjectile(player, level, form); + case AIR -> new AirProjectile(player, level); + case WATER -> new WaterProjectile(player, level); + case EARTH -> new EarthProjectile(player, level); + case FIRE -> new FireProjectile(player, level); }; } @@ -241,18 +248,40 @@ public static ElementProjectile createElementEntity(Form form, Element element, public void startEffect(Form form, Player player) { this.form = form; // NOTE: Need this to ensure form is set client-side before onHit event FX fx = null; - if (form.name().equals("strike")) - fx = fire_bloom_perma; - if (form.name().equals("force")) - fx = blue_fire_perma; - if (form.name().equals("arc")) { - fx = null; - arcActive = true; - } - if (form.name().equals("null")) { - fx = fire_bloom_perma; - arcActive = true; - this.setTimeToKill(24000); + if (getElement().equals(Elements.FIRE)) { + if (form.name().equals("strike")) + fx = fire_bloom_perma; + if (form.name().equals("force")) + fx = blue_fire_perma; + if (form.name().equals("arc")) { + fx = null; + arcActive = true; + } + if (form.name().equals("null")) { + fx = fire_bloom_perma; + arcActive = true; + hasElement = true; + this.setTimeToKill(2400); + } + if (form.name().equals("step")) + fx = blue_fire_perma; + } else if (getElement().equals(Elements.WATER)) { + if (form.name().equals("strike")) + fx = water; + if (form.name().equals("force")) + fx = water; + if (form.name().equals("arc")) { + fx = water; + arcActive = true; + } + if (form.name().equals("null")) { + fx = water; + arcActive = true; + hasElement = true; + this.setTimeToKill(2400); + } + if (form.name().equals("step")) + fx = blue_fire_perma; } if (fx != null) { EntityEffect entityEffect = new EntityEffect(fx, level, this); diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java index acad32c4..d7ae290d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; +import com.amuzil.omegasource.magus.skill.elements.Element; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; @@ -50,6 +51,11 @@ public ElementCollision(LivingEntity livingEntity, Level level) { this.setNoGravity(true); } + @Override + public Element getElement() { + return null; + } + public void tick() { super.tick(); boolean flag = this.isNoPhysics(); @@ -201,7 +207,7 @@ public void setTimeToKill(int ticks) { protected void tickDespawn() { ++this.life; if (this.life >= ttk) { -// System.out.println("BYE BYE BBY"); + System.out.println("BYE BYE BBY"); this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java index eb0d9c11..4755f4dc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java @@ -3,11 +3,10 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; import com.amuzil.omegasource.magus.entity.collision.ElementCollision; -import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; @@ -41,18 +40,22 @@ public AirProjectile(EntityType type, Level level) { super(type, level); } - public AirProjectile(double x, double y, double z, Level level, Form form) { + public AirProjectile(double x, double y, double z, Level level) { this(AvatarEntities.AIR_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); -// this.form = form; } - public AirProjectile(LivingEntity livingEntity, Level level, Form form) { - this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); + public AirProjectile(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); this.setOwner(livingEntity); this.setNoGravity(true); } + @Override + public Element getElement() { + return Elements.AIR; + } + public void tick() { super.tick(); boolean flag = this.isNoPhysics(); @@ -241,8 +244,7 @@ protected void onHitEntity(EntityHitResult entityHitResult) { elementProjectile.discard(); } } else { - // TODO - Check if player entity has countered - int i = 10; // Deal 10 damage + int i = 10; // Deal 10 damage entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); this.discard(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java index 569a8417..589a5158 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java @@ -3,11 +3,11 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; import com.amuzil.omegasource.magus.entity.collision.ElementCollision; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.forms.Form; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; @@ -41,18 +41,22 @@ public EarthProjectile(EntityType type, Level level) { super(type, level); } - public EarthProjectile(double x, double y, double z, Level level, Form form) { + public EarthProjectile(double x, double y, double z, Level level) { this(AvatarEntities.EARTH_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); -// this.form = form; } - public EarthProjectile(LivingEntity livingEntity, Level level, Form form) { - this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); + public EarthProjectile(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); this.setOwner(livingEntity); this.setNoGravity(true); } + @Override + public Element getElement() { + return Elements.EARTH; + } + public void tick() { super.tick(); boolean flag = this.isNoPhysics(); @@ -241,8 +245,7 @@ protected void onHitEntity(EntityHitResult entityHitResult) { elementProjectile.discard(); } } else { - // TODO - Check if player entity has countered - int i = 10; // Deal 10 damage + int i = 10; // Deal 10 damage entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); this.discard(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java index 6db33062..001fe784 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java @@ -6,8 +6,8 @@ import com.amuzil.omegasource.magus.level.event.FormActivatedEvent; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.elements.Elements; -import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; @@ -30,14 +30,7 @@ import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; -import javax.annotation.Nullable; -import java.util.Optional; -import java.util.function.Predicate; - -import static com.amuzil.omegasource.magus.Magus.MOD_ID; -import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.fire_bloom_perma; import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; @@ -50,18 +43,22 @@ public FireProjectile(EntityType type, Level level) { MinecraftForge.EVENT_BUS.register(this); } - public FireProjectile(double x, double y, double z, Level level, Form form) { + public FireProjectile(double x, double y, double z, Level level) { this(AvatarEntities.FIRE_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); - this.form = form; } - public FireProjectile(LivingEntity livingEntity, Level level, Form form) { - this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); + public FireProjectile(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); this.setOwner(livingEntity); this.setNoGravity(true); } + @Override + public Element getElement() { + return Elements.FIRE; + } + @Override public void remove(RemovalReason reason) { super.remove(reason); @@ -173,7 +170,6 @@ public void tick() { Vec3[] pose = new Vec3[]{owner.position(), this.getOwner().getLookAngle()}; pose[1] = pose[1].scale((1.5)).add((0), (this.getOwner().getEyeHeight()), (0)); Vec3 newPos = pose[1].add(pose[0]); - // Listen for FormActivatedEvent to determine whether to shoot this or not this.setPos(newPos.x, newPos.y, newPos.z); } } else { @@ -193,13 +189,12 @@ public void tick() { public void onFormEvent(FormActivatedEvent event) { Entity owner = this.getOwner(); if (owner != null && event.getEntity().getId() == owner.getId()) { - if (event.getForm().equals(Forms.STRIKE) && this.arcActive) { + if (event.getForm().equals(Forms.STRIKE) && this.arcActive && this.hasElement) { this.arcActive = false; this.setTimeToKill(100); -// this.discard(); if (!this.level.isClientSide()) { this.shoot(owner.getViewVector(1).x, owner.getViewVector(1).y, owner.getViewVector(1).z, 0.75F, 1); - System.out.println("FormActivatedEvent SERVER-SIDE!"); +// this.discard(); } } } @@ -287,18 +282,13 @@ protected void onHitEntity(EntityHitResult entityHitResult) { } } else if (entity instanceof FireProjectile elementProjectile) { if (this.getOwner() != null && this.level.isClientSide) { -// System.out.println("this form: " + this.form + " | checkLeftOwner: " + this.checkLeftOwner()); -// System.out.println("other form: " + elementProjectile.form + " | arcActive: " + elementProjectile.arcActive); - if (elementProjectile.arcActive && this.checkLeftOwner()) { - this.setOwner(elementProjectile.getOwner()); // Give control to receiver - this.setDeltaMovement(0,0,0); // Full stop - this.arcActive = true; // Enable control of this shot projectile - MagusNetwork.sendToServer(new FormActivatedPacket(Forms.NULL, Elements.FIRE, this.getId())); + if (elementProjectile.arcActive && !elementProjectile.hasElement && this.checkLeftOwner()) { +// this.setOwner(elementProjectile.getOwner()); // Give control to receiver +// this.setDeltaMovement(0,0,0); // Full stop +// this.arcActive = true; // Enable control of this shot projectile this.discard(); - elementProjectile.discard(); -// System.out.println("THIS CLIENT-SIDE: " + this.ttk); -// System.out.println("THAT CLIENT-SIDE: " + elementProjectile.ttk); -// elementProjectile.discard(); + elementProjectile.hasElement = true; + MagusNetwork.sendToServer(new FormActivatedPacket(Forms.NULL, Elements.FIRE, elementProjectile.getId())); } else { if (!this.getOwner().equals(elementProjectile.getOwner())) { ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java index 4e5649c1..12c04df3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java @@ -3,11 +3,10 @@ import com.amuzil.omegasource.magus.entity.AvatarEntities; import com.amuzil.omegasource.magus.entity.ElementProjectile; import com.amuzil.omegasource.magus.entity.collision.ElementCollision; -import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.elements.Element; +import com.amuzil.omegasource.magus.skill.elements.Elements; import com.lowdragmc.photon.client.fx.EntityEffect; import net.minecraft.core.BlockPos; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; @@ -28,31 +27,33 @@ import java.util.Optional; import java.util.function.Predicate; -import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.steam; public class WaterProjectile extends ElementProjectile { private static final EntityDataAccessor ID_FLAGS = SynchedEntityData.defineId(WaterProjectile.class, EntityDataSerializers.BYTE); private static final EntityDataAccessor PIERCE_LEVEL = SynchedEntityData.defineId(WaterProjectile.class, EntityDataSerializers.BYTE); - private int life; - private int ttk = 100; public WaterProjectile(EntityType type, Level level) { super(type, level); } - public WaterProjectile(double x, double y, double z, Level level, Form form) { + public WaterProjectile(double x, double y, double z, Level level) { this(AvatarEntities.WATER_PROJECTILE_ENTITY_TYPE.get(), level); this.setPos(x, y, z); -// this.form = form; } - public WaterProjectile(LivingEntity livingEntity, Level level, Form form) { - this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level, form); + public WaterProjectile(LivingEntity livingEntity, Level level) { + this(livingEntity.getX(), livingEntity.getEyeY(), livingEntity.getZ(), level); this.setOwner(livingEntity); this.setNoGravity(true); } + @Override + public Element getElement() { + return Elements.WATER; + } + public void tick() { super.tick(); boolean flag = this.isNoPhysics(); @@ -125,32 +126,49 @@ public void tick() { hitresult = null; } deltaMovement = this.getDeltaMovement(); - double d5 = deltaMovement.x; - double d6 = deltaMovement.y; - double d1 = deltaMovement.z; + double x = deltaMovement.x; + double y = deltaMovement.y; + double z = deltaMovement.z; - double d7 = this.getX() + d5; - double d2 = this.getY() + d6; - double d3 = this.getZ() + d1; + double finalX = this.getX() + x; + double finalY = this.getY() + y; + double finalZ = this.getZ() + z; double d4 = deltaMovement.horizontalDistance(); if (flag) { - this.setYRot((float)(Mth.atan2(-d5, -d1) * (double)(180F / (float)Math.PI))); + this.setYRot((float)(Mth.atan2(-x, -z) * (double)(180F / (float)Math.PI))); } else { - this.setYRot((float)(Mth.atan2(d5, d1) * (double)(180F / (float)Math.PI))); + this.setYRot((float)(Mth.atan2(x, z) * (double)(180F / (float)Math.PI))); } - this.setXRot((float)(Mth.atan2(d6, d4) * (double)(180F / (float)Math.PI))); + this.setXRot((float)(Mth.atan2(y, d4) * (double)(180F / (float)Math.PI))); this.setXRot(lerpRotation(this.xRotO, this.getXRot())); this.setYRot(lerpRotation(this.yRotO, this.getYRot())); - float f = 0.99F; - this.setDeltaMovement(deltaMovement.scale((double)f)); - if (!this.isNoGravity() && !flag) { + float f = 0.49F; // Scale speed + this.setDeltaMovement(deltaMovement.scale(f)); + if (!this.isNoGravity() && !flag) { // Apply gravity Vec3 vec34 = this.getDeltaMovement(); this.setDeltaMovement(vec34.x, vec34.y - (double)0.05F, vec34.z); } - this.setPos(d7, d2, d3); + Entity owner = this.getOwner(); + if (arcActive) { + if (owner != null) { + Vec3[] pose = new Vec3[]{owner.position(), this.getOwner().getLookAngle()}; + pose[1] = pose[1].scale((1.5)).add((0), (this.getOwner().getEyeHeight()), (0)); + Vec3 newPos = pose[1].add(pose[0]); + this.setPos(newPos.x, newPos.y, newPos.z); + } + } else { + if (owner != null) { + Vec3 vec34 = this.getDeltaMovement(); + double rateOfControl = 0.4; // Control/curve the shot projectile + Vec3 aim = this.getOwner().getLookAngle().multiply(rateOfControl, rateOfControl, rateOfControl); + this.setDeltaMovement(vec34.add(aim)); + } + this.setPos(finalX, finalY, finalZ); + } + this.checkInsideBlocks(); } @@ -197,18 +215,6 @@ public boolean canHitEntity(Entity otherEntity) { } } - public void setTimeToKill(int ticks) { - this.ttk = ticks; - } - - protected void tickDespawn() { - ++this.life; - if (this.life >= ttk) { -// System.out.println("BYE BYE BBY"); - this.discard(); - } - } - @Override protected void defineSynchedData() { this.entityData.define(ID_FLAGS, (byte)0); @@ -226,24 +232,22 @@ public boolean isNoPhysics() { protected void onHitEntity(EntityHitResult entityHitResult) { Entity entity = entityHitResult.getEntity(); if (entity instanceof Blaze) { - if (this.getOwner() != null) { - this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); - } - } else if (entity instanceof ElementProjectile elementProjectile) { + float i = 20; // Deal 20 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), i); + this.discard(); + } else if (entity instanceof FireProjectile fireProjectile) { if (this.getOwner() != null && this.level.isClientSide) { ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); collisionEntity.setTimeToKill(5); level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + EntityEffect entityEffect = new EntityEffect(steam, level, collisionEntity); entityEffect.start(); - System.out.println("SUCCESS COLLISION!!!"); this.discard(); - elementProjectile.discard(); + fireProjectile.discard(); } } else { - // TODO - Check if player entity has countered - int i = 10; // Deal 10 damage - entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); + float i = 10; // Deal 10 damage + entity.hurt(this.damageSources().thrown(this, this.getOwner()), i); this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java b/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java index f985ace5..5d9b53fc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java @@ -11,15 +11,15 @@ @Mod.EventBusSubscriber(modid = Magus.MOD_ID) public class MagusEvents { - @SubscribeEvent - public static void tickEvent(LivingEvent.LivingTickEvent event) { - if (event.getEntity() != null) { - Magi magi = Magi.get(event.getEntity()); - if (magi != null) { - magi.onUpdate(); - } - } - } +// @SubscribeEvent +// public static void tickEvent(LivingEvent.LivingTickEvent event) { +// if (event.getEntity() != null) { +// Magi magi = Magi.get(event.getEntity()); +// if (magi != null) { +// magi.onUpdate(); +// } +// } +// } @SubscribeEvent public static void deathEvent(LivingDeathEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index c39816d1..785c11c5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -16,6 +16,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.MinecraftForge; @@ -27,6 +28,7 @@ import java.util.function.Supplier; import static com.amuzil.omegasource.magus.Magus.MOD_ID; +import static com.amuzil.omegasource.magus.skill.forms.Forms.*; public class FormActivatedPacket implements MagusPacket { @@ -72,7 +74,6 @@ private static void handleClientSide(Form form, int entityId) { */ assert elementProjectile != null; elementProjectile.startEffect(form, player); -// System.out.println("HANDLE CLIENT PACKET ---> " + form); } // Server-side handler @@ -83,14 +84,22 @@ public static void handleServerSide(Form form, Element element, int entityId, Se // TODO - Create/perform certain entity updates based on form and element // - All Skills/techniques should be determined and handled here ElementProjectile entity; - entity = ElementProjectile.createElementEntity(form, element, player, level); + if (entityId != 0) { // Update existing entity + entity = (ElementProjectile) player.level.getEntity(entityId); + } else { // Create new entity + entity = ElementProjectile.createElementEntity(form, element, player, level); + } assert entity != null; - if (form == Forms.ARC || form == Forms.NULL) { - entity.arc(1.5f, 1); - } else { + if (form.equals(ARC) || form.equals(NULL)) { + entity.control(1.5f, form); + } else if (form.equals(STRIKE) || form.equals(FORCE)) { entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); + } else { +// System.out.println("Unhandled form: " + form); + return; } - level.addFreshEntity(entity); + if (entityId == 0) + level.addFreshEntity(entity); FormActivatedPacket packet = new FormActivatedPacket(form, element, entity.getId()); // Predicate predicate = (serverPlayer) -> player.distanceToSqr(serverPlayer) < 2500; // for (ServerPlayer nearbyPlayer: level.getPlayers(predicate.and(LivingEntity::isAlive))) { @@ -101,7 +110,6 @@ public static void handleServerSide(Form form, Element element, int entityId, Se MagusNetwork.CHANNEL.send(PacketDistributor.NEAR.with( () -> new PacketDistributor.TargetPoint(player.getX(), player.getY(), player.getZ(), 500, level.dimension())), packet); - System.out.println("HANDLE SERVER PACKET ---> " + form); } public boolean handle(Supplier ctx) { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 68983f5c..662ab9b7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -41,15 +41,15 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { // initialise the radix tree and set the player as an instance property for sending packets. //todo this is temporary manual tree construction for testing purposes. the true tree will be // generated at runtime based on available skills for the player/entity. - Node secondNode = NodeBuilder.middle() - .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), - ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) - .build(); - //Resets the tree; for testing purposes. - if (magi.getTree() != null) - magi.getTree().burn(); - // TODO: Need a way to convert forms into conditions - // Need to test out the condition tree. use left alt/arc > strike (left click). + if (ModifiersRegistry.FOCUS != null) { + Node secondNode = NodeBuilder.middle() + .addModifiers(ModifiersRegistry.FOCUS.copy(), ModifiersRegistry.MULTI.copy(), + ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) + .build(); + //Resets the tree; for testing purposes. + if (magi.getTree() != null) + magi.getTree().burn(); + } // While this test code will directly use conditions, Skills will reference Forms // that get automatically turned into conditions. // KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0, 0, 4); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index ceb964e0..3265e499 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -86,7 +86,7 @@ private static int activateForm(String name, ServerPlayer player) { } private static int activateElement(CommandContext ctx, Element.Art art) throws CommandSyntaxException { - InputModule.setDiscipline(Elements.fromArt(art)); + InputModule.setDiscipline(Elements.fromArt(art)); // TODO - Fix this bcus it's server side, specify client ServerPlayer player = ctx.getSource().getPlayerOrException(); player.sendSystemMessage(Component.literal("Bending set to " + art)); return 1; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index ec252784..5c2f7449 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -26,7 +26,9 @@ public class AvatarFormRegistry { public static FX fire_bloom_perma = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "fire_bloom_perma")); public static FX blue_fire = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "blue_fire")); public static FX blue_fire_perma = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "blue_fire_perma")); - public static FX orb_bloom =FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "orb_bloom")); + public static FX orb_bloom = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "orb_bloom")); + public static FX water = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "water")); + public static FX steam = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "steam")); public static void registerForms() { KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index 15c870cd..ede510ee 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -18,6 +18,7 @@ import java.util.LinkedList; import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; public class Magi { diff --git a/src/main/resources/assets/magus/fx/steam.fx b/src/main/resources/assets/magus/fx/steam.fx new file mode 100644 index 0000000000000000000000000000000000000000..628b09d88e23956ac86f050973046611ba3768f5 GIT binary patch literal 1891 zcmV-p2b}mHiwFP!00000|Ls{zZyPrd=2~7$TE7w`El{8bqrEpk(^HY!kzY*#J2q@5 z0eUg073C$&eT3vXl1{ng(8nK0P6hfGde5;yk)pljT%bRow_b|6Gu(&Pj+B+1)@~9T zFeojDv%}%c$C*zKA$3w?KG&K_(^42HO#=-Jt?mdiy)qe6+^VC{iY*%KG1vkn$yS;R z56wnx}tQNzFRT9G|;v{_*1{ z5Q2iYndUz0t9dw3jYTeDFf>f$sC#Gv#Lq;0U_!RKttErqI^?n&icq3;YpLcsc+dvh z#&K_`J^P0VIc%aiY+`TVMBm`gC2etL96OVnVjOjDcGP?d;J_*5alOSN?X6R_UwjUJ zR33%&C)1G^>M;1!<!|`zR)@$9T6h>WGSgDJAtH~i zQdftPjDNYZwE>Tnbc>HG8@E>g5t681#N}|JiJsLsa7m@HyqqXoLPw^nuE46@^)GJU z+1}mWTH0-_ZQg1mx{Ffve2!$h-eF2xR)T1l=vR5*f%SSb1xB;n%F_@&T`5Fd7EKV( zw#2-}_=TVZC*R}R%akZ$(pSS*qc2aa!=HXX%$;bPIWj0(A#csIELtW=`ZxdQ`!YLb z{QGaCrtbz)A+=U)wjAJM$J{|m!B>Y&WgoX767m#o%neN8I+2o(RKH<+7hWd-n4{*=po<6?Xx}E;U1lF}58^Mq6loIZ#d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s3`LXs;Dho?oRomMZZw>>MUae_&HW`vqQFVuXu zlH9qr;UpE7q5esR%uLJl<+C3#ekj5nsMIfsKr6MbBa4h)Q0BCO`ltSAh-qus zVY)WF>Z9z<{?0u;AXT4>QZcA?dc94vu9n(VtVhU72Jf!kkCXAJn{+O(-*z^=538ab z2HTBHxOHfw>TCg=qHHQ9m!tK4Q99J1?gW|&;4y(ld9%Lx(byU8ScZ0zVxBp>yLo`Z z@n~#u>GQR%sgQpBZ&TUD>c2{{w#B@fons>iXo%Hy@0Iq)pTGRs+t=T|BVcyG8bsjL x^7kJErhCTy{)fPP4?Ow&Wy{zP^2X3qc*EgFNP;t1q1D=?@E53r*5sQ5003V97}Wp( literal 0 HcmV?d00001 From c936cb16407f8ae421c906ba014af3b6acf1ced4 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 09:42:04 -0500 Subject: [PATCH 408/469] uncomment John's code --- .../magus/level/event/MagusEvents.java | 18 +++++++++--------- .../omegasource/magus/server/ServerEvents.java | 2 +- .../skill/util/capability/entity/Magi.java | 6 ------ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java b/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java index 5d9b53fc..f985ace5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/level/event/MagusEvents.java @@ -11,15 +11,15 @@ @Mod.EventBusSubscriber(modid = Magus.MOD_ID) public class MagusEvents { -// @SubscribeEvent -// public static void tickEvent(LivingEvent.LivingTickEvent event) { -// if (event.getEntity() != null) { -// Magi magi = Magi.get(event.getEntity()); -// if (magi != null) { -// magi.onUpdate(); -// } -// } -// } + @SubscribeEvent + public static void tickEvent(LivingEvent.LivingTickEvent event) { + if (event.getEntity() != null) { + Magi magi = Magi.get(event.getEntity()); + if (magi != null) { + magi.onUpdate(); + } + } + } @SubscribeEvent public static void deathEvent(LivingDeathEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 662ab9b7..901ea36b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -129,7 +129,7 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { System.out.println("All RadixTree Branches:"); Magus.keyboardMouseInputModule.getFormsTree().printAllBranches(); Magus.keyboardMouseInputModule.init(); -// Magus.keyboardMouseInputModule.registerModifiers(); + Magus.keyboardMouseInputModule.registerModifiers(); Magus.mouseMotionModule.init(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index ede510ee..c18c8698 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -11,15 +11,9 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.player.Player; -import net.minecraftforge.common.util.FakePlayer; -import org.checkerframework.checker.units.qual.C; import org.jetbrains.annotations.Nullable; -import java.util.LinkedList; import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; public class Magi { From c063b3940fbce4668db48a3ad7ed8b39aa03d99d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 11:07:49 -0500 Subject: [PATCH 409/469] Update FormDataRegistry.java --- .../omegasource/magus/skill/forms/FormDataRegistry.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 305196aa..c6442abf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -30,7 +30,9 @@ public static Form getFormByName(String formName) { } public static List getInputsForForm(Form formToModify, RadixTree.InputType type) { - return formsData.get(formToModify).getInputs(type); + if (formsData != null) + return formsData.get(formToModify).getInputs(type); + return null; } public static void registerForm(List inputs, Form form, RadixTree.InputType type) { From ae0fe9e55e41aac848e5c3750013c2ff2e559b16 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 11:08:19 -0500 Subject: [PATCH 410/469] fixed dif null error here --- .../java/com/amuzil/omegasource/magus/input/InputModule.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 8455c731..80a4f3a1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -111,7 +111,6 @@ public void registerModifiers() { public void registerModifierListener(ModifierListener listener, CompoundTag treeData) { listener.setupListener(treeData); listener.register(() -> { - LogManager.getLogger().info("QUEUEING MODIFIER DATA"); queueModifierData(listener.getModifierData()); }); @@ -132,7 +131,7 @@ public synchronized void queueModifierData(ModifierData data) { public void resetLastActivated() { LogManager.getLogger().info("RESETTING LAST ACTIVATED FORM"); - this.lastActivatedForm = null; + this.lastActivatedForm.set(Forms.NULL); } public Form getLastActivatedForm() { From bf935469511529bfc6952b55bb0548d3e8f2e714 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 11:08:29 -0500 Subject: [PATCH 411/469] Update FireProjectile.java --- .../omegasource/magus/entity/projectile/FireProjectile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java index 001fe784..926eecbd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java @@ -194,7 +194,7 @@ public void onFormEvent(FormActivatedEvent event) { this.setTimeToKill(100); if (!this.level.isClientSide()) { this.shoot(owner.getViewVector(1).x, owner.getViewVector(1).y, owner.getViewVector(1).z, 0.75F, 1); -// this.discard(); + this.discard(); } } } From b19945db3607ccd250bff45091af5aea91ae7d58 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 03:22:19 +1100 Subject: [PATCH 412/469] key held modifier is weird af --- .../omegasource/magus/input/InputModule.java | 8 +- .../magus/input/KeyboardMouseInputModule.java | 4 +- .../magus/skill/forms/FormDataRegistry.java | 7 +- .../listeners/KeyHeldModifierListener.java | 81 +++++++++++-------- 4 files changed, 59 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java index 8455c731..b0748d91 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/InputModule.java @@ -22,15 +22,16 @@ import net.minecraft.network.chat.Component; import net.minecraftforge.client.event.InputEvent; import org.apache.logging.log4j.LogManager; +import org.jetbrains.annotations.Nullable; import java.util.*; import java.util.concurrent.atomic.AtomicReference; public abstract class InputModule { - public static Element activeElement = Elements.FIRE; protected static final List activeFormInputs = new ArrayList<>(); protected static final Map movementKeys = new HashMap<>(); + public static Element activeElement = Elements.FIRE; protected static RadixTree formsTree = new RadixTree(); protected static LinkedList activeForms = new LinkedList<>(); protected final List activeConditions = Collections.synchronizedList(new LinkedList<>()); @@ -135,8 +136,11 @@ public void resetLastActivated() { this.lastActivatedForm = null; } + @Nullable public Form getLastActivatedForm() { - return this.lastActivatedForm.get(); + if (lastActivatedForm != null) + return this.lastActivatedForm.get(); + return null; } // Should be overridden.. diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 758d953c..6680360b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -183,7 +183,9 @@ public static void setActiveDiscipline(Element element) { @Override public Form getActiveForm() { - return this.activeForm.get(); + if (activeForm != null) + return this.activeForm.get(); + return null; } private void checkForForm() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index c6442abf..3379075c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -16,8 +16,8 @@ public class FormDataRegistry { - private static Map formsData; public static HashMap formsNamespace; + private static Map formsData; //Remember to see #InputConstants for the key names. public static void init() { @@ -31,7 +31,8 @@ public static Form getFormByName(String formName) { public static List getInputsForForm(Form formToModify, RadixTree.InputType type) { if (formsData != null) - return formsData.get(formToModify).getInputs(type); + if (formsData.get(formToModify.name()) != null) + return formsData.get(formToModify.name()).getInputs(type); return null; } @@ -41,7 +42,7 @@ public static void registerForm(List inputs, Form form, RadixTree.Inp data.addTypeInputs(type, inputs); data.fillConditions(type); // This replaces the value, and since our InputModuleData automatically adds conditions and input data to itself when necessary... - formsData.put(form, data); + formsData.put(form.name(), data); formsNamespace.put(data.getConditions(type).hashCode(), form); // Need to pass this diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 8d58dd8f..6e8af393 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -54,6 +54,10 @@ public void unregister() { public List getKeyCodes(Form form, RadixTree.InputType type) { List formInputs = FormDataRegistry.getInputsForForm(form, type); + // Return an empty list + if (formInputs == null || formInputs.isEmpty()) + return new LinkedList<>(); + InputData lastInput = formInputs.get(formInputs.size() - 1); List keyCodes = new ArrayList<>(); if (lastInput instanceof ChainedKeyInput) { @@ -82,51 +86,56 @@ public void setupListener(CompoundTag compoundTag) { InputModule module = Magus.keyboardMouseInputModule; this.clientTickListener = event -> { - if (event.phase == TickEvent.ClientTickEvent.Phase.START) { - boolean pressed = true; - // If all requisite keys aren't pressed, don't iterate modifier data - for (int key : activeKeyCodes) { - if (!module.keyPressed(key)) { - pressed = false; - break; - } - } - if (pressed) { - this.isHeld = true; - this.currentHolding++; - } else { - if (this.isHeld) { - this.wasHeld = true; - this.isHeld = false; - } - } - } +// if (event.phase == TickEvent.ClientTickEvent.Phase.START) { +// boolean pressed = true; +// // If all requisite keys aren't pressed, don't iterate modifier data +// for (int key : activeKeyCodes) { +// if (!module.keyPressed(key)) { +// pressed = false; +// break; +// } +// } +// if (pressed) { +// this.isHeld = true; +// this.currentHolding++; +// } else { +// if (this.isHeld) { +// this.wasHeld = true; +// this.isHeld = false; +// } +// } +// } }; } + public boolean formsNotNull(InputModule module) { + return module.getLastActivatedForm() != null && module.getActiveForm() != null; + } @Override public boolean shouldCollectModifierData(TickEvent event) { - InputModule module = getTypedModule(type); - if (module.getActiveForm() != null && !module.getActiveForm().name().equals(module.getLastActivatedForm().name())) { - activeKeyCodes = getKeyCodes(module.getActiveForm(), type); - } - - if (activeKeyCodes.isEmpty()) return false; - - if (isHeld && currentHolding > 0) { - return true; - } - //so that we send a packet to say we've stopped holding(for continuous cast ability support) - if (!this.isHeld && this.wasHeld) { - this.wasHeld = false; - Magus.keyboardMouseInputModule.resetLastActivated(); - return true; - } +// InputModule module = getTypedModule(type); +// if (formsNotNull(module) && !module.getActiveForm().name().equals(module.getLastActivatedForm().name())) { +// activeKeyCodes = getKeyCodes(module.getActiveForm(), type); +// } +// +// if (activeKeyCodes.isEmpty()) return false; +// +// if (isHeld && currentHolding > 0) { +// return true; +// } +// //so that we send a packet to say we've stopped holding(for continuous cast ability support) +// if (!this.isHeld && this.wasHeld) { +// this.wasHeld = false; +// Magus.keyboardMouseInputModule.resetLastActivated(); +// return true; +// } return false; } @Override public ModifierData collectModifierDataFromEvent(TickEvent event) { +// if (currentHolding > 0) +// System.out.println("Currently Held: " + currentHolding); HeldModifierData data = new HeldModifierData(currentHolding, isHeld); this.currentHolding = 0; return data; @@ -136,4 +145,6 @@ public ModifierData collectModifierDataFromEvent(TickEvent event) { public KeyHeldModifierListener copy() { return new KeyHeldModifierListener(); } + + } From 276df07f981f18dc3b5f2a1fbb945a7af54625ad Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 13:17:43 -0500 Subject: [PATCH 413/469] fixed KeyHeldModifierListener --- .../magus/input/KeyboardMouseInputModule.java | 6 +-- .../magus/input/MouseMotionModule.java | 2 +- .../magus/skill/forms/FormDataRegistry.java | 6 ++- .../skill/modifiers/api/ModifierListener.java | 1 - .../data/MouseGestureModifierData.java | 3 +- .../data/MouseScrollModifierData.java | 3 +- .../listeners/KeyHeldModifierListener.java | 40 +++++++++++-------- 7 files changed, 35 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 758d953c..990d78cd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -215,9 +215,9 @@ private void checkForForm() { } private void sendModifierData() { - LogManager.getLogger().info("SENDING MODIFIER DATA"); - System.out.println("Modifier Listener Size: " + modifierListeners.size()); - System.out.println("Modifier Data Size: " + modifierQueue.size()); +// LogManager.getLogger().info("SENDING MODIFIER DATA"); +// System.out.println("Modifier Listener Size: " + modifierListeners.size()); +// System.out.println("Modifier Data Size: " + modifierQueue.size()); for (ModifierData modData : modifierQueue.values()) modData.print(); diff --git a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java index 15d3a73b..b8f61bcc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/MouseMotionModule.java @@ -91,7 +91,7 @@ public MouseMotionModule() { } private void sendModifierData() { - LogManager.getLogger().info("SENDING MODIFIER DATA"); +// LogManager.getLogger().info("SENDING MODIFIER DATA"); synchronized (modifierQueue) { MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); ticksSinceModifiersSent = 0; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index c6442abf..6accbde9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -30,8 +30,10 @@ public static Form getFormByName(String formName) { } public static List getInputsForForm(Form formToModify, RadixTree.InputType type) { - if (formsData != null) - return formsData.get(formToModify).getInputs(type); + InputModuleData inputModuleData = formsData.get(formToModify); + System.out.println("getInputsForForm: " + formToModify); + if (inputModuleData != null) + return inputModuleData.getInputs(type); return null; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java index 7cda3b57..aa9cddfb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/ModifierListener.java @@ -33,7 +33,6 @@ public void unregister() { public void accept(T event) { if(shouldCollectModifierData(event)) { this.modifierData = collectModifierDataFromEvent(event); - onSuccess.run(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseGestureModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseGestureModifierData.java index 2ea5f7c4..d15e3e35 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseGestureModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseGestureModifierData.java @@ -77,6 +77,7 @@ public void reset() { @Override public void print() { - LogManager.getLogger().info("GestureModifier mouseGestures: " + mouseGestures); + if (!mouseGestures.isEmpty()) + LogManager.getLogger().info("GestureModifier mouseGestures: " + mouseGestures); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java index aeac9e06..b471e6d4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java @@ -27,7 +27,8 @@ protected void mergeFields(ModifierData modifierData) { @Override public void print() { - LogManager.getLogger().info("Total Mouse Scroll Delta: " + totalScrollDelta); + if (totalScrollDelta != 0) + LogManager.getLogger().info("Total Mouse Scroll Delta: " + totalScrollDelta); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 8d58dd8f..ab56b53c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -7,6 +7,8 @@ import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; @@ -21,7 +23,7 @@ import java.util.List; import java.util.function.Consumer; -public class KeyHeldModifierListener extends ModifierListener { +public class KeyHeldModifierListener extends ModifierListener { private final RadixTree.InputType type; private Consumer clientTickListener; private int currentHolding; @@ -53,21 +55,25 @@ public void unregister() { public List getKeyCodes(Form form, RadixTree.InputType type) { List formInputs = FormDataRegistry.getInputsForForm(form, type); - - InputData lastInput = formInputs.get(formInputs.size() - 1); List keyCodes = new ArrayList<>(); - if (lastInput instanceof ChainedKeyInput) { - for (KeyInput key : ((ChainedKeyInput) lastInput).last().keys()) - keyCodes.add(key.key().getValue()); - } - /// I need to fix multi :( - else if (lastInput instanceof MultiKeyInput) { - for (KeyInput key : ((MultiKeyInput) lastInput).keys()) - keyCodes.add(key.key().getValue()); - } else { - // If it's registered to the keyboard mouse input module, it's going to be some variant - // of KeyInput. - keyCodes.add(((KeyInput) lastInput).key().getValue()); + + if (formInputs != null) { + InputData lastInput = formInputs.get(formInputs.size() - 1); + if (lastInput instanceof ChainedKeyInput) { + for (KeyInput key : ((ChainedKeyInput) lastInput).last().keys()) + keyCodes.add(key.key().getValue()); + } + /// I need to fix multi :( + else if (lastInput instanceof MultiKeyInput) { + for (KeyInput key : ((MultiKeyInput) lastInput).keys()) + keyCodes.add(key.key().getValue()); + } else if (lastInput instanceof MouseWheelInput || lastInput instanceof MouseMotionInput) { + // + } else { + // If it's registered to the keyboard mouse input module, it's going to be some variant + // of KeyInput. + keyCodes.add(((KeyInput) lastInput).key().getValue()); + } } return keyCodes; } @@ -105,7 +111,7 @@ public void setupListener(CompoundTag compoundTag) { } @Override - public boolean shouldCollectModifierData(TickEvent event) { + public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { InputModule module = getTypedModule(type); if (module.getActiveForm() != null && !module.getActiveForm().name().equals(module.getLastActivatedForm().name())) { activeKeyCodes = getKeyCodes(module.getActiveForm(), type); @@ -126,7 +132,7 @@ public boolean shouldCollectModifierData(TickEvent event) { } @Override - public ModifierData collectModifierDataFromEvent(TickEvent event) { + public ModifierData collectModifierDataFromEvent(TickEvent.ClientTickEvent event) { HeldModifierData data = new HeldModifierData(currentHolding, isHeld); this.currentHolding = 0; return data; From de58bd4401f3e68470bce86e84edde70b8a0b903 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 13:32:06 -0500 Subject: [PATCH 414/469] Update BaseModifierData.java --- .../omegasource/magus/skill/modifiers/api/BaseModifierData.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/BaseModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/BaseModifierData.java index 114e45b2..a480d088 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/BaseModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/BaseModifierData.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.magus.skill.modifiers.api; -import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import net.minecraft.nbt.CompoundTag; public abstract class BaseModifierData extends ModifierData { From 18ff0a0f638ce645301a2bef917afd2a36d06734 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 14:08:31 -0500 Subject: [PATCH 415/469] cleanup --- .../omegasource/magus/skill/forms/FormDataRegistry.java | 2 +- .../skill/modifiers/data/DirectionModifierData.java | 2 +- .../modifiers/listeners/DirectionModifierListener.java | 2 +- .../modifiers/listeners/KeyHeldModifierListener.java | 9 +++------ 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java index 6accbde9..658b9fc4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/forms/FormDataRegistry.java @@ -31,7 +31,7 @@ public static Form getFormByName(String formName) { public static List getInputsForForm(Form formToModify, RadixTree.InputType type) { InputModuleData inputModuleData = formsData.get(formToModify); - System.out.println("getInputsForForm: " + formToModify); + // Should not collect modifier data for Forms.NULL if (inputModuleData != null) return inputModuleData.getInputs(type); return null; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java index 694a5861..8bb992f5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java @@ -68,7 +68,7 @@ public void reset() { @Override public void print() { - LogManager.getLogger().info("MultiModifierData directions: \n" + this.directions.size()); + LogManager.getLogger().info("MultiModifierData directions: " + this.directions.size()); // LogManager.getLogger().info("MultiModifierData directions: \n" + this.directions.stream().map(direction -> direction.name()).collect(Collectors.joining(",\n"))); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java index e2ddbecc..991cc559 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java @@ -27,7 +27,7 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(LivingEvent.LivingTickEvent event) { if(!(event.getEntity() instanceof Player)) return false; - //TODO: Need to check for direction key presses instead of motion + // TODO: Need to check for direction key presses instead of motion if((event.getEntity().getDeltaMovement().length() > motionThreshold)) { LogManager.getLogger().info("MOVE MOTION: " + event.getEntity().getDeltaMovement().length()); LogManager.getLogger().info("MOVE DIRECTION: " + event.getEntity().getMotionDirection()); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index ab56b53c..a0ce28e8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -62,16 +62,13 @@ public List getKeyCodes(Form form, RadixTree.InputType type) { if (lastInput instanceof ChainedKeyInput) { for (KeyInput key : ((ChainedKeyInput) lastInput).last().keys()) keyCodes.add(key.key().getValue()); - } - /// I need to fix multi :( - else if (lastInput instanceof MultiKeyInput) { + } else if (lastInput instanceof MultiKeyInput) { for (KeyInput key : ((MultiKeyInput) lastInput).keys()) keyCodes.add(key.key().getValue()); } else if (lastInput instanceof MouseWheelInput || lastInput instanceof MouseMotionInput) { - // + // Ignore these since they're not keys! } else { - // If it's registered to the keyboard mouse input module, it's going to be some variant - // of KeyInput. + // If it's registered to the keyboard mouse input module, it's going to be some variant of KeyInput. keyCodes.add(((KeyInput) lastInput).key().getValue()); } } From 3dffb5c093d2c694dc10619ac75e3a0d9e8ffbc3 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 14:09:14 -0500 Subject: [PATCH 416/469] fixed steam collision --- .../entity/collision/ElementCollision.java | 1 - .../client_executed/FormActivatedPacket.java | 4 ++-- .../skill/test/avatar/AvatarCommand.java | 10 ++++++++-- src/main/resources/assets/magus/fx/steam.fx | Bin 1891 -> 1889 bytes 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java index d7ae290d..86690883 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java @@ -207,7 +207,6 @@ public void setTimeToKill(int ticks) { protected void tickDespawn() { ++this.life; if (this.life >= ttk) { - System.out.println("BYE BYE BBY"); this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 785c11c5..28cbebf5 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -95,8 +95,8 @@ public static void handleServerSide(Form form, Element element, int entityId, Se } else if (form.equals(STRIKE) || form.equals(FORCE)) { entity.shoot(player.getViewVector(1).x, player.getViewVector(1).y, player.getViewVector(1).z, 1, 1); } else { -// System.out.println("Unhandled form: " + form); - return; + entity.discard(); + return; // Unhandled Form - Discard and print no effects } if (entityId == 0) level.addFreshEntity(entity); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index 3265e499..bffeb72c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -3,7 +3,9 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.AvatarCommandPacket; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.elements.Elements; @@ -18,6 +20,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; +import net.minecraftforge.network.PacketDistributor; import java.util.Arrays; @@ -81,13 +84,16 @@ private static int reset() { private static int activateForm(String name, ServerPlayer player) { Form form = Registries.FORMS.get().getValue(new ResourceLocation(MOD_ID, name)); - FormActivatedPacket.handleServerSide(form, InputModule.activeElement, 0, player); + MagusNetwork.sendToServer(new FormActivatedPacket(form, InputModule.activeElement, 0)); +// FormActivatedPacket.handleServerSide(form, InputModule.activeElement, 0, player); return 1; } private static int activateElement(CommandContext ctx, Element.Art art) throws CommandSyntaxException { - InputModule.setDiscipline(Elements.fromArt(art)); // TODO - Fix this bcus it's server side, specify client +// InputModule.setDiscipline(Elements.fromArt(art)) ServerPlayer player = ctx.getSource().getPlayerOrException(); + AvatarCommandPacket packet = new AvatarCommandPacket(art.name()); + MagusNetwork.CHANNEL.send(PacketDistributor.PLAYER.with(() -> player), packet); player.sendSystemMessage(Component.literal("Bending set to " + art)); return 1; } diff --git a/src/main/resources/assets/magus/fx/steam.fx b/src/main/resources/assets/magus/fx/steam.fx index 628b09d88e23956ac86f050973046611ba3768f5..3891ae57efac1cad721156ddce3c5716577ed7cb 100644 GIT binary patch delta 497 zcmVaa6KDJZg`gK^m~gtE=- zSp%nOW{=*bIoV;4V8;kDy)v02RopN-Bgu&}I-^3Spk667LDgU1w7wHpow(2J1N1Tz zv^09K*V=`kP)V<4kzoX%t^9DG{h!G_l9PLrJCX)U#BRbyTrhupuP?**aNyEm4Bw6K zpF0JHue@WvVE8T=zB6R_ND0G-?k;Eej^YCr=!cIUJ;DP0@bK?G5!%X5kN;2D7eTzy1Pd z%^K}Zd)c`i3!#<-MV*4PV}h2wlyZ>4FmWQ4LW_`7dbjAg-=T9g2r zgBzbq6X=CftQ^ydg;){O1{Gqbrc0}ub#yEl`5^7$)9>n9MgU$j#NbC!u$RAdb|(?a nT6r5=TG*&;?Rc;h5VdvV!{^Rx*Wte^w@Us2TT$0UQ7HfbLi+m) delta 499 zcmVDoZ0KNIHVmO` zGkey+X`0!icWF*`*dy36f=sVW=13JcjLt}MqKwX{kSVBF3QbV;*Eg;2#8oHmGy4F& z%mgis9_+PtAt+SRYguF%!DlN!+-Lu1a*yQX-sFy?ffBKsun~V34BzX^@I4&3bQr^T zfSeZdF*>wF-2-S|Kg9~XS! z`SXEiRsbHO@@9VnQ^Ttv#Z|sz0p7k;^?*y2Ie~4N5!=}Nk>({Tp zfLXIf`&=Ms(&VT%-DtMHTl5YQr|4_fJG16nr+fYvG4#y{RDwlQr9PsTQ;tW7r^ zdzq5Am2Di}#4mkP@?+CmNOGZ9OyZH3Gx|R`u*9 Date: Tue, 5 Nov 2024 14:14:08 -0500 Subject: [PATCH 417/469] Update DataTrait.java --- .../amuzil/omegasource/magus/skill/util/traits/DataTrait.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java index b0c5cf25..7128ba33 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java @@ -7,7 +7,7 @@ public interface DataTrait extends INBTSerializable { String getName(); - /* Remember to call these in *ever* setter you have for each trait! */ + /* Remember to call these in *every* setter you have for each trait! */ /* Methods for whether to save the data. */ void markDirty(); From 5ca1ce3418467f6587b3f5c816d8076fdf17cddd Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 14:15:29 -0500 Subject: [PATCH 418/469] Update DataTrait.java --- .../amuzil/omegasource/magus/skill/util/traits/DataTrait.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java index 7128ba33..e43f6205 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/DataTrait.java @@ -16,5 +16,4 @@ public interface DataTrait extends INBTSerializable { boolean isDirty(); - } From bde95a16aa44a3907a2510b00a9df404a1dbcf90 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 14:39:19 -0500 Subject: [PATCH 419/469] account for mp/singleplayer connection null error --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 990d78cd..5f8a6be1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -218,11 +218,13 @@ private void sendModifierData() { // LogManager.getLogger().info("SENDING MODIFIER DATA"); // System.out.println("Modifier Listener Size: " + modifierListeners.size()); // System.out.println("Modifier Data Size: " + modifierQueue.size()); - for (ModifierData modData : modifierQueue.values()) - modData.print(); +// for (ModifierData modData : modifierQueue.values()) +// modData.print(); synchronized (modifierQueue) { - MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); + if (Minecraft.getInstance().getConnection() != null) { + MagusNetwork.sendToServer(new SendModifierDataPacket(modifierQueue.values().stream().toList())); + } ticksSinceModifiersSent = 0; modifierQueue.clear(); } From 1239a1d960c84f1252f55ed3c7311ef5dbd9f108 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 15:12:29 -0500 Subject: [PATCH 420/469] Update BendingMaterialUtil.java --- .../magus/skill/util/bending/BendingMaterialUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java index 94016479..822e3e50 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/bending/BendingMaterialUtil.java @@ -15,6 +15,7 @@ public class BendingMaterialUtil { public static final TagKey WATERBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "waterbending_material")); public static final TagKey EARTHBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "earthbending_material")); public static final TagKey FIREBENDING_MATERIAL = BlockTags.create(new ResourceLocation(Magus.MOD_ID, "firebending_material")); + public static List> getBendableMaterialsForElement(Element element) { List> toReturn = new ArrayList<>(); From e0144d858e3251c0e62646838d6a5b665a05309c Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 16:46:36 -0500 Subject: [PATCH 421/469] attempt to fix avatar art/form commands for multiplayer --- .../entity/projectile/FireProjectile.java | 25 ++++-- .../magus/network/MagusNetwork.java | 7 ++ .../ElementActivatedPacket.java | 81 +++++++++++++++++++ .../skill/test/avatar/AvatarCommand.java | 26 +++--- 4 files changed, 124 insertions(+), 15 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ElementActivatedPacket.java diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java index 926eecbd..b63d0e35 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java @@ -32,6 +32,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.orb_bloom; +import static com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry.steam; public class FireProjectile extends ElementProjectile { @@ -280,27 +281,39 @@ protected void onHitEntity(EntityHitResult entityHitResult) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y, entity.getViewVector(1).z, 0.75F, 1); this.leftOwner = true; } - } else if (entity instanceof FireProjectile elementProjectile) { + } else if (entity instanceof FireProjectile fireProjectile) { if (this.getOwner() != null && this.level.isClientSide) { - if (elementProjectile.arcActive && !elementProjectile.hasElement && this.checkLeftOwner()) { + if (fireProjectile.arcActive && !fireProjectile.hasElement && this.checkLeftOwner()) { // this.setOwner(elementProjectile.getOwner()); // Give control to receiver // this.setDeltaMovement(0,0,0); // Full stop // this.arcActive = true; // Enable control of this shot projectile this.discard(); - elementProjectile.hasElement = true; - MagusNetwork.sendToServer(new FormActivatedPacket(Forms.NULL, Elements.FIRE, elementProjectile.getId())); + fireProjectile.hasElement = true; + MagusNetwork.sendToServer(new FormActivatedPacket(Forms.NULL, Elements.FIRE, fireProjectile.getId())); } else { - if (!this.getOwner().equals(elementProjectile.getOwner())) { + if (!this.getOwner().equals(fireProjectile.getOwner())) { ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); collisionEntity.setTimeToKill(5); level.addFreshEntity(collisionEntity); EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); entityEffect.start(); this.discard(); - elementProjectile.discard(); + fireProjectile.discard(); } } } + } else if (entity instanceof WaterProjectile waterProjectile) { + if (this.getOwner() != null && this.level.isClientSide) { + if (!this.getOwner().equals(waterProjectile.getOwner())) { + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); + collisionEntity.setTimeToKill(5); + level.addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(steam, level, collisionEntity); + entityEffect.start(); + this.discard(); + waterProjectile.discard(); + } + } } else if (entity instanceof Fireball fireBall) { if (!this.getOwner().equals(fireBall.getOwner())) { fireBall.discard(); diff --git a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java index 9fa5d375..c346e41b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/MagusNetwork.java @@ -6,6 +6,7 @@ import com.amuzil.omegasource.magus.network.packets.client_executed.RegisterModifierListenersPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.SkillTriggeredPacket; import com.amuzil.omegasource.magus.network.packets.client_executed.UnregisterModifierListenersPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.ElementActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.ConditionActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.StartBendingPacket; @@ -31,6 +32,12 @@ private static int nextID() { } public static void registerMessages() { + CHANNEL.messageBuilder(ElementActivatedPacket.class, nextID()) + .encoder(ElementActivatedPacket::toBytes) + .decoder(ElementActivatedPacket::fromBytes) + .consumerMainThread(ElementActivatedPacket::handle) + .add(); + CHANNEL.messageBuilder(FormActivatedPacket.class, nextID()) .encoder(FormActivatedPacket::toBytes) .decoder(FormActivatedPacket::fromBytes) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ElementActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ElementActivatedPacket.java new file mode 100644 index 00000000..70e2de5d --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ElementActivatedPacket.java @@ -0,0 +1,81 @@ +package com.amuzil.omegasource.magus.network.packets.server_executed; + +import com.amuzil.omegasource.magus.input.InputModule; +import com.amuzil.omegasource.magus.network.MagusNetwork; +import com.amuzil.omegasource.magus.network.packets.api.MagusPacket; +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.elements.Element; +import net.minecraft.client.Minecraft; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.DistExecutor; +import net.minecraftforge.network.NetworkEvent; +import net.minecraftforge.network.PacketDistributor; + +import java.util.function.Supplier; + +import static com.amuzil.omegasource.magus.Magus.MOD_ID; + + +public class ElementActivatedPacket implements MagusPacket { + + private final Element element; + private final int entityId; // Entity ID to send back to client for FX + + public ElementActivatedPacket(Element element, int entityId) { + this.element = element; + this.entityId = entityId; + } + + public void toBytes(FriendlyByteBuf buf) { + buf.writeUtf(element.name()); + buf.writeInt(entityId); + } + + public static ElementActivatedPacket fromBytes(FriendlyByteBuf buf) { + String elementName = buf.readUtf(); + int entityId = buf.readInt(); + Element element = (Element) Registries.SKILL_CATEGORIES.get().getValue(new ResourceLocation(MOD_ID, elementName)); + return new ElementActivatedPacket(element, entityId); + } + + // Client-side handler + @OnlyIn(Dist.CLIENT) + private static void handleClientSide(Element element) { + // Update player's active element client-side + Player player = Minecraft.getInstance().player; + assert player != null; + InputModule.setDiscipline(element); + } + + // Server-side handler + public static void handleServerSide(Element element, int entityId, ServerPlayer serverPlayer) { + // Update player's active element server-side + ServerLevel level = serverPlayer.getLevel(); + ElementActivatedPacket packet = new ElementActivatedPacket(element, entityId); + Entity entity = level.getEntity(entityId); // Retrieve the entity from the world by its ID + if (entity instanceof ServerPlayer player) { // Check if the entity is a ServerPlayer + // Send packet to client + MagusNetwork.CHANNEL.send(PacketDistributor.PLAYER.with(() -> player), packet); + } + } + + public boolean handle(Supplier ctx) { + ctx.get().enqueueWork(() -> { + if (ctx.get().getDirection().getReceptionSide().isClient()) { + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> handleClientSide(element)); + } else { + ServerPlayer player = ctx.get().getSender(); + assert player != null; + handleServerSide(element, entityId, player); + } + }); + return true; + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index bffeb72c..ddb462ba 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -5,7 +5,7 @@ import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; -import com.amuzil.omegasource.magus.network.packets.server_executed.AvatarCommandPacket; +import com.amuzil.omegasource.magus.network.packets.server_executed.ElementActivatedPacket; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.elements.Elements; @@ -21,6 +21,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraftforge.network.PacketDistributor; +import org.apache.logging.log4j.core.jmx.Server; import java.util.Arrays; @@ -34,7 +35,7 @@ public static void register(CommandDispatcher dispatcher) { builder.then(Commands.literal("tree") .then(Commands.literal("reset") .executes(c -> reset())) - .executes(c -> tree())) + .executes(c -> tree())) .executes(c -> { // Default message when no options are provided. InputModule.sendDebugMsg("Options: activate, form, tree"); @@ -49,7 +50,13 @@ public static void register(CommandDispatcher dispatcher) { private static void createActivateArtCommand() { Arrays.stream(Element.Art.values()).toList().forEach(elem -> builder.then(Commands.literal("activate") - .then(Commands.literal(elem.name().toLowerCase()).executes(c -> activateElement(c, elem)))) + .then(Commands.literal(elem.name().toLowerCase()) + .executes(c -> activateElement(c, elem, null)) + ) + .then(Commands.argument("target", EntityArgument.player()) + .executes(c -> activateElement(c, elem, EntityArgument.getPlayer(c, "target"))) + ) + ) ); } @@ -84,16 +91,17 @@ private static int reset() { private static int activateForm(String name, ServerPlayer player) { Form form = Registries.FORMS.get().getValue(new ResourceLocation(MOD_ID, name)); - MagusNetwork.sendToServer(new FormActivatedPacket(form, InputModule.activeElement, 0)); -// FormActivatedPacket.handleServerSide(form, InputModule.activeElement, 0, player); + FormActivatedPacket.handleServerSide(form, InputModule.activeElement, 0, player); return 1; } - private static int activateElement(CommandContext ctx, Element.Art art) throws CommandSyntaxException { + private static int activateElement(CommandContext ctx, Element.Art art, ServerPlayer player) throws CommandSyntaxException { // InputModule.setDiscipline(Elements.fromArt(art)) - ServerPlayer player = ctx.getSource().getPlayerOrException(); - AvatarCommandPacket packet = new AvatarCommandPacket(art.name()); - MagusNetwork.CHANNEL.send(PacketDistributor.PLAYER.with(() -> player), packet); + if (player == null) + player = ctx.getSource().getPlayerOrException(); + ElementActivatedPacket packet = new ElementActivatedPacket(Elements.fromArt(art), player.getId()); + ServerPlayer finalPlayer = player; + MagusNetwork.CHANNEL.send(PacketDistributor.PLAYER.with(() -> finalPlayer), packet); player.sendSystemMessage(Component.literal("Bending set to " + art)); return 1; } From 203cd40fbe962373858b6901a3872246cae1fe6d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 12:16:23 +1100 Subject: [PATCH 422/469] key held modifier working better --- .../listeners/KeyHeldModifierListener.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index a0ce28e8..9414ce23 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -17,6 +17,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; +import org.apache.logging.log4j.LogManager; import java.util.ArrayList; import java.util.LinkedList; @@ -94,7 +95,11 @@ public void setupListener(CompoundTag compoundTag) { break; } } + if (activeKeyCodes.isEmpty()) + pressed = false; + if (pressed) { + LogManager.getLogger().debug("KEY HELD FOR: " + currentHolding); this.isHeld = true; this.currentHolding++; } else { @@ -110,19 +115,23 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { InputModule module = getTypedModule(type); - if (module.getActiveForm() != null && !module.getActiveForm().name().equals(module.getLastActivatedForm().name())) { + if (module.getActiveForm() != null && (module.getLastActivatedForm() == null || + !module.getActiveForm().name().equals(module.getLastActivatedForm().name()))) { activeKeyCodes = getKeyCodes(module.getActiveForm(), type); } if (activeKeyCodes.isEmpty()) return false; - if (isHeld && currentHolding > 0) { + if (isHeld && currentHolding > 0 && currentHolding % 3 == 0) { return true; } //so that we send a packet to say we've stopped holding(for continuous cast ability support) if (!this.isHeld && this.wasHeld) { this.wasHeld = false; - Magus.keyboardMouseInputModule.resetLastActivated(); + this.currentHolding = 0; + // Forcibly collects data jic +// Magus.keyboardMouseInputModule.queueModifierData(collectModifierDataFromEvent(event)); +// Magus.keyboardMouseInputModule.resetLastActivated(); return true; } return false; @@ -130,8 +139,8 @@ public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { @Override public ModifierData collectModifierDataFromEvent(TickEvent.ClientTickEvent event) { + LogManager.getLogger().debug("Collected Held Data at: " + currentHolding); HeldModifierData data = new HeldModifierData(currentHolding, isHeld); - this.currentHolding = 0; return data; } From bcee02c787e23a3b13616be517941f3b417ccf92 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 15:01:44 +1100 Subject: [PATCH 423/469] debugging... --- .../magus/input/KeyboardMouseInputModule.java | 44 ++++++++++++++++--- .../modifiers/data/HeldModifierData.java | 4 ++ .../listeners/KeyHeldModifierListener.java | 13 +++--- 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 7f4a1a18..6eb2ace1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -11,6 +11,7 @@ import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; @@ -35,7 +36,7 @@ public class KeyboardMouseInputModule extends InputModule { private final Consumer mouseScrollListener; private final int tickActivationThreshold = 5; private final int tickTimeoutThreshold = 15; - private final int modifierTickThreshold = 5; + private final int modifierTickThreshold = 3; private final AtomicInteger ticksSinceActivated; private final AtomicReference activeForm; private final AtomicInteger timeout; @@ -46,6 +47,11 @@ public class KeyboardMouseInputModule extends InputModule { private boolean listen; // Used for modifier data private boolean checkForm = false; + private boolean formChanged = false; + + public boolean formChanged() { + return this.formChanged; + } // module activating a form rather than relying on the raw input data for those forms. // This way, the trees for different complex methods (such as VR and multikey) @@ -131,7 +137,7 @@ public KeyboardMouseInputModule() { } // Check every couple of ticks - if (timeout.get() % 5 == 0) checkForForm(); + if (timeout.get() % 3 == 0) checkForForm(); if (activeForm.get() != null && !activeForm.get().name().equals("null")) { @@ -158,10 +164,29 @@ public KeyboardMouseInputModule() { // sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); } } - activeForm.set(Forms.NULL); - ticksSinceActivated.set(0); - timeout.set(0); - resetTreeConditions(); + + // Need an if statement to check whether key held modifier is increasing + if (modifierQueue.get("HeldModifier") != null) { + LogManager.getLogger().debug("Found Held Modifier Data."); + HeldModifierData data = (HeldModifierData) modifierQueue.get("HeldModifier"); + if (!data.held()) { + activeForm.set(Forms.NULL); + ticksSinceActivated.set(0); + timeout.set(0); + resetTreeConditions(); + } + else { + LogManager.getLogger().debug("Modifier Held Down."); + // Don't reset the currently active form + ticksSinceActivated.set(0); + timeout.set(0); + } + } else { + activeForm.set(Forms.NULL); + ticksSinceActivated.set(0); + timeout.set(0); + resetTreeConditions(); + } } } else { @@ -197,6 +222,8 @@ private void checkForForm() { // System.out.println("recognized: " + recognized); if (recognized != null) { activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); + formChanged = true; + // System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); // sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); } else { // Retry w/o movementConditions @@ -209,11 +236,14 @@ private void checkForForm() { } }); recognized = formsTree.search(nonMovementConditions); - if (recognized != null) + if (recognized != null) { activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); + formChanged = true; + } } } } + formChanged = false; } private void sendModifierData() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index ef21480f..e91230dc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -21,6 +21,10 @@ public HeldModifierData(int duration, boolean currentlyHeld) { this.currentlyHeld = currentlyHeld; } + public boolean held() { + return this.currentlyHeld; + } + @Override public String getName() { return "HeldModifier"; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 9414ce23..3c555161 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -2,6 +2,7 @@ import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.input.InputModule; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.conditionals.InputData; import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; @@ -115,14 +116,16 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { InputModule module = getTypedModule(type); - if (module.getActiveForm() != null && (module.getLastActivatedForm() == null || - !module.getActiveForm().name().equals(module.getLastActivatedForm().name()))) { - activeKeyCodes = getKeyCodes(module.getActiveForm(), type); + if (((KeyboardMouseInputModule) module).formChanged()) { + if (module.getActiveForm() != null && (module.getLastActivatedForm() == null || + !module.getActiveForm().name().equals(module.getLastActivatedForm().name()))) { + activeKeyCodes = getKeyCodes(module.getActiveForm(), type); + } } if (activeKeyCodes.isEmpty()) return false; - if (isHeld && currentHolding > 0 && currentHolding % 3 == 0) { + if (isHeld && currentHolding > 0) { return true; } //so that we send a packet to say we've stopped holding(for continuous cast ability support) @@ -132,7 +135,7 @@ public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { // Forcibly collects data jic // Magus.keyboardMouseInputModule.queueModifierData(collectModifierDataFromEvent(event)); // Magus.keyboardMouseInputModule.resetLastActivated(); - return true; + return false; } return false; } From 2a45a47ec5031bbe7252139760459408212ba0b8 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 23:15:00 -0500 Subject: [PATCH 424/469] improved element change command --- .../omegasource/magus/skill/test/avatar/AvatarCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java index ddb462ba..7a35ecab 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarCommand.java @@ -52,9 +52,9 @@ private static void createActivateArtCommand() { builder.then(Commands.literal("activate") .then(Commands.literal(elem.name().toLowerCase()) .executes(c -> activateElement(c, elem, null)) - ) - .then(Commands.argument("target", EntityArgument.player()) - .executes(c -> activateElement(c, elem, EntityArgument.getPlayer(c, "target"))) + .then(Commands.argument("target", EntityArgument.player()) + .executes(c -> activateElement(c, elem, EntityArgument.getPlayer(c, "target"))) + ) ) ) ); From f61552b205a46c65dc67b3dbb6916a9fa989091c Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 15:16:52 +1100 Subject: [PATCH 425/469] form event --- .../input/FormActivatedCondition.java | 48 ++++++++++++ .../radix/condition/input/FormCondition.java | 74 ------------------- 2 files changed, 48 insertions(+), 74 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormActivatedCondition.java delete mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormActivatedCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormActivatedCondition.java new file mode 100644 index 00000000..521df5bd --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormActivatedCondition.java @@ -0,0 +1,48 @@ +package com.amuzil.omegasource.magus.radix.condition.input; + +import com.amuzil.omegasource.magus.level.event.FormActivatedEvent; +import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.EventCondition; +import com.amuzil.omegasource.magus.skill.forms.Form; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; + +import java.util.LinkedList; +import java.util.List; +import java.util.function.Function; + +public class FormActivatedCondition extends EventCondition { + + private Form form; + private List modifierData; + public FormActivatedCondition(Class eventType, Function condition) { + super(eventType, condition); + } + + public FormActivatedCondition(Class eventType, Function condition, Form form, + List data) { + super(eventType, condition); + this.form = form; + this.modifierData = data; + } + + public FormActivatedCondition(Class eventType, Form form) { + this(eventType, formActivatedEvent -> formActivatedEvent.getForm().name().equals(form.name()), form, new LinkedList<>()); + } + + public FormActivatedCondition(Class eventType, Form form, List data) { + this(eventType, formActivatedEvent -> formActivatedEvent.getForm().name().equals(form.name()), form, data); + } + + public List getModifierData() { + return this.modifierData; + } + public Form getForm() { + return this.form; + } + + // TODO: Need to set this class' modifier data to modifier data from the event + @Override + public Runnable onSuccess() { + + return super.onSuccess(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java deleted file mode 100644 index 1828f253..00000000 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/input/FormCondition.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.amuzil.omegasource.magus.radix.condition.input; - -import com.amuzil.omegasource.magus.input.InputModule; -import com.amuzil.omegasource.magus.radix.Condition; -import com.amuzil.omegasource.magus.skill.forms.Form; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.TickEvent; -import net.minecraftforge.eventbus.api.EventPriority; - -import java.util.function.Consumer; - -public class FormCondition extends Condition { - private final InputModule module; - private final int timeout; - private final Form form; - private final Consumer tickEvent; - int ticksWaiting; - - public FormCondition(Form form, int timeout, InputModule module) { - this.setName(form.name()); - this.form = form; - this.timeout = timeout; - this.module = module; - this.ticksWaiting = 0; - - tickEvent = clientTickEvent -> { - if (module.getLastActivatedForm().name().equals(form.name())) { - this.onSuccess.run(); - reset(); - } - else { - if (timeout > -1) { - ticksWaiting++; - if (ticksWaiting > timeout) { - this.onFailure.run(); - reset(); - } - } - } - }; - } - - public Form getForm() { - return this.form; - } - - public int getTimeout() { - return this.timeout; - } - - public InputModule getModule() { - return this.module; - } - public void reset() { - this.ticksWaiting = 0; - } - - @Override - public void register() { - super.register(); - MinecraftForge.EVENT_BUS.addListener(EventPriority.NORMAL, false, TickEvent.ClientTickEvent.class, - tickEvent); - } - - @Override - public void unregister() { - MinecraftForge.EVENT_BUS.unregister(tickEvent); - } - - @Override - public String name() { - return "form_activate"; - } -} From f9548223ff1511e0f190add08e731dfdd7a07113 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Tue, 5 Nov 2024 23:20:30 -0500 Subject: [PATCH 426/469] change to ClientTickEvent --- .../modifiers/listeners/MouseGestureModifierListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java index e3c4e3d4..99f65760 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.function.Consumer; -public class MouseGestureModifierListener extends ModifierListener { +public class MouseGestureModifierListener extends ModifierListener { private Consumer clientTickListener; public List mouseGestures; public MouseVircle vircle; @@ -71,7 +71,7 @@ public void setupListener(CompoundTag compoundTag) { } @Override - public boolean shouldCollectModifierData(TickEvent event) { + public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { if (!Magus.keyboardMouseInputModule.keyPressed(Minecraft.getInstance().options.keyShift.getKey().getValue())) { if (!mouseGestures.isEmpty()) { mouseGestures.clear(); @@ -82,7 +82,7 @@ public boolean shouldCollectModifierData(TickEvent event) { } @Override - public ModifierData collectModifierDataFromEvent(TickEvent event) { + public ModifierData collectModifierDataFromEvent(TickEvent.ClientTickEvent event) { MouseGestureModifierData data = new MouseGestureModifierData(mouseGestures); this.mouseGestures = new ArrayList<>(); return data; From 2bfd06fce2a4c10d215997899c687c9f49fa6ef2 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 15:28:42 +1100 Subject: [PATCH 427/469] getting closer.... --- .../modifiers/data/HeldModifierData.java | 24 ++++++++++++++++++- .../listeners/KeyHeldModifierListener.java | 18 ++++++++++---- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index e91230dc..2dc925a2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -9,6 +9,7 @@ public class HeldModifierData extends BaseModifierData { private int duration; private boolean currentlyHeld; + private String formName; public HeldModifierData() { this.duration = 0; @@ -19,12 +20,28 @@ public HeldModifierData(int duration, boolean currentlyHeld) { super(); this.duration = duration; this.currentlyHeld = currentlyHeld; + this.formName = ""; + } + + public HeldModifierData(int duration, boolean currentlyHeld, String formName) { + super(); + this.duration = duration; + this.currentlyHeld = currentlyHeld; + this.formName = formName; + } + + public void setFormName(String name) { + this.formName = name; } public boolean held() { return this.currentlyHeld; } + public String getFormName() { + return this.formName; + } + @Override public String getName() { return "HeldModifier"; @@ -36,6 +53,7 @@ public CompoundTag serializeNBT() { compoundTag.putInt("duration", duration); compoundTag.putBoolean("currentlyHeld", currentlyHeld); + compoundTag.putString("formName", formName); return compoundTag; } @@ -49,13 +67,15 @@ public HeldModifierData copy() { public void deserializeNBT(CompoundTag compoundTag) { this.duration = compoundTag.getInt("duration"); this.currentlyHeld = compoundTag.getBoolean("currentlyHeld"); + this.formName = compoundTag.getString("formName"); } //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking @Override protected void mergeFields(ModifierData modifierData) { HeldModifierData heldModifierData = (HeldModifierData) modifierData; - if(this.currentlyHeld) { + // Checks to make sure forms are consistent + if (this.currentlyHeld && heldModifierData.getFormName().equals(getFormName())) { this.duration = this.duration + heldModifierData.duration; this.currentlyHeld = heldModifierData.currentlyHeld; } @@ -65,11 +85,13 @@ protected void mergeFields(ModifierData modifierData) { public void reset() { this.duration = 0; this.currentlyHeld = true; + this.formName = ""; } @Override public void print() { LogManager.getLogger().info("HeldModifierData duration: " + duration); LogManager.getLogger().info("HeldModifierData currentlyHeld: " + currentlyHeld); + LogManager.getLogger().info("HeldModifierData formName: " + formName); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 3c555161..57bc4128 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -31,6 +31,7 @@ public class KeyHeldModifierListener extends ModifierListener activeKeyCodes; public KeyHeldModifierListener() { @@ -41,6 +42,7 @@ public KeyHeldModifierListener(RadixTree.InputType type) { this.modifierData = new HeldModifierData(); this.type = type; this.activeKeyCodes = new LinkedList<>(); + this.formName = ""; } @Override @@ -88,6 +90,7 @@ public void setupListener(CompoundTag compoundTag) { this.clientTickListener = event -> { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { + boolean pressed = true; // If all requisite keys aren't pressed, don't iterate modifier data for (int key : activeKeyCodes) { @@ -116,11 +119,16 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { InputModule module = getTypedModule(type); - if (((KeyboardMouseInputModule) module).formChanged()) { - if (module.getActiveForm() != null && (module.getLastActivatedForm() == null || - !module.getActiveForm().name().equals(module.getLastActivatedForm().name()))) { +// if (((KeyboardMouseInputModule) module).formChanged()) { + if (module.getActiveForm() != null) { + formName = module.getActiveForm().name(); activeKeyCodes = getKeyCodes(module.getActiveForm(), type); - } + if (module.getLastActivatedForm() != null && !formName.equals(module.getLastActivatedForm().name())) { + +// LogManager.getLogger().info("New Form Activated in Key Held."); + currentHolding = 0; + } +// } } if (activeKeyCodes.isEmpty()) return false; @@ -143,7 +151,7 @@ public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { @Override public ModifierData collectModifierDataFromEvent(TickEvent.ClientTickEvent event) { LogManager.getLogger().debug("Collected Held Data at: " + currentHolding); - HeldModifierData data = new HeldModifierData(currentHolding, isHeld); + HeldModifierData data = new HeldModifierData(currentHolding, isHeld, formName); return data; } From 6cc60d152b51d60d76ecc378cb6b46ec57a27898 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 15:36:35 +1100 Subject: [PATCH 428/469] kind of working for things other than breathe and step --- .../omegasource/magus/input/KeyboardMouseInputModule.java | 4 +++- .../skill/modifiers/listeners/KeyHeldModifierListener.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 6eb2ace1..222b7662 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -143,6 +143,7 @@ public KeyboardMouseInputModule() { if (activeForm.get() != null && !activeForm.get().name().equals("null")) { ticksSinceActivated.getAndIncrement(); if (ticksSinceActivated.get() >= tickActivationThreshold) { + formChanged = false; // Always to send modifier data right when the form is activated // sendModifierData(); @@ -192,6 +193,7 @@ public KeyboardMouseInputModule() { } else { timeout.getAndIncrement(); if (timeout.get() > tickTimeoutThreshold) { + formChanged = false; resetTreeConditions(); // Timed out enough where multi is no longer valid. lastActivatedForm.set(Forms.NULL); @@ -243,7 +245,7 @@ private void checkForForm() { } } } - formChanged = false; + } private void sendModifierData() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 57bc4128..4797a37a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -119,7 +119,7 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { InputModule module = getTypedModule(type); -// if (((KeyboardMouseInputModule) module).formChanged()) { + if (((KeyboardMouseInputModule) module).formChanged()) { if (module.getActiveForm() != null) { formName = module.getActiveForm().name(); activeKeyCodes = getKeyCodes(module.getActiveForm(), type); @@ -128,7 +128,7 @@ public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { // LogManager.getLogger().info("New Form Activated in Key Held."); currentHolding = 0; } -// } + } } if (activeKeyCodes.isEmpty()) return false; From a7803808fd3bccde7ec96ca8cb7fd4c5b63365cc Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 15:59:41 +1100 Subject: [PATCH 429/469] odd things going on --- .../skill/modifiers/listeners/KeyHeldModifierListener.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 4797a37a..4f1722e1 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -103,7 +103,6 @@ public void setupListener(CompoundTag compoundTag) { pressed = false; if (pressed) { - LogManager.getLogger().debug("KEY HELD FOR: " + currentHolding); this.isHeld = true; this.currentHolding++; } else { @@ -124,8 +123,6 @@ public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { formName = module.getActiveForm().name(); activeKeyCodes = getKeyCodes(module.getActiveForm(), type); if (module.getLastActivatedForm() != null && !formName.equals(module.getLastActivatedForm().name())) { - -// LogManager.getLogger().info("New Form Activated in Key Held."); currentHolding = 0; } } @@ -140,6 +137,7 @@ public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { if (!this.isHeld && this.wasHeld) { this.wasHeld = false; this.currentHolding = 0; + LogManager.getLogger().debug("Form Name: " + module.getActiveForm().name()); // Forcibly collects data jic // Magus.keyboardMouseInputModule.queueModifierData(collectModifierDataFromEvent(event)); // Magus.keyboardMouseInputModule.resetLastActivated(); From 299a08edcc37cd62967213da4ff45f25196cd82f Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 6 Nov 2024 00:35:12 -0500 Subject: [PATCH 430/469] fixed DirectionModifier --- .../modifiers/data/DirectionModifierData.java | 11 ++--- .../modifiers/data/HeldModifierData.java | 1 + .../listeners/DirectionModifierListener.java | 43 ++++++++++++++++--- 3 files changed, 43 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java index 8bb992f5..119cc740 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java @@ -13,15 +13,16 @@ import java.util.List; import java.util.stream.Collectors; + public class DirectionModifierData extends BaseModifierData { - private List directions; + private List directions; public DirectionModifierData() { this.directions = new ArrayList<>(); } - public DirectionModifierData(List directions) { + public DirectionModifierData(List directions) { this.directions = directions; } @@ -35,7 +36,7 @@ public CompoundTag serializeNBT() { CompoundTag compoundTag = super.serializeNBT(); ListTag listTag = new ListTag(); - this.directions.forEach(direction -> listTag.add(StringTag.valueOf(direction.name()))); + this.directions.forEach(direction -> listTag.add(StringTag.valueOf(direction))); compoundTag.put("directions", listTag); return compoundTag; @@ -51,7 +52,7 @@ public void deserializeNBT(CompoundTag compoundTag) { this.directions = new ArrayList<>(); ListTag listTag = (ListTag) compoundTag.get("directions"); - listTag.forEach(tag -> this.directions.add(Direction.byName(tag.getAsString()))); + listTag.forEach(tag -> this.directions.add(tag.getAsString())); } //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking @@ -68,7 +69,7 @@ public void reset() { @Override public void print() { - LogManager.getLogger().info("MultiModifierData directions: " + this.directions.size()); + LogManager.getLogger().info("MultiModifierData directions: " + this.directions); // LogManager.getLogger().info("MultiModifierData directions: \n" + this.directions.stream().map(direction -> direction.name()).collect(Collectors.joining(",\n"))); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index 2dc925a2..0550855c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -5,6 +5,7 @@ import net.minecraft.nbt.CompoundTag; import org.apache.logging.log4j.LogManager; + public class HeldModifierData extends BaseModifierData { private int duration; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java index 991cc559..d2196ed2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java @@ -1,17 +1,21 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.DirectionModifierData; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.entity.living.LivingEvent; import org.apache.logging.log4j.LogManager; import java.util.LinkedList; import java.util.List; +import static com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput.getAngle2D; + public class DirectionModifierListener extends ModifierListener { private final double motionThreshold = 0.08d; @@ -27,21 +31,21 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(LivingEvent.LivingTickEvent event) { if(!(event.getEntity() instanceof Player)) return false; - // TODO: Need to check for direction key presses instead of motion if((event.getEntity().getDeltaMovement().length() > motionThreshold)) { - LogManager.getLogger().info("MOVE MOTION: " + event.getEntity().getDeltaMovement().length()); - LogManager.getLogger().info("MOVE DIRECTION: " + event.getEntity().getMotionDirection()); - LogManager.getLogger().info(event.getEntity().getDeltaMovement()); + System.out.println(getDirection(event.getEntity().getLookAngle(), event.getEntity().getDeltaMovement().normalize())); +// LogManager.getLogger().info("MOVE MOTION: " + event.getEntity().getDeltaMovement().length()); +// LogManager.getLogger().info(event.getEntity().getDeltaMovement()); return true; } - return false; } @Override public ModifierData collectModifierDataFromEvent(LivingEvent.LivingTickEvent event) { - List directions = new LinkedList<>(); - directions.add(event.getEntity().getMotionDirection()); + List directions = new LinkedList<>(); + String direction = getDirection(event.getEntity().getLookAngle(), event.getEntity().getDeltaMovement().normalize()); + if (!direction.isEmpty()) + directions.add(direction); return new DirectionModifierData(directions); } @@ -49,4 +53,29 @@ public ModifierData collectModifierDataFromEvent(LivingEvent.LivingTickEvent eve public ModifierListener copy() { return new DirectionModifierListener(); } + + public String getDirection(Vec3 faceDirection, Vec3 movementDirection) { + String direction = ""; + double degree_span = 45.0D; + Vec3 front = faceDirection.normalize(); + Vec3 back = new Vec3(-faceDirection.x, faceDirection.y, -faceDirection.z).normalize(); + Vec3 right = new Vec3(-faceDirection.z, faceDirection.y, faceDirection.x).normalize(); + Vec3 left = new Vec3(faceDirection.z, faceDirection.y, -faceDirection.x).normalize(); + System.out.println(front); + System.out.println(movementDirection); + if (movementDirection.y() >= 1.0D) { + direction = "up"; + } else if (movementDirection.y() <= -1.0D) { + direction = "down"; + } else if (getAngle2D(front, movementDirection) <= degree_span) { + direction = "forward"; + } else if (getAngle2D(back, movementDirection) <= degree_span) { + direction = "back"; + } else if (getAngle2D(right, movementDirection) <= degree_span) { + direction = "right"; + } else if (getAngle2D(left, movementDirection) <= degree_span) { + direction = "left"; + } + return direction; + } } From 9f6c0eeb13b0c5a4ce0f79574e4b668747df6819 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 6 Nov 2024 00:36:22 -0500 Subject: [PATCH 431/469] remove prints --- .../skill/modifiers/listeners/DirectionModifierListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java index d2196ed2..709fe9fc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java @@ -61,8 +61,7 @@ public String getDirection(Vec3 faceDirection, Vec3 movementDirection) { Vec3 back = new Vec3(-faceDirection.x, faceDirection.y, -faceDirection.z).normalize(); Vec3 right = new Vec3(-faceDirection.z, faceDirection.y, faceDirection.x).normalize(); Vec3 left = new Vec3(faceDirection.z, faceDirection.y, -faceDirection.x).normalize(); - System.out.println(front); - System.out.println(movementDirection); + if (movementDirection.y() >= 1.0D) { direction = "up"; } else if (movementDirection.y() <= -1.0D) { From 7774d424abf9dac2653c1d5cafcb26af38e210e0 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 6 Nov 2024 00:39:14 -0500 Subject: [PATCH 432/469] fix print --- .../skill/modifiers/data/DirectionModifierData.java | 2 +- .../listeners/DirectionModifierListener.java | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java index 119cc740..37f6d5f3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java @@ -69,7 +69,7 @@ public void reset() { @Override public void print() { - LogManager.getLogger().info("MultiModifierData directions: " + this.directions); + LogManager.getLogger().info("DirectionModifierData directions: " + this.directions); // LogManager.getLogger().info("MultiModifierData directions: \n" + this.directions.stream().map(direction -> direction.name()).collect(Collectors.joining(",\n"))); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java index 709fe9fc..4e4c5c69 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java @@ -31,13 +31,10 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(LivingEvent.LivingTickEvent event) { if(!(event.getEntity() instanceof Player)) return false; - if((event.getEntity().getDeltaMovement().length() > motionThreshold)) { - System.out.println(getDirection(event.getEntity().getLookAngle(), event.getEntity().getDeltaMovement().normalize())); -// LogManager.getLogger().info("MOVE MOTION: " + event.getEntity().getDeltaMovement().length()); -// LogManager.getLogger().info(event.getEntity().getDeltaMovement()); - return true; - } - return false; + // System.out.println(getDirection(event.getEntity().getLookAngle(), event.getEntity().getDeltaMovement().normalize())); + // LogManager.getLogger().info("MOVE MOTION: " + event.getEntity().getDeltaMovement().length()); + // LogManager.getLogger().info(event.getEntity().getDeltaMovement()); + return event.getEntity().getDeltaMovement().length() > motionThreshold; } @Override From c774511300f128498989170b33899cf51d9097f9 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 16:48:41 +1100 Subject: [PATCH 433/469] everything works but step --- .../magus/input/KeyboardMouseInputModule.java | 57 ++++++++++++++++--- .../skill/test/avatar/AvatarFormRegistry.java | 2 +- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 222b7662..af81d17f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -6,11 +6,16 @@ import com.amuzil.omegasource.magus.radix.*; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; +import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; +import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; -import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; @@ -53,6 +58,28 @@ public boolean formChanged() { return this.formChanged; } + public List getKeyCodes(Form form, RadixTree.InputType type) { + List formInputs = FormDataRegistry.getInputsForForm(form, type); + List keyCodes = new ArrayList<>(); + + if (formInputs != null) { + InputData lastInput = formInputs.get(formInputs.size() - 1); + if (lastInput instanceof ChainedKeyInput) { + for (KeyInput key : ((ChainedKeyInput) lastInput).last().keys()) + keyCodes.add(key.key().getValue()); + } else if (lastInput instanceof MultiKeyInput) { + for (KeyInput key : ((MultiKeyInput) lastInput).keys()) + keyCodes.add(key.key().getValue()); + } else if (lastInput instanceof MouseWheelInput || lastInput instanceof MouseMotionInput) { + // Ignore these since they're not keys! + } else { + // If it's registered to the keyboard mouse input module, it's going to be some variant of KeyInput. + keyCodes.add(((KeyInput) lastInput).key().getValue()); + } + } + return keyCodes; + } + // module activating a form rather than relying on the raw input data for those forms. // This way, the trees for different complex methods (such as VR and multikey) // remain functionally the same, they just check different input modules for whether the same @@ -143,7 +170,7 @@ public KeyboardMouseInputModule() { if (activeForm.get() != null && !activeForm.get().name().equals("null")) { ticksSinceActivated.getAndIncrement(); if (ticksSinceActivated.get() >= tickActivationThreshold) { - formChanged = false; + formChanged = true; // Always to send modifier data right when the form is activated // sendModifierData(); @@ -156,21 +183,32 @@ public KeyboardMouseInputModule() { // } lastActivatedForm.set(activeForm.get()); +// sendModifierData(); // Extra check for race conditions. Probably wont' help... synchronized (lastActivatedForm.get()) { if (!lastActivatedForm.get().name().equals("null")) { if (Minecraft.getInstance().getConnection() != null) { MagusNetwork.sendToServer(new FormActivatedPacket(activeForm.get(), activeElement, 0)); } -// sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); + sendDebugMsg("Form Activated: " + lastActivatedForm.get().name()); } } + List keyCodes = getKeyCodes(activeForm.get(), RadixTree.InputType.KEYBOARD_MOUSE); // Need an if statement to check whether key held modifier is increasing - if (modifierQueue.get("HeldModifier") != null) { - LogManager.getLogger().debug("Found Held Modifier Data."); - HeldModifierData data = (HeldModifierData) modifierQueue.get("HeldModifier"); - if (!data.held()) { + if (!keyCodes.isEmpty()) { + boolean pressed = true; + // If all requisite keys aren't pressed, don't iterate modifier data + for (int key : keyCodes) { + if (!keyPressed(key)) { + + pressed = false; + break; + } + } +// LogManager.getLogger().debug("Found Held Modifier Data."); +// HeldModifierData data = (HeldModifierData) modifierQueue.get("HeldModifier"); + if (!pressed) { activeForm.set(Forms.NULL); ticksSinceActivated.set(0); timeout.set(0); @@ -224,7 +262,7 @@ private void checkForForm() { // System.out.println("recognized: " + recognized); if (recognized != null) { activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); - formChanged = true; +// formChanged = true; // System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); // sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); @@ -240,7 +278,7 @@ private void checkForForm() { recognized = formsTree.search(nonMovementConditions); if (recognized != null) { activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); - formChanged = true; +// formChanged = true; } } } @@ -261,6 +299,7 @@ private void sendModifierData() { } ticksSinceModifiersSent = 0; modifierQueue.clear(); + formChanged = false; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 5c2f7449..0669c944 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -34,7 +34,7 @@ public static void registerForms() { KeyInput left = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyAttack.getKey(), 0); KeyInput right = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyUse.getKey(), 0); KeyInput initializer = KeyDataBuilder.createInput("key.keyboard.left.alt", 0); - KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 16); + KeyInput sneak = KeyDataBuilder.createInput(Minecraft.getInstance().options.keyShift.getKey(), 10); MouseWheelInput forwards = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.FORWARDS, 2); MouseWheelInput back = MouseDataBuilder.createWheelInput(MouseDataBuilder.Direction.BACK, 2); From 51815f6df03739e2614246c4099cf3b7f5efb82d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Wed, 6 Nov 2024 00:57:52 -0500 Subject: [PATCH 434/469] Update DirectionModifierListener.java --- .../skill/modifiers/listeners/DirectionModifierListener.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java index 4e4c5c69..017d44c7 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java @@ -1,21 +1,19 @@ package com.amuzil.omegasource.magus.skill.modifiers.listeners; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MousePointInput; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.DirectionModifierData; -import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.entity.player.Player; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.entity.living.LivingEvent; -import org.apache.logging.log4j.LogManager; import java.util.LinkedList; import java.util.List; import static com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput.getAngle2D; + public class DirectionModifierListener extends ModifierListener { private final double motionThreshold = 0.08d; From 2d930692979379c06d65ae4746c0166f0e96caa9 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 17:07:41 +1100 Subject: [PATCH 435/469] we found the issue.... --- .../magus/input/KeyboardMouseInputModule.java | 4 +- .../listeners/KeyHeldModifierListener.java | 37 ++++++------------- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index af81d17f..96a8fca3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -58,7 +58,7 @@ public boolean formChanged() { return this.formChanged; } - public List getKeyCodes(Form form, RadixTree.InputType type) { + public static List getKeyCodes(Form form, RadixTree.InputType type) { List formInputs = FormDataRegistry.getInputsForForm(form, type); List keyCodes = new ArrayList<>(); @@ -152,7 +152,7 @@ public KeyboardMouseInputModule() { this.resetScrolling = true; } - if (ticksSinceModifiersSent > modifierTickThreshold && !modifierQueue.isEmpty()) { + if (ticksSinceModifiersSent % modifierTickThreshold == 0 && !modifierQueue.isEmpty()) { sendModifierData(); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 4f1722e1..39f7b87a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -15,6 +15,7 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; +import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -57,27 +58,6 @@ public void unregister() { MinecraftForge.EVENT_BUS.unregister(clientTickListener); } - public List getKeyCodes(Form form, RadixTree.InputType type) { - List formInputs = FormDataRegistry.getInputsForForm(form, type); - List keyCodes = new ArrayList<>(); - - if (formInputs != null) { - InputData lastInput = formInputs.get(formInputs.size() - 1); - if (lastInput instanceof ChainedKeyInput) { - for (KeyInput key : ((ChainedKeyInput) lastInput).last().keys()) - keyCodes.add(key.key().getValue()); - } else if (lastInput instanceof MultiKeyInput) { - for (KeyInput key : ((MultiKeyInput) lastInput).keys()) - keyCodes.add(key.key().getValue()); - } else if (lastInput instanceof MouseWheelInput || lastInput instanceof MouseMotionInput) { - // Ignore these since they're not keys! - } else { - // If it's registered to the keyboard mouse input module, it's going to be some variant of KeyInput. - keyCodes.add(((KeyInput) lastInput).key().getValue()); - } - } - return keyCodes; - } public InputModule getTypedModule(RadixTree.InputType type) { return Magus.keyboardMouseInputModule; @@ -92,15 +72,20 @@ public void setupListener(CompoundTag compoundTag) { if (event.phase == TickEvent.ClientTickEvent.Phase.START) { boolean pressed = true; +// System.out.println(formName); // If all requisite keys aren't pressed, don't iterate modifier data for (int key : activeKeyCodes) { if (!module.keyPressed(key)) { + if (formName.equals("step")) { + LogManager.getLogger().debug("Key: " + key); + } pressed = false; break; } } - if (activeKeyCodes.isEmpty()) + if (activeKeyCodes.isEmpty()) { pressed = false; + } if (pressed) { this.isHeld = true; @@ -118,14 +103,14 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { InputModule module = getTypedModule(type); - if (((KeyboardMouseInputModule) module).formChanged()) { - if (module.getActiveForm() != null) { +// if (((KeyboardMouseInputModule) module).formChanged()) { + if (module.getActiveForm() != null && !module.getActiveForm().name().equals("null")) { formName = module.getActiveForm().name(); - activeKeyCodes = getKeyCodes(module.getActiveForm(), type); + activeKeyCodes = KeyboardMouseInputModule.getKeyCodes(module.getActiveForm(), type); if (module.getLastActivatedForm() != null && !formName.equals(module.getLastActivatedForm().name())) { currentHolding = 0; } - } +// } } if (activeKeyCodes.isEmpty()) return false; From 2f58428278985ae7a4c985b352b11b2853593799 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 17:22:20 +1100 Subject: [PATCH 436/469] IT WORKS RAHHH --- .../magus/input/KeyboardMouseInputModule.java | 77 +++++++++---------- .../listeners/KeyHeldModifierListener.java | 21 +---- 2 files changed, 39 insertions(+), 59 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 96a8fca3..3b50e3c8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -1,22 +1,17 @@ package com.amuzil.omegasource.magus.input; +import com.amuzil.omegasource.magus.Magus; import com.amuzil.omegasource.magus.network.MagusNetwork; import com.amuzil.omegasource.magus.network.packets.client_executed.FormActivatedPacket; import com.amuzil.omegasource.magus.network.packets.server_executed.SendModifierDataPacket; import com.amuzil.omegasource.magus.radix.*; +import com.amuzil.omegasource.magus.radix.condition.MultiClientCondition; import com.amuzil.omegasource.magus.radix.condition.minecraft.forge.key.KeyHoldCondition; import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; import com.amuzil.omegasource.magus.skill.elements.Element; import com.amuzil.omegasource.magus.skill.forms.Form; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.forms.Forms; -import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; -import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; @@ -54,37 +49,6 @@ public class KeyboardMouseInputModule extends InputModule { private boolean checkForm = false; private boolean formChanged = false; - public boolean formChanged() { - return this.formChanged; - } - - public static List getKeyCodes(Form form, RadixTree.InputType type) { - List formInputs = FormDataRegistry.getInputsForForm(form, type); - List keyCodes = new ArrayList<>(); - - if (formInputs != null) { - InputData lastInput = formInputs.get(formInputs.size() - 1); - if (lastInput instanceof ChainedKeyInput) { - for (KeyInput key : ((ChainedKeyInput) lastInput).last().keys()) - keyCodes.add(key.key().getValue()); - } else if (lastInput instanceof MultiKeyInput) { - for (KeyInput key : ((MultiKeyInput) lastInput).keys()) - keyCodes.add(key.key().getValue()); - } else if (lastInput instanceof MouseWheelInput || lastInput instanceof MouseMotionInput) { - // Ignore these since they're not keys! - } else { - // If it's registered to the keyboard mouse input module, it's going to be some variant of KeyInput. - keyCodes.add(((KeyInput) lastInput).key().getValue()); - } - } - return keyCodes; - } - - // module activating a form rather than relying on the raw input data for those forms. - // This way, the trees for different complex methods (such as VR and multikey) - // remain functionally the same, they just check different input modules for whether the same - // forms are activated. - public KeyboardMouseInputModule() { formsTree.setDiscipline(activeElement); @@ -213,8 +177,7 @@ public KeyboardMouseInputModule() { ticksSinceActivated.set(0); timeout.set(0); resetTreeConditions(); - } - else { + } else { LogManager.getLogger().debug("Modifier Held Down."); // Don't reset the currently active form ticksSinceActivated.set(0); @@ -241,15 +204,45 @@ public KeyboardMouseInputModule() { }; } + public static List getKeyCodes(Form form, RadixTree.InputType type) { + // Creates a copy + List active = Magus.keyboardMouseInputModule.activeConditions.stream().toList(); + + List keyCodes = new ArrayList<>(); + + if (!active.isEmpty()) { + Condition last = active.get(active.size() - 1); + if (last instanceof MultiClientCondition) { + for (Condition cond : ((MultiClientCondition) last).getSubConditions()) { + if (cond instanceof KeyHoldCondition) { + keyCodes.add(((KeyHoldCondition) cond).getKey()); + } + } + } + if (last instanceof KeyHoldCondition) { + keyCodes.add(((KeyHoldCondition) last).getKey()); + } + } + return keyCodes; + } + + // module activating a form rather than relying on the raw input data for those forms. + // This way, the trees for different complex methods (such as VR and multikey) + // remain functionally the same, they just check different input modules for whether the same + // forms are activated. + public static void setActiveDiscipline(Element element) { activeElement = element; formsTree.setDiscipline(element); } + public boolean formChanged() { + return this.formChanged; + } + @Override public Form getActiveForm() { - if (activeForm != null) - return this.activeForm.get(); + if (activeForm != null) return this.activeForm.get(); return null; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index 39f7b87a..e3dfe46a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -4,24 +4,14 @@ import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.skill.conditionals.InputData; -import com.amuzil.omegasource.magus.skill.conditionals.key.ChainedKeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.KeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.key.MultiKeyInput; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput; -import com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseWheelInput; -import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; -import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import org.apache.logging.log4j.LogManager; -import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.function.Consumer; @@ -76,9 +66,6 @@ public void setupListener(CompoundTag compoundTag) { // If all requisite keys aren't pressed, don't iterate modifier data for (int key : activeKeyCodes) { if (!module.keyPressed(key)) { - if (formName.equals("step")) { - LogManager.getLogger().debug("Key: " + key); - } pressed = false; break; } @@ -103,14 +90,14 @@ public void setupListener(CompoundTag compoundTag) { @Override public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { InputModule module = getTypedModule(type); -// if (((KeyboardMouseInputModule) module).formChanged()) { - if (module.getActiveForm() != null && !module.getActiveForm().name().equals("null")) { - formName = module.getActiveForm().name(); + if (module.getActiveForm() != null && !module.getActiveForm().name().equals("null")) { + formName = module.getActiveForm().name(); + if (!KeyboardMouseInputModule.getKeyCodes(module.getActiveForm(), type).isEmpty()) { activeKeyCodes = KeyboardMouseInputModule.getKeyCodes(module.getActiveForm(), type); if (module.getLastActivatedForm() != null && !formName.equals(module.getLastActivatedForm().name())) { currentHolding = 0; } -// } + } } if (activeKeyCodes.isEmpty()) return false; From 3457d5824db203aec42401fe3feec136aab02e1b Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 17:23:23 +1100 Subject: [PATCH 437/469] cleanup --- .../magus/input/KeyboardMouseInputModule.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index 3b50e3c8..ad64e69e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -47,7 +47,6 @@ public class KeyboardMouseInputModule extends InputModule { private boolean listen; // Used for modifier data private boolean checkForm = false; - private boolean formChanged = false; public KeyboardMouseInputModule() { formsTree.setDiscipline(activeElement); @@ -134,7 +133,6 @@ public KeyboardMouseInputModule() { if (activeForm.get() != null && !activeForm.get().name().equals("null")) { ticksSinceActivated.getAndIncrement(); if (ticksSinceActivated.get() >= tickActivationThreshold) { - formChanged = true; // Always to send modifier data right when the form is activated // sendModifierData(); @@ -194,7 +192,6 @@ public KeyboardMouseInputModule() { } else { timeout.getAndIncrement(); if (timeout.get() > tickTimeoutThreshold) { - formChanged = false; resetTreeConditions(); // Timed out enough where multi is no longer valid. lastActivatedForm.set(Forms.NULL); @@ -236,10 +233,6 @@ public static void setActiveDiscipline(Element element) { formsTree.setDiscipline(element); } - public boolean formChanged() { - return this.formChanged; - } - @Override public Form getActiveForm() { if (activeForm != null) return this.activeForm.get(); @@ -255,7 +248,6 @@ private void checkForForm() { // System.out.println("recognized: " + recognized); if (recognized != null) { activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); -// formChanged = true; // System.out.println("RECOGNIZED FORM: " + activeForm.name() + " " + recognized); // sendDebugMsg("RECOGNIZED FORM: " + activeForm.name()); @@ -271,7 +263,6 @@ private void checkForForm() { recognized = formsTree.search(nonMovementConditions); if (recognized != null) { activeForm.set(FormDataRegistry.formsNamespace.get(recognized.hashCode())); -// formChanged = true; } } } @@ -292,7 +283,6 @@ private void sendModifierData() { } ticksSinceModifiersSent = 0; modifierQueue.clear(); - formChanged = false; } } From 55fa248971fbd7f661de8dcdd3ce82bb9c04aa02 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 17:46:34 +1100 Subject: [PATCH 438/469] figured out issue --- .../magus/skill/modifiers/ModifiersRegistry.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 6bbe7695..136471fd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -25,6 +25,7 @@ public class ModifiersRegistry { public static Modifier CONTROL; + // Change s.t listeners are referenced on correct sides (client or server), and rest of it is referenced on both public static void init() { modifierDataTypes = new HashMap<>(); @@ -32,9 +33,9 @@ public static void init() { FOCUS = new Modifier(heldModifierData, new KeyHeldModifierListener()); modifierDataTypes.put(heldModifierData.getName(), FOCUS); - ModifierData multiModifierData = new MultiModifierData(); - MULTI = new Modifier(multiModifierData, null); - modifierDataTypes.put(multiModifierData.getName(), MULTI); +// ModifierData multiModifierData = new MultiModifierData(); +// MULTI = new Modifier(multiModifierData, null); +// modifierDataTypes.put(multiModifierData.getName(), MULTI); ModifierData directionModifierData = new DirectionModifierData(); DIRECTION = new Modifier(directionModifierData, new DirectionModifierListener()); From 0cb57189669bdc80249d9afd1084f96a768f10bf Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 20:57:41 +1100 Subject: [PATCH 439/469] multi working --- .../magus/input/KeyboardMouseInputModule.java | 14 +++- .../skill/modifiers/ModifiersRegistry.java | 8 +-- .../modifiers/data/HeldModifierData.java | 6 +- .../modifiers/data/MultiModifierData.java | 19 +++++- .../listeners/MultiModifierListener.java | 65 +++++++++++++++++++ 5 files changed, 100 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MultiModifierListener.java diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java index ad64e69e..9a6703b4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyboardMouseInputModule.java @@ -44,10 +44,15 @@ public class KeyboardMouseInputModule extends InputModule { public int scrollTimeout = 0; private int ticksSinceModifiersSent = 0; private double mouseScrollDelta; + private int activationCounter = 0; private boolean listen; // Used for modifier data private boolean checkForm = false; + public int getActivationCounter() { + return this.activationCounter; + } + public KeyboardMouseInputModule() { formsTree.setDiscipline(activeElement); @@ -136,9 +141,11 @@ public KeyboardMouseInputModule() { // Always to send modifier data right when the form is activated // sendModifierData(); -// if (lastActivatedForm != null && lastActivatedForm.name().equals(activeForm.name())) { -// // Send modifier data of it being multi. -// } + if (lastActivatedForm != null && lastActivatedForm.get().name().equals(activeForm.get().name())) { + // Send modifier data of it being multi. + activationCounter++; + } + else activationCounter = 0; // else { // // Send packet // MagusNetwork.sendToServer(new ConditionActivatedPacket(activeForm)); @@ -196,6 +203,7 @@ public KeyboardMouseInputModule() { // Timed out enough where multi is no longer valid. lastActivatedForm.set(Forms.NULL); timeout.set(0); + activationCounter = 0; } } }; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 136471fd..37ea81be 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -1,7 +1,5 @@ package com.amuzil.omegasource.magus.skill.modifiers; -import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.modifiers.api.Modifier; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.data.*; @@ -33,9 +31,9 @@ public static void init() { FOCUS = new Modifier(heldModifierData, new KeyHeldModifierListener()); modifierDataTypes.put(heldModifierData.getName(), FOCUS); -// ModifierData multiModifierData = new MultiModifierData(); -// MULTI = new Modifier(multiModifierData, null); -// modifierDataTypes.put(multiModifierData.getName(), MULTI); + ModifierData multiModifierData = new MultiModifierData(); + MULTI = new Modifier(multiModifierData, new MultiModifierListener()); + modifierDataTypes.put(multiModifierData.getName(), MULTI); ModifierData directionModifierData = new DirectionModifierData(); DIRECTION = new Modifier(directionModifierData, new DirectionModifierListener()); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java index 0550855c..39007ad8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/HeldModifierData.java @@ -91,8 +91,8 @@ public void reset() { @Override public void print() { - LogManager.getLogger().info("HeldModifierData duration: " + duration); - LogManager.getLogger().info("HeldModifierData currentlyHeld: " + currentlyHeld); - LogManager.getLogger().info("HeldModifierData formName: " + formName); +// LogManager.getLogger().info("HeldModifierData duration: " + duration); +// LogManager.getLogger().info("HeldModifierData currentlyHeld: " + currentlyHeld); +// LogManager.getLogger().info("HeldModifierData formName: " + formName); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java index 44e6521b..af41ecef 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MultiModifierData.java @@ -8,14 +8,28 @@ public class MultiModifierData extends BaseModifierData { private int count; + private String formName; public MultiModifierData() { - this.count = 1; + this(1, ""); } public MultiModifierData(int count) { + this(count, ""); + } + + public MultiModifierData(int count, String formName) { super(); this.count = count; + this.formName = formName; + } + + public String getFormName() { + return this.formName; + } + + public int getCount() { + return this.count; } @Override @@ -33,6 +47,7 @@ public CompoundTag serializeNBT() { CompoundTag compoundTag = super.serializeNBT(); compoundTag.putInt("count", count); + compoundTag.putString("formName", formName); return compoundTag; } @@ -45,6 +60,7 @@ public MultiModifierData copy() { @Override public void deserializeNBT(CompoundTag compoundTag) { this.count = compoundTag.getInt("count"); + this.formName = compoundTag.getString("formName"); } //it is safe to cast at this point because the public add(ModifierData data) method encapsulates type-checking @@ -57,6 +73,7 @@ protected void mergeFields(ModifierData modifierData) { @Override public void reset() { this.count = 1; + this.formName = ""; } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MultiModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MultiModifierListener.java new file mode 100644 index 00000000..0568abc1 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MultiModifierListener.java @@ -0,0 +1,65 @@ +package com.amuzil.omegasource.magus.skill.modifiers.listeners; + +import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.input.InputModule; +import com.amuzil.omegasource.magus.input.KeyboardMouseInputModule; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; +import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; +import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.event.TickEvent; +import org.apache.logging.log4j.LogManager; + +public class MultiModifierListener extends ModifierListener { + private int activationCounter; + private String formName; + + public MultiModifierListener() { + this.modifierData = new MultiModifierData(); + this.formName = ""; + this.activationCounter = 0; + } + + @Override + public void register(Runnable onSuccess) { + super.register(onSuccess); + } + + @Override + public void unregister() { + super.unregister(); + } + + public InputModule getTypedModule() { + return Magus.keyboardMouseInputModule; + } + + @Override + public void setupListener(CompoundTag compoundTag) { + } + + @Override + public boolean shouldCollectModifierData(TickEvent.ClientTickEvent event) { + InputModule module = getTypedModule(); + if (module.getActiveForm() != null) formName = module.getActiveForm().name(); + this.activationCounter = ((KeyboardMouseInputModule) module).getActivationCounter(); + if (!formName.equals("") && module.getActiveForm() != null && !formName.equals(module.getActiveForm().name())) { + this.activationCounter = 0; + return true; + } + return this.activationCounter > 0 && module.getActiveForm() != null && module.getLastActivatedForm() != null; + } + + @Override + public ModifierData collectModifierDataFromEvent(TickEvent.ClientTickEvent event) { + MultiModifierData data = new MultiModifierData(activationCounter, formName); + LogManager.getLogger().debug("Multi Count: " + activationCounter); + this.activationCounter = 0; + return data; + } + + @Override + public MultiModifierListener copy() { + return new MultiModifierListener(); + } +} From aa4795fb1b2e018d9a16b43230b173e3544f54fe Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 21:12:35 +1100 Subject: [PATCH 440/469] modifiers are now sided --- .../com/amuzil/omegasource/magus/Magus.java | 3 ++- .../magus/network/ClientPacketHandler.java | 5 ++-- .../skill/modifiers/ModifiersRegistry.java | 25 ++++++++++++++----- .../magus/skill/modifiers/api/Modifier.java | 7 +++++- .../listeners/MultiModifierListener.java | 3 +++ .../listeners/TargetModifierListener.java | 3 +++ 6 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index 7f5a71a8..c3707aaf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -72,6 +72,7 @@ private void setup(final FMLCommonSetupEvent event) { Registries.init(); CapabilityHandler.initialiseCaps(); MagusNetwork.registerMessages(); + ModifiersRegistry.init(); } private void doClientStuff(final FMLClientSetupEvent event) { @@ -82,7 +83,7 @@ private void doClientStuff(final FMLClientSetupEvent event) { // TODO - call this anytime the key mappings are updated // Assign input data to forms FormDataRegistry.init(); - ModifiersRegistry.init(); + ModifiersRegistry.clientSetup(); } private void enqueueIMC(final InterModEnqueueEvent event) {} diff --git a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java index fe6c8174..cd05e1fc 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/ClientPacketHandler.java @@ -16,7 +16,7 @@ public class ClientPacketHandler { public static boolean handlePacket(SkillTriggeredPacket packet, Supplier ctx) { ctx.get().enqueueWork(() -> { - //todo handle activating a skill on the clientside + //todo handle activating a skill on the clientside }); return true; @@ -27,7 +27,8 @@ public static boolean handlePacket(RegisterModifierListenersPacket packet, Suppl ctx.get().enqueueWork(() -> { packet.modifierTypes.forEach(modifierType -> { LogManager.getLogger().info("REGISTERING MODIFIER: " + modifierType); - Magus.keyboardMouseInputModule.registerModifierListener(ModifiersRegistry.fromName(modifierType).listener(), packet.treeData); + if (ModifiersRegistry.fromName(modifierType).listener() != null) + Magus.keyboardMouseInputModule.registerModifierListener(ModifiersRegistry.fromName(modifierType).listener(), packet.treeData); }); }); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java index 37ea81be..646b7080 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/ModifiersRegistry.java @@ -5,6 +5,8 @@ import com.amuzil.omegasource.magus.skill.modifiers.data.*; import com.amuzil.omegasource.magus.skill.modifiers.listeners.*; import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import java.util.HashMap; import java.util.List; @@ -28,27 +30,27 @@ public static void init() { modifierDataTypes = new HashMap<>(); ModifierData heldModifierData = new HeldModifierData(); - FOCUS = new Modifier(heldModifierData, new KeyHeldModifierListener()); + FOCUS = new Modifier(heldModifierData, null); modifierDataTypes.put(heldModifierData.getName(), FOCUS); ModifierData multiModifierData = new MultiModifierData(); - MULTI = new Modifier(multiModifierData, new MultiModifierListener()); + MULTI = new Modifier(multiModifierData, null); modifierDataTypes.put(multiModifierData.getName(), MULTI); ModifierData directionModifierData = new DirectionModifierData(); - DIRECTION = new Modifier(directionModifierData, new DirectionModifierListener()); + DIRECTION = new Modifier(directionModifierData, null); modifierDataTypes.put(directionModifierData.getName(), DIRECTION); ModifierData targetModifierData = new TargetModifierData(); - TARGET = new Modifier(targetModifierData, new TargetModifierListener()); + TARGET = new Modifier(targetModifierData, null); modifierDataTypes.put(targetModifierData.getName(), TARGET); ModifierData gestureModifierData = new MouseGestureModifierData(); - GESTURE = new Modifier(gestureModifierData, new MouseGestureModifierListener()); + GESTURE = new Modifier(gestureModifierData, null); modifierDataTypes.put(gestureModifierData.getName(), GESTURE); ModifierData scrollModifierData = new MouseScrollModifierData(); - CONTROL = new Modifier(scrollModifierData, new MouseScrollModifierListener()); + CONTROL = new Modifier(scrollModifierData, null); modifierDataTypes.put(scrollModifierData.getName(), CONTROL); } @@ -65,4 +67,15 @@ public static ModifierData fromCompoundTag(CompoundTag compoundTag) { public static Modifier fromName(String name) { return modifierDataTypes.get(name).copy(); } + + @OnlyIn(Dist.CLIENT) + public static void clientSetup() { + // Set up listeners that are marked as client-side only. + FOCUS.setListener(new KeyHeldModifierListener()); + TARGET.setListener(new TargetModifierListener()); + MULTI.setListener(new MultiModifierListener()); + GESTURE.setListener(new MouseGestureModifierListener()); + CONTROL.setListener(new MouseScrollModifierListener()); + DIRECTION.setListener(new DirectionModifierListener()); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java index c1469fd1..7529329f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/api/Modifier.java @@ -4,13 +4,18 @@ public final class Modifier { private ModifierData data; - private final ModifierListener listener; + private ModifierListener listener; public Modifier(ModifierData data, ModifierListener listener) { this.data = data; this.listener = listener; } + // Used for sided setup + public void setListener(ModifierListener listener) { + this.listener = listener; + } + public Modifier copy() { return new Modifier(data().copy(), listener() != null? listener().copy() : null); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MultiModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MultiModifierListener.java index 0568abc1..26d0c1df 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MultiModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MultiModifierListener.java @@ -7,9 +7,12 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.MultiModifierData; import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.event.TickEvent; import org.apache.logging.log4j.LogManager; +@OnlyIn(Dist.CLIENT) public class MultiModifierListener extends ModifierListener { private int activationCounter; private String formName; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index 05e5fcf6..b362e3f3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -19,6 +19,8 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.InputEvent; import org.apache.logging.log4j.LogManager; @@ -26,6 +28,7 @@ import java.util.List; // TODO: Configure which key this listener uses +@OnlyIn(Dist.CLIENT) public class TargetModifierListener extends ModifierListener { private Vec3 lastTargetPosition; private Element activeElement; From 20685a6985a095978d0101fabb97290fb319175f Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Wed, 6 Nov 2024 21:16:02 +1100 Subject: [PATCH 441/469] listeners properly annotated --- .../skill/modifiers/data/MouseScrollModifierData.java | 9 ++++----- .../modifiers/listeners/DirectionModifierListener.java | 3 +++ .../modifiers/listeners/KeyHeldModifierListener.java | 3 +++ .../listeners/MouseGestureModifierListener.java | 3 +++ .../modifiers/listeners/MouseScrollModifierListener.java | 3 +++ .../modifiers/listeners/TargetModifierListener.java | 2 -- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java index b471e6d4..c46746b6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/MouseScrollModifierData.java @@ -1,10 +1,10 @@ package com.amuzil.omegasource.magus.skill.modifiers.data; -import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; -import com.amuzil.omegasource.magus.skill.modifiers.listeners.MouseScrollModifierListener; import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import org.apache.logging.log4j.LogManager; public class MouseScrollModifierData extends BaseModifierData { @@ -27,8 +27,7 @@ protected void mergeFields(ModifierData modifierData) { @Override public void print() { - if (totalScrollDelta != 0) - LogManager.getLogger().info("Total Mouse Scroll Delta: " + totalScrollDelta); + if (totalScrollDelta != 0) LogManager.getLogger().info("Total Mouse Scroll Delta: " + totalScrollDelta); } @Override @@ -54,7 +53,7 @@ public void deserializeNBT(CompoundTag nbt) { @Override public CompoundTag serializeNBT() { CompoundTag tag = super.serializeNBT(); - tag.putFloat("total_scroll_delta", totalScrollDelta); + tag.putFloat("total_scroll_delta", totalScrollDelta); return tag; } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java index 017d44c7..d0e85099 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/DirectionModifierListener.java @@ -6,6 +6,8 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.world.entity.player.Player; import net.minecraft.world.phys.Vec3; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.event.entity.living.LivingEvent; import java.util.LinkedList; @@ -14,6 +16,7 @@ import static com.amuzil.omegasource.magus.skill.conditionals.mouse.MouseMotionInput.getAngle2D; +@OnlyIn(Dist.CLIENT) public class DirectionModifierListener extends ModifierListener { private final double motionThreshold = 0.08d; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java index e3dfe46a..4aae3648 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/KeyHeldModifierListener.java @@ -8,6 +8,8 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.HeldModifierData; import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import org.apache.logging.log4j.LogManager; @@ -16,6 +18,7 @@ import java.util.List; import java.util.function.Consumer; +@OnlyIn(Dist.CLIENT) public class KeyHeldModifierListener extends ModifierListener { private final RadixTree.InputType type; private Consumer clientTickListener; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java index 99f65760..79310efe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseGestureModifierListener.java @@ -11,6 +11,8 @@ import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.phys.Vec3; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -20,6 +22,7 @@ import java.util.List; import java.util.function.Consumer; +@OnlyIn(Dist.CLIENT) public class MouseGestureModifierListener extends ModifierListener { private Consumer clientTickListener; public List mouseGestures; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java index 1ae0e637..c79558d4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/MouseScrollModifierListener.java @@ -6,8 +6,11 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.MouseScrollModifierData; import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.event.TickEvent; +@OnlyIn(Dist.CLIENT) public class MouseScrollModifierListener extends ModifierListener { private float totalScrollDelta = 0; KeyboardMouseInputModule inputModule = (KeyboardMouseInputModule) Magus.keyboardMouseInputModule; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index b362e3f3..70106a1f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -2,11 +2,9 @@ import com.amuzil.omegasource.magus.input.InputModule; import com.amuzil.omegasource.magus.skill.elements.Element; -import com.amuzil.omegasource.magus.skill.elements.Elements; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierListener; import com.amuzil.omegasource.magus.skill.modifiers.data.TargetModifierData; -import com.amuzil.omegasource.magus.skill.util.bending.BendingMaterialUtil; import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; From 731123ca5447d5a67e93a4f71d80192e495d6d97 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 7 Nov 2024 17:07:15 +1100 Subject: [PATCH 442/469] starting to work on skill implementation and integration --- .../omegasource/magus/radix/RadixTree.java | 26 ++++++---- .../radix/builders/SkillPathBuilder.java | 12 +++++ .../omegasource/magus/skill/skill/Skill.java | 14 +++--- .../magus/skill/skill/SkillActive.java | 10 ++++ .../magus/skill/skill/SkillStance.java | 9 ++++ .../magus/skill/skill/avatar/EffectSkill.java | 48 +++++++++++++++++++ .../skill/avatar/effects/FlowEffect.java | 21 ++++++++ .../util/capability/entity/avatar/Bender.java | 14 ++++++ .../magus/skill/util/data/SkillData.java | 17 ++++++- 9 files changed, 154 insertions(+), 17 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/radix/builders/SkillPathBuilder.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/EffectSkill.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/avatar/Bender.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 6872a9ae..797ad1ee 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -34,6 +34,12 @@ public RadixTree() { this(new Node(false)); } + public static void registerConditions(List conditions) { + for (Condition condition : conditions) { + condition.register(); + } + } + public Node getRoot() { return root; } @@ -48,12 +54,6 @@ private int getFirstMismatchCondition(List conditions, List conditions) { - for (Condition condition : conditions) { - condition.register(); - } - } - public void activateAllConditions() { activateAllConditions(root, new ArrayList<>()); } @@ -126,7 +126,7 @@ private void printAllBranches(Node current, String indent) { private List prioritizeConditions(List conditions) { List prioritizedConditions = new ArrayList<>(); - for (Condition condition: conditions) { + for (Condition condition : conditions) { if (condition instanceof MultiClientCondition) { prioritizedConditions.add(condition); break; @@ -206,8 +206,7 @@ public List search(List conditions) { if (branch == null) return null; List currSubCondition = conditions.subList(currIndex, conditions.size()); - if (!Condition.startsWith(currSubCondition, branch.path.conditions)) - return null; // uses equals + if (!Condition.startsWith(currSubCondition, branch.path.conditions)) return null; // uses equals currIndex += branch.path.conditions.size(); current = branch.next; @@ -237,6 +236,11 @@ public void setDiscipline(Element element) { this.activeElement = element; } + + public Node getActive() { + return active; + } + private void setActive(Node node) { active = node; @@ -388,4 +392,8 @@ public enum ActivationType { public enum InputType { KEYBOARD_MOUSE, MOUSE_MOTION, VR } + + public ConditionPath getPath() { + return this.path; + } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/SkillPathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/SkillPathBuilder.java new file mode 100644 index 00000000..fd38938f --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/SkillPathBuilder.java @@ -0,0 +1,12 @@ +package com.amuzil.omegasource.magus.radix.builders; + +import com.amuzil.omegasource.magus.level.event.FormActivatedEvent; +import com.amuzil.omegasource.magus.radix.Condition; +import com.amuzil.omegasource.magus.radix.condition.input.FormActivatedCondition; +import com.amuzil.omegasource.magus.skill.forms.Form; + +public class SkillPathBuilder extends PathBuilder { + public Condition toCondition(Form form) { + return new FormActivatedCondition(FormActivatedEvent.class, form); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index 695e38f4..0218900f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -1,16 +1,16 @@ package com.amuzil.omegasource.magus.skill.skill; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.event.SkillTickEvent; +import com.amuzil.omegasource.magus.skill.util.data.SkillData; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.LivingEntity; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.TickEvent; -import net.minecraftforge.eventbus.EventBus; +import java.util.HashMap; import java.util.List; /** @@ -19,8 +19,7 @@ public abstract class Skill { private ResourceLocation id; private SkillCategory category; - private List traits; - private List types; + private SkillData skillData; private RadixTree requirements; public Skill(String modID, String name, SkillCategory category) { @@ -46,11 +45,11 @@ public ResourceLocation getId() { } public List getTraits() { - return this.traits; + return this.skillData.getSkillTraits(); } public List getTypes() { - return types; + return this.skillData.getSkillTypes(); } public void tick(LivingEntity entity, RadixTree tree) { @@ -79,6 +78,7 @@ public void tick(LivingEntity entity, RadixTree tree) { } + public abstract HashMap> getActivationPaths(); public abstract boolean shouldStart(LivingEntity entity, RadixTree tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index cf61b1e1..88a2db11 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -1,14 +1,24 @@ package com.amuzil.omegasource.magus.skill.skill; +import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; import net.minecraft.world.entity.LivingEntity; +import java.util.HashMap; +import java.util.List; + public class SkillActive extends Skill { public SkillActive(String name, SkillCategory category) { super(name, category); } + @Override + public HashMap> getActivationPaths() { + return null; + } + + @Override public boolean shouldStart(LivingEntity entity, RadixTree tree) { return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java index f2b27f87..b963b2a2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java @@ -1,8 +1,12 @@ package com.amuzil.omegasource.magus.skill.skill; +import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; import net.minecraft.world.entity.LivingEntity; +import java.util.HashMap; +import java.util.List; + /** * Name WIP. * Functions as a "stance" skill, as described in Avatar's documentation, design, and outline. @@ -17,6 +21,11 @@ public SkillStance(String name, SkillCategory category) { super(name, category); } + @Override + public HashMap> getActivationPaths() { + return null; + } + @Override public boolean shouldStart(LivingEntity entity, RadixTree tree) { return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/EffectSkill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/EffectSkill.java new file mode 100644 index 00000000..d8a36291 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/EffectSkill.java @@ -0,0 +1,48 @@ +package com.amuzil.omegasource.magus.skill.skill.avatar; + +import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.skill.Skill; +import com.amuzil.omegasource.magus.skill.skill.SkillActive; +import com.amuzil.omegasource.magus.skill.skill.SkillCategory; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.LivingEntity; + +import java.util.List; + +public class EffectSkill extends SkillActive { + public EffectSkill(String name, SkillCategory category) { + super(name, category); + } + + + @Override + public boolean shouldStart(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public boolean shouldRun(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public boolean shouldStop(LivingEntity entity, RadixTree tree) { + return false; + } + + @Override + public void start(LivingEntity entity, RadixTree tree) { + + } + + @Override + public void run(LivingEntity entity, RadixTree tree) { + + } + + @Override + public void stop(LivingEntity entity, RadixTree tree) { + + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java new file mode 100644 index 00000000..30a62cac --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java @@ -0,0 +1,21 @@ +package com.amuzil.omegasource.magus.skill.skill.avatar.effects; + +import com.amuzil.omegasource.magus.radix.ConditionPath; +import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.skill.SkillCategory; +import com.amuzil.omegasource.magus.skill.skill.avatar.EffectSkill; + +import java.util.HashMap; +import java.util.List; + +public class FlowEffect extends EffectSkill { + + public FlowEffect(String name, SkillCategory category) { + super(name, category); + } + + @Override + public HashMap> getActivationPaths() { + return super.getActivationPaths(); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/avatar/Bender.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/avatar/Bender.java new file mode 100644 index 00000000..f8e129d7 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/avatar/Bender.java @@ -0,0 +1,14 @@ +package com.amuzil.omegasource.magus.skill.util.capability.entity.avatar; + +import com.amuzil.omegasource.magus.skill.util.capability.entity.Data; +import com.amuzil.omegasource.magus.skill.util.capability.entity.Magi; +import net.minecraft.world.entity.LivingEntity; + +public class Bender extends Magi { + + public Bender(Data capabilityData, LivingEntity entity) { + super(capabilityData, entity); + } + + +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index d3ba1da1..df3bf9b2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -9,6 +9,7 @@ import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.Nullable; +import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.function.Predicate; @@ -19,6 +20,8 @@ public class SkillData implements DataTrait { List skillTraits; + // Types should not need serialisation as they do not change + List skillTypes; //The reason we're using a resource location and not the actual Skill object is because //it's much easier to serialise a String and then get a skill from it. ResourceLocation skillId; @@ -26,9 +29,21 @@ public class SkillData implements DataTrait { public SkillData(ResourceLocation skillId) { this.skillId = skillId; - this.skillTraits = getSkill().getTraits(); + this.skillTraits = new LinkedList<>(); } + public void addSkillTraits(SkillTrait... traits) { + this.skillTraits.addAll(List.of(traits)); + } + + public void addSkillTraits(List traits) { + this.skillTraits.addAll(traits); + } + + + public List getSkillTypes() { + return this.skillTypes; + } public SkillData(Skill skill) { this(skill.getId()); From a71cf708f20871ea9e8ca695b7501b2f4e34c13f Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 7 Nov 2024 18:34:55 +1100 Subject: [PATCH 443/469] path builder adjustments --- .../magus/radix/builders/PathBuilder.java | 45 +++++++++++++++++-- .../radix/builders/SkillPathBuilder.java | 2 +- .../skill/avatar/effects/FlowEffect.java | 6 ++- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java index e4da8b68..8736f059 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java @@ -7,6 +7,7 @@ import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; // Creates a path for a given object. Designed for things which directly require raw input. @@ -17,10 +18,23 @@ */ public class PathBuilder { public static PathBuilder instance; + private List paths; private ConditionPath path; // Todo: Change this to input type? Skills should use the activation type, forms input type? private RadixTree.ActivationType type; + public PathBuilder finalisePath(ConditionPath path) { + this.paths.add(path); + return this; + } + + public PathBuilder finalisePath() { + this.paths.add(path); + // Reset condition path + this.path = new ConditionPath(); + return this; + } + protected static void addSteps(ConditionPath path, Condition... conditions) { List emptyData = new ArrayList<>(); if (path == null) @@ -46,9 +60,9 @@ public PathBuilder type(RadixTree.ActivationType type) { return this; } - public HashMap build() { - HashMap finalPath = new HashMap<>(); - finalPath.put(type, path); + public HashMap> build() { + HashMap> finalPath = new HashMap<>(); + finalPath.put(type, paths); reset(); return finalPath; } @@ -56,5 +70,30 @@ public HashMap build() { public void reset() { this.type = null; this.path = null; + this.paths.clear(); + } + + public static void mergePath(HashMap> firstPath, HashMap> secondPath) { + boolean containsKey = false; + for (RadixTree.ActivationType type : secondPath.keySet()) { + if (firstPath.containsKey(type)) + containsKey = true; + } + + // Hard case + if (containsKey) { + for (RadixTree.ActivationType type : secondPath.keySet()) { + if (firstPath.containsKey(type)) { + List paths = secondPath.get(type); + List basePaths = firstPath.get(type); + basePaths.addAll(paths); + firstPath.put(type, basePaths); + } + } + } + // Easy case + else { + firstPath.putAll(secondPath); + } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/SkillPathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/SkillPathBuilder.java index fd38938f..b37e155f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/SkillPathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/SkillPathBuilder.java @@ -6,7 +6,7 @@ import com.amuzil.omegasource.magus.skill.forms.Form; public class SkillPathBuilder extends PathBuilder { - public Condition toCondition(Form form) { + public static Condition toCondition(Form form) { return new FormActivatedCondition(FormActivatedEvent.class, form); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java index 30a62cac..62b57b75 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java @@ -2,9 +2,12 @@ import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.radix.builders.SkillPathBuilder; +import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.skill.avatar.EffectSkill; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -16,6 +19,7 @@ public FlowEffect(String name, SkillCategory category) { @Override public HashMap> getActivationPaths() { - return super.getActivationPaths(); + // We're only testing multikey right now. Otherwise, we'd need to build for every distinct type. + return SkillPathBuilder.getInstance().type(RadixTree.ActivationType.MULTIKEY).path(SkillPathBuilder.toCondition(Forms.ARC)).finalisePath().build(); } } From fa64a97bf4dba08cc1908055792cd7ca7a3a969d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 7 Nov 2024 15:32:11 -0500 Subject: [PATCH 444/469] upgrade junit 5 and remove junit 4 --- .gitignore | 1 + build.gradle | 4 ++-- src/test/java/com/amuzil/omegasource/MagusTest.java | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 12f86447..03b47f8e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ run # Files from Forge MDK forge*changelog.txt +*.log diff --git a/build.gradle b/build.gradle index 87655afa..9264cf22 100644 --- a/build.gradle +++ b/build.gradle @@ -129,7 +129,6 @@ repositories { } dependencies { - testImplementation 'junit:junit:4.13.1' // Specify the version of Minecraft to use. // Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact. @@ -139,7 +138,7 @@ dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.19.4:1.0.5") { transitive = false } implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.19.4:1.0.14.a") { transitive = false } - testImplementation(platform('org.junit:junit-bom:5.9.1')) + testImplementation(platform('org.junit:junit-bom:5.10.3')) testImplementation('org.junit.jupiter:junit-jupiter') // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime @@ -217,6 +216,7 @@ tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } + test { useJUnitPlatform() testLogging { diff --git a/src/test/java/com/amuzil/omegasource/MagusTest.java b/src/test/java/com/amuzil/omegasource/MagusTest.java index ec00886e..edd2f6d4 100644 --- a/src/test/java/com/amuzil/omegasource/MagusTest.java +++ b/src/test/java/com/amuzil/omegasource/MagusTest.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource; +import com.amuzil.omegasource.magus.Magus; import com.lowdragmc.photon.client.fx.FX; import com.lowdragmc.photon.client.fx.FXHelper; import net.minecraft.resources.ResourceLocation; @@ -14,7 +15,7 @@ public class MagusTest { // System.out.println("Executing Test..."); // ResourceLocation resource; FX fx; // -// resource = new ResourceLocation("magus", "blue_fire"); +// resource = new ResourceLocation(Magus.MOD_ID, "blue_fire"); // fx = FXHelper.getFX(resource); // System.out.println("resource: " + resource.getNamespace()); // System.out.println("resource: " + resource.getPath()); From 9076607cdafa1ff81f36e7ad676cf8e87f91f520 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 7 Nov 2024 16:21:26 -0500 Subject: [PATCH 445/469] Upgraded to 1.20.1 --- build.gradle | 4 +- gradle.properties | 12 +++--- .../magus/entity/ElementProjectile.java | 38 ++++--------------- .../entity/collision/ElementCollision.java | 16 ++++---- .../entity/projectile/AirProjectile.java | 24 ++++++------ .../entity/projectile/EarthProjectile.java | 24 ++++++------ .../entity/projectile/FireProjectile.java | 38 +++++++++---------- .../entity/projectile/WaterProjectile.java | 24 ++++++------ .../client_executed/FormActivatedPacket.java | 6 +-- .../ElementActivatedPacket.java | 2 +- .../listeners/TargetModifierListener.java | 6 +-- 11 files changed, 85 insertions(+), 109 deletions(-) diff --git a/build.gradle b/build.gradle index 9264cf22..6cfdf0ed 100644 --- a/build.gradle +++ b/build.gradle @@ -136,8 +136,8 @@ dependencies { // If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"], // then special handling is done to allow a setup of a vanilla dependency without the use of an external repository. minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" - implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.19.4:1.0.5") { transitive = false } - implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.19.4:1.0.14.a") { transitive = false } + implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.20.1:1.0.7.b") { transitive = false } + implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.20.1:1.0.32.a") { transitive = false } testImplementation(platform('org.junit:junit-bom:5.10.3')) testImplementation('org.junit.jupiter:junit-jupiter') // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings diff --git a/gradle.properties b/gradle.properties index cf69738d..8b5f77f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,17 +7,17 @@ org.gradle.daemon=false ## Environment Properties # The Minecraft version must agree with the Forge version to get a valid artifact -minecraft_version=1.19.4 +minecraft_version=1.20.1 # The Minecraft version range can use any release version of Minecraft as bounds. # Snapshots, pre-releases, and release candidates are not guaranteed to sort properly # as they do not follow standard versioning conventions. -minecraft_version_range=[1.19.4,1.20) +minecraft_version_range=[1.20.1,1.21) # The Forge version must agree with the Minecraft version to get a valid artifact -forge_version=45.3.0 +forge_version=47.3.0 # The Forge version range can use any version of Forge as bounds or match the loader version range -forge_version_range=[45,) +forge_version_range=[47,) # The loader version range can only use the major version of Forge/FML as bounds -loader_version_range=[45,) +loader_version_range=[47,) # The mapping channel to use for mappings. # The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"]. # Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin. @@ -35,7 +35,7 @@ loader_version_range=[45,) mapping_channel=official # The mapping version to query from the mapping channel. # This must match the format required by the mapping channel. -mapping_version=1.19.4 +mapping_version=1.20.1 ## Mod Properties diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java index 6fc1a5c8..92d84d35 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/ElementProjectile.java @@ -83,7 +83,7 @@ public void tick() { @Nullable protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { - return getEntityHitResult(this.level, this, pos, delta, + return getEntityHitResult(this.level(), this, pos, delta, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), this::canHitEntity, 0.3F); } @@ -151,7 +151,7 @@ protected void defineSynchedData() { public boolean checkLeftOwner() { Entity owner = this.getOwner(); if (owner != null) { - for(Entity entity1 : this.level.getEntities(this, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(1.0D), (entity) -> { + for(Entity entity1 : this.level().getEntities(this, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(1.0D), (entity) -> { return !entity.isSpectator() && entity.isPickable(); })) { if (entity1.getRootVehicle() == owner.getRootVehicle()) { @@ -163,7 +163,7 @@ public boolean checkLeftOwner() { } public boolean isNoPhysics() { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { return this.noPhysics; } else { return (this.entityData.get(ID_FLAGS) & 2) != 0; @@ -174,34 +174,12 @@ public boolean isNoPhysics() { // if (data == 3) { // System.out.println("HANDLE ENTITY EVENT"); // for(int i = 0; i < 8; ++i) { -// this.level.addParticle(this.getParticle(), this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); +// this.level().addParticle(this.getParticle(), this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); // } // } // } - protected void onHitEntity(EntityHitResult entityHitResult) { - Entity entity = entityHitResult.getEntity(); - if (entity instanceof Blaze) { - if (this.getOwner() != null) { - this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); - } - } else if (entity instanceof ElementProjectile testProjectileEntity) { - if (this.getOwner() != null && this.level.isClientSide) { - ElementProjectile collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); - collisionEntity.setTimeToKill(5); - level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); - entityEffect.start(); - System.out.println("SUCCESS COLLISION!!!"); - this.discard(); - testProjectileEntity.discard(); - } - } else { - int i = 10; // Deal 10 damage - entity.hurt(this.damageSources().thrown(this, this.getOwner()), (float)i); - this.discard(); - } - } + protected abstract void onHitEntity(EntityHitResult entityHitResult); protected void onHitBlock(BlockHitResult blockHitResult) { // super.onHitBlock(blockHitResult); @@ -210,8 +188,8 @@ protected void onHitBlock(BlockHitResult blockHitResult) { protected void onHit(HitResult hitResult) { super.onHit(hitResult); - if (!this.level.isClientSide) { - this.level.broadcastEntityEvent(this, (byte)3); + if (!this.level().isClientSide) { + this.level().broadcastEntityEvent(this, (byte)3); // this.discard(); } } @@ -284,7 +262,7 @@ public void startEffect(Form form, Player player) { fx = blue_fire_perma; } if (fx != null) { - EntityEffect entityEffect = new EntityEffect(fx, level, this); + EntityEffect entityEffect = new EntityEffect(fx, this.level(), this); entityEffect.start(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java index 86690883..3fcc0734 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/collision/ElementCollision.java @@ -69,9 +69,9 @@ public void tick() { } BlockPos blockpos = this.blockPosition(); - BlockState blockstate = this.level.getBlockState(blockpos); + BlockState blockstate = this.level().getBlockState(blockpos); if (!blockstate.isAir() && !flag) { - VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + VoxelShape voxelshape = blockstate.getCollisionShape(this.level(), blockpos); if (!voxelshape.isEmpty()) { Vec3 vec31 = this.position(); @@ -89,13 +89,13 @@ public void tick() { Vec3 pos = this.position(); Vec3 delta = pos.add(deltaMovement); - HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + HitResult hitresult = this.level().clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); if (hitresult.getType() != HitResult.Type.MISS) { delta = hitresult.getLocation(); } while(!this.isRemoved()) { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { this.tickDespawn(); } EntityHitResult entityhitresult = this.findHitEntity(pos, delta); @@ -159,7 +159,7 @@ public void tick() { @Nullable protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { - return getEntityHitResult(this.level, this, pos, delta, + return getEntityHitResult(this.level(), this, pos, delta, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), this::canHitEntity, 0.3F); } @@ -218,7 +218,7 @@ protected void defineSynchedData() { } public boolean isNoPhysics() { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { return this.noPhysics; } else { return (this.entityData.get(ID_FLAGS) & 2) != 0; @@ -239,8 +239,8 @@ protected void onHitBlock(BlockHitResult blockHitResult) { protected void onHit(HitResult hitResult) { super.onHit(hitResult); - if (!this.level.isClientSide) { - this.level.broadcastEntityEvent(this, (byte)3); + if (!this.level().isClientSide) { + this.level().broadcastEntityEvent(this, (byte)3); // this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java index 4755f4dc..ca5cf012 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/AirProjectile.java @@ -69,9 +69,9 @@ public void tick() { } BlockPos blockpos = this.blockPosition(); - BlockState blockstate = this.level.getBlockState(blockpos); + BlockState blockstate = this.level().getBlockState(blockpos); if (!blockstate.isAir() && !flag) { - VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + VoxelShape voxelshape = blockstate.getCollisionShape(this.level(), blockpos); if (!voxelshape.isEmpty()) { Vec3 vec31 = this.position(); @@ -89,13 +89,13 @@ public void tick() { Vec3 pos = this.position(); Vec3 delta = pos.add(deltaMovement); - HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + HitResult hitresult = this.level().clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); if (hitresult.getType() != HitResult.Type.MISS) { delta = hitresult.getLocation(); } while(!this.isRemoved()) { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { this.tickDespawn(); } EntityHitResult entityhitresult = this.findHitEntity(pos, delta); @@ -159,7 +159,7 @@ public void tick() { @Nullable protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { - return getEntityHitResult(this.level, this, pos, delta, + return getEntityHitResult(this.level(), this, pos, delta, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), this::canHitEntity, 0.3F); } @@ -219,7 +219,7 @@ protected void defineSynchedData() { } public boolean isNoPhysics() { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { return this.noPhysics; } else { return (this.entityData.get(ID_FLAGS) & 2) != 0; @@ -233,11 +233,11 @@ protected void onHitEntity(EntityHitResult entityHitResult) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } } else if (entity instanceof ElementProjectile elementProjectile) { - if (this.getOwner() != null && this.level.isClientSide) { - ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); + if (this.getOwner() != null && this.level().isClientSide) { + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), this.level()); collisionEntity.setTimeToKill(5); - level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + this.level().addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, this.level(), collisionEntity); entityEffect.start(); System.out.println("SUCCESS COLLISION!!!"); this.discard(); @@ -257,8 +257,8 @@ protected void onHitBlock(BlockHitResult blockHitResult) { protected void onHit(HitResult hitResult) { super.onHit(hitResult); - if (!this.level.isClientSide) { - this.level.broadcastEntityEvent(this, (byte)3); + if (!this.level().isClientSide) { + this.level().broadcastEntityEvent(this, (byte)3); // this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java index 589a5158..c6d24aca 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/EarthProjectile.java @@ -70,9 +70,9 @@ public void tick() { } BlockPos blockpos = this.blockPosition(); - BlockState blockstate = this.level.getBlockState(blockpos); + BlockState blockstate = this.level().getBlockState(blockpos); if (!blockstate.isAir() && !flag) { - VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + VoxelShape voxelshape = blockstate.getCollisionShape(this.level(), blockpos); if (!voxelshape.isEmpty()) { Vec3 vec31 = this.position(); @@ -90,13 +90,13 @@ public void tick() { Vec3 pos = this.position(); Vec3 delta = pos.add(deltaMovement); - HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + HitResult hitresult = this.level().clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); if (hitresult.getType() != HitResult.Type.MISS) { delta = hitresult.getLocation(); } while(!this.isRemoved()) { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { this.tickDespawn(); } EntityHitResult entityhitresult = this.findHitEntity(pos, delta); @@ -160,7 +160,7 @@ public void tick() { @Nullable protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { - return getEntityHitResult(this.level, this, pos, delta, + return getEntityHitResult(this.level(), this, pos, delta, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), this::canHitEntity, 0.3F); } @@ -220,7 +220,7 @@ protected void defineSynchedData() { } public boolean isNoPhysics() { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { return this.noPhysics; } else { return (this.entityData.get(ID_FLAGS) & 2) != 0; @@ -234,11 +234,11 @@ protected void onHitEntity(EntityHitResult entityHitResult) { this.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y+0.5, entity.getViewVector(1).z, 0.75F, 1); } } else if (entity instanceof ElementProjectile elementProjectile) { - if (this.getOwner() != null && this.level.isClientSide) { - ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); + if (this.getOwner() != null && this.level().isClientSide) { + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), this.level()); collisionEntity.setTimeToKill(5); - level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + this.level().addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, this.level(), collisionEntity); entityEffect.start(); System.out.println("SUCCESS COLLISION!!!"); this.discard(); @@ -258,8 +258,8 @@ protected void onHitBlock(BlockHitResult blockHitResult) { protected void onHit(HitResult hitResult) { super.onHit(hitResult); - if (!this.level.isClientSide) { - this.level.broadcastEntityEvent(this, (byte)3); + if (!this.level().isClientSide) { + this.level().broadcastEntityEvent(this, (byte)3); // this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java index b63d0e35..2bf79fcf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/FireProjectile.java @@ -81,9 +81,9 @@ public void tick() { } BlockPos blockpos = this.blockPosition(); - BlockState blockstate = this.level.getBlockState(blockpos); + BlockState blockstate = this.level().getBlockState(blockpos); if (!blockstate.isAir() && !flag) { - VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + VoxelShape voxelshape = blockstate.getCollisionShape(this.level(), blockpos); if (!voxelshape.isEmpty()) { Vec3 vec31 = this.position(); @@ -101,13 +101,13 @@ public void tick() { Vec3 pos = this.position(); Vec3 delta = pos.add(deltaMovement); - HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + HitResult hitresult = this.level().clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); if (hitresult.getType() != HitResult.Type.MISS) { delta = hitresult.getLocation(); } while(!this.isRemoved()) { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { this.tickDespawn(); } EntityHitResult entityhitresult = this.findHitEntity(pos, delta); @@ -193,7 +193,7 @@ public void onFormEvent(FormActivatedEvent event) { if (event.getForm().equals(Forms.STRIKE) && this.arcActive && this.hasElement) { this.arcActive = false; this.setTimeToKill(100); - if (!this.level.isClientSide()) { + if (!this.level().isClientSide()) { this.shoot(owner.getViewVector(1).x, owner.getViewVector(1).y, owner.getViewVector(1).z, 0.75F, 1); this.discard(); } @@ -203,7 +203,7 @@ public void onFormEvent(FormActivatedEvent event) { // @Nullable // protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { -// return getEntityHitResult(this.level, this, pos, delta, +// return getEntityHitResult(this.level(), this, pos, delta, // this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), // this::canHitEntity, 0.3F); // } @@ -256,7 +256,7 @@ protected void defineSynchedData() { } public boolean isNoPhysics() { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { return this.noPhysics; } else { return (this.entityData.get(ID_FLAGS) & 2) != 0; @@ -267,7 +267,7 @@ public boolean isNoPhysics() { // if (data == 3) { // System.out.println("HANDLE ENTITY EVENT"); // for(int i = 0; i < 8; ++i) { -// this.level.addParticle(this.getParticle(), this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); +// this.level().addParticle(this.getParticle(), this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); // } // } // } @@ -282,7 +282,7 @@ protected void onHitEntity(EntityHitResult entityHitResult) { this.leftOwner = true; } } else if (entity instanceof FireProjectile fireProjectile) { - if (this.getOwner() != null && this.level.isClientSide) { + if (this.getOwner() != null && this.level().isClientSide) { if (fireProjectile.arcActive && !fireProjectile.hasElement && this.checkLeftOwner()) { // this.setOwner(elementProjectile.getOwner()); // Give control to receiver // this.setDeltaMovement(0,0,0); // Full stop @@ -292,10 +292,10 @@ protected void onHitEntity(EntityHitResult entityHitResult) { MagusNetwork.sendToServer(new FormActivatedPacket(Forms.NULL, Elements.FIRE, fireProjectile.getId())); } else { if (!this.getOwner().equals(fireProjectile.getOwner())) { - ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), this.level()); collisionEntity.setTimeToKill(5); - level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(orb_bloom, level, collisionEntity); + this.level().addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(orb_bloom, this.level(), collisionEntity); entityEffect.start(); this.discard(); fireProjectile.discard(); @@ -303,12 +303,12 @@ protected void onHitEntity(EntityHitResult entityHitResult) { } } } else if (entity instanceof WaterProjectile waterProjectile) { - if (this.getOwner() != null && this.level.isClientSide) { + if (this.getOwner() != null && this.level().isClientSide) { if (!this.getOwner().equals(waterProjectile.getOwner())) { - ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), this.level()); collisionEntity.setTimeToKill(5); - level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(steam, level, collisionEntity); + this.level().addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(steam, this.level(), collisionEntity); entityEffect.start(); this.discard(); waterProjectile.discard(); @@ -336,9 +336,7 @@ protected void onHitBlock(BlockHitResult blockHitResult) { protected void onHit(HitResult hitResult) { super.onHit(hitResult); - if (!this.level.isClientSide) { - this.level.broadcastEntityEvent(this, (byte)3); -// this.discard(); - } + if (!this.level().isClientSide) + this.level().broadcastEntityEvent(this, (byte)3); } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java index 12c04df3..e0479cac 100644 --- a/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java +++ b/src/main/java/com/amuzil/omegasource/magus/entity/projectile/WaterProjectile.java @@ -67,9 +67,9 @@ public void tick() { } BlockPos blockpos = this.blockPosition(); - BlockState blockstate = this.level.getBlockState(blockpos); + BlockState blockstate = this.level().getBlockState(blockpos); if (!blockstate.isAir() && !flag) { - VoxelShape voxelshape = blockstate.getCollisionShape(this.level, blockpos); + VoxelShape voxelshape = blockstate.getCollisionShape(this.level(), blockpos); if (!voxelshape.isEmpty()) { Vec3 vec31 = this.position(); @@ -87,13 +87,13 @@ public void tick() { Vec3 pos = this.position(); Vec3 delta = pos.add(deltaMovement); - HitResult hitresult = this.level.clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); + HitResult hitresult = this.level().clip(new ClipContext(pos, delta, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)); if (hitresult.getType() != HitResult.Type.MISS) { delta = hitresult.getLocation(); } while(!this.isRemoved()) { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { this.tickDespawn(); } EntityHitResult entityhitresult = this.findHitEntity(pos, delta); @@ -174,7 +174,7 @@ public void tick() { @Nullable protected EntityHitResult findHitEntity(Vec3 pos, Vec3 delta) { - return getEntityHitResult(this.level, this, pos, delta, + return getEntityHitResult(this.level(), this, pos, delta, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(2.0D), this::canHitEntity, 0.3F); } @@ -222,7 +222,7 @@ protected void defineSynchedData() { } public boolean isNoPhysics() { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { return this.noPhysics; } else { return (this.entityData.get(ID_FLAGS) & 2) != 0; @@ -236,11 +236,11 @@ protected void onHitEntity(EntityHitResult entityHitResult) { entity.hurt(this.damageSources().thrown(this, this.getOwner()), i); this.discard(); } else if (entity instanceof FireProjectile fireProjectile) { - if (this.getOwner() != null && this.level.isClientSide) { - ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), level); + if (this.getOwner() != null && this.level().isClientSide) { + ElementCollision collisionEntity = new ElementCollision(this.getX(), this.getY(), this.getZ(), this.level()); collisionEntity.setTimeToKill(5); - level.addFreshEntity(collisionEntity); - EntityEffect entityEffect = new EntityEffect(steam, level, collisionEntity); + this.level().addFreshEntity(collisionEntity); + EntityEffect entityEffect = new EntityEffect(steam, this.level(), collisionEntity); entityEffect.start(); this.discard(); fireProjectile.discard(); @@ -259,8 +259,8 @@ protected void onHitBlock(BlockHitResult blockHitResult) { protected void onHit(HitResult hitResult) { super.onHit(hitResult); - if (!this.level.isClientSide) { - this.level.broadcastEntityEvent(this, (byte)3); + if (!this.level().isClientSide) { + this.level().broadcastEntityEvent(this, (byte)3); // this.discard(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java index 28cbebf5..94a6e28f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/client_executed/FormActivatedPacket.java @@ -66,7 +66,7 @@ private static void handleClientSide(Form form, int entityId) { // Perform client-side particle effect or other rendering logic here Player player = Minecraft.getInstance().player; assert player != null; - ElementProjectile elementProjectile = (ElementProjectile) player.level.getEntity(entityId); + ElementProjectile elementProjectile = (ElementProjectile) player.level().getEntity(entityId); /** NOTE: Need to ensure ElementProjectile's extra constructor args are set client-side. @see ElementProjectile#ElementProjectile(EntityType, Level) This gets called first and server-side only. @@ -80,12 +80,12 @@ private static void handleClientSide(Form form, int entityId) { public static void handleServerSide(Form form, Element element, int entityId, ServerPlayer player) { // Perform server-side entity spawning and updating logic and fire Form Event here MinecraftForge.EVENT_BUS.post(new FormActivatedEvent(form, player)); - ServerLevel level = player.getLevel(); + ServerLevel level = player.serverLevel(); // TODO - Create/perform certain entity updates based on form and element // - All Skills/techniques should be determined and handled here ElementProjectile entity; if (entityId != 0) { // Update existing entity - entity = (ElementProjectile) player.level.getEntity(entityId); + entity = (ElementProjectile) player.level().getEntity(entityId); } else { // Create new entity entity = ElementProjectile.createElementEntity(form, element, player, level); } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ElementActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ElementActivatedPacket.java index 70e2de5d..105bb959 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ElementActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ElementActivatedPacket.java @@ -57,7 +57,7 @@ private static void handleClientSide(Element element) { // Server-side handler public static void handleServerSide(Element element, int entityId, ServerPlayer serverPlayer) { // Update player's active element server-side - ServerLevel level = serverPlayer.getLevel(); + ServerLevel level = serverPlayer.serverLevel(); ElementActivatedPacket packet = new ElementActivatedPacket(element, entityId); Entity entity = level.getEntity(entityId); // Retrieve the entity from the world by its ID if (entity instanceof ServerPlayer player) { // Check if the entity is a ServerPlayer diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java index 70106a1f..048a0517 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/listeners/TargetModifierListener.java @@ -54,13 +54,13 @@ public boolean shouldCollectModifierData(InputEvent.MouseButton event) { double distance = 20; //todo max distance make this configurable Vec3 vector3d2 = vector3d.add(vector3d1.x * distance, vector3d1.y * distance, vector3d1.z * distance); List> bendableMaterials = new ArrayList<>();//BendingMaterialUtil.getBendableMaterialsForElement(activeElement); - BlockHitResult hitresult = mc.player.level.clip(new ClipContext(vector3d, vector3d2, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, player)); + BlockHitResult hitresult = mc.player.level().clip(new ClipContext(vector3d, vector3d2, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, player)); if (hitresult.getType() == HitResult.Type.BLOCK) { BlockPos locationHit = hitresult.getBlockPos(); LogManager.getLogger().info("Position: " + locationHit); - BlockState hitBlockState = player.level.getBlockState(new BlockPos(locationHit)); + BlockState hitBlockState = player.level().getBlockState(new BlockPos(locationHit)); if(bendableMaterials.size() == 0 || bendableMaterials.stream().anyMatch(hitBlockState::is)) { - LogManager.getLogger().info("Blockstate: " + player.level.getBlockState(new BlockPos(locationHit))); + LogManager.getLogger().info("Blockstate: " + player.level().getBlockState(new BlockPos(locationHit))); lastTargetPosition = new Vec3(locationHit.getX(), locationHit.getY(), locationHit.getZ()); } } From f7c8ac77a177e02777e896b1583bcf0e3056b01d Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Thu, 7 Nov 2024 17:17:43 -0500 Subject: [PATCH 446/469] add resources to tests --- .../resources/assets/magus/textures/fire.png | Bin 0 -> 10601 bytes .../resources/assets/magus/textures/orbit.png | Bin 0 -> 67880 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/test/resources/assets/magus/textures/fire.png create mode 100644 src/test/resources/assets/magus/textures/orbit.png diff --git a/src/test/resources/assets/magus/textures/fire.png b/src/test/resources/assets/magus/textures/fire.png new file mode 100644 index 0000000000000000000000000000000000000000..4aa6c668659af089550f648cbb1c2665430b934a GIT binary patch literal 10601 zcmb`NX*`tQANQ|Wo3V}&vX8N6NeX2h`v{S2St3c6iil*JYeYzvkVu8HW*6DbSbk^` zNw(CC2oa`aALgF_{q%l%Ke%4!JUG|c&-uQ;pYKVsJ!{U*A;JLw0JjCv#0~%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@nwVNJgjoSZ3zz{q!mDI3aG_pfKC<0Rffsy%UujsTPq2$>AukQ%| dpUPO0pK4G}K`q%|*>5KS3)8bE)kdDN{|Dc5VXOcE literal 0 HcmV?d00001 diff --git a/src/test/resources/assets/magus/textures/orbit.png b/src/test/resources/assets/magus/textures/orbit.png new file mode 100644 index 0000000000000000000000000000000000000000..4dd50a24b6c83d7ac75d70a66b6992d0e526c7af GIT binary patch literal 67880 zcmcF~^K&Iku=Y90NpfP_+Ss-?wyljfwry@U&Kujdy&K!MZGL;d`#0PlrexB>qt^`y*XM;2(KMnw&^aDWh#xfkvq@8ilEw|1&CuItl|LhyrYK zYbkm9nEJeGT9R@f!PL~dITY_+ zVcL$OtA0Loqy+q%_;x4*sBYbrA5RA8ISyr}(E(d`qqtZ!AsmJcRG6 zYIa7pp#{)Yd!Rf2UvBI_yP=@yAzk`dy6)*m-YvN~^MLk;B_0Xt0d1f7|E>6>2)Kf9 zc+A+U0{Gzd8Ul?BpOWJo;r)^Pq5Sb{cK4n!0zkbtkRJG(u~aua@22ncpAZB+cZ=sj zp*<1tJ5&yFnmy-FKv+!pPqx_j68)!GLj6x*^Fer>qzk0AD;?>X_s+DXLlW{CX{H^i|k@wUh% z5m5E>#=$B0e-We)pzB5gZ{LgwAsTki&;>XHo`~K@=;*c)2me8SvnC=DAZ+Y`f#{zh z445I=#zuy@)aCX=jr%%x+Tk*=?oCGN1h)PIz8en|AQa{wPCS5omwMy*F3*3}ixj`7 z?2{@;>!fdjNb}#O{*t16<}JS$Bq!jr88XMqA(jsHSzz*ij?n=FMsThNp6?Q`#hl!I zf5$)d3AuEv>}kC{@c*fu`I9#Ly1EwLP@Q~v@Ur{kNnosm+4$v_`foD$o#^PFhCIXB ziQW*lMk4>g76s>QbPl!@mVKaXnn~(U-*q2%5wSc;67IDle^lHKq86X=SNF7iHTG@7 z8zFCp+CSpA?VfGZ!Z{2*Dji zm>k@8DLFIW>P7L#RT=ay0^y&~`!`q?%}|nC`B!aU0m`8Lz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ource/magus/radix/RadixTree.java | 20 ++++++--- .../skill/conditionals/ConditionEnums.java | 18 -------- .../omegasource/magus/skill/skill/Skill.java | 42 +++++++++++-------- .../magus/skill/skill/SkillActive.java | 16 ++++++- .../skill/avatar/effects/FlowEffect.java | 1 + .../magus/skill/util/data/SkillData.java | 36 +++++++++------- 6 files changed, 76 insertions(+), 57 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 797ad1ee..2d980312 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -382,9 +382,23 @@ public void setOwner(Entity entity) { this.owner = entity; } + public ConditionPath getPath() { + return this.path; + } + // Menu = radial menu or a HUD. Other activation types are self-explanatory. public enum ActivationType { - MULTIKEY, MENU, HOTKEY, VR + MENU(0), HOTKEY(1), MULTIKEY(2), VR(3); + + int priority; + + ActivationType(int priority) { + this.priority = priority; + } + + public int priority() { + return this.priority; + } } // Essentially which input module to use. @@ -392,8 +406,4 @@ public enum ActivationType { public enum InputType { KEYBOARD_MOUSE, MOUSE_MOTION, VR } - - public ConditionPath getPath() { - return this.path; - } } \ No newline at end of file diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionEnums.java b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionEnums.java index 643b42c3..abf2bcb6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionEnums.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/conditionals/ConditionEnums.java @@ -1,25 +1,7 @@ package com.amuzil.omegasource.magus.skill.conditionals; public class ConditionEnums { - /** - * 4 main types of activation. Each of these have sub-types. Again, I'll define them as an enum for now and - * consolidate for good code practice later. - */ - public enum ActivationType { - MENU, - HOTKEY, - MULTIKEY, - GESTURE - } - /** - * Simple activators take direct events/information to pass to a listener (radial menu and such). - * Complex take other activators and simple events. - */ - public enum ActivatorType { - SIMPLE, - COMPLEX - } /** * Covers a range of VR gestures for those who aren't too flexible or athletically inclined, and those diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index 0218900f..4827ad74 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -17,8 +17,11 @@ * Basic skill class. All other skills extend this. */ public abstract class Skill { - private ResourceLocation id; - private SkillCategory category; + private final ResourceLocation id; + private final SkillCategory category; + // How the skill was activated. Useful if you want different methods to influence the skill in different ways. + // For complex, game-design move combinations, see ModifierData for how to alter your skills. + protected RadixTree.ActivationType activatedType; private SkillData skillData; private RadixTree requirements; @@ -33,6 +36,20 @@ public Skill(String name, SkillCategory category) { public Skill(ResourceLocation id, SkillCategory category) { this.id = id; this.category = category; + // Menu is default + this.activatedType = RadixTree.ActivationType.MENU; + } + + public RadixTree.ActivationType getActivatedType() { + return this.activatedType; + } + + public List getActivationTypes() { + return this.skillData.getActivationTypes(); + } + + public void addActivationType(RadixTree.ActivationType type) { + this.skillData.addActivationType(type); } @@ -54,24 +71,20 @@ public List getTypes() { public void tick(LivingEntity entity, RadixTree tree) { //Run this asynchronously - if (!shouldStart(entity, tree)) - return; + if (!shouldStart(entity, tree)) return; //Remember, for some reason post only returns true upon the event being cancelled. Blame Forge. - if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Start(entity, tree, this))) - return; + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Start(entity, tree, this))) return; start(entity, tree); while (shouldRun(entity, tree)) { if (shouldStop(entity, tree)) { - if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Stop(entity, tree, this))) - break; + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Stop(entity, tree, this))) break; stop(entity, tree); } else { - if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) - break; + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) break; run(entity, tree); } } @@ -96,13 +109,6 @@ public void tick(LivingEntity entity, RadixTree tree) { * Different skill types. A skill can be multiple of one type. */ public enum SkillType { - OFFENSIVE, - DEFENSIVE, - MOBILITY, - BUFF, - UTILITY, - RANGED, - MELEE, - CONSTRUCT + OFFENSIVE, DEFENSIVE, MOBILITY, BUFF, UTILITY, RANGED, MELEE, CONSTRUCT } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index 88a2db11..e661a07b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -21,7 +21,21 @@ public HashMap> getActivationPaths @Override public boolean shouldStart(LivingEntity entity, RadixTree tree) { - return false; + boolean canStart = false; + RadixTree.ActivationType currentType = null, prevType = null; + for (RadixTree.ActivationType type : getActivationTypes()) { + if (getActivationPaths().get(type).contains(tree.getPath())) { + canStart = true; + currentType = type; + if (prevType != null && prevType.priority() > currentType.priority()) { + currentType = prevType; + } else prevType = currentType; + } + } + + // Finds the highest priority type that is valid, and goes with that. + this.activatedType = currentType; + return canStart; } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java index 62b57b75..2e0c6f26 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java @@ -15,6 +15,7 @@ public class FlowEffect extends EffectSkill { public FlowEffect(String name, SkillCategory category) { super(name, category); + addActivationType(RadixTree.ActivationType.MULTIKEY); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index df3bf9b2..9e5745f2 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -1,7 +1,9 @@ package com.amuzil.omegasource.magus.skill.util.data; +import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.conditionals.ConditionEnums; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; @@ -20,6 +22,7 @@ public class SkillData implements DataTrait { List skillTraits; + List activationTypes; // Types should not need serialisation as they do not change List skillTypes; //The reason we're using a resource location and not the actual Skill object is because @@ -30,6 +33,19 @@ public class SkillData implements DataTrait { public SkillData(ResourceLocation skillId) { this.skillId = skillId; this.skillTraits = new LinkedList<>(); + this.activationTypes = new LinkedList<>(); + } + + public List getActivationTypes() { + return this.activationTypes; + } + + public void addActivationType(RadixTree.ActivationType type) { + if (!this.activationTypes.contains(type)) + this.activationTypes.add(type); + } + public SkillData(Skill skill) { + this(skill.getId()); } public void addSkillTraits(SkillTrait... traits) { @@ -40,15 +56,10 @@ public void addSkillTraits(List traits) { this.skillTraits.addAll(traits); } - public List getSkillTypes() { return this.skillTypes; } - public SkillData(Skill skill) { - this(skill.getId()); - } - @Override public String getName() { return getSkillId() + "_skillData"; @@ -80,8 +91,7 @@ public CompoundTag serializeNBT() { CompoundTag tag = new CompoundTag(); tag.putString("Skill ID", skillId.toString()); skillTraits.forEach(skillTrait -> { - if (skillTrait.isDirty()) - tag.put(skillTrait.getName() + "Trait", skillTrait.serializeNBT()); + if (skillTrait.isDirty()) tag.put(skillTrait.getName() + "Trait", skillTrait.serializeNBT()); }); return tag; } @@ -91,11 +101,9 @@ public void deserializeNBT(CompoundTag nbt) { markClean(); try { skillId = ResourceLocation.tryParse(nbt.getString("Skill ID")); - skillTraits.forEach(skillTrait -> skillTrait.deserializeNBT - ((CompoundTag) Objects.requireNonNull(nbt.get(skillTrait.getName() + "Trait")))); + skillTraits.forEach(skillTrait -> skillTrait.deserializeNBT((CompoundTag) Objects.requireNonNull(nbt.get(skillTrait.getName() + "Trait")))); } catch (NullPointerException e) { - RadixUtil.getLogger().error("Something has gone seriously wrong:" + - "A skill trait hasn't been carried over from the registry."); + RadixUtil.getLogger().error("Something has gone seriously wrong:" + "A skill trait hasn't been carried over from the registry."); e.printStackTrace(); } } @@ -114,15 +122,13 @@ public Skill getSkill() { } public List getFilteredTraits(Predicate filter) { - return getSkillTraits().stream().filter(filter) - .collect(Collectors.toList()); + return getSkillTraits().stream().filter(filter).collect(Collectors.toList()); } @Nullable public SkillTrait getTrait(String name) { for (SkillTrait trait : getSkillTraits()) - if (trait.getName().equals(name)) - return trait; + if (trait.getName().equals(name)) return trait; return null; } From bb52d01532f5c3f7604c5354e3c210814e006996 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 8 Nov 2024 16:37:26 +1100 Subject: [PATCH 448/469] working on condition path detection --- .../com/amuzil/omegasource/magus/radix/ConditionPath.java | 7 +++++++ .../amuzil/omegasource/magus/skill/skill/SkillActive.java | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java index 2a11d125..80a2162b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java @@ -90,4 +90,11 @@ public void deserializeNBT(CompoundTag compoundTag) { } }); } + + @Override + public boolean equals(Object obj) { + // This needs to be overridden to *ignore* modifiers. It needs to only check that each condition in each path matches + // (using custom defined hashcodes/equals method for each). + return super.equals(obj); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index e661a07b..7296213f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -1,5 +1,6 @@ package com.amuzil.omegasource.magus.skill.skill; +import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; import net.minecraft.world.entity.LivingEntity; @@ -23,8 +24,10 @@ public HashMap> getActivationPaths public boolean shouldStart(LivingEntity entity, RadixTree tree) { boolean canStart = false; RadixTree.ActivationType currentType = null, prevType = null; + // Initialise paths here, to reduce memory consumption + HashMap> paths = getActivationPaths(); for (RadixTree.ActivationType type : getActivationTypes()) { - if (getActivationPaths().get(type).contains(tree.getPath())) { + if (paths.get(type).contains(tree.getPath())) { canStart = true; currentType = type; if (prevType != null && prevType.priority() > currentType.priority()) { @@ -32,7 +35,7 @@ public boolean shouldStart(LivingEntity entity, RadixTree tree) { } else prevType = currentType; } } - + // Finds the highest priority type that is valid, and goes with that. this.activatedType = currentType; return canStart; From 5f4ba1a6a55fe7250ed44158f3c7e673b9ff944d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 8 Nov 2024 22:45:57 +1100 Subject: [PATCH 449/469] added hashing for the condition path --- .../omegasource/magus/radix/ConditionPath.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java index 80a2162b..076db51c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java @@ -59,6 +59,7 @@ public CompoundTag serializeNBT() { modifierData.forEach(modifierDataInstance -> modifierDataListTag.add(modifierDataInstance.serializeNBT())); + // Have to fix this... pairTag.putString("condition", activeCondition.toString()); pairTag.put("modifiers", modifierDataListTag); listOfPairsTag.add(i, pairTag); @@ -91,10 +92,25 @@ public void deserializeNBT(CompoundTag compoundTag) { }); } + @Override + public int hashCode() { + int hash = 0; + for (Condition cond : conditions) { + hash += cond.hashCode(); + } + // Hashing involves size of the list, and then an arbitrarily large prime number; e.g 29. + hash = hash % (conditions.size() * 29); + return hash; + } + @Override public boolean equals(Object obj) { // This needs to be overridden to *ignore* modifiers. It needs to only check that each condition in each path matches // (using custom defined hashcodes/equals method for each). - return super.equals(obj); + if (!(obj instanceof ConditionPath)) + return false; + + return hashCode() == obj.hashCode() && conditions.size() == ((ConditionPath) obj).conditions.size() + && activationPath.size() == conditions.size(); } } From 77a7d1a03d2cbe83aad69e88577c054405024851 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 8 Nov 2024 23:59:13 +1100 Subject: [PATCH 450/469] serialisation and deserialisation done --- .../magus/radix/ConditionPath.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java index 076db51c..a9cba11b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.radix; -import com.amuzil.omegasource.magus.skill.forms.Form; -import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; +import com.amuzil.omegasource.magus.radix.condition.ConditionRegistry; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import com.ibm.icu.impl.Pair; @@ -27,7 +26,7 @@ public ConditionPath(List activatedConditions) { conditions = activatedConditions; activationPath = new LinkedList<>(); List emptyModifier = new ArrayList<>(); - for (Condition activatedCondition: activatedConditions) { + for (Condition activatedCondition : activatedConditions) { activationPath.add(Pair.of(activatedCondition, emptyModifier)); } } @@ -60,7 +59,7 @@ public CompoundTag serializeNBT() { modifierData.forEach(modifierDataInstance -> modifierDataListTag.add(modifierDataInstance.serializeNBT())); // Have to fix this... - pairTag.putString("condition", activeCondition.toString()); + pairTag.putInt("condition", ConditionRegistry.getID(activeCondition)); pairTag.put("modifiers", modifierDataListTag); listOfPairsTag.add(i, pairTag); } @@ -72,22 +71,25 @@ public CompoundTag serializeNBT() { @Override public void deserializeNBT(CompoundTag compoundTag) { - ListTag listOfPairsTag = (ListTag)compoundTag.get("activationPath"); + ListTag listOfPairsTag = (ListTag) compoundTag.get("activationPath"); activationPath = new LinkedList<>(); + if (listOfPairsTag == null) + return; listOfPairsTag.forEach(pairTag -> { // Need to figure out how to convert this into conditions. // Going to go over capability data to check for every active listener and use those in the path. - if(pairTag instanceof CompoundTag pairTagCompound) { - Pair> stepPair; - Form formActivated = FormDataRegistry.getFormByName(pairTagCompound.getString("form")); - ListTag modifiersListTag = (ListTag)pairTagCompound.get("modifiers"); + if (pairTag instanceof CompoundTag pairTagCompound) { + Pair> stepPair; + Condition condition = ConditionRegistry.getCondition(((CompoundTag) pairTag).getInt("condition")); + ListTag modifiersListTag = (ListTag) pairTagCompound.get("modifiers"); List modifierData = new ArrayList<>(); + // Only add modifier data if it's not null + if (modifiersListTag != null) + modifiersListTag.forEach(tag -> modifierData.add(ModifiersRegistry.fromCompoundTag(compoundTag))); - modifiersListTag.forEach(tag -> modifierData.add(ModifiersRegistry.fromCompoundTag(compoundTag))); - - stepPair = Pair.of(formActivated, modifierData); -// activationPath.add(stepPair); + stepPair = Pair.of(condition, modifierData); + activationPath.add(stepPair); } }); } From 460594e50decf732662881c428a88d4fc591f4da Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 9 Nov 2024 01:26:33 +1100 Subject: [PATCH 451/469] skills are now executed per tick, theoretically --- .../omegasource/magus/radix/RadixTree.java | 2 +- .../magus/registry/Registries.java | 55 +++++++++---------- .../magus/skill/skill/SkillActive.java | 4 +- .../skill/util/capability/entity/Magi.java | 7 +++ .../magus/skill/util/data/SkillData.java | 20 +++++-- 5 files changed, 53 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 2d980312..60db99e8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -390,7 +390,7 @@ public ConditionPath getPath() { public enum ActivationType { MENU(0), HOTKEY(1), MULTIKEY(2), VR(3); - int priority; + final int priority; ActivationType(int priority) { this.priority = priority; diff --git a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java index 9017adc3..6389eccd 100644 --- a/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java +++ b/src/main/java/com/amuzil/omegasource/magus/registry/Registries.java @@ -28,22 +28,19 @@ @Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class Registries { + // SKILLS + // this is a placeholder skill for testing purposes. + public static final Skill FIREBALL = new SkillActive("fireball", null); public static Supplier> DATA_TRAITS; public static Supplier> SKILL_CATEGORIES; public static Supplier> SKILLS; public static Supplier> FORMS; - - public static List traits = new ArrayList<>(); public static List categories = new ArrayList<>(); public static List skills = new ArrayList<>(); public static List forms = new ArrayList<>(); public static List conditions = new ArrayList<>(); - // SKILLS - // this is a placeholder skill for testing purposes. - public static final Skill FIREBALL = new SkillActive("fireball", null); - public static void init() { } @@ -71,6 +68,10 @@ public static void registerSkills(List registrySkills) { skills.addAll(registrySkills); } + public static List getSkills() { + return skills; + } + public static void registerSkill(Skill registrySkill) { skills.add(registrySkill); } @@ -130,23 +131,6 @@ public static void onRegistryRegister(NewRegistryEvent event) { //What to do in the case of missing registry entries for each type of registry. - @Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) - public static class ForgeRegistries { - @SubscribeEvent - public static void onMissing(MissingMappingsEvent event) { - //Data Traits - - //Skill Categories - - //Skills - - //Forms - - //Modifiers - } - } - - @SubscribeEvent public static void gameRegistry(RegisterEvent event) { Elements.init(); @@ -209,14 +193,12 @@ public static void gameRegistry(RegisterEvent event) { * @param event Registry event. * @param modID ModID. */ - public static void registerTraitsFromSkills(List skills, RegisterEvent event, - String modID) { + public static void registerTraitsFromSkills(List skills, RegisterEvent event, String modID) { ResourceKey> key = DATA_TRAITS.get().getRegistryKey(); IForgeRegistry registry = DATA_TRAITS.get(); for (Skill skill : skills) for (SkillTrait trait : skill.getTraits()) - event.register(key, helper -> - registry.register(new ResourceLocation(modID) + trait.getName(), trait)); + event.register(key, helper -> registry.register(new ResourceLocation(modID) + trait.getName(), trait)); } @@ -232,8 +214,23 @@ public static void registerTraitsFromSkills(List skills, RegisterEvent ev IForgeRegistry registry = DATA_TRAITS.get(); for (Skill skill : skills) for (SkillTrait trait : skill.getTraits()) - event.register(key, helper -> - registry.register(trait.getName(), trait)); + event.register(key, helper -> registry.register(trait.getName(), trait)); + + } + + @Mod.EventBusSubscriber(modid = Magus.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) + public static class ForgeRegistries { + @SubscribeEvent + public static void onMissing(MissingMappingsEvent event) { + //Data Traits + //Skill Categories + + //Skills + + //Forms + + //Modifiers + } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index 7296213f..ec2c212a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.magus.skill.skill; -import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; import net.minecraft.world.entity.LivingEntity; @@ -24,6 +23,9 @@ public HashMap> getActivationPaths public boolean shouldStart(LivingEntity entity, RadixTree tree) { boolean canStart = false; RadixTree.ActivationType currentType = null, prevType = null; + if (getActivationPaths() == null || tree == null || tree.getPath() == null) + return false; + // Initialise paths here, to reduce memory consumption HashMap> paths = getActivationPaths(); for (RadixTree.ActivationType type : getActivationTypes()) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index c18c8698..ada7637d 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import com.amuzil.omegasource.magus.skill.util.data.SkillCategoryData; @@ -81,6 +82,12 @@ public SkillData getSkillData(String id) { // Called per tick public void onUpdate() { + List skills = Registries.getSkills(); + for (Skill skill : skills) { + if (getSkillData(skill).canUse()) { + skill.tick(getMagi(), getTree()); + } + } } public void onDeath() { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index 9e5745f2..5e549c22 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -3,7 +3,6 @@ import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.registry.Registries; -import com.amuzil.omegasource.magus.skill.conditionals.ConditionEnums; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.traits.DataTrait; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; @@ -28,12 +27,27 @@ public class SkillData implements DataTrait { //The reason we're using a resource location and not the actual Skill object is because //it's much easier to serialise a String and then get a skill from it. ResourceLocation skillId; + private boolean canUse; private boolean isDirty = false; public SkillData(ResourceLocation skillId) { this.skillId = skillId; this.skillTraits = new LinkedList<>(); this.activationTypes = new LinkedList<>(); + this.canUse = false; + } + + public SkillData(Skill skill) { + this(skill.getId()); + } + + public void setCanUse(boolean canUse) { + this.canUse = canUse; + markDirty(); + } + + public boolean canUse() { + return this.canUse; } public List getActivationTypes() { @@ -43,9 +57,7 @@ public List getActivationTypes() { public void addActivationType(RadixTree.ActivationType type) { if (!this.activationTypes.contains(type)) this.activationTypes.add(type); - } - public SkillData(Skill skill) { - this(skill.getId()); + markDirty(); } public void addSkillTraits(SkillTrait... traits) { From c80e33352719debbbaaf224e1877b0d9676ff2bc Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Fri, 8 Nov 2024 11:48:08 -0500 Subject: [PATCH 452/469] stable photon version --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6cfdf0ed..c8ccc8f1 100644 --- a/build.gradle +++ b/build.gradle @@ -136,8 +136,8 @@ dependencies { // If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"], // then special handling is done to allow a setup of a vanilla dependency without the use of an external repository. minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" - implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.20.1:1.0.7.b") { transitive = false } - implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.20.1:1.0.32.a") { transitive = false } + implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.20.1:1.0.6") { transitive = false } + implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.20.1:1.0.30.c") { transitive = false } testImplementation(platform('org.junit:junit-bom:5.10.3')) testImplementation('org.junit.jupiter:junit-jupiter') // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings From 172b04e53592854d9eeafd6ebbb82885d79f2525 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 9 Nov 2024 04:08:02 +1100 Subject: [PATCH 453/469] just showing examples --- .../magus/radix/ConditionPath.java | 60 ++++++++++++------- .../radix/condition/ConditionRegistry.java | 2 +- .../modifiers/data/DirectionModifierData.java | 3 - .../omegasource/magus/skill/skill/Skill.java | 47 +++++++++++---- .../magus/skill/skill/SkillActive.java | 15 +++-- .../skill/avatar/effects/FlowEffect.java | 36 ++++++++++- .../skill/util/capability/entity/Magi.java | 11 ++-- .../magus/skill/util/data/SkillData.java | 22 ++----- .../util/traits/skilltraits/TimedTrait.java | 2 +- .../util/traits/skilltraits/UseTrait.java | 10 ++++ 10 files changed, 139 insertions(+), 69 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/UseTrait.java diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java index a9cba11b..bf933979 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java @@ -8,32 +8,52 @@ import net.minecraft.nbt.ListTag; import net.minecraftforge.common.util.INBTSerializable; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; +import java.util.*; public class ConditionPath implements INBTSerializable { - public LinkedList>> activationPath; + public HashMap> activationPath; public List conditions; + private boolean isDirty; public ConditionPath() { - activationPath = new LinkedList<>(); + activationPath = new HashMap<>(); conditions = new LinkedList<>(); + markDirty(); } public ConditionPath(List activatedConditions) { conditions = activatedConditions; - activationPath = new LinkedList<>(); + activationPath = new HashMap<>(); List emptyModifier = new ArrayList<>(); for (Condition activatedCondition : activatedConditions) { - activationPath.add(Pair.of(activatedCondition, emptyModifier)); + activationPath.put(activatedCondition, emptyModifier); } + markDirty(); + } + + public void markDirty() { + this.isDirty = true; + } + + public void markClean() { + this.isDirty = false; + } + + public boolean isDirty() { + return this.isDirty; } public void addStep(Condition activatedCondition, List modifierData) { conditions.add(activatedCondition); - activationPath.add(Pair.of(activatedCondition, modifierData)); + activationPath.put(activatedCondition, modifierData); + markDirty(); + } + + // Remember that modifier data goes up to the currently active node. So, a lot of Effects + // will only check their first condition for the right modifier data. + public List getModifiers(Condition condition) { + return activationPath.getOrDefault(condition, new ArrayList<>()); } @Override @@ -48,10 +68,10 @@ public CompoundTag serializeNBT() { ListTag listOfPairsTag = new ListTag(); CompoundTag pairTag; - for (int i = 0; i < activationPath.size(); i++) { - Pair> conditionListPair = activationPath.get(i); - Condition activeCondition = conditionListPair.first; - List modifierData = conditionListPair.second; + int i = 0; + for (Map.Entry> pathEntry : activationPath.entrySet()) { + Condition activeCondition = pathEntry.getKey(); + List modifierData = pathEntry.getValue(); pairTag = new CompoundTag(); ListTag modifierDataListTag = new ListTag(); @@ -62,6 +82,7 @@ public CompoundTag serializeNBT() { pairTag.putInt("condition", ConditionRegistry.getID(activeCondition)); pairTag.put("modifiers", modifierDataListTag); listOfPairsTag.add(i, pairTag); + i++; } compoundTag.put("activationPath", listOfPairsTag); @@ -72,9 +93,8 @@ public CompoundTag serializeNBT() { @Override public void deserializeNBT(CompoundTag compoundTag) { ListTag listOfPairsTag = (ListTag) compoundTag.get("activationPath"); - activationPath = new LinkedList<>(); - if (listOfPairsTag == null) - return; + activationPath = new HashMap<>(); + if (listOfPairsTag == null) return; listOfPairsTag.forEach(pairTag -> { // Need to figure out how to convert this into conditions. // Going to go over capability data to check for every active listener and use those in the path. @@ -88,10 +108,10 @@ public void deserializeNBT(CompoundTag compoundTag) { if (modifiersListTag != null) modifiersListTag.forEach(tag -> modifierData.add(ModifiersRegistry.fromCompoundTag(compoundTag))); - stepPair = Pair.of(condition, modifierData); - activationPath.add(stepPair); + activationPath.put(condition, modifierData); } }); + markClean(); } @Override @@ -109,10 +129,8 @@ public int hashCode() { public boolean equals(Object obj) { // This needs to be overridden to *ignore* modifiers. It needs to only check that each condition in each path matches // (using custom defined hashcodes/equals method for each). - if (!(obj instanceof ConditionPath)) - return false; + if (!(obj instanceof ConditionPath)) return false; - return hashCode() == obj.hashCode() && conditions.size() == ((ConditionPath) obj).conditions.size() - && activationPath.size() == conditions.size(); + return hashCode() == obj.hashCode() && conditions.size() == ((ConditionPath) obj).conditions.size() && activationPath.size() == conditions.size(); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java index 141ce830..24e70bf6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/condition/ConditionRegistry.java @@ -8,7 +8,7 @@ import java.util.*; -public class ConditionRegistry { +public class ConditionRegistry { // Id, Condition. Stuff is put into this map when registering. private static final HashMap conditions = new HashMap<>(); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java index 37f6d5f3..ba47ccfe 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/modifiers/data/DirectionModifierData.java @@ -2,16 +2,13 @@ import com.amuzil.omegasource.magus.skill.modifiers.api.BaseModifierData; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; -import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.StringTag; import org.apache.logging.log4j.LogManager; import java.util.ArrayList; -import java.util.LinkedList; import java.util.List; -import java.util.stream.Collectors; public class DirectionModifierData extends BaseModifierData { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index 4827ad74..ec9a2d2f 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -1,16 +1,19 @@ package com.amuzil.omegasource.magus.skill.skill; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.skill.event.SkillTickEvent; -import com.amuzil.omegasource.magus.skill.util.data.SkillData; import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; +import com.amuzil.omegasource.magus.skill.util.traits.skilltraits.UseTrait; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.LivingEntity; import net.minecraftforge.common.MinecraftForge; +import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; /** @@ -19,11 +22,12 @@ public abstract class Skill { private final ResourceLocation id; private final SkillCategory category; + private final List activationTypes; + private final List skillTypes; + private final List skillTraits; // How the skill was activated. Useful if you want different methods to influence the skill in different ways. // For complex, game-design move combinations, see ModifierData for how to alter your skills. protected RadixTree.ActivationType activatedType; - private SkillData skillData; - private RadixTree requirements; public Skill(String modID, String name, SkillCategory category) { this(new ResourceLocation(modID, name), category); @@ -38,6 +42,20 @@ public Skill(ResourceLocation id, SkillCategory category) { this.category = category; // Menu is default this.activatedType = RadixTree.ActivationType.MENU; + this.skillTypes = new LinkedList<>(); + this.skillTraits = new LinkedList<>(); + this.activationTypes = new LinkedList<>(); + + // Maybe static instances of traits rather then new instances per Skill? Unsure + addTrait(new UseTrait("use_skill", false)); + } + + public void addTrait(SkillTrait trait) { + this.skillTraits.add(trait); + } + + public void addType(SkillType type) { + this.skillTypes.add(type); } public RadixTree.ActivationType getActivatedType() { @@ -45,14 +63,13 @@ public RadixTree.ActivationType getActivatedType() { } public List getActivationTypes() { - return this.skillData.getActivationTypes(); + return this.activationTypes; } public void addActivationType(RadixTree.ActivationType type) { - this.skillData.addActivationType(type); + this.activationTypes.add(type); } - public SkillCategory getCategory() { return category; } @@ -62,35 +79,41 @@ public ResourceLocation getId() { } public List getTraits() { - return this.skillData.getSkillTraits(); + return this.skillTraits; } public List getTypes() { - return this.skillData.getSkillTypes(); + return this.skillTypes; } + // Fix this because this will not work lmao public void tick(LivingEntity entity, RadixTree tree) { //Run this asynchronously if (!shouldStart(entity, tree)) return; - //Remember, for some reason post only returns true upon the event being cancelled. Blame Forge. + // Remember, for some reason post only returns true upon the event being cancelled. Blame Forge. if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Start(entity, tree, this))) return; start(entity, tree); while (shouldRun(entity, tree)) { + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) break; + run(entity, tree); + if (shouldStop(entity, tree)) { if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Stop(entity, tree, this))) break; stop(entity, tree); - } else { - if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) break; - run(entity, tree); } } } + public List getMultikeyConditions() { + if (!getActivationTypes().contains(RadixTree.ActivationType.MULTIKEY)) + return new ArrayList<>(); + return getActivationPaths().getOrDefault(RadixTree.ActivationType.MULTIKEY, new LinkedList<>()).get(0).conditions; + } public abstract HashMap> getActivationPaths(); public abstract boolean shouldStart(LivingEntity entity, RadixTree tree); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index ec2c212a..c6229bdf 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -29,12 +29,15 @@ public boolean shouldStart(LivingEntity entity, RadixTree tree) { // Initialise paths here, to reduce memory consumption HashMap> paths = getActivationPaths(); for (RadixTree.ActivationType type : getActivationTypes()) { - if (paths.get(type).contains(tree.getPath())) { - canStart = true; - currentType = type; - if (prevType != null && prevType.priority() > currentType.priority()) { - currentType = prevType; - } else prevType = currentType; + // Needs to be changed to a search + for (ConditionPath conditions : paths.get(type)) { + if (tree.search(conditions.conditions) != null) { + canStart = true; + currentType = type; + if (prevType != null && prevType.priority() > currentType.priority()) { + currentType = prevType; + } else prevType = currentType; + } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java index 2e0c6f26..18b42f25 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java @@ -1,13 +1,16 @@ package com.amuzil.omegasource.magus.skill.skill.avatar.effects; +import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.radix.builders.SkillPathBuilder; import com.amuzil.omegasource.magus.skill.forms.Forms; +import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; +import com.amuzil.omegasource.magus.skill.modifiers.data.MouseGestureModifierData; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; import com.amuzil.omegasource.magus.skill.skill.avatar.EffectSkill; +import net.minecraft.world.entity.LivingEntity; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -21,6 +24,35 @@ public FlowEffect(String name, SkillCategory category) { @Override public HashMap> getActivationPaths() { // We're only testing multikey right now. Otherwise, we'd need to build for every distinct type. - return SkillPathBuilder.getInstance().type(RadixTree.ActivationType.MULTIKEY).path(SkillPathBuilder.toCondition(Forms.ARC)).finalisePath().build(); + return SkillPathBuilder.getInstance() + // Types it + .type(RadixTree.ActivationType.MULTIKEY) + // Constructs path based on given Forms/Conditions + .path(SkillPathBuilder.toCondition(Forms.ARC)) + // Adds the path to the finalised ConditionPath list + .finalisePath() + // Builds it + .build(); + } + + @Override + public void start(LivingEntity entity, RadixTree tree) { + // In case of avatar, we only care about initial path. + List conditions = getMultikeyConditions(); + List data = tree.getPath().getModifiers(conditions.get(0)); + + super.start(entity, tree); + } + + @Override + public boolean shouldRun(LivingEntity entity, RadixTree tree) { + // return modifier.held > 0 + return super.shouldRun(entity, tree); + } + + @Override + public void run(LivingEntity entity, RadixTree tree) { + // adjust player prepared chi (getModifierData()) + super.run(entity, tree); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index ada7637d..885e9c06 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -22,7 +22,7 @@ public class Magi { private final Data capabilityData; private List skillData; private List skillCategoryData; - private LivingEntity magi; + private final LivingEntity magi; public Magi(Data capabilityData, LivingEntity entity) { this.capabilityData = capabilityData; @@ -39,6 +39,10 @@ public static Magi get(LivingEntity entity) { return cap.getMagi(entity); } + public static boolean isEntitySupported(Entity entity) { + return entity instanceof LivingEntity; + } + public LivingDataCapability.LivingDataCapabilityImp getMagusData() { return (LivingDataCapability.LivingDataCapabilityImp) capabilityData; } @@ -47,6 +51,7 @@ public LivingDataCapability.LivingDataCapabilityImp getMagusData() { public boolean isDirty() { return false; } + public RadixTree getTree() { return capabilityData.getTree(); } @@ -62,10 +67,6 @@ public List getSkillTraits(Skill skill) { return getSkillData(skill).getSkillTraits(); } - public static boolean isEntitySupported(Entity entity) { - return entity instanceof LivingEntity; - } - // Returns appropriate SkillData from a list of SkillData public SkillData getSkillData(Skill skill) { return getSkillData(skill.getId()); diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index 5e549c22..8e2c3f8b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -21,9 +21,7 @@ public class SkillData implements DataTrait { List skillTraits; - List activationTypes; // Types should not need serialisation as they do not change - List skillTypes; //The reason we're using a resource location and not the actual Skill object is because //it's much easier to serialise a String and then get a skill from it. ResourceLocation skillId; @@ -33,8 +31,9 @@ public class SkillData implements DataTrait { public SkillData(ResourceLocation skillId) { this.skillId = skillId; this.skillTraits = new LinkedList<>(); - this.activationTypes = new LinkedList<>(); this.canUse = false; + + skillTraits = getSkill().getTraits(); } public SkillData(Skill skill) { @@ -51,25 +50,12 @@ public boolean canUse() { } public List getActivationTypes() { - return this.activationTypes; - } - - public void addActivationType(RadixTree.ActivationType type) { - if (!this.activationTypes.contains(type)) - this.activationTypes.add(type); - markDirty(); + return this.getSkill().getActivationTypes(); } - public void addSkillTraits(SkillTrait... traits) { - this.skillTraits.addAll(List.of(traits)); - } - - public void addSkillTraits(List traits) { - this.skillTraits.addAll(traits); - } public List getSkillTypes() { - return this.skillTypes; + return this.getSkill().getTypes(); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java index 34f0876e..268bf99a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/TimedTrait.java @@ -5,7 +5,7 @@ /** * The most generic trait of all time. Works for: - * -Fire time, charging, lifetime, potion duration, e.t.c. + * Fire time, charging, lifetime, potion duration, e.t.c. */ public class TimedTrait extends SkillTrait { private int time; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/UseTrait.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/UseTrait.java new file mode 100644 index 00000000..89829588 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/traits/skilltraits/UseTrait.java @@ -0,0 +1,10 @@ +package com.amuzil.omegasource.magus.skill.util.traits.skilltraits; + +import com.amuzil.omegasource.magus.skill.util.traits.SkillTrait; + +public class UseTrait extends BooleanTrait { + + public UseTrait(String name, boolean enabled) { + super(name, enabled); + } +} From 6a0eb94a595946ef075e3fab890fd66294b97b19 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 9 Nov 2024 04:14:19 +1100 Subject: [PATCH 454/469] major logic improvements --- .../omegasource/magus/skill/skill/Skill.java | 34 ++++++++++++------- .../magus/skill/skill/SkillActive.java | 12 +++---- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index ec9a2d2f..36cadac8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -28,6 +28,7 @@ public abstract class Skill { // How the skill was activated. Useful if you want different methods to influence the skill in different ways. // For complex, game-design move combinations, see ModifierData for how to alter your skills. protected RadixTree.ActivationType activatedType; + protected SkillState state; public Skill(String modID, String name, SkillCategory category) { this(new ResourceLocation(modID, name), category); @@ -35,6 +36,7 @@ public Skill(String modID, String name, SkillCategory category) { public Skill(String name, SkillCategory category) { this(Magus.MOD_ID, name, category); + this.state = SkillState.START; } public Skill(ResourceLocation id, SkillCategory category) { @@ -89,31 +91,31 @@ public List getTypes() { // Fix this because this will not work lmao public void tick(LivingEntity entity, RadixTree tree) { //Run this asynchronously - if (!shouldStart(entity, tree)) return; + // Remember, for some reason post only returns true upon the event being cancelled. Blame Forge. - if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Start(entity, tree, this))) return; - start(entity, tree); - while (shouldRun(entity, tree)) { - if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) break; - run(entity, tree); + if (shouldStart(entity, tree)) { + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Start(entity, tree, this))) return; + start(entity, tree); + } else return; - if (shouldStop(entity, tree)) { - if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Stop(entity, tree, this))) break; - stop(entity, tree); + if (shouldRun(entity, tree)) { + if (!MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) run(entity, tree); + + if (shouldStop(entity, tree)) { + if (!MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Stop(entity, tree, this))) stop(entity, tree); } } } - public List getMultikeyConditions() { - if (!getActivationTypes().contains(RadixTree.ActivationType.MULTIKEY)) - return new ArrayList<>(); + if (!getActivationTypes().contains(RadixTree.ActivationType.MULTIKEY)) return new ArrayList<>(); return getActivationPaths().getOrDefault(RadixTree.ActivationType.MULTIKEY, new LinkedList<>()).get(0).conditions; } + public abstract HashMap> getActivationPaths(); public abstract boolean shouldStart(LivingEntity entity, RadixTree tree); @@ -128,6 +130,14 @@ public List getMultikeyConditions() { public abstract void stop(LivingEntity entity, RadixTree tree); + // Resets the skill and any necessary skill data; should be called upon stopping execution. + public abstract void reset(LivingEntity entity, RadixTree tree); + + + protected enum SkillState { + START, RUN, STOP + } + /** * Different skill types. A skill can be multiple of one type. */ diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index c6229bdf..a15389c0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -43,32 +43,32 @@ public boolean shouldStart(LivingEntity entity, RadixTree tree) { // Finds the highest priority type that is valid, and goes with that. this.activatedType = currentType; - return canStart; + return canStart && state == SkillState.START; } @Override public boolean shouldRun(LivingEntity entity, RadixTree tree) { - return false; + return state == SkillState.RUN; } @Override public boolean shouldStop(LivingEntity entity, RadixTree tree) { - return false; + return state == SkillState.STOP; } @Override public void start(LivingEntity entity, RadixTree tree) { - + this.state = SkillState.RUN; } @Override public void run(LivingEntity entity, RadixTree tree) { - + this.state = SkillState.STOP; } @Override public void stop(LivingEntity entity, RadixTree tree) { - + this.state = SkillState.START; } //Need to account for the different types as worked out by Maht and I (FavouriteDragon). From d18b243e5031a92f9a76042553f3353f02d653c0 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 9 Nov 2024 13:40:43 +1100 Subject: [PATCH 455/469] woops --- .../amuzil/omegasource/magus/skill/skill/SkillActive.java | 5 +++++ .../amuzil/omegasource/magus/skill/skill/SkillStance.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index a15389c0..c8ba1fce 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -71,6 +71,11 @@ public void stop(LivingEntity entity, RadixTree tree) { this.state = SkillState.START; } + @Override + public void reset(LivingEntity entity, RadixTree tree) { + + } + //Need to account for the different types as worked out by Maht and I (FavouriteDragon). public boolean execute() { return false; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java index b963b2a2..3bf02192 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java @@ -55,4 +55,9 @@ public void run(LivingEntity entity, RadixTree tree) { public void stop(LivingEntity entity, RadixTree tree) { } + + @Override + public void reset(LivingEntity entity, RadixTree tree) { + + } } From e14fb5819b247ab15e79a49a9357585e3045672a Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 11 Nov 2024 19:04:19 -0500 Subject: [PATCH 456/469] more stable photon version... --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c8ccc8f1..80fce176 100644 --- a/build.gradle +++ b/build.gradle @@ -136,8 +136,8 @@ dependencies { // If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"], // then special handling is done to allow a setup of a vanilla dependency without the use of an external repository. minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" - implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.20.1:1.0.6") { transitive = false } - implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.20.1:1.0.30.c") { transitive = false } + implementation fg.deobf("com.lowdragmc.photon:photon-forge-1.20.1:1.0.7.a") { transitive = false } + implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.20.1:1.0.21.a") { transitive = false } testImplementation(platform('org.junit:junit-bom:5.10.3')) testImplementation('org.junit.jupiter:junit-jupiter') // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings From 7611e7c9baccbdefe0eb2c520d61819c581bf8e9 Mon Sep 17 00:00:00 2001 From: Jake Morfe Date: Mon, 11 Nov 2024 19:15:33 -0500 Subject: [PATCH 457/469] implement reloadFX method --- .../amuzil/omegasource/magus/input/KeyBindings.java | 2 ++ .../magus/skill/test/avatar/AvatarFormRegistry.java | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java index f57fc411..860e18df 100644 --- a/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java +++ b/src/main/java/com/amuzil/omegasource/magus/input/KeyBindings.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.input; import com.amuzil.omegasource.magus.Magus; +import com.amuzil.omegasource.magus.skill.test.avatar.AvatarFormRegistry; import net.minecraft.client.KeyMapping; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.InputEvent; @@ -27,6 +28,7 @@ public static void keyBindPress(InputEvent.Key press) { if (press.getKey() == keyToggleTree.getKey().getValue()) { if (press.getAction() == GLFW.GLFW_RELEASE) { Magus.keyboardMouseInputModule.toggleListeners(); + AvatarFormRegistry.reloadFX(); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java index 0669c944..1041f382 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/test/avatar/AvatarFormRegistry.java @@ -94,4 +94,15 @@ public static void registerForms() { // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, forwards), Forms.COMPRESS); // FormDataRegistry.registerForm(InputDataBuilder.toInputs(sneak, back), Forms.EXPAND); } + + public static void reloadFX() { + fire_bloom = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "fire_bloom")); + fire_bloom_perma = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "fire_bloom_perma")); + blue_fire = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "blue_fire")); + blue_fire_perma = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "blue_fire_perma")); + orb_bloom = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "orb_bloom")); + water = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "water")); + steam = FXHelper.getFX(new ResourceLocation(Magus.MOD_ID, "steam")); + } + } From aa342cda5a9d51a661e27c4e17cf60d52feb4e60 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Thu, 14 Nov 2024 15:21:35 +1100 Subject: [PATCH 458/469] logic updates; moved state to SkillData --- .../omegasource/magus/skill/skill/Skill.java | 4 +- .../magus/skill/skill/SkillActive.java | 39 ++++++++++++++++--- .../magus/skill/skill/SkillStance.java | 2 +- .../magus/skill/util/data/SkillData.java | 10 +++++ 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index 36cadac8..e11f43fb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -28,7 +28,6 @@ public abstract class Skill { // How the skill was activated. Useful if you want different methods to influence the skill in different ways. // For complex, game-design move combinations, see ModifierData for how to alter your skills. protected RadixTree.ActivationType activatedType; - protected SkillState state; public Skill(String modID, String name, SkillCategory category) { this(new ResourceLocation(modID, name), category); @@ -36,7 +35,6 @@ public Skill(String modID, String name, SkillCategory category) { public Skill(String name, SkillCategory category) { this(Magus.MOD_ID, name, category); - this.state = SkillState.START; } public Skill(ResourceLocation id, SkillCategory category) { @@ -134,7 +132,7 @@ public List getMultikeyConditions() { public abstract void reset(LivingEntity entity, RadixTree tree); - protected enum SkillState { + public enum SkillState { START, RUN, STOP } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java index c8ba1fce..f80465d6 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillActive.java @@ -2,6 +2,8 @@ import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.skill.util.capability.entity.Magi; +import com.amuzil.omegasource.magus.skill.util.data.SkillData; import net.minecraft.world.entity.LivingEntity; import java.util.HashMap; @@ -26,6 +28,8 @@ public boolean shouldStart(LivingEntity entity, RadixTree tree) { if (getActivationPaths() == null || tree == null || tree.getPath() == null) return false; + + // Initialise paths here, to reduce memory consumption HashMap> paths = getActivationPaths(); for (RadixTree.ActivationType type : getActivationTypes()) { @@ -41,34 +45,57 @@ public boolean shouldStart(LivingEntity entity, RadixTree tree) { } } + Magi magi = Magi.get(entity); + if (magi != null) { + canStart &= magi.getSkillData(this).getState() == SkillState.START; + } + else canStart = false; + // Finds the highest priority type that is valid, and goes with that. this.activatedType = currentType; - return canStart && state == SkillState.START; + return canStart; } @Override public boolean shouldRun(LivingEntity entity, RadixTree tree) { - return state == SkillState.RUN; + SkillData data; + Magi magi = Magi.get(entity); + if (magi != null) { + data = magi.getSkillData(this); + return data.getState() == SkillState.RUN; + } + return false; } @Override public boolean shouldStop(LivingEntity entity, RadixTree tree) { - return state == SkillState.STOP; + SkillData data; + Magi magi = Magi.get(entity); + if (magi != null) { + data = magi.getSkillData(this); + return data.getState() == SkillState.STOP; + } + return false; } @Override public void start(LivingEntity entity, RadixTree tree) { - this.state = SkillState.RUN; + SkillData data; + Magi magi = Magi.get(entity); + if (magi != null) { + data = magi.getSkillData(this); + data.setState(SkillState.RUN); + } } @Override public void run(LivingEntity entity, RadixTree tree) { - this.state = SkillState.STOP; + } @Override public void stop(LivingEntity entity, RadixTree tree) { - this.state = SkillState.START; + } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java index 3bf02192..6abb819c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/SkillStance.java @@ -58,6 +58,6 @@ public void stop(LivingEntity entity, RadixTree tree) { @Override public void reset(LivingEntity entity, RadixTree tree) { - + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index 8e2c3f8b..39e421e3 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -27,12 +27,14 @@ public class SkillData implements DataTrait { ResourceLocation skillId; private boolean canUse; private boolean isDirty = false; + private Skill.SkillState state; public SkillData(ResourceLocation skillId) { this.skillId = skillId; this.skillTraits = new LinkedList<>(); this.canUse = false; + this.state = Skill.SkillState.START; skillTraits = getSkill().getTraits(); } @@ -45,6 +47,14 @@ public void setCanUse(boolean canUse) { markDirty(); } + public Skill.SkillState getState() { + return this.state; + } + + public void setState(Skill.SkillState state) { + this.state = state; + markDirty(); + } public boolean canUse() { return this.canUse; } From 6a3341cd35d504c50284a8bd32833916cd21e1d5 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sat, 16 Nov 2024 19:08:21 +1100 Subject: [PATCH 459/469] some datasaving and skill testing --- .../com/amuzil/omegasource/magus/Magus.java | 2 ++ .../omegasource/magus/skill/skill/Skills.java | 20 +++++++++++++++++ .../magus/skill/skill/avatar/EffectSkill.java | 16 +------------- .../skill/avatar/effects/FlowEffect.java | 3 +++ .../skill/util/capability/entity/Magi.java | 22 ++++++++++++++++--- .../magus/skill/util/data/SkillData.java | 6 ++++- 6 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 src/main/java/com/amuzil/omegasource/magus/skill/skill/Skills.java diff --git a/src/main/java/com/amuzil/omegasource/magus/Magus.java b/src/main/java/com/amuzil/omegasource/magus/Magus.java index c3707aaf..0aefc573 100644 --- a/src/main/java/com/amuzil/omegasource/magus/Magus.java +++ b/src/main/java/com/amuzil/omegasource/magus/Magus.java @@ -8,6 +8,7 @@ import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.forms.FormDataRegistry; import com.amuzil.omegasource.magus.skill.modifiers.ModifiersRegistry; +import com.amuzil.omegasource.magus.skill.skill.Skills; import com.amuzil.omegasource.magus.skill.test.avatar.AvatarCommand; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; import net.minecraft.client.Minecraft; @@ -73,6 +74,7 @@ private void setup(final FMLCommonSetupEvent event) { CapabilityHandler.initialiseCaps(); MagusNetwork.registerMessages(); ModifiersRegistry.init(); + Skills.registerSkills(); } private void doClientStuff(final FMLClientSetupEvent event) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skills.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skills.java new file mode 100644 index 00000000..ce33aaf2 --- /dev/null +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skills.java @@ -0,0 +1,20 @@ +package com.amuzil.omegasource.magus.skill.skill; + +import com.amuzil.omegasource.magus.registry.Registries; +import com.amuzil.omegasource.magus.skill.elements.Elements; +import com.amuzil.omegasource.magus.skill.skill.avatar.effects.FlowEffect; + +import java.util.ArrayList; +import java.util.List; + +public class Skills { + public static void registerSkills() { + List skills = new ArrayList<>(); + + // TODO: Move registration into skill categories + skills.add(new FlowEffect("air_flow", Elements.AIR)); + + + Registries.registerSkills(skills); + } +} diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/EffectSkill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/EffectSkill.java index d8a36291..2d84f94a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/EffectSkill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/EffectSkill.java @@ -16,24 +16,10 @@ public EffectSkill(String name, SkillCategory category) { } - @Override - public boolean shouldStart(LivingEntity entity, RadixTree tree) { - return false; - } - - @Override - public boolean shouldRun(LivingEntity entity, RadixTree tree) { - return false; - } - - @Override - public boolean shouldStop(LivingEntity entity, RadixTree tree) { - return false; - } @Override public void start(LivingEntity entity, RadixTree tree) { - + super.start(entity, tree); } @Override diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java index 18b42f25..eee8d0d4 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.radix.builders.SkillPathBuilder; import com.amuzil.omegasource.magus.skill.forms.Forms; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; @@ -54,5 +55,7 @@ public boolean shouldRun(LivingEntity entity, RadixTree tree) { public void run(LivingEntity entity, RadixTree tree) { // adjust player prepared chi (getModifierData()) super.run(entity, tree); + RadixUtil.getLogger().debug("Current skill: " + this); + RadixUtil.getLogger().debug("Current player: " + entity); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index 885e9c06..23b50c32 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -12,21 +12,28 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; +import org.checkerframework.checker.units.qual.C; import org.jetbrains.annotations.Nullable; +import java.util.ArrayList; import java.util.List; public class Magi { private final Data capabilityData; + private final LivingEntity magi; private List skillData; private List skillCategoryData; - private final LivingEntity magi; public Magi(Data capabilityData, LivingEntity entity) { this.capabilityData = capabilityData; this.magi = entity; + + // Initialise skilldata. + this.skillData = new ArrayList<>(); + for (Skill skill : Registries.skills) + skillData.add(new SkillData(skill)); } @Nullable @@ -99,12 +106,21 @@ public LivingEntity getMagi() { return this.magi; } - public CompoundTag serialiseNBT(CompoundTag tag) { + public CompoundTag serialiseNBT() { + CompoundTag tag = new CompoundTag(); + if (isDirty()) { + // TODO: Figure out if I need to use the returned tags from each of these values.... + skillCategoryData.forEach(SkillCategoryData::serializeNBT); + skillData.forEach(SkillData::serializeNBT); + tag = capabilityData.serializeNBT(); + } return tag; } public void deserialiseNBT(CompoundTag tag) { - + skillCategoryData.forEach(skillCategoryData1 -> skillCategoryData1.deserializeNBT(tag)); + skillData.forEach(skillData1 -> skillData1.deserializeNBT(tag)); + capabilityData.deserializeNBT(tag); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java index 39e421e3..6152173a 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/data/SkillData.java @@ -35,7 +35,8 @@ public SkillData(ResourceLocation skillId) { this.canUse = false; this.state = Skill.SkillState.START; - skillTraits = getSkill().getTraits(); + if (getSkill() != null) + skillTraits = getSkill().getTraits(); } public SkillData(Skill skill) { @@ -55,6 +56,7 @@ public void setState(Skill.SkillState state) { this.state = state; markDirty(); } + public boolean canUse() { return this.canUse; } @@ -118,6 +120,8 @@ public void deserializeNBT(CompoundTag nbt) { public List getSkillTraits() { + if (skillTraits == null || skillTraits.isEmpty()) + skillTraits = getSkill().getTraits(); return skillTraits; } From 1a3adef5cbc5959d54988d9bb300bda31cd19c3c Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 17 Nov 2024 02:28:24 +1100 Subject: [PATCH 460/469] skills are registered and ticked --- .../skill/util/capability/entity/LivingDataCapability.java | 2 +- .../omegasource/magus/skill/util/capability/entity/Magi.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java index 917bb6af..dcc2a194 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -70,7 +70,7 @@ public Magi getMagi(LivingEntity entity) { public CompoundTag serializeNBT() { CompoundTag tag; if (magi != null && magi.isDirty()) { - tag = magi.serialiseNBT(new CompoundTag()); + tag = magi.serialiseNBT(); } else tag = new CompoundTag(); traits.forEach(trait -> { if (trait.isDirty() || isDirty()) { diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index 23b50c32..fd557d15 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -1,6 +1,7 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -34,6 +35,9 @@ public Magi(Data capabilityData, LivingEntity entity) { this.skillData = new ArrayList<>(); for (Skill skill : Registries.skills) skillData.add(new SkillData(skill)); + + // Testing... + skillData.forEach(skillData1 -> skillData1.setCanUse(true)); } @Nullable @@ -92,6 +96,7 @@ public SkillData getSkillData(String id) { public void onUpdate() { List skills = Registries.getSkills(); for (Skill skill : skills) { + RadixUtil.getLogger().debug(skill); if (getSkillData(skill).canUse()) { skill.tick(getMagi(), getTree()); } From b30fe53bfce9c5aaf0ea8a9c429c516b0455a17d Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 17 Nov 2024 02:30:25 +1100 Subject: [PATCH 461/469] skills are just waiting on their requisite tree --- .../magus/radix/builders/PathBuilder.java | 73 ++++++++++--------- .../skill/util/capability/entity/Magi.java | 2 +- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java index 8736f059..578b65de 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java @@ -23,18 +23,6 @@ public class PathBuilder { // Todo: Change this to input type? Skills should use the activation type, forms input type? private RadixTree.ActivationType type; - public PathBuilder finalisePath(ConditionPath path) { - this.paths.add(path); - return this; - } - - public PathBuilder finalisePath() { - this.paths.add(path); - // Reset condition path - this.path = new ConditionPath(); - return this; - } - protected static void addSteps(ConditionPath path, Condition... conditions) { List emptyData = new ArrayList<>(); if (path == null) @@ -50,29 +38,6 @@ public static PathBuilder getInstance() { return instance; } - public PathBuilder path(Condition... conditions) { - addSteps(path, conditions); - return this; - } - - public PathBuilder type(RadixTree.ActivationType type) { - this.type = type; - return this; - } - - public HashMap> build() { - HashMap> finalPath = new HashMap<>(); - finalPath.put(type, paths); - reset(); - return finalPath; - } - - public void reset() { - this.type = null; - this.path = null; - this.paths.clear(); - } - public static void mergePath(HashMap> firstPath, HashMap> secondPath) { boolean containsKey = false; for (RadixTree.ActivationType type : secondPath.keySet()) { @@ -96,4 +61,42 @@ public static void mergePath(HashMap(); + this.paths.add(path); + return this; + } + + public PathBuilder finalisePath() { + this.paths.add(path); + // Reset condition path + this.path = new ConditionPath(); + return this; + } + + public PathBuilder path(Condition... conditions) { + addSteps(path, conditions); + return this; + } + + public PathBuilder type(RadixTree.ActivationType type) { + this.type = type; + return this; + } + + public HashMap> build() { + HashMap> finalPath = new HashMap<>(); + finalPath.put(type, paths); + reset(); + return finalPath; + } + + public void reset() { + this.type = null; + this.path = null; + if (paths != null) + this.paths.clear(); + } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index fd557d15..d3732501 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -96,7 +96,7 @@ public SkillData getSkillData(String id) { public void onUpdate() { List skills = Registries.getSkills(); for (Skill skill : skills) { - RadixUtil.getLogger().debug(skill); +// RadixUtil.getLogger().debug(skill); if (getSkillData(skill).canUse()) { skill.tick(getMagi(), getTree()); } From a2068fe0e75eebda960c8a118b272e19cde0297f Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 17 Nov 2024 02:32:05 +1100 Subject: [PATCH 462/469] bug fixing --- .../omegasource/magus/radix/ConditionPath.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java index bf933979..41e47e3c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java @@ -24,9 +24,13 @@ public ConditionPath() { public ConditionPath(List activatedConditions) { conditions = activatedConditions; + if (conditions == null) + conditions = new LinkedList<>(); + activationPath = new HashMap<>(); List emptyModifier = new ArrayList<>(); - for (Condition activatedCondition : activatedConditions) { + + for (Condition activatedCondition : conditions) { activationPath.put(activatedCondition, emptyModifier); } markDirty(); @@ -45,9 +49,11 @@ public boolean isDirty() { } public void addStep(Condition activatedCondition, List modifierData) { - conditions.add(activatedCondition); - activationPath.put(activatedCondition, modifierData); - markDirty(); + if (activatedCondition != null) { + conditions.add(activatedCondition); + activationPath.put(activatedCondition, modifierData); + markDirty(); + } } // Remember that modifier data goes up to the currently active node. So, a lot of Effects From 67574acad1c7f811fbdde5c90f410d3f0cac6bf0 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 17 Nov 2024 02:44:10 +1100 Subject: [PATCH 463/469] IT WORKS NOW --- .../amuzil/omegasource/magus/radix/ConditionPath.java | 10 ++++------ .../omegasource/magus/radix/builders/PathBuilder.java | 4 ++-- .../magus/skill/util/capability/entity/Magi.java | 11 +++++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java index 41e47e3c..c8775b31 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/ConditionPath.java @@ -23,13 +23,11 @@ public ConditionPath() { } public ConditionPath(List activatedConditions) { - conditions = activatedConditions; - if (conditions == null) - conditions = new LinkedList<>(); - + conditions = new LinkedList<>(activatedConditions); activationPath = new HashMap<>(); + List emptyModifier = new ArrayList<>(); - + for (Condition activatedCondition : conditions) { activationPath.put(activatedCondition, emptyModifier); } @@ -49,7 +47,7 @@ public boolean isDirty() { } public void addStep(Condition activatedCondition, List modifierData) { - if (activatedCondition != null) { + if (activatedCondition != null && conditions != null) { conditions.add(activatedCondition); activationPath.put(activatedCondition, modifierData); markDirty(); diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java index 578b65de..061e623c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java @@ -64,13 +64,13 @@ public static void mergePath(HashMap(); + this.paths = new LinkedList<>(); this.paths.add(path); return this; } public PathBuilder finalisePath() { - this.paths.add(path); + finalisePath(path); // Reset condition path this.path = new ConditionPath(); return this; diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index d3732501..dc4a4c3c 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -13,6 +13,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; import org.checkerframework.checker.units.qual.C; import org.jetbrains.annotations.Nullable; @@ -94,11 +95,13 @@ public SkillData getSkillData(String id) { // Called per tick public void onUpdate() { - List skills = Registries.getSkills(); - for (Skill skill : skills) { + if (getMagi() instanceof Player) { + List skills = Registries.getSkills(); + for (Skill skill : skills) { // RadixUtil.getLogger().debug(skill); - if (getSkillData(skill).canUse()) { - skill.tick(getMagi(), getTree()); + if (getSkillData(skill).canUse()) { + skill.tick(getMagi(), getTree()); + } } } } From 1a639a6ae2ffa84ff719528b086b3a85301f0cc5 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 17 Nov 2024 02:45:02 +1100 Subject: [PATCH 464/469] debugging --- .../skill/skill/avatar/effects/FlowEffect.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java index eee8d0d4..51ee466e 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java @@ -36,6 +36,19 @@ public HashMap> getActivationPaths .build(); } + @Override + public boolean shouldStart(LivingEntity entity, RadixTree tree) { + RadixUtil.getLogger().debug(tree); + RadixUtil.getLogger().debug(super.shouldStart(entity, tree)); + RadixUtil.getLogger().debug(getActivationPaths()); + return super.shouldStart(entity, tree); + } + + @Override + public boolean shouldStop(LivingEntity entity, RadixTree tree) { + return super.shouldStop(entity, tree); + } + @Override public void start(LivingEntity entity, RadixTree tree) { // In case of avatar, we only care about initial path. From 79e68de580984de7f2a0da10e70ea8afb4cf0191 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Sun, 17 Nov 2024 02:49:38 +1100 Subject: [PATCH 465/469] path builder seems wonky --- .../omegasource/magus/radix/builders/PathBuilder.java | 2 ++ .../magus/skill/skill/avatar/effects/FlowEffect.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java index 061e623c..bcc4b3fa 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java @@ -3,6 +3,7 @@ import com.amuzil.omegasource.magus.radix.Condition; import com.amuzil.omegasource.magus.radix.ConditionPath; import com.amuzil.omegasource.magus.radix.RadixTree; +import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.skill.modifiers.api.ModifierData; import java.util.ArrayList; @@ -28,6 +29,7 @@ protected static void addSteps(ConditionPath path, Condition... conditions) { if (path == null) path = new ConditionPath(List.of(conditions)); for (Condition condition : conditions) { + RadixUtil.getLogger().debug(condition); path.addStep(condition, emptyData); } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java index 51ee466e..926606da 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/avatar/effects/FlowEffect.java @@ -38,9 +38,9 @@ public HashMap> getActivationPaths @Override public boolean shouldStart(LivingEntity entity, RadixTree tree) { - RadixUtil.getLogger().debug(tree); - RadixUtil.getLogger().debug(super.shouldStart(entity, tree)); - RadixUtil.getLogger().debug(getActivationPaths()); +// RadixUtil.getLogger().debug(tree); +// RadixUtil.getLogger().debug(super.shouldStart(entity, tree)); +// RadixUtil.getLogger().debug(getActivationPaths()); return super.shouldStart(entity, tree); } From 2baa90ec1de695fcdbff5998842d827f3797b679 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 24 Jan 2025 15:04:31 -0800 Subject: [PATCH 466/469] tree does not need to be serialised; made it compile --- .../ConditionActivatedPacket.java | 2 +- .../SendModifierDataPacket.java | 2 +- .../server_executed/StartBendingPacket.java | 2 +- .../omegasource/magus/radix/RadixTree.java | 35 ++++++++++++------- .../magus/radix/builders/PathBuilder.java | 5 +-- .../magus/server/ServerEvents.java | 4 +-- .../omegasource/magus/skill/skill/Skill.java | 10 ++++-- .../skill/util/capability/entity/Data.java | 6 ---- .../entity/LivingDataCapability.java | 13 ------- .../skill/util/capability/entity/Magi.java | 21 +++-------- 10 files changed, 42 insertions(+), 58 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java index 11bd85a4..f2c60fcb 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/ConditionActivatedPacket.java @@ -38,7 +38,7 @@ public boolean handle(Supplier ctx) { ctx.get().enqueueWork(() -> { Player player = ctx.get().getSender(); // Intentional crashing because I want to know why my packet isn't being received correctly... - CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); +// CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().moveDown(condition); }); return true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java index 9407256a..b8d04628 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/SendModifierDataPacket.java @@ -43,7 +43,7 @@ public static SendModifierDataPacket fromBytes(FriendlyByteBuf buf) { public boolean handle(Supplier ctx) { ctx.get().enqueueWork(() -> { Player player = ctx.get().getSender(); - CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().addModifierData(modifierData); +// CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().addModifierData(modifierData); }); return true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java index f1aff23f..f8959f9b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java +++ b/src/main/java/com/amuzil/omegasource/magus/network/packets/server_executed/StartBendingPacket.java @@ -20,7 +20,7 @@ public static StartBendingPacket fromBytes(FriendlyByteBuf buf) { public boolean handle(Supplier ctx) { ctx.get().enqueueWork(() -> { Player player = ctx.get().getSender(); - CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().start(); +// CapabilityHandler.getCapability(player, CapabilityHandler.LIVING_DATA).getTree().start(); }); return true; } diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java index 60db99e8..57f889f8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/RadixTree.java @@ -23,7 +23,9 @@ public class RadixTree { // Fire is a test private Element activeElement = null; // Disciplines.FIRE; private ConditionPath path; - private Entity owner; + + // TODO: Comment this out, perform entity related logic in bending context +// private Entity owner; public RadixTree(Node root) { this.root = root; @@ -82,6 +84,7 @@ public void resetTree() { deactivateAllConditions(); for (Condition condition : root.getImmediateBranches()) condition.register(); + setActive(root); } // Helpful method to debug and to see all the conditions @@ -137,7 +140,7 @@ private List prioritizeConditions(List conditions) { // Add conditions to RadixTree - O(n) public void insert(List conditions) { - Node current = root; + Node current = active; int currIndex = 0; while (currIndex < conditions.size()) { @@ -197,7 +200,7 @@ public void insert(List conditions) { public List search(List conditions) { conditions = prioritizeConditions(conditions); List ret = null; - Node current = root; + Node current = active; int currIndex = 0; while (currIndex < conditions.size()) { Condition currentCondition = conditions.get(currIndex); @@ -253,10 +256,16 @@ private void setActive(Node node) { if (active != null && active == root) { Condition currentCondition = active.terminateCondition(); if (currentCondition != null) { + Runnable success = currentCondition.onSuccess; + Runnable failure = currentCondition.onFailure; currentCondition.register(currentCondition.name(), () -> { - currentCondition.onSuccess.run(); + if (success != null) + success.run(); currentCondition.unregister(); - }, currentCondition.onFailure); + }, () -> { + if (failure != null) + failure.run(); + }); currentCondition.register(); } @@ -283,8 +292,8 @@ private void setActive(Node node) { } - if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) - active.registerModifierListeners(activeElement, player); +// if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) +// active.registerModifierListeners(activeElement, player); if (active.onEnter() != null) { active.onEnter().accept(this); @@ -345,11 +354,11 @@ public void moveDown(Condition executedCondition) { } this.lastActivated = executedCondition; - if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) { - active.unregisterModifierListeners(player); - //todo remove this its just for testing - active.getModifiers().forEach(modifier -> modifier.print()); - } +// if (active.getModifiers().size() > 0 && owner instanceof ServerPlayer player) { +// active.unregisterModifierListeners(player); +// //todo remove this its just for testing +// active.getModifiers().forEach(modifier -> modifier.print()); +// } if (active.children().size() == 0) return; @@ -379,7 +388,7 @@ public void addModifierData(ModifierData modifierData) { } public void setOwner(Entity entity) { - this.owner = entity; +// this.owner = entity; } public ConditionPath getPath() { diff --git a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java index bcc4b3fa..7c7a4927 100644 --- a/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java +++ b/src/main/java/com/amuzil/omegasource/magus/radix/builders/PathBuilder.java @@ -74,7 +74,7 @@ public PathBuilder finalisePath(ConditionPath path) { public PathBuilder finalisePath() { finalisePath(path); // Reset condition path - this.path = new ConditionPath(); +// this.path = new ConditionPath(); return this; } @@ -91,7 +91,8 @@ public PathBuilder type(RadixTree.ActivationType type) { public HashMap> build() { HashMap> finalPath = new HashMap<>(); finalPath.put(type, paths); - reset(); + RadixUtil.getLogger().debug(finalPath); +// reset(); return finalPath; } diff --git a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java index 901ea36b..d15c5f11 100644 --- a/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java +++ b/src/main/java/com/amuzil/omegasource/magus/server/ServerEvents.java @@ -47,8 +47,8 @@ public static void onEntityJoinLevel(EntityJoinLevelEvent event) { ModifiersRegistry.DIRECTION.copy(), ModifiersRegistry.TARGET.copy()) .build(); //Resets the tree; for testing purposes. - if (magi.getTree() != null) - magi.getTree().burn(); +// if (magi.getTree() != null) +// magi.getTree().burn(); } // While this test code will directly use conditions, Skills will reference Forms // that get automatically turned into conditions. diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java index e11f43fb..5d7ac4e8 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/skill/Skill.java @@ -28,6 +28,7 @@ public abstract class Skill { // How the skill was activated. Useful if you want different methods to influence the skill in different ways. // For complex, game-design move combinations, see ModifierData for how to alter your skills. protected RadixTree.ActivationType activatedType; + private boolean shouldStart, shouldRun, shouldStop; public Skill(String modID, String name, SkillCategory category) { this(new ResourceLocation(modID, name), category); @@ -95,16 +96,19 @@ public void tick(LivingEntity entity, RadixTree tree) { if (shouldStart(entity, tree)) { - if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Start(entity, tree, this))) return; + if (MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Start(entity, tree, this))) + return; start(entity, tree); } else return; if (shouldRun(entity, tree)) { - if (!MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) run(entity, tree); + if (!MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Run(entity, tree, this))) + run(entity, tree); if (shouldStop(entity, tree)) { - if (!MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Stop(entity, tree, this))) stop(entity, tree); + if (!MinecraftForge.EVENT_BUS.post(new SkillTickEvent.Stop(entity, tree, this))) + stop(entity, tree); } } } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java index d79378b4..f7057e37 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Data.java @@ -1,8 +1,6 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; -import com.amuzil.omegasource.magus.radix.RadixTree; import net.minecraft.nbt.CompoundTag; -import net.minecraftforge.common.capabilities.AutoRegisterCapability; import net.minecraftforge.common.util.INBTSerializable; /** @@ -20,8 +18,4 @@ public interface Data extends INBTSerializable { void markClean(); boolean isDirty(); - - RadixTree getTree(); - - void setTree(RadixTree tree); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java index dcc2a194..14bb74e9 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; import com.amuzil.omegasource.magus.Magus; -import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.skill.SkillCategory; @@ -49,9 +48,6 @@ public static class LivingDataCapabilityImp implements Data { // Instance of skill/magus supported entity, essentially. private Magi magi = null; - //Gets the tree from the event bus. - private RadixTree tree; - public LivingDataCapabilityImp() { fillTraits(); //TODO: Data generation methods for each skill @@ -89,15 +85,6 @@ public void deserializeNBT(CompoundTag nbt) { magi.deserialiseNBT(nbt); } - public RadixTree getTree() { - return tree; - } - - public void setTree(RadixTree tree) { - this.tree = tree; - markDirty(); - } - public void fillTraits() { traits.addAll(Registries.DATA_TRAITS.get().getValues()); } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index dc4a4c3c..ba06917b 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -1,7 +1,6 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; import com.amuzil.omegasource.magus.radix.RadixTree; -import com.amuzil.omegasource.magus.radix.RadixUtil; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -14,15 +13,12 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; -import org.checkerframework.checker.units.qual.C; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; public class Magi { - - private final Data capabilityData; private final LivingEntity magi; private List skillData; @@ -63,11 +59,6 @@ public LivingDataCapability.LivingDataCapabilityImp getMagusData() { public boolean isDirty() { return false; } - - public RadixTree getTree() { - return capabilityData.getTree(); - } - public List getTraits() { return getMagusData().getTraits(); } @@ -100,7 +91,7 @@ public void onUpdate() { for (Skill skill : skills) { // RadixUtil.getLogger().debug(skill); if (getSkillData(skill).canUse()) { - skill.tick(getMagi(), getTree()); +// skill.tick(getMagi(), getTree()); } } } @@ -118,17 +109,15 @@ public CompoundTag serialiseNBT() { CompoundTag tag = new CompoundTag(); if (isDirty()) { // TODO: Figure out if I need to use the returned tags from each of these values.... - skillCategoryData.forEach(SkillCategoryData::serializeNBT); - skillData.forEach(SkillData::serializeNBT); - tag = capabilityData.serializeNBT(); + skillCategoryData.forEach(catData -> tag.put(catData.getName(), catData.serializeNBT())); + skillData.forEach(sData -> tag.put(sData.getName(), sData.serializeNBT())); } return tag; } public void deserialiseNBT(CompoundTag tag) { - skillCategoryData.forEach(skillCategoryData1 -> skillCategoryData1.deserializeNBT(tag)); - skillData.forEach(skillData1 -> skillData1.deserializeNBT(tag)); - capabilityData.deserializeNBT(tag); + skillCategoryData.forEach(catData -> catData.deserializeNBT(tag.getCompound(catData.getName()))); + skillData.forEach(sData -> sData.deserializeNBT(tag.getCompound(sData.getName()))); } } From 37dc7e334f681e48b884d36887767bbfc8451e6a Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Fri, 24 Jan 2025 15:10:33 -0800 Subject: [PATCH 467/469] have code for controlling when a skill should execute --- .../skill/util/capability/entity/Magi.java | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index ba06917b..a3bceb14 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -1,6 +1,5 @@ package com.amuzil.omegasource.magus.skill.util.capability.entity; -import com.amuzil.omegasource.magus.radix.RadixTree; import com.amuzil.omegasource.magus.registry.Registries; import com.amuzil.omegasource.magus.skill.skill.Skill; import com.amuzil.omegasource.magus.skill.util.capability.CapabilityHandler; @@ -16,6 +15,7 @@ import org.jetbrains.annotations.Nullable; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; public class Magi { @@ -23,6 +23,7 @@ public class Magi { private final LivingEntity magi; private List skillData; private List skillCategoryData; + private HashMap skillStatuses = new HashMap<>(); public Magi(Data capabilityData, LivingEntity entity) { this.capabilityData = capabilityData; @@ -120,4 +121,41 @@ public void deserialiseNBT(CompoundTag tag) { skillData.forEach(sData -> sData.deserializeNBT(tag.getCompound(sData.getName()))); } + + public static class SkillExecuteController { + private boolean shouldStart; + private boolean shouldRun; + private boolean shouldStop; + + public SkillExecuteController() { + this.shouldStart = false; + this.shouldRun = false; + this.shouldStop = false; + } + + public boolean shouldStart() { + return this.shouldStart; + } + + public boolean shouldRun() { + return this.shouldRun; + } + + public boolean shouldStop() { + return this.shouldStop; + } + + public void setStart(boolean start) { + this.shouldStart = start; + } + + public void setRun(boolean run) { + this.shouldRun = run; + } + + public void setStop(boolean stop) { + this.shouldStop = stop; + } + } + } From c67b3851c0276a386730079731af4bbed4788cfc Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 4 Feb 2025 16:08:49 -0800 Subject: [PATCH 468/469] done with serialisation except for skill activation --- .../entity/LivingDataCapability.java | 4 +- .../skill/util/capability/entity/Magi.java | 38 ++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java index 14bb74e9..deae2388 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/LivingDataCapability.java @@ -57,8 +57,10 @@ public LivingDataCapabilityImp() { } public Magi getMagi(LivingEntity entity) { - if (magi == null) + if (magi == null) { + fillTraits(); magi = new Magi(this, entity); + } return this.magi; } diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index a3bceb14..27618b03 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -12,6 +12,8 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; +import net.minecraftforge.common.util.INBTSerializable; +import org.checkerframework.checker.units.qual.C; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; @@ -21,6 +23,8 @@ public class Magi { private final Data capabilityData; private final LivingEntity magi; + + // These are magi specific traits. private List skillData; private List skillCategoryData; private HashMap skillStatuses = new HashMap<>(); @@ -106,6 +110,8 @@ public LivingEntity getMagi() { return this.magi; } + // We don't serialise `traits`, because those are serialised in the cap itself. + // Wrapper allows us to access. public CompoundTag serialiseNBT() { CompoundTag tag = new CompoundTag(); if (isDirty()) { @@ -122,7 +128,8 @@ public void deserialiseNBT(CompoundTag tag) { } - public static class SkillExecuteController { + public static class SkillExecuteController implements Data { + private boolean dirty; private boolean shouldStart; private boolean shouldRun; private boolean shouldStop; @@ -131,6 +138,7 @@ public SkillExecuteController() { this.shouldStart = false; this.shouldRun = false; this.shouldStop = false; + this.dirty = false; } public boolean shouldStart() { @@ -156,6 +164,34 @@ public void setRun(boolean run) { public void setStop(boolean stop) { this.shouldStop = stop; } + + @Override + public void markDirty() { + this.dirty = true; + } + + @Override + public void markClean() { + this.dirty = false; + } + + @Override + public boolean isDirty() { + return this.dirty; + } + + @Override + public CompoundTag serializeNBT() { + CompoundTag tag = new CompoundTag(); + tag.putBoolean("start", shouldStart); + + return null; + } + + @Override + public void deserializeNBT(CompoundTag nbt) { + + } } } From a00ced25a19668e7c4d7f07242a47d130bba78a6 Mon Sep 17 00:00:00 2001 From: FavouriteDragon Date: Tue, 4 Feb 2025 17:17:49 -0800 Subject: [PATCH 469/469] cleanup --- .../skill/util/capability/entity/Magi.java | 73 ++----------------- 1 file changed, 5 insertions(+), 68 deletions(-) diff --git a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java index 27618b03..1090baa0 100644 --- a/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java +++ b/src/main/java/com/amuzil/omegasource/magus/skill/util/capability/entity/Magi.java @@ -27,7 +27,11 @@ public class Magi { // These are magi specific traits. private List skillData; private List skillCategoryData; - private HashMap skillStatuses = new HashMap<>(); + + // Change this to use an int - 0 for should start, 1 for should run, 2 for should stop, + // -1 for default/idle. If I need multiple states, then use bits; 000 for idle, and then + // 1xx is should start, x1x is should run, xx1 is should stop + private HashMap skillStatuses = new HashMap<>(); public Magi(Data capabilityData, LivingEntity entity) { this.capabilityData = capabilityData; @@ -127,71 +131,4 @@ public void deserialiseNBT(CompoundTag tag) { skillData.forEach(sData -> sData.deserializeNBT(tag.getCompound(sData.getName()))); } - - public static class SkillExecuteController implements Data { - private boolean dirty; - private boolean shouldStart; - private boolean shouldRun; - private boolean shouldStop; - - public SkillExecuteController() { - this.shouldStart = false; - this.shouldRun = false; - this.shouldStop = false; - this.dirty = false; - } - - public boolean shouldStart() { - return this.shouldStart; - } - - public boolean shouldRun() { - return this.shouldRun; - } - - public boolean shouldStop() { - return this.shouldStop; - } - - public void setStart(boolean start) { - this.shouldStart = start; - } - - public void setRun(boolean run) { - this.shouldRun = run; - } - - public void setStop(boolean stop) { - this.shouldStop = stop; - } - - @Override - public void markDirty() { - this.dirty = true; - } - - @Override - public void markClean() { - this.dirty = false; - } - - @Override - public boolean isDirty() { - return this.dirty; - } - - @Override - public CompoundTag serializeNBT() { - CompoundTag tag = new CompoundTag(); - tag.putBoolean("start", shouldStart); - - return null; - } - - @Override - public void deserializeNBT(CompoundTag nbt) { - - } - } - }