添加集束弹头和合成表

This commit is contained in:
Atsuishio 2025-07-14 15:11:12 +08:00 committed by Light_Quanta
parent 72ca920a0c
commit bb94bd42bd
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
15 changed files with 229 additions and 11 deletions

View file

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

View file

@ -97,6 +97,7 @@ public class ModItemModelProvider extends ItemModelProvider {
simpleItem(ModItems.BLU_43_MINE);
simpleItem(ModItems.AP_HEAD);
simpleItem(ModItems.HE_HEAD);
simpleItem(ModItems.CM_HEAD);
simpleItem(ModItems.CANNON_CORE);
simpleItem(ModItems.COPPER_PLATE);
simpleItem(ModItems.STEEL_INGOT);

View file

@ -264,7 +264,7 @@ public class MediumRocketEntity extends FastThrowableProjectile implements GeoEn
double dh = position().vectorTo(finalPos).horizontalDistance();
int t = (int) (dh / vh);
sparedTime = tickCount + t - 5;
sparedTime = tickCount + t - 10;
active = true;
}
@ -309,14 +309,14 @@ public class MediumRocketEntity extends FastThrowableProjectile implements GeoEn
ParticleTool.spawnMediumExplosionParticles(serverLevel, position());
for (int index0 = 0; index0 < sparedAmount; index0++) {
GunGrenadeEntity gunGrenadeEntity = new GunGrenadeEntity(shooter, serverLevel,
2 * damage / sparedAmount,
6 * damage / sparedAmount,
5 * explosionDamage / sparedAmount,
radius / 2
);
gunGrenadeEntity.setPos(position().x, position().y, position().z);
gunGrenadeEntity.shoot(getDeltaMovement().x, getDeltaMovement().y, getDeltaMovement().z, (float) (1.25f * getDeltaMovement().length()),
30);
gunGrenadeEntity.shoot(getDeltaMovement().x, getDeltaMovement().y, getDeltaMovement().z, (float) (random.nextFloat() * 0.1f + 0.8f * getDeltaMovement().length()),
25);
serverLevel.addFreshEntity(gunGrenadeEntity);
}
discard();

View file

@ -202,7 +202,7 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt
} else {
// 撬棍发射
for (int i = 0; i < 12; i++) {
if (items.get(i).getItem() instanceof MediumRocketItem && cooldown == 0) {
if (items.get(i).getItem() instanceof MediumRocketItem && cooldown == 0 && getEnergy() > 0) {
shoot(player, i);
items.set(i, ItemStack.EMPTY);
setChanged();
@ -268,6 +268,7 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt
}
}
consumeEnergy(1);
ShakeClientMessage.sendToNearbyPlayers(this, 8, 8, 10, 20);
}
@ -494,9 +495,4 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt
public void setChanged() {
this.entityData.set(LOADED_AMMO, this.items.stream().map(i -> i.isEmpty() ? 0 : 1).toList());
}
@Override
public boolean hasEnergyStorage() {
return false;
}
}

View file

@ -181,6 +181,7 @@ public class ModItems {
public static final DeferredHolder<Item, Item> PRIMER = ITEMS.register("primer", () -> new Item(new Item.Properties()));
public static final DeferredHolder<Item, Item> AP_HEAD = ITEMS.register("ap_head", () -> new Item(new Item.Properties()));
public static final DeferredHolder<Item, Item> HE_HEAD = ITEMS.register("he_head", () -> new Item(new Item.Properties()));
public static final DeferredHolder<Item, Item> CM_HEAD = ITEMS.register("cm_head", () -> new Item(new Item.Properties()));
public static final DeferredHolder<Item, Item> CANNON_CORE = ITEMS.register("cannon_core", () -> new Item(new Item.Properties()));
public static final DeferredHolder<Item, Item> COPPER_PLATE = ITEMS.register("copper_plate", () -> new Item(new Item.Properties()));
public static final DeferredHolder<Item, Item> STEEL_INGOT = ITEMS.register("steel_ingot", () -> new Item(new Item.Properties()));

View file

@ -225,6 +225,7 @@
"item.superbwarfare.primer": "Primer",
"item.superbwarfare.ap_head": "AP Warhead",
"item.superbwarfare.he_head": "HE Warhead",
"item.superbwarfare.cm_head": "CM Warhead",
"item.superbwarfare.cannon_core": "Cannon Core",
"item.superbwarfare.dog_tag": "Dog Tag",
"curios.identifier.dog_tag": "Dog Tag",

View file

@ -225,6 +225,7 @@
"item.superbwarfare.primer": "底火",
"item.superbwarfare.ap_head": "穿甲弹头",
"item.superbwarfare.he_head": "高爆弹头",
"item.superbwarfare.cm_head": "集束弹头",
"item.superbwarfare.cannon_core": "火炮核心",
"item.superbwarfare.dog_tag": "狗牌",
"curios.identifier.dog_tag": "狗牌",

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 398 B

View file

@ -0,0 +1,27 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"ddd",
"bdb",
"cac"
],
"key": {
"a": {
"item": "minecraft:gunpowder"
},
"b": {
"item": "minecraft:iron_ingot"
},
"c": {
"tag": "superbwarfare:ingots/steel"
},
"d": {
"item": "superbwarfare:grenade_40mm"
}
},
"result": {
"id": "superbwarfare:cm_head",
"count": 2
}
}

View file

@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"a",
"b",
"b"
],
"key": {
"a": {
"item": "superbwarfare:ap_head"
},
"b": {
"item": "superbwarfare:small_rocket"
}
},
"result": {
"id": "superbwarfare:medium_rocket_ap",
"count": 1
}
}

View file

@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"a",
"b",
"b"
],
"key": {
"a": {
"item": "superbwarfare:cm_head"
},
"b": {
"item": "superbwarfare:small_rocket"
}
},
"result": {
"id": "superbwarfare:medium_rocket_cm",
"count": 1
}
}

View file

@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"a",
"b",
"b"
],
"key": {
"a": {
"item": "superbwarfare:he_head"
},
"b": {
"item": "superbwarfare:small_rocket"
}
},
"result": {
"id": "superbwarfare:medium_rocket_he",
"count": 1
}
}

View file

@ -0,0 +1,35 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"abc",
"ddd",
"e e"
],
"key": {
"a": {
"item": "minecraft:dispenser"
},
"b": {
"item": "minecraft:flint_and_steel"
},
"c": {
"item": "superbwarfare:cell"
},
"d": {
"tag": "superbwarfare:ingots/steel"
},
"e": {
"item": "superbwarfare:wheel"
}
},
"result": {
"id": "superbwarfare:container",
"components": {
"minecraft:block_entity_data": {
"id": "superbwarfare:container",
"EntityType": "superbwarfare:type_63"
}
}
}
}

View file

@ -1,5 +1,92 @@
{
"ID": "superbwarfare:type_63",
"MaxHealth": 100,
"Mass": 0.45
"MaxEnergy": 24000,
"Mass": 0.45,
"DamageModifiers": [
{
"Type": "Multiply",
"Value": 0.1,
"Source": "minecraft:arrow"
},
{
"Type": "Multiply",
"Value": 0.2,
"Source": "minecraft:trident"
},
{
"Type": "Multiply",
"Value": 0.2,
"Source": "minecraft:mob_attack"
},
{
"Type": "Multiply",
"Value": 0.2,
"Source": "minecraft:mob_attack_no_aggro"
},
{
"Type": "Multiply",
"Value": 0.4,
"Source": "minecraft:mob_projectile"
},
{
"Type": "Multiply",
"Value": 0.4,
"Source": "minecraft:player_attack"
},
{
"Type": "Multiply",
"Value": 1.5,
"Source": "minecraft:explosion"
},
{
"Type": "Multiply",
"Value": 1.5,
"Source": "minecraft:player_explosion"
},
{
"Type": "Multiply",
"Value": 0.5,
"Source": "superbwarfare:custom_explosion"
},
{
"Type": "Multiply",
"Value": 0.5,
"Source": "superbwarfare:projectile_boom"
},
{
"Type": "Multiply",
"Value": 0.5,
"Source": "superbwarfare:mine"
},
{
"Type": "Multiply",
"Value": 0.5,
"Source": "superbwarfare:lunge_mine"
},
{
"Type": "Multiply",
"Value": 0.6,
"Source": "superbwarfare:cannon_fire"
},
{
"Type": "Multiply",
"Value": 0.5,
"Source": "#superbwarfare:projectile"
},
{
"Type": "Multiply",
"Value": 0.8,
"Source": "#superbwarfare:projectile_absolute"
},
{
"Type": "Multiply",
"Value": 5,
"Source": "superbwarfare:vehicle_strike"
},
{
"Type": "Reduce",
"Value": 1
}
]
}