mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-12 16:04:21 +01:00
21w19a -> 1.17-rc1
This commit is contained in:
parent
ca83c252f9
commit
7ba88d439b
7 changed files with 23 additions and 25 deletions
|
@ -40,6 +40,10 @@ minecraft {
|
|||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = 'modmenu'
|
||||
url = 'https://maven.terraformersmc.com/releases'
|
||||
}
|
||||
maven {
|
||||
name = 'minelp'
|
||||
url = 'https://repo.minelittlepony-mod.com/maven/snapshot'
|
||||
|
@ -69,9 +73,7 @@ dependencies {
|
|||
include "com.minelittlepony:Mson:${project.mson_version}"
|
||||
|
||||
modImplementation "com.minelittlepony:HDSkins:${project.hd_skins_version}"
|
||||
modCompileOnly("io.github.prospector:modmenu:${project.modmenu_version}") {
|
||||
transitive = false
|
||||
}
|
||||
modCompileOnly("com.terraformersmc:modmenu:${project.modmenu_version}")
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -3,10 +3,10 @@ org.gradle.daemon=false
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=21w19a
|
||||
yarn_mappings=21w19a+build.6
|
||||
minecraft_version=1.17-rc1
|
||||
yarn_mappings=1.17-rc1+build.4
|
||||
loader_version=0.11.3
|
||||
fabric_version=0.34.4+1.17
|
||||
fabric_version=0.34.8+1.17
|
||||
|
||||
# Mod Properties
|
||||
group=com.minelittlepony
|
||||
|
@ -17,7 +17,7 @@ org.gradle.daemon=false
|
|||
release=SNAPSHOT
|
||||
|
||||
# Dependencies
|
||||
modmenu_version=1.15.+
|
||||
kirin_version=1.8.3-21w19a-SNAPSHOT
|
||||
hd_skins_version=6.4.2-21w19a-SNAPSHOT
|
||||
mson_version=1.3.2-21w19a-SNAPSHOT
|
||||
modmenu_version=2.0.0-beta.7
|
||||
kirin_version=1.8.6-1.17-rc1-SNAPSHOT
|
||||
hd_skins_version=6.4.4-1.17-rc1-SNAPSHOT
|
||||
mson_version=1.3.2-1.17-rc1-SNAPSHOT
|
||||
|
|
|
@ -32,9 +32,11 @@ public interface TriggerPixelType<T> {
|
|||
/**
|
||||
* Returns a list of possible values this trigger pixel can accept.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
default <Option extends TriggerPixelType<T>> List<Option> getOptions() {
|
||||
if (this instanceof Enum) {
|
||||
return List.of(getClass().getEnumConstants());
|
||||
// cast is required because gradle's compiler is more strict
|
||||
return (List<Option>)List.of(getClass().getEnumConstants());
|
||||
}
|
||||
return List.of();
|
||||
}
|
||||
|
|
|
@ -45,10 +45,10 @@ public class GuiPonySettings extends GameGui {
|
|||
|
||||
content.margin.top = 30;
|
||||
content.margin.bottom = 30;
|
||||
content.padding.top = 10;
|
||||
content.padding.right = 10;
|
||||
content.padding.bottom = 20;
|
||||
content.padding.left = 10;
|
||||
content.getContentPadding().top = 10;
|
||||
content.getContentPadding().right = 10;
|
||||
content.getContentPadding().bottom = 20;
|
||||
content.getContentPadding().left = 10;
|
||||
|
||||
hiddenOptions = Screen.hasControlDown() && Screen.hasShiftDown();
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class GuiPonySettings extends GameGui {
|
|||
|
||||
int row = 0;
|
||||
|
||||
children().add(content);
|
||||
getChildElements().add(content);
|
||||
|
||||
addButton(new Label(width / 2, 5).setCentered()).getStyle().setText(getTitle().getString());
|
||||
addButton(new Button(width / 2 - 100, height - 25))
|
||||
|
|
|
@ -117,7 +117,7 @@ public class MineLittlePony implements ClientModInitializer {
|
|||
|
||||
if (show) {
|
||||
int y = hasHdSkins ? 75 : 50;
|
||||
Button button = buttons.add(new Button(screen.width - 50, screen.height - y, 20, 20))
|
||||
Button button = buttons.addButton(new Button(screen.width - 50, screen.height - y, 20, 20))
|
||||
.onClick(sender -> MinecraftClient.getInstance().openScreen(new GuiPonySettings(screen)));
|
||||
button.getStyle()
|
||||
.setIcon(new TextureSprite()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.minelittlepony.client.modmenu;
|
||||
|
||||
import io.github.prospector.modmenu.api.ConfigScreenFactory;
|
||||
import io.github.prospector.modmenu.api.ModMenuApi;
|
||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||
|
||||
import com.minelittlepony.client.GuiPonySettings;
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import java.util.Map;
|
|||
import net.minecraft.block.AbstractSkullBlock;
|
||||
import net.minecraft.block.SkullBlock;
|
||||
import net.minecraft.block.SkullBlock.SkullType;
|
||||
import net.minecraft.block.entity.SkullBlockEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
|
@ -93,13 +92,8 @@ public class SkullFeature<T extends LivingEntity, M extends EntityModel<T> & IPo
|
|||
if (itemstack.hasTag()) {
|
||||
NbtCompound nbt = itemstack.getTag();
|
||||
|
||||
assert nbt != null;
|
||||
|
||||
if (nbt.contains("SkullOwner", 10)) {
|
||||
profile = NbtHelper.toGameProfile(nbt.getCompound("SkullOwner"));
|
||||
} else if (nbt.contains("SkullOwner", 8)) {
|
||||
profile = SkullBlockEntity.loadProperties(new GameProfile(null, nbt.getString("SkullOwner")));
|
||||
nbt.put("SkullOwner", NbtHelper.writeGameProfile(new NbtCompound(), profile));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue