添加物品模型图标

This commit is contained in:
17146 2024-05-18 18:28:16 +08:00
parent a1de705015
commit 43607e3ef5
32 changed files with 51 additions and 6 deletions

View file

@ -125,8 +125,8 @@ public class AmmoBarOverlay {
event.getGuiGraphics().drawString(
Minecraft.getInstance().font,
centerString(gunItem.getGunDisplayName(), 20),
w / 2 + 140,
h - 38,
w / 2 + 138,
h - 34,
0xFFFFFF,
true
);
@ -135,8 +135,8 @@ public class AmmoBarOverlay {
event.getGuiGraphics().drawString(
Minecraft.getInstance().font,
centerString(getGunAmmoType(stack), 20),
w / 2 + 140,
h - 30,
w / 2 + 138,
h - 26,
0xC8A679,
true
);

View file

@ -15,6 +15,7 @@ import net.minecraft.client.model.HumanoidModel;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.Entity;
@ -186,4 +187,14 @@ public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
public void setAnimationProcedure(String procedure) {
this.animationProcedure = procedure;
}
@Override
public ResourceLocation getGunIcon() {
return new ResourceLocation(TargetMod.MODID, "textures/gun_icon/ak_47_icon.png");
}
@Override
public String getGunDisplayName() {
return "AK-47";
}
}

View file

@ -195,7 +195,7 @@ public class Aa12Item extends GunItem implements GeoItem, AnimatedItem {
@Override
public ResourceLocation getGunIcon() {
return new ResourceLocation(TargetMod.MODID, "textures/gun_icon/aa_12.png");
return new ResourceLocation(TargetMod.MODID, "textures/gun_icon/aa_12_icon.png");
}
@Override

View file

@ -15,6 +15,7 @@ import net.minecraft.client.model.HumanoidModel;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.Entity;
@ -177,4 +178,14 @@ public class Abekiri extends GunItem implements GeoItem, AnimatedItem {
public void setAnimationProcedure(String procedure) {
this.animationProcedure = procedure;
}
@Override
public ResourceLocation getGunIcon() {
return new ResourceLocation(TargetMod.MODID, "textures/gun_icon/abekiri_icon.png");
}
@Override
public String getGunDisplayName() {
return "Abekiri";
}
}

View file

@ -2,6 +2,7 @@ package net.mcreator.target.item.gun;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import net.mcreator.target.TargetMod;
import net.mcreator.target.client.renderer.item.BocekItemRenderer;
import net.mcreator.target.init.TargetModItems;
import net.mcreator.target.item.AnimatedItem;
@ -14,6 +15,7 @@ import net.minecraft.client.player.LocalPlayer;
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
@ -180,4 +182,14 @@ public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
public void setAnimationProcedure(String procedure) {
this.animationProcedure = procedure;
}
@Override
public ResourceLocation getGunIcon() {
return new ResourceLocation(TargetMod.MODID, "textures/gun_icon/bocek_icon.png");
}
@Override
public String getGunDisplayName() {
return "Bocek";
}
}

View file

@ -18,6 +18,7 @@ import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
import net.minecraft.commands.CommandSource;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.InteractionHand;
@ -234,4 +235,14 @@ public class Devotion extends GunItem implements GeoItem, AnimatedItem {
public void setAnimationProcedure(String procedure) {
this.animationProcedure = procedure;
}
@Override
public ResourceLocation getGunIcon() {
return new ResourceLocation(TargetMod.MODID, "textures/gun_icon/devotion_icon.png");
}
@Override
public String getGunDisplayName() {
return "Devotion";
}
}

View file

@ -96,7 +96,7 @@ public abstract class GunItem extends Item {
}
public ResourceLocation getGunIcon() {
return new ResourceLocation(TargetMod.MODID, "textures/gun_icon/default.png");
return new ResourceLocation(TargetMod.MODID, "textures/gun_icon/default_icon.png");
}
public String getGunDisplayName() {

View file

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View file

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB