diff --git a/.github/workflows/upstream.yml_off b/.github/workflows/upstream.yml_off deleted file mode 100644 index 32018473..00000000 --- a/.github/workflows/upstream.yml_off +++ /dev/null @@ -1,37 +0,0 @@ -name: Tuinity-Upstream - -on: - schedule: - - cron: "*/60 */2 * * *" - -jobs: - update: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1.3.0 - with: - java-version: 11 - - name: Update Tuinity - run: | - git submodule init - git submodule update --init --recursive - git config --global user.email "ci@github.com" - git config --global user.name "Github CI" - yatopiaDir=`pwd` - cd Tuinity - pwd - git status - git fetch - git reset --hard origin - cd .. - git add $(git rev-parse --show-toplevel) - git commit -m "Update upstream" - - name: Create Pull Request - uses: peter-evans/create-pull-request@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update Upstream - title: '[Automated] Tuinity updates' - body: 'Fetch Upstream from https://github.com/Spottedleaf/Tuinity' diff --git a/Licensing/LICENSE.md b/Licensing/LICENSE.md index 9294b81b..2d768ddd 100644 --- a/Licensing/LICENSE.md +++ b/Licensing/LICENSE.md @@ -6,6 +6,5 @@ All patches (.patch files) marked with "Cadmium" are licensed under MIT found [here](https://github.com/LucilleTea/cadmium-fabric/blob/1.16.x/dev-my-fork/LICENSE.txt).
All patches (.patch files) marked with "LazyDFU" are licensed under MIT found [here](https://github.com/astei/lazydfu/blob/master/LICENSE).
All patches (.patch files) marked with "Tic-Tacs" are licensed under LGPLv3 found [here](https://github.com/Gegy/tic-tacs/blob/1.16.4/LICENSE).
-All patches (.patch files) marked with "AI-Improvements" are licensed under MIT found [here](https://github.com/BuiltBrokenModding/AI-Improvements/blob/1.16/LICENSEhttps://github.com/BuiltBrokenModding/AI-Improvements/blob/1.16/LICENSE).
All other patches (.patch files) included in this repo are licensed under the MIT license found [here](MIT.md).
See [EMC](https://github.com/starlis/empirecraft/blob/master/README.md), [Akarin](https://github.com/Akarin-project/Akarin/blob/1.16.5/LICENSE.md), [Purpur](https://github.com/pl3xgaming/Purpur/blob/ver/1.16.5/LICENSE), [Airplane](https://github.com/Technove/Airplane/blob/master/PATCHES-LICENSE), [Origami](https://github.com/Minebench/Origami/blob/1.16/PATCHES-LICENSE), and [Tuinity](https://github.com/Spottedleaf/Tuinity/blob/master/PATCHES-LICENSE) for the license of patches automatically pulled during upstream updates. diff --git a/PATCHES.md b/PATCHES.md index dc54eb2d..69f64949 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -8,7 +8,6 @@ # Patches | Side | Patch | Author | CoAuthors | | ----- | ------------- |:-------------:| -----:| -| server | (AI-Improvements) Optimized tan for ControllerLook | bl4ckscor3 | | | server | AFK API | William Blake Galbreath | | | api | AFK API | William Blake Galbreath | | | server | Ability to re-add farmland mechanics from Alpha | Yive | | diff --git a/README.md b/README.md index 26209019..c6eb9cd2 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ ## So what is Yatopia? * [Cadmium](https://github.com/LucilleTea/cadmium-fabric) * [LazyDFU](https://github.com/astei/lazydfu) * [Tic-Tacs](https://github.com/Gegy/tic-tacs) -* [AI-Improvements](https://github.com/BuiltBrokenModding/AI-Improvements/tree/1.16) ## Try it out diff --git a/patches/server/0063-AI-Improvements-Optimized-tan-for-ControllerLook.patch b/patches/server/0063-AI-Improvements-Optimized-tan-for-ControllerLook.patch deleted file mode 100644 index 0981d916..00000000 --- a/patches/server/0063-AI-Improvements-Optimized-tan-for-ControllerLook.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: bl4ckscor3 -Date: Tue, 2 Feb 2021 21:38:12 -0500 -Subject: [PATCH] (AI-Improvements) Optimized tan for ControllerLook - -Code originally licenced under MIT from: https://github.com/BuiltBrokenModding/AI-Improvements/tree/1.16 - -diff --git a/src/main/java/com/builtbroken/ai/improvements/FastTrig.java b/src/main/java/com/builtbroken/ai/improvements/FastTrig.java -new file mode 100644 -index 0000000000000000000000000000000000000000..82150126c0d1608de0af9a8582571628efe53c2d ---- /dev/null -+++ b/src/main/java/com/builtbroken/ai/improvements/FastTrig.java -@@ -0,0 +1,59 @@ -+package com.builtbroken.ai.improvements; -+ -+public class FastTrig { -+ private static final int ATAN2_BITS = 8; -+ -+ private static final int ATAN2_BITS2 = ATAN2_BITS << 1; -+ private static final int ATAN2_MASK = ~(-1 << ATAN2_BITS2); -+ private static final int ATAN2_COUNT = ATAN2_MASK + 1; -+ private static final int ATAN2_DIM = (int) Math.sqrt(ATAN2_COUNT); -+ -+ private static final float INV_ATAN2_DIM_MINUS_1 = 1.0f / (ATAN2_DIM - 1); -+ -+ private static final float[] atan2 = new float[ATAN2_COUNT]; -+ static { -+ for (int i = 0; i < ATAN2_DIM; i++) { -+ for (int j = 0; j < ATAN2_DIM; j++) { -+ float x0 = (float) i / ATAN2_DIM; -+ float y0 = (float) j / ATAN2_DIM; -+ -+ atan2[j * ATAN2_DIM + i] = (float) Math.atan2(y0, x0); -+ } -+ } -+ } -+ -+ -+ public static final float atan2(double y, double x) { -+ float add, mul; -+ -+ if (x < 0.0f) { -+ if (y < 0.0f) { -+ x = -x; -+ y = -y; -+ -+ mul = 1.0f; -+ } else { -+ x = -x; -+ mul = -1.0f; -+ } -+ -+ add = -3.141592653f; -+ } else { -+ if (y < 0.0f) { -+ y = -y; -+ mul = -1.0f; -+ } else { -+ mul = 1.0f; -+ } -+ -+ add = 0.0f; -+ } -+ -+ double invDiv = 1.0f / (((x < y) ? y : x) * INV_ATAN2_DIM_MINUS_1); -+ -+ int xi = (int) (x * invDiv); -+ int yi = (int) (y * invDiv); -+ -+ return (atan2[yi * ATAN2_DIM + xi] + add) * mul; -+ } -+} -\ No newline at end of file -diff --git a/src/main/java/net/minecraft/world/entity/ai/control/ControllerLook.java b/src/main/java/net/minecraft/world/entity/ai/control/ControllerLook.java -index 3ce9edde641c8b8eea75479615bcd2866ffd2198..b44481633a798c560af5b55723daa32264bb2be3 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/control/ControllerLook.java -+++ b/src/main/java/net/minecraft/world/entity/ai/control/ControllerLook.java -@@ -86,14 +86,14 @@ public class ControllerLook { - double d2 = this.g - this.a.locZ(); - double d3 = (double) MathHelper.sqrt(d0 * d0 + d2 * d2); - -- return (float) (-(MathHelper.d(d1, d3) * 57.2957763671875D)); -+ return (float) (-(com.builtbroken.ai.improvements.FastTrig.atan2(d1, d3) * 57.2957763671875D)); // Yatopia - Optimized tan implementation - } - - protected float h() { - double d0 = this.e - this.a.locX(); - double d1 = this.g - this.a.locZ(); - -- return (float) (MathHelper.d(d1, d0) * 57.2957763671875D) - 90.0F; -+ return (float) (com.builtbroken.ai.improvements.FastTrig.atan2(d1, d0) * 57.2957763671875D) - 90.0F; // Yatopia - Optimized tan implementation - } - - protected float a(float f, float f1, float f2) { diff --git a/patches/server/0064-tic-tacs-unblocking.patch b/patches/server/0063-tic-tacs-unblocking.patch similarity index 100% rename from patches/server/0064-tic-tacs-unblocking.patch rename to patches/server/0063-tic-tacs-unblocking.patch diff --git a/patches/server/0065-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch b/patches/server/0064-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch similarity index 100% rename from patches/server/0065-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch rename to patches/server/0064-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch diff --git a/patches/server/0066-lithium-AI.patch b/patches/server/0065-lithium-AI.patch similarity index 100% rename from patches/server/0066-lithium-AI.patch rename to patches/server/0065-lithium-AI.patch diff --git a/patches/server/0067-lithium-block.patch b/patches/server/0066-lithium-block.patch similarity index 100% rename from patches/server/0067-lithium-block.patch rename to patches/server/0066-lithium-block.patch diff --git a/patches/server/0068-lithium-entity.patch b/patches/server/0067-lithium-entity.patch similarity index 100% rename from patches/server/0068-lithium-entity.patch rename to patches/server/0067-lithium-entity.patch diff --git a/patches/server/0069-lithium-gen.patch b/patches/server/0068-lithium-gen.patch similarity index 100% rename from patches/server/0069-lithium-gen.patch rename to patches/server/0068-lithium-gen.patch diff --git a/patches/server/0070-lithium-shape.patch b/patches/server/0069-lithium-shape.patch similarity index 100% rename from patches/server/0070-lithium-shape.patch rename to patches/server/0069-lithium-shape.patch diff --git a/patches/server/0071-lithium-skip-ticking-block-entities-that-are-doing-n.patch b/patches/server/0070-lithium-skip-ticking-block-entities-that-are-doing-n.patch similarity index 100% rename from patches/server/0071-lithium-skip-ticking-block-entities-that-are-doing-n.patch rename to patches/server/0070-lithium-skip-ticking-block-entities-that-are-doing-n.patch diff --git a/patches/server/0072-Threaded-WorldGen.patch b/patches/server/0071-Threaded-WorldGen.patch similarity index 100% rename from patches/server/0072-Threaded-WorldGen.patch rename to patches/server/0071-Threaded-WorldGen.patch diff --git a/patches/server/0073-Multi-threaded-RegionFile-IO.patch b/patches/server/0072-Multi-threaded-RegionFile-IO.patch similarity index 100% rename from patches/server/0073-Multi-threaded-RegionFile-IO.patch rename to patches/server/0072-Multi-threaded-RegionFile-IO.patch diff --git a/patches/server/0074-Multi-threaded-World-Upgrade.patch b/patches/server/0073-Multi-threaded-World-Upgrade.patch similarity index 100% rename from patches/server/0074-Multi-threaded-World-Upgrade.patch rename to patches/server/0073-Multi-threaded-World-Upgrade.patch diff --git a/patches/server/0075-Decompile-fixes-for-WorldChunkManagerMultiNoise.patch b/patches/server/0074-Decompile-fixes-for-WorldChunkManagerMultiNoise.patch similarity index 100% rename from patches/server/0075-Decompile-fixes-for-WorldChunkManagerMultiNoise.patch rename to patches/server/0074-Decompile-fixes-for-WorldChunkManagerMultiNoise.patch diff --git a/patches/server/0076-lithium-MultiNoiseBiomeSourceMixin.patch b/patches/server/0075-lithium-MultiNoiseBiomeSourceMixin.patch similarity index 100% rename from patches/server/0076-lithium-MultiNoiseBiomeSourceMixin.patch rename to patches/server/0075-lithium-MultiNoiseBiomeSourceMixin.patch diff --git a/patches/server/0077-fixup-Threaded-WorldGen.patch b/patches/server/0076-fixup-Threaded-WorldGen.patch similarity index 100% rename from patches/server/0077-fixup-Threaded-WorldGen.patch rename to patches/server/0076-fixup-Threaded-WorldGen.patch diff --git a/patches/server/0078-Force-world-save.patch b/patches/server/0077-Force-world-save.patch similarity index 100% rename from patches/server/0078-Force-world-save.patch rename to patches/server/0077-Force-world-save.patch diff --git a/patches/server/0079-fixup-Threaded-WorldGen.patch b/patches/server/0078-fixup-Threaded-WorldGen.patch similarity index 100% rename from patches/server/0079-fixup-Threaded-WorldGen.patch rename to patches/server/0078-fixup-Threaded-WorldGen.patch