Merge remote-tracking branch 'origin/main' into new_buildsystem

# Conflicts:
#	build.gradle
#	fabric/build.gradle
This commit is contained in:
coolGi
2023-02-12 19:06:48 +10:30
56 changed files with 142 additions and 76 deletions
+34
View File
@@ -0,0 +1,34 @@
## Please complete before submitting:
1. [ ] Check the FAQ to see if your issue has already been reported and has a solution:
[Problems-and-solutions](https://gitlab.com/jeseibel/minecraft-lod-mod/-/wikis/2-frequently-asked-questions/2-problems-and-solutions/Problems-and-Solutions)
2. [ ] Make sure you are not using any mods on the incompatible list:
[Mod support FAQ](https://gitlab.com/jeseibel/minecraft-lod-mod/-/wikis/2-frequently-asked-questions/4-mod-support/Mod-Support)
3. [ ] Check the existing issues to verify that your bug hasn't already been submitted:
[Issues](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/)
4. [ ] Upload Minecraft's crash report and/or log.
Minecraft crash reports are located in: `.minecraft/crash-reports`
Minecraft logs are located in: `.minecraft/logs`
5. [ ] Upload your Distant Horizons Config.
The config is found in: `.minecraft/configs/DistantHorizons.toml`
6. [ ] Fill out the information below:
================================================================
* minecraft version:
* Distant Horizons version:
* Mod loader:
* List of installed mods (list the smallest number of mods that you can use to re-create the bug):
* Describe the bug:
* Steps to reproduce the bug:
/labels ~Bug ~"Not-Reviewed"
+3
View File
@@ -0,0 +1,3 @@
Before creating an issue, please select the appropriate template from the dropdown above.
The template will walk you through submitting a bug, feature, or improvement request.
@@ -0,0 +1,8 @@
- [ ] Check the existing [feature requests](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/?sort=updated_desc&state=opened&label_name%5B%5D=Feature) to verify that your feature hasn't already been suggested.
1. Describe the feature:
2. Describe why this feature should be added:
/labels ~Feature ~"Not-Reviewed"
@@ -0,0 +1,7 @@
1. Check the existing [improvement requests](https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/?sort=updated_desc&state=opened&label_name%5B%5D=Improvement) to verify that your improvement hasn't already been suggested.
2. Describe the improvement:
/labels ~improvement ~"Not-Reviewed"
@@ -34,6 +34,7 @@ import com.seibel.lod.common.wrappers.misc.LightMapWrapper;
import com.seibel.lod.core.dependencyInjection.ModAccessorInjector;
import com.seibel.lod.core.logging.DhLoggerBuilder;
import com.seibel.lod.core.render.glObject.GLProxy;
import com.seibel.lod.core.wrapperInterfaces.misc.ILightMapWrapper;
import com.mojang.math.Vector3f;
@@ -68,6 +69,7 @@ import net.minecraft.world.level.material.FogType;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import org.apache.logging.log4j.Logger;
import org.lwjgl.glfw.GLFW;
/**
@@ -193,6 +195,18 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
@Override
public int getScreenWidth()
{
// alternate ways of getting the window's resolution,
// using one of these methods may fix the optifine render resolution bug
// TODO: test these once we can run with Optifine again
// int[] heightArray = new int[1];
// int[] widthArray = new int[1];
//
// long window = GLProxy.getInstance().minecraftGlContext;
// GLFW.glfwGetWindowSize(window, widthArray, heightArray); // option 1
// GLFW.glfwGetFramebufferSize(window, widthArray, heightArray); // option 2
int width = MC.getWindow().getWidth();
if (OPTIFINE_ACCESSOR != null)
{
@@ -1,4 +1,4 @@
package com.seibel.lod;
package com.seibel.lod.fabric;
import com.seibel.lod.common.wrappers.DependencySetup;
import net.fabricmc.api.ClientModInitializer;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod;
package com.seibel.lod.fabric;
import com.seibel.lod.common.wrappers.McObjectConverter;
import com.seibel.lod.common.wrappers.world.ClientLevelWrapper;
@@ -29,7 +29,7 @@ import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
import com.seibel.lod.core.dependencyInjection.ModAccessorInjector;
import com.seibel.lod.core.logging.DhLoggerBuilder;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.ISodiumAccessor;
import com.seibel.lod.wrappers.modAccessor.SodiumAccessor;
import com.seibel.lod.fabric.wrappers.modAccessor.SodiumAccessor;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientChunkEvents;
@@ -1,4 +1,4 @@
package com.seibel.lod;
package com.seibel.lod.fabric;
import com.seibel.lod.common.wrappers.DependencySetup;
import com.seibel.lod.common.wrappers.minecraft.MinecraftDedicatedServerWrapper;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod;
package com.seibel.lod.fabric;
import com.seibel.lod.api.methods.events.abstractEvents.DhApiAfterDhInitEvent;
import com.seibel.lod.api.methods.events.abstractEvents.DhApiBeforeDhInitEvent;
@@ -29,11 +29,11 @@ import com.seibel.lod.core.dependencyInjection.ModAccessorInjector;
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
import com.seibel.lod.core.logging.DhLoggerBuilder;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.*;
import com.seibel.lod.wrappers.modAccessor.BCLibAccessor;
import com.seibel.lod.wrappers.modAccessor.OptifineAccessor;
import com.seibel.lod.wrappers.modAccessor.SodiumAccessor;
import com.seibel.lod.wrappers.modAccessor.StarlightAccessor;
import com.seibel.lod.wrappers.FabricDependencySetup;
import com.seibel.lod.fabric.wrappers.modAccessor.BCLibAccessor;
import com.seibel.lod.fabric.wrappers.modAccessor.OptifineAccessor;
import com.seibel.lod.fabric.wrappers.modAccessor.SodiumAccessor;
import com.seibel.lod.fabric.wrappers.modAccessor.StarlightAccessor;
import com.seibel.lod.fabric.wrappers.FabricDependencySetup;
import org.apache.logging.log4j.Logger;
@@ -1,4 +1,4 @@
package com.seibel.lod;
package com.seibel.lod.fabric;
import com.seibel.lod.common.networking.Networking;
import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins;
package com.seibel.lod.fabric.mixins;
import com.seibel.lod.core.dependencyInjection.ModAccessorInjector;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.ISodiumAccessor;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
import com.seibel.lod.common.wrappers.world.ClientLevelWrapper;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.seibel.lod.common.wrappers.world.ClientLevelWrapper;
import com.seibel.lod.core.api.internal.ClientApi;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.seibel.lod.core.logging.f3.F3Screen;
import net.minecraft.client.gui.components.DebugScreenOverlay;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.seibel.lod.core.config.Config;
import org.spongepowered.asm.mixin.Mixin;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.seibel.lod.core.api.internal.ClientApi;
import net.minecraft.client.renderer.GameRenderer;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Matrix4f;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.mojang.blaze3d.platform.NativeImage;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.seibel.lod.common.wrappers.gui.updater.UpdateModScreen;
import com.seibel.lod.core.config.Config;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.client;
package com.seibel.lod.fabric.mixins.client;
import com.seibel.lod.common.wrappers.gui.GetConfigScreen;
import com.seibel.lod.common.wrappers.gui.TexturedButtonWidget;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.events;
package com.seibel.lod.fabric.mixins.events;
import net.minecraft.core.BlockPos;
import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.events;
package com.seibel.lod.fabric.mixins.events;
import net.minecraft.server.level.ServerLevel;
import org.spongepowered.asm.mixin.Mixin;
@@ -1,9 +1,9 @@
package com.seibel.lod.mixins.mods.sodium;
package com.seibel.lod.fabric.mixins.mods.sodium;
import com.seibel.lod.core.api.internal.ClientApi;
import com.seibel.lod.core.dependencyInjection.ModAccessorInjector;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.ISodiumAccessor;
import com.seibel.lod.wrappers.modAccessor.SodiumAccessor;
import com.seibel.lod.fabric.wrappers.modAccessor.SodiumAccessor;
import me.jellysquid.mods.sodium.client.gl.device.CommandList;
import me.jellysquid.mods.sodium.client.render.chunk.ChunkCameraContext;
import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderList;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.server;
package com.seibel.lod.fabric.mixins.server;
import org.spongepowered.asm.mixin.Mixin;
import net.minecraft.world.level.chunk.ChunkGenerator;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.server;
package com.seibel.lod.fabric.mixins.server;
import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
import com.seibel.lod.common.wrappers.world.ServerLevelWrapper;
@@ -17,12 +17,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.server;
package com.seibel.lod.fabric.mixins.server;
import java.util.concurrent.ExecutorService;
import java.util.function.Supplier;
import com.seibel.lod.FabricServerProxy;
import com.seibel.lod.fabric.FabricServerProxy;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.server.unsafe;
package com.seibel.lod.fabric.mixins.server.unsafe;
import org.spongepowered.asm.mixin.Mixin;
@@ -17,11 +17,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers;
package com.seibel.lod.fabric.wrappers;
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
import com.seibel.lod.wrappers.modAccessor.ModChecker;
import com.seibel.lod.fabric.wrappers.modAccessor.ModChecker;
/**
* Binds all necessary dependencies, so we
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers.config;
package com.seibel.lod.fabric.wrappers.config;
import com.seibel.lod.common.wrappers.gui.GetConfigScreen;
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
@@ -1,4 +1,4 @@
package com.seibel.lod.wrappers.modAccessor;
package com.seibel.lod.fabric.wrappers.modAccessor;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IBCLibAccessor;
import ru.bclib.config.ClientConfig;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers.modAccessor;
package com.seibel.lod.fabric.wrappers.modAccessor;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
import net.fabricmc.loader.api.FabricLoader;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers.modAccessor;
package com.seibel.lod.fabric.wrappers.modAccessor;
import java.util.HashSet;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers.modAccessor;
package com.seibel.lod.fabric.wrappers.modAccessor;
import java.util.HashSet;
import java.util.stream.Collectors;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers.modAccessor;
package com.seibel.lod.fabric.wrappers.modAccessor;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IStarlightAccessor;
@@ -1,7 +1,7 @@
{
"required": true,
"minVersion": "0.8",
"package": "com.seibel.lod.mixins",
"package": "com.seibel.lod.fabric.mixins",
"mixins": [
"server.unsafe.MixinThreadingDetector",
"server.MixinChunkGenerator",
@@ -23,5 +23,5 @@
"injectors": {
"defaultRequire": 1
},
"plugin": "com.seibel.lod.mixins.FabricMixinPlugin"
"plugin": "com.seibel.lod.fabric.mixins.FabricMixinPlugin"
}
+3 -3
View File
@@ -19,14 +19,14 @@
"environment": "*",
"entrypoints": {
"client": [
"com.seibel.lod.FabricClientMain"
"com.seibel.lod.fabric.FabricClientMain"
],
"server": [
"com.seibel.lod.FabricDedicatedServerMain"
"com.seibel.lod.fabric.FabricDedicatedServerMain"
],
"modmenu": [
"com.seibel.lod.wrappers.config.ModMenuIntegration"
"com.seibel.lod.fabric.wrappers.config.ModMenuIntegration"
]
},
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod;
package com.seibel.lod.forge;
import com.seibel.lod.common.wrappers.world.ClientLevelWrapper;
import com.seibel.lod.core.api.internal.ClientApi;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod;
package com.seibel.lod.forge;
import com.seibel.lod.api.methods.events.abstractEvents.DhApiAfterDhInitEvent;
import com.seibel.lod.api.methods.events.abstractEvents.DhApiBeforeDhInitEvent;
@@ -33,9 +33,9 @@ import com.seibel.lod.core.dependencyInjection.ModAccessorInjector;
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
import com.seibel.lod.core.logging.DhLoggerBuilder;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IOptifineAccessor;
import com.seibel.lod.wrappers.ForgeDependencySetup;
import com.seibel.lod.forge.wrappers.ForgeDependencySetup;
import com.seibel.lod.wrappers.modAccessor.OptifineAccessor;
import com.seibel.lod.forge.modAccessor.OptifineAccessor;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.core.Direction;
@@ -1,4 +1,4 @@
package com.seibel.lod;
package com.seibel.lod.forge;
import com.seibel.lod.common.networking.Networking;
import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins;
package com.seibel.lod.forge.mixins;
import net.minecraftforge.fml.ModList;
import org.objectweb.asm.tree.ClassNode;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.forge.mixins.client;
import com.seibel.lod.core.logging.f3.F3Screen;
import net.minecraft.client.gui.components.DebugScreenOverlay;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.client;
package com.seibel.lod.forge.mixins.client;
import com.seibel.lod.core.config.Config;
import org.spongepowered.asm.mixin.Mixin;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.forge.mixins.client;
import com.seibel.lod.core.api.internal.ClientApi;
import net.minecraft.client.renderer.GameRenderer;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.client;
package com.seibel.lod.forge.mixins.client;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Matrix4f;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.forge.mixins.client;
import com.mojang.blaze3d.platform.NativeImage;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.client;
package com.seibel.lod.forge.mixins.client;
import com.seibel.lod.common.wrappers.gui.updater.UpdateModScreen;
import com.seibel.lod.core.config.Config;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.client;
package com.seibel.lod.forge.mixins.client;
import com.seibel.lod.common.wrappers.gui.GetConfigScreen;
import com.seibel.lod.common.wrappers.gui.TexturedButtonWidget;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.server;
package com.seibel.lod.forge.mixins.server;
import org.spongepowered.asm.mixin.Mixin;
import net.minecraft.world.level.chunk.ChunkGenerator;
@@ -1,4 +1,4 @@
package com.seibel.lod.mixins.server;
package com.seibel.lod.forge.mixins.server;
import net.minecraft.world.level.chunk.ChunkGenerator;
import org.spongepowered.asm.mixin.Mixin;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.server;
package com.seibel.lod.forge.mixins.server;
import java.util.concurrent.ExecutorService;
import java.util.function.Supplier;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.mixins.server.unsafe;
package com.seibel.lod.forge.mixins.server.unsafe;
import org.spongepowered.asm.mixin.Mixin;
#if POST_MC_1_18_1
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers.modAccessor;
package com.seibel.lod.forge.modAccessor;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
import net.minecraftforge.fml.ModList;
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers.modAccessor;
package com.seibel.lod.forge.modAccessor;
import java.util.HashSet;
@@ -17,11 +17,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.wrappers;
package com.seibel.lod.forge.wrappers;
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
import com.seibel.lod.wrappers.modAccessor.ModChecker;
import com.seibel.lod.forge.modAccessor.ModChecker;
/**
* Binds all necessary dependencies so we
@@ -1,21 +1,21 @@
{
"required": true,
"minVersion": "0.8",
"package": "com.seibel.lod.mixins",
"package": "com.seibel.lod.forge.mixins",
"mixins": [
"server.unsafe.MixinThreadingDetector",
"server.MixinUtilBackgroundThread",
"server.MixinChunkGenerator",
"com.seibel.lod.forge.mixins.server.unsafe.MixinThreadingDetector",
"com.seibel.lod.forge.mixins.server.MixinUtilBackgroundThread",
"com.seibel.lod.forge.mixins.server.MixinChunkGenerator",
"server.MixinTFChunkGenerator"
],
"client": [
"client.MixinDebugScreenOverlay",
"client.MixinFogRenderer",
"client.MixinGameRenderer",
"client.MixinLevelRenderer",
"client.MixinLightmap",
"client.MixinOptionsScreen"
"com.seibel.lod.forge.mixins.client.MixinDebugScreenOverlay",
"com.seibel.lod.forge.mixins.client.MixinFogRenderer",
"com.seibel.lod.forge.mixins.client.MixinGameRenderer",
"com.seibel.lod.forge.mixins.client.MixinLevelRenderer",
"com.seibel.lod.forge.mixins.client.MixinLightmap",
"com.seibel.lod.forge.mixins.client.MixinOptionsScreen"
],
"server": [],
"plugin": "com.seibel.lod.mixins.ForgeMixinPlugin"
"plugin": "com.seibel.lod.forge.mixins.ForgeMixinPlugin"
}