添加配方

This commit is contained in:
Atsuihsio 2024-08-31 17:03:47 +08:00
parent 0f9513bac2
commit 437d5fcc5a
29 changed files with 226 additions and 35 deletions

View file

@ -58,7 +58,7 @@ public class JavelinItemModel extends GeoModel<JavelinItem> {
gun.setPosX(1.62f * (float) p);
gun.setPosY(6.3f * (float) p - (float) (0.2f * zp));
gun.setPosZ(22.95f * (float) p + (float) (0.3f * zp));
gun.setScaleZ(1f - (0.74f * (float) p));
gun.setScaleZ(1f - (0.77f * (float) p));
gun.setRotZ(-4.75f * Mth.DEG_TO_RAD * (float) p + (float) (0.02f * zp));
javelin.setHidden(gun.getPosX() > 1.55);

View file

@ -111,7 +111,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo
entity.invulnerableTime = 0;
}
entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage);
entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), 0.2f * this.damage);
if (this.tickCount > 1) {
if (this.level() instanceof ServerLevel) {
@ -213,7 +213,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo
private void causeExplode() {
CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), this.damage,
this.getX(), this.getY(), this.getZ(), 5f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
this.getX(), this.getY(), this.getZ(), 7f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false);
@ -224,7 +224,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo
private void triggerExplode(Entity target) {
CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), this.damage,
target.getX(), target.getY(), target.getZ(), 5f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
target.getX(), target.getY(), target.getZ(), 7f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false);
@ -235,7 +235,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo
private void causeEntityHitExplode(Entity entity) {
CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), this.damage,
entity.getX(), entity.getY(), entity.getZ(), 5f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
entity.getX(), entity.getY(), entity.getZ(), 7f, Explosion.BlockInteraction.KEEP).setDamageMultiplier(1);
explosion.explode();
net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion);
explosion.finalizeExplosion(false);

View file

@ -67,8 +67,11 @@ public class LivingEventHandler {
stack.getOrCreateTag().putDouble("damagetotal", stack.getOrCreateTag().getDouble("damagetotal") + damage);
}
if ((damageSource.is(ModDamageTypes.PROJECTILE_BOOM) || damageSource.is(DamageTypes.ARROW))
&& (stack.getItem() == ModItems.M_79.get() || stack.getItem() == ModItems.RPG.get())) {
if ((damageSource.is(ModDamageTypes.PROJECTILE_BOOM)
|| damageSource.is(ModDamageTypes.CANNON_FIRE))
&& (stack.getItem() == ModItems.M_79.get()
|| stack.getItem() == ModItems.RPG.get()
|| stack.getItem() == ModItems.JAVELIN.get())) {
stack.getOrCreateTag().putDouble("damagetotal", stack.getOrCreateTag().getDouble("damagetotal") + damage);
}

View file

@ -106,6 +106,8 @@ public class ModItems {
public static final RegistryObject<Item> MORTAR_BARREL = ITEMS.register("mortar_barrel", () -> new Item(new Item.Properties()));
public static final RegistryObject<Item> MORTAR_BASE_PLATE = ITEMS.register("mortar_base_plate", () -> new Item(new Item.Properties()));
public static final RegistryObject<Item> MORTAR_BIPOD = ITEMS.register("mortar_bipod", () -> new Item(new Item.Properties()));
public static final RegistryObject<Item> SEEKER = ITEMS.register("seeker", () -> new Item(new Item.Properties()));
public static final RegistryObject<Item> MISSILE_ENGINE = ITEMS.register("missile_engine", () -> new Item(new Item.Properties()));
public static final RegistryObject<Item> FUSEE = ITEMS.register("fusee", () -> new Item(new Item.Properties()));
public static final RegistryObject<Item> PRIMER = ITEMS.register("primer", () -> new Item(new Item.Properties()));
public static final RegistryObject<Item> AP_HEAD = ITEMS.register("ap_head", () -> new Item(new Item.Properties()));
@ -151,13 +153,13 @@ public class ModItems {
public static final RegistryObject<Item> EPIC_MATERIAL_PACK = ITEMS.register("epic_material_pack", () -> new MaterialPack(Rarity.EPIC));
public static final RegistryObject<Item> LEGENDARY_MATERIAL_PACK = ITEMS.register("legendary_material_pack", () -> new MaterialPack(RarityTool.LEGENDARY));
public static final RegistryObject<Item> TRACHELIUM_BLUEPRINT = ITEMS.register("trachelium_blueprint", () -> new BlueprintItem(RarityTool.LEGENDARY));
public static final RegistryObject<Item> TRACHELIUM_BLUEPRINT = ITEMS.register("trachelium_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final RegistryObject<Item> GLOCK_17_BLUEPRINT = ITEMS.register("glock_17_blueprint", () -> new BlueprintItem(Rarity.COMMON));
public static final RegistryObject<Item> GLOCK_18_BLUEPRINT = ITEMS.register("glock_18_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final RegistryObject<Item> HUNTING_RIFLE_BLUEPRINT = ITEMS.register("hunting_rifle_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final RegistryObject<Item> M_79_BLUEPRINT = ITEMS.register("m_79_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final RegistryObject<Item> RPG_BLUEPRINT = ITEMS.register("rpg_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final RegistryObject<Item> BOCEK_BLUEPRINT = ITEMS.register("bocek_blueprint", () -> new BlueprintItem(RarityTool.LEGENDARY));
public static final RegistryObject<Item> BOCEK_BLUEPRINT = ITEMS.register("bocek_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final RegistryObject<Item> M_4_BLUEPRINT = ITEMS.register("m_4_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final RegistryObject<Item> AA_12_BLUEPRINT = ITEMS.register("aa_12_blueprint", () -> new BlueprintItem(RarityTool.LEGENDARY));
public static final RegistryObject<Item> HK_416_BLUEPRINT = ITEMS.register("hk_416_blueprint", () -> new BlueprintItem(Rarity.EPIC));
@ -180,6 +182,7 @@ public class ModItems {
public static final RegistryObject<Item> QBZ_95_BLUEPRINT = ITEMS.register("qbz_95_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final RegistryObject<Item> K_98_BLUEPRINT = ITEMS.register("k_98_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final RegistryObject<Item> MOSIN_NAGANT_BLUEPRINT = ITEMS.register("mosin_nagant_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final RegistryObject<Item> JAVELIN_BLUEPRINT = ITEMS.register("javelin_blueprint", () -> new BlueprintItem(RarityTool.LEGENDARY));
/**
* Block

View file

@ -207,11 +207,15 @@ public class ModVillagers {
new ItemStack(ModItems.HE_5_INCHES.get(), 1), 8, 10, 0.05f));
trades.get(5).add(new BasicItemListing(new ItemStack(Items.EMERALD, 14),
new ItemStack(ModItems.AP_5_INCHES.get(), 1), 8, 10, 0.05f));
trades.get(5).add(new BasicItemListing(new ItemStack(Items.EMERALD, 24),
new ItemStack(ModItems.JAVELIN_MISSILE.get(), 1), 8, 10, 0.05f));
trades.get(5).add(new BasicItemListing(new ItemStack(ModItems.HE_5_INCHES.get(), 1),
new ItemStack(Items.EMERALD, 8), 32, 2, 0.05f));
new ItemStack(Items.EMERALD, 8), 32, 4, 0.05f));
trades.get(5).add(new BasicItemListing(new ItemStack(ModItems.AP_5_INCHES.get(), 1),
new ItemStack(Items.EMERALD, 7), 32, 2, 0.05f));
new ItemStack(Items.EMERALD, 7), 32, 4, 0.05f));
trades.get(5).add(new BasicItemListing(new ItemStack(ModItems.JAVELIN_MISSILE.get(), 1),
new ItemStack(Items.EMERALD, 12), 32, 4, 0.05f));
}
}

View file

@ -8,7 +8,6 @@ import net.mcreator.superbwarfare.init.ModItems;
import net.mcreator.superbwarfare.init.ModTags;
import net.mcreator.superbwarfare.item.AnimatedItem;
import net.mcreator.superbwarfare.tools.GunsTool;
import net.mcreator.superbwarfare.tools.RarityTool;
import net.mcreator.superbwarfare.tools.TooltipTool;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.HumanoidModel;
@ -48,7 +47,7 @@ public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
public static ItemDisplayContext transformType;
public BocekItem() {
super(new Item.Properties().stacksTo(1).rarity(RarityTool.LEGENDARY));
super(new Item.Properties().stacksTo(1).rarity(Rarity.EPIC));
}
@Override

View file

@ -10,7 +10,6 @@ import net.mcreator.superbwarfare.init.ModTags;
import net.mcreator.superbwarfare.item.AnimatedItem;
import net.mcreator.superbwarfare.tools.GunsTool;
import net.mcreator.superbwarfare.tools.PoseTool;
import net.mcreator.superbwarfare.tools.RarityTool;
import net.mcreator.superbwarfare.tools.TooltipTool;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
@ -28,10 +27,7 @@ import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.attributes.Attribute;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.*;
import net.minecraft.world.level.Level;
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
import org.jetbrains.annotations.Nullable;
@ -55,7 +51,7 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
public static ItemDisplayContext transformType;
public Trachelium() {
super(new Item.Properties().stacksTo(1).rarity(RarityTool.LEGENDARY));
super(new Item.Properties().stacksTo(1).rarity(Rarity.EPIC));
}
@Override

View file

@ -117,6 +117,10 @@ public class FireModeMessage {
if (mainHandItem.getItem() == ModItems.JAVELIN.get()) {
tag.putBoolean("TopMode", !tag.getBoolean("TopMode"));
if (player instanceof ServerPlayer serverPlayer) {
serverPlayer.connection.send(new ClientboundSoundPacket(new Holder.Direct<>(ModSounds.CANNON_ZOOM_OUT.get()),
SoundSource.PLAYERS, serverPlayer.getX(), serverPlayer.getY(), serverPlayer.getZ(), 1f, 1f, serverPlayer.level().random.nextLong()));
}
}
}
}

View file

@ -81,6 +81,7 @@
"item.superbwarfare.qbz_95_blueprint": "QBZ-95-1 Blueprint",
"item.superbwarfare.k_98_blueprint": "KAR-98K Blueprint",
"item.superbwarfare.mosin_nagant_blueprint": "Mosin Nagant Blueprint",
"item.superbwarfare.javelin_blueprint": "Javelin Blueprint",
"item.superbwarfare.common_material_pack": "Common Material Pack",
"item.superbwarfare.rare_material_pack": "Rare Material Pack",
@ -141,6 +142,8 @@
"item.superbwarfare.mortar_barrel": "Mortar Barrel",
"item.superbwarfare.mortar_deployer": "Mortar",
"item.superbwarfare.claymore_mine": "Claymore",
"item.superbwarfare.seeker": "Seeker",
"item.superbwarfare.missile_engine": "Missile Engine",
"item.superbwarfare.fusee": "Fusee",
"item.superbwarfare.primer": "Primer",
"item.superbwarfare.ap_head": "AP Warhead",

View file

@ -81,6 +81,7 @@
"item.superbwarfare.qbz_95_blueprint": "95-1式自动步枪蓝图",
"item.superbwarfare.k_98_blueprint": "KAR-98K蓝图",
"item.superbwarfare.mosin_nagant_blueprint": "莫辛纳甘蓝图",
"item.superbwarfare.javelin_blueprint": "标枪导弹蓝图",
"item.superbwarfare.common_material_pack": "普通材料包",
"item.superbwarfare.rare_material_pack": "稀有材料包",
@ -141,6 +142,8 @@
"item.superbwarfare.mortar_barrel": "迫击炮管",
"item.superbwarfare.mortar_deployer": "迫击炮",
"item.superbwarfare.claymore_mine": "阔剑地雷",
"item.superbwarfare.seeker": "导引头",
"item.superbwarfare.missile_engine": "导弹发动机",
"item.superbwarfare.fusee": "引信",
"item.superbwarfare.primer": "底火",
"item.superbwarfare.ap_head": "穿甲弹头",

View file

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

View file

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

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

View file

@ -161,7 +161,7 @@
{
"type": "minecraft:item",
"name": "superbwarfare:trachelium_blueprint",
"weight": 60,
"weight": 10,
"functions": [
{
"function": "set_count",
@ -175,7 +175,7 @@
{
"type": "minecraft:item",
"name": "superbwarfare:aa_12_blueprint",
"weight": 60,
"weight": 20,
"functions": [
{
"function": "set_count",
@ -189,7 +189,7 @@
{
"type": "minecraft:item",
"name": "superbwarfare:sentinel_blueprint",
"weight": 60,
"weight": 20,
"functions": [
{
"function": "set_count",
@ -203,7 +203,7 @@
{
"type": "minecraft:item",
"name": "superbwarfare:ntw_20_blueprint",
"weight": 50,
"weight": 20,
"functions": [
{
"function": "set_count",
@ -217,7 +217,7 @@
{
"type": "minecraft:item",
"name": "superbwarfare:bocek_blueprint",
"weight": 50,
"weight": 10,
"functions": [
{
"function": "set_count",
@ -231,7 +231,21 @@
{
"type": "minecraft:item",
"name": "superbwarfare:minigun_blueprint",
"weight": 50,
"weight": 20,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:javelin_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
@ -358,6 +372,20 @@
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:javelin_missile",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
}
]
}
]
}

View file

@ -301,7 +301,7 @@
{
"type": "minecraft:item",
"name": "superbwarfare:trachelium_blueprint",
"weight": 5,
"weight": 10,
"functions": [
{
"function": "set_count",
@ -339,6 +339,34 @@
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:bocek_blueprint",
"weight": 10,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:javelin_blueprint",
"weight": 5,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
},

View file

@ -4,7 +4,7 @@
"item": "superbwarfare:bocek_blueprint"
},
"base": {
"item": "superbwarfare:legendary_material_pack"
"item": "superbwarfare:epic_material_pack"
},
"addition": {
"item": "minecraft:bow"

View file

@ -0,0 +1,15 @@
{
"type": "minecraft:smithing_transform",
"template": {
"item": "superbwarfare:javelin_blueprint"
},
"base": {
"item": "superbwarfare:legendary_material_pack"
},
"addition": {
"item": "superbwarfare:ancient_cpu"
},
"result": {
"item": "superbwarfare:javelin"
}
}

View file

@ -0,0 +1,27 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
" b ",
"cdc",
" e "
],
"key": {
"b": {
"item": "superbwarfare:seeker"
},
"c": {
"item": "minecraft:iron_ingot"
},
"d": {
"item": "superbwarfare:high_energy_explosives"
},
"e": {
"item": "superbwarfare:missile_engine"
}
},
"result": {
"item": "superbwarfare:javelin_missile",
"count": 1
}
}

View file

@ -7,7 +7,7 @@
"item": "superbwarfare:rare_material_pack"
},
"addition": {
"tag": "minecraft:logs"
"item": "minecraft:dispenser"
},
"result": {
"item": "superbwarfare:m_79"

View file

@ -7,7 +7,7 @@
"item": "superbwarfare:epic_material_pack"
},
"addition": {
"item": "minecraft:netherite_ingot"
"item": "minecraft:spyglass"
},
"result": {
"item": "superbwarfare:m_98b"

View file

@ -7,7 +7,7 @@
"item": "superbwarfare:legendary_material_pack"
},
"addition": {
"item": "minecraft:netherite_ingot"
"item": "superbwarfare:motor"
},
"result": {
"item": "superbwarfare:minigun"

View file

@ -0,0 +1,30 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"aba",
"cdc",
" e "
],
"key": {
"a": {
"item": "minecraft:copper_ingot"
},
"b": {
"item": "minecraft:blast_furnace"
},
"c": {
"item": "minecraft:iron_ingot"
},
"d": {
"item": "superbwarfare:grain"
},
"e": {
"item": "minecraft:firework_rocket"
}
},
"result": {
"item": "superbwarfare:missile_engine",
"count": 1
}
}

View file

@ -7,7 +7,7 @@
"item": "superbwarfare:epic_material_pack"
},
"addition": {
"tag": "minecraft:logs"
"item": "minecraft:dispenser"
},
"result": {
"item": "superbwarfare:rpg"

View file

@ -0,0 +1,30 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
" a ",
"bcb",
"ded"
],
"key": {
"a": {
"item": "minecraft:amethyst_shard"
},
"b": {
"item": "minecraft:iron_ingot"
},
"c": {
"item": "minecraft:compass"
},
"d": {
"item": "minecraft:quartz"
},
"e": {
"item": "minecraft:comparator"
}
},
"result": {
"item": "superbwarfare:seeker",
"count": 1
}
}

View file

@ -7,7 +7,7 @@
"item": "superbwarfare:legendary_material_pack"
},
"addition": {
"item": "minecraft:netherite_ingot"
"item": "superbwarfare:shield_cell"
},
"result": {
"item": "superbwarfare:sentinel"

View file

@ -25,6 +25,6 @@
},
"result": {
"item": "superbwarfare:shield_cell",
"count": 4
"count": 2
}
}

View file

@ -4,10 +4,10 @@
"item": "superbwarfare:trachelium_blueprint"
},
"base": {
"item": "superbwarfare:legendary_material_pack"
"item": "superbwarfare:epic_material_pack"
},
"addition": {
"item": "minecraft:netherite_ingot"
"item": "superbwarfare:cemented_carbide_ingot"
},
"result": {
"item": "superbwarfare:trachelium"