添加AK握把,添加爆炸破坏方块选项

This commit is contained in:
Atsuihsio 2024-11-14 18:07:26 +08:00
parent c608e69f01
commit 77fdc0c126
38 changed files with 12496 additions and 4764 deletions

View file

@ -4,4 +4,4 @@ org.gradle.daemon=false
mc_version=1.20.1 mc_version=1.20.1
jei_version=15.2.0.27 jei_version=15.2.0.27
cloth_config_version=11.1.106 cloth_config_version=11.1.106
mod_version=0.2.3 mod_version=0.2.4

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-11-10T16:23:58.1652762 Tags for minecraft:item mod id superbwarfare // 1.20.1 2024-11-14T03:25:59.6528686 Tags for minecraft:item mod id superbwarfare
cf8d49a8d2872286d1a9c3d4a7e1c2b7690db0b8 data/forge/tags/items/dusts.json cf8d49a8d2872286d1a9c3d4a7e1c2b7690db0b8 data/forge/tags/items/dusts.json
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/forge/tags/items/dusts/coal_coke.json 0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/forge/tags/items/dusts/coal_coke.json
295ddf906b7133a0558d03e9a60eea18281fe430 data/forge/tags/items/dusts/iron.json 295ddf906b7133a0558d03e9a60eea18281fe430 data/forge/tags/items/dusts/iron.json
@ -28,7 +28,7 @@ af6fd64b4a685c353f243763db268f7b2304c009 data/forge/tags/items/storage_blocks/le
144e54d908121dee498b2ebba3b24b09fd6f18d9 data/forge/tags/items/storage_blocks/tungsten.json 144e54d908121dee498b2ebba3b24b09fd6f18d9 data/forge/tags/items/storage_blocks/tungsten.json
4d4dfd25a2a749e000e1bb742c2f984d4e094e5d data/superbwarfare/tags/items/cannot_reload.json 4d4dfd25a2a749e000e1bb742c2f984d4e094e5d data/superbwarfare/tags/items/cannot_reload.json
d1fe14a7d67387be04db7b0b2de6eba51721de27 data/superbwarfare/tags/items/can_apply_barrel.json d1fe14a7d67387be04db7b0b2de6eba51721de27 data/superbwarfare/tags/items/can_apply_barrel.json
ed9c76fb81272f65c6b7976d5aada8781f67f3c1 data/superbwarfare/tags/items/can_apply_grip.json 06903a776ee9462fc6013b2c7f6e9afdef092aaa data/superbwarfare/tags/items/can_apply_grip.json
d1fe14a7d67387be04db7b0b2de6eba51721de27 data/superbwarfare/tags/items/can_apply_magazine.json d1fe14a7d67387be04db7b0b2de6eba51721de27 data/superbwarfare/tags/items/can_apply_magazine.json
d1fe14a7d67387be04db7b0b2de6eba51721de27 data/superbwarfare/tags/items/can_apply_scope.json d1fe14a7d67387be04db7b0b2de6eba51721de27 data/superbwarfare/tags/items/can_apply_scope.json
4076a1feed311ef566e890e64f70c1c79a8feb49 data/superbwarfare/tags/items/can_apply_stock.json 4076a1feed311ef566e890e64f70c1c79a8feb49 data/superbwarfare/tags/items/can_apply_stock.json

View file

@ -3,6 +3,7 @@
"superbwarfare:ak_12", "superbwarfare:ak_12",
"superbwarfare:m_4", "superbwarfare:m_4",
"superbwarfare:hk_416", "superbwarfare:hk_416",
"superbwarfare:qbz_95" "superbwarfare:qbz_95",
"superbwarfare:ak_47"
] ]
} }

View file

@ -15,10 +15,13 @@ import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
import software.bernie.geckolib.core.animation.AnimationState; import software.bernie.geckolib.core.animation.AnimationState;
import software.bernie.geckolib.model.GeoModel; import software.bernie.geckolib.model.GeoModel;
import static net.mcreator.superbwarfare.event.PlayerEventHandler.isProne;
public class AK47ItemModel extends GeoModel<AK47Item> { public class AK47ItemModel extends GeoModel<AK47Item> {
public static float fireRotY = 0f; public static float fireRotY = 0f;
public static float fireRotZ = 0f; public static float fireRotZ = 0f;
public static float rotXBipod = 0f;
@Override @Override
public ResourceLocation getAnimationResource(AK47Item animatable) { public ResourceLocation getAnimationResource(AK47Item animatable) {
@ -129,7 +132,7 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
shen.setPosX(-0.4f * (float) (ClientEventHandler.recoilHorizon * (0.5 + 0.4 * ClientEventHandler.fireSpread))); shen.setPosX(-0.4f * (float) (ClientEventHandler.recoilHorizon * (0.5 + 0.4 * ClientEventHandler.fireSpread)));
shen.setPosY((float) (0.15f * fp + 0.18f * fr)); shen.setPosY((float) (0.15f * fp + 0.18f * fr));
shen.setPosZ((float) (0.475 * fp + 0.64f * fr + 1.25 * fpz)); shen.setPosZ((float) (0.375 * fp + 0.44f * fr + 0.75 * fpz));
shen.setRotX((float) (0.01f * fp + 0.08f * fr + 0.01f * fpz)); shen.setRotX((float) (0.01f * fp + 0.08f * fr + 0.01f * fpz));
shen.setRotY(fireRotY); shen.setRotY(fireRotY);
shen.setRotZ(fireRotZ); shen.setRotZ(fireRotZ);
@ -146,6 +149,12 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
cross3.setRotZ(0.01f * (float) (ClientEventHandler.recoilHorizon * fp)); cross3.setRotZ(0.01f * (float) (ClientEventHandler.recoilHorizon * fp));
cross3.setPosY(-0.23f * (float) (fp + 2.3 * fr)); cross3.setPosY(-0.23f * (float) (fp + 2.3 * fr));
CoreGeoBone l = getAnimationProcessor().getBone("l");
CoreGeoBone r = getAnimationProcessor().getBone("r");
rotXBipod = Mth.lerp(1.5f * times, rotXBipod, isProne(player) ? -90 : 0);
l.setRotX(rotXBipod * Mth.DEG_TO_RAD);
r.setRotX(rotXBipod * Mth.DEG_TO_RAD);
CoreGeoBone root = getAnimationProcessor().getBone("root"); CoreGeoBone root = getAnimationProcessor().getBone("root");
root.setPosX((float) (movePosX + 20 * ClientEventHandler.drawTime + 9.3f * mph)); root.setPosX((float) (movePosX + 20 * ClientEventHandler.drawTime + 9.3f * mph));

View file

@ -47,6 +47,7 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
CoreGeoBone cross1 = getAnimationProcessor().getBone("Cross1"); CoreGeoBone cross1 = getAnimationProcessor().getBone("Cross1");
CoreGeoBone cross2 = getAnimationProcessor().getBone("Cross2"); CoreGeoBone cross2 = getAnimationProcessor().getBone("Cross2");
CoreGeoBone cross3 = getAnimationProcessor().getBone("Cross3"); CoreGeoBone cross3 = getAnimationProcessor().getBone("Cross3");
CoreGeoBone kuaimanji = getAnimationProcessor().getBone("kuaimanji");
Player player = Minecraft.getInstance().player; Player player = Minecraft.getInstance().player;
if (player == null) return; if (player == null) return;
@ -147,6 +148,10 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
l.setRotX(rotXBipod * Mth.DEG_TO_RAD); l.setRotX(rotXBipod * Mth.DEG_TO_RAD);
r.setRotX(rotXBipod * Mth.DEG_TO_RAD); r.setRotX(rotXBipod * Mth.DEG_TO_RAD);
int mode = GunsTool.getGunIntTag(stack, "FireMode");
kuaimanji.setRotX(mode == 2 ? 90 * Mth.DEG_TO_RAD : 0);
CoreGeoBone root = getAnimationProcessor().getBone("root"); CoreGeoBone root = getAnimationProcessor().getBone("root");
root.setPosX((float) (movePosX + 20 * ClientEventHandler.drawTime + 9.3f * mph)); root.setPosX((float) (movePosX + 20 * ClientEventHandler.drawTime + 9.3f * mph));
root.setPosY((float) (swayY + movePosY - 40 * ClientEventHandler.drawTime - 2f * vY)); root.setPosY((float) (swayY + movePosY - 40 * ClientEventHandler.drawTime - 2f * vY));

View file

@ -103,6 +103,14 @@ public class AK47ItemRenderer extends GeoItemRenderer<AK47Item> {
|| GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 3); || GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 3);
} }
if (name.equals("humu1")) {
bone.setHidden(GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.GRIP) != 0);
}
if (name.equals("humu2")) {
bone.setHidden(GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.GRIP) == 0);
}
if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 2 if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 2
&& (name.equals("Hidden") || name.equals("Barrel") || name.equals("humu") || name.equals("qiangguan") || name.equals("houzhunxing"))) { && (name.equals("Hidden") || name.equals("Barrel") || name.equals("humu") || name.equals("qiangguan") || name.equals("houzhunxing"))) {
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS); bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS);

View file

@ -105,6 +105,10 @@ public class CannonHudOverlay {
preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j); preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j);
} }
event.getGuiGraphics().drawString(Minecraft.getInstance().font, Component.translatable("des.superbwarfare.mortar.pitch")
.append(Component.literal(new DecimalFormat("##.#").format(-cannon.getXRot()) + "°")),
w / 2 + 14, h / 2 - 29, -1, false);
if (cannon instanceof Mk42Entity) { if (cannon instanceof Mk42Entity) {
health = cannon.getEntityData().get(net.mcreator.superbwarfare.entity.Mk42Entity.HEALTH); health = cannon.getEntityData().get(net.mcreator.superbwarfare.entity.Mk42Entity.HEALTH);
maxHealth = 500; maxHealth = 500;

View file

@ -1,5 +1,6 @@
package net.mcreator.superbwarfare.config; package net.mcreator.superbwarfare.config;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.config.server.SpawnConfig; import net.mcreator.superbwarfare.config.server.SpawnConfig;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
@ -9,6 +10,7 @@ public class ServerConfig {
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder(); ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
SpawnConfig.init(builder); SpawnConfig.init(builder);
ExplosionDestroyConfig.init(builder);
return builder.build(); return builder.build();
} }

View file

@ -0,0 +1,18 @@
package net.mcreator.superbwarfare.config.server;
import net.minecraftforge.common.ForgeConfigSpec;
public class ExplosionDestroyConfig {
public static ForgeConfigSpec.BooleanValue EXPLOSION_DESTROY;
public static void init(ForgeConfigSpec.Builder builder) {
builder.push("spawn");
builder.comment("Set TRUE to allow Explosion to destroy blocks");
EXPLOSION_DESTROY = builder.define("explosion_destroy", false);
builder.pop();
}
}

View file

@ -120,7 +120,7 @@ public class ModItemTagProvider extends ItemTagsProvider {
this.tag(ModTags.Items.CAN_APPLY_BARREL).add(ModItems.AK_12.get(), ModItems.AK_47.get(), ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.QBZ_95.get()); this.tag(ModTags.Items.CAN_APPLY_BARREL).add(ModItems.AK_12.get(), ModItems.AK_47.get(), ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.QBZ_95.get());
this.tag(ModTags.Items.CAN_APPLY_GRIP).add(ModItems.AK_12.get(), ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.QBZ_95.get()); this.tag(ModTags.Items.CAN_APPLY_GRIP).add(ModItems.AK_12.get(), ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.QBZ_95.get(), ModItems.AK_47.get());
this.tag(ModTags.Items.CAN_APPLY_SCOPE).add(ModItems.AK_12.get(), ModItems.AK_47.get(), ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.QBZ_95.get()); this.tag(ModTags.Items.CAN_APPLY_SCOPE).add(ModItems.AK_12.get(), ModItems.AK_47.get(), ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.QBZ_95.get());

View file

@ -1,6 +1,7 @@
package net.mcreator.superbwarfare.entity; package net.mcreator.superbwarfare.entity;
import net.mcreator.superbwarfare.ModUtils; import net.mcreator.superbwarfare.ModUtils;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.init.*; import net.mcreator.superbwarfare.init.*;
import net.mcreator.superbwarfare.tools.CustomExplosion; import net.mcreator.superbwarfare.tools.CustomExplosion;
import net.mcreator.superbwarfare.tools.ParticleTool; import net.mcreator.superbwarfare.tools.ParticleTool;
@ -216,7 +217,7 @@ public class ClaymoreEntity extends Entity implements GeoEntity, AnimatedEntity,
if (level() instanceof ServerLevel) { if (level() instanceof ServerLevel) {
CustomExplosion explosion = new CustomExplosion(this.level(), null, CustomExplosion explosion = new CustomExplosion(this.level(), null,
ModDamageTypes.causeMineDamage(this.level().registryAccess(), this), 15.0f, ModDamageTypes.causeMineDamage(this.level().registryAccess(), this), 15.0f,
this.getX(), this.getY(), this.getZ(), 7.5f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); this.getX(), this.getY(), this.getZ(), 7.5f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);
@ -228,7 +229,7 @@ public class ClaymoreEntity extends Entity implements GeoEntity, AnimatedEntity,
private void triggerExplode(Entity target) { private void triggerExplode(Entity target) {
CustomExplosion explosion = new CustomExplosion(this.level(), this, CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeMineDamage(this.level().registryAccess(), this.getOwner()), 40f, ModDamageTypes.causeMineDamage(this.level().registryAccess(), this.getOwner()), 40f,
target.getX(), target.getY(), target.getZ(), 4f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); target.getX(), target.getY(), target.getZ(), 4f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);

View file

@ -1,5 +1,6 @@
package net.mcreator.superbwarfare.entity; package net.mcreator.superbwarfare.entity;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.entity.projectile.RgoGrenadeEntity; import net.mcreator.superbwarfare.entity.projectile.RgoGrenadeEntity;
import net.mcreator.superbwarfare.init.ModDamageTypes; import net.mcreator.superbwarfare.init.ModDamageTypes;
import net.mcreator.superbwarfare.init.ModEntities; import net.mcreator.superbwarfare.init.ModEntities;
@ -437,7 +438,7 @@ public class DroneEntity extends LivingEntity implements GeoEntity {
private void kamikazeExplosion(Entity source) { private void kamikazeExplosion(Entity source) {
CustomExplosion explosion = new CustomExplosion(this.level(), this, CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), source, source), 150, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), source, source), 150,
this.getX(), this.getY(), this.getZ(), 12.5f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); this.getX(), this.getY(), this.getZ(), 12.5f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);

View file

@ -1,5 +1,6 @@
package net.mcreator.superbwarfare.entity; package net.mcreator.superbwarfare.entity;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.entity.projectile.CannonShellEntity; import net.mcreator.superbwarfare.entity.projectile.CannonShellEntity;
import net.mcreator.superbwarfare.init.*; import net.mcreator.superbwarfare.init.*;
import net.mcreator.superbwarfare.item.common.ammo.CannonShellItem; import net.mcreator.superbwarfare.item.common.ammo.CannonShellItem;
@ -251,7 +252,7 @@ public class Mk42Entity extends Entity implements GeoEntity, ICannonEntity {
private void destroy() { private void destroy() {
CustomExplosion explosion = new CustomExplosion(this.level(), this, CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this), 130f, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this), 130f,
this.getX(), this.getY(), this.getZ(), 9.5f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); this.getX(), this.getY(), this.getZ(), 9.5f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);
@ -286,7 +287,8 @@ public class Mk42Entity extends Entity implements GeoEntity, ICannonEntity {
explosionRadius = 10; explosionRadius = 10;
explosionDamage = 220; explosionDamage = 220;
fireProbability = 0.18F; fireProbability = 0.18F;
fireTime = 5; fireTime = 2;
durability = 1;
} }
if (stack.is(ModItems.AP_5_INCHES.get())) { if (stack.is(ModItems.AP_5_INCHES.get())) {
@ -295,7 +297,7 @@ public class Mk42Entity extends Entity implements GeoEntity, ICannonEntity {
explosionDamage = 100; explosionDamage = 100;
fireProbability = 0; fireProbability = 0;
fireTime = 0; fireTime = 0;
durability = 25; durability = 30;
} }
if (!player.isCreative()) { if (!player.isCreative()) {
@ -368,7 +370,7 @@ public class Mk42Entity extends Entity implements GeoEntity, ICannonEntity {
diffX = diffX * 0.15f; diffX = diffX * 0.15f;
this.setYRot(this.getYRot() + Mth.clamp(diffY, -1.75f, 1.75f)); this.setYRot(this.getYRot() + Mth.clamp(diffY, -1.75f, 1.75f));
this.setXRot(Mth.clamp(this.getXRot() + Mth.clamp(diffX, -3f, 3f), -85, 15)); this.setXRot(Mth.clamp(this.getXRot() + Mth.clamp(diffX, -3f, 3f), -85, 16.3f));
this.setRot(this.getYRot(), this.getXRot()); this.setRot(this.getYRot(), this.getXRot());
} }
@ -380,7 +382,7 @@ public class Mk42Entity extends Entity implements GeoEntity, ICannonEntity {
if (!stack.is(ModTags.Items.GUN)) { if (!stack.is(ModTags.Items.GUN)) {
float f = Mth.wrapDegrees(entity.getXRot()); float f = Mth.wrapDegrees(entity.getXRot());
float f1 = Mth.clamp(f, -85.0F, 15.0F); float f1 = Mth.clamp(f, -85.0F, 16.3F);
entity.xRotO += f1 - f; entity.xRotO += f1 - f;
entity.setXRot(entity.getXRot() + f1 - f); entity.setXRot(entity.getXRot() + f1 - f);
} }
@ -392,7 +394,7 @@ public class Mk42Entity extends Entity implements GeoEntity, ICannonEntity {
} }
private PlayState movementPredicate(AnimationState<Mk42Entity> event) { private PlayState movementPredicate(AnimationState<Mk42Entity> event) {
if (this.entityData.get(COOL_DOWN) > 0) { if (this.entityData.get(COOL_DOWN) > 10) {
if (this.entityData.get(TYPE) == 1) { if (this.entityData.get(TYPE) == 1) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mk42.fire")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mk42.fire"));
} else { } else {

View file

@ -1,6 +1,7 @@
package net.mcreator.superbwarfare.entity; package net.mcreator.superbwarfare.entity;
import net.mcreator.superbwarfare.ModUtils; import net.mcreator.superbwarfare.ModUtils;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.entity.projectile.CannonShellEntity; import net.mcreator.superbwarfare.entity.projectile.CannonShellEntity;
import net.mcreator.superbwarfare.init.*; import net.mcreator.superbwarfare.init.*;
import net.mcreator.superbwarfare.item.common.ammo.CannonShellItem; import net.mcreator.superbwarfare.item.common.ammo.CannonShellItem;
@ -249,7 +250,7 @@ public class Mle1934Entity extends Entity implements GeoEntity, ICannonEntity {
private void destroy() { private void destroy() {
CustomExplosion explosion = new CustomExplosion(this.level(), this, CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this), 140f, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this), 140f,
this.getX(), this.getY(), this.getZ(), 10f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); this.getX(), this.getY(), this.getZ(), 10f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);
@ -286,6 +287,7 @@ public class Mle1934Entity extends Entity implements GeoEntity, ICannonEntity {
explosionDamage = 240; explosionDamage = 240;
fireProbability = 0.24F; fireProbability = 0.24F;
fireTime = 5; fireTime = 5;
durability = 1;
salvoShoot = stack.getCount() > 1 || player.isCreative(); salvoShoot = stack.getCount() > 1 || player.isCreative();
} }
@ -295,7 +297,7 @@ public class Mle1934Entity extends Entity implements GeoEntity, ICannonEntity {
explosionDamage = 120; explosionDamage = 120;
fireProbability = 0; fireProbability = 0;
fireTime = 0; fireTime = 0;
durability = 35; durability = 50;
salvoShoot = stack.getCount() > 1 || player.isCreative(); salvoShoot = stack.getCount() > 1 || player.isCreative();
} }

View file

@ -163,7 +163,7 @@ public class MortarEntity extends Entity implements GeoEntity, AnimatedEntity {
if (level instanceof ServerLevel server) { if (level instanceof ServerLevel server) {
MortarShellEntity entityToSpawn = new MortarShellEntity(ModEntities.MORTAR_SHELL.get(), player, level); MortarShellEntity entityToSpawn = new MortarShellEntity(ModEntities.MORTAR_SHELL.get(), player, level);
entityToSpawn.setPos(this.getX(), this.getEyeY(), this.getZ()); entityToSpawn.setPos(this.getX(), this.getEyeY(), this.getZ());
entityToSpawn.shoot(this.getLookAngle().x, this.getLookAngle().y, this.getLookAngle().z, 8, (float) 0.3); entityToSpawn.shoot(this.getLookAngle().x, this.getLookAngle().y, this.getLookAngle().z, 8, (float) 0.9);
level.addFreshEntity(entityToSpawn); 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, 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); 0.007);

View file

@ -1,6 +1,7 @@
package net.mcreator.superbwarfare.entity.projectile; package net.mcreator.superbwarfare.entity.projectile;
import net.mcreator.superbwarfare.ModUtils; import net.mcreator.superbwarfare.ModUtils;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.entity.AnimatedEntity; import net.mcreator.superbwarfare.entity.AnimatedEntity;
import net.mcreator.superbwarfare.init.*; import net.mcreator.superbwarfare.init.*;
import net.mcreator.superbwarfare.network.message.ClientIndicatorMessage; import net.mcreator.superbwarfare.network.message.ClientIndicatorMessage;
@ -23,6 +24,7 @@ import net.minecraft.world.entity.projectile.ThrowableItemProjectile;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.minecraft.world.level.Explosion; import net.minecraft.world.level.Explosion;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
@ -104,9 +106,11 @@ public class CannonShellEntity extends ThrowableItemProjectile implements GeoEnt
} }
} }
if (this.level() instanceof ServerLevel) { // if (this.level() instanceof ServerLevel) {
causeExplode(); // causeExplode();
} // }
ParticleTool.cannonHitParticles(this.level(), this.position());
Vec3 vec = this.getDeltaMovement(); Vec3 vec = this.getDeltaMovement();
double vec_x = vec.x; double vec_x = vec.x;
@ -132,16 +136,9 @@ public class CannonShellEntity extends ThrowableItemProjectile implements GeoEnt
int y = blockHitResult.getBlockPos().getY(); int y = blockHitResult.getBlockPos().getY();
int z = blockHitResult.getBlockPos().getZ(); int z = blockHitResult.getBlockPos().getZ();
if (this.firstHit) {
ParticleTool.cannonHitParticles(this.level(), this.position());
this.firstHit = false;
}
BlockState blockState = this.level().getBlockState(BlockPos.containing(x, y, z)); BlockState blockState = this.level().getBlockState(BlockPos.containing(x, y, z));
if (blockState.is(Blocks.BEDROCK) || blockState.is(Blocks.BARRIER)) { if (blockState.is(Blocks.BEDROCK) || blockState.is(Blocks.BARRIER)) {
if (!this.level().isClientSide()) {
causeExplode();
}
this.discard(); this.discard();
return; return;
} }
@ -149,10 +146,16 @@ public class CannonShellEntity extends ThrowableItemProjectile implements GeoEnt
float hardness = this.level().getBlockState(BlockPos.containing(x, y, z)).getBlock().defaultDestroyTime(); float hardness = this.level().getBlockState(BlockPos.containing(x, y, z)).getBlock().defaultDestroyTime();
this.durability -= (int) hardness; this.durability -= (int) hardness;
Vec3 vec = this.getDeltaMovement(); if (ExplosionDestroyConfig.EXPLOSION_DESTROY.get()) {
this.setDeltaMovement(vec.multiply(0.9, 0.9, 0.9)); BlockPos _pos = BlockPos.containing(x, y, z);
Block.dropResources(this.level().getBlockState(_pos), this.level(), BlockPos.containing(x, y, z), null);
this.level().destroyBlock(_pos, false);
}
if (blockState.is(ModBlocks.BARBED_WIRE.get()) || blockState.is(Blocks.NETHERITE_BLOCK)) { Vec3 vec = this.getDeltaMovement();
this.setDeltaMovement(vec.multiply(0.4, 0.4, 0.4));
if (blockState.is(ModBlocks.SANDBAG.get()) || blockState.is(Blocks.NETHERITE_BLOCK)) {
this.durability -= 10; this.durability -= 10;
} }
@ -167,14 +170,29 @@ public class CannonShellEntity extends ThrowableItemProjectile implements GeoEnt
if (this.durability <= 0) { if (this.durability <= 0) {
if (!this.level().isClientSide()) { if (!this.level().isClientSide()) {
causeExplode(); causeExplode();
this.discard();
}
} else {
if (!this.level().isClientSide()) {
if (ExplosionDestroyConfig.EXPLOSION_DESTROY.get()) {
BlockPos _pos = BlockPos.containing(x, y, z);
if (this.firstHit) {
ParticleTool.cannonHitParticles(this.level(), this.position());
causeExplode();
this.firstHit = false;
this.setNoGravity(true);
} else {
apExplode(_pos);
}
}
} }
} }
if (this.durability > 0) { if (this.durability > 0) {
ModUtils.queueServerWork(1, () -> { ModUtils.queueServerWork(2, () -> {
this.setDeltaMovement(vec.multiply(0.1, 0.1, 0.1));
if (!this.level().isClientSide()) { if (!this.level().isClientSide()) {
causeExplode(); causeExplode();
this.discard();
} }
}); });
} }
@ -191,6 +209,7 @@ public class CannonShellEntity extends ThrowableItemProjectile implements GeoEnt
if (this.level() instanceof ServerLevel) { if (this.level() instanceof ServerLevel) {
causeExplode(); causeExplode();
} }
this.discard();
} }
} }
@ -200,8 +219,43 @@ public class CannonShellEntity extends ThrowableItemProjectile implements GeoEnt
} }
CustomExplosion explosion = new CustomExplosion(this.level(), this, CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), explosionDamage, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(),
this.getX(), this.getY(), this.getZ(), explosionRadius, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1).setFireTime(fireTime); this,
this.getOwner()),
explosionDamage,
this.getX(),
this.getY(),
this.getZ(),
explosionRadius,
ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).
setDamageMultiplier(1).setFireTime(fireTime);
explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false);
if (explosionRadius > 7) {
ParticleTool.spawnHugeExplosionParticles(this.level(), this.position());
} else {
ParticleTool.spawnMediumExplosionParticles(this.level(), this.position());
}
}
private void apExplode(BlockPos pos) {
if (Math.random() > fireProbability) {
fireTime = 0;
}
CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(),
this,
this.getOwner()),
explosionDamage,
pos.getX(),
pos.getY(),
pos.getZ(),
explosionRadius,
ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).
setDamageMultiplier(1).setFireTime(fireTime);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);
@ -211,7 +265,6 @@ public class CannonShellEntity extends ThrowableItemProjectile implements GeoEnt
} else { } else {
ParticleTool.spawnMediumExplosionParticles(this.level(), this.position()); ParticleTool.spawnMediumExplosionParticles(this.level(), this.position());
} }
this.discard();
} }
private PlayState movementPredicate(AnimationState<CannonShellEntity> event) { private PlayState movementPredicate(AnimationState<CannonShellEntity> event) {

View file

@ -453,11 +453,7 @@ public class GunEventHandler {
SoundEvent sound1p; SoundEvent sound1p;
if (stack.is(ModItems.AK_47.get()) && GunsTool.getAttachmentType(stack, GunsTool.AttachmentType.MAGAZINE) == 2) {
sound1p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_reload_normal_drum"));
} else {
sound1p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_reload_normal")); sound1p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_reload_normal"));
}
if (sound1p != null && player instanceof ServerPlayer serverPlayer) { if (sound1p != null && player instanceof ServerPlayer serverPlayer) {
SoundTool.playLocalSound(serverPlayer, sound1p, 10f, 1f); SoundTool.playLocalSound(serverPlayer, sound1p, 10f, 1f);

View file

@ -77,7 +77,6 @@ public class ModSounds {
public static final RegistryObject<SoundEvent> AK_47_FAR_S = REGISTRY.register("ak_47_far_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_far_s"))); public static final RegistryObject<SoundEvent> AK_47_FAR_S = REGISTRY.register("ak_47_far_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_far_s")));
public static final RegistryObject<SoundEvent> AK_47_VERYFAR_S = REGISTRY.register("ak_47_veryfar_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_veryfar_s"))); public static final RegistryObject<SoundEvent> AK_47_VERYFAR_S = REGISTRY.register("ak_47_veryfar_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_veryfar_s")));
public static final RegistryObject<SoundEvent> AK_47_RELOAD_NORMAL = REGISTRY.register("ak_47_reload_normal", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_normal"))); public static final RegistryObject<SoundEvent> AK_47_RELOAD_NORMAL = REGISTRY.register("ak_47_reload_normal", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_normal")));
public static final RegistryObject<SoundEvent> AK_47_RELOAD_NORMAL_DRUM = REGISTRY.register("ak_47_reload_normal_drum", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_normal_drum")));
public static final RegistryObject<SoundEvent> AK_47_RELOAD_EMPTY = REGISTRY.register("ak_47_reload_empty", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_empty"))); public static final RegistryObject<SoundEvent> AK_47_RELOAD_EMPTY = REGISTRY.register("ak_47_reload_empty", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_empty")));
public static final RegistryObject<SoundEvent> AK_12_FIRE_1P = REGISTRY.register("ak_12_fire_1p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_fire_1p"))); public static final RegistryObject<SoundEvent> AK_12_FIRE_1P = REGISTRY.register("ak_12_fire_1p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_fire_1p")));

View file

@ -1,5 +1,6 @@
package net.mcreator.superbwarfare.item; package net.mcreator.superbwarfare.item;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.entity.projectile.HandGrenadeEntity; import net.mcreator.superbwarfare.entity.projectile.HandGrenadeEntity;
import net.mcreator.superbwarfare.init.ModDamageTypes; import net.mcreator.superbwarfare.init.ModDamageTypes;
import net.mcreator.superbwarfare.init.ModSounds; import net.mcreator.superbwarfare.init.ModSounds;
@ -70,7 +71,7 @@ public class HandGrenade extends Item {
if (!pLevel.isClientSide) { if (!pLevel.isClientSide) {
CustomExplosion explosion = new CustomExplosion(pLevel, null, CustomExplosion explosion = new CustomExplosion(pLevel, null,
ModDamageTypes.causeProjectileBoomDamage(pLevel.registryAccess(), pLivingEntity, pLivingEntity), 90, ModDamageTypes.causeProjectileBoomDamage(pLevel.registryAccess(), pLivingEntity, pLivingEntity), 90,
pLivingEntity.getX(), pLivingEntity.getY(), pLivingEntity.getZ(), 6.5f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1.25f); pLivingEntity.getX(), pLivingEntity.getY(), pLivingEntity.getZ(), 6.5f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1.25f);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(pLevel, explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(pLevel, explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);

View file

@ -1,5 +1,6 @@
package net.mcreator.superbwarfare.item; package net.mcreator.superbwarfare.item;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.entity.projectile.RgoGrenadeEntity; import net.mcreator.superbwarfare.entity.projectile.RgoGrenadeEntity;
import net.mcreator.superbwarfare.init.ModDamageTypes; import net.mcreator.superbwarfare.init.ModDamageTypes;
import net.mcreator.superbwarfare.init.ModSounds; import net.mcreator.superbwarfare.init.ModSounds;
@ -70,7 +71,7 @@ public class RgoGrenade extends Item {
if (!pLevel.isClientSide) { if (!pLevel.isClientSide) {
CustomExplosion explosion = new CustomExplosion(pLevel, null, CustomExplosion explosion = new CustomExplosion(pLevel, null,
ModDamageTypes.causeProjectileBoomDamage(pLevel.registryAccess(), pLivingEntity, pLivingEntity), 75, ModDamageTypes.causeProjectileBoomDamage(pLevel.registryAccess(), pLivingEntity, pLivingEntity), 75,
pLivingEntity.getX(), pLivingEntity.getY(), pLivingEntity.getZ(), 5.75f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1.25f); pLivingEntity.getX(), pLivingEntity.getY(), pLivingEntity.getZ(), 5.75f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1.25f);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(pLevel, explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(pLevel, explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);

View file

@ -133,8 +133,6 @@ public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
ItemStack stack = player.getMainHandItem(); ItemStack stack = player.getMainHandItem();
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP; if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
boolean grip = GunsTool.getAttachmentType(stack, GunsTool.AttachmentType.GRIP) == 1 || GunsTool.getAttachmentType(stack, GunsTool.AttachmentType.GRIP) == 2;
if (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).edit) { if (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).edit) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.edit")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.edit"));
} }

View file

@ -82,28 +82,59 @@ public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
ItemStack stack = player.getMainHandItem(); ItemStack stack = player.getMainHandItem();
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP; if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
boolean drum = GunsTool.getAttachmentType(stack, GunsTool.AttachmentType.MAGAZINE) == 2;
boolean grip = GunsTool.getAttachmentType(stack, GunsTool.AttachmentType.GRIP) == 1 || GunsTool.getAttachmentType(stack, GunsTool.AttachmentType.GRIP) == 2;
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) { if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
if (drum) {
if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_empty_drum_grip"));
} else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_empty_drum"));
}
} else {
if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_empty_grip"));
} else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_empty")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_empty"));
} }
}
}
if (stack.getOrCreateTag().getBoolean("is_normal_reloading")) { if (stack.getOrCreateTag().getBoolean("is_normal_reloading")) {
if (GunsTool.getAttachmentType(stack, GunsTool.AttachmentType.MAGAZINE) == 2) { if (drum) {
if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_normal_drum_grip"));
} else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_normal_drum")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_normal_drum"));
}
} else {
if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_normal_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_normal")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_normal"));
} }
} }
}
if (player.isSprinting() && player.onGround() && player.getPersistentData().getDouble("noRun") == 0 && ClientEventHandler.drawTime < 0.01) { if (player.isSprinting() && player.onGround() && player.getPersistentData().getDouble("noRun") == 0 && ClientEventHandler.drawTime < 0.01) {
if (player.hasEffect(MobEffects.MOVEMENT_SPEED)) { if (player.hasEffect(MobEffects.MOVEMENT_SPEED)) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.run_fast")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.run_fast"));
} else {
if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.run_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.run")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.run"));
} }
} }
}
if (grip) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.idle_grip"));
} else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.idle")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.idle"));
} }
}
private PlayState editPredicate(AnimationState<AK47Item> event) { private PlayState editPredicate(AnimationState<AK47Item> event) {
LocalPlayer player = Minecraft.getInstance().player; LocalPlayer player = Minecraft.getInstance().player;

View file

@ -87,7 +87,7 @@ public class CustomExplosion extends Explosion {
d0 /= d3; d0 /= d3;
d1 /= d3; d1 /= d3;
d2 /= d3; d2 /= d3;
float f = this.radius * (0.7F + this.level.random.nextFloat() * 0.6F); float f = this.radius * (0.4F + this.level.random.nextFloat() * 0.3F);
double d4 = this.x; double d4 = this.x;
double d6 = this.y; double d6 = this.y;
double d8 = this.z; double d8 = this.z;
@ -102,7 +102,7 @@ public class CustomExplosion extends Explosion {
Optional<Float> optional = this.damageCalculator.getBlockExplosionResistance(this, this.level, blockpos, blockstate, fluidstate); Optional<Float> optional = this.damageCalculator.getBlockExplosionResistance(this, this.level, blockpos, blockstate, fluidstate);
if (optional.isPresent()) { if (optional.isPresent()) {
f -= (optional.get() + 0.3F) * 0.3F; f -= (optional.get() + 0.5F) * 0.15F;
} }
if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockpos, blockstate, f)) { if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockpos, blockstate, f)) {

View file

@ -1,5 +1,6 @@
package net.mcreator.superbwarfare.tools; package net.mcreator.superbwarfare.tools;
import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig;
import net.mcreator.superbwarfare.init.ModDamageTypes; import net.mcreator.superbwarfare.init.ModDamageTypes;
import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -12,7 +13,7 @@ public class ProjectileTool {
public static void causeCustomExplode(ThrowableItemProjectile projectile, @Nullable DamageSource source, Entity target, float damage, float radius, float damageMultiplier) { public static void causeCustomExplode(ThrowableItemProjectile projectile, @Nullable DamageSource source, Entity target, float damage, float radius, float damageMultiplier) {
CustomExplosion explosion = new CustomExplosion(projectile.level(), projectile, source, damage, CustomExplosion explosion = new CustomExplosion(projectile.level(), projectile, source, damage,
target.getX(), target.getY(), target.getZ(), radius, Explosion.BlockInteraction.KEEP).setDamageMultiplier(damageMultiplier); target.getX(), target.getY(), target.getZ(), radius, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(damageMultiplier);
explosion.explode(); explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(projectile.level(), explosion); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(projectile.level(), explosion);
explosion.finalizeExplosion(false); explosion.finalizeExplosion(false);

View file

@ -1,5 +1,6 @@
package net.mcreator.superbwarfare.tools; package net.mcreator.superbwarfare.tools;
import net.mcreator.superbwarfare.init.ModKeyMappings;
import net.mcreator.superbwarfare.init.ModPerks; import net.mcreator.superbwarfare.init.ModPerks;
import net.mcreator.superbwarfare.init.ModTags; import net.mcreator.superbwarfare.init.ModTags;
import net.mcreator.superbwarfare.perk.AmmoPerk; import net.mcreator.superbwarfare.perk.AmmoPerk;
@ -60,6 +61,9 @@ public class TooltipTool {
addLevelTips(tooltip, stack); addLevelTips(tooltip, stack);
addBypassTips(tooltip, stack); addBypassTips(tooltip, stack);
addPerkTips(tooltip, stack); addPerkTips(tooltip, stack);
if (stack.is(ModTags.Items.CAN_CUSTOM_GUN)) {
addEditTips(tooltip);
}
} }
public static void addShotgunTips(List<Component> tooltip, ItemStack stack) { public static void addShotgunTips(List<Component> tooltip, ItemStack stack) {
@ -102,6 +106,14 @@ public class TooltipTool {
.append(Component.literal(new DecimalFormat("##").format(ItemNBTTool.getDouble(stack, "rpm", 0) + ItemNBTTool.getDouble(stack, "customRpm", 0))).withStyle(ChatFormatting.GREEN))); .append(Component.literal(new DecimalFormat("##").format(ItemNBTTool.getDouble(stack, "rpm", 0) + ItemNBTTool.getDouble(stack, "customRpm", 0))).withStyle(ChatFormatting.GREEN)));
} }
private static void addEditTips(List<Component> tooltip) {
tooltip.add(Component.literal(" ").withStyle(ChatFormatting.GRAY));
tooltip.add(Component.translatable("des.superbwarfare.tips.edit_part").withStyle(ChatFormatting.LIGHT_PURPLE)
.append(Component.literal("[" + ModKeyMappings.EDIT_MODE.getKey().getDisplayName().getString() + "]").withStyle(ChatFormatting.LIGHT_PURPLE))
.append(Component.translatable("des.superbwarfare.tips.edit_part2").withStyle(ChatFormatting.LIGHT_PURPLE)));
}
private static void addLevelTips(List<Component> tooltip, ItemStack stack) { private static void addLevelTips(List<Component> tooltip, ItemStack stack) {
int level = ItemNBTTool.getInt(stack, "Level", 0); int level = ItemNBTTool.getInt(stack, "Level", 0);
double rate = ItemNBTTool.getDouble(stack, "Exp", 0) / (20 * Math.pow(level, 2) + 160 * level + 20); double rate = ItemNBTTool.getDouble(stack, "Exp", 0) / (20 * Math.pow(level, 2) + 160 * level + 20);

File diff suppressed because it is too large Load diff

View file

@ -50,6 +50,151 @@
"parent": "fireRoot3", "parent": "fireRoot3",
"pivot": [0, 0, 0] "pivot": [0, 0, 0]
}, },
{
"name": "kuaimanji",
"parent": "0",
"pivot": [0.09745, 0.02524, 2.09936],
"cubes": [
{
"origin": [-0.67259, 0.081, 1.96073],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [-0.67259, 0.09609, 2.0903],
"rotation": [-135, 0, 0],
"uv": {
"north": {"uv": [11, 66], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 40], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 11], "uv_size": [1.25, 0.25]},
"west": {"uv": [41, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 12], "uv_size": [1.25, 0.25]},
"down": {"uv": [13, 66.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.77259, -0.0779, 1.52875],
"size": [1.54008, 0.14465, 0.54651],
"pivot": [0.09745, -0.01773, 2.11108],
"rotation": [90, 0, 0],
"uv": {
"north": {"uv": [63, 52], "uv_size": [1.5, 0.25]},
"east": {"uv": [71, 69], "uv_size": [0.5, 0.25]},
"south": {"uv": [63, 53], "uv_size": [1.5, 0.25]},
"west": {"uv": [70, 71], "uv_size": [0.5, 0.25]},
"up": {"uv": [58, 28], "uv_size": [1.5, 0.5]},
"down": {"uv": [58, 29.5], "uv_size": [1.5, -0.5]}
}
},
{
"origin": [-0.67259, 0.01637, 1.92449],
"size": [1.34008, 0.09777, 0.1],
"pivot": [0.09745, 0.0946, 2.12826],
"rotation": [-90, 0, 0],
"uv": {
"north": {"uv": [27, 66], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 46], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 27], "uv_size": [1.25, 0.25]},
"west": {"uv": [47, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 28], "uv_size": [1.25, 0.25]},
"down": {"uv": [29, 66.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, 0.01012, 1.92432],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, 0.0531, 2.02809],
"rotation": [-45, 0, 0],
"uv": {
"north": {"uv": [66, 7], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 39], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 8], "uv_size": [1.25, 0.25]},
"west": {"uv": [40, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [9, 66], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 9.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, -0.04856, 1.92432],
"size": [1.34008, 0.14465, 0.18323],
"uv": {
"north": {"uv": [65, 61], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 38], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 2], "uv_size": [1.25, 0.25]},
"west": {"uv": [39, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 6], "uv_size": [1.25, 0.25]},
"down": {"uv": [7, 66.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, 0.09609, 1.90706],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [-0.67259, 0.09609, 2.0903],
"rotation": [-180, 0, 0],
"uv": {
"north": {"uv": [66, 21], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 44], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 22], "uv_size": [1.25, 0.25]},
"west": {"uv": [45, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [23, 66], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 23.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, -0.1108, 1.97441],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, -0.01773, 2.11108],
"rotation": [135, 0, 0],
"uv": {
"north": {"uv": [66, 24], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 45], "uv_size": [0.25, 0.25]},
"south": {"uv": [25, 66], "uv_size": [1.25, 0.25]},
"west": {"uv": [46, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 25], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 26.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, -0.00707, 2.02449],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, 0.0946, 2.12826],
"rotation": [-90, 0, 0],
"uv": {
"north": {"uv": [66, 13], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 41], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 14], "uv_size": [1.25, 0.25]},
"west": {"uv": [42, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [15, 66], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 15.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, -0.05212, 1.95722],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, -0.01773, 2.11108],
"rotation": [45, 0, 0],
"uv": {
"north": {"uv": [66, 16], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 42], "uv_size": [0.25, 0.25]},
"south": {"uv": [17, 66], "uv_size": [1.25, 0.25]},
"west": {"uv": [43, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 17], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 18.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, -0.0779, 1.97797],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, -0.01773, 2.11108],
"rotation": [90, 0, 0],
"uv": {
"north": {"uv": [19, 66], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 43], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 19], "uv_size": [1.25, 0.25]},
"west": {"uv": [44, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 20], "uv_size": [1.25, 0.25]},
"down": {"uv": [21, 66.25], "uv_size": [1.25, -0.25]}
}
}
]
},
{ {
"name": "icon", "name": "icon",
"parent": "0", "parent": "0",
@ -14725,144 +14870,6 @@
"down": {"uv": [48, 66.25], "uv_size": [1.25, -0.25]} "down": {"uv": [48, 66.25], "uv_size": [1.25, -0.25]}
} }
}, },
{
"origin": [-0.67259, -0.04856, 1.92432],
"size": [1.34008, 0.14465, 0.18323],
"uv": {
"north": {"uv": [65, 61], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 38], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 2], "uv_size": [1.25, 0.25]},
"west": {"uv": [39, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 6], "uv_size": [1.25, 0.25]},
"down": {"uv": [7, 66.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, 0.01012, 1.92432],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, 0.0531, 2.02809],
"rotation": [-45, 0, 0],
"uv": {
"north": {"uv": [66, 7], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 39], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 8], "uv_size": [1.25, 0.25]},
"west": {"uv": [40, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [9, 66], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 9.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, -0.00707, 2.02449],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, 0.0946, 2.12826],
"rotation": [-90, 0, 0],
"uv": {
"north": {"uv": [66, 13], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 41], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 14], "uv_size": [1.25, 0.25]},
"west": {"uv": [42, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [15, 66], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 15.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, 0.01637, 1.92449],
"size": [1.34008, 0.09777, 0.1],
"pivot": [0.09745, 0.0946, 2.12826],
"rotation": [-90, 0, 0],
"uv": {
"north": {"uv": [27, 66], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 46], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 27], "uv_size": [1.25, 0.25]},
"west": {"uv": [47, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 28], "uv_size": [1.25, 0.25]},
"down": {"uv": [29, 66.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, 0.081, 1.96073],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [-0.67259, 0.09609, 2.0903],
"rotation": [-135, 0, 0],
"uv": {
"north": {"uv": [11, 66], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 40], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 11], "uv_size": [1.25, 0.25]},
"west": {"uv": [41, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 12], "uv_size": [1.25, 0.25]},
"down": {"uv": [13, 66.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, -0.1108, 1.97441],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, -0.01773, 2.11108],
"rotation": [135, 0, 0],
"uv": {
"north": {"uv": [66, 24], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 45], "uv_size": [0.25, 0.25]},
"south": {"uv": [25, 66], "uv_size": [1.25, 0.25]},
"west": {"uv": [46, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 25], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 26.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, 0.09609, 1.90706],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [-0.67259, 0.09609, 2.0903],
"rotation": [-180, 0, 0],
"uv": {
"north": {"uv": [66, 21], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 44], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 22], "uv_size": [1.25, 0.25]},
"west": {"uv": [45, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [23, 66], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 23.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.67259, -0.0779, 1.97797],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, -0.01773, 2.11108],
"rotation": [90, 0, 0],
"uv": {
"north": {"uv": [19, 66], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 43], "uv_size": [0.25, 0.25]},
"south": {"uv": [66, 19], "uv_size": [1.25, 0.25]},
"west": {"uv": [44, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 20], "uv_size": [1.25, 0.25]},
"down": {"uv": [21, 66.25], "uv_size": [1.25, -0.25]}
}
},
{
"origin": [-0.77259, -0.0779, 1.52875],
"size": [1.54008, 0.14465, 0.54651],
"pivot": [0.09745, -0.01773, 2.11108],
"rotation": [90, 0, 0],
"uv": {
"north": {"uv": [63, 52], "uv_size": [1.5, 0.25]},
"east": {"uv": [71, 69], "uv_size": [0.5, 0.25]},
"south": {"uv": [63, 53], "uv_size": [1.5, 0.25]},
"west": {"uv": [70, 71], "uv_size": [0.5, 0.25]},
"up": {"uv": [58, 28], "uv_size": [1.5, 0.5]},
"down": {"uv": [58, 29.5], "uv_size": [1.5, -0.5]}
}
},
{
"origin": [-0.67259, -0.05212, 1.95722],
"size": [1.34008, 0.14465, 0.18323],
"pivot": [0.09745, -0.01773, 2.11108],
"rotation": [45, 0, 0],
"uv": {
"north": {"uv": [66, 16], "uv_size": [1.25, 0.25]},
"east": {"uv": [75, 42], "uv_size": [0.25, 0.25]},
"south": {"uv": [17, 66], "uv_size": [1.25, 0.25]},
"west": {"uv": [43, 75], "uv_size": [0.25, 0.25]},
"up": {"uv": [66, 17], "uv_size": [1.25, 0.25]},
"down": {"uv": [66, 18.25], "uv_size": [1.25, -0.25]}
}
},
{ {
"origin": [-0.12259, -0.84585, 0.74868], "origin": [-0.12259, -0.84585, 0.74868],
"size": [0.2392, 0.5, 0.29293], "size": [0.2392, 0.5, 0.29293],

View file

@ -315,15 +315,15 @@
{ {
"name": "Barrel1", "name": "Barrel1",
"parent": "Barrel", "parent": "Barrel",
"pivot": [0, 0.00391, 0] "pivot": [0, 0.00391, 4.3]
}, },
{ {
"name": "group14", "name": "group14",
"parent": "Barrel1", "parent": "Barrel1",
"pivot": [0.0003, 2.12221, -27.45177], "pivot": [0.0003, 2.12221, -23.15177],
"cubes": [ "cubes": [
{ {
"origin": [-0.20514, 1.8245, -23.21173], "origin": [-0.20514, 1.8245, -20.01173],
"size": [0.41028, 0.98576, 0.29955], "size": [0.41028, 0.98576, 0.29955],
"uv": { "uv": {
"north": {"uv": [58, 74], "uv_size": [0.5, 1.25]}, "north": {"uv": [58, 74], "uv_size": [0.5, 1.25]},
@ -333,9 +333,9 @@
} }
}, },
{ {
"origin": [-0.20489, 1.8244, -23.21173], "origin": [-0.20489, 1.8244, -20.01173],
"size": [0.41028, 0.98576, 0.29955], "size": [0.41028, 0.98576, 0.29955],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [59, 72], "uv_size": [0.5, 1.25]}, "north": {"uv": [59, 72], "uv_size": [0.5, 1.25]},
@ -345,7 +345,7 @@
} }
}, },
{ {
"origin": [-0.49288, 2.11224, -23.21173], "origin": [-0.49288, 2.11224, -20.01173],
"size": [0.98576, 0.41028, 0.29955], "size": [0.98576, 0.41028, 0.29955],
"uv": { "uv": {
"north": {"uv": [57, 76], "uv_size": [1.25, 0.5]}, "north": {"uv": [57, 76], "uv_size": [1.25, 0.5]},
@ -355,9 +355,9 @@
} }
}, },
{ {
"origin": [-0.49264, 2.11214, -23.21173], "origin": [-0.49264, 2.11214, -20.01173],
"size": [0.98576, 0.41028, 0.29955], "size": [0.98576, 0.41028, 0.29955],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [59, 75], "uv_size": [1.25, 0.5]}, "north": {"uv": [59, 75], "uv_size": [1.25, 0.5]},
@ -371,10 +371,10 @@
{ {
"name": "group15", "name": "group15",
"parent": "Barrel1", "parent": "Barrel1",
"pivot": [0.0003, 2.12221, -26.79177], "pivot": [0.0003, 2.12221, -22.49177],
"cubes": [ "cubes": [
{ {
"origin": [-0.20514, 1.8245, -22.31308], "origin": [-0.20514, 1.8245, -19.11308],
"size": [0.41028, 0.98576, 0.29955], "size": [0.41028, 0.98576, 0.29955],
"uv": { "uv": {
"north": {"uv": [55, 78], "uv_size": [0.5, 1.25]}, "north": {"uv": [55, 78], "uv_size": [0.5, 1.25]},
@ -384,9 +384,9 @@
} }
}, },
{ {
"origin": [-0.20489, 1.8244, -22.31308], "origin": [-0.20489, 1.8244, -19.11308],
"size": [0.41028, 0.98576, 0.29955], "size": [0.41028, 0.98576, 0.29955],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [56, 78], "uv_size": [0.5, 1.25]}, "north": {"uv": [56, 78], "uv_size": [0.5, 1.25]},
@ -396,7 +396,7 @@
} }
}, },
{ {
"origin": [-0.49288, 2.11224, -22.31308], "origin": [-0.49288, 2.11224, -19.11308],
"size": [0.98576, 0.41028, 0.29955], "size": [0.98576, 0.41028, 0.29955],
"uv": { "uv": {
"north": {"uv": [59, 78], "uv_size": [1.25, 0.5]}, "north": {"uv": [59, 78], "uv_size": [1.25, 0.5]},
@ -406,9 +406,9 @@
} }
}, },
{ {
"origin": [-0.49264, 2.11214, -22.31308], "origin": [-0.49264, 2.11214, -19.11308],
"size": [0.98576, 0.41028, 0.29955], "size": [0.98576, 0.41028, 0.29955],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [61, 77], "uv_size": [1.25, 0.5]}, "north": {"uv": [61, 77], "uv_size": [1.25, 0.5]},
@ -422,10 +422,10 @@
{ {
"name": "group16", "name": "group16",
"parent": "Barrel1", "parent": "Barrel1",
"pivot": [0.0003, 2.12221, -27.12177], "pivot": [0.0003, 2.12221, -22.82177],
"cubes": [ "cubes": [
{ {
"origin": [-0.20514, 1.8245, -22.76241], "origin": [-0.20514, 1.8245, -19.56241],
"size": [0.41028, 0.98576, 0.22466], "size": [0.41028, 0.98576, 0.22466],
"uv": { "uv": {
"north": {"uv": [60, 70], "uv_size": [0.5, 1.25]}, "north": {"uv": [60, 70], "uv_size": [0.5, 1.25]},
@ -435,9 +435,9 @@
} }
}, },
{ {
"origin": [-0.20489, 1.8244, -22.76241], "origin": [-0.20489, 1.8244, -19.56241],
"size": [0.41028, 0.98576, 0.22466], "size": [0.41028, 0.98576, 0.22466],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [57, 77], "uv_size": [0.5, 1.25]}, "north": {"uv": [57, 77], "uv_size": [0.5, 1.25]},
@ -447,7 +447,7 @@
} }
}, },
{ {
"origin": [-0.49288, 2.11224, -22.76241], "origin": [-0.49288, 2.11224, -19.56241],
"size": [0.98576, 0.41028, 0.22466], "size": [0.98576, 0.41028, 0.22466],
"uv": { "uv": {
"north": {"uv": [59, 77], "uv_size": [1.25, 0.5]}, "north": {"uv": [59, 77], "uv_size": [1.25, 0.5]},
@ -457,9 +457,9 @@
} }
}, },
{ {
"origin": [-0.49264, 2.11214, -22.76241], "origin": [-0.49264, 2.11214, -19.56241],
"size": [0.98576, 0.41028, 0.22466], "size": [0.98576, 0.41028, 0.22466],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [61, 70], "uv_size": [1.25, 0.5]}, "north": {"uv": [61, 70], "uv_size": [1.25, 0.5]},
@ -473,10 +473,10 @@
{ {
"name": "group17", "name": "group17",
"parent": "Barrel1", "parent": "Barrel1",
"pivot": [0.0003, 2.12221, -27.34177], "pivot": [0.0003, 2.12221, -23.04177],
"cubes": [ "cubes": [
{ {
"origin": [-0.17437, 1.89843, -22.91218], "origin": [-0.17437, 1.89843, -19.71218],
"size": [0.34873, 0.8379, 0.67399], "size": [0.34873, 0.8379, 0.67399],
"uv": { "uv": {
"up": {"uv": [62, 74], "uv_size": [0.5, 0.75]}, "up": {"uv": [62, 74], "uv_size": [0.5, 0.75]},
@ -484,9 +484,9 @@
} }
}, },
{ {
"origin": [-0.17412, 1.89833, -22.91218], "origin": [-0.17412, 1.89833, -19.71218],
"size": [0.34873, 0.8379, 0.67399], "size": [0.34873, 0.8379, 0.67399],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"up": {"uv": [59, 79], "uv_size": [0.5, 0.75]}, "up": {"uv": [59, 79], "uv_size": [0.5, 0.75]},
@ -494,7 +494,7 @@
} }
}, },
{ {
"origin": [-0.41895, 2.14301, -22.91218], "origin": [-0.41895, 2.14301, -19.71218],
"size": [0.8379, 0.34873, 0.67399], "size": [0.8379, 0.34873, 0.67399],
"uv": { "uv": {
"east": {"uv": [61, 79], "uv_size": [0.75, 0.5]}, "east": {"uv": [61, 79], "uv_size": [0.75, 0.5]},
@ -502,9 +502,9 @@
} }
}, },
{ {
"origin": [-0.4187, 2.14291, -22.91218], "origin": [-0.4187, 2.14291, -19.71218],
"size": [0.8379, 0.34873, 0.67399], "size": [0.8379, 0.34873, 0.67399],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"east": {"uv": [53, 80], "uv_size": [0.75, 0.5]}, "east": {"uv": [53, 80], "uv_size": [0.75, 0.5]},
@ -516,12 +516,12 @@
{ {
"name": "group18", "name": "group18",
"parent": "Barrel1", "parent": "Barrel1",
"pivot": [0.0003, 2.12221, -26.84677], "pivot": [0.0003, 2.12221, -22.54677],
"cubes": [ "cubes": [
{ {
"origin": [-0.49264, 2.11214, -24.48483], "origin": [-0.49264, 2.11214, -21.28483],
"size": [0.14978, 0.41028, 0.29955], "size": [0.14978, 0.41028, 0.29955],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [59, 81], "uv_size": [0.25, 0.5]}, "north": {"uv": [59, 81], "uv_size": [0.25, 0.5]},
@ -531,9 +531,9 @@
} }
}, },
{ {
"origin": [-0.20489, 1.8244, -24.48483], "origin": [-0.20489, 1.8244, -21.28483],
"size": [0.41028, 0.14978, 0.29955], "size": [0.41028, 0.14978, 0.29955],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [57, 81], "uv_size": [0.5, 0.25]}, "north": {"uv": [57, 81], "uv_size": [0.5, 0.25]},
@ -543,7 +543,7 @@
} }
}, },
{ {
"origin": [-0.49288, 2.11224, -24.48483], "origin": [-0.49288, 2.11224, -21.28483],
"size": [0.14978, 0.41028, 0.29955], "size": [0.14978, 0.41028, 0.29955],
"uv": { "uv": {
"north": {"uv": [55, 81], "uv_size": [0.25, 0.5]}, "north": {"uv": [55, 81], "uv_size": [0.25, 0.5]},
@ -553,7 +553,7 @@
} }
}, },
{ {
"origin": [-0.20514, 2.66048, -24.48483], "origin": [-0.20514, 2.66048, -21.28483],
"size": [0.41028, 0.14978, 1.2731], "size": [0.41028, 0.14978, 1.2731],
"uv": { "uv": {
"north": {"uv": [59, 80], "uv_size": [0.5, 0.25]}, "north": {"uv": [59, 80], "uv_size": [0.5, 0.25]},
@ -564,7 +564,7 @@
} }
}, },
{ {
"origin": [-0.20346, 1.82381, -24.48483], "origin": [-0.20346, 1.82381, -21.28483],
"size": [0.41028, 0.14978, 1.2731], "size": [0.41028, 0.14978, 1.2731],
"uv": { "uv": {
"north": {"uv": [61, 81], "uv_size": [0.5, 0.25]}, "north": {"uv": [61, 81], "uv_size": [0.5, 0.25]},
@ -575,9 +575,9 @@
} }
}, },
{ {
"origin": [-0.20489, 2.66038, -24.48483], "origin": [-0.20489, 2.66038, -21.28483],
"size": [0.41028, 0.14978, 0.29955], "size": [0.41028, 0.14978, 0.29955],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [63, 76], "uv_size": [0.5, 0.25]}, "north": {"uv": [63, 76], "uv_size": [0.5, 0.25]},
@ -587,7 +587,7 @@
} }
}, },
{ {
"origin": [0.3431, 2.11224, -24.48483], "origin": [0.3431, 2.11224, -21.28483],
"size": [0.14978, 0.41028, 0.29955], "size": [0.14978, 0.41028, 0.29955],
"uv": { "uv": {
"north": {"uv": [63, 78], "uv_size": [0.25, 0.5]}, "north": {"uv": [63, 78], "uv_size": [0.25, 0.5]},
@ -597,9 +597,9 @@
} }
}, },
{ {
"origin": [0.34335, 2.11214, -24.48483], "origin": [0.34335, 2.11214, -21.28483],
"size": [0.14978, 0.41028, 0.29955], "size": [0.14978, 0.41028, 0.29955],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [53, 81], "uv_size": [0.25, 0.5]}, "north": {"uv": [53, 81], "uv_size": [0.25, 0.5]},
@ -609,9 +609,9 @@
} }
}, },
{ {
"origin": [-0.20489, 2.66038, -23.81084], "origin": [-0.20489, 2.66038, -20.61084],
"size": [0.41028, 0.14978, 0.14978], "size": [0.41028, 0.14978, 0.14978],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [60, 82], "uv_size": [0.5, 0.25]}, "north": {"uv": [60, 82], "uv_size": [0.5, 0.25]},
@ -621,7 +621,7 @@
} }
}, },
{ {
"origin": [-0.49288, 2.11224, -23.81084], "origin": [-0.49288, 2.11224, -20.61084],
"size": [0.14978, 0.41028, 0.14978], "size": [0.14978, 0.41028, 0.14978],
"uv": { "uv": {
"north": {"uv": [58, 82], "uv_size": [0.25, 0.5]}, "north": {"uv": [58, 82], "uv_size": [0.25, 0.5]},
@ -631,9 +631,9 @@
} }
}, },
{ {
"origin": [-0.49264, 2.11214, -23.81084], "origin": [-0.49264, 2.11214, -20.61084],
"size": [0.14978, 0.41028, 0.14978], "size": [0.14978, 0.41028, 0.14978],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [56, 82], "uv_size": [0.25, 0.5]}, "north": {"uv": [56, 82], "uv_size": [0.25, 0.5]},
@ -643,9 +643,9 @@
} }
}, },
{ {
"origin": [-0.20489, 1.8244, -23.81084], "origin": [-0.20489, 1.8244, -20.61084],
"size": [0.41028, 0.14978, 0.14978], "size": [0.41028, 0.14978, 0.14978],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [54, 82], "uv_size": [0.5, 0.25]}, "north": {"uv": [54, 82], "uv_size": [0.5, 0.25]},
@ -655,7 +655,7 @@
} }
}, },
{ {
"origin": [0.3431, 2.11224, -23.81084], "origin": [0.3431, 2.11224, -20.61084],
"size": [0.14978, 0.41028, 0.14978], "size": [0.14978, 0.41028, 0.14978],
"uv": { "uv": {
"north": {"uv": [64, 80], "uv_size": [0.25, 0.5]}, "north": {"uv": [64, 80], "uv_size": [0.25, 0.5]},
@ -665,9 +665,9 @@
} }
}, },
{ {
"origin": [0.34335, 2.11214, -23.81084], "origin": [0.34335, 2.11214, -20.61084],
"size": [0.14978, 0.41028, 0.14978], "size": [0.14978, 0.41028, 0.14978],
"pivot": [0, 2.31703, -23.24918], "pivot": [0, 2.31703, -20.04918],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [64, 78], "uv_size": [0.25, 0.5]}, "north": {"uv": [64, 78], "uv_size": [0.25, 0.5]},
@ -678,63 +678,18 @@
} }
] ]
}, },
{
"name": "bone48",
"parent": "Barrel1",
"pivot": [0, 1.76306, -24.47788],
"cubes": [
{
"origin": [-0.146, 1.9618, -22.04353],
"size": [0.2919, 0.7046, 3.2115],
"uv": {
"up": {"uv": [53, 70], "uv_size": [0.25, 3.25]},
"down": {"uv": [54, 73.25], "uv_size": [0.25, -3.25]}
}
},
{
"origin": [-0.063, 1.96176, -22.04353],
"size": [0.2919, 0.7046, 3.2115],
"pivot": [0.04149, 2.41422, -20.43778],
"rotation": [0, 0, 45],
"uv": {
"up": {"uv": [55, 70], "uv_size": [0.25, 3.25]},
"down": {"uv": [56, 73.25], "uv_size": [0.25, -3.25]}
}
},
{
"origin": [-0.00433, 1.90305, -22.04353],
"size": [0.2919, 0.7046, 3.2115],
"pivot": [0.10016, 2.3555, -20.43778],
"rotation": [0, 0, 90],
"uv": {
"up": {"uv": [53, 74], "uv_size": [0.25, 3.25]},
"down": {"uv": [57, 73.25], "uv_size": [0.25, -3.25]}
}
},
{
"origin": [-0.00445, 1.82013, -22.04353],
"size": [0.2919, 0.7046, 3.2115],
"pivot": [0.10005, 2.27258, -20.43778],
"rotation": [0, 0, 135],
"uv": {
"up": {"uv": [54, 74], "uv_size": [0.25, 3.25]},
"down": {"uv": [55, 77.25], "uv_size": [0.25, -3.25]}
}
}
]
},
{ {
"name": "Barrel2", "name": "Barrel2",
"parent": "Barrel", "parent": "Barrel",
"pivot": [-0.75009, -0.4773, -4.23048] "pivot": [-0.75009, -0.4773, -2.03048]
}, },
{ {
"name": "group19", "name": "group19",
"parent": "Barrel2", "parent": "Barrel2",
"pivot": [0, 2.34687, -22.53882], "pivot": [0, 2.34687, -20.33882],
"cubes": [ "cubes": [
{ {
"origin": [-0.33511, 1.54172, -26.88919], "origin": [-0.33511, 1.54172, -24.68919],
"size": [0.67021, 1.61031, 8.45314], "size": [0.67021, 1.61031, 8.45314],
"uv": { "uv": {
"north": {"uv": [49.25, 91], "uv_size": [0.5, 1]}, "north": {"uv": [49.25, 91], "uv_size": [0.5, 1]},
@ -744,9 +699,9 @@
} }
}, },
{ {
"origin": [-0.33511, 1.54172, -26.88919], "origin": [-0.33511, 1.54172, -24.68919],
"size": [0.67021, 1.61031, 8.45314], "size": [0.67021, 1.61031, 8.45314],
"pivot": [0, 2.34687, -22.16206], "pivot": [0, 2.34687, -19.96206],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [49.25, 93], "uv_size": [0.5, 1]}, "north": {"uv": [49.25, 93], "uv_size": [0.5, 1]},
@ -756,7 +711,7 @@
} }
}, },
{ {
"origin": [-0.80516, 2.01177, -26.88919], "origin": [-0.80516, 2.01177, -24.68919],
"size": [1.61031, 0.67021, 8.45314], "size": [1.61031, 0.67021, 8.45314],
"uv": { "uv": {
"north": {"uv": [51.25, 94], "uv_size": [1, 0.5]}, "north": {"uv": [51.25, 94], "uv_size": [1, 0.5]},
@ -766,9 +721,9 @@
} }
}, },
{ {
"origin": [-0.80516, 2.01177, -26.88919], "origin": [-0.80516, 2.01177, -24.68919],
"size": [1.61031, 0.67021, 8.45314], "size": [1.61031, 0.67021, 8.45314],
"pivot": [0, 2.34687, -22.16206], "pivot": [0, 2.34687, -19.96206],
"rotation": [0, 0, -45], "rotation": [0, 0, -45],
"uv": { "uv": {
"north": {"uv": [53.25, 94], "uv_size": [1, 0.5]}, "north": {"uv": [53.25, 94], "uv_size": [1, 0.5]},
@ -782,10 +737,10 @@
{ {
"name": "group20", "name": "group20",
"parent": "Barrel2", "parent": "Barrel2",
"pivot": [0, 2.34687, -22.53882], "pivot": [0, 2.34687, -20.33882],
"cubes": [ "cubes": [
{ {
"origin": [-0.22095, 1.816, -26.98105], "origin": [-0.22095, 1.816, -24.78105],
"size": [0.4419, 1.06174, 8.78734], "size": [0.4419, 1.06174, 8.78734],
"uv": { "uv": {
"north": {"uv": [55.25, 86], "uv_size": [0.25, 0.75]}, "north": {"uv": [55.25, 86], "uv_size": [0.25, 0.75]},
@ -795,9 +750,9 @@
} }
}, },
{ {
"origin": [-0.22095, 1.816, -26.98105], "origin": [-0.22095, 1.816, -24.78105],
"size": [0.4419, 1.06174, 8.78734], "size": [0.4419, 1.06174, 8.78734],
"pivot": [0, 2.34687, -20.5512], "pivot": [0, 2.34687, -18.3512],
"rotation": [0, 0, 45], "rotation": [0, 0, 45],
"uv": { "uv": {
"north": {"uv": [55.25, 88], "uv_size": [0.25, 0.75]}, "north": {"uv": [55.25, 88], "uv_size": [0.25, 0.75]},
@ -807,7 +762,7 @@
} }
}, },
{ {
"origin": [-0.53087, 2.12593, -26.98105], "origin": [-0.53087, 2.12593, -24.78105],
"size": [1.06174, 0.4419, 8.78734], "size": [1.06174, 0.4419, 8.78734],
"uv": { "uv": {
"north": {"uv": [55.25, 89], "uv_size": [0.75, 0.25]}, "north": {"uv": [55.25, 89], "uv_size": [0.75, 0.25]},
@ -817,9 +772,9 @@
} }
}, },
{ {
"origin": [-0.53087, 2.12593, -26.98105], "origin": [-0.53087, 2.12593, -24.78105],
"size": [1.06174, 0.4419, 8.78734], "size": [1.06174, 0.4419, 8.78734],
"pivot": [0, 2.34687, -20.5512], "pivot": [0, 2.34687, -18.3512],
"rotation": [0, 0, 45], "rotation": [0, 0, 45],
"uv": { "uv": {
"north": {"uv": [52.25, 95], "uv_size": [0.75, 0.25]}, "north": {"uv": [52.25, 95], "uv_size": [0.75, 0.25]},

View file

@ -415,5 +415,7 @@
"des.superbwarfare.mortar.yaw": "Yaw", "des.superbwarfare.mortar.yaw": "Yaw",
"des.superbwarfare.mortar.pitch": "Pitch", "des.superbwarfare.mortar.pitch": "Pitch",
"des.superbwarfare.target.pos": "Target Position", "des.superbwarfare.target.pos": "Target Position",
"des.superbwarfare.target.warn": "迫击炮无法瞄准该位置" "des.superbwarfare.target.warn": "迫击炮无法瞄准该位置",
"des.superbwarfare.tips.edit_part": "Press ",
"des.superbwarfare.tips.edit_part2": " key to edit this weapon."
} }

View file

@ -415,5 +415,7 @@
"des.superbwarfare.mortar.yaw": "水平朝向:", "des.superbwarfare.mortar.yaw": "水平朝向:",
"des.superbwarfare.mortar.pitch": "俯仰角度:", "des.superbwarfare.mortar.pitch": "俯仰角度:",
"des.superbwarfare.target.pos": "目标坐标:", "des.superbwarfare.target.pos": "目标坐标:",
"des.superbwarfare.target.warn": "迫击炮无法瞄准该位置" "des.superbwarfare.target.warn": "迫击炮无法瞄准该位置",
"des.superbwarfare.tips.edit_part": "按下",
"des.superbwarfare.tips.edit_part2": "键进行改装"
} }

View file

@ -295,14 +295,6 @@
} }
] ]
}, },
"ak_47_reload_normal_drum": {
"sounds": [
{
"name": "superbwarfare:ak_47/ak_47_reload_normal_drum",
"stream": false
}
]
},
"ak_47_reload_empty": { "ak_47_reload_empty": {
"sounds": [ "sounds": [
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -15,8 +15,8 @@
"burst": 0, "burst": 0,
"auto": 1, "auto": 1,
"burst_size": 1, "burst_size": 1,
"normal_reload_time": 54, "normal_reload_time": 52,
"EmptyReloadTime": 69, "EmptyReloadTime": 65,
"BypassesArmor": 0.2, "BypassesArmor": 0.2,
"SoundRadius": 14, "SoundRadius": 14,
"rpm": 600 "rpm": 600