From 1ba5a2b52c7ee53739d42b2a4e633307c77b0cb9 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 13 Apr 2021 11:37:30 -0400 Subject: [PATCH 1/3] [ci-skip] remove .github/workflows/upstream.yml_off --- .github/workflows/upstream.yml_off | 37 ------------------------------ 1 file changed, 37 deletions(-) delete mode 100644 .github/workflows/upstream.yml_off 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' From 1136c0423b008c7e3a3ebab259dd11fcba3fcc27 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 13 Apr 2021 13:14:59 -0400 Subject: [PATCH 2/3] drop AI-improvements --- Licensing/LICENSE.md | 1 - README.md | 1 - ...nts-Optimized-tan-for-ControllerLook.patch | 94 ------------------- 3 files changed, 96 deletions(-) delete mode 100644 patches/server/0063-AI-Improvements-Optimized-tan-for-ControllerLook.patch 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/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) { From 1bbceb8ad3d565a0f43f2f224924fa03402b5bd9 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 13 Apr 2021 13:18:45 -0400 Subject: [PATCH 3/3] rebuild --- PATCHES.md | 3 +-- ...ic-tacs-unblocking.patch => 0063-tic-tacs-unblocking.patch} | 0 ...lithium-optimize-BlockPos.iterateOutwards-by-caching.patch} | 0 .../server/{0066-lithium-AI.patch => 0065-lithium-AI.patch} | 0 .../{0067-lithium-block.patch => 0066-lithium-block.patch} | 0 .../{0068-lithium-entity.patch => 0067-lithium-entity.patch} | 0 .../server/{0069-lithium-gen.patch => 0068-lithium-gen.patch} | 0 .../{0070-lithium-shape.patch => 0069-lithium-shape.patch} | 0 ...lithium-skip-ticking-block-entities-that-are-doing-n.patch} | 0 9 files changed, 1 insertion(+), 2 deletions(-) rename patches/server/{0064-tic-tacs-unblocking.patch => 0063-tic-tacs-unblocking.patch} (100%) rename patches/server/{0065-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch => 0064-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch} (100%) rename patches/server/{0066-lithium-AI.patch => 0065-lithium-AI.patch} (100%) rename patches/server/{0067-lithium-block.patch => 0066-lithium-block.patch} (100%) rename patches/server/{0068-lithium-entity.patch => 0067-lithium-entity.patch} (100%) rename patches/server/{0069-lithium-gen.patch => 0068-lithium-gen.patch} (100%) rename patches/server/{0070-lithium-shape.patch => 0069-lithium-shape.patch} (100%) rename patches/server/{0071-lithium-skip-ticking-block-entities-that-are-doing-n.patch => 0070-lithium-skip-ticking-block-entities-that-are-doing-n.patch} (100%) diff --git a/PATCHES.md b/PATCHES.md index fce0e0da..34e1bba6 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 | | @@ -436,7 +435,7 @@ # Patches | server | lithium block | JellySquid | | | server | lithium entity | JellySquid | | | server | lithium enum_values | JellySquid | | -| server | lithium gen | Hugo Planque | | +| server | lithium gen | JellySquid | | | server | lithium reduce allocations | JellySquid | Mykyta Komarnytskyy | | server | lithium shape | JellySquid | | | server | lithium: cache chunk gen sea level | SuperCoder7979 | | 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