From 8afe0c006359c0b563eaaa9baf5bed24503abe1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 5 Dec 2024 14:46:33 +0100 Subject: [PATCH] Update to 1.21.4 --- build.gradle | 7 +-- gradle.properties | 15 +++-- gradle/wrapper/gradle-wrapper.properties | 2 +- .../systems/brn/plasticgun/PlasticGun.java | 6 +- .../brn/plasticgun/bullets/BulletItem.java | 6 +- .../brn/plasticgun/defence/WeaponArmor.java | 6 +- .../brn/plasticgun/grenades/GrenadeItem.java | 3 + .../java/systems/brn/plasticgun/guns/Gun.java | 23 +++++--- .../brn/plasticgun/guns/WeaponShootGoal.java | 2 +- .../brn/plasticgun/lib/CraftingItem.java | 4 +- .../brn/plasticgun/lib/EventHandler.java | 9 ++- .../brn/plasticgun/lib/SimpleItem.java | 3 +- .../plasticgun/lib/TrinketPolymerItem.java | 43 +++----------- .../java/systems/brn/plasticgun/lib/Util.java | 56 ++++++++----------- .../plasticgun/shurikens/ShurikenItem.java | 3 + .../data/plasticgun/recipe/32_acp.json | 4 +- .../recipe/32_acp_high_velocity.json | 6 +- .../data/plasticgun/recipe/357_magnum.json | 6 +- .../data/plasticgun/recipe/357_revolver.json | 8 +-- .../data/plasticgun/recipe/357_standard.json | 12 +--- .../data/plasticgun/recipe/38_special.json | 4 +- .../data/plasticgun/recipe/38_special_p.json | 6 +- .../data/plasticgun/recipe/45_acp.json | 4 +- .../recipe/45_acp_hollow_point.json | 6 +- .../data/plasticgun/recipe/762_tokarev.json | 4 +- .../plasticgun/recipe/762_tokarev_ap.json | 6 +- .../data/plasticgun/recipe/9mm_jhp.json | 6 +- .../plasticgun/recipe/9mm_parabellum.json | 4 +- .../plasticgun/recipe/advanced_circuit.json | 8 +-- .../data/plasticgun/recipe/ak_47.json | 12 ++-- .../data/plasticgun/recipe/alloy_wheel.json | 4 +- .../resources/data/plasticgun/recipe/awp.json | 12 ++-- .../plasticgun/recipe/ceramic_mixture.json | 4 +- .../data/plasticgun/recipe/ceramic_plate.json | 4 +- .../data/plasticgun/recipe/colt_1903.json | 10 ++-- .../data/plasticgun/recipe/colt_45.json | 12 ++-- .../plasticgun/recipe/colt_peacemaker.json | 8 +-- .../plasticgun/recipe/composite_frame.json | 4 +- .../plasticgun/recipe/composite_resin.json | 4 +- .../data/plasticgun/recipe/copper_wiring.json | 2 +- .../plasticgun/recipe/diamond_shuriken.json | 2 +- .../plasticgun/recipe/enhanced_gunpowder.json | 4 +- .../plasticgun/recipe/explosive_powder.json | 6 +- .../data/plasticgun/recipe/flak_vest.json | 20 ++----- .../plasticgun/recipe/force_container.json | 6 +- .../data/plasticgun/recipe/forcegun.json | 8 +-- .../plasticgun/recipe/golden_shuriken.json | 2 +- .../plasticgun/recipe/graphene_sheet.json | 4 +- .../plasticgun/recipe/grenade_an_m14.json | 8 +-- .../data/plasticgun/recipe/grenade_f1.json | 8 +-- .../data/plasticgun/recipe/grenade_k417.json | 8 +-- .../data/plasticgun/recipe/grenade_m18.json | 8 +-- .../data/plasticgun/recipe/grenade_m34.json | 8 +-- .../data/plasticgun/recipe/grenade_m7a3.json | 8 +-- .../data/plasticgun/recipe/grenade_m84.json | 8 +-- .../data/plasticgun/recipe/grenade_mk3a2.json | 8 +-- .../data/plasticgun/recipe/grenade_no_69.json | 8 +-- .../data/plasticgun/recipe/grenade_rgd_5.json | 8 +-- .../data/plasticgun/recipe/grenade_rgo.json | 8 +-- .../plasticgun/recipe/grenade_thermite.json | 8 +-- .../plasticgun/recipe/hardened_steel.json | 4 +- .../data/plasticgun/recipe/hyperalloy.json | 6 +- .../data/plasticgun/recipe/iron_shuriken.json | 2 +- .../data/plasticgun/recipe/kevlar_sheet.json | 4 +- .../data/plasticgun/recipe/kevlar_vest.json | 4 +- .../data/plasticgun/recipe/magnetic_coil.json | 12 +--- .../data/plasticgun/recipe/microchip.json | 6 +- .../data/plasticgun/recipe/nano_tubes.json | 2 +- .../plasticgun/recipe/netherite_shuriken.json | 4 +- .../data/plasticgun/recipe/p2022.json | 10 ++-- .../data/plasticgun/recipe/plasma_core.json | 6 +- .../data/plasticgun/recipe/power_cell.json | 4 +- .../plasticgun/recipe/precision_gear.json | 6 +- .../plasticgun/recipe/reinforced_fiber.json | 6 +- .../data/plasticgun/recipe/rpg9.json | 8 +-- .../data/plasticgun/recipe/rpg_shell.json | 6 +- .../recipe/rpg_shell_incendiary.json | 6 +- .../plasticgun/recipe/silicon_mixture.json | 36 +++--------- .../data/plasticgun/recipe/silicon_wafer.json | 4 +- .../recipe/snub_nosed_revolver.json | 6 +- .../plasticgun/recipe/stone_shuriken.json | 2 +- .../plasticgun/recipe/titanium_alloy.json | 4 +- .../data/plasticgun/recipe/tokarev_tt_33.json | 10 ++-- .../plasticgun/recipe/trigger_mechanism.json | 10 ++-- .../data/trinkets/entities/plasticgun.json | 8 --- .../data/trinkets/slots/chest/vest.json | 6 -- .../data/trinkets/tags/item/chest/vest.json | 7 --- src/main/resources/fabric.mod.json | 3 +- 88 files changed, 294 insertions(+), 394 deletions(-) delete mode 100644 src/main/resources/data/trinkets/entities/plasticgun.json delete mode 100644 src/main/resources/data/trinkets/slots/chest/vest.json delete mode 100644 src/main/resources/data/trinkets/tags/item/chest/vest.json diff --git a/build.gradle b/build.gradle index 938a882..00d18c0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.7-SNAPSHOT' + id 'fabric-loom' version '1.8-SNAPSHOT' id 'maven-publish' } @@ -36,7 +36,6 @@ dependencies { modImplementation include("eu.pb4:polymer-blocks:${project.polymer_version}") modImplementation include("eu.pb4:polymer-resource-pack:${project.polymer_version}") modImplementation include("eu.pb4:polymer-autohost:${project.polymer_version}") - modImplementation "eu.pb4.polyport:trinkets:${project.trinkets_version}" modImplementation include("xyz.nucleoid:server-translations-api:${project.server_translations_api_version}") @@ -48,14 +47,12 @@ processResources { inputs.property "version", project.version inputs.property "minecraft_version", project.minecraft_version inputs.property "loader_version", project.loader_version - inputs.property "trinkets_version", project.trinkets_version filteringCharset "UTF-8" filesMatching("fabric.mod.json") { expand "version": project.version, "minecraft_version": project.minecraft_version, - "loader_version": project.loader_version, - "trinkets_version": project.trinkets_version + "loader_version": project.loader_version } } diff --git a/gradle.properties b/gradle.properties index a838496..61709e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,17 +2,16 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.21.3 -yarn_mappings=1.21.3+build.2 -loader_version=0.16.8 +minecraft_version=1.21.4 +yarn_mappings=1.21.4+build.1 +loader_version=0.16.9 # Mod Properties -mod_version=1.9.7 +mod_version=1.9.8 maven_group=systems.brn archives_base_name=plasticgun # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.107.0+1.21.3 +fabric_version=0.110.5+1.21.4 -polymer_version=0.10.1+1.21.3 -server_translations_api_version=2.4.0+1.21.2-rc1 -trinkets_version=3.10.0+polymerport.2 +polymer_version=0.11.0+1.21.4-rc1 +server_translations_api_version=2.4.0+1.21.2-rc1 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a441313..9355b41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/java/systems/brn/plasticgun/PlasticGun.java b/src/main/java/systems/brn/plasticgun/PlasticGun.java index a1c7964..2b8b076 100644 --- a/src/main/java/systems/brn/plasticgun/PlasticGun.java +++ b/src/main/java/systems/brn/plasticgun/PlasticGun.java @@ -122,7 +122,7 @@ public class PlasticGun implements ModInitializer { bullets.add(new BulletItem("force_container", 99, 0, 888, false, 0, 1)); // Guns - guns.add(new Gun("forcegun", 0, 4, 5, 10, 10, 888, 5, 0, 4, 0f, 0f, 5f, 10f, 0, 0)); // 0 + guns.add(new Gun("forcegun", 0, 4, 5, 10, 10, 888, 5, 0, 10, 0f, 0f, 5f, 10f, 0, 0)); // 0 guns.add(new Gun("p2022", 0.2, 12, 5, 10, 41, 9, 10, 0, 0, 1f, 4, 0.1f, 0.25f, -1, 1)); // 1.8 guns.add(new Gun("colt_1903", 0.3, 10, 5, 8, 38, 32, 10, 0, 0, 1, 3, 0.1f, 0.3f, -1, 1)); // 3 guns.add(new Gun("ak_47", 0.2, 4, 5, 30, 45, 762, 0, 0, 0, 1f, 2, 0.2f, 0.4f, -1, 1)); // 9 @@ -131,8 +131,8 @@ public class PlasticGun implements ModInitializer { guns.add(new Gun("colt_peacemaker", 0.6, 8, 5, 6, 43, 45, 10, 0, 0, 0.9f, 2, 0.2f, 0.5f, -1, 1)); // 4.8 guns.add(new Gun("tokarev_tt_33", 0.7, 10, 5, 8, 45, 762, 10, 0, 0, 1.5f, 2.5f, 0.25f, 0.5f, -1, 1)); // 7 guns.add(new Gun("357_revolver", 1, 8, 5, 6, 45, 357, 20, 0, 0, 2, 4, 0.2f, 0.5f, -1, 1)); // 8 - guns.add(new Gun("awp", 1, 4, 20, 1, 75, 762, 40, 0, 0, 2f, 8, 0.3f, 0.6f, -1, 1)); // 4 - guns.add(new Gun("rpg9", 2, 4, 20, 1, 10, 999, 20, 20, 0, 3f, 0.5f, 1, 2, -1, 1)); // 8 + guns.add(new Gun("awp", 1, 4, 20, 1, 75, 762, 40, 0, 0, 4f, 16f, 0.3f, 0.6f, -2, 2)); // 4 + guns.add(new Gun("rpg9", 2, 4, 20, 1, 10, 999, 20, 10, 0, 3f, 0.5f, 1, 2, -1, 1)); // 8 grenades.add(new GrenadeItem("grenade_m18", 1, 0.1f, 0.2f, 50, false, false, 0, 0, 100, 15, 30)); // 0.02 diff --git a/src/main/java/systems/brn/plasticgun/bullets/BulletItem.java b/src/main/java/systems/brn/plasticgun/bullets/BulletItem.java index c94c590..071883f 100644 --- a/src/main/java/systems/brn/plasticgun/bullets/BulletItem.java +++ b/src/main/java/systems/brn/plasticgun/bullets/BulletItem.java @@ -5,6 +5,8 @@ import net.minecraft.component.type.LoreComponent; import net.minecraft.item.Items; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.text.Text; import systems.brn.plasticgun.lib.SimpleItem; @@ -28,8 +30,8 @@ public class BulletItem extends SimpleItem { Text.translatable("gun.description.explosion_coefficient", explosionPowerCoefficient), Text.translatable("gun.description.repulsion_efficient", repulsionPowerCoefficient), Text.translatable(isIncendiary ? "gun.description.incendiary_yes" : "gun.description.incendiary_no") - )) -) + ))) + .registryKey(RegistryKey.of(RegistryKeys.ITEM, id(path))) , id(path), Items.STICK); diff --git a/src/main/java/systems/brn/plasticgun/defence/WeaponArmor.java b/src/main/java/systems/brn/plasticgun/defence/WeaponArmor.java index c1d6311..ca2c760 100644 --- a/src/main/java/systems/brn/plasticgun/defence/WeaponArmor.java +++ b/src/main/java/systems/brn/plasticgun/defence/WeaponArmor.java @@ -1,11 +1,12 @@ package systems.brn.plasticgun.defence; -import dev.emi.trinkets.api.TrinketsApi; import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.LoreComponent; import net.minecraft.item.Item; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.text.Text; import systems.brn.plasticgun.lib.TrinketPolymerItem; import systems.brn.plasticgun.lib.WeaponDamageType; @@ -25,11 +26,10 @@ public class WeaponArmor extends TrinketPolymerItem { Text.translatable("gun.description.armor.grenade", (int) ((1 - grenadeDamageCoefficient) * 100)), Text.translatable("gun.description.armor.fragmentation_grenade", (int) ((1 - fragmentationDamageCoefficient) * 100)), Text.translatable("gun.description.armor.shuriken", (int) ((1 - shurikenDamageCoefficient) * 100)) - ))) + ))).registryKey(RegistryKey.of(RegistryKeys.ITEM, id(name))) , name) ; Registry.register(Registries.ITEM, id(name), this); - TrinketsApi.registerTrinket(this, this); resistances.put(WeaponDamageType.BULLET, bulletDamageCoefficient); resistances.put(WeaponDamageType.FRAGMENTATION_GRENADE, fragmentationDamageCoefficient); resistances.put(WeaponDamageType.GRENADE, grenadeDamageCoefficient); diff --git a/src/main/java/systems/brn/plasticgun/grenades/GrenadeItem.java b/src/main/java/systems/brn/plasticgun/grenades/GrenadeItem.java index 9e3f35a..e76d0f4 100644 --- a/src/main/java/systems/brn/plasticgun/grenades/GrenadeItem.java +++ b/src/main/java/systems/brn/plasticgun/grenades/GrenadeItem.java @@ -8,6 +8,8 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.*; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; @@ -57,6 +59,7 @@ public class GrenadeItem extends SimpleItem implements PolymerItem { Text.translatable("gun.description.effect_radius", effectRadius), Text.translatable("gun.description.particle_count", smokeCount) ))) + .registryKey(RegistryKey.of(RegistryKeys.ITEM, id(path))) .maxDamage(explosionTarget + 1) , id(path), Items.STICK ); diff --git a/src/main/java/systems/brn/plasticgun/guns/Gun.java b/src/main/java/systems/brn/plasticgun/guns/Gun.java index b2b4f4a..e8005a4 100644 --- a/src/main/java/systems/brn/plasticgun/guns/Gun.java +++ b/src/main/java/systems/brn/plasticgun/guns/Gun.java @@ -10,6 +10,8 @@ import net.minecraft.item.*; import net.minecraft.network.packet.s2c.play.PositionFlag; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; @@ -28,6 +30,8 @@ import systems.brn.plasticgun.lib.SimpleItem; import java.util.ArrayList; import java.util.List; +import static java.lang.Math.abs; +import static java.lang.Math.max; import static systems.brn.plasticgun.PlasticGun.bullets; import static systems.brn.plasticgun.PlasticGun.itemBulletItemMap; import static systems.brn.plasticgun.lib.GunComponents.*; @@ -73,6 +77,7 @@ public class Gun extends SimpleItem implements PolymerItem { Text.translatable("gun.description.explosion_power", explosionPowerGun), Text.translatable("gun.description.repulsion_power", repulsionPowerGun) ))) + .registryKey(RegistryKey.of(RegistryKeys.ITEM, id(path))) .maxDamage(clipSize + 1) , id(path), Items.WOODEN_SWORD ); @@ -242,7 +247,7 @@ public class Gun extends SimpleItem implements PolymerItem { stack.set(DataComponentTypes.LORE, newLore); } - public void doRecoil(LivingEntity entity) { + public int doRecoil(LivingEntity entity) { if (entity.getEntityWorld() instanceof ServerWorld serverWorld) { Random rng = entity.getWorld().getRandom(); // Get the entity's current position and yaw @@ -250,19 +255,22 @@ public class Gun extends SimpleItem implements PolymerItem { float yaw = entity.getYaw(); float newPitch = entity.getPitch(); Vec3d currentLook = entity.getRotationVector().multiply(-1); - newPitch -= verticalRecoilMin + rng.nextFloat() * (verticalRecoilMax - verticalRecoilMin); - yaw -= (float) (horizontalRecoilMin + rng.nextFloat() * (horizontalRecoilMax - horizontalRecoilMin)); - - + float yawChange = verticalRecoilMin + rng.nextFloat() * (verticalRecoilMax - verticalRecoilMin); + float pitchChange = (float) (horizontalRecoilMin + rng.nextFloat() * (horizontalRecoilMax - horizontalRecoilMin)); + newPitch -= yawChange; + yaw -= pitchChange; entity.teleport(serverWorld, pos.x, pos.y, pos.z, PositionFlag.ROT, yaw, newPitch, true); double velocityRecoil = rng.nextDouble() * (velocityRecoilMax - velocityRecoilMin); if (velocityRecoil > 0) { entity.setVelocity(currentLook.multiply(velocityRecoil)); } + return (int) ((abs(yawChange) + abs(pitchChange) + abs(velocityRecoil) + max(abs(yawChange), max(abs(pitchChange), abs(velocityRecoil)))) / 4f) * 40; } + return 0; } - public void shoot(ServerWorld world, LivingEntity user, Hand hand) { + public int shoot(ServerWorld world, LivingEntity user, Hand hand) { + int stunLen = 0; if (!world.isClient()) { ItemStack stack = user.getStackInHand(hand); int currentReload = stack.getOrDefault(GUN_LOADING_COMPONENT, 1); @@ -280,7 +288,7 @@ public class Gun extends SimpleItem implements PolymerItem { world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENTITY_GENERIC_EXPLODE.value(), SoundCategory.PLAYERS, 0.1f, 1.2f); chamber.decrement(1); stack.set(GUN_COOLDOWN_COMPONENT, cooldownTarget); - doRecoil(user); + stunLen = doRecoil(user); if (chamber.isEmpty()) { stack.remove(GUN_AMMO_COMPONENT); } else { @@ -291,6 +299,7 @@ public class Gun extends SimpleItem implements PolymerItem { } updateDamage(stack); } + return stunLen; } private @NotNull BulletEntity getBulletEntity(LivingEntity entity, Hand hand, BulletItem bullet, ItemStack chamber) { diff --git a/src/main/java/systems/brn/plasticgun/guns/WeaponShootGoal.java b/src/main/java/systems/brn/plasticgun/guns/WeaponShootGoal.java index fc62164..04d304a 100644 --- a/src/main/java/systems/brn/plasticgun/guns/WeaponShootGoal.java +++ b/src/main/java/systems/brn/plasticgun/guns/WeaponShootGoal.java @@ -157,7 +157,7 @@ public class WeaponShootGoal extends ItemStack chamber = gunStack.getOrDefault(GUN_AMMO_COMPONENT, ItemStack.EMPTY).copy(); if (!chamber.isEmpty() && currentReload == 1 && currentCooldown == 0 && lockedTicks >= 10) { if (this.actor.getEntityWorld() instanceof ServerWorld serverWorld) { - gun.shoot(serverWorld, this.actor, gunHand); + this.targetSeeingTicker -= gun.shoot(serverWorld, this.actor, gunHand); } } } diff --git a/src/main/java/systems/brn/plasticgun/lib/CraftingItem.java b/src/main/java/systems/brn/plasticgun/lib/CraftingItem.java index db9e52c..451d541 100644 --- a/src/main/java/systems/brn/plasticgun/lib/CraftingItem.java +++ b/src/main/java/systems/brn/plasticgun/lib/CraftingItem.java @@ -3,13 +3,15 @@ package systems.brn.plasticgun.lib; import net.minecraft.item.Items; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import static systems.brn.plasticgun.lib.Util.id; public class CraftingItem extends SimpleItem{ public CraftingItem(String name) { - super(new Settings(), id(name), Items.STICK); + super(new Settings().registryKey(RegistryKey.of(RegistryKeys.ITEM, id(name))), id(name), Items.STICK); Registry.register(Registries.ITEM, id(name), this); } } diff --git a/src/main/java/systems/brn/plasticgun/lib/EventHandler.java b/src/main/java/systems/brn/plasticgun/lib/EventHandler.java index aa5b07e..f03021f 100644 --- a/src/main/java/systems/brn/plasticgun/lib/EventHandler.java +++ b/src/main/java/systems/brn/plasticgun/lib/EventHandler.java @@ -21,6 +21,7 @@ import net.minecraft.world.World; import systems.brn.plasticgun.grenades.GrenadeEntity; import systems.brn.plasticgun.grenades.GrenadeItem; import systems.brn.plasticgun.packets.ModDetect; + import java.util.function.Predicate; import static systems.brn.plasticgun.PlasticGun.*; @@ -29,7 +30,7 @@ import static systems.brn.plasticgun.lib.GunComponents.*; public class EventHandler { public static ActionResult onItemUse(PlayerEntity playerEntity, World world, Hand hand) { if (playerEntity instanceof ServerPlayerEntity serverPlayerEntity) { - if (!world.isClient && !clientsWithMod.contains(serverPlayerEntity)) { + if (!world.isClient) { rightClickWithItem(serverPlayerEntity, hand); } } @@ -108,10 +109,8 @@ public class EventHandler { if (!world.isClient) { for (ServerPlayerEntity player : world.getPlayers()) { Hand hand = player.getActiveHand(); - if (!clientsWithMod.contains(player)) { - if (player.handSwinging && player.handSwingTicks == -1) { - leftClickWithItem(player, hand); - } + if (player.handSwinging && player.handSwingTicks == -1) { + leftClickWithItem(player, hand); } tickItemUpdate(player); } diff --git a/src/main/java/systems/brn/plasticgun/lib/SimpleItem.java b/src/main/java/systems/brn/plasticgun/lib/SimpleItem.java index 80eb677..db44ff7 100644 --- a/src/main/java/systems/brn/plasticgun/lib/SimpleItem.java +++ b/src/main/java/systems/brn/plasticgun/lib/SimpleItem.java @@ -2,7 +2,6 @@ package systems.brn.plasticgun.lib; import eu.pb4.polymer.core.api.item.PolymerItem; import eu.pb4.polymer.core.api.item.SimplePolymerItem; -import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils; import net.minecraft.item.*; import net.minecraft.util.Identifier; import xyz.nucleoid.packettweaker.PacketContext; @@ -14,7 +13,7 @@ public abstract class SimpleItem extends SimplePolymerItem implements PolymerIte public SimpleItem(Settings settings, Identifier identifier, Item replacement) { super(settings, replacement); this.identifier = identifier; - this.polymerModel = PolymerResourcePackUtils.getBridgedModelId(identifier.withPath("item/" + identifier.getPath())); + this.polymerModel = identifier.withPath("item/" + identifier.getPath()); } @Override diff --git a/src/main/java/systems/brn/plasticgun/lib/TrinketPolymerItem.java b/src/main/java/systems/brn/plasticgun/lib/TrinketPolymerItem.java index b1e09b4..618911e 100644 --- a/src/main/java/systems/brn/plasticgun/lib/TrinketPolymerItem.java +++ b/src/main/java/systems/brn/plasticgun/lib/TrinketPolymerItem.java @@ -1,29 +1,23 @@ package systems.brn.plasticgun.lib; -import dev.emi.trinkets.TrinketSlot; -import dev.emi.trinkets.api.*; + +import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.sound.SoundEvent; +import net.minecraft.sound.SoundEvents; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.world.World; -import net.minecraft.world.event.GameEvent; - -import java.util.Map; -import java.util.Optional; import static systems.brn.plasticgun.lib.Util.id; -public class TrinketPolymerItem extends SimpleItem implements Trinket { +public class TrinketPolymerItem extends SimpleItem { public TrinketPolymerItem(Item.Settings settings, String name) { - super(settings, id(name), Items.STICK); - TrinketsApi.registerTrinket(this, this); + super(settings.equippable(EquipmentSlot.CHEST), id(name), Items.STICK); } @Override @@ -40,31 +34,8 @@ public class TrinketPolymerItem extends SimpleItem implements Trinket { } public static boolean equipItem(LivingEntity user, ItemStack stack) { - Optional optional = TrinketsApi.getTrinketComponent(user); - if (optional.isPresent()) { - TrinketComponent comp = optional.get(); - for (Map group : comp.getInventory().values()) { - for (TrinketInventory inv : group.values()) { - for (int i = 0; i < inv.size(); i++) { - if (inv.getStack(i).isEmpty()) { - SlotReference ref = new SlotReference(inv, i); - if (TrinketSlot.canInsert(stack, ref, user)) { - ItemStack newStack = stack.copy(); - inv.setStack(i, newStack); - Trinket trinket = TrinketsApi.getTrinket(stack.getItem()); - RegistryEntry soundEvent = trinket.getEquipSound(stack, ref, user); - if (!stack.isEmpty() && soundEvent != null) { - user.emitGameEvent(GameEvent.EQUIP); - user.playSound(soundEvent.value(), 1.0F, 1.0F); - } - stack.setCount(0); - return true; - } - } - } - } - } - } + user.equipStack(EquipmentSlot.CHEST, stack); + user.playSound(SoundEvents.ITEM_ARMOR_EQUIP_CHAIN.value()); return false; } } \ No newline at end of file diff --git a/src/main/java/systems/brn/plasticgun/lib/Util.java b/src/main/java/systems/brn/plasticgun/lib/Util.java index 87c07bb..014e9cb 100644 --- a/src/main/java/systems/brn/plasticgun/lib/Util.java +++ b/src/main/java/systems/brn/plasticgun/lib/Util.java @@ -1,14 +1,11 @@ package systems.brn.plasticgun.lib; -import dev.emi.trinkets.api.SlotReference; -import dev.emi.trinkets.api.TrinketComponent; -import dev.emi.trinkets.api.TrinketInventory; -import dev.emi.trinkets.api.TrinketsApi; import eu.pb4.polymer.virtualentity.api.tracker.DisplayTrackedData; import net.fabricmc.fabric.api.loot.v3.LootTableEvents; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.entity.Entity; +import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.data.DataTracker; import net.minecraft.entity.decoration.DisplayEntity; @@ -27,7 +24,6 @@ import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundEvents; import net.minecraft.util.Identifier; -import net.minecraft.util.Pair; import net.minecraft.util.math.Box; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; @@ -165,36 +161,26 @@ public class Util { } public static double getFinalDamage(LivingEntity livingEntity, WeaponDamageType damageType, double damage) { - Optional trinketComponentTemp = TrinketsApi.getTrinketComponent(livingEntity); - if (trinketComponentTemp.isPresent()) { - TrinketComponent trinketComponent = trinketComponentTemp.get(); - for (WeaponArmor weaponArmor : weaponArmors) { - if (weaponArmor.resistances.containsKey(damageType)) { + for (WeaponArmor weaponArmor : weaponArmors) { + if (weaponArmor.resistances.containsKey(damageType)) { - List> vestsComponents = trinketComponent.getEquipped(weaponArmor); - if (!vestsComponents.isEmpty()) { - Pair vestComponent = vestsComponents.getFirst(); - TrinketInventory trinketInventory = vestComponent.getLeft().inventory(); - int currentDamage = vestComponent.getRight().getDamage(); - int maxDamage = vestComponent.getRight().getMaxDamage(); - double reducedDamage = 0; - if (currentDamage < maxDamage) { - double coefficient = weaponArmor.resistances.get(damageType); - reducedDamage = (1 - coefficient) * damage; - damage *= coefficient; - } - - int nextDamage = currentDamage + (int) reducedDamage; - int inventoryIndex = vestComponent.getLeft().index(); - ItemStack vestStack = trinketInventory.getStack(inventoryIndex); - if (nextDamage >= maxDamage) { - vestStack.setCount(0); - } else { - vestStack.setDamage(nextDamage); - } - trinketInventory.setStack(inventoryIndex, vestStack); - } + ItemStack chestStack = livingEntity.getEquippedStack(EquipmentSlot.CHEST); + int currentDamage = chestStack.getDamage(); + int maxDamage = chestStack.getMaxDamage(); + double reducedDamage = 0; + if (currentDamage < maxDamage) { + double coefficient = weaponArmor.resistances.get(damageType); + reducedDamage = (1 - coefficient) * damage; + damage *= coefficient; } + + int nextDamage = currentDamage + (int) reducedDamage; + if (nextDamage >= maxDamage) { + chestStack.setCount(0); + } else { + chestStack.setDamage(nextDamage); + } + livingEntity.equipStack(EquipmentSlot.CHEST, chestStack); } } return damage; @@ -304,6 +290,7 @@ public class Util { } } } + public static void addItemToLootTable(RegistryKey tableId, Item item, Integer weight) { LootTableEvents.MODIFY.register((key, tableBuilder, source, wrapperLookup) -> { if (source.isBuiltin() && tableId.equals(key)) { @@ -311,7 +298,8 @@ public class Util { } }); } + public static int getAfterWeight(float coeff, int weight) { - return (int) Math.ceil(coeff * weight); + return (int) Math.ceil(coeff * weight); } } \ No newline at end of file diff --git a/src/main/java/systems/brn/plasticgun/shurikens/ShurikenItem.java b/src/main/java/systems/brn/plasticgun/shurikens/ShurikenItem.java index 5e4b75b..c0b5e3e 100644 --- a/src/main/java/systems/brn/plasticgun/shurikens/ShurikenItem.java +++ b/src/main/java/systems/brn/plasticgun/shurikens/ShurikenItem.java @@ -8,6 +8,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; @@ -35,6 +37,7 @@ public class ShurikenItem extends SimpleItem implements PolymerItem { Text.translatable("gun.description.speed", speed), Text.translatable("gun.description.damage_with_coefficient_max_speed", speed, speed * damage) ))) + .registryKey(RegistryKey.of(RegistryKeys.ITEM, id(path))) , id(path), Items.WOODEN_PICKAXE ); Registry.register(Registries.ITEM, id(path), this); diff --git a/src/main/resources/data/plasticgun/recipe/32_acp.json b/src/main/resources/data/plasticgun/recipe/32_acp.json index 1e42fda..3063226 100644 --- a/src/main/resources/data/plasticgun/recipe/32_acp.json +++ b/src/main/resources/data/plasticgun/recipe/32_acp.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:gunpowder" }, - { "item": "minecraft:copper_ingot" } + "minecraft:gunpowder", + "minecraft:copper_ingot" ], "result": { "id": "plasticgun:32_acp", diff --git a/src/main/resources/data/plasticgun/recipe/32_acp_high_velocity.json b/src/main/resources/data/plasticgun/recipe/32_acp_high_velocity.json index 786d862..f187e1c 100644 --- a/src/main/resources/data/plasticgun/recipe/32_acp_high_velocity.json +++ b/src/main/resources/data/plasticgun/recipe/32_acp_high_velocity.json @@ -1,9 +1,9 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "plasticgun:enhanced_gunpowder" }, - { "item": "minecraft:copper_ingot" }, - { "item": "plasticgun:kevlar_sheet" } + "plasticgun:enhanced_gunpowder", + "minecraft:copper_ingot", + "plasticgun:kevlar_sheet" ], "result": { "id": "plasticgun:32_acp_high_velocity", diff --git a/src/main/resources/data/plasticgun/recipe/357_magnum.json b/src/main/resources/data/plasticgun/recipe/357_magnum.json index a009a34..362e42a 100644 --- a/src/main/resources/data/plasticgun/recipe/357_magnum.json +++ b/src/main/resources/data/plasticgun/recipe/357_magnum.json @@ -1,9 +1,9 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "plasticgun:enhanced_gunpowder" }, - { "item": "minecraft:iron_nugget" }, - { "item": "plasticgun:kevlar_sheet" } + "plasticgun:enhanced_gunpowder", + "minecraft:iron_nugget", + "plasticgun:kevlar_sheet" ], "result": { "id": "plasticgun:357_magnum", diff --git a/src/main/resources/data/plasticgun/recipe/357_revolver.json b/src/main/resources/data/plasticgun/recipe/357_revolver.json index 7def484..7900291 100644 --- a/src/main/resources/data/plasticgun/recipe/357_revolver.json +++ b/src/main/resources/data/plasticgun/recipe/357_revolver.json @@ -6,10 +6,10 @@ " TI" ], "key": { - "H": { "item": "plasticgun:hardened_steel" }, - "C": { "item": "plasticgun:composite_frame" }, - "T": { "item": "plasticgun:trigger_mechanism" }, - "I": { "item": "plasticgun:iron_shuriken" } + "H": "plasticgun:hardened_steel", + "C": "plasticgun:composite_frame", + "T": "plasticgun:trigger_mechanism", + "I": "plasticgun:iron_shuriken" }, "result": { "id": "plasticgun:357_revolver", diff --git a/src/main/resources/data/plasticgun/recipe/357_standard.json b/src/main/resources/data/plasticgun/recipe/357_standard.json index 4de88f4..484bbb7 100644 --- a/src/main/resources/data/plasticgun/recipe/357_standard.json +++ b/src/main/resources/data/plasticgun/recipe/357_standard.json @@ -1,15 +1,9 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { - "item": "minecraft:gunpowder" - }, - { - "item": "minecraft:iron_nugget" - }, - { - "item": "plasticgun:kevlar_sheet" - } + "minecraft:gunpowder", + "minecraft:iron_nugget", + "plasticgun:kevlar_sheet" ], "result": { "id": "plasticgun:357_standard", diff --git a/src/main/resources/data/plasticgun/recipe/38_special.json b/src/main/resources/data/plasticgun/recipe/38_special.json index db3c60a..4a7cd0d 100644 --- a/src/main/resources/data/plasticgun/recipe/38_special.json +++ b/src/main/resources/data/plasticgun/recipe/38_special.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:gunpowder" }, - { "item": "plasticgun:ceramic_plate" } + "minecraft:gunpowder", + "plasticgun:ceramic_plate" ], "result": { "id": "plasticgun:38_special", diff --git a/src/main/resources/data/plasticgun/recipe/38_special_p.json b/src/main/resources/data/plasticgun/recipe/38_special_p.json index 35f5b47..a003b04 100644 --- a/src/main/resources/data/plasticgun/recipe/38_special_p.json +++ b/src/main/resources/data/plasticgun/recipe/38_special_p.json @@ -1,9 +1,9 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "plasticgun:enhanced_gunpowder" }, - { "item": "plasticgun:ceramic_plate" }, - { "item": "plasticgun:kevlar_sheet" } + "plasticgun:enhanced_gunpowder", + "plasticgun:ceramic_plate", + "plasticgun:kevlar_sheet" ], "result": { "id": "plasticgun:38_special_p", diff --git a/src/main/resources/data/plasticgun/recipe/45_acp.json b/src/main/resources/data/plasticgun/recipe/45_acp.json index 7db1347..6e5dd87 100644 --- a/src/main/resources/data/plasticgun/recipe/45_acp.json +++ b/src/main/resources/data/plasticgun/recipe/45_acp.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:gunpowder" }, - { "item": "minecraft:iron_nugget" } + "minecraft:gunpowder", + "minecraft:iron_nugget" ], "result": { "id": "plasticgun:45_acp", diff --git a/src/main/resources/data/plasticgun/recipe/45_acp_hollow_point.json b/src/main/resources/data/plasticgun/recipe/45_acp_hollow_point.json index b957551..6fe3435 100644 --- a/src/main/resources/data/plasticgun/recipe/45_acp_hollow_point.json +++ b/src/main/resources/data/plasticgun/recipe/45_acp_hollow_point.json @@ -1,9 +1,9 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "plasticgun:enhanced_gunpowder" }, - { "item": "minecraft:iron_nugget" }, - { "item": "plasticgun:composite_resin" } + "plasticgun:enhanced_gunpowder", + "minecraft:iron_nugget", + "plasticgun:composite_resin" ], "result": { "id": "plasticgun:45_acp_hollow_point", diff --git a/src/main/resources/data/plasticgun/recipe/762_tokarev.json b/src/main/resources/data/plasticgun/recipe/762_tokarev.json index fe10a6f..2f7d58c 100644 --- a/src/main/resources/data/plasticgun/recipe/762_tokarev.json +++ b/src/main/resources/data/plasticgun/recipe/762_tokarev.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:gunpowder" }, - { "item": "plasticgun:titanium_alloy" } + "minecraft:gunpowder", + "plasticgun:titanium_alloy" ], "result": { "id": "plasticgun:762_tokarev", diff --git a/src/main/resources/data/plasticgun/recipe/762_tokarev_ap.json b/src/main/resources/data/plasticgun/recipe/762_tokarev_ap.json index a4c2fd7..5c4071b 100644 --- a/src/main/resources/data/plasticgun/recipe/762_tokarev_ap.json +++ b/src/main/resources/data/plasticgun/recipe/762_tokarev_ap.json @@ -1,9 +1,9 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "plasticgun:enhanced_gunpowder" }, - { "item": "plasticgun:titanium_alloy" }, - { "item": "plasticgun:kevlar_sheet" } + "plasticgun:enhanced_gunpowder", + "plasticgun:titanium_alloy", + "plasticgun:kevlar_sheet" ], "result": { "id": "plasticgun:762_tokarev_ap", diff --git a/src/main/resources/data/plasticgun/recipe/9mm_jhp.json b/src/main/resources/data/plasticgun/recipe/9mm_jhp.json index e780cc8..b82d52e 100644 --- a/src/main/resources/data/plasticgun/recipe/9mm_jhp.json +++ b/src/main/resources/data/plasticgun/recipe/9mm_jhp.json @@ -1,9 +1,9 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "plasticgun:enhanced_gunpowder" }, - { "item": "minecraft:gold_nugget" }, - { "item": "plasticgun:kevlar_sheet" } + "plasticgun:enhanced_gunpowder", + "minecraft:gold_nugget", + "plasticgun:kevlar_sheet" ], "result": { "id": "plasticgun:9mm_jhp", diff --git a/src/main/resources/data/plasticgun/recipe/9mm_parabellum.json b/src/main/resources/data/plasticgun/recipe/9mm_parabellum.json index d9f8f1a..807c998 100644 --- a/src/main/resources/data/plasticgun/recipe/9mm_parabellum.json +++ b/src/main/resources/data/plasticgun/recipe/9mm_parabellum.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:gunpowder" }, - { "item": "minecraft:gold_nugget" } + "minecraft:gunpowder", + "minecraft:gold_nugget" ], "result": { "id": "plasticgun:9mm_parabellum", diff --git a/src/main/resources/data/plasticgun/recipe/advanced_circuit.json b/src/main/resources/data/plasticgun/recipe/advanced_circuit.json index 63bbca9..0baa9a0 100644 --- a/src/main/resources/data/plasticgun/recipe/advanced_circuit.json +++ b/src/main/resources/data/plasticgun/recipe/advanced_circuit.json @@ -6,10 +6,10 @@ "RCR" ], "key": { - "R": { "item": "minecraft:redstone" }, - "C": { "item": "minecraft:comparator" }, - "I": { "item": "minecraft:iron_ingot" }, - "L": { "item": "minecraft:lapis_lazuli" } + "R": "minecraft:redstone", + "C": "minecraft:comparator", + "I": "minecraft:iron_ingot", + "L": "minecraft:lapis_lazuli" }, "result": { "id": "plasticgun:advanced_circuit", diff --git a/src/main/resources/data/plasticgun/recipe/ak_47.json b/src/main/resources/data/plasticgun/recipe/ak_47.json index ab31eea..2b88dc9 100644 --- a/src/main/resources/data/plasticgun/recipe/ak_47.json +++ b/src/main/resources/data/plasticgun/recipe/ak_47.json @@ -6,12 +6,12 @@ "I R" ], "key": { - "T": { "item": "plasticgun:titanium_alloy" }, - "H": { "item": "plasticgun:hardened_steel" }, - "P": { "item": "plasticgun:precision_gear" }, - "C": { "item": "plasticgun:composite_frame" }, - "I": { "item": "plasticgun:iron_shuriken" }, - "R": { "item": "plasticgun:reinforced_fiber" } + "T": "plasticgun:titanium_alloy", + "H": "plasticgun:hardened_steel", + "P": "plasticgun:precision_gear", + "C": "plasticgun:composite_frame", + "I": "plasticgun:iron_shuriken", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:ak_47", diff --git a/src/main/resources/data/plasticgun/recipe/alloy_wheel.json b/src/main/resources/data/plasticgun/recipe/alloy_wheel.json index c5f8aa8..3c2f948 100644 --- a/src/main/resources/data/plasticgun/recipe/alloy_wheel.json +++ b/src/main/resources/data/plasticgun/recipe/alloy_wheel.json @@ -6,8 +6,8 @@ " H " ], "key": { - "H": { "item": "plasticgun:hardened_steel" }, - "T": { "item": "plasticgun:titanium_alloy" } + "H": "plasticgun:hardened_steel", + "T": "plasticgun:titanium_alloy" }, "result": { "id": "plasticgun:alloy_wheel", diff --git a/src/main/resources/data/plasticgun/recipe/awp.json b/src/main/resources/data/plasticgun/recipe/awp.json index 782069d..962d9af 100644 --- a/src/main/resources/data/plasticgun/recipe/awp.json +++ b/src/main/resources/data/plasticgun/recipe/awp.json @@ -6,12 +6,12 @@ "PGR" ], "key": { - "T": { "item": "plasticgun:titanium_alloy" }, - "H": { "item": "plasticgun:hardened_steel" }, - "C": { "item": "plasticgun:composite_frame" }, - "P": { "item": "plasticgun:precision_gear" }, - "G": { "item": "plasticgun:graphene_sheet" }, - "R": { "item": "plasticgun:reinforced_fiber" } + "T": "plasticgun:titanium_alloy", + "H": "plasticgun:hardened_steel", + "C": "plasticgun:composite_frame", + "P": "plasticgun:precision_gear", + "G": "plasticgun:graphene_sheet", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:awp", diff --git a/src/main/resources/data/plasticgun/recipe/ceramic_mixture.json b/src/main/resources/data/plasticgun/recipe/ceramic_mixture.json index 61f6c16..b2c5d05 100644 --- a/src/main/resources/data/plasticgun/recipe/ceramic_mixture.json +++ b/src/main/resources/data/plasticgun/recipe/ceramic_mixture.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:clay_ball" }, - { "item": "minecraft:bone_meal" } + "minecraft:clay_ball", + "minecraft:bone_meal" ], "result": { "id": "plasticgun:ceramic_mixture", diff --git a/src/main/resources/data/plasticgun/recipe/ceramic_plate.json b/src/main/resources/data/plasticgun/recipe/ceramic_plate.json index d1d7746..0fde25b 100644 --- a/src/main/resources/data/plasticgun/recipe/ceramic_plate.json +++ b/src/main/resources/data/plasticgun/recipe/ceramic_plate.json @@ -1,8 +1,6 @@ { "type": "minecraft:smelting", - "ingredient": { - "item": "plasticgun:ceramic_mixture" - }, + "ingredient": "plasticgun:ceramic_mixture", "result": { "id": "plasticgun:ceramic_plate" }, diff --git a/src/main/resources/data/plasticgun/recipe/colt_1903.json b/src/main/resources/data/plasticgun/recipe/colt_1903.json index df193c3..c701178 100644 --- a/src/main/resources/data/plasticgun/recipe/colt_1903.json +++ b/src/main/resources/data/plasticgun/recipe/colt_1903.json @@ -6,11 +6,11 @@ "PI " ], "key": { - "T": { "item": "plasticgun:titanium_alloy" }, - "C": { "item": "plasticgun:composite_frame" }, - "H": { "item": "plasticgun:hardened_steel" }, - "P": { "item": "plasticgun:precision_gear" }, - "I": { "item": "plasticgun:iron_shuriken" } + "T": "plasticgun:titanium_alloy", + "C": "plasticgun:composite_frame", + "H": "plasticgun:hardened_steel", + "P": "plasticgun:precision_gear", + "I": "plasticgun:iron_shuriken" }, "result": { "id": "plasticgun:colt_1903", diff --git a/src/main/resources/data/plasticgun/recipe/colt_45.json b/src/main/resources/data/plasticgun/recipe/colt_45.json index 9196fb0..4f78d37 100644 --- a/src/main/resources/data/plasticgun/recipe/colt_45.json +++ b/src/main/resources/data/plasticgun/recipe/colt_45.json @@ -6,12 +6,12 @@ " RC" ], "key": { - "C": { "item": "plasticgun:composite_frame" }, - "H": { "item": "plasticgun:hardened_steel" }, - "P": { "item": "plasticgun:precision_gear" }, - "T": { "item": "plasticgun:trigger_mechanism" }, - "I": { "item": "plasticgun:iron_shuriken" }, - "R": { "item": "plasticgun:reinforced_fiber" } + "C": "plasticgun:composite_frame", + "H": "plasticgun:hardened_steel", + "P": "plasticgun:precision_gear", + "T": "plasticgun:trigger_mechanism", + "I": "plasticgun:iron_shuriken", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:colt_45", diff --git a/src/main/resources/data/plasticgun/recipe/colt_peacemaker.json b/src/main/resources/data/plasticgun/recipe/colt_peacemaker.json index 3c4c2ab..fe28940 100644 --- a/src/main/resources/data/plasticgun/recipe/colt_peacemaker.json +++ b/src/main/resources/data/plasticgun/recipe/colt_peacemaker.json @@ -6,10 +6,10 @@ " TR" ], "key": { - "H": { "item": "plasticgun:hardened_steel" }, - "C": { "item": "plasticgun:composite_frame" }, - "T": { "item": "plasticgun:trigger_mechanism" }, - "R": { "item": "plasticgun:reinforced_fiber" } + "H": "plasticgun:hardened_steel", + "C": "plasticgun:composite_frame", + "T": "plasticgun:trigger_mechanism", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:colt_peacemaker", diff --git a/src/main/resources/data/plasticgun/recipe/composite_frame.json b/src/main/resources/data/plasticgun/recipe/composite_frame.json index 7de46ec..9edcf57 100644 --- a/src/main/resources/data/plasticgun/recipe/composite_frame.json +++ b/src/main/resources/data/plasticgun/recipe/composite_frame.json @@ -6,8 +6,8 @@ "CCC" ], "key": { - "C": { "item": "plasticgun:composite_resin" }, - "H": { "item": "plasticgun:hardened_steel" } + "C": "plasticgun:composite_resin", + "H": "plasticgun:hardened_steel" }, "result": { "id": "plasticgun:composite_frame", diff --git a/src/main/resources/data/plasticgun/recipe/composite_resin.json b/src/main/resources/data/plasticgun/recipe/composite_resin.json index 3bb682d..f8df0d3 100644 --- a/src/main/resources/data/plasticgun/recipe/composite_resin.json +++ b/src/main/resources/data/plasticgun/recipe/composite_resin.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:slime_ball" }, - { "item": "minecraft:clay_ball" } + "minecraft:slime_ball", + "minecraft:clay_ball" ], "result": { "id": "plasticgun:composite_resin", diff --git a/src/main/resources/data/plasticgun/recipe/copper_wiring.json b/src/main/resources/data/plasticgun/recipe/copper_wiring.json index b962c3d..6176988 100644 --- a/src/main/resources/data/plasticgun/recipe/copper_wiring.json +++ b/src/main/resources/data/plasticgun/recipe/copper_wiring.json @@ -6,7 +6,7 @@ " C" ], "key": { - "C": { "item": "minecraft:copper_ingot" } + "C": "minecraft:copper_ingot" }, "result": { "id": "plasticgun:copper_wiring", diff --git a/src/main/resources/data/plasticgun/recipe/diamond_shuriken.json b/src/main/resources/data/plasticgun/recipe/diamond_shuriken.json index 20402d1..4744daf 100644 --- a/src/main/resources/data/plasticgun/recipe/diamond_shuriken.json +++ b/src/main/resources/data/plasticgun/recipe/diamond_shuriken.json @@ -6,7 +6,7 @@ " D " ], "key": { - "D": { "item": "minecraft:diamond" } + "D": "minecraft:diamond" }, "result": { "id": "plasticgun:diamond_shuriken" diff --git a/src/main/resources/data/plasticgun/recipe/enhanced_gunpowder.json b/src/main/resources/data/plasticgun/recipe/enhanced_gunpowder.json index 4ebc2a9..f602eb9 100644 --- a/src/main/resources/data/plasticgun/recipe/enhanced_gunpowder.json +++ b/src/main/resources/data/plasticgun/recipe/enhanced_gunpowder.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:gunpowder" }, - { "item": "plasticgun:explosive_powder" } + "minecraft:gunpowder", + "plasticgun:explosive_powder" ], "result": { "id": "plasticgun:enhanced_gunpowder", diff --git a/src/main/resources/data/plasticgun/recipe/explosive_powder.json b/src/main/resources/data/plasticgun/recipe/explosive_powder.json index c4b5c81..67dcf8d 100644 --- a/src/main/resources/data/plasticgun/recipe/explosive_powder.json +++ b/src/main/resources/data/plasticgun/recipe/explosive_powder.json @@ -1,9 +1,9 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:gunpowder" }, - { "item": "minecraft:blaze_powder" }, - { "item": "minecraft:coal" } + "minecraft:gunpowder", + "minecraft:blaze_powder", + "minecraft:coal" ], "result": { "id": "plasticgun:explosive_powder", diff --git a/src/main/resources/data/plasticgun/recipe/flak_vest.json b/src/main/resources/data/plasticgun/recipe/flak_vest.json index 1ea081b..50080e0 100644 --- a/src/main/resources/data/plasticgun/recipe/flak_vest.json +++ b/src/main/resources/data/plasticgun/recipe/flak_vest.json @@ -1,21 +1,11 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { - "item": "plasticgun:hyperalloy" - }, - { - "item": "minecraft:iron_chestplate" - }, - { - "item": "plasticgun:hyperalloy" - }, - { - "item": "plasticgun:hyperalloy" - }, - { - "item": "plasticgun:hyperalloy" - } + "plasticgun:hyperalloy", + "minecraft:iron_chestplate", + "plasticgun:hyperalloy", + "plasticgun:hyperalloy", + "plasticgun:hyperalloy" ], "result": { "id": "plasticgun:flak_vest", diff --git a/src/main/resources/data/plasticgun/recipe/force_container.json b/src/main/resources/data/plasticgun/recipe/force_container.json index 798ea63..daa27da 100644 --- a/src/main/resources/data/plasticgun/recipe/force_container.json +++ b/src/main/resources/data/plasticgun/recipe/force_container.json @@ -6,9 +6,9 @@ " C " ], "key": { - "C": { "item": "plasticgun:composite_resin" }, - "G": { "item": "plasticgun:graphene_sheet" }, - "P": { "item": "plasticgun:plasma_core" } + "C": "plasticgun:composite_resin", + "G": "plasticgun:graphene_sheet", + "P": "plasticgun:plasma_core" }, "result": { "id": "plasticgun:force_container", diff --git a/src/main/resources/data/plasticgun/recipe/forcegun.json b/src/main/resources/data/plasticgun/recipe/forcegun.json index eca657e..9e74691 100644 --- a/src/main/resources/data/plasticgun/recipe/forcegun.json +++ b/src/main/resources/data/plasticgun/recipe/forcegun.json @@ -6,10 +6,10 @@ " H " ], "key": { - "C": { "item": "plasticgun:composite_resin" }, - "P": { "item": "plasticgun:plasma_core" }, - "G": { "item": "plasticgun:graphene_sheet" }, - "H": { "item": "plasticgun:hardened_steel" } + "C": "plasticgun:composite_resin", + "P": "plasticgun:plasma_core", + "G": "plasticgun:graphene_sheet", + "H": "plasticgun:hardened_steel" }, "result": { "id": "plasticgun:forcegun", diff --git a/src/main/resources/data/plasticgun/recipe/golden_shuriken.json b/src/main/resources/data/plasticgun/recipe/golden_shuriken.json index 3285b10..3c63eb8 100644 --- a/src/main/resources/data/plasticgun/recipe/golden_shuriken.json +++ b/src/main/resources/data/plasticgun/recipe/golden_shuriken.json @@ -6,7 +6,7 @@ " G " ], "key": { - "G": { "item": "minecraft:gold_ingot" } + "G": "minecraft:gold_ingot" }, "result": { "id": "plasticgun:golden_shuriken" diff --git a/src/main/resources/data/plasticgun/recipe/graphene_sheet.json b/src/main/resources/data/plasticgun/recipe/graphene_sheet.json index 207e31a..c5b5685 100644 --- a/src/main/resources/data/plasticgun/recipe/graphene_sheet.json +++ b/src/main/resources/data/plasticgun/recipe/graphene_sheet.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:coal_block" }, - { "item": "minecraft:shears" } + "minecraft:coal_block", + "minecraft:shears" ], "result": { "id": "plasticgun:graphene_sheet", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_an_m14.json b/src/main/resources/data/plasticgun/recipe/grenade_an_m14.json index c6308b2..82f7820 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_an_m14.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_an_m14.json @@ -6,10 +6,10 @@ " G " ], "key": { - "E": { "item": "plasticgun:explosive_powder" }, - "C": { "item": "plasticgun:ceramic_plate" }, - "P": { "item": "plasticgun:plasma_core" }, - "G": { "item": "plasticgun:graphene_sheet" } + "E": "plasticgun:explosive_powder", + "C": "plasticgun:ceramic_plate", + "P": "plasticgun:plasma_core", + "G": "plasticgun:graphene_sheet" }, "result": { "id": "plasticgun:grenade_an_m14", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_f1.json b/src/main/resources/data/plasticgun/recipe/grenade_f1.json index ddf5205..871a5d9 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_f1.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_f1.json @@ -6,10 +6,10 @@ " G " ], "key": { - "P": { "item": "plasticgun:plasma_core" }, - "C": { "item": "plasticgun:composite_resin" }, - "E": { "item": "plasticgun:explosive_powder" }, - "G": { "item": "plasticgun:graphene_sheet" } + "P": "plasticgun:plasma_core", + "C": "plasticgun:composite_resin", + "E": "plasticgun:explosive_powder", + "G": "plasticgun:graphene_sheet" }, "result": { "id": "plasticgun:grenade_f1", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_k417.json b/src/main/resources/data/plasticgun/recipe/grenade_k417.json index a74dcd3..43002f7 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_k417.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_k417.json @@ -6,10 +6,10 @@ " P " ], "key": { - "E": { "item": "plasticgun:explosive_powder" }, - "G": { "item": "plasticgun:graphene_sheet" }, - "C": { "item": "plasticgun:composite_frame" }, - "P": { "item": "plasticgun:plasma_core" } + "E": "plasticgun:explosive_powder", + "G": "plasticgun:graphene_sheet", + "C": "plasticgun:composite_frame", + "P": "plasticgun:plasma_core" }, "result": { "id": "plasticgun:grenade_k417", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_m18.json b/src/main/resources/data/plasticgun/recipe/grenade_m18.json index 6ec90b2..11b77cc 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_m18.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_m18.json @@ -6,10 +6,10 @@ " R " ], "key": { - "P": { "item": "plasticgun:plasma_core" }, - "C": { "item": "plasticgun:composite_frame" }, - "E": { "item": "plasticgun:explosive_powder" }, - "R": { "item": "plasticgun:reinforced_fiber" } + "P": "plasticgun:plasma_core", + "C": "plasticgun:composite_frame", + "E": "plasticgun:explosive_powder", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:grenade_m18", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_m34.json b/src/main/resources/data/plasticgun/recipe/grenade_m34.json index 050c356..1c75941 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_m34.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_m34.json @@ -6,10 +6,10 @@ " P " ], "key": { - "G": { "item": "plasticgun:graphene_sheet" }, - "C": { "item": "plasticgun:composite_frame" }, - "E": { "item": "plasticgun:explosive_powder" }, - "P": { "item": "plasticgun:plasma_core" } + "G": "plasticgun:graphene_sheet", + "C": "plasticgun:composite_frame", + "E": "plasticgun:explosive_powder", + "P": "plasticgun:plasma_core" }, "result": { "id": "plasticgun:grenade_m34", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_m7a3.json b/src/main/resources/data/plasticgun/recipe/grenade_m7a3.json index 81e7e32..9af3136 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_m7a3.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_m7a3.json @@ -6,10 +6,10 @@ " G " ], "key": { - "T": { "item": "plasticgun:titanium_alloy" }, - "C": { "item": "plasticgun:composite_resin" }, - "E": { "item": "plasticgun:explosive_powder" }, - "G": { "item": "plasticgun:graphene_sheet" } + "T": "plasticgun:titanium_alloy", + "C": "plasticgun:composite_resin", + "E": "plasticgun:explosive_powder", + "G": "plasticgun:graphene_sheet" }, "result": { "id": "plasticgun:grenade_m7a3", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_m84.json b/src/main/resources/data/plasticgun/recipe/grenade_m84.json index d380d5f..f68d3c2 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_m84.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_m84.json @@ -6,10 +6,10 @@ " P " ], "key": { - "E": { "item": "plasticgun:explosive_powder" }, - "G": { "item": "plasticgun:graphene_sheet" }, - "C": { "item": "plasticgun:composite_frame" }, - "P": { "item": "plasticgun:plasma_core" } + "E": "plasticgun:explosive_powder", + "G": "plasticgun:graphene_sheet", + "C": "plasticgun:composite_frame", + "P": "plasticgun:plasma_core" }, "result": { "id": "plasticgun:grenade_m84", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_mk3a2.json b/src/main/resources/data/plasticgun/recipe/grenade_mk3a2.json index cd318a2..9c8c428 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_mk3a2.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_mk3a2.json @@ -6,10 +6,10 @@ " T " ], "key": { - "G": { "item": "plasticgun:graphene_sheet" }, - "C": { "item": "plasticgun:composite_frame" }, - "E": { "item": "plasticgun:explosive_powder" }, - "T": { "item": "plasticgun:titanium_alloy" } + "G": "plasticgun:graphene_sheet", + "C": "plasticgun:composite_frame", + "E": "plasticgun:explosive_powder", + "T": "plasticgun:titanium_alloy" }, "result": { "id": "plasticgun:grenade_mk3a2", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_no_69.json b/src/main/resources/data/plasticgun/recipe/grenade_no_69.json index 87dc05c..378be87 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_no_69.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_no_69.json @@ -6,10 +6,10 @@ " G " ], "key": { - "E": { "item": "plasticgun:explosive_powder" }, - "C": { "item": "plasticgun:composite_frame" }, - "P": { "item": "plasticgun:plasma_core" }, - "G": { "item": "plasticgun:graphene_sheet" } + "E": "plasticgun:explosive_powder", + "C": "plasticgun:composite_frame", + "P": "plasticgun:plasma_core", + "G": "plasticgun:graphene_sheet" }, "result": { "id": "plasticgun:grenade_no_69", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_rgd_5.json b/src/main/resources/data/plasticgun/recipe/grenade_rgd_5.json index dd2a8b4..8302765 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_rgd_5.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_rgd_5.json @@ -6,10 +6,10 @@ " P " ], "key": { - "G": { "item": "plasticgun:graphene_sheet" }, - "C": { "item": "plasticgun:composite_resin" }, - "E": { "item": "plasticgun:explosive_powder" }, - "P": { "item": "plasticgun:plasma_core" } + "G": "plasticgun:graphene_sheet", + "C": "plasticgun:composite_resin", + "E": "plasticgun:explosive_powder", + "P": "plasticgun:plasma_core" }, "result": { "id": "plasticgun:grenade_rgd_5", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_rgo.json b/src/main/resources/data/plasticgun/recipe/grenade_rgo.json index 8009601..ac19866 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_rgo.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_rgo.json @@ -6,10 +6,10 @@ " T " ], "key": { - "P": { "item": "plasticgun:plasma_core" }, - "C": { "item": "plasticgun:composite_resin" }, - "E": { "item": "plasticgun:explosive_powder" }, - "T": { "item": "plasticgun:titanium_alloy" } + "P": "plasticgun:plasma_core", + "C": "plasticgun:composite_resin", + "E": "plasticgun:explosive_powder", + "T": "plasticgun:titanium_alloy" }, "result": { "id": "plasticgun:grenade_rgo", diff --git a/src/main/resources/data/plasticgun/recipe/grenade_thermite.json b/src/main/resources/data/plasticgun/recipe/grenade_thermite.json index b230ebb..17a988d 100644 --- a/src/main/resources/data/plasticgun/recipe/grenade_thermite.json +++ b/src/main/resources/data/plasticgun/recipe/grenade_thermite.json @@ -6,10 +6,10 @@ " G " ], "key": { - "T": { "item": "plasticgun:titanium_alloy" }, - "C": { "item": "plasticgun:composite_frame" }, - "E": { "item": "plasticgun:explosive_powder" }, - "G": { "item": "plasticgun:graphene_sheet" } + "T": "plasticgun:titanium_alloy", + "C": "plasticgun:composite_frame", + "E": "plasticgun:explosive_powder", + "G": "plasticgun:graphene_sheet" }, "result": { "id": "plasticgun:grenade_thermite", diff --git a/src/main/resources/data/plasticgun/recipe/hardened_steel.json b/src/main/resources/data/plasticgun/recipe/hardened_steel.json index 795d25e..f0ade13 100644 --- a/src/main/resources/data/plasticgun/recipe/hardened_steel.json +++ b/src/main/resources/data/plasticgun/recipe/hardened_steel.json @@ -1,8 +1,6 @@ { "type": "minecraft:smelting", - "ingredient": { - "item": "minecraft:iron_block" - }, + "ingredient": "minecraft:iron_block", "result": { "id": "plasticgun:hardened_steel" }, diff --git a/src/main/resources/data/plasticgun/recipe/hyperalloy.json b/src/main/resources/data/plasticgun/recipe/hyperalloy.json index aeb4e61..7fd7e2c 100644 --- a/src/main/resources/data/plasticgun/recipe/hyperalloy.json +++ b/src/main/resources/data/plasticgun/recipe/hyperalloy.json @@ -6,9 +6,9 @@ "TTT" ], "key": { - "T": { "item": "plasticgun:titanium_alloy" }, - "H": { "item": "plasticgun:hardened_steel" }, - "R": { "item": "plasticgun:reinforced_fiber" } + "T": "plasticgun:titanium_alloy", + "H": "plasticgun:hardened_steel", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:hyperalloy", diff --git a/src/main/resources/data/plasticgun/recipe/iron_shuriken.json b/src/main/resources/data/plasticgun/recipe/iron_shuriken.json index 5afa8f0..91e6a6d 100644 --- a/src/main/resources/data/plasticgun/recipe/iron_shuriken.json +++ b/src/main/resources/data/plasticgun/recipe/iron_shuriken.json @@ -6,7 +6,7 @@ " I " ], "key": { - "I": { "item": "minecraft:iron_ingot" } + "I": "minecraft:iron_ingot" }, "result": { "id": "plasticgun:iron_shuriken" diff --git a/src/main/resources/data/plasticgun/recipe/kevlar_sheet.json b/src/main/resources/data/plasticgun/recipe/kevlar_sheet.json index 7832330..cbcb4bd 100644 --- a/src/main/resources/data/plasticgun/recipe/kevlar_sheet.json +++ b/src/main/resources/data/plasticgun/recipe/kevlar_sheet.json @@ -6,8 +6,8 @@ " K " ], "key": { - "K": { "item": "plasticgun:reinforced_fiber" }, - "F": { "item": "minecraft:feather" } + "K": "plasticgun:reinforced_fiber", + "F": "minecraft:feather" }, "result": { "id": "plasticgun:kevlar_sheet", diff --git a/src/main/resources/data/plasticgun/recipe/kevlar_vest.json b/src/main/resources/data/plasticgun/recipe/kevlar_vest.json index c22dfeb..3db3ebe 100644 --- a/src/main/resources/data/plasticgun/recipe/kevlar_vest.json +++ b/src/main/resources/data/plasticgun/recipe/kevlar_vest.json @@ -6,9 +6,7 @@ "KKK" ], "key": { - "K": { - "item": "plasticgun:kevlar_sheet" - } + "K": "plasticgun:kevlar_sheet" }, "result": { "id": "plasticgun:kevlar_vest" diff --git a/src/main/resources/data/plasticgun/recipe/magnetic_coil.json b/src/main/resources/data/plasticgun/recipe/magnetic_coil.json index 70948cd..99ddd34 100644 --- a/src/main/resources/data/plasticgun/recipe/magnetic_coil.json +++ b/src/main/resources/data/plasticgun/recipe/magnetic_coil.json @@ -6,15 +6,9 @@ " C " ], "key": { - "C": { - "item": "plasticgun:copper_wiring" - }, - "I": { - "item": "minecraft:iron_ingot" - }, - "R": { - "item": "plasticgun:reinforced_fiber" - } + "C": "plasticgun:copper_wiring", + "I": "minecraft:iron_ingot", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:magnetic_coil", diff --git a/src/main/resources/data/plasticgun/recipe/microchip.json b/src/main/resources/data/plasticgun/recipe/microchip.json index f4b398b..7e706ab 100644 --- a/src/main/resources/data/plasticgun/recipe/microchip.json +++ b/src/main/resources/data/plasticgun/recipe/microchip.json @@ -6,9 +6,9 @@ " S " ], "key": { - "S": { "item": "plasticgun:silicon_wafer" }, - "R": { "item": "minecraft:redstone" }, - "I": { "item": "plasticgun:advanced_circuit" } + "S": "plasticgun:silicon_wafer", + "R": "minecraft:redstone", + "I": "plasticgun:advanced_circuit" }, "result": { "id": "plasticgun:microchip", diff --git a/src/main/resources/data/plasticgun/recipe/nano_tubes.json b/src/main/resources/data/plasticgun/recipe/nano_tubes.json index 7a8256f..cbda5c8 100644 --- a/src/main/resources/data/plasticgun/recipe/nano_tubes.json +++ b/src/main/resources/data/plasticgun/recipe/nano_tubes.json @@ -6,7 +6,7 @@ " G " ], "key": { - "G": { "item": "plasticgun:graphene_sheet" } + "G": "plasticgun:graphene_sheet" }, "result": { "id": "plasticgun:nano_tubes", diff --git a/src/main/resources/data/plasticgun/recipe/netherite_shuriken.json b/src/main/resources/data/plasticgun/recipe/netherite_shuriken.json index 343de46..29cc673 100644 --- a/src/main/resources/data/plasticgun/recipe/netherite_shuriken.json +++ b/src/main/resources/data/plasticgun/recipe/netherite_shuriken.json @@ -6,9 +6,7 @@ " N " ], "key": { - "N": { - "item": "minecraft:netherite_ingot" - } + "N": "minecraft:netherite_ingot" }, "result": { "id": "plasticgun:netherite_shuriken" diff --git a/src/main/resources/data/plasticgun/recipe/p2022.json b/src/main/resources/data/plasticgun/recipe/p2022.json index 362a2d4..37cd58b 100644 --- a/src/main/resources/data/plasticgun/recipe/p2022.json +++ b/src/main/resources/data/plasticgun/recipe/p2022.json @@ -6,11 +6,11 @@ "PI " ], "key": { - "T": { "item": "plasticgun:titanium_alloy" }, - "C": { "item": "plasticgun:composite_frame" }, - "H": { "item": "plasticgun:hardened_steel" }, - "P": { "item": "plasticgun:precision_gear" }, - "I": { "item": "plasticgun:iron_shuriken" } + "T": "plasticgun:titanium_alloy", + "C": "plasticgun:composite_frame", + "H": "plasticgun:hardened_steel", + "P": "plasticgun:precision_gear", + "I": "plasticgun:iron_shuriken" }, "result": { "id": "plasticgun:p2022", diff --git a/src/main/resources/data/plasticgun/recipe/plasma_core.json b/src/main/resources/data/plasticgun/recipe/plasma_core.json index 01062ac..831b831 100644 --- a/src/main/resources/data/plasticgun/recipe/plasma_core.json +++ b/src/main/resources/data/plasticgun/recipe/plasma_core.json @@ -6,9 +6,9 @@ "GEG" ], "key": { - "G": { "item": "minecraft:ghast_tear" }, - "E": { "item": "minecraft:ender_eye" }, - "C": { "item": "plasticgun:composite_frame" } + "G": "minecraft:ghast_tear", + "E": "minecraft:ender_eye", + "C": "plasticgun:composite_frame" }, "result": { "id": "plasticgun:plasma_core", diff --git a/src/main/resources/data/plasticgun/recipe/power_cell.json b/src/main/resources/data/plasticgun/recipe/power_cell.json index 1253ac2..d097ca2 100644 --- a/src/main/resources/data/plasticgun/recipe/power_cell.json +++ b/src/main/resources/data/plasticgun/recipe/power_cell.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:redstone_block" }, - { "item": "plasticgun:advanced_circuit" } + "minecraft:redstone_block", + "plasticgun:advanced_circuit" ], "result": { "id": "plasticgun:power_cell", diff --git a/src/main/resources/data/plasticgun/recipe/precision_gear.json b/src/main/resources/data/plasticgun/recipe/precision_gear.json index 2b71ce7..0ad2e28 100644 --- a/src/main/resources/data/plasticgun/recipe/precision_gear.json +++ b/src/main/resources/data/plasticgun/recipe/precision_gear.json @@ -6,9 +6,9 @@ " H " ], "key": { - "H": { "item": "plasticgun:hardened_steel" }, - "I": { "item": "minecraft:iron_ingot" }, - "R": { "item": "plasticgun:reinforced_fiber" } + "H": "plasticgun:hardened_steel", + "I": "minecraft:iron_ingot", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:precision_gear", diff --git a/src/main/resources/data/plasticgun/recipe/reinforced_fiber.json b/src/main/resources/data/plasticgun/recipe/reinforced_fiber.json index 067db88..8323b4b 100644 --- a/src/main/resources/data/plasticgun/recipe/reinforced_fiber.json +++ b/src/main/resources/data/plasticgun/recipe/reinforced_fiber.json @@ -6,9 +6,9 @@ " S " ], "key": { - "S": { "item": "minecraft:string" }, - "F": { "item": "minecraft:feather" }, - "I": { "item": "plasticgun:composite_resin" } + "S": "minecraft:string", + "F": "minecraft:feather", + "I": "plasticgun:composite_resin" }, "result": { "id": "plasticgun:reinforced_fiber", diff --git a/src/main/resources/data/plasticgun/recipe/rpg9.json b/src/main/resources/data/plasticgun/recipe/rpg9.json index 56eff00..eb777b6 100644 --- a/src/main/resources/data/plasticgun/recipe/rpg9.json +++ b/src/main/resources/data/plasticgun/recipe/rpg9.json @@ -6,10 +6,10 @@ " T " ], "key": { - "P": { "item": "plasticgun:plasma_core" }, - "G": { "item": "plasticgun:graphene_sheet" }, - "H": { "item": "plasticgun:hardened_steel" }, - "T": { "item": "plasticgun:trigger_mechanism" } + "P": "plasticgun:plasma_core", + "G": "plasticgun:graphene_sheet", + "H": "plasticgun:hardened_steel", + "T": "plasticgun:trigger_mechanism" }, "result": { "id": "plasticgun:rpg9", diff --git a/src/main/resources/data/plasticgun/recipe/rpg_shell.json b/src/main/resources/data/plasticgun/recipe/rpg_shell.json index 5b9e654..5d6172f 100644 --- a/src/main/resources/data/plasticgun/recipe/rpg_shell.json +++ b/src/main/resources/data/plasticgun/recipe/rpg_shell.json @@ -6,9 +6,9 @@ " E " ], "key": { - "E": { "item": "plasticgun:explosive_powder" }, - "G": { "item": "plasticgun:graphene_sheet" }, - "H": { "item": "plasticgun:hardened_steel" } + "E": "plasticgun:explosive_powder", + "G": "plasticgun:graphene_sheet", + "H": "plasticgun:hardened_steel" }, "result": { "id": "plasticgun:rpg_shell", diff --git a/src/main/resources/data/plasticgun/recipe/rpg_shell_incendiary.json b/src/main/resources/data/plasticgun/recipe/rpg_shell_incendiary.json index de1f838..7fababf 100644 --- a/src/main/resources/data/plasticgun/recipe/rpg_shell_incendiary.json +++ b/src/main/resources/data/plasticgun/recipe/rpg_shell_incendiary.json @@ -6,9 +6,9 @@ " E " ], "key": { - "E": { "item": "plasticgun:explosive_powder" }, - "G": { "item": "plasticgun:graphene_sheet" }, - "P": { "item": "plasticgun:plasma_core" } + "E": "plasticgun:explosive_powder", + "G": "plasticgun:graphene_sheet", + "P": "plasticgun:plasma_core" }, "result": { "id": "plasticgun:rpg_shell_incendiary", diff --git a/src/main/resources/data/plasticgun/recipe/silicon_mixture.json b/src/main/resources/data/plasticgun/recipe/silicon_mixture.json index 9303651..7e35f17 100644 --- a/src/main/resources/data/plasticgun/recipe/silicon_mixture.json +++ b/src/main/resources/data/plasticgun/recipe/silicon_mixture.json @@ -1,33 +1,15 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { - "item": "minecraft:sand" - }, - { - "item": "minecraft:quartz" - }, - { - "item": "minecraft:sand" - }, - { - "item": "minecraft:quartz" - }, - { - "item": "minecraft:sand" - }, - { - "item": "minecraft:quartz" - }, - { - "item": "minecraft:sand" - }, - { - "item": "minecraft:quartz" - }, - { - "item": "minecraft:quartz" - } + "minecraft:sand", + "minecraft:quartz", + "minecraft:sand", + "minecraft:quartz", + "minecraft:sand", + "minecraft:quartz", + "minecraft:sand", + "minecraft:quartz", + "minecraft:quartz" ], "result": { "id": "plasticgun:silicon_mixture", diff --git a/src/main/resources/data/plasticgun/recipe/silicon_wafer.json b/src/main/resources/data/plasticgun/recipe/silicon_wafer.json index b0fd94b..7491a25 100644 --- a/src/main/resources/data/plasticgun/recipe/silicon_wafer.json +++ b/src/main/resources/data/plasticgun/recipe/silicon_wafer.json @@ -1,8 +1,6 @@ { "type": "minecraft:smelting", - "ingredient": { - "item": "plasticgun:silicon_mixture" - }, + "ingredient": "plasticgun:silicon_mixture", "result": { "id": "plasticgun:silicon_wafer" }, diff --git a/src/main/resources/data/plasticgun/recipe/snub_nosed_revolver.json b/src/main/resources/data/plasticgun/recipe/snub_nosed_revolver.json index 4c076d9..63e7282 100644 --- a/src/main/resources/data/plasticgun/recipe/snub_nosed_revolver.json +++ b/src/main/resources/data/plasticgun/recipe/snub_nosed_revolver.json @@ -6,9 +6,9 @@ " T " ], "key": { - "H": { "item": "plasticgun:hardened_steel" }, - "C": { "item": "plasticgun:composite_frame" }, - "T": { "item": "plasticgun:trigger_mechanism" } + "H": "plasticgun:hardened_steel", + "C": "plasticgun:composite_frame", + "T": "plasticgun:trigger_mechanism" }, "result": { "id": "plasticgun:snub_nosed_revolver", diff --git a/src/main/resources/data/plasticgun/recipe/stone_shuriken.json b/src/main/resources/data/plasticgun/recipe/stone_shuriken.json index 252624a..1c260d5 100644 --- a/src/main/resources/data/plasticgun/recipe/stone_shuriken.json +++ b/src/main/resources/data/plasticgun/recipe/stone_shuriken.json @@ -6,7 +6,7 @@ " S " ], "key": { - "S": { "item": "minecraft:cobblestone" } + "S": "minecraft:cobblestone" }, "result": { "id": "plasticgun:stone_shuriken" diff --git a/src/main/resources/data/plasticgun/recipe/titanium_alloy.json b/src/main/resources/data/plasticgun/recipe/titanium_alloy.json index eb8b18e..c1871ee 100644 --- a/src/main/resources/data/plasticgun/recipe/titanium_alloy.json +++ b/src/main/resources/data/plasticgun/recipe/titanium_alloy.json @@ -6,8 +6,8 @@ "NNN" ], "key": { - "N": { "item": "plasticgun:nano_tubes" }, - "I": { "item": "minecraft:iron_ingot" } + "N": "plasticgun:nano_tubes", + "I": "minecraft:iron_ingot" }, "result": { "id": "plasticgun:titanium_alloy", diff --git a/src/main/resources/data/plasticgun/recipe/tokarev_tt_33.json b/src/main/resources/data/plasticgun/recipe/tokarev_tt_33.json index 0fccc81..18bfd30 100644 --- a/src/main/resources/data/plasticgun/recipe/tokarev_tt_33.json +++ b/src/main/resources/data/plasticgun/recipe/tokarev_tt_33.json @@ -6,11 +6,11 @@ "PI " ], "key": { - "T": { "item": "plasticgun:titanium_alloy" }, - "C": { "item": "plasticgun:composite_frame" }, - "H": { "item": "plasticgun:hardened_steel" }, - "P": { "item": "plasticgun:precision_gear" }, - "I": { "item": "plasticgun:iron_shuriken" } + "T": "plasticgun:titanium_alloy", + "C": "plasticgun:composite_frame", + "H": "plasticgun:hardened_steel", + "P": "plasticgun:precision_gear", + "I": "plasticgun:iron_shuriken" }, "result": { "id": "plasticgun:tokarev_tt_33", diff --git a/src/main/resources/data/plasticgun/recipe/trigger_mechanism.json b/src/main/resources/data/plasticgun/recipe/trigger_mechanism.json index 7f1b02d..991c56a 100644 --- a/src/main/resources/data/plasticgun/recipe/trigger_mechanism.json +++ b/src/main/resources/data/plasticgun/recipe/trigger_mechanism.json @@ -6,11 +6,11 @@ "IRI" ], "key": { - "I": { "item": "minecraft:iron_ingot" }, - "G": { "item": "plasticgun:precision_gear" }, - "C": { "item": "plasticgun:ceramic_plate" }, - "S": { "item": "minecraft:string" }, - "R": { "item": "plasticgun:reinforced_fiber" } + "I": "minecraft:iron_ingot", + "G": "plasticgun:precision_gear", + "C": "plasticgun:ceramic_plate", + "S": "minecraft:string", + "R": "plasticgun:reinforced_fiber" }, "result": { "id": "plasticgun:trigger_mechanism", diff --git a/src/main/resources/data/trinkets/entities/plasticgun.json b/src/main/resources/data/trinkets/entities/plasticgun.json deleted file mode 100644 index 48109c1..0000000 --- a/src/main/resources/data/trinkets/entities/plasticgun.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "entities": [ - "player" - ], - "slots": [ - "chest/vest" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/trinkets/slots/chest/vest.json b/src/main/resources/data/trinkets/slots/chest/vest.json deleted file mode 100644 index 2f9c51a..0000000 --- a/src/main/resources/data/trinkets/slots/chest/vest.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "amount": 1, - "order": 0, - "icon": "plasticgun:gui/slots/vest_slot" -} \ No newline at end of file diff --git a/src/main/resources/data/trinkets/tags/item/chest/vest.json b/src/main/resources/data/trinkets/tags/item/chest/vest.json deleted file mode 100644 index 7353e69..0000000 --- a/src/main/resources/data/trinkets/tags/item/chest/vest.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "replace": false, - "values": [ - "plasticgun:kevlar_vest", - "plasticgun:flak_vest" - ] -} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 56c4b3d..3717272 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -24,7 +24,6 @@ "depends": { "fabricloader": ">=${loader_version}", "fabric": "*", - "minecraft": ">=${minecraft_version}", - "trinkets": ">=${trinkets_version}" + "minecraft": ">=${minecraft_version}" } }