Update
This commit is contained in:
@@ -122,17 +122,17 @@ 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, 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
|
||||
guns.add(new Gun("colt_45", 0.4, 9, 5, 7, 48, 45, 10, 0, 0, 1.5f, 2, 0.15f, 0.4f, -1, 1)); // 3.6
|
||||
guns.add(new Gun("snub_nosed_revolver", 0.4, 7, 3, 5, 36, 38, 20, 0, 0, 1f, 2, 0.2f, 0.45f, -1, 1)); // 2.8
|
||||
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, 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
|
||||
guns.add(new Gun("forcegun", 0, 4, 5, 10, 10, 888, 5, 0, 10, 0f, 0f, 0f, 1f, 0, 0)); // 0
|
||||
guns.add(new Gun("p2022", 0.2, 12, 5, 10, 41, 9, 10, 0, 0, 0f, 0.7f, 0.1f, 0.25f, -0.2, 0.2)); // 1.8
|
||||
guns.add(new Gun("colt_1903", 0.3, 10, 5, 8, 38, 32, 10, 0, 0, 0, 0.5f, 0.1f, 0.3f, -0.2, 0.2)); // 3
|
||||
guns.add(new Gun("ak_47", 0.2, 4, 5, 30, 45, 762, 0, 0, 0, 0.1f, 0.3f, 0.2f, 0.3f, -0.2, 0.2)); // 9
|
||||
guns.add(new Gun("colt_45", 0.4, 9, 5, 7, 48, 45, 10, 0, 0, 0, 0.5f, 0.15f, 0.4f, -0.2, 0.2)); // 3.6
|
||||
guns.add(new Gun("snub_nosed_revolver", 0.4, 7, 3, 5, 36, 38, 20, 0, 0, 0f, 0.4f, 0.2f, 0.45f, -0.2, 0.2)); // 2.8
|
||||
guns.add(new Gun("colt_peacemaker", 0.6, 8, 5, 6, 43, 45, 10, 0, 0, 0, 1, 0.2f, 0.5f, -0.2, 0.2)); // 4.8
|
||||
guns.add(new Gun("tokarev_tt_33", 0.7, 10, 5, 8, 45, 762, 10, 0, 0, 0, 2f, 0.25f, 0.5f, -0.2, 0.2)); // 7
|
||||
guns.add(new Gun("357_revolver", 1, 8, 5, 6, 45, 357, 20, 0, 0, 2, 3, 0.2f, 0.5f, -0.2, 0.2)); // 8
|
||||
guns.add(new Gun("awp", 1, 4, 20, 1, 75, 762, 40, 0, 0, 4f, 6f, 0.3f, 0.6f, -2, 2)); // 4
|
||||
guns.add(new Gun("rpg9", 2, 4, 20, 1, 10, 999, 20, 10, 0, 2f, 4f, 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
|
||||
|
@@ -30,10 +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 java.lang.Math.*;
|
||||
import static systems.brn.plasticgun.PlasticGun.*;
|
||||
import static systems.brn.plasticgun.lib.GunComponents.*;
|
||||
import static systems.brn.plasticgun.lib.Util.*;
|
||||
|
||||
@@ -81,12 +79,21 @@ public class Gun extends SimpleItem implements PolymerItem {
|
||||
.maxDamage(clipSize + 1)
|
||||
, id(path), Items.WOODEN_SWORD
|
||||
);
|
||||
this.verticalRecoilMin = verticalRecoilMin;
|
||||
this.verticalRecoilMax = verticalRecoilMax;
|
||||
this.verticalRecoilMin = verticalRecoilMin / 10f;
|
||||
this.verticalRecoilMax = verticalRecoilMax / 10f;
|
||||
this.velocityRecoilMin = velocityRecoilMin;
|
||||
this.velocityRecoilMax = velocityRecoilMax;
|
||||
this.horizontalRecoilMin = horizontalRecoilMin;
|
||||
this.horizontalRecoilMax = horizontalRecoilMax;
|
||||
this.horizontalRecoilMin = horizontalRecoilMin / 10f;
|
||||
this.horizontalRecoilMax = horizontalRecoilMax / 10f;
|
||||
if (verticalRecoilMin > verticalRecoilMax) {
|
||||
logger.error("verticalRecoilMin > verticalRecoilMax for {}", path);
|
||||
}
|
||||
if (horizontalRecoilMin > horizontalRecoilMax) {
|
||||
logger.error("horizontalRecoilMin > horizontalRecoilMax for {}", path);
|
||||
}
|
||||
if (velocityRecoilMin > velocityRecoilMax) {
|
||||
logger.error("velocityRecoilMin > velocityRecoilMax for {}", path);
|
||||
}
|
||||
Registry.register(Registries.ITEM, id(path), this);
|
||||
this.damage = damage;
|
||||
this.reloadCount = reloadCount;
|
||||
|
@@ -2,6 +2,7 @@ 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.extras.api.ResourcePackExtras;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.Identifier;
|
||||
import xyz.nucleoid.packettweaker.PacketContext;
|
||||
@@ -13,7 +14,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 = identifier.withPath("item/" + identifier.getPath());
|
||||
this.polymerModel = identifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user