mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 23:07:37 +00:00
DBC Addon Supporting Better Animations
This commit is contained in:
1 parent
8d55502f6e
commit
c3da8f27dc
2 files changed
+15
-3
No files matched your search
@@ -1,6 +1,11 @@
|
||||
package kamkeel.npcs.addon.client;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.gui.mainmenu.GuiNpcStats;
|
||||
import noppes.npcs.client.gui.util.GuiNPCInterface2;
|
||||
import noppes.npcs.client.gui.util.GuiNpcButton;
|
||||
@@ -42,4 +47,8 @@ public class DBCClient {
|
||||
public GuiNPCInterface2 manageCustomAuras(EntityNPCInterface npcInterface) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Animation Render Helper
|
||||
public void applyRenderModel(ModelRenderer renderer){}
|
||||
public boolean firstPersonAnimation(float partialRenderTick, EntityPlayer player, ModelBiped model, RenderBlocks renderBlocksIr, ResourceLocation resItemGlint) { return false; }
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package noppes.npcs;
|
||||
|
||||
import kamkeel.npcs.addon.DBCAddon;
|
||||
import kamkeel.npcs.addon.client.DBCClient;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
@@ -52,7 +53,9 @@ public class AnimationMixinFunctions {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!DBCAddon.IsAvailable() && ClientEventHandler.renderingPlayer != null) {
|
||||
if(DBCAddon.IsAvailable() && ClientEventHandler.renderingPlayer != null){
|
||||
DBCClient.Instance.applyRenderModel(modelRenderer);
|
||||
} else if (!DBCAddon.IsAvailable() && ClientEventHandler.renderingPlayer != null) {
|
||||
ClientEventHandler.playerModel = (modelRenderer).baseModel;
|
||||
if (ClientCacheHandler.playerAnimations.containsKey(ClientEventHandler.renderingPlayer.getUniqueID())) {
|
||||
AnimationData animData = ClientCacheHandler.playerAnimations.get(ClientEventHandler.renderingPlayer.getUniqueID());
|
||||
@@ -221,8 +224,8 @@ public class AnimationMixinFunctions {
|
||||
}
|
||||
|
||||
public static boolean mixin_renderFirstPersonAnimation(float partialRenderTick, EntityPlayer player, ModelBiped model, RenderBlocks renderBlocksIr, ResourceLocation resItemGlint) {
|
||||
if (!DBCAddon.IsAvailable()) {
|
||||
return false;
|
||||
if (DBCAddon.IsAvailable()) {
|
||||
return DBCClient.Instance.firstPersonAnimation(partialRenderTick, player,model, renderBlocksIr, resItemGlint);
|
||||
}
|
||||
|
||||
AnimationData animationData = ClientCacheHandler.playerAnimations.get(player.getUniqueID());
|
||||
|
||||
Reference in new issue
Block a user