版本信息
你使用的系统:windows 10 x64
你用的JDK是: 1.8.0_271
你使用的IDE:IntelliJ IDEA
你使用的IDE版本:2019.3.5
Forge版本: fabric
Minecraft版本: 1.16.4
出错图
错误情况简述
材质出现错误渲染,我不理解这是怎么个运作方式。
如果你需要查看我别的类,我会想办法给你看的。
请尽快回复,我是住校生,明早就去学校了。如果实在没时间就下周在说了。
报错日志
[19:27:58] [main/WARN] (Minecraft) Failed to load texture: minecraft:textures/models/armor/fabric_layer_1.png
java.io.FileNotFoundException: minecraft:textures/models/armor/fabric_layer_1.png
at net.minecraft.resource.NamespaceResourceManager.getResource(NamespaceResourceManager.java:65) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.resource.ReloadableResourceManagerImpl.getResource(ReloadableResourceManagerImpl.java:64) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.ResourceTexture$TextureData.load(ResourceTexture.java:97) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.ResourceTexture.loadTextureData(ResourceTexture.java:56) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.ResourceTexture.load(ResourceTexture.java:26) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.TextureManager.method_24303(TextureManager.java:94) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.TextureManager.registerTexture(TextureManager.java:65) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.TextureManager.bindTextureInner(TextureManager.java:58) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.TextureManager.bindTexture(TextureManager.java:49) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.RenderPhase$Texture.method_23563(RenderPhase.java:636) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.RenderPhase.startDrawing(RenderPhase.java:109) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:408) ~[guava-21.0.jar:?]
at net.minecraft.client.render.RenderLayer$MultiPhase.method_23596(RenderLayer.java:351) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.RenderPhase.startDrawing(RenderPhase.java:109) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.RenderLayer.draw(RenderLayer.java:279) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.VertexConsumerProvider$Immediate.draw(VertexConsumerProvider.java:84) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.VertexConsumerProvider$Immediate.getBuffer(VertexConsumerProvider.java:44) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.item.ItemRenderer.getArmorGlintConsumer(ItemRenderer.java:155) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.feature.ArmorFeatureRenderer.renderArmorParts(ArmorFeatureRenderer.java:90) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.feature.ArmorFeatureRenderer.renderArmor(ArmorFeatureRenderer.java:58) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.feature.ArmorFeatureRenderer.render(ArmorFeatureRenderer.java:36) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.feature.ArmorFeatureRenderer.render(ArmorFeatureRenderer.java:29) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.LivingEntityRenderer.render(LivingEntityRenderer.java:128) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.PlayerEntityRenderer.render(PlayerEntityRenderer.java:63) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.PlayerEntityRenderer.render(PlayerEntityRenderer.java:44) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.EntityRenderDispatcher.render(EntityRenderDispatcher.java:255) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.InventoryScreen.method_29977(InventoryScreen.java:128) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at com.mojang.blaze3d.systems.RenderSystem.runAsFancy(RenderSystem.java:823) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.InventoryScreen.drawEntity(InventoryScreen.java:128) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen.drawBackground(CreativeInventoryScreen.java:683) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.HandledScreen.render(HandledScreen.java:92) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen.render(AbstractInventoryScreen.java:45) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen.render(CreativeInventoryScreen.java:595) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.GameRenderer.render(GameRenderer.java:492) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1007) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:624) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.main.Main.main(Main.java:187) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_271]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_271]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_271]
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:224) [[email protected]_16_4.1.16.4+build.6-v2.jar:?]
at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:141) [[email protected]_16_4.1.16.4+build.6-v2.jar:?]
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:27) [[email protected]_16_4.1.16.4+build.6-v2.jar:?]
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]
[19:27:59] [main/WARN] (Minecraft) Failed to load texture: minecraft:textures/models/armor/fabric_layer_2.png
java.io.FileNotFoundException: minecraft:textures/models/armor/fabric_layer_2.png
at net.minecraft.resource.NamespaceResourceManager.getResource(NamespaceResourceManager.java:65) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.resource.ReloadableResourceManagerImpl.getResource(ReloadableResourceManagerImpl.java:64) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.ResourceTexture$TextureData.load(ResourceTexture.java:97) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.ResourceTexture.loadTextureData(ResourceTexture.java:56) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.ResourceTexture.load(ResourceTexture.java:26) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.TextureManager.method_24303(TextureManager.java:94) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.TextureManager.registerTexture(TextureManager.java:65) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.TextureManager.bindTextureInner(TextureManager.java:58) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.texture.TextureManager.bindTexture(TextureManager.java:49) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.RenderPhase$Texture.method_23563(RenderPhase.java:636) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.RenderPhase.startDrawing(RenderPhase.java:109) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:408) ~[guava-21.0.jar:?]
at net.minecraft.client.render.RenderLayer$MultiPhase.method_23596(RenderLayer.java:351) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.RenderPhase.startDrawing(RenderPhase.java:109) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.RenderLayer.draw(RenderLayer.java:279) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.VertexConsumerProvider$Immediate.draw(VertexConsumerProvider.java:84) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.VertexConsumerProvider$Immediate.getBuffer(VertexConsumerProvider.java:44) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.item.ItemRenderer.getArmorGlintConsumer(ItemRenderer.java:155) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.feature.ArmorFeatureRenderer.renderArmorParts(ArmorFeatureRenderer.java:90) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.feature.ArmorFeatureRenderer.renderArmor(ArmorFeatureRenderer.java:58) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.feature.ArmorFeatureRenderer.render(ArmorFeatureRenderer.java:37) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.feature.ArmorFeatureRenderer.render(ArmorFeatureRenderer.java:29) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.LivingEntityRenderer.render(LivingEntityRenderer.java:128) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.PlayerEntityRenderer.render(PlayerEntityRenderer.java:63) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.PlayerEntityRenderer.render(PlayerEntityRenderer.java:44) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.entity.EntityRenderDispatcher.render(EntityRenderDispatcher.java:255) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.InventoryScreen.method_29977(InventoryScreen.java:128) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at com.mojang.blaze3d.systems.RenderSystem.runAsFancy(RenderSystem.java:823) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.InventoryScreen.drawEntity(InventoryScreen.java:128) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen.drawBackground(CreativeInventoryScreen.java:683) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.HandledScreen.render(HandledScreen.java:92) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen.render(AbstractInventoryScreen.java:45) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen.render(CreativeInventoryScreen.java:595) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.render.GameRenderer.render(GameRenderer.java:492) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1007) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:624) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at net.minecraft.client.main.Main.main(Main.java:187) [minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_271]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_271]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_271]
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:224) [[email protected]_16_4.1.16.4+build.6-v2.jar:?]
at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:141) [[email protected]_16_4.1.16.4+build.6-v2.jar:?]
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:27) [[email protected]_16_4.1.16.4+build.6-v2.jar:?]
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]
相关代码
FabricArmor
package net.rechalow.course.item.armor;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.recipe.Ingredient;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.rechalow.course.item.ItemInput;
public class FabricArmor implements ArmorMaterial {
public static final FabricArmor ARMOR_SETTING = new FabricArmor();
public static final int[] BASE_DURABILITY = {13,15,16,11};
public static final int[] PROTECTION_VALUES = {3,6,8,3};
@Override
public int getDurability(EquipmentSlot slot) {
return BASE_DURABILITY[slot.getEntitySlotId()] * 3;
}
@Override
public int getProtectionAmount(EquipmentSlot slot) {
return PROTECTION_VALUES[slot.getEntitySlotId()];
}
@Override
public int getEnchantability() {
return 30;
}
@Override
public SoundEvent getEquipSound() {
return SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE;
}
@Override
public Ingredient getRepairIngredient() {
return Ingredient.ofItems(ItemInput.FABRIC_ITEM);
}
@Override
public String getName() {
return "fabric";
}
@Override
public float getToughness() {
return 5.0F;
}
@Override
public float getKnockbackResistance() {
return 0.5F;
}
}
查到的资料