Add stuff

This commit is contained in:
Bruno Rybársky 2024-07-27 23:41:17 +02:00
parent e692223bc4
commit 2dcf3cc1ce
37 changed files with 18 additions and 71 deletions

@ -6,7 +6,7 @@ minecraft_version=1.21
yarn_mappings=1.21+build.9 yarn_mappings=1.21+build.9
loader_version=0.16.0 loader_version=0.16.0
# Mod Properties # Mod Properties
mod_version=1.3 mod_version=1.4
maven_group=systems.brn maven_group=systems.brn
archives_base_name=plasticgun archives_base_name=plasticgun
# Dependencies # Dependencies

@ -74,41 +74,30 @@ public class PlasticGun implements ModInitializer {
bullets.add(new BulletItem("force_container", 99, 0, 888, false, 0, 1)); bullets.add(new BulletItem("force_container", 99, 0, 888, false, 0, 1));
// Guns // Guns
guns.add(new Gun("357_revolver", 1, 8, 5, 6, 45, 357, 14, false, 0, 0)); guns.add(new Gun("357_revolver", 1, 8, 5, 6, 45, 357, 14, 0, 0));
guns.add(new Gun("colt_1903", 0.3, 10, 5, 8, 38, 32, 5, false, 0, 0)); guns.add(new Gun("colt_1903", 0.3, 10, 5, 8, 38, 32, 5, 0, 0));
guns.add(new Gun("colt_45", 0.4, 9, 5, 7, 48, 45, 5, false, 0, 0)); guns.add(new Gun("colt_45", 0.4, 9, 5, 7, 48, 45, 5, 0, 0));
guns.add(new Gun("colt_peacemaker", 0.6, 8, 5, 6, 43, 45, 5, false, 0, 0)); guns.add(new Gun("colt_peacemaker", 0.6, 8, 5, 6, 43, 45, 5, 0, 0));
guns.add(new Gun("p2022", 0.2, 12, 5, 10, 41, 9, 5, false, 0, 0)); guns.add(new Gun("p2022", 0.2, 12, 5, 10, 41, 9, 5, 0, 0));
guns.add(new Gun("snub_nosed_revolver", 0.4, 7, 3, 5, 36, 38, 14, false, 0, 0)); guns.add(new Gun("snub_nosed_revolver", 0.4, 7, 3, 5, 36, 38, 14, 0, 0));
guns.add(new Gun("tokarev_tt_33", 0.7, 10, 5, 8, 45, 762, 5, false, 0, 0)); guns.add(new Gun("tokarev_tt_33", 0.7, 10, 5, 8, 45, 762, 5, 0, 0));
guns.add(new Gun("ak_47", 0.2, 4, 5, 30, 45, 762, 0, false, 0, 0)); guns.add(new Gun("ak_47", 0.2, 4, 5, 30, 45, 762, 0, 0, 0));
guns.add(new Gun("awp", 1, 4, 20, 1, 75, 762, 20, true, 0, 0)); guns.add(new Gun("awp", 1, 4, 20, 1, 75, 762, 20, 0, 0));
guns.add(new Gun("rpg9", 2, 4, 20, 1, 10, 999, 8, false, 20, 0)); guns.add(new Gun("rpg9", 2, 4, 20, 1, 10, 999, 8, 20, 0));
guns.add(new Gun("forcegun", 0, 2, 5, 20, 10, 888, 0, false, 0, 20)); guns.add(new Gun("forcegun", 0, 2, 5, 20, 10, 888, 0, 0, 20));
grenades.add(new GrenadeItem("grenade_m67", 1, 6.5f, 0.5f, 60, false, true, 0, 0, 0, 10, 0)); // M67 Fragmentation Grenade
grenades.add(new GrenadeItem("grenade_mk2", 1, 7f, 0.5f, 60, false, true, 0, 0, 0, 10, 0)); // Mk 2 Fragmentation Grenade
grenades.add(new GrenadeItem("grenade_an_m14", 1, 5f, 0.5f, 40, true, false, 0, 0, 0, 8, 0)); // AN-M14 Incendiary Grenade grenades.add(new GrenadeItem("grenade_an_m14", 1, 5f, 0.5f, 40, true, false, 0, 0, 0, 8, 0)); // AN-M14 Incendiary Grenade
grenades.add(new GrenadeItem("grenade_m3d", 1, 10f, 0.5f, 60, true, true, 0, 0, 0, 10, 0)); // M34 White Phosphorus Incendiary Fragmentation Grenade grenades.add(new GrenadeItem("grenade_m34", 1, 10f, 0.5f, 60, true, true, 0, 0, 0, 10, 0)); // M34 White Phosphorus Incendiary Fragmentation Grenade
grenades.add(new GrenadeItem("grenade_m18", 1, 0.1f, 0.2f, 50, false, false, 0, 0, 100, 15, 0)); // M18 Smoke Grenadegrenades.add(new GrenadeItem("grenade_m84", 1, 0.5f, 0.2f, 120, false, false, 10, 10, 5, 12, 10)); // M84 Stun Grenade (Flashbang)
grenades.add(new GrenadeItem("grenade_m18", 1, 0.1f, 0.2f, 50, false, false, 0, 0, 100, 15, 0)); // M18 Smoke Grenade
grenades.add(new GrenadeItem("grenade_l109a1", 1, 6.5f, 0.5f, 60, false, true, 0, 0, 0, 10, 0)); // L109A1 Fragmentation Grenade
grenades.add(new GrenadeItem("grenade_m84", 1, 0.5f, 0.2f, 120, false, false, 10, 10, 5, 12, 10)); // M84 Stun Grenade (Flashbang)
grenades.add(new GrenadeItem("grenade_rgd_5", 1, 6.5f, 0.5f, 60, false, true, 0, 0, 0, 10, 0)); // RGD-5 Fragmentation Grenade grenades.add(new GrenadeItem("grenade_rgd_5", 1, 6.5f, 0.5f, 60, false, true, 0, 0, 0, 10, 0)); // RGD-5 Fragmentation Grenade
grenades.add(new GrenadeItem("grenade_thermite", 1, 4f, 0.3f, 80, true, false, 0, 0, 0, 8, 15)); // Thermite Grenade grenades.add(new GrenadeItem("grenade_thermite", 1, 4f, 0.3f, 80, true, false, 0, 0, 0, 8, 15)); // Thermite Grenade
grenades.add(new GrenadeItem("grenade_f1", 1, 7f, 0.5f, 60, false, true, 0, 0, 0, 10, 0)); // F1 Soviet Fragmentation Grenade grenades.add(new GrenadeItem("grenade_f1", 1, 7f, 0.5f, 60, false, true, 0, 0, 0, 10, 0)); // F1 Soviet Fragmentation Grenade
grenades.add(new GrenadeItem("grenade_mk3a2", 1, 6f, 0.4f, 60, false, false, 0, 0, 0, 10, 0)); // Mk3A2 Offensive Grenade grenades.add(new GrenadeItem("grenade_mk3a2", 1, 6f, 0.4f, 60, false, false, 0, 0, 0, 10, 0)); // Mk3A2 Offensive Grenade
grenades.add(new GrenadeItem("grenade_m7a3", 1, 0.1f, 0.2f, 90, false, false, 0, 0, 50, 8, 40)); // M7A3 CS Gas Grenade grenades.add(new GrenadeItem("grenade_m7a3", 1, 0.1f, 0.2f, 90, false, false, 0, 0, 50, 8, 40)); // M7A3 CS Gas Grenade
grenades.add(new GrenadeItem("grenade_no_69", 1, 5.5f, 0.4f, 60, false, false, 0, 0, 0, 10, 0)); // No. 69 British Offensive Grenade grenades.add(new GrenadeItem("grenade_no_69", 1, 5.5f, 0.4f, 60, false, false, 0, 0, 0, 10, 0)); // No. 69 British Offensive Grenade
grenades.add(new GrenadeItem("grenade_rgo", 1, 6.5f, 0.5f, 90, false, true, 0, 0, 0, 10, 0)); // RGO Fragmentation Grenade
grenades.add(new GrenadeItem("grenade_rgo", 1, 6.5f, 0.5f, 60, false, true, 0, 0, 0, 10, 0)); // RGO Fragmentation Grenade
grenades.add(new GrenadeItem("grenade_k417", 1, 7f, 0.5f, 70, false, true, 0, 0, 0, 10, 0)); // K417 Fragmentation Grenade grenades.add(new GrenadeItem("grenade_k417", 1, 7f, 0.5f, 70, false, true, 0, 0, 0, 10, 0)); // K417 Fragmentation Grenade

@ -40,9 +40,8 @@ public class Gun extends SimpleItem implements PolymerItem {
private final double repulsionPowerGun; private final double repulsionPowerGun;
private final int cooldownTarget; private final int cooldownTarget;
private final int reloadTarget; private final int reloadTarget;
private final boolean hasScope;
public Gun(String path, double damage, int reloadCount, int reloadTarget, int clipSize, int speed, int caliber, int cooldownTarget, boolean hasScope, double explosionPowerGun, double repulsionPowerGun) { public Gun(String path, double damage, int reloadCount, int reloadTarget, int clipSize, int speed, int caliber, int cooldownTarget, double explosionPowerGun, double repulsionPowerGun) {
super( super(
new Settings() new Settings()
.maxCount(1) .maxCount(1)
@ -50,7 +49,7 @@ public class Gun extends SimpleItem implements PolymerItem {
.component(GUN_COOLDOWN_COMPONENT, 0) .component(GUN_COOLDOWN_COMPONENT, 0)
.component(GUN_RELOAD_COOLDOWN_COMPONENT, 0) .component(GUN_RELOAD_COOLDOWN_COMPONENT, 0)
.maxDamage(clipSize + 1) .maxDamage(clipSize + 1)
, id(path), hasScope ? Items.SPYGLASS : Items.WOODEN_SWORD , id(path), Items.WOODEN_SWORD
); );
Registry.register(Registries.ITEM, id(path), this); Registry.register(Registries.ITEM, id(path), this);
this.damage = damage; this.damage = damage;
@ -69,7 +68,6 @@ public class Gun extends SimpleItem implements PolymerItem {
this.repulsionPowerGun = repulsionPowerGun; this.repulsionPowerGun = repulsionPowerGun;
this.cooldownTarget = cooldownTarget; this.cooldownTarget = cooldownTarget;
this.reloadTarget = reloadTarget + 1; this.reloadTarget = reloadTarget + 1;
this.hasScope = hasScope;
} }
public void reload(World world, PlayerEntity user, Hand hand) { public void reload(World world, PlayerEntity user, Hand hand) {
@ -153,9 +151,6 @@ public class Gun extends SimpleItem implements PolymerItem {
loreList.add(Text.translatable("gun.description.damage_absolute", damage)); loreList.add(Text.translatable("gun.description.damage_absolute", damage));
loreList.add(Text.translatable("gun.description.speed", speed)); loreList.add(Text.translatable("gun.description.speed", speed));
loreList.add(Text.translatable("gun.description.clip_size", clipSize)); loreList.add(Text.translatable("gun.description.clip_size", clipSize));
if (hasScope) {
loreList.add(Text.translatable("gun.description.has_scope"));
}
loreList.add(Text.translatable("gun.description.reload_cooldown", reloadTarget)); loreList.add(Text.translatable("gun.description.reload_cooldown", reloadTarget));
loreList.add(Text.translatable("gun.description.reload_cycles", reloadCount)); loreList.add(Text.translatable("gun.description.reload_cycles", reloadCount));
loreList.add(Text.translatable("gun.description.shoot_cooldown", cooldownTarget)); loreList.add(Text.translatable("gun.description.shoot_cooldown", cooldownTarget));

@ -31,7 +31,7 @@
"item.plasticgun.grenade_m67": "M67 Fragmentation Grenade", "item.plasticgun.grenade_m67": "M67 Fragmentation Grenade",
"item.plasticgun.grenade_mk2": "Mk 2 Fragmentation Grenade", "item.plasticgun.grenade_mk2": "Mk 2 Fragmentation Grenade",
"item.plasticgun.grenade_an_m14": "AN-M14 Incendiary Grenade", "item.plasticgun.grenade_an_m14": "AN-M14 Incendiary Grenade",
"item.plasticgun.grenade_m3d": "M34 White Phosphorus Incendiary Fragmentation Grenade", "item.plasticgun.grenade_m34": "M34 White Phosphorus Incendiary Fragmentation Grenade",
"item.plasticgun.grenade_m18": "M18 Smoke Grenade", "item.plasticgun.grenade_m18": "M18 Smoke Grenade",
"item.plasticgun.grenade_l109a1": "L109A1 Fragmentation Grenade", "item.plasticgun.grenade_l109a1": "L109A1 Fragmentation Grenade",
"item.plasticgun.grenade_m84": "M84 Stun Grenade (Flashbang)", "item.plasticgun.grenade_m84": "M84 Stun Grenade (Flashbang)",
@ -62,7 +62,6 @@
"gun.description.damage": "Damage: %d hp", "gun.description.damage": "Damage: %d hp",
"gun.description.speed": "Speed: %d b/t", "gun.description.speed": "Speed: %d b/t",
"gun.description.clip_size": "Magazine size: %d rounds", "gun.description.clip_size": "Magazine size: %d rounds",
"gun.description.has_scope": "Has scope",
"gun.description.reload_cooldown": "Reload cooldown: %d ticks", "gun.description.reload_cooldown": "Reload cooldown: %d ticks",
"gun.description.reload_cycles": "Reload cycles: %d clicks", "gun.description.reload_cycles": "Reload cycles: %d clicks",
"gun.description.shoot_cooldown": "Shooting cooldown: %d", "gun.description.shoot_cooldown": "Shooting cooldown: %d",

@ -1,6 +0,0 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "plasticgun:item/grenade"
}
}

@ -1,6 +0,0 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "plasticgun:item/grenade_incendiary"
}
}

@ -1,6 +0,0 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "plasticgun:item/grenade_l109a1"
}
}

@ -1,6 +0,0 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "plasticgun:item/grenade_m3d"
}
}

@ -1,6 +0,0 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "plasticgun:item/grenade_mk2"
}
}

@ -1,6 +0,0 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "plasticgun:item/shuriken"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B