添加MP5,修复RPG和AGM65能破坏基岩的bug

This commit is contained in:
Atsuishio 2025-05-29 14:08:57 +08:00 committed by Light_Quanta
parent 0edc1749ae
commit 3cb6940ec8
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
42 changed files with 14685 additions and 11 deletions

View file

@ -1,4 +1,4 @@
// 1.21.1 2025-05-25T01:09:39.7999946 Tags for minecraft:item mod id superbwarfare
// 1.21.1 2025-05-29T14:19:09.6751449 Tags for minecraft:item mod id superbwarfare
44a232152f5941d0435a35483b37f8ed22fd10bf data/c/tags/item/dusts.json
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/c/tags/item/dusts/coal_coke.json
295ddf906b7133a0558d03e9a60eea18281fe430 data/c/tags/item/dusts/iron.json
@ -32,14 +32,14 @@ b2461a0f5cf318dde060f2b111a01c77234a0681 data/superbwarfare/tags/item/blueprint/
3c4adac76810982986b6cd9845192ae8416324f4 data/superbwarfare/tags/item/blueprint/epic.json
702f9ef2b959fc0d546443968556ea7db0672b04 data/superbwarfare/tags/item/blueprint/legendary.json
3154110c8f6b5d1473d558b7d0d2f752396dff34 data/superbwarfare/tags/item/blueprint/rare.json
bb51d8b21c5e9e23551a66933577241e65af2fac data/superbwarfare/tags/item/gun.json
7883255b8f5dfc9431da131803ea584c3c8f0a6b data/superbwarfare/tags/item/gun.json
0ab1b2a8f5433e0d1b03446a9d0d9428e9d64feb data/superbwarfare/tags/item/heavy_weapon.json
3cc00928c041f710b50eb1f7a817e0345f6f96b3 data/superbwarfare/tags/item/ingots/cemented_carbide.json
a1c6460b9c956972b74d5ad5cd206e9ae3560b03 data/superbwarfare/tags/item/ingots/steel.json
d39c5c787667ce78c214bc2fbd4931891ebaf936 data/superbwarfare/tags/item/launcher.json
ab580f3989177c0589c43ca346db571011600187 data/superbwarfare/tags/item/launcher/grenade.json
a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/item/military_armor.json
a38ce936246513bfdbf9c0b58807ae361c6edd78 data/superbwarfare/tags/item/normal_gun.json
59191d01728862b5bf61c1185178f60fa59cfcd5 data/superbwarfare/tags/item/normal_gun.json
aaa533157491a82b8e23b2914deef67c4078cbed data/superbwarfare/tags/item/rifle.json
a249d9d052cdc24b34e0e51ab991329f6c76e8ab data/superbwarfare/tags/item/shotgun.json
4aca0fa3f8b9f2a4920041e35e46dae7e93d5482 data/superbwarfare/tags/item/smg.json

View file

@ -1,4 +1,4 @@
// 1.21.1 2025-05-23T16:26:24.1332033 Loot Tables
// 1.21.1 2025-05-29T14:19:09.6770973 Loot Tables
e71d9e1055ddb98520b16fafd202f9db3a696f54 data/superbwarfare/loot_table/blocks/aircraft_catapult.json
98386b2e65b2afb7cf5b0cabf6a7b0f062c1e640 data/superbwarfare/loot_table/blocks/barbed_wire.json
811e69929a14e6736015849c220100bb58d914c9 data/superbwarfare/loot_table/blocks/cemented_carbide_block.json
@ -23,7 +23,7 @@ a0180f3c8988e3564d05bbdd0862c10305ed663e data/superbwarfare/loot_table/blocks/sm
71fc892124b5343e10688cabc2fb7c87d83cfef8 data/superbwarfare/loot_table/blocks/tungsten_block.json
5f0de0936df3f782d015d5ee22a224e54c943d5c data/superbwarfare/loot_table/blocks/vehicle_deployer.json
6e2346c664cd643bff31c0a26e463c6c8dd46e37 data/superbwarfare/loot_table/chests/ancient_cpu.json
031ebfa016c816ebbd03dcf03f169599eed3e9d4 data/superbwarfare/loot_table/chests/blue_print_common.json
989c3a0ca2390c1f612a13cd1c46585a1cd1e2ce data/superbwarfare/loot_table/chests/blue_print_common.json
0af7c5ebb98f2bce81cc74a07dd6f7eadc784395 data/superbwarfare/loot_table/chests/blue_print_epic.json
6b029a02d770be6751637f7f63110d08a3c7f753 data/superbwarfare/loot_table/chests/blue_print_rare.json
7e75ff103ccdbcf6be6f61413a4173115195f0a9 data/superbwarfare/loot_table/containers/blueprints.json

View file

@ -1,4 +1,4 @@
// 1.21.1 2025-05-25T01:07:56.8577238 Item Models: superbwarfare
// 1.21.1 2025-05-29T14:19:09.6790507 Item Models: superbwarfare
06b82c2eb3d0312eaa6085814e1497e61139fc9c assets/superbwarfare/models/item/aa_12.json
fb3a995587b2c253571c3160ff02c2ad8c73ecf8 assets/superbwarfare/models/item/aa_12_base.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/aa_12_blueprint.json
@ -137,6 +137,10 @@ ac79ab39ec59ce7a2d52d7bd472f0fa8ff50810b assets/superbwarfare/models/item/mp_443
e99d2028715786071c4c397a83337e00e6af2409 assets/superbwarfare/models/item/mp_443_base.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mp_443_blueprint.json
ea51ca13b0d1d2c2f265825f397a893e46e95787 assets/superbwarfare/models/item/mp_443_icon.json
c5a9e41eea44bdc53c9b12f5b29ca128f51b209d assets/superbwarfare/models/item/mp_5.json
90f39909e252c2446c79d64619e960994ed1970e assets/superbwarfare/models/item/mp_5_base.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mp_5_blueprint.json
3d020cdb1190e419c1873f9813057819b580747a assets/superbwarfare/models/item/mp_5_icon.json
e49ed6852748307cbacb7f91eda7400c84ad5f58 assets/superbwarfare/models/item/m_1911.json
9564d9a7a4a4f05dd6840e166d601d7fc50a29ce assets/superbwarfare/models/item/m_1911_base.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_1911_blueprint.json

View file

@ -0,0 +1,27 @@
{
"base": {
"parent": "superbwarfare:item/mp_5_base"
},
"gui_light": "front",
"loader": "neoforge:separate_transforms",
"perspectives": {
"fixed": {
"parent": "superbwarfare:lod/mp_5"
},
"ground": {
"parent": "superbwarfare:lod/mp_5"
},
"gui": {
"parent": "superbwarfare:item/mp_5_icon"
},
"head": {
"parent": "superbwarfare:lod/mp_5"
},
"thirdperson_lefthand": {
"parent": "superbwarfare:lod/mp_5"
},
"thirdperson_righthand": {
"parent": "superbwarfare:lod/mp_5"
}
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "superbwarfare:displaysettings/mp_5.item",
"textures": {
"layer0": "superbwarfare:item/mp_5"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "superbwarfare:item/gun_blueprint"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "superbwarfare:item/mp_5_icon"
}
}

View file

@ -94,6 +94,11 @@
"name": "superbwarfare:m2hb_blueprint",
"weight": 15
},
{
"type": "minecraft:item",
"name": "superbwarfare:mp_5_blueprint",
"weight": 15
},
{
"type": "minecraft:item",
"name": "superbwarfare:trachelium_blueprint"

View file

@ -7,6 +7,7 @@
"superbwarfare:m_1911",
"superbwarfare:homemade_shotgun",
"superbwarfare:trachelium",
"superbwarfare:mp_5",
"superbwarfare:vector",
"superbwarfare:ak_47",
"superbwarfare:ak_12",

View file

@ -33,6 +33,7 @@
"superbwarfare:insidious",
"superbwarfare:secondary_cataclysm",
"superbwarfare:taser",
"superbwarfare:minigun"
"superbwarfare:minigun",
"superbwarfare:mp_5"
]
}

View file

@ -0,0 +1,127 @@
package com.atsuishio.superbwarfare.client.model.item;
import com.atsuishio.superbwarfare.Mod;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.client.overlay.CrossHairOverlay;
import com.atsuishio.superbwarfare.data.gun.GunData;
import com.atsuishio.superbwarfare.data.gun.value.AttachmentType;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.item.gun.GunItem;
import com.atsuishio.superbwarfare.item.gun.smg.Mp5Item;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import software.bernie.geckolib.animation.AnimationState;
import software.bernie.geckolib.cache.object.GeoBone;
import software.bernie.geckolib.model.GeoModel;
public class Mp5ItemModel extends GeoModel<Mp5Item> {
public static float fireRotY = 0f;
public static float fireRotZ = 0f;
@Override
public ResourceLocation getAnimationResource(Mp5Item animatable) {
return Mod.loc("animations/mp_5.animation.json");
}
@Override
public ResourceLocation getModelResource(Mp5Item animatable) {
return Mod.loc("geo/mp_5.geo.json");
}
@Override
public ResourceLocation getTextureResource(Mp5Item animatable) {
return Mod.loc("textures/item/mp_5.png");
}
@Override
public void setCustomAnimations(Mp5Item animatable, long instanceId, AnimationState animationState) {
GeoBone gun = getAnimationProcessor().getBone("bone");
GeoBone scope2 = getAnimationProcessor().getBone("Scope2");
Player player = Minecraft.getInstance().player;
if (player == null) return;
ItemStack stack = player.getMainHandItem();
if (!(stack.getItem() instanceof GunItem)) return;
float times = 0.6f * (float) Math.min(Minecraft.getInstance().getTimer().getRealtimeDeltaTicks(), 0.8);
double zt = ClientEventHandler.zoomTime;
double zp = ClientEventHandler.zoomPos;
double zpz = ClientEventHandler.zoomPosZ;
double fpz = ClientEventHandler.firePosZ * 15 * times;
double fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
int type = GunData.from(stack).attachment.get(AttachmentType.SCOPE);
float posY = switch (type) {
case 1 -> 0.37f;
case 2 -> -0.62f;
default -> 1.07f;
};
float scaleZ = switch (type) {
case 0, 1 -> 0.3f;
case 2 -> 0.8f;
default -> 0f;
};
float posZ = switch (type) {
case 0 -> 4f;
case 1 -> 5.1f;
case 2 -> 8f;
default -> 0f;
};
gun.setPosX(2.71f * (float) zp);
gun.setPosY(posY * (float) zp - (float) (0.2f * zpz));
gun.setPosZ(posZ * (float) zp + (float) (0.3f * zpz));
gun.setScaleZ(1f - (scaleZ * (float) zp));
scope2.setScaleZ(1f - (0.8f * (float) zp));
GeoBone shen;
if (zt < 0.5) {
shen = getAnimationProcessor().getBone("fireRootNormal");
} else {
shen = switch (type) {
case 0 -> getAnimationProcessor().getBone("fireRoot0");
case 1 -> getAnimationProcessor().getBone("fireRoot1");
case 2 -> getAnimationProcessor().getBone("fireRoot2");
default -> getAnimationProcessor().getBone("fireRootNormal");
};
}
fireRotY = (float) Mth.lerp(0.5f * times, fireRotY, 0.2f * ClientEventHandler.recoilHorizon * fpz);
fireRotZ = (float) Mth.lerp(2f * times, fireRotZ, (0.2f + 0.3 * fpz) * ClientEventHandler.recoilHorizon);
shen.setPosX(-0.4f * (float) (ClientEventHandler.recoilHorizon * (0.5 + 0.4 * ClientEventHandler.fireSpread)));
shen.setPosY((float) (0.15f * fp + 0.18f * fr));
shen.setPosZ((float) (0.375 * fp + 0.44f * fr + 0.75 * fpz));
shen.setRotX((float) (0.01f * fp + 0.05f * fr + 0.01f * fpz));
shen.setRotY(fireRotY);
shen.setRotZ(fireRotZ);
shen.setPosX((float) (shen.getPosX() * (1 - 0.1 * zt)));
shen.setPosY((float) (shen.getPosY() * (-1 + 0.8 * zt)));
shen.setPosZ((float) (shen.getPosZ() * (1 - 0.1 * zt)));
shen.setRotX((float) (shen.getRotX() * (1 - (type == 3 ? 0.96 : type == 1 ? 0.8 : 0.9) * zt)));
shen.setRotY((float) (shen.getRotY() * (1 - (type == 3 ? 0.95 : 0.9) * zt)));
shen.setRotZ((float) (shen.getRotZ() * (1 - 0.4 * zt)));
CrossHairOverlay.gunRot = shen.getRotZ();
ClientEventHandler.gunRootMove(getAnimationProcessor());
GeoBone camera = getAnimationProcessor().getBone("camera");
GeoBone main = getAnimationProcessor().getBone("0");
float numR = (float) (1 - 0.92 * zt);
float numP = (float) (1 - 0.88 * zt);
AnimationHelper.handleReloadShakeAnimation(stack, main, camera, numR, numP);
ClientEventHandler.handleReloadShake(Mth.RAD_TO_DEG * camera.getRotX(), Mth.RAD_TO_DEG * camera.getRotY(), Mth.RAD_TO_DEG * camera.getRotZ());
AnimationHelper.handleShellsAnimation(getAnimationProcessor(), 1.2f, 0.45f);
}
}

View file

@ -0,0 +1,73 @@
package com.atsuishio.superbwarfare.client.renderer.gun;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.client.ItemModelHelper;
import com.atsuishio.superbwarfare.client.model.item.Mp5ItemModel;
import com.atsuishio.superbwarfare.client.renderer.CustomGunRenderer;
import com.atsuishio.superbwarfare.data.gun.GunData;
import com.atsuishio.superbwarfare.data.gun.value.AttachmentType;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.item.gun.GunItem;
import com.atsuishio.superbwarfare.item.gun.smg.Mp5Item;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.world.item.ItemStack;
import software.bernie.geckolib.cache.object.GeoBone;
public class Mp5ItemRenderer extends CustomGunRenderer<Mp5Item> {
public Mp5ItemRenderer() {
super(new Mp5ItemModel());
}
@Override
public void renderRecursively(PoseStack stack, Mp5Item animatable, GeoBone bone, RenderType type, MultiBufferSource buffer, VertexConsumer bufferIn, boolean isReRender, float partialTick, int packedLightIn, int packedOverlayIn, int color) {
Minecraft mc = Minecraft.getInstance();
String name = bone.getName();
boolean renderingArms = false;
if (name.equals("Lefthand") || name.equals("Righthand")) {
bone.setHidden(true);
renderingArms = true;
} else {
bone.setHidden(false);
}
var player = mc.player;
if (player == null) return;
ItemStack itemStack = player.getMainHandItem();
if (!(itemStack.getItem() instanceof GunItem)) return;
if (name.equals("yugu")) {
bone.setHidden(GunData.from(itemStack).attachment.get(AttachmentType.GRIP) == 0);
}
if (name.equals("bashou")) {
bone.setHidden(GunData.from(itemStack).attachment.get(AttachmentType.GRIP) != 0);
}
if (GunData.from(itemStack).attachment.get(AttachmentType.SCOPE) == 2 && (bone.getName().endsWith("_hide2"))) {
bone.setHidden(ClientEventHandler.zoomPos > 0.7 && ClientEventHandler.zoom);
}
int scopeType = GunData.from(itemStack).attachment.get(AttachmentType.SCOPE);
switch (scopeType) {
case 1 ->
AnimationHelper.handleZoomCrossHair(currentBuffer, renderType, name, stack, bone, buffer, 0, 0.42, 14, 1, 255, 0, 0, 255, "dot", false);
case 2 ->
AnimationHelper.handleZoomCrossHair(currentBuffer, renderType, name, stack, bone, buffer, 0, 0.52, 14, 1.4f, 255, 0, 0, 255, "acog", true);
}
AnimationHelper.handleShootFlare(name, stack, itemStack, bone, buffer, packedLightIn, 0, 0.05, 1, 0.35);
ItemModelHelper.handleGunAttachments(bone, itemStack, name);
if (renderingArms) {
AnimationHelper.renderArms(player, this.transformType, stack, name, bone, this.currentBuffer, type, packedLightIn, false);
}
super.renderRecursively(stack, animatable, bone, type, buffer, bufferIn, isReRender, partialTick, packedLightIn, packedOverlayIn, color);
}
}

View file

@ -68,6 +68,7 @@ public class ModCustomLootProvider implements LootTableSubProvider {
new ItemEntry(ModItems.QBZ_95_BLUEPRINT.get(), 15),
new ItemEntry(ModItems.RPG_BLUEPRINT.get(), 15),
new ItemEntry(ModItems.M_2_HB_BLUEPRINT.get(), 15),
new ItemEntry(ModItems.MP_5_BLUEPRINT.get(), 15),
new ItemEntry(ModItems.TRACHELIUM_BLUEPRINT.get(), 1),
new ItemEntry(ModItems.HUNTING_RIFLE_BLUEPRINT.get(), 1),

View file

@ -63,6 +63,7 @@ public class ModItemModelProvider extends ItemModelProvider {
gunItem(ModItems.TASER);
gunItem(ModItems.TRACHELIUM);
gunItem(ModItems.VECTOR);
gunItem(ModItems.MP_5);
simpleItem(ModItems.EMPTY_PERK, "perk/");
@ -203,6 +204,7 @@ public class ModItemModelProvider extends ItemModelProvider {
gunBlueprintItem(ModItems.M_2_HB_BLUEPRINT);
gunBlueprintItem(ModItems.SECONDARY_CATACLYSM_BLUEPRINT);
gunBlueprintItem(ModItems.INSIDIOUS_BLUEPRINT);
gunBlueprintItem(ModItems.MP_5_BLUEPRINT);
// blocks
evenSimplerBlockItem(ModBlocks.BARBED_WIRE);

View file

@ -94,7 +94,7 @@ public class ModItemTagProvider extends ItemTagsProvider {
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.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.TASER.get(), ModItems.MINIGUN.get());
ModItems.TASER.get(), ModItems.MINIGUN.get(), ModItems.MP_5.get());
this.tag(ModTags.Items.LAUNCHER).add(ModItems.RPG.get(), ModItems.JAVELIN.get())
.addTag(ModTags.Items.LAUNCHER_GRENADE);

View file

@ -187,7 +187,7 @@ public class Agm65Entity extends FastThrowableProjectile implements GeoEntity, D
if (ExplosionConfig.EXPLOSION_DESTROY.get()) {
float hardness = this.level().getBlockState(BlockPos.containing(x, y, z)).getBlock().defaultDestroyTime();
if (hardness <= 50) {
if (hardness <= 50 && hardness != -1) {
BlockPos blockPos = BlockPos.containing(x, y, z);
Block.dropResources(this.level().getBlockState(blockPos), this.level(), BlockPos.containing(x, y, z), null);
this.level().destroyBlock(blockPos, true);

View file

@ -165,7 +165,7 @@ public class RpgRocketEntity extends FastThrowableProjectile implements GeoEntit
if (ExplosionConfig.EXPLOSION_DESTROY.get()) {
float hardness = this.level().getBlockState(BlockPos.containing(x, y, z)).getBlock().defaultDestroyTime();
if (hardness <= 50) {
if (hardness <= 50 && hardness != -1) {
BlockPos blockPos = BlockPos.containing(x, y, z);
Block.dropResources(this.level().getBlockState(blockPos), this.level(), BlockPos.containing(x, y, z), null);
this.level().destroyBlock(blockPos, true);

View file

@ -121,7 +121,7 @@ public class MortarEntity extends VehicleEntity implements GeoEntity {
if (level instanceof ServerLevel server) {
MortarShellEntity entityToSpawn = shell.createShell(player, level, stack);
entityToSpawn.setPos(this.getX(), this.getY() + this.getEyeY(), this.getZ());
entityToSpawn.shoot(this.getLookAngle().x, this.getLookAngle().y, this.getLookAngle().z, 11.4f, (float) 0.1);
entityToSpawn.shoot(this.getLookAngle().x, this.getLookAngle().y, this.getLookAngle().z, 11.4f, 0.1f);
level.addFreshEntity(entityToSpawn);
server.sendParticles(ParticleTypes.CAMPFIRE_COSY_SMOKE, (this.getX() + 3 * this.getLookAngle().x), (this.getY() + 0.1 + 3 * this.getLookAngle().y), (this.getZ() + 3 * this.getLookAngle().z), 8, 0.4, 0.4, 0.4,
0.007);

View file

@ -21,6 +21,7 @@ import com.atsuishio.superbwarfare.item.gun.rifle.*;
import com.atsuishio.superbwarfare.item.gun.shotgun.Aa12Item;
import com.atsuishio.superbwarfare.item.gun.shotgun.HomemadeShotgunItem;
import com.atsuishio.superbwarfare.item.gun.shotgun.M870Item;
import com.atsuishio.superbwarfare.item.gun.smg.Mp5Item;
import com.atsuishio.superbwarfare.item.gun.smg.VectorItem;
import com.atsuishio.superbwarfare.item.gun.sniper.*;
import com.atsuishio.superbwarfare.item.gun.special.BocekItem;
@ -55,6 +56,7 @@ public class ModItems {
public static final DeferredHolder<Item, M1911Item> M_1911 = GUNS.register("m_1911", M1911Item::new);
public static final DeferredHolder<Item, HomemadeShotgunItem> HOMEMADE_SHOTGUN = GUNS.register("homemade_shotgun", HomemadeShotgunItem::new);
public static final DeferredHolder<Item, Trachelium> TRACHELIUM = GUNS.register("trachelium", Trachelium::new);
public static final DeferredHolder<Item, Mp5Item> MP_5 = GUNS.register("mp_5", Mp5Item::new);
public static final DeferredHolder<Item, VectorItem> VECTOR = GUNS.register("vector", VectorItem::new);
public static final DeferredHolder<Item, AK47Item> AK_47 = GUNS.register("ak_47", AK47Item::new);
public static final DeferredHolder<Item, AK12Item> AK_12 = GUNS.register("ak_12", AK12Item::new);
@ -232,6 +234,7 @@ public class ModItems {
public static final DeferredHolder<Item, BlueprintItem> RPK_BLUEPRINT = ITEMS.register("rpk_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final DeferredHolder<Item, BlueprintItem> SKS_BLUEPRINT = ITEMS.register("sks_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final DeferredHolder<Item, BlueprintItem> NTW_20_BLUEPRINT = ITEMS.register("ntw_20_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary()));
public static final DeferredHolder<Item, BlueprintItem> MP_5_BLUEPRINT = ITEMS.register("mp_5_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final DeferredHolder<Item, BlueprintItem> VECTOR_BLUEPRINT = ITEMS.register("vector_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final DeferredHolder<Item, BlueprintItem> MINIGUN_BLUEPRINT = ITEMS.register("minigun_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary()));
public static final DeferredHolder<Item, BlueprintItem> MK_14_BLUEPRINT = ITEMS.register("mk_14_blueprint", () -> new BlueprintItem(Rarity.EPIC));

View file

@ -338,6 +338,15 @@ public class ModSounds {
public static final DeferredHolder<SoundEvent, SoundEvent> SECONDARY_CATACLYSM_LOOP = REGISTRY.register("secondary_cataclysm_loop", () -> SoundEvent.createVariableRangeEvent(Mod.loc("secondary_cataclysm_loop")));
public static final DeferredHolder<SoundEvent, SoundEvent> SECONDARY_CATACLYSM_END = REGISTRY.register("secondary_cataclysm_end", () -> SoundEvent.createVariableRangeEvent(Mod.loc("secondary_cataclysm_end")));
public static final DeferredHolder<SoundEvent, SoundEvent> MP_5_FIRE_1P = REGISTRY.register("mp_5_fire_1p", () -> SoundEvent.createVariableRangeEvent(Mod.loc("mp_5_fire_1p")));
public static final DeferredHolder<SoundEvent, SoundEvent> MP_5_FIRE_3P = REGISTRY.register("mp_5_fire_3p", () -> SoundEvent.createVariableRangeEvent(Mod.loc("mp_5_fire_3p")));
public static final DeferredHolder<SoundEvent, SoundEvent> MP_5_FAR = REGISTRY.register("mp_5_far", () -> SoundEvent.createVariableRangeEvent(Mod.loc("mp_5_far")));
public static final DeferredHolder<SoundEvent, SoundEvent> MP_5_VERYFAR = REGISTRY.register("mp_5_veryfar", () -> SoundEvent.createVariableRangeEvent(Mod.loc("mp_5_veryfar")));
public static final DeferredHolder<SoundEvent, SoundEvent> MP_5_RELOAD_NORMAL = REGISTRY.register("mp_5_reload_normal", () -> SoundEvent.createVariableRangeEvent(Mod.loc("mp_5_reload_normal")));
public static final DeferredHolder<SoundEvent, SoundEvent> MP_5_RELOAD_EMPTY = REGISTRY.register("mp_5_reload_empty", () -> SoundEvent.createVariableRangeEvent(Mod.loc("mp_5_reload_empty")));
public static final DeferredHolder<SoundEvent, SoundEvent> MP_5_FIRE_1P_S = REGISTRY.register("mp_5_fire_1p_s", () -> SoundEvent.createVariableRangeEvent(Mod.loc("mp_5_fire_1p_s")));
public static final DeferredHolder<SoundEvent, SoundEvent> MP_5_FIRE_3P_S = REGISTRY.register("mp_5_fire_3p_s", () -> SoundEvent.createVariableRangeEvent(Mod.loc("mp_5_fire_3p_s")));
public static final DeferredHolder<SoundEvent, SoundEvent> M_2_FIRE_1P = REGISTRY.register("m2_fire_1p", () -> SoundEvent.createVariableRangeEvent(Mod.loc("m2_fire_1p")));
public static final DeferredHolder<SoundEvent, SoundEvent> M_2_FIRE_3P = REGISTRY.register("m2_fire_3p", () -> SoundEvent.createVariableRangeEvent(Mod.loc("m2_fire_3p")));
public static final DeferredHolder<SoundEvent, SoundEvent> M_2_FAR = REGISTRY.register("m2_far", () -> SoundEvent.createVariableRangeEvent(Mod.loc("m2_far")));

View file

@ -0,0 +1,189 @@
package com.atsuishio.superbwarfare.item.gun.smg;
import com.atsuishio.superbwarfare.Mod;
import com.atsuishio.superbwarfare.client.ClickHandler;
import com.atsuishio.superbwarfare.client.renderer.gun.Mp5ItemRenderer;
import com.atsuishio.superbwarfare.data.gun.GunData;
import com.atsuishio.superbwarfare.data.gun.value.AttachmentType;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModSounds;
import com.atsuishio.superbwarfare.item.gun.GunItem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.level.Level;
import software.bernie.geckolib.animatable.GeoItem;
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
import software.bernie.geckolib.animation.*;
import software.bernie.geckolib.renderer.GeoItemRenderer;
import software.bernie.geckolib.util.GeckoLibUtil;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.Set;
import java.util.function.Supplier;
public class Mp5Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public Mp5Item() {
super(new Properties().stacksTo(1).rarity(Rarity.RARE));
}
@Override
public Supplier<GeoItemRenderer<? extends Item>> getRenderer() {
return Mp5ItemRenderer::new;
}
private PlayState idlePredicate(AnimationState<Mp5Item> event) {
LocalPlayer player = Minecraft.getInstance().player;
if (player == null) return PlayState.STOP;
ItemStack stack = player.getMainHandItem();
if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP;
if (GunData.from(stack).reload.empty()) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mp5.reload_empty"));
}
if (GunData.from(stack).reload.normal()) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mp5.reload_normal"));
}
if (player.isSprinting() && player.onGround() && ClientEventHandler.cantSprint == 0 && ClientEventHandler.drawTime < 0.01) {
if (ClientEventHandler.tacticalSprint) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mp5.run_fast"));
} else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mp5.run"));
}
}
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mp5.idle"));
}
private PlayState editPredicate(AnimationState<Mp5Item> event) {
LocalPlayer player = Minecraft.getInstance().player;
if (player == null) return PlayState.STOP;
ItemStack stack = player.getMainHandItem();
if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP;
if (ClickHandler.isEditing) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mp5.edit"));
}
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mp5.idle"));
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
AnimationController<Mp5Item> idleController = new AnimationController<>(this, "idleController", 2, this::idlePredicate);
data.add(idleController);
var editController = new AnimationController<>(this, "editController", 1, this::editPredicate);
data.add(editController);
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.cache;
}
@Override
@ParametersAreNonnullByDefault
public void inventoryTick(ItemStack stack, Level world, Entity entity, int slot, boolean selected) {
super.inventoryTick(stack, world, entity, slot, selected);
int scopeType = GunData.from(stack).attachment.get(AttachmentType.SCOPE);
int magType = GunData.from(stack).attachment.get(AttachmentType.MAGAZINE);
int gripType = GunData.from(stack).attachment.get(AttachmentType.GRIP);
if (scopeType == 3) {
CompoundTag tag = GunData.from(stack).attachment();
tag.putInt("Scope", 0);
}
if (magType == 1) {
CompoundTag tag = GunData.from(stack).attachment();
tag.putInt("Magazine", 2);
}
if (gripType == 3) {
CompoundTag tag = GunData.from(stack).attachment();
tag.putInt("Grip", 0);
}
}
@Override
public double getCustomZoom(ItemStack stack) {
int scopeType = GunData.from(stack).attachment.get(AttachmentType.SCOPE);
return scopeType == 2 ? 2.75 : 0;
}
@Override
public int getCustomMagazine(ItemStack stack) {
int magType = GunData.from(stack).attachment.get(AttachmentType.MAGAZINE);
return magType == 2 ? 20 : 0;
}
@Override
public Set<SoundEvent> getReloadSound() {
return Set.of(ModSounds.VECTOR_RELOAD_NORMAL.get(), ModSounds.VECTOR_RELOAD_EMPTY.get());
}
@Override
public ResourceLocation getGunIcon() {
return Mod.loc("textures/gun_icon/mp_5_icon.png");
}
@Override
public String getGunDisplayName() {
return "MP5-A5";
}
@Override
public boolean isOpenBolt(ItemStack stack) {
return true;
}
@Override
public boolean hasBulletInBarrel(ItemStack stack) {
return true;
}
@Override
public boolean isCustomizable(ItemStack stack) {
return true;
}
@Override
public boolean hasCustomBarrel(ItemStack stack) {
return true;
}
@Override
public boolean hasCustomGrip(ItemStack stack) {
return true;
}
@Override
public boolean hasCustomMagazine(ItemStack stack) {
return true;
}
@Override
public boolean hasCustomScope(ItemStack stack) {
return true;
}
@Override
public boolean hasCustomStock(ItemStack stack) {
return true;
}
@Override
public boolean canEjectShell(ItemStack stack) {
return true;
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -18,6 +18,7 @@
"item.superbwarfare.m_60": "M60",
"item.superbwarfare.mk_14": "MK-14EBR",
"item.superbwarfare.m_79": "M79",
"item.superbwarfare.mp_5": "MP5",
"item.superbwarfare.vector": "Vector",
"item.superbwarfare.bocek": "Bocek",
"item.superbwarfare.ak_47": "AK-47",
@ -118,6 +119,7 @@
"item.superbwarfare.insidious_blueprint": "Insidious Blueprint",
"item.superbwarfare.hpj_11_blueprint": "H/PJ-11 CIWS Blueprint",
"item.superbwarfare.aurelia_sceptre_blueprint": "Aurelia Sceptre Blueprint",
"item.superbwarfare.mp_5_blueprint": "MP5 Blueprint",
"item.superbwarfare.common_material_pack": "Common Material Pack",
"item.superbwarfare.rare_material_pack": "Rare Material Pack",

View file

@ -19,6 +19,7 @@
"item.superbwarfare.mk_14": "MK-14EBR射手步枪",
"item.superbwarfare.m_79": "M79榴弹发射器",
"item.superbwarfare.vector": "短剑冲锋枪",
"item.superbwarfare.mp_5": "MP5冲锋枪",
"item.superbwarfare.bocek": "BOCEK复合弓",
"item.superbwarfare.ak_47": "AK-47突击步枪",
"item.superbwarfare.ak_12": "AK-12突击步枪",
@ -118,6 +119,7 @@
"item.superbwarfare.insidious_blueprint": "阴险蓝图",
"item.superbwarfare.hpj_11_blueprint": "H/PJ-11近防炮蓝图",
"item.superbwarfare.aurelia_sceptre_blueprint": "海月权杖蓝图",
"item.superbwarfare.mp_5_blueprint": "MP5冲锋枪蓝图",
"item.superbwarfare.common_material_pack": "普通材料包",
"item.superbwarfare.rare_material_pack": "稀有材料包",

View file

@ -0,0 +1,29 @@
{
"credit": "Made with Blockbench",
"parent": "builtin/entity",
"texture_size": [
128,
128
],
"display": {
"firstperson_righthand": {
"translation": [
-6.25,
0.75,
0.75
],
"scale": [
1,
1,
1
]
},
"firstperson_lefthand": {
"scale": [
0,
0,
0
]
}
}
}

View file

@ -0,0 +1,387 @@
{
"credit": "Made with Blockbench",
"texture_size": [64, 64],
"textures": {
"0": "superbwarfare:item/lod/vector",
"particle": "superbwarfare:item/lod/vector"
},
"elements": [
{
"from": [7, 3, 10],
"to": [9, 8, 12],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 3, 11]},
"faces": {
"north": {"uv": [4, 5, 4.5, 6.25], "texture": "#0"},
"east": {"uv": [5, 4.25, 5.5, 5.5], "texture": "#0"},
"south": {"uv": [4.5, 5, 5, 6.25], "texture": "#0"},
"west": {"uv": [5.25, 2.75, 5.75, 4], "texture": "#0"},
"up": {"uv": [7.5, 6.75, 7, 6.25], "texture": "#0"},
"down": {"uv": [4.5, 7.25, 4, 7.75], "texture": "#0"}
}
},
{
"from": [7.25, -4, 10.25],
"to": [8.75, 8, 12.25],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 3, 11]},
"faces": {
"north": {"uv": [1, 1.5, 1.5, 4.5], "texture": "#0"},
"east": {"uv": [1.5, 1.5, 2, 4.5], "texture": "#0"},
"south": {"uv": [2, 1.5, 2.5, 4.5], "texture": "#0"},
"west": {"uv": [2.5, 1.5, 3, 4.5], "texture": "#0"},
"up": {"uv": [5, 7.75, 4.5, 7.25], "texture": "#0"},
"down": {"uv": [8, 1.5, 7.5, 2], "texture": "#0"}
}
},
{
"from": [7, 3, 13],
"to": [9, 8, 15],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 3, 14]},
"faces": {
"north": {"uv": [3, 5.5, 3.5, 6.75], "texture": "#0"},
"east": {"uv": [5.5, 4, 6, 5.25], "texture": "#0"},
"south": {"uv": [5, 5.5, 5.5, 6.75], "texture": "#0"},
"west": {"uv": [5.5, 5.25, 6, 6.5], "texture": "#0"},
"up": {"uv": [8, 2.5, 7.5, 2], "texture": "#0"},
"down": {"uv": [4, 7.5, 3.5, 8], "texture": "#0"}
}
},
{
"from": [6.75, 8, 20.5],
"to": [9.25, 10.5, 31.4],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 6.1, 23.9]},
"faces": {
"north": {"uv": [3, 5.5, 3.5, 6.75], "texture": "#0"},
"east": {"uv": [5.5, 4, 6, 5.25], "texture": "#0"},
"south": {"uv": [5, 5.5, 5.5, 6.75], "texture": "#0"},
"west": {"uv": [5.5, 5.25, 6, 6.5], "texture": "#0"},
"up": {"uv": [8, 2.5, 7.5, 2], "texture": "#0"},
"down": {"uv": [4, 7.5, 3.5, 8], "texture": "#0"}
}
},
{
"from": [6.75, 3.25, 29.5],
"to": [9.25, 8, 31.4],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 5.625, 30.45]},
"faces": {
"north": {"uv": [3, 5.5, 3.5, 6.75], "texture": "#0"},
"east": {"uv": [5.5, 4, 6, 5.25], "texture": "#0"},
"south": {"uv": [5, 5.5, 5.5, 6.75], "texture": "#0"},
"west": {"uv": [5.5, 5.25, 6, 6.5], "texture": "#0"},
"up": {"uv": [8, 2.5, 7.5, 2], "texture": "#0"},
"down": {"uv": [4, 7.5, 3.5, 8], "texture": "#0"}
}
},
{
"from": [6.75, 5.09046, 22.54434],
"to": [9.25, 8.48656, 30.04434],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 5.03656, 27.66934]},
"faces": {
"north": {"uv": [8, 2.5, 7.5, 2], "rotation": 180, "texture": "#0"},
"east": {"uv": [5.5, 4, 6, 5.25], "rotation": 90, "texture": "#0"},
"south": {"uv": [4, 7.5, 3.5, 8], "texture": "#0"},
"west": {"uv": [5.5, 5.25, 6, 6.5], "rotation": 270, "texture": "#0"},
"up": {"uv": [5, 5.5, 5.5, 6.75], "texture": "#0"},
"down": {"uv": [3, 5.5, 3.5, 6.75], "rotation": 180, "texture": "#0"}
}
},
{
"from": [6.75, 7.04761, 21.70508],
"to": [9.25, 8.45933, 23.56446],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 6.99371, 28.08008]},
"faces": {
"north": {"uv": [8, 2.5, 7.5, 2], "rotation": 180, "texture": "#0"},
"east": {"uv": [5.5, 4, 6, 5.25], "rotation": 90, "texture": "#0"},
"south": {"uv": [4, 7.5, 3.5, 8], "texture": "#0"},
"west": {"uv": [5.5, 5.25, 6, 6.5], "rotation": 270, "texture": "#0"},
"up": {"uv": [5, 5.5, 5.5, 6.75], "texture": "#0"},
"down": {"uv": [3, 5.5, 3.5, 6.75], "rotation": 180, "texture": "#0"}
}
},
{
"from": [7, 2.5, 17],
"to": [9, 8.25, 19],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 3, 14]},
"faces": {
"north": {"uv": [0, 5.75, 0.5, 7], "texture": "#0"},
"east": {"uv": [0.5, 5.75, 1, 7], "texture": "#0"},
"south": {"uv": [5.75, 2.75, 6.25, 4], "texture": "#0"},
"west": {"uv": [6, 4, 6.5, 5.25], "texture": "#0"},
"up": {"uv": [8, 4.25, 7.5, 3.75], "texture": "#0"},
"down": {"uv": [6, 7.5, 5.5, 8], "texture": "#0"}
}
},
{
"from": [7, 2.61732, 10.07612],
"to": [9, 7.61732, 13.07612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [6, 5.25, 6.5, 6.5], "texture": "#0"},
"east": {"uv": [3.5, 3.25, 4.25, 4.5], "texture": "#0"},
"south": {"uv": [6.25, 0, 6.75, 1.25], "texture": "#0"},
"west": {"uv": [4, 1, 4.75, 2.25], "texture": "#0"},
"up": {"uv": [0.5, 7.75, 0, 7], "texture": "#0"},
"down": {"uv": [1, 7, 0.5, 7.75], "texture": "#0"}
}
},
{
"from": [7, 7.11732, 4.32612],
"to": [9, 8.36732, 13.07612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [7, 1.5, 7.5, 2.25], "texture": "#0"},
"east": {"uv": [1, 0, 3.25, 0.75], "texture": "#0"},
"south": {"uv": [7, 3.75, 7.5, 4.5], "texture": "#0"},
"west": {"uv": [1, 0.75, 3.25, 1.5], "texture": "#0"},
"up": {"uv": [3.5, 3.75, 3, 1.5], "texture": "#0"},
"down": {"uv": [0.5, 3.5, 0, 5.75], "texture": "#0"}
}
},
{
"from": [7.25, 10.36732, 4.32612],
"to": [8.75, 10.61732, 18.32612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [3.5, 8, 4, 8.25], "texture": "#0"},
"east": {"uv": [4, 2.25, 7.5, 2.5], "texture": "#0"},
"south": {"uv": [5.5, 8, 6, 8.25], "texture": "#0"},
"west": {"uv": [4, 2.5, 7.5, 2.75], "texture": "#0"},
"up": {"uv": [0.5, 3.5, 0, 0], "texture": "#0"},
"down": {"uv": [1, 0, 0.5, 3.5], "texture": "#0"}
}
},
{
"from": [7, 10.46732, 10.32612],
"to": [9, 10.91732, 14.32612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [8, 7.25, 8.5, 7.5], "texture": "#0"},
"east": {"uv": [7.25, 0.75, 8.25, 1], "texture": "#0"},
"south": {"uv": [7.5, 8, 8, 8.25], "texture": "#0"},
"west": {"uv": [7.5, 2.5, 8.5, 2.75], "texture": "#0"},
"up": {"uv": [6, 1, 5.5, 0], "texture": "#0"},
"down": {"uv": [4.5, 6.25, 4, 7.25], "texture": "#0"}
}
},
{
"from": [7, 12.26732, 10.32612],
"to": [9, 12.41732, 10.92612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4.51732, 11.07612]},
"faces": {
"north": {"uv": [8, 7.5, 8.5, 7.75], "texture": "#0"},
"east": {"uv": [7.5, 4.25, 8.5, 4.5], "texture": "#0"},
"south": {"uv": [8, 7.75, 8.5, 8], "texture": "#0"},
"west": {"uv": [7.5, 5.5, 8.5, 5.75], "texture": "#0"},
"up": {"uv": [5, 7.25, 4.5, 6.25], "texture": "#0"},
"down": {"uv": [4, 6.5, 3.5, 7.5], "texture": "#0"}
}
},
{
"from": [7, 10.91732, 10.32612],
"to": [7.15, 12.26732, 10.92612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 1.91732, 11.07612]},
"faces": {
"north": {"uv": [3.25, 1, 3.5, 1.25], "texture": "#0"},
"east": {"uv": [7.5, 5.75, 8.5, 6], "texture": "#0"},
"south": {"uv": [3.25, 1.25, 3.5, 1.5], "texture": "#0"},
"west": {"uv": [7.5, 6, 8.5, 6.25], "texture": "#0"},
"up": {"uv": [6.25, 1, 6, 0], "texture": "#0"},
"down": {"uv": [6.25, 7.5, 6, 8.5], "texture": "#0"}
}
},
{
"from": [8.85, 10.91732, 10.32612],
"to": [9, 12.26732, 10.92612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 1.91732, 11.07612]},
"faces": {
"north": {"uv": [4, 2.75, 4.25, 3], "texture": "#0"},
"east": {"uv": [7.5, 6.25, 8.5, 6.5], "texture": "#0"},
"south": {"uv": [4, 3, 4.25, 3.25], "texture": "#0"},
"west": {"uv": [7.5, 6.5, 8.5, 6.75], "texture": "#0"},
"up": {"uv": [6.5, 8.5, 6.25, 7.5], "texture": "#0"},
"down": {"uv": [7.75, 7, 7.5, 8], "texture": "#0"}
}
},
{
"from": [7, 8.36732, 4.32612],
"to": [9, 10.36732, 18.57612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [0, 7.75, 0.5, 8.25], "texture": "#0"},
"east": {"uv": [3.5, 4.5, 5, 5], "texture": "#0"},
"south": {"uv": [7.75, 0, 8.25, 0.5], "texture": "#0"},
"west": {"uv": [4.75, 1, 6.25, 1.5], "texture": "#0"},
"up": {"uv": [5.25, 4.25, 4.75, 2.75], "texture": "#0"},
"down": {"uv": [4, 5, 3.5, 6.5], "texture": "#0"}
}
},
{
"from": [6.8, 7.11732, -6.17388],
"to": [9.2, 10.36732, 4.07612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [0, 7.75, 0.5, 8.25], "texture": "#0"},
"east": {"uv": [3.5, 4.5, 5, 5], "texture": "#0"},
"south": {"uv": [7.75, 0, 8.25, 0.5], "texture": "#0"},
"west": {"uv": [4.75, 1, 6.25, 1.5], "texture": "#0"},
"up": {"uv": [5.25, 4.25, 4.75, 2.75], "texture": "#0"},
"down": {"uv": [4, 5, 3.5, 6.5], "texture": "#0"}
}
},
{
"from": [7, 8.36732, 18.57612],
"to": [9, 10.11732, 25.32612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [8, 8, 8.5, 8.25], "texture": "#0"},
"east": {"uv": [6.75, 1, 8.5, 1.25], "texture": "#0"},
"south": {"uv": [0, 8.25, 0.5, 8.5], "texture": "#0"},
"west": {"uv": [6.5, 6.75, 8.25, 7], "texture": "#0"},
"up": {"uv": [3.5, 5.5, 3, 3.75], "texture": "#0"},
"down": {"uv": [4.75, 2.75, 4.25, 4.5], "texture": "#0"}
}
},
{
"from": [7, 7.11732, -16],
"to": [9, 9.36732, 4.07612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [6.5, 7.75, 7, 8.25], "texture": "#0"},
"east": {"uv": [3.25, 0, 5.5, 0.5], "texture": "#0"},
"south": {"uv": [7, 7.75, 7.5, 8.25], "texture": "#0"},
"west": {"uv": [3.25, 0.5, 5.5, 1], "texture": "#0"},
"up": {"uv": [1, 5.75, 0.5, 3.5], "texture": "#0"},
"down": {"uv": [4, 1, 3.5, 3.25], "texture": "#0"}
}
},
{
"from": [7.35355, 9.37087, -16],
"to": [8.10355, 9.72087, 4.07612],
"rotation": {"angle": 0, "axis": "x", "origin": [8.35355, 3.22087, 11.07612]},
"faces": {
"north": {"uv": [4.75, 4.25, 5, 4.5], "texture": "#0"},
"east": {"uv": [4.75, 1.5, 7, 1.75], "texture": "#0"},
"south": {"uv": [5.25, 4, 5.5, 4.25], "texture": "#0"},
"west": {"uv": [4.75, 1.75, 7, 2], "texture": "#0"},
"up": {"uv": [1.25, 8.5, 1, 6.25], "texture": "#0"},
"down": {"uv": [1.5, 6.25, 1.25, 8.5], "texture": "#0"}
}
},
{
"from": [7.03033, 8.94054, -16],
"to": [7.53033, 9.44054, 4.07612],
"rotation": {"angle": -45, "axis": "z", "origin": [7.53033, 9.19054, -0.54888]},
"faces": {
"north": {"uv": [6.25, 3.75, 6.5, 4], "texture": "#0"},
"east": {"uv": [4.75, 2, 7, 2.25], "texture": "#0"},
"south": {"uv": [7, 8.25, 7.25, 8.5], "texture": "#0"},
"west": {"uv": [6.25, 1.25, 8.5, 1.5], "texture": "#0"},
"up": {"uv": [1.75, 8.5, 1.5, 6.25], "texture": "#0"},
"down": {"uv": [2, 6.25, 1.75, 8.5], "texture": "#0"}
}
},
{
"from": [8.46967, 8.94054, -16],
"to": [8.96967, 9.44054, 4.07612],
"rotation": {"angle": 45, "axis": "z", "origin": [8.46967, 9.19054, -0.54888]},
"faces": {
"north": {"uv": [7.25, 8.25, 7.5, 8.5], "texture": "#0"},
"east": {"uv": [6.25, 2.75, 8.5, 3], "texture": "#0"},
"south": {"uv": [7.5, 8.25, 7.75, 8.5], "texture": "#0"},
"west": {"uv": [6.25, 3, 8.5, 3.25], "texture": "#0"},
"up": {"uv": [2.25, 8.5, 2, 6.25], "texture": "#0"},
"down": {"uv": [2.5, 6.25, 2.25, 8.5], "texture": "#0"}
}
},
{
"from": [7.89645, 9.37087, -16],
"to": [8.64645, 9.72087, 4.07612],
"rotation": {"angle": 0, "axis": "x", "origin": [7.64645, 3.22087, 11.07612]},
"faces": {
"north": {"uv": [7.75, 8.25, 8, 8.5], "texture": "#0"},
"east": {"uv": [6.25, 3.25, 8.5, 3.5], "texture": "#0"},
"south": {"uv": [8, 8.25, 8.25, 8.5], "texture": "#0"},
"west": {"uv": [6.25, 3.5, 8.5, 3.75], "texture": "#0"},
"up": {"uv": [2.75, 8.5, 2.5, 6.25], "texture": "#0"},
"down": {"uv": [3, 6.25, 2.75, 8.5], "texture": "#0"}
}
},
{
"from": [7.25, 3.11732, 5.57612],
"to": [8.75, 7.11732, 6.82612],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.61732, 11.07612]},
"faces": {
"north": {"uv": [5.5, 6.5, 6, 7.5], "texture": "#0"},
"east": {"uv": [7.75, 7, 8, 8], "texture": "#0"},
"south": {"uv": [6.5, 5.75, 7, 6.75], "texture": "#0"},
"west": {"uv": [8, 1.5, 8.25, 2.5], "texture": "#0"},
"up": {"uv": [5, 8.5, 4.5, 8.25], "texture": "#0"},
"down": {"uv": [8.75, 4.75, 8.25, 5], "texture": "#0"}
}
},
{
"from": [7.25, 7.24232, 1.95112],
"to": [8.75, 8.49232, 5.95112],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 5.11732, 6.20112]},
"faces": {
"north": {"uv": [8.25, 5, 8.75, 5.25], "texture": "#0"},
"east": {"uv": [7.75, 5.25, 8.75, 5.5], "texture": "#0"},
"south": {"uv": [5.5, 8.25, 6, 8.5], "texture": "#0"},
"west": {"uv": [8, 3.75, 9, 4], "texture": "#0"},
"up": {"uv": [6.5, 7.5, 6, 6.5], "texture": "#0"},
"down": {"uv": [7.25, 0, 6.75, 1], "texture": "#0"}
}
},
{
"from": [7, 3.68611, 14.21298],
"to": [9, 4.18611, 16.96298],
"rotation": {"angle": 0, "axis": "x", "origin": [8, -0.81389, 8.96298]},
"faces": {
"north": {"uv": [6.5, 8.25, 7, 8.5], "texture": "#0"},
"east": {"uv": [8, 4, 8.75, 4.25], "texture": "#0"},
"south": {"uv": [8.25, 6.75, 8.75, 7], "texture": "#0"},
"west": {"uv": [8, 7, 8.75, 7.25], "texture": "#0"},
"up": {"uv": [7.5, 7.75, 7, 7], "texture": "#0"},
"down": {"uv": [7.75, 0, 7.25, 0.75], "texture": "#0"}
}
}
],
"gui_light": "front",
"display": {
"thirdperson_righthand": {
"translation": [-0.75, 0.5, -3.75],
"scale": [0.6, 0.6, 0.6]
},
"thirdperson_lefthand": {
"translation": [-0.75, 0.5, -0.25],
"scale": [0.6, 0.6, 0.6]
},
"firstperson_lefthand": {
"scale": [0, 0, 0]
},
"ground": {
"translation": [0, 3.25, 0],
"scale": [0.5, 0.5, 0.5]
},
"gui": {
"rotation": [0, 90, 0],
"translation": [0.5, -0.25, -1.5],
"scale": [1.1, 1.1, 1.1]
},
"head": {
"translation": [0, 11.75, 0]
},
"fixed": {
"rotation": [0, 90, 0],
"translation": [-2.25, 2.5, -1.5],
"scale": [1.1, 1.1, 1.1]
}
},
"groups": [
{
"name": "group",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]
}
]
}

View file

@ -3226,5 +3226,69 @@
"stream": false
}
]
},
"mp_5_fire_1p": {
"sounds": [
{
"name": "superbwarfare:mp_5/mp_5_fire_1p",
"stream": false
}
]
},
"mp_5_fire_3p": {
"sounds": [
{
"name": "superbwarfare:mp_5/mp_5_fire_3p",
"stream": false
}
]
},
"mp_5_far": {
"sounds": [
{
"name": "superbwarfare:mp_5/mp_5_far",
"stream": false
}
]
},
"mp_5_veryfar": {
"sounds": [
{
"name": "superbwarfare:mp_5/mp_5_veryfar",
"stream": false
}
]
},
"mp_5_fire_1p_s": {
"sounds": [
{
"name": "superbwarfare:mp_5/mp_5_fire_1p_s",
"stream": false
}
]
},
"mp_5_fire_3p_s": {
"sounds": [
{
"name": "superbwarfare:mp_5/mp_5_fire_3p_s",
"stream": false
}
]
},
"mp_5_reload_normal": {
"sounds": [
{
"name": "superbwarfare:mp_5/mp_5_reload_normal",
"stream": false
}
]
},
"mp_5_reload_empty": {
"sounds": [
{
"name": "superbwarfare:mp_5/mp_5_reload_empty",
"stream": false
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View file

@ -0,0 +1,42 @@
{
"ID": "superbwarfare:mp_5",
"Spread": 2.1,
"RecoilX": 0.002,
"RecoilY": 0.018,
"Damage": 6.5,
"Headshot": 1.5,
"Velocity": 20,
"Magazine": 30,
"Weight": 3.2,
"DefaultFireMode": "Auto",
"BurstAmount": 3,
"NormalReloadTime": 45,
"EmptyReloadTime": 68,
"BypassesArmor": 0.12,
"SoundRadius": 11,
"RPM": 900,
"AvailableFireModes": ["Semi", "Burst", "Auto"],
"DamageReduce": {
"Type": "Smg"
},
"AmmoType": "@HandgunAmmo",
"AvailablePerks": [
"@Ammo",
"superbwarfare:heal_clip",
"superbwarfare:field_doctor",
"superbwarfare:fourth_times_charm",
"superbwarfare:subsistence",
"superbwarfare:powerful_attraction",
"superbwarfare:intelligent_chip",
"superbwarfare:kill_clip",
"superbwarfare:gutshot_straight",
"superbwarfare:monster_hunter",
"superbwarfare:head_seeker",
"superbwarfare:desperado",
"superbwarfare:vorpal_weapon",
"superbwarfare:firefly",
"!superbwarfare:micro_missile",
"!superbwarfare:longer_wire",
"!superbwarfare:cupid_arrow"
]
}

View file

@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"aba",
"aca",
"aaa"
],
"key": {
"a": {
"item": "minecraft:diamond"
},
"b": {
"item": "superbwarfare:mp_5_blueprint"
},
"c": {
"item": "minecraft:lapis_lazuli"
}
},
"result": {
"id": "superbwarfare:mp_5_blueprint",
"count": 2
}
}

View file

@ -0,0 +1,15 @@
{
"type": "minecraft:smithing_transform",
"template": {
"item": "superbwarfare:mp_5_blueprint"
},
"base": {
"item": "superbwarfare:rare_material_pack"
},
"addition": {
"item": "minecraft:iron_ingot"
},
"result": {
"id": "superbwarfare:mp_5"
}
}