Disabled JavaModernSyntaxSupport

This commit is contained in:
Goodbird committed 2024-04-15 22:08:38 +03:00
1 parent d9ee1bd10a
commit 574858716d
4 files changed
+16 -17

No files matched your search

+2 -2
View File
@@ -33,7 +33,7 @@ developmentEnvironmentUserName = Kam
# Enables using modern java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = true
enableModernJavaSyntax = false
# Enables injecting missing generics into the decompiled source code for a better coding experience
# Turns most publicly visible List, Map, etc. into proper List<Type>, Map<K, V> types
@@ -157,4 +157,4 @@ disableCheckstyle = true
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be always native build.
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
# ideaOverrideBuildType = idea
#ideaOverrideBuildType = idea
+1 -1
View File
@@ -17,5 +17,5 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.14'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.15'
}
@@ -98,19 +98,15 @@ public class EntityCustomModel extends EntityCreature implements IAnimatable, IA
dialogAnim = new AnimationBuilder().playOnce(name);
}
public void activateReceivedAnim(EnumSyncAutoAnim type) {
switch (type) {
case HURT -> {
if(!hurtAnimName.isEmpty())
hurtAnim = new AnimationBuilder().playOnce(hurtAnimName);
}
case MELEE_ATTACK -> {
if(!meleeAttackAnimName.isEmpty())
attackAnim = new AnimationBuilder().playOnce(meleeAttackAnimName);
}
case RANGED_ATTACK -> {
if(!rangedAttackAnimName.isEmpty())
attackAnim = new AnimationBuilder().playOnce(rangedAttackAnimName);
}
if(type == EnumSyncAutoAnim.HURT){
if(!hurtAnimName.isEmpty())
hurtAnim = new AnimationBuilder().playOnce(hurtAnimName);
}else if(type == EnumSyncAutoAnim.MELEE_ATTACK){
if(!meleeAttackAnimName.isEmpty())
attackAnim = new AnimationBuilder().playOnce(meleeAttackAnimName);
}else if(type == EnumSyncAutoAnim.RANGED_ATTACK){
if(!rangedAttackAnimName.isEmpty())
attackAnim = new AnimationBuilder().playOnce(rangedAttackAnimName);
}
}
@@ -3,6 +3,7 @@ package com.goodbird.npcgecko.mixin.impl;
import com.goodbird.npcgecko.entity.EntityCustomModel;
import com.goodbird.npcgecko.mixin.IDataDisplay;
import com.goodbird.npcgecko.utils.NpcTextureUtils;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
import kamkeel.addon.GeckoAddon;
@@ -27,7 +28,9 @@ public class MixinGeckoAddon {
if(!supportEnabled)
return;
if (entity instanceof EntityCustomModel modelEntity && copied instanceof EntityNPCInterface npc) {
if (entity instanceof EntityCustomModel && copied instanceof EntityNPCInterface) {
EntityCustomModel modelEntity = (EntityCustomModel) entity;
EntityNPCInterface npc = (EntityNPCInterface) copied;
IDataDisplay display = (IDataDisplay) npc.display;
modelEntity.textureResLoc = NpcTextureUtils.getNpcTexture((EntityNPCInterface) copied);
modelEntity.modelResLoc = new ResourceLocation(display.getCustomModelData().getModel());