20w20b -> 1.16

This commit is contained in:
Sollace 2020-06-19 17:03:08 +02:00
parent 7d2767d9f8
commit 3a11a25de2
6 changed files with 34 additions and 36 deletions

View file

@ -1,6 +1,6 @@
plugins { plugins {
id 'java-library' id 'java-library'
id 'fabric-loom' version '0.2.7-SNAPSHOT' id 'fabric-loom' version '0.4-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }
@ -56,9 +56,9 @@ dependencies {
compileOnly "com.google.code.findbugs:jsr305:3.0.2" compileOnly "com.google.code.findbugs:jsr305:3.0.2"
modApi "net.fabricmc.fabric-api:fabric-api-base:0.1.2+" modApi fabricApi.module("fabric-api-base", project.fabric_version)
modApi "net.fabricmc.fabric-api:fabric-events-lifecycle-v0:0.1.2+1a47cd7816" modApi fabricApi.module("fabric-events-lifecycle-v0", project.fabric_version)
modApi "net.fabricmc.fabric-api:fabric-resource-loader-v0:0.1.14+" modApi fabricApi.module("fabric-resource-loader-v0", project.fabric_version)
modApi "com.minelittlepony:Kirin:${project.kirin_version}" modApi "com.minelittlepony:Kirin:${project.kirin_version}"
include "com.minelittlepony:Kirin:${project.kirin_version}" include "com.minelittlepony:Kirin:${project.kirin_version}"

View file

@ -3,9 +3,10 @@ org.gradle.daemon=false
# Fabric Properties # Fabric Properties
# check these on https://modmuss50.me/fabric.html # check these on https://modmuss50.me/fabric.html
minecraft_version=20w20b minecraft_version=1.16-rc1
yarn_mappings=20w20b+build.1:v2 yarn_mappings=1.16-rc1+build.4:v2
loader_version=0.8.3+build.196 loader_version=0.8.8+build.202
fabric_version=0.12.5+build.367-1.16
# Mod Properties # Mod Properties
group=com.minelittlepony group=com.minelittlepony
@ -16,7 +17,7 @@ org.gradle.daemon=false
release=SNAPSHOT release=SNAPSHOT
# Dependencies # Dependencies
modmenu_version=1.11.+ modmenu_version=1.12.+
kirin_version=1.6.4-20w20b-SNAPSHOT kirin_version=1.6.4-1.16-rc1-1.16-SNAPSHOT
hd_skins_version=6.1.4-20w20b-SNAPSHOT hd_skins_version=6.1.4-1.16-rc1-1.16-SNAPSHOT
mson_version=1.1.12-20w20b-SNAPSHOT mson_version=1.2-1.16-rc1-1.16-SNAPSHOT

View file

@ -94,8 +94,7 @@ public enum TriggerPixels {
} }
public int readValue(int x, int y, NativeImage image) { public int readValue(int x, int y, NativeImage image) {
/*getPixelABGR*/ return (Color.abgrToArgb(image.getPixelColor(x, y)) >> offset) & mask;
return (Color.abgrToArgb(image.getPixelRgba(x, y)) >> offset) & mask;
} }
} }
} }

View file

@ -16,8 +16,7 @@ import com.minelittlepony.common.util.GamePaths;
import com.minelittlepony.settings.PonyConfig; import com.minelittlepony.settings.PonyConfig;
import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.keybinding.FabricKeyBinding; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.fabricmc.fabric.api.client.keybinding.KeyBindingRegistry;
import net.fabricmc.fabric.api.event.client.ClientTickCallback; import net.fabricmc.fabric.api.event.client.ClientTickCallback;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper; import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
import net.fabricmc.loader.api.FabricLoader; import net.fabricmc.loader.api.FabricLoader;
@ -46,7 +45,7 @@ public class MineLittlePony implements ClientModInitializer {
private ClientPonyConfig config; private ClientPonyConfig config;
private PonyManager ponyManager; private PonyManager ponyManager;
private FabricKeyBinding keyBinding; private final KeyBinding keyBinding = new KeyBinding("key.minelittlepony.settings", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_F9, "key.categories.misc");
private boolean hasHdSkins; private boolean hasHdSkins;
private boolean hasModMenu; private boolean hasModMenu;
@ -69,9 +68,8 @@ public class MineLittlePony implements ClientModInitializer {
config = new ClientPonyConfig(GamePaths.getConfigDirectory().resolve("minelp.json")); config = new ClientPonyConfig(GamePaths.getConfigDirectory().resolve("minelp.json"));
ponyManager = new PonyManager(config); ponyManager = new PonyManager(config);
keyBinding = FabricKeyBinding.Builder.create(new Identifier("minelittlepony", "settings"), InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_F9, "key.categories.misc").build();
KeyBindingRegistry.INSTANCE.register(keyBinding); KeyBindingHelper.registerKeyBinding(keyBinding);
ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(ponyManager); ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(ponyManager);

View file

@ -3,7 +3,7 @@ package com.minelittlepony.client.render.entity;
import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.ArmorStandEntityRenderer; import net.minecraft.client.render.entity.ArmorStandEntityRenderer;
import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderDispatcher;
import net.minecraft.client.render.entity.feature.ArmorBipedFeatureRenderer; import net.minecraft.client.render.entity.feature.ArmorFeatureRenderer;
import net.minecraft.client.render.entity.feature.ElytraFeatureRenderer; import net.minecraft.client.render.entity.feature.ElytraFeatureRenderer;
import net.minecraft.client.render.entity.feature.FeatureRendererContext; import net.minecraft.client.render.entity.feature.FeatureRendererContext;
import net.minecraft.client.render.entity.feature.HeadFeatureRenderer; import net.minecraft.client.render.entity.feature.HeadFeatureRenderer;
@ -33,7 +33,7 @@ public class PonyStandRenderer extends ArmorStandEntityRenderer {
addFeature(new HeadFeatureRenderer<>(this)); addFeature(new HeadFeatureRenderer<>(this));
} }
class Armour extends ArmorBipedFeatureRenderer<ArmorStandEntity, ArmorStandArmorEntityModel, ArmorStandArmorEntityModel> { class Armour extends ArmorFeatureRenderer<ArmorStandEntity, ArmorStandArmorEntityModel, ArmorStandArmorEntityModel> {
private final ModelWrapper<ArmorStandEntity, EarthPonyModel<ArmorStandEntity>> pony = new ModelWrapper<>(ModelType.EARTH_PONY.getKey(false)); private final ModelWrapper<ArmorStandEntity, EarthPonyModel<ArmorStandEntity>> pony = new ModelWrapper<>(ModelType.EARTH_PONY.getKey(false));
public Armour(FeatureRendererContext<ArmorStandEntity, ArmorStandArmorEntityModel> context) { public Armour(FeatureRendererContext<ArmorStandEntity, ArmorStandArmorEntityModel> context) {

View file

@ -14,8 +14,8 @@ import static org.lwjgl.opengl.GL11.*;
public class NativeUtil { public class NativeUtil {
enum InternalFormat { enum InternalFormat {
RGB(NativeImage.Format.RGB), RGB(NativeImage.Format.BGR),
RGBA(NativeImage.Format.RGBA), RGBA(NativeImage.Format.ABGR),
LUMINANCE_ALPHA(NativeImage.Format.LUMINANCE_ALPHA), LUMINANCE_ALPHA(NativeImage.Format.LUMINANCE_ALPHA),
LUMINANCE(NativeImage.Format.LUMINANCE), LUMINANCE(NativeImage.Format.LUMINANCE),
@ -41,21 +41,21 @@ public class NativeUtil {
INTENSITY12(GL_INTENSITY12, NativeImage.Format.LUMINANCE), INTENSITY12(GL_INTENSITY12, NativeImage.Format.LUMINANCE),
INTENSITY16(GL_INTENSITY16, NativeImage.Format.LUMINANCE), INTENSITY16(GL_INTENSITY16, NativeImage.Format.LUMINANCE),
R3_G3_B2(GL_R3_G3_B2, NativeImage.Format.RGB), R3_G3_B2(GL_R3_G3_B2, NativeImage.Format.BGR),
RGB4(GL_RGB4, NativeImage.Format.RGB), RGB4(GL_RGB4, NativeImage.Format.BGR),
RGB5(GL_RGB5, NativeImage.Format.RGB), RGB5(GL_RGB5, NativeImage.Format.BGR),
RGB8(GL_RGB8, NativeImage.Format.RGB), RGB8(GL_RGB8, NativeImage.Format.BGR),
RGB10(GL_RGB10, NativeImage.Format.RGB), RGB10(GL_RGB10, NativeImage.Format.BGR),
RGB12(GL_RGB12, NativeImage.Format.RGB), RGB12(GL_RGB12, NativeImage.Format.BGR),
RGB16(GL_RGB16, NativeImage.Format.RGB), RGB16(GL_RGB16, NativeImage.Format.BGR),
RGBA2(GL_RGBA2, NativeImage.Format.RGBA), RGBA2(GL_RGBA2, NativeImage.Format.ABGR),
RGBA4(GL_RGBA4, NativeImage.Format.RGBA), RGBA4(GL_RGBA4, NativeImage.Format.ABGR),
RGB5_A1(GL_RGB5_A1, NativeImage.Format.RGBA), RGB5_A1(GL_RGB5_A1, NativeImage.Format.ABGR),
RGBA8(GL_RGBA8, NativeImage.Format.RGBA), RGBA8(GL_RGBA8, NativeImage.Format.ABGR),
RGB10_A2(GL_RGB10_A2, NativeImage.Format.RGBA), RGB10_A2(GL_RGB10_A2, NativeImage.Format.ABGR),
RGBA12(GL_RGBA12, NativeImage.Format.RGBA), RGBA12(GL_RGBA12, NativeImage.Format.ABGR),
RGBA16(GL_RGBA16, NativeImage.Format.RGBA); RGBA16(GL_RGBA16, NativeImage.Format.ABGR);
private final NativeImage.Format formatClass; private final NativeImage.Format formatClass;
private final int glId; private final int glId;