清理部分tag
This commit is contained in:
parent
5e43a39995
commit
e40f77a509
7 changed files with 43 additions and 51 deletions
|
@ -1,4 +1,4 @@
|
||||||
// 1.21.1 2025-05-23T16:26:24.1302748 Tags for minecraft:item mod id superbwarfare
|
// 1.21.1 2025-05-25T01:09:39.7999946 Tags for minecraft:item mod id superbwarfare
|
||||||
44a232152f5941d0435a35483b37f8ed22fd10bf data/c/tags/item/dusts.json
|
44a232152f5941d0435a35483b37f8ed22fd10bf data/c/tags/item/dusts.json
|
||||||
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/c/tags/item/dusts/coal_coke.json
|
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/c/tags/item/dusts/coal_coke.json
|
||||||
295ddf906b7133a0558d03e9a60eea18281fe430 data/c/tags/item/dusts/iron.json
|
295ddf906b7133a0558d03e9a60eea18281fe430 data/c/tags/item/dusts/iron.json
|
||||||
|
@ -33,13 +33,11 @@ b2461a0f5cf318dde060f2b111a01c77234a0681 data/superbwarfare/tags/item/blueprint/
|
||||||
702f9ef2b959fc0d546443968556ea7db0672b04 data/superbwarfare/tags/item/blueprint/legendary.json
|
702f9ef2b959fc0d546443968556ea7db0672b04 data/superbwarfare/tags/item/blueprint/legendary.json
|
||||||
3154110c8f6b5d1473d558b7d0d2f752396dff34 data/superbwarfare/tags/item/blueprint/rare.json
|
3154110c8f6b5d1473d558b7d0d2f752396dff34 data/superbwarfare/tags/item/blueprint/rare.json
|
||||||
bb51d8b21c5e9e23551a66933577241e65af2fac data/superbwarfare/tags/item/gun.json
|
bb51d8b21c5e9e23551a66933577241e65af2fac data/superbwarfare/tags/item/gun.json
|
||||||
cd469bd18f1d19893b79c9cff9970e4db7e0e484 data/superbwarfare/tags/item/handgun.json
|
|
||||||
0ab1b2a8f5433e0d1b03446a9d0d9428e9d64feb data/superbwarfare/tags/item/heavy_weapon.json
|
0ab1b2a8f5433e0d1b03446a9d0d9428e9d64feb data/superbwarfare/tags/item/heavy_weapon.json
|
||||||
3cc00928c041f710b50eb1f7a817e0345f6f96b3 data/superbwarfare/tags/item/ingots/cemented_carbide.json
|
3cc00928c041f710b50eb1f7a817e0345f6f96b3 data/superbwarfare/tags/item/ingots/cemented_carbide.json
|
||||||
a1c6460b9c956972b74d5ad5cd206e9ae3560b03 data/superbwarfare/tags/item/ingots/steel.json
|
a1c6460b9c956972b74d5ad5cd206e9ae3560b03 data/superbwarfare/tags/item/ingots/steel.json
|
||||||
d39c5c787667ce78c214bc2fbd4931891ebaf936 data/superbwarfare/tags/item/launcher.json
|
d39c5c787667ce78c214bc2fbd4931891ebaf936 data/superbwarfare/tags/item/launcher.json
|
||||||
ab580f3989177c0589c43ca346db571011600187 data/superbwarfare/tags/item/launcher/grenade.json
|
ab580f3989177c0589c43ca346db571011600187 data/superbwarfare/tags/item/launcher/grenade.json
|
||||||
b404c6fd99d2ca68c6738f225cb7d68ee443c10a data/superbwarfare/tags/item/machine_gun.json
|
|
||||||
a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/item/military_armor.json
|
a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/item/military_armor.json
|
||||||
a38ce936246513bfdbf9c0b58807ae361c6edd78 data/superbwarfare/tags/item/normal_gun.json
|
a38ce936246513bfdbf9c0b58807ae361c6edd78 data/superbwarfare/tags/item/normal_gun.json
|
||||||
aaa533157491a82b8e23b2914deef67c4078cbed data/superbwarfare/tags/item/rifle.json
|
aaa533157491a82b8e23b2914deef67c4078cbed data/superbwarfare/tags/item/rifle.json
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"values": [
|
|
||||||
"superbwarfare:trachelium",
|
|
||||||
"superbwarfare:glock_17",
|
|
||||||
"superbwarfare:glock_18",
|
|
||||||
"superbwarfare:m_1911",
|
|
||||||
"superbwarfare:mp_443",
|
|
||||||
"superbwarfare:aurelia_sceptre"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"values": [
|
|
||||||
"superbwarfare:minigun",
|
|
||||||
"superbwarfare:devotion",
|
|
||||||
"superbwarfare:rpk",
|
|
||||||
"superbwarfare:m_60"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -80,14 +80,6 @@ public class ModItemTagProvider extends ItemTagsProvider {
|
||||||
|
|
||||||
this.tag(ModTags.Items.SMG).add(ModItems.VECTOR.get());
|
this.tag(ModTags.Items.SMG).add(ModItems.VECTOR.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.HANDGUN).add(ModItems.TRACHELIUM.get(),
|
|
||||||
ModItems.GLOCK_17.get(),
|
|
||||||
ModItems.GLOCK_18.get(),
|
|
||||||
ModItems.M_1911.get(),
|
|
||||||
ModItems.MP_443.get(),
|
|
||||||
ModItems.AURELIA_SCEPTRE.get()
|
|
||||||
);
|
|
||||||
|
|
||||||
this.tag(ModTags.Items.RIFLE).add(ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.SKS.get(),
|
this.tag(ModTags.Items.RIFLE).add(ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.SKS.get(),
|
||||||
ModItems.MK_14.get(), ModItems.MARLIN.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.QBZ_95.get());
|
ModItems.MK_14.get(), ModItems.MARLIN.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.QBZ_95.get());
|
||||||
|
|
||||||
|
@ -98,10 +90,7 @@ public class ModItemTagProvider extends ItemTagsProvider {
|
||||||
|
|
||||||
this.tag(ModTags.Items.SHOTGUN).add(ModItems.HOMEMADE_SHOTGUN.get(), ModItems.M_870.get(), ModItems.AA_12.get());
|
this.tag(ModTags.Items.SHOTGUN).add(ModItems.HOMEMADE_SHOTGUN.get(), ModItems.M_870.get(), ModItems.AA_12.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.MACHINE_GUN).add(ModItems.MINIGUN.get(), ModItems.DEVOTION.get(), ModItems.RPK.get(), ModItems.M_60.get());
|
this.tag(ModTags.Items.NORMAL_GUN).add(ModItems.HOMEMADE_SHOTGUN.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.SVD.get(), ModItems.M_60.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),
|
||||||
|
|
||||||
this.tag(ModTags.Items.NORMAL_GUN).add(
|
|
||||||
ModItems.HOMEMADE_SHOTGUN.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.SVD.get(), ModItems.M_60.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),
|
|
||||||
ModItems.SKS.get(), ModItems.RPK.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(), ModItems.DEVOTION.get(), ModItems.TRACHELIUM.get(), ModItems.M_79.get(),
|
ModItems.SKS.get(), ModItems.RPK.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(), ModItems.DEVOTION.get(), ModItems.TRACHELIUM.get(), ModItems.M_79.get(),
|
||||||
ModItems.HUNTING_RIFLE.get(), ModItems.NTW_20.get(), ModItems.M_98B.get(), ModItems.SENTINEL.get(), ModItems.M_870.get(), ModItems.MARLIN.get(), ModItems.GLOCK_17.get(), ModItems.RPG.get(),
|
ModItems.HUNTING_RIFLE.get(), ModItems.NTW_20.get(), ModItems.M_98B.get(), ModItems.SENTINEL.get(), ModItems.M_870.get(), ModItems.MARLIN.get(), ModItems.GLOCK_17.get(), ModItems.RPG.get(),
|
||||||
ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.AURELIA_SCEPTRE.get(), ModItems.QBZ_95.get(), ModItems.K_98.get(), ModItems.MOSIN_NAGANT.get(), ModItems.MP_443.get(), ModItems.INSIDIOUS.get(), ModItems.SECONDARY_CATACLYSM.get(),
|
ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.AURELIA_SCEPTRE.get(), ModItems.QBZ_95.get(), ModItems.K_98.get(), ModItems.MOSIN_NAGANT.get(), ModItems.MP_443.get(), ModItems.INSIDIOUS.get(), ModItems.SECONDARY_CATACLYSM.get(),
|
||||||
|
|
|
@ -809,10 +809,16 @@ public class ClientEventHandler {
|
||||||
|
|
||||||
Mod.queueClientWork((int) (1 + 1.5 * shooterHeight), () -> {
|
Mod.queueClientWork((int) (1 + 1.5 * shooterHeight), () -> {
|
||||||
if (gunItem.canEjectShell(stack)) {
|
if (gunItem.canEjectShell(stack)) {
|
||||||
if (stack.is(ModTags.Items.SHOTGUN)) {
|
var ammoType = data.ammoTypeInfo().playerAmmoType();
|
||||||
player.playSound(ModSounds.SHELL_CASING_SHOTGUN.get(), (float) Math.max(0.75 - 0.12 * shooterHeight, 0), (float) ((2 * org.joml.Math.random() - 1) * 0.05f + 1.0f));
|
if (ammoType != null) {
|
||||||
} else if (stack.is(ModTags.Items.SNIPER_RIFLE) || stack.is(ModTags.Items.HEAVY_WEAPON)) {
|
switch (ammoType) {
|
||||||
player.playSound(ModSounds.SHELL_CASING_50CAL.get(), (float) Math.max(1 - 0.15 * shooterHeight, 0), (float) ((2 * org.joml.Math.random() - 1) * 0.05f + 1.0f));
|
case SHOTGUN ->
|
||||||
|
player.playSound(ModSounds.SHELL_CASING_SHOTGUN.get(), (float) Math.max(0.75 - 0.12 * shooterHeight, 0), (float) ((2 * Math.random() - 1) * 0.05f + 1.0f));
|
||||||
|
case SNIPER, HEAVY ->
|
||||||
|
player.playSound(ModSounds.SHELL_CASING_50CAL.get(), (float) Math.max(1 - 0.15 * shooterHeight, 0), (float) ((2 * org.joml.Math.random() - 1) * 0.05f + 1.0f));
|
||||||
|
default ->
|
||||||
|
player.playSound(ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), (float) ((2 * org.joml.Math.random() - 1) * 0.05f + 1.0f));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
player.playSound(ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), (float) ((2 * org.joml.Math.random() - 1) * 0.05f + 1.0f));
|
player.playSound(ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), (float) ((2 * org.joml.Math.random() - 1) * 0.05f + 1.0f));
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,10 +81,16 @@ public class GunEventHandler {
|
||||||
ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, player)).getBlockPos())));
|
ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, player)).getBlockPos())));
|
||||||
|
|
||||||
Mod.queueServerWork((int) (data.bolt.actionTimer.get() / 2 + 1.5 * shooterHeight), () -> {
|
Mod.queueServerWork((int) (data.bolt.actionTimer.get() / 2 + 1.5 * shooterHeight), () -> {
|
||||||
if (stack.is(ModTags.Items.SHOTGUN)) {
|
var ammoType = data.ammoTypeInfo().playerAmmoType();
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_SHOTGUN.get(), (float) Math.max(0.75 - 0.12 * shooterHeight, 0), 1);
|
if (ammoType != null) {
|
||||||
} else if (stack.is(ModTags.Items.SNIPER_RIFLE)) {
|
switch (ammoType) {
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_50CAL.get(), (float) Math.max(1 - 0.15 * shooterHeight, 0), 1);
|
case SHOTGUN ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_SHOTGUN.get(), (float) Math.max(0.75 - 0.12 * shooterHeight, 0), 1);
|
||||||
|
case SNIPER, HEAVY ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_50CAL.get(), (float) Math.max(1 - 0.15 * shooterHeight, 0), 1);
|
||||||
|
default ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
||||||
}
|
}
|
||||||
|
@ -378,10 +384,16 @@ public class GunEventHandler {
|
||||||
ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, player)).getBlockPos())));
|
ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, player)).getBlockPos())));
|
||||||
|
|
||||||
Mod.queueServerWork((int) (data.defaultPrepareEmptyTime() / 2 + 3 + 1.5 * shooterHeight), () -> {
|
Mod.queueServerWork((int) (data.defaultPrepareEmptyTime() / 2 + 3 + 1.5 * shooterHeight), () -> {
|
||||||
if (stack.is(ModTags.Items.SHOTGUN)) {
|
var ammoType = data.ammoTypeInfo().playerAmmoType();
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_SHOTGUN.get(), (float) Math.max(0.75 - 0.12 * shooterHeight, 0), 1);
|
if (ammoType != null) {
|
||||||
} else if (stack.is(ModTags.Items.SNIPER_RIFLE) || stack.is(ModTags.Items.HEAVY_WEAPON)) {
|
switch (ammoType) {
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_50CAL.get(), (float) Math.max(1 - 0.15 * shooterHeight, 0), 1);
|
case SHOTGUN ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_SHOTGUN.get(), (float) Math.max(0.75 - 0.12 * shooterHeight, 0), 1);
|
||||||
|
case SNIPER, HEAVY ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_50CAL.get(), (float) Math.max(1 - 0.15 * shooterHeight, 0), 1);
|
||||||
|
default ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
||||||
}
|
}
|
||||||
|
@ -393,6 +405,7 @@ public class GunEventHandler {
|
||||||
public static void playGunPrepareLoadReloadSounds(Player player) {
|
public static void playGunPrepareLoadReloadSounds(Player player) {
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
if (!(stack.getItem() instanceof GunItem)) return;
|
if (!(stack.getItem() instanceof GunItem)) return;
|
||||||
|
var data = GunData.from(stack);
|
||||||
|
|
||||||
if (!player.level().isClientSide) {
|
if (!player.level().isClientSide) {
|
||||||
String origin = stack.getItem().getDescriptionId();
|
String origin = stack.getItem().getDescriptionId();
|
||||||
|
@ -406,10 +419,16 @@ public class GunEventHandler {
|
||||||
ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, player)).getBlockPos())));
|
ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, player)).getBlockPos())));
|
||||||
|
|
||||||
Mod.queueServerWork((int) (8 + 1.5 * shooterHeight), () -> {
|
Mod.queueServerWork((int) (8 + 1.5 * shooterHeight), () -> {
|
||||||
if (stack.is(ModTags.Items.SHOTGUN)) {
|
var ammoType = data.ammoTypeInfo().playerAmmoType();
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_SHOTGUN.get(), (float) Math.max(0.75 - 0.12 * shooterHeight, 0), 1);
|
if (ammoType != null) {
|
||||||
} else if (stack.is(ModTags.Items.SNIPER_RIFLE) || stack.is(ModTags.Items.HEAVY_WEAPON)) {
|
switch (ammoType) {
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_50CAL.get(), (float) Math.max(1 - 0.15 * shooterHeight, 0), 1);
|
case SHOTGUN ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_SHOTGUN.get(), (float) Math.max(0.75 - 0.12 * shooterHeight, 0), 1);
|
||||||
|
case SNIPER, HEAVY ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_50CAL.get(), (float) Math.max(1 - 0.15 * shooterHeight, 0), 1);
|
||||||
|
default ->
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SHELL_CASING_NORMAL.get(), (float) Math.max(1.5 - 0.2 * shooterHeight, 0), 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,8 @@ public class ModTags {
|
||||||
public static class Items {
|
public static class Items {
|
||||||
public static final TagKey<Item> GUN = tag("gun");
|
public static final TagKey<Item> GUN = tag("gun");
|
||||||
public static final TagKey<Item> SMG = tag("smg");
|
public static final TagKey<Item> SMG = tag("smg");
|
||||||
public static final TagKey<Item> HANDGUN = tag("handgun");
|
|
||||||
public static final TagKey<Item> RIFLE = tag("rifle");
|
public static final TagKey<Item> RIFLE = tag("rifle");
|
||||||
public static final TagKey<Item> SNIPER_RIFLE = tag("sniper_rifle");
|
public static final TagKey<Item> SNIPER_RIFLE = tag("sniper_rifle");
|
||||||
public static final TagKey<Item> MACHINE_GUN = tag("machine_gun");
|
|
||||||
public static final TagKey<Item> SHOTGUN = tag("shotgun");
|
public static final TagKey<Item> SHOTGUN = tag("shotgun");
|
||||||
public static final TagKey<Item> HEAVY_WEAPON = tag("heavy_weapon");
|
public static final TagKey<Item> HEAVY_WEAPON = tag("heavy_weapon");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue