重制武器重量系统,手持武器移动速度、切换速度和瞄准速度与重量相关,暂时移除次元弹匣模组,添加了AK12的部分配件
This commit is contained in:
parent
8a01cc63f5
commit
23c15eb527
87 changed files with 2981 additions and 2367 deletions
|
@ -1,4 +1,4 @@
|
||||||
// 1.20.1 2024-10-14T03:00:24.7918407 Tags for minecraft:item mod id superbwarfare
|
// 1.20.1 2024-10-20T16:11:59.726701 Tags for minecraft:item mod id superbwarfare
|
||||||
cf8d49a8d2872286d1a9c3d4a7e1c2b7690db0b8 data/forge/tags/items/dusts.json
|
cf8d49a8d2872286d1a9c3d4a7e1c2b7690db0b8 data/forge/tags/items/dusts.json
|
||||||
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/forge/tags/items/dusts/coal_coke.json
|
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/forge/tags/items/dusts/coal_coke.json
|
||||||
295ddf906b7133a0558d03e9a60eea18281fe430 data/forge/tags/items/dusts/iron.json
|
295ddf906b7133a0558d03e9a60eea18281fe430 data/forge/tags/items/dusts/iron.json
|
||||||
|
@ -27,6 +27,7 @@ af6fd64b4a685c353f243763db268f7b2304c009 data/forge/tags/items/storage_blocks/le
|
||||||
3743c2790deca7e779d3e4b82f092de39b446988 data/forge/tags/items/storage_blocks/steel.json
|
3743c2790deca7e779d3e4b82f092de39b446988 data/forge/tags/items/storage_blocks/steel.json
|
||||||
144e54d908121dee498b2ebba3b24b09fd6f18d9 data/forge/tags/items/storage_blocks/tungsten.json
|
144e54d908121dee498b2ebba3b24b09fd6f18d9 data/forge/tags/items/storage_blocks/tungsten.json
|
||||||
4d4dfd25a2a749e000e1bb742c2f984d4e094e5d data/superbwarfare/tags/items/cannot_reload.json
|
4d4dfd25a2a749e000e1bb742c2f984d4e094e5d data/superbwarfare/tags/items/cannot_reload.json
|
||||||
|
5e4b48e22d53f009abdfe557e5911c728ba5f715 data/superbwarfare/tags/items/can_custom_gun.json
|
||||||
dff9ff6d6637951191906cb55a210ae5a3ad5cd6 data/superbwarfare/tags/items/extra_one_ammo.json
|
dff9ff6d6637951191906cb55a210ae5a3ad5cd6 data/superbwarfare/tags/items/extra_one_ammo.json
|
||||||
52598e22974c8da0d2852defe4c9005e1d67744b data/superbwarfare/tags/items/gun.json
|
52598e22974c8da0d2852defe4c9005e1d67744b data/superbwarfare/tags/items/gun.json
|
||||||
62eb408544731ce4cfcd119d8a6cc74731189ac0 data/superbwarfare/tags/items/handgun.json
|
62eb408544731ce4cfcd119d8a6cc74731189ac0 data/superbwarfare/tags/items/handgun.json
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"superbwarfare:ak_12"
|
||||||
|
]
|
||||||
|
}
|
|
@ -78,44 +78,59 @@ public class AK12ItemRenderer extends GeoItemRenderer<AK12Item> {
|
||||||
bone.setHidden(this.hiddenBones.contains(name));
|
bone.setHidden(this.hiddenBones.contains(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name.equals("flare")) {
|
Player player_ = Minecraft.getInstance().player;
|
||||||
Player player = Minecraft.getInstance().player;
|
if (player_ != null) {
|
||||||
ItemStack itemStack = null;
|
ItemStack itemStack = player_.getMainHandItem();
|
||||||
if (player != null) {
|
|
||||||
itemStack = player.getMainHandItem();
|
if (name.equals("holo")) {
|
||||||
}
|
|
||||||
if (itemStack != null && itemStack.getOrCreateTag().getDouble("flash_time") > 0) {
|
|
||||||
bone.setHidden(false);
|
|
||||||
bone.setScaleX((float) (0.75 + 0.5 * (Math.random() - 0.5)));
|
|
||||||
bone.setScaleY((float) (0.75 + 0.5 * (Math.random() - 0.5)));
|
|
||||||
bone.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
|
||||||
} else {
|
|
||||||
bone.setHidden(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name.equals("holo")) {
|
|
||||||
Player player = Minecraft.getInstance().player;
|
|
||||||
ItemStack itemStack = null;
|
|
||||||
if (player != null) {
|
|
||||||
itemStack = player.getMainHandItem();
|
|
||||||
}
|
|
||||||
if (player != null) {
|
|
||||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden")
|
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden")
|
||||||
|| GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS
|
|| GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS
|
||||||
|| itemStack.getOrCreateTag().getInt("scope_type") != 1);
|
|| itemStack.getOrCreateTag().getInt("scope_type") != 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (name.equals("okp")) {
|
if (name.equals("flare")) {
|
||||||
Player player = Minecraft.getInstance().player;
|
if (itemStack.getOrCreateTag().getInt("barrel_type") == 1) {
|
||||||
ItemStack itemStack = null;
|
bone.setPosZ(2.25f);
|
||||||
if (player != null) {
|
}
|
||||||
itemStack = player.getMainHandItem();
|
if (itemStack.getOrCreateTag().getDouble("flash_time") == 0 || itemStack.getOrCreateTag().getInt("barrel_type") == 2) {
|
||||||
|
bone.setHidden(true);
|
||||||
|
} else {
|
||||||
|
bone.setHidden(false);
|
||||||
|
bone.setScaleX((float) (0.75 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
bone.setScaleY((float) (0.75 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
bone.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (player != null) {
|
|
||||||
|
if (name.equals("okp")) {
|
||||||
bone.setHidden(itemStack.getOrCreateTag().getInt("scope_type") != 1);
|
bone.setHidden(itemStack.getOrCreateTag().getInt("scope_type") != 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name.equals("normalmag")) {
|
||||||
|
bone.setHidden(itemStack.getOrCreateTag().getInt("magazine_type") != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (name.equals("extendmag")) {
|
||||||
|
bone.setHidden(itemStack.getOrCreateTag().getInt("magazine_type") != 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (name.equals("drum")) {
|
||||||
|
bone.setHidden(itemStack.getOrCreateTag().getInt("magazine_type") != 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (name.equals("oringinbarrel")) {
|
||||||
|
bone.setHidden(itemStack.getOrCreateTag().getInt("barrel_type") != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (name.equals("huomao")) {
|
||||||
|
bone.setHidden(itemStack.getOrCreateTag().getInt("barrel_type") != 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (name.equals("sup")) {
|
||||||
|
bone.setHidden(itemStack.getOrCreateTag().getInt("barrel_type") != 2);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,36 +64,54 @@ public class ModItemTagProvider extends ItemTagsProvider {
|
||||||
this.tag(forgeTag("plates/copper")).add(ModItems.COPPER_PLATE.get());
|
this.tag(forgeTag("plates/copper")).add(ModItems.COPPER_PLATE.get());
|
||||||
|
|
||||||
ModItems.GUNS.getEntries().forEach(registryObject -> this.tag(ModTags.Items.GUN).add(registryObject.get()));
|
ModItems.GUNS.getEntries().forEach(registryObject -> this.tag(ModTags.Items.GUN).add(registryObject.get()));
|
||||||
|
|
||||||
this.tag(ModTags.Items.SMG).add(ModItems.VECTOR.get());
|
this.tag(ModTags.Items.SMG).add(ModItems.VECTOR.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.HANDGUN).add(ModItems.TRACHELIUM.get(), ModItems.GLOCK_17.get(), ModItems.GLOCK_18.get(), ModItems.M_1911.get());
|
this.tag(ModTags.Items.HANDGUN).add(ModItems.TRACHELIUM.get(), ModItems.GLOCK_17.get(), ModItems.GLOCK_18.get(), ModItems.M_1911.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.RIFLE).add(ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.SKS.get(),
|
this.tag(ModTags.Items.RIFLE).add(ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.SKS.get(),
|
||||||
ModItems.MK_14.get(), ModItems.MARLIN.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.QBZ_95.get());
|
ModItems.MK_14.get(), ModItems.MARLIN.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.QBZ_95.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.SNIPER_RIFLE).add(ModItems.HUNTING_RIFLE.get(), ModItems.NTW_20.get(), ModItems.SENTINEL.get(),
|
this.tag(ModTags.Items.SNIPER_RIFLE).add(ModItems.HUNTING_RIFLE.get(), ModItems.NTW_20.get(), ModItems.SENTINEL.get(),
|
||||||
ModItems.SVD.get(), ModItems.M_98B.get(), ModItems.K_98.get(), ModItems.MOSIN_NAGANT.get());
|
ModItems.SVD.get(), ModItems.M_98B.get(), ModItems.K_98.get(), ModItems.MOSIN_NAGANT.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.SHOTGUN).add(ModItems.ABEKIRI.get(), ModItems.M_870.get(), ModItems.AA_12.get());
|
this.tag(ModTags.Items.SHOTGUN).add(ModItems.ABEKIRI.get(), ModItems.M_870.get(), ModItems.AA_12.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.MACHINE_GUN).add(ModItems.MINIGUN.get(), ModItems.DEVOTION.get(), ModItems.RPK.get(), ModItems.M_60.get());
|
this.tag(ModTags.Items.MACHINE_GUN).add(ModItems.MINIGUN.get(), ModItems.DEVOTION.get(), ModItems.RPK.get(), ModItems.M_60.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.NORMAL_GUN).add(ModItems.ABEKIRI.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.SVD.get(), ModItems.M_60.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),
|
this.tag(ModTags.Items.NORMAL_GUN).add(ModItems.ABEKIRI.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.SVD.get(), ModItems.M_60.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),
|
||||||
ModItems.SKS.get(), ModItems.RPK.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(), ModItems.DEVOTION.get(), ModItems.TRACHELIUM.get(),
|
ModItems.SKS.get(), ModItems.RPK.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(), ModItems.DEVOTION.get(), ModItems.TRACHELIUM.get(),
|
||||||
ModItems.HUNTING_RIFLE.get(), ModItems.NTW_20.get(), ModItems.M_98B.get(), ModItems.SENTINEL.get(), ModItems.M_870.get(), ModItems.MARLIN.get(), ModItems.GLOCK_17.get(),
|
ModItems.HUNTING_RIFLE.get(), ModItems.NTW_20.get(), ModItems.M_98B.get(), ModItems.SENTINEL.get(), ModItems.M_870.get(), ModItems.MARLIN.get(), ModItems.GLOCK_17.get(),
|
||||||
ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.QBZ_95.get(), ModItems.K_98.get(), ModItems.MOSIN_NAGANT.get());
|
ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.QBZ_95.get(), ModItems.K_98.get(), ModItems.MOSIN_NAGANT.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.OPEN_BOLT).add(ModItems.ABEKIRI.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.SVD.get(), ModItems.M_60.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),
|
this.tag(ModTags.Items.OPEN_BOLT).add(ModItems.ABEKIRI.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.SVD.get(), ModItems.M_60.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),
|
||||||
ModItems.SKS.get(), ModItems.RPK.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(), ModItems.DEVOTION.get(), ModItems.NTW_20.get(),
|
ModItems.SKS.get(), ModItems.RPK.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(), ModItems.DEVOTION.get(), ModItems.NTW_20.get(),
|
||||||
ModItems.M_98B.get(), ModItems.SENTINEL.get(), ModItems.GLOCK_17.get(), ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.QBZ_95.get());
|
ModItems.M_98B.get(), ModItems.SENTINEL.get(), ModItems.GLOCK_17.get(), ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.QBZ_95.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.USE_HANDGUN_AMMO).add(ModItems.TRACHELIUM.get(), ModItems.GLOCK_17.get(), ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.VECTOR.get());
|
this.tag(ModTags.Items.USE_HANDGUN_AMMO).add(ModItems.TRACHELIUM.get(), ModItems.GLOCK_17.get(), ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.VECTOR.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.USE_RIFLE_AMMO).add(ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.SKS.get(), ModItems.MINIGUN.get(), ModItems.DEVOTION.get(), ModItems.M_60.get(),
|
this.tag(ModTags.Items.USE_RIFLE_AMMO).add(ModItems.M_4.get(), ModItems.HK_416.get(), ModItems.SKS.get(), ModItems.MINIGUN.get(), ModItems.DEVOTION.get(), ModItems.M_60.get(),
|
||||||
ModItems.MK_14.get(), ModItems.MARLIN.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.QBZ_95.get(), ModItems.RPK.get());
|
ModItems.MK_14.get(), ModItems.MARLIN.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.QBZ_95.get(), ModItems.RPK.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.USE_SHOTGUN_AMMO).add(ModItems.ABEKIRI.get(), ModItems.M_870.get(), ModItems.AA_12.get());
|
this.tag(ModTags.Items.USE_SHOTGUN_AMMO).add(ModItems.ABEKIRI.get(), ModItems.M_870.get(), ModItems.AA_12.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.USE_SNIPER_AMMO).add(ModItems.HUNTING_RIFLE.get(), ModItems.NTW_20.get(), ModItems.SENTINEL.get(),
|
this.tag(ModTags.Items.USE_SNIPER_AMMO).add(ModItems.HUNTING_RIFLE.get(), ModItems.NTW_20.get(), ModItems.SENTINEL.get(),
|
||||||
ModItems.SVD.get(), ModItems.M_98B.get(), ModItems.K_98.get(), ModItems.MOSIN_NAGANT.get());
|
ModItems.SVD.get(), ModItems.M_98B.get(), ModItems.K_98.get(), ModItems.MOSIN_NAGANT.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.LAUNCHER).add(ModItems.M_79.get(), ModItems.RPG.get(), ModItems.JAVELIN.get());
|
this.tag(ModTags.Items.LAUNCHER).add(ModItems.M_79.get(), ModItems.RPG.get(), ModItems.JAVELIN.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.CANNOT_RELOAD).add(ModItems.MINIGUN.get(), ModItems.BOCEK.get());
|
this.tag(ModTags.Items.CANNOT_RELOAD).add(ModItems.MINIGUN.get(), ModItems.BOCEK.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.IS_AUTO_WEAPON).add(ModItems.AA_12.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(),
|
this.tag(ModTags.Items.IS_AUTO_WEAPON).add(ModItems.AA_12.get(), ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(),
|
||||||
ModItems.QBZ_95.get(), ModItems.MK_14.get(), ModItems.AA_12.get(), ModItems.GLOCK_18.get(), ModItems.VECTOR.get(), ModItems.AA_12.get(), ModItems.MINIGUN.get(),
|
ModItems.QBZ_95.get(), ModItems.MK_14.get(), ModItems.AA_12.get(), ModItems.GLOCK_18.get(), ModItems.VECTOR.get(), ModItems.AA_12.get(), ModItems.MINIGUN.get(),
|
||||||
ModItems.DEVOTION.get(), ModItems.M_60.get(), ModItems.RPK.get());
|
ModItems.DEVOTION.get(), ModItems.M_60.get(), ModItems.RPK.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.EXTRA_ONE_AMMO).add(ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.SVD.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),ModItems.SKS.get(),
|
this.tag(ModTags.Items.EXTRA_ONE_AMMO).add(ModItems.AK_47.get(), ModItems.AK_12.get(), ModItems.SVD.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),ModItems.SKS.get(),
|
||||||
ModItems.RPK.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(), ModItems.DEVOTION.get(),ModItems.NTW_20.get(), ModItems.M_98B.get(),
|
ModItems.RPK.get(), ModItems.HK_416.get(), ModItems.AA_12.get(), ModItems.M_4.get(), ModItems.DEVOTION.get(),ModItems.NTW_20.get(), ModItems.M_98B.get(),
|
||||||
ModItems.SENTINEL.get(), ModItems.GLOCK_17.get(),ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.QBZ_95.get());
|
ModItems.SENTINEL.get(), ModItems.GLOCK_17.get(),ModItems.GLOCK_18.get(), ModItems.M_1911.get(), ModItems.QBZ_95.get());
|
||||||
|
|
||||||
|
this.tag(ModTags.Items.CAN_CUSTOM_GUN).add(ModItems.AK_12.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.MILITARY_ARMOR).add(ModItems.RU_CHEST_6B43.get(), ModItems.US_CHEST_IOTV.get());
|
this.tag(ModTags.Items.MILITARY_ARMOR).add(ModItems.RU_CHEST_6B43.get(), ModItems.US_CHEST_IOTV.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,17 +192,9 @@ public class ClientEventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开火部分
|
// 开火部分
|
||||||
double weight = stack.getOrCreateTag().getDouble("weight");
|
double weight = stack.getOrCreateTag().getDouble("weight") + stack.getOrCreateTag().getDouble("custom_weight");
|
||||||
|
|
||||||
double speed = 1;
|
double speed = 1 - (0.04 * weight);
|
||||||
|
|
||||||
if (weight == 0) {
|
|
||||||
speed = 1.05;
|
|
||||||
} else if (weight == 1) {
|
|
||||||
speed = 0.85;
|
|
||||||
} else if (weight == 2) {
|
|
||||||
speed = 0.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player.getPersistentData().getDouble("noRun") == 0 && player.isSprinting() && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS) {
|
if (player.getPersistentData().getDouble("noRun") == 0 && player.isSprinting() && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS) {
|
||||||
cantFireTime = Mth.clamp(cantFireTime + 3 * times, 0, 24);
|
cantFireTime = Mth.clamp(cantFireTime + 3 * times, 0, 24);
|
||||||
|
@ -490,7 +482,10 @@ public class ClientEventHandler {
|
||||||
if (!(entity instanceof Player player)) return;
|
if (!(entity instanceof Player player)) return;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
float times = 5 * Minecraft.getInstance().getDeltaFrameTime();
|
float times = 5 * Minecraft.getInstance().getDeltaFrameTime();
|
||||||
double speed = stack.getOrCreateTag().getDouble("zoom_speed");
|
|
||||||
|
double weight = stack.getOrCreateTag().getDouble("weight") + stack.getOrCreateTag().getDouble("custom_weight");
|
||||||
|
double speed = 1.5 - (0.07 * weight);
|
||||||
|
|
||||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS
|
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS
|
||||||
&& !notInGame()
|
&& !notInGame()
|
||||||
&& drawTime < 0.01
|
&& drawTime < 0.01
|
||||||
|
@ -618,8 +613,21 @@ public class ClientEventHandler {
|
||||||
|
|
||||||
CompoundTag tag = player.getMainHandItem().getOrCreateTag();
|
CompoundTag tag = player.getMainHandItem().getOrCreateTag();
|
||||||
float times = (float) Math.min(Minecraft.getInstance().getDeltaFrameTime(), 1.6);
|
float times = (float) Math.min(Minecraft.getInstance().getDeltaFrameTime(), 1.6);
|
||||||
|
int barrelType = tag.getInt("barrel_type");
|
||||||
|
|
||||||
|
double recoil = 1.8;
|
||||||
|
|
||||||
|
if (barrelType == 1) {
|
||||||
|
recoil = 0.7;
|
||||||
|
} else if (barrelType == 2) {
|
||||||
|
recoil = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
float gunRecoilX = (float) tag.getDouble("recoil_x") * 60;
|
float gunRecoilX = (float) tag.getDouble("recoil_x") * 60;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (recoilHorizon > 0) {
|
if (recoilHorizon > 0) {
|
||||||
recoilHorizon = recoilHorizon - Math.min(Math.pow(recoilHorizon, 2), 6) * times + recoilY;
|
recoilHorizon = recoilHorizon - Math.min(Math.pow(recoilHorizon, 2), 6) * times + recoilY;
|
||||||
} else {
|
} else {
|
||||||
|
@ -640,14 +648,14 @@ public class ClientEventHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float newYaw = player.getYRot() - (float) (0.6 * recoilHorizon * pose * times * (0.5 + fireSpread));
|
float newYaw = player.getYRot() - (float) (0.6 * recoilHorizon * pose * times * (0.5 + fireSpread) * recoil);
|
||||||
player.setYRot(newYaw);
|
player.setYRot(newYaw);
|
||||||
player.yRotO = player.getYRot();
|
player.yRotO = player.getYRot();
|
||||||
|
|
||||||
double sinRes = 0;
|
double sinRes = 0;
|
||||||
|
|
||||||
if (0 < recoilTime && recoilTime < 0.5) {
|
if (0 < recoilTime && recoilTime < 0.5) {
|
||||||
float newPitch = player.getXRot() - 0.02f * gunRecoilX * times;
|
float newPitch = (float) (player.getXRot() - 0.02f * gunRecoilX * times * recoil);
|
||||||
player.setXRot(newPitch);
|
player.setXRot(newPitch);
|
||||||
player.xRotO = player.getXRot();
|
player.xRotO = player.getXRot();
|
||||||
}
|
}
|
||||||
|
@ -663,7 +671,7 @@ public class ClientEventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 < recoilTime && recoilTime < 2.5) {
|
if (0 < recoilTime && recoilTime < 2.5) {
|
||||||
float newPitch = player.getXRot() - (float) (1.5 * pose * gunRecoilX * (sinRes + Mth.clamp(0.5 - recoilTime, 0, 0.5)) * times * (0.5 + fireSpread));
|
float newPitch = player.getXRot() - (float) (1.5 * pose * gunRecoilX * (sinRes + Mth.clamp(0.5 - recoilTime, 0, 0.5)) * times * (0.5 + fireSpread) * recoil);
|
||||||
player.setXRot(newPitch);
|
player.setXRot(newPitch);
|
||||||
player.xRotO = player.getXRot();
|
player.xRotO = player.getXRot();
|
||||||
}
|
}
|
||||||
|
@ -842,16 +850,9 @@ public class ClientEventHandler {
|
||||||
private static void handleWeaponDraw(LivingEntity entity) {
|
private static void handleWeaponDraw(LivingEntity entity) {
|
||||||
float times = Minecraft.getInstance().getDeltaFrameTime();
|
float times = Minecraft.getInstance().getDeltaFrameTime();
|
||||||
ItemStack stack = entity.getMainHandItem();
|
ItemStack stack = entity.getMainHandItem();
|
||||||
double weight = stack.getOrCreateTag().getDouble("weight");
|
double weight = stack.getOrCreateTag().getDouble("weight") + stack.getOrCreateTag().getDouble("custom_weight");
|
||||||
double speed = 1;
|
|
||||||
|
|
||||||
if (weight == 0) {
|
double speed = 3.2 - (0.13 * weight);
|
||||||
speed = 3;
|
|
||||||
} else if (weight == 1) {
|
|
||||||
speed = 2;
|
|
||||||
} else if (weight == 2) {
|
|
||||||
speed = 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
drawTime = Math.max(drawTime - Math.max(0.2 * speed * times * drawTime, 0.0008), 0);
|
drawTime = Math.max(drawTime - Math.max(0.2 * speed * times * drawTime, 0.0008), 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,24 +150,27 @@ public class GunEventHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundEvent sound1p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_fire_1p"));
|
float soundRadius = (float) (stack.getOrCreateTag().getDouble("SoundRadius") * stack.getOrCreateTag().getDouble("CustomSoundRadius"));
|
||||||
|
|
||||||
|
|
||||||
|
SoundEvent sound1p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + (stack.getOrCreateTag().getInt("barrel_type") == 2 ? "_fire_1p_s" : "_fire_1p")));
|
||||||
if (sound1p != null && player instanceof ServerPlayer serverPlayer) {
|
if (sound1p != null && player instanceof ServerPlayer serverPlayer) {
|
||||||
SoundTool.playLocalSound(serverPlayer, sound1p, 2f, 1f);
|
SoundTool.playLocalSound(serverPlayer, sound1p, 2f, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundEvent sound3p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_fire_3p"));
|
SoundEvent sound3p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + (stack.getOrCreateTag().getInt("barrel_type") == 2 ? "_fire_3p_s" : "_fire_3p")));
|
||||||
if (sound3p != null) {
|
if (sound3p != null) {
|
||||||
player.level().playSound(null, player.getOnPos(), sound3p, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius") * 0.2f, 1f);
|
player.level().playSound(null, player.getOnPos(), sound3p, SoundSource.PLAYERS, soundRadius * 0.2f, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundEvent soundFar = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_far"));
|
SoundEvent soundFar = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + (stack.getOrCreateTag().getInt("barrel_type") == 2 ? "_far_s" : "_far")));
|
||||||
if (soundFar != null) {
|
if (soundFar != null) {
|
||||||
player.level().playSound(null, player.getOnPos(), soundFar, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius") * 0.5f, 1f);
|
player.level().playSound(null, player.getOnPos(), soundFar, SoundSource.PLAYERS, soundRadius * 0.5f, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundEvent soundVeryFar = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_veryfar"));
|
SoundEvent soundVeryFar = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + (stack.getOrCreateTag().getInt("barrel_type") == 2 ? "_veryfar_s" : "_veryfar")));
|
||||||
if (soundVeryFar != null) {
|
if (soundVeryFar != null) {
|
||||||
player.level().playSound(null, player.getOnPos(), soundVeryFar, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius"), 1f);
|
player.level().playSound(null, player.getOnPos(), soundVeryFar, SoundSource.PLAYERS, soundRadius, 1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class ModPerks {
|
||||||
public static final RegistryObject<Perk> SUBSISTENCE = FUNC_PERKS.register("subsistence", () -> new Perk("subsistence", Perk.Type.FUNCTIONAL));
|
public static final RegistryObject<Perk> SUBSISTENCE = FUNC_PERKS.register("subsistence", () -> new Perk("subsistence", Perk.Type.FUNCTIONAL));
|
||||||
public static final RegistryObject<Perk> FIELD_DOCTOR = FUNC_PERKS.register("field_doctor", () -> new Perk("field_doctor", Perk.Type.FUNCTIONAL));
|
public static final RegistryObject<Perk> FIELD_DOCTOR = FUNC_PERKS.register("field_doctor", () -> new Perk("field_doctor", Perk.Type.FUNCTIONAL));
|
||||||
public static final RegistryObject<Perk> SUPER_RECHARGE = FUNC_PERKS.register("super_recharge", () -> new Perk("super_recharge", Perk.Type.FUNCTIONAL));
|
public static final RegistryObject<Perk> SUPER_RECHARGE = FUNC_PERKS.register("super_recharge", () -> new Perk("super_recharge", Perk.Type.FUNCTIONAL));
|
||||||
public static final RegistryObject<Perk> DIMENSION_MAGAZINE = FUNC_PERKS.register("dimension_magazine", () -> new Perk("dimension_magazine", Perk.Type.FUNCTIONAL));
|
// public static final RegistryObject<Perk> DIMENSION_MAGAZINE = FUNC_PERKS.register("dimension_magazine", () -> new Perk("dimension_magazine", Perk.Type.FUNCTIONAL));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Damage Perks
|
* Damage Perks
|
||||||
|
|
|
@ -77,8 +77,12 @@ public class ModSounds {
|
||||||
|
|
||||||
public static final RegistryObject<SoundEvent> AK_12_FIRE_1P = REGISTRY.register("ak_12_fire_1p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_fire_1p")));
|
public static final RegistryObject<SoundEvent> AK_12_FIRE_1P = REGISTRY.register("ak_12_fire_1p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_fire_1p")));
|
||||||
public static final RegistryObject<SoundEvent> AK_12_FIRE_3P = REGISTRY.register("ak_12_fire_3p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_fire_3p")));
|
public static final RegistryObject<SoundEvent> AK_12_FIRE_3P = REGISTRY.register("ak_12_fire_3p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_fire_3p")));
|
||||||
|
public static final RegistryObject<SoundEvent> AK_12_FIRE_1P_S = REGISTRY.register("ak_12_fire_1p_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_fire_1p_s")));
|
||||||
|
public static final RegistryObject<SoundEvent> AK_12_FIRE_3P_S = REGISTRY.register("ak_12_fire_3p_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_fire_3p_s")));
|
||||||
public static final RegistryObject<SoundEvent> AK_12_FAR = REGISTRY.register("ak_12_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_far")));
|
public static final RegistryObject<SoundEvent> AK_12_FAR = REGISTRY.register("ak_12_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_far")));
|
||||||
public static final RegistryObject<SoundEvent> AK_12_VERYFAR = REGISTRY.register("ak_12_veryfar", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_veryfar")));
|
public static final RegistryObject<SoundEvent> AK_12_VERYFAR = REGISTRY.register("ak_12_veryfar", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_veryfar")));
|
||||||
|
public static final RegistryObject<SoundEvent> AK_12_FAR_S = REGISTRY.register("ak_12_far_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_far_s")));
|
||||||
|
public static final RegistryObject<SoundEvent> AK_12_VERYFAR_S = REGISTRY.register("ak_12_veryfar_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_veryfar_s")));
|
||||||
public static final RegistryObject<SoundEvent> AK_12_RELOAD_NORMAL = REGISTRY.register("ak_12_reload_normal", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_reload_normal")));
|
public static final RegistryObject<SoundEvent> AK_12_RELOAD_NORMAL = REGISTRY.register("ak_12_reload_normal", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_reload_normal")));
|
||||||
public static final RegistryObject<SoundEvent> AK_12_RELOAD_EMPTY = REGISTRY.register("ak_12_reload_empty", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_reload_empty")));
|
public static final RegistryObject<SoundEvent> AK_12_RELOAD_EMPTY = REGISTRY.register("ak_12_reload_empty", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_reload_empty")));
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class ModTags {
|
||||||
public static final TagKey<Item> OPEN_BOLT = tag("open_bolt");
|
public static final TagKey<Item> OPEN_BOLT = tag("open_bolt");
|
||||||
public static final TagKey<Item> CANNOT_RELOAD = tag("cannot_reload");
|
public static final TagKey<Item> CANNOT_RELOAD = tag("cannot_reload");
|
||||||
public static final TagKey<Item> IS_AUTO_WEAPON = tag("is_auto_weapon");
|
public static final TagKey<Item> IS_AUTO_WEAPON = tag("is_auto_weapon");
|
||||||
|
public static final TagKey<Item> CAN_CUSTOM_GUN = tag("can_custom_gun");
|
||||||
|
|
||||||
public static final TagKey<Item> MILITARY_ARMOR = tag("military_armor");
|
public static final TagKey<Item> MILITARY_ARMOR = tag("military_armor");
|
||||||
public static final TagKey<Item> MILITARY_ARMOR_HEAVY = tag("military_armor_heavy");
|
public static final TagKey<Item> MILITARY_ARMOR_HEAVY = tag("military_armor_heavy");
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package net.mcreator.superbwarfare.item.gun;
|
package net.mcreator.superbwarfare.item.gun;
|
||||||
|
|
||||||
|
import com.google.common.collect.HashMultimap;
|
||||||
|
import com.google.common.collect.Multimap;
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.init.ModItems;
|
import net.mcreator.superbwarfare.init.ModItems;
|
||||||
import net.mcreator.superbwarfare.init.ModPerks;
|
import net.mcreator.superbwarfare.init.ModPerks;
|
||||||
|
@ -15,7 +17,11 @@ import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -29,6 +35,7 @@ import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
@Mod.EventBusSubscriber
|
@Mod.EventBusSubscriber
|
||||||
public abstract class GunItem extends Item {
|
public abstract class GunItem extends Item {
|
||||||
|
@ -48,13 +55,6 @@ public abstract class GunItem extends Item {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (entity instanceof Player player) {
|
|
||||||
// player.displayClientMessage(Component.literal(new java.text.DecimalFormat("##.##").format(itemstack.getOrCreateTag().getInt("scope_type"))
|
|
||||||
// + " " + new java.text.DecimalFormat("##.#").format(itemstack.getOrCreateTag().getInt("barrel_type"))
|
|
||||||
// + " " + new java.text.DecimalFormat("##.#").format(itemstack.getOrCreateTag().getInt("magazine_type"))
|
|
||||||
// + " " + new java.text.DecimalFormat("##.#").format(itemstack.getOrCreateTag().getInt("stock_type"))), true);
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (!ItemNBTTool.getBoolean(itemstack, "init", false)) {
|
if (!ItemNBTTool.getBoolean(itemstack, "init", false)) {
|
||||||
GunsTool.initGun(level, itemstack, this.getDescriptionId().substring(this.getDescriptionId().lastIndexOf('.') + 1));
|
GunsTool.initGun(level, itemstack, this.getDescriptionId().substring(this.getDescriptionId().lastIndexOf('.') + 1));
|
||||||
GunsTool.genUUID(itemstack);
|
GunsTool.genUUID(itemstack);
|
||||||
|
@ -84,6 +84,7 @@ public abstract class GunItem extends Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleGunPerks(itemstack);
|
handleGunPerks(itemstack);
|
||||||
|
handleGunAttachment(itemstack);
|
||||||
|
|
||||||
if ((itemstack.is(ModTags.Items.EXTRA_ONE_AMMO) && itemstack.getOrCreateTag().getInt("ammo") > itemstack.getOrCreateTag().getInt("mag") + itemstack.getOrCreateTag().getInt("customMag") + 1)
|
if ((itemstack.is(ModTags.Items.EXTRA_ONE_AMMO) && itemstack.getOrCreateTag().getInt("ammo") > itemstack.getOrCreateTag().getInt("mag") + itemstack.getOrCreateTag().getInt("customMag") + 1)
|
||||||
|| (!itemstack.is(ModTags.Items.EXTRA_ONE_AMMO) && itemstack.getOrCreateTag().getInt("ammo") > itemstack.getOrCreateTag().getInt("mag") + itemstack.getOrCreateTag().getInt("customMag"))
|
|| (!itemstack.is(ModTags.Items.EXTRA_ONE_AMMO) && itemstack.getOrCreateTag().getInt("ammo") > itemstack.getOrCreateTag().getInt("mag") + itemstack.getOrCreateTag().getInt("customMag"))
|
||||||
|
@ -118,6 +119,18 @@ public abstract class GunItem extends Item {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
||||||
|
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
||||||
|
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
||||||
|
if (slot == EquipmentSlot.MAINHAND) {
|
||||||
|
map = HashMultimap.create(map);
|
||||||
|
map.put(Attributes.MOVEMENT_SPEED,
|
||||||
|
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.01f - 0.005f * (stack.getOrCreateTag().getDouble("weight") + stack.getOrCreateTag().getDouble("custom_weight")), AttributeModifier.Operation.MULTIPLY_BASE));
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void appendHoverText(ItemStack stack, Level world, List<Component> list, TooltipFlag flag) {
|
public void appendHoverText(ItemStack stack, Level world, List<Component> list, TooltipFlag flag) {
|
||||||
TooltipTool.addGunTips(list, stack);
|
TooltipTool.addGunTips(list, stack);
|
||||||
|
@ -173,14 +186,56 @@ public abstract class GunItem extends Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ctmMag = stack.getOrCreateTag().getInt("mag");
|
// int ctmMag = stack.getOrCreateTag().getInt("mag");
|
||||||
if (stack.is(ModTags.Items.USE_SNIPER_AMMO)) {
|
// if (stack.is(ModTags.Items.USE_SNIPER_AMMO)) {
|
||||||
stack.getOrCreateTag().putInt("customMag", (int) (Math.ceil(0.1 * PerkHelper.getItemPerkLevel(ModPerks.DIMENSION_MAGAZINE.get(), stack) * ctmMag)));
|
// stack.getOrCreateTag().putInt("customMag", (int) (Math.ceil(0.1 * PerkHelper.getItemPerkLevel(ModPerks.DIMENSION_MAGAZINE.get(), stack) * ctmMag)));
|
||||||
} else if (stack.is(ModTags.Items.USE_SHOTGUN_AMMO)) {
|
// } else if (stack.is(ModTags.Items.USE_SHOTGUN_AMMO)) {
|
||||||
stack.getOrCreateTag().putInt("customMag", (int) (Math.ceil(0.075 * PerkHelper.getItemPerkLevel(ModPerks.DIMENSION_MAGAZINE.get(), stack) * ctmMag)));
|
// stack.getOrCreateTag().putInt("customMag", (int) (Math.ceil(0.075 * PerkHelper.getItemPerkLevel(ModPerks.DIMENSION_MAGAZINE.get(), stack) * ctmMag)));
|
||||||
} else {
|
// } else {
|
||||||
stack.getOrCreateTag().putInt("customMag", (int) (Math.ceil(0.15 * PerkHelper.getItemPerkLevel(ModPerks.DIMENSION_MAGAZINE.get(), stack) * ctmMag)));
|
// stack.getOrCreateTag().putInt("customMag", (int) (Math.ceil(0.15 * PerkHelper.getItemPerkLevel(ModPerks.DIMENSION_MAGAZINE.get(), stack) * ctmMag)));
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleGunAttachment(ItemStack stack) {
|
||||||
|
|
||||||
|
int scopeType = stack.getOrCreateTag().getInt("scope_type");
|
||||||
|
int barrelType = stack.getOrCreateTag().getInt("barrel_type");
|
||||||
|
int magType = stack.getOrCreateTag().getInt("magazine_type");
|
||||||
|
int stockType = stack.getOrCreateTag().getInt("stock_type");
|
||||||
|
|
||||||
|
double ScopeWeight = 0;
|
||||||
|
double BarrelWeight = 0;
|
||||||
|
double MagWeight = 0;
|
||||||
|
double StockWeight = 0;
|
||||||
|
|
||||||
|
if (scopeType == 1) {
|
||||||
|
ScopeWeight = 0.5;
|
||||||
|
} else if (scopeType == 2) {
|
||||||
|
ScopeWeight = 1;
|
||||||
|
} else if (scopeType == 3) {
|
||||||
|
ScopeWeight = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (barrelType == 1) {
|
||||||
|
BarrelWeight = 1;
|
||||||
|
} else if (magType == 2) {
|
||||||
|
BarrelWeight = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (magType == 1) {
|
||||||
|
MagWeight = 1.5;
|
||||||
|
} else if (magType == 2) {
|
||||||
|
MagWeight = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stockType == 1) {
|
||||||
|
StockWeight = -2;
|
||||||
|
} else if (stockType == 2) {
|
||||||
|
ScopeWeight = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
stack.getOrCreateTag().putDouble("custom_weight", ScopeWeight + BarrelWeight + MagWeight + StockWeight);
|
||||||
|
stack.getOrCreateTag().putDouble("CustomSoundRadius", barrelType == 2 ? 0.25 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canApplyPerk(Perk perk) {
|
public boolean canApplyPerk(Perk perk) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.handgun;
|
package net.mcreator.superbwarfare.item.gun.handgun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.Glock17ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.Glock17ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Rarity;
|
import net.minecraft.world.item.Rarity;
|
||||||
|
@ -41,7 +35,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -129,18 +122,6 @@ public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.01f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(ModSounds.GLOCK_17_RELOAD_EMPTY.get(), ModSounds.GLOCK_17_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.GLOCK_17_RELOAD_EMPTY.get(), ModSounds.GLOCK_17_RELOAD_NORMAL.get());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.handgun;
|
package net.mcreator.superbwarfare.item.gun.handgun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.Glock18ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.Glock18ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -23,11 +21,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Rarity;
|
import net.minecraft.world.item.Rarity;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -129,18 +122,6 @@ public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.01f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(
|
return Set.of(
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.handgun;
|
package net.mcreator.superbwarfare.item.gun.handgun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.M1911ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.M1911ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Rarity;
|
import net.minecraft.world.item.Rarity;
|
||||||
|
@ -41,7 +35,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -130,18 +123,6 @@ public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.02f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(
|
return Set.of(
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.handgun;
|
package net.mcreator.superbwarfare.item.gun.handgun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.TracheliumItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.TracheliumItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -26,11 +24,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.*;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
||||||
|
@ -46,7 +40,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -120,18 +113,6 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.02f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
||||||
list.add(Component.translatable("des.superbwarfare.trachelium_1").withStyle(ChatFormatting.GRAY).withStyle(ChatFormatting.ITALIC));
|
list.add(Component.translatable("des.superbwarfare.trachelium_1").withStyle(ChatFormatting.GRAY).withStyle(ChatFormatting.ITALIC));
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.launcher;
|
package net.mcreator.superbwarfare.item.gun.launcher;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.JavelinItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.JavelinItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -25,11 +23,7 @@ import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffectInstance;
|
import net.minecraft.world.effect.MobEffectInstance;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -47,7 +41,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class JavelinItem extends GunItem implements GeoItem, AnimatedItem {
|
public class JavelinItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -118,18 +111,6 @@ public class JavelinItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.14f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getAmmoCount(Player player) {
|
public static int getAmmoCount(Player player) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (var inv : player.getInventory().items) {
|
for (var inv : player.getInventory().items) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.launcher;
|
package net.mcreator.superbwarfare.item.gun.launcher;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.M79ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.M79ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -25,11 +23,7 @@ import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.*;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
@ -45,7 +39,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M79Item extends GunItem implements GeoItem, AnimatedItem {
|
public class M79Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -119,18 +112,6 @@ public class M79Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
data.add(idleController);
|
data.add(idleController);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.07f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getAmmoCount(Player player) {
|
public static int getAmmoCount(Player player) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (var inv : player.getInventory().items) {
|
for (var inv : player.getInventory().items) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.launcher;
|
package net.mcreator.superbwarfare.item.gun.launcher;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.RpgItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.RpgItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -25,11 +23,7 @@ import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.*;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
@ -45,7 +39,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
|
public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -116,18 +109,6 @@ public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.11f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getAmmoCount(Player player) {
|
public static int getAmmoCount(Player player) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (var inv : player.getInventory().items) {
|
for (var inv : player.getInventory().items) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.machinegun;
|
package net.mcreator.superbwarfare.item.gun.machinegun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.DevotionItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.DevotionItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -23,11 +21,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -43,7 +37,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class DevotionItem extends GunItem implements GeoItem, AnimatedItem {
|
public class DevotionItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -112,18 +105,6 @@ public class DevotionItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.05f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(ModSounds.DEVOTION_RELOAD_EMPTY.get(), ModSounds.DEVOTION_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.DEVOTION_RELOAD_EMPTY.get(), ModSounds.DEVOTION_RELOAD_NORMAL.get());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.machinegun;
|
package net.mcreator.superbwarfare.item.gun.machinegun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.M60ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.M60ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -23,11 +21,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -43,7 +37,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -134,18 +127,6 @@ public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return Set.of(ModSounds.M_60_RELOAD_EMPTY.get(), ModSounds.M_60_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.M_60_RELOAD_EMPTY.get(), ModSounds.M_60_RELOAD_NORMAL.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.08f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.M_60.get());
|
ItemStack stack = new ItemStack(ModItems.M_60.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.M_60.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.M_60.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.machinegun;
|
package net.mcreator.superbwarfare.item.gun.machinegun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.MinigunItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.MinigunItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -28,12 +26,8 @@ import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.HumanoidArm;
|
import net.minecraft.world.entity.HumanoidArm;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -49,7 +43,6 @@ import software.bernie.geckolib.core.animation.RawAnimation;
|
||||||
import software.bernie.geckolib.core.object.PlayState;
|
import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class MinigunItem extends GunItem implements GeoItem, AnimatedItem {
|
public class MinigunItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -140,18 +133,6 @@ public class MinigunItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.2f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void inventoryTick(ItemStack itemstack, Level world, Entity entity, int slot, boolean selected) {
|
public void inventoryTick(ItemStack itemstack, Level world, Entity entity, int slot, boolean selected) {
|
||||||
super.inventoryTick(itemstack, world, entity, slot, selected);
|
super.inventoryTick(itemstack, world, entity, slot, selected);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.machinegun;
|
package net.mcreator.superbwarfare.item.gun.machinegun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.RpkItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.RpkItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -23,11 +21,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -43,7 +37,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
|
public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -113,18 +106,6 @@ public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.06f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(ModSounds.RPK_RELOAD_EMPTY.get(), ModSounds.RPK_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.RPK_RELOAD_EMPTY.get(), ModSounds.RPK_RELOAD_NORMAL.get());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.rifle;
|
package net.mcreator.superbwarfare.item.gun.rifle;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.AK12ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.AK12ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -23,14 +21,12 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Rarity;
|
import net.minecraft.world.item.Rarity;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
||||||
import software.bernie.geckolib.animatable.GeoItem;
|
import software.bernie.geckolib.animatable.GeoItem;
|
||||||
import software.bernie.geckolib.core.animatable.instance.AnimatableInstanceCache;
|
import software.bernie.geckolib.core.animatable.instance.AnimatableInstanceCache;
|
||||||
|
@ -42,7 +38,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
|
public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -120,18 +115,6 @@ public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.04f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.AK_12.get());
|
ItemStack stack = new ItemStack(ModItems.AK_12.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.AK_12.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.AK_12.getId().getPath());
|
||||||
|
@ -142,6 +125,41 @@ public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
public void setAnimationProcedure(String procedure) {
|
public void setAnimationProcedure(String procedure) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void inventoryTick(ItemStack stack, Level world, Entity entity, int slot, boolean selected) {
|
||||||
|
super.inventoryTick(stack, world, entity, slot, selected);
|
||||||
|
|
||||||
|
int scopeType = stack.getOrCreateTag().getInt("scope_type");
|
||||||
|
int barrelType = stack.getOrCreateTag().getInt("barrel_type");
|
||||||
|
int magType = stack.getOrCreateTag().getInt("magazine_type");
|
||||||
|
int stockType = stack.getOrCreateTag().getInt("stock_type");
|
||||||
|
|
||||||
|
int customMag = 0;
|
||||||
|
|
||||||
|
if (magType == 1) {
|
||||||
|
customMag = 15;
|
||||||
|
} else if (magType == 2) {
|
||||||
|
customMag = 45;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (scopeType == 1) {
|
||||||
|
//
|
||||||
|
// } else if (scopeType == 2) {
|
||||||
|
//
|
||||||
|
// } else if (scopeType == 3) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (entity instanceof Player player) {
|
||||||
|
// player.displayClientMessage(Component.literal(new java.text.DecimalFormat("##.##").format(stack.getOrCreateTag().getInt("scope_type"))
|
||||||
|
// + " " + new java.text.DecimalFormat("##.#").format(barrelType)
|
||||||
|
// + " " + new java.text.DecimalFormat("##.#").format(magType)
|
||||||
|
// + " " + new java.text.DecimalFormat("##.#").format(stockType)), true);
|
||||||
|
// }
|
||||||
|
|
||||||
|
stack.getOrCreateTag().putInt("customMag", customMag);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getGunIcon() {
|
public ResourceLocation getGunIcon() {
|
||||||
return new ResourceLocation(ModUtils.MODID, "textures/gun_icon/ak12_icon.png");
|
return new ResourceLocation(ModUtils.MODID, "textures/gun_icon/ak12_icon.png");
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.rifle;
|
package net.mcreator.superbwarfare.item.gun.rifle;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.AK47ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.AK47ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
|
public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -116,18 +109,6 @@ public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.04f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.AK_47.get());
|
ItemStack stack = new ItemStack(ModItems.AK_47.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.AK_47.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.AK_47.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.rifle;
|
package net.mcreator.superbwarfare.item.gun.rifle;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.Hk416ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.Hk416ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
|
public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -111,18 +104,6 @@ public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.035f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(ModSounds.HK_416_RELOAD_EMPTY.get(), ModSounds.HK_416_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.HK_416_RELOAD_EMPTY.get(), ModSounds.HK_416_RELOAD_NORMAL.get());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.rifle;
|
package net.mcreator.superbwarfare.item.gun.rifle;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.M4ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.M4ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M4Item extends GunItem implements GeoItem, AnimatedItem {
|
public class M4Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -111,18 +104,6 @@ public class M4Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.04f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(ModSounds.M_4_RELOAD_EMPTY.get(), ModSounds.M_4_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.M_4_RELOAD_EMPTY.get(), ModSounds.M_4_RELOAD_NORMAL.get());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.rifle;
|
package net.mcreator.superbwarfare.item.gun.rifle;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.MarlinItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.MarlinItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -23,11 +21,7 @@ import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -44,7 +38,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -155,18 +148,6 @@ public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return Set.of(ModSounds.MARLIN_LOOP.get(), ModSounds.MARLIN_PREPARE.get(), ModSounds.MARLIN_END.get());
|
return Set.of(ModSounds.MARLIN_LOOP.get(), ModSounds.MARLIN_PREPARE.get(), ModSounds.MARLIN_END.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.04f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.MARLIN.get());
|
ItemStack stack = new ItemStack(ModItems.MARLIN.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.MARLIN.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.MARLIN.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.rifle;
|
package net.mcreator.superbwarfare.item.gun.rifle;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.Mk14ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.Mk14ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
|
public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -116,18 +109,6 @@ public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return Set.of(ModSounds.MK_14_RELOAD_EMPTY.get(), ModSounds.MK_14_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.MK_14_RELOAD_EMPTY.get(), ModSounds.MK_14_RELOAD_NORMAL.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.05f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.MK_14.get());
|
ItemStack stack = new ItemStack(ModItems.MK_14.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.MK_14.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.MK_14.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.rifle;
|
package net.mcreator.superbwarfare.item.gun.rifle;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.Qbz95ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.Qbz95ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Rarity;
|
import net.minecraft.world.item.Rarity;
|
||||||
|
@ -41,7 +35,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Qbz95Item extends GunItem implements GeoItem, AnimatedItem {
|
public class Qbz95Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -110,18 +103,6 @@ public class Qbz95Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.035f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(ModSounds.QBZ_95_RELOAD_EMPTY.get(), ModSounds.QBZ_95_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.QBZ_95_RELOAD_EMPTY.get(), ModSounds.QBZ_95_RELOAD_NORMAL.get());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.rifle;
|
package net.mcreator.superbwarfare.item.gun.rifle;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.SksItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.SksItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class SksItem extends GunItem implements GeoItem, AnimatedItem {
|
public class SksItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -116,18 +109,6 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.05f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.SKS.get());
|
ItemStack stack = new ItemStack(ModItems.SKS.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.SKS.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.SKS.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.shotgun;
|
package net.mcreator.superbwarfare.item.gun.shotgun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.Aa12ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.Aa12ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -26,11 +24,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -49,7 +43,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Aa12Item extends GunItem implements GeoItem, AnimatedItem {
|
public class Aa12Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -144,18 +137,6 @@ public class Aa12Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.06f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
||||||
TooltipTool.addShotgunTips(list, stack);
|
TooltipTool.addShotgunTips(list, stack);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.shotgun;
|
package net.mcreator.superbwarfare.item.gun.shotgun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.AbekiriItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.AbekiriItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -24,11 +22,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.*;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
||||||
|
@ -44,7 +38,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class AbekiriItem extends GunItem implements GeoItem, AnimatedItem {
|
public class AbekiriItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -118,18 +111,6 @@ public class AbekiriItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.02f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
||||||
TooltipTool.addShotgunTips(list, stack);
|
TooltipTool.addShotgunTips(list, stack);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.shotgun;
|
package net.mcreator.superbwarfare.item.gun.shotgun;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.M870ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.M870ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -24,11 +22,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.*;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
||||||
|
@ -44,7 +38,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -140,18 +133,6 @@ public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return Set.of(ModSounds.M_870_PREPARE_LOAD.get(), ModSounds.M_870_LOOP.get());
|
return Set.of(ModSounds.M_870_PREPARE_LOAD.get(), ModSounds.M_870_LOOP.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.04f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.M_870.get());
|
ItemStack stack = new ItemStack(ModItems.M_870.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.M_870.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.M_870.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.smg;
|
package net.mcreator.superbwarfare.item.gun.smg;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.VectorItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.VectorItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -123,18 +116,6 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return Set.of(ModSounds.VECTOR_RELOAD_NORMAL.get(), ModSounds.VECTOR_RELOAD_EMPTY.get());
|
return Set.of(ModSounds.VECTOR_RELOAD_NORMAL.get(), ModSounds.VECTOR_RELOAD_EMPTY.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.03f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAnimationProcedure(String procedure) {
|
public void setAnimationProcedure(String procedure) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.sniper;
|
package net.mcreator.superbwarfare.item.gun.sniper;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.HuntingRifleItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.HuntingRifleItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class HuntingRifleItem extends GunItem implements GeoItem, AnimatedItem {
|
public class HuntingRifleItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -112,18 +105,6 @@ public class HuntingRifleItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.05f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.HUNTING_RIFLE.get());
|
ItemStack stack = new ItemStack(ModItems.HUNTING_RIFLE.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.HUNTING_RIFLE.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.HUNTING_RIFLE.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.sniper;
|
package net.mcreator.superbwarfare.item.gun.sniper;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.K98ItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.K98ItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Rarity;
|
import net.minecraft.world.item.Rarity;
|
||||||
|
@ -41,7 +35,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -143,18 +136,6 @@ public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.05f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(
|
return Set.of(
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.sniper;
|
package net.mcreator.superbwarfare.item.gun.sniper;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.M98bItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.M98bItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -128,18 +121,6 @@ public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.07f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(ModSounds.M_98B_RELOAD_EMPTY.get(), ModSounds.M_98B_RELOAD_NORMAL.get(), ModSounds.M_98B_BOLT.get());
|
return Set.of(ModSounds.M_98B_RELOAD_EMPTY.get(), ModSounds.M_98B_RELOAD_NORMAL.get(), ModSounds.M_98B_BOLT.get());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.sniper;
|
package net.mcreator.superbwarfare.item.gun.sniper;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.MosinNagantItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.MosinNagantItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Rarity;
|
import net.minecraft.world.item.Rarity;
|
||||||
|
@ -41,7 +35,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -143,18 +136,6 @@ public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.05f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<SoundEvent> getReloadSound() {
|
public Set<SoundEvent> getReloadSound() {
|
||||||
return Set.of(
|
return Set.of(
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.sniper;
|
package net.mcreator.superbwarfare.item.gun.sniper;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.Ntw20Renderer;
|
import net.mcreator.superbwarfare.client.renderer.item.Ntw20Renderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -23,11 +21,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -138,18 +131,6 @@ public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.15f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.NTW_20.get());
|
ItemStack stack = new ItemStack(ModItems.NTW_20.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.NTW_20.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.NTW_20.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.sniper;
|
package net.mcreator.superbwarfare.item.gun.sniper;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.SentinelItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.SentinelItemRenderer;
|
||||||
import net.mcreator.superbwarfare.energy.ItemEnergyProvider;
|
import net.mcreator.superbwarfare.energy.ItemEnergyProvider;
|
||||||
|
@ -28,11 +26,7 @@ import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -52,7 +46,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
@ -219,18 +212,6 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.06f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.SENTINEL.get());
|
ItemStack stack = new ItemStack(ModItems.SENTINEL.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.SENTINEL.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.SENTINEL.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.sniper;
|
package net.mcreator.superbwarfare.item.gun.sniper;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.SvdItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.SvdItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -22,11 +20,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.Item;
|
||||||
import net.minecraft.world.item.ItemDisplayContext;
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
|
public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -116,18 +109,6 @@ public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
return Set.of(ModSounds.SVD_RELOAD_EMPTY.get(), ModSounds.SVD_RELOAD_NORMAL.get());
|
return Set.of(ModSounds.SVD_RELOAD_EMPTY.get(), ModSounds.SVD_RELOAD_NORMAL.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.06f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ItemStack getGunInstance() {
|
public static ItemStack getGunInstance() {
|
||||||
ItemStack stack = new ItemStack(ModItems.SVD.get());
|
ItemStack stack = new ItemStack(ModItems.SVD.get());
|
||||||
GunsTool.initCreativeGun(stack, ModItems.SVD.getId().getPath());
|
GunsTool.initCreativeGun(stack, ModItems.SVD.getId().getPath());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.special;
|
package net.mcreator.superbwarfare.item.gun.special;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.BocekItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.BocekItemRenderer;
|
||||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||||
|
@ -23,11 +21,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.*;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
@ -42,7 +36,6 @@ import software.bernie.geckolib.core.object.PlayState;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
|
public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
@ -98,18 +91,6 @@ public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
data.add(idleController);
|
data.add(idleController);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.03f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.mcreator.superbwarfare.item.gun.special;
|
package net.mcreator.superbwarfare.item.gun.special;
|
||||||
|
|
||||||
import com.google.common.collect.HashMultimap;
|
|
||||||
import com.google.common.collect.Multimap;
|
|
||||||
import net.mcreator.superbwarfare.ModUtils;
|
import net.mcreator.superbwarfare.ModUtils;
|
||||||
import net.mcreator.superbwarfare.client.renderer.item.TaserItemRenderer;
|
import net.mcreator.superbwarfare.client.renderer.item.TaserItemRenderer;
|
||||||
import net.mcreator.superbwarfare.energy.ItemEnergyProvider;
|
import net.mcreator.superbwarfare.energy.ItemEnergyProvider;
|
||||||
|
@ -28,11 +26,7 @@ import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
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.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.*;
|
import net.minecraft.world.item.*;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
@ -50,7 +44,6 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
@ -158,18 +151,6 @@ public class TaserItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
data.add(idleController);
|
data.add(idleController);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
|
||||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
|
||||||
UUID uuid = new UUID(slot.toString().hashCode(), 0);
|
|
||||||
if (slot == EquipmentSlot.MAINHAND) {
|
|
||||||
map = HashMultimap.create(map);
|
|
||||||
map.put(Attributes.MOVEMENT_SPEED,
|
|
||||||
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.01f, AttributeModifier.Operation.MULTIPLY_BASE));
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class EditMessage {
|
||||||
|
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (stack.is(ModTags.Items.GUN) && player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).edit) {
|
if (stack.is(ModTags.Items.CAN_CUSTOM_GUN) && player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).edit) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
stack.getOrCreateTag().putInt("scope_type", stack.getOrCreateTag().getInt("scope_type") + 1);
|
stack.getOrCreateTag().putInt("scope_type", stack.getOrCreateTag().getInt("scope_type") + 1);
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class EditModeMessage {
|
||||||
ItemStack mainHandItem = player.getMainHandItem();
|
ItemStack mainHandItem = player.getMainHandItem();
|
||||||
var cap = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null);
|
var cap = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null);
|
||||||
|
|
||||||
if (mainHandItem.is(ModTags.Items.GUN)) {
|
if (mainHandItem.is(ModTags.Items.CAN_CUSTOM_GUN)) {
|
||||||
cap.ifPresent(capability -> {
|
cap.ifPresent(capability -> {
|
||||||
capability.edit = !cap.orElse(new ModVariables.PlayerVariables()).edit;
|
capability.edit = !cap.orElse(new ModVariables.PlayerVariables()).edit;
|
||||||
capability.syncPlayerVariables(player);
|
capability.syncPlayerVariables(player);
|
||||||
|
|
|
@ -272,7 +272,7 @@ public class FireMessage {
|
||||||
spread = 0.01f;
|
spread = 0.01f;
|
||||||
damage = 0.08333333 * tag.getDouble("damage") * tag.getDouble("speed") * perkDamage(heldItem);
|
damage = 0.08333333 * tag.getDouble("damage") * tag.getDouble("speed") * perkDamage(heldItem);
|
||||||
} else {
|
} else {
|
||||||
spread = perk instanceof AmmoPerk ammoPerk && ammoPerk.slug ? 1 : 2.5f;
|
spread = perk instanceof AmmoPerk ammoPerk && ammoPerk.slug ? 0.5f : 2.5f;
|
||||||
damage = (perk instanceof AmmoPerk ammoPerk && ammoPerk.slug ? 0.08333333 : 0.008333333) * tag.getDouble("damage") * tag.getDouble("speed") * perkDamage(heldItem);
|
damage = (perk instanceof AmmoPerk ammoPerk && ammoPerk.slug ? 0.08333333 : 0.008333333) * tag.getDouble("damage") * tag.getDouble("speed") * perkDamage(heldItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,7 +369,6 @@ public class FireMessage {
|
||||||
|
|
||||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||||
double spread = stack.getOrCreateTag().getDouble("spread");
|
double spread = stack.getOrCreateTag().getDouble("spread");
|
||||||
double zoomSpread = stack.getOrCreateTag().getDouble("zoomSpread");
|
|
||||||
|
|
||||||
Level level = player.level();
|
Level level = player.level();
|
||||||
if (!level.isClientSide()) {
|
if (!level.isClientSide()) {
|
||||||
|
@ -377,7 +376,7 @@ public class FireMessage {
|
||||||
|
|
||||||
taserBulletProjectile.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
taserBulletProjectile.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
||||||
taserBulletProjectile.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) stack.getOrCreateTag().getDouble("velocity"),
|
taserBulletProjectile.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) stack.getOrCreateTag().getDouble("velocity"),
|
||||||
(float) (zoom ? zoomSpread : spread));
|
(float) (zoom ? 0.1 : spread));
|
||||||
level.addFreshEntity(taserBulletProjectile);
|
level.addFreshEntity(taserBulletProjectile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,7 +403,6 @@ public class FireMessage {
|
||||||
if (!player.getCooldowns().isOnCooldown(stack.getItem()) && stack.getOrCreateTag().getInt("ammo") > 0) {
|
if (!player.getCooldowns().isOnCooldown(stack.getItem()) && stack.getOrCreateTag().getInt("ammo") > 0) {
|
||||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||||
double spread = stack.getOrCreateTag().getDouble("spread");
|
double spread = stack.getOrCreateTag().getDouble("spread");
|
||||||
double zoomSpread = stack.getOrCreateTag().getDouble("zoomSpread");
|
|
||||||
|
|
||||||
Level level = player.level();
|
Level level = player.level();
|
||||||
if (!level.isClientSide()) {
|
if (!level.isClientSide()) {
|
||||||
|
@ -419,7 +417,7 @@ public class FireMessage {
|
||||||
|
|
||||||
gunGrenadeEntity.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
gunGrenadeEntity.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
||||||
gunGrenadeEntity.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) stack.getOrCreateTag().getDouble("velocity"),
|
gunGrenadeEntity.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) stack.getOrCreateTag().getDouble("velocity"),
|
||||||
(float) (zoom ? zoomSpread : spread));
|
(float) (zoom ? 0.1 : spread));
|
||||||
level.addFreshEntity(gunGrenadeEntity);
|
level.addFreshEntity(gunGrenadeEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,7 +456,6 @@ public class FireMessage {
|
||||||
if (!tag.getBoolean("reloading") && !player.getCooldowns().isOnCooldown(stack.getItem()) && tag.getInt("ammo") > 0) {
|
if (!tag.getBoolean("reloading") && !player.getCooldowns().isOnCooldown(stack.getItem()) && tag.getInt("ammo") > 0) {
|
||||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||||
double spread = stack.getOrCreateTag().getDouble("spread");
|
double spread = stack.getOrCreateTag().getDouble("spread");
|
||||||
double zoomSpread = stack.getOrCreateTag().getDouble("zoomSpread");
|
|
||||||
|
|
||||||
if (!level.isClientSide()) {
|
if (!level.isClientSide()) {
|
||||||
RpgRocketEntity rocketEntity = new RpgRocketEntity(player, level,
|
RpgRocketEntity rocketEntity = new RpgRocketEntity(player, level,
|
||||||
|
@ -472,7 +469,7 @@ public class FireMessage {
|
||||||
|
|
||||||
rocketEntity.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
rocketEntity.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
||||||
rocketEntity.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) tag.getDouble("velocity"),
|
rocketEntity.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) tag.getDouble("velocity"),
|
||||||
(float) (zoom ? zoomSpread : spread));
|
(float) (zoom ? 0.1 : spread));
|
||||||
level.addFreshEntity(rocketEntity);
|
level.addFreshEntity(rocketEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ public class PerkHelper {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final Predicate<Perk> MAGAZINE_PERKS = perk -> perk == ModPerks.DIMENSION_MAGAZINE.get();
|
public static final Predicate<Perk> MAGAZINE_PERKS = perk -> false;
|
||||||
|
|
||||||
public static final Predicate<Perk> LAUNCHER_PERKS = perk -> perk == ModPerks.MONSTER_HUNTER.get();
|
public static final Predicate<Perk> LAUNCHER_PERKS = perk -> perk == ModPerks.MONSTER_HUNTER.get();
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1573,6 +1573,22 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"ak_12_fire_1p_s": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:ak_12/ak_12_fire_1p_s",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ak_12_fire_3p_s": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:ak_12/ak_12_fire_3p_s",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"ak_12_far": {
|
"ak_12_far": {
|
||||||
"sounds": [
|
"sounds": [
|
||||||
{
|
{
|
||||||
|
@ -1589,6 +1605,22 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"ak_12_far_s": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:ak_12/ak_12_far_s",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ak_12_veryfar_s": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:ak_12/ak_12_veryfar_s",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"ak_12_reload_normal": {
|
"ak_12_reload_normal": {
|
||||||
"sounds": [
|
"sounds": [
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 57 KiB |
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.75,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 3.5,
|
"spread": 3.5,
|
||||||
"recoil_x": 0.006,
|
"recoil_x": 0.006,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 13,
|
"velocity": 13,
|
||||||
"mag": 25,
|
"mag": 25,
|
||||||
"projectile_amount": 12,
|
"projectile_amount": 12,
|
||||||
"weight": 1,
|
"weight": 7,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.4,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 4,
|
"spread": 4,
|
||||||
"recoil_x": 0.005,
|
"recoil_x": 0.005,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 12,
|
"velocity": 12,
|
||||||
"mag": 2,
|
"mag": 2,
|
||||||
"projectile_amount": 12,
|
"projectile_amount": 12,
|
||||||
"weight": 0,
|
"weight": 1,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.13,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 3.5,
|
"spread": 3.5,
|
||||||
"recoil_x": 0.0015,
|
"recoil_x": 0.0015,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 23,
|
"velocity": 23,
|
||||||
"mag": 30,
|
"mag": 30,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 4,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.1,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 4,
|
"spread": 4,
|
||||||
"recoil_x": 0.002,
|
"recoil_x": 0.002,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 22,
|
"velocity": 22,
|
||||||
"mag": 30,
|
"mag": 30,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 5,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1,
|
|
||||||
"zoom": 2,
|
"zoom": 2,
|
||||||
"spread": 4,
|
"spread": 4,
|
||||||
"zoomSpread": 1,
|
|
||||||
"recoil_x": 0.005,
|
"recoil_x": 0.005,
|
||||||
"recoil_y": 0.003,
|
"recoil_y": 0.003,
|
||||||
"headshot": 2.5,
|
"headshot": 2.5,
|
||||||
"damage": 36,
|
"damage": 36,
|
||||||
"weight": 1,
|
"weight": 3,
|
||||||
"BypassesArmor": 0.25
|
"BypassesArmor": 0.25
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.75,
|
|
||||||
"zoom": 2,
|
"zoom": 2,
|
||||||
"spread": 5,
|
"spread": 5,
|
||||||
"bipod": 1,
|
"bipod": 1,
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
"velocity": 25,
|
"velocity": 25,
|
||||||
"mag": 55,
|
"mag": 55,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 6,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 0,
|
"semi": 0,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.9,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 2.5,
|
"spread": 2.5,
|
||||||
"recoil_x": 0.004,
|
"recoil_x": 0.004,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 16,
|
"velocity": 16,
|
||||||
"mag": 17,
|
"mag": 17,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 0,
|
"weight": 1,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.9,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 2.5,
|
"spread": 2.5,
|
||||||
"recoil_x": 0.004,
|
"recoil_x": 0.004,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 16,
|
"velocity": 16,
|
||||||
"mag": 17,
|
"mag": 17,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 0,
|
"weight": 1,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.3,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 3.5,
|
"spread": 3.5,
|
||||||
"recoil_x": 0.0016,
|
"recoil_x": 0.0016,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 24,
|
"velocity": 24,
|
||||||
"mag": 30,
|
"mag": 30,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 4,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.75,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 7,
|
"spread": 7,
|
||||||
"recoil_x": 0.004,
|
"recoil_x": 0.004,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 38,
|
"velocity": 38,
|
||||||
"mag": 1,
|
"mag": 1,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 5,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.62,
|
|
||||||
"zoom": 2,
|
"zoom": 2,
|
||||||
"min_zoom": 2,
|
"min_zoom": 2,
|
||||||
"max_zoom": 6,
|
"max_zoom": 6,
|
||||||
"spread": 5,
|
"spread": 5,
|
||||||
"zoomSpread": 5,
|
"zoomSpread": 5,
|
||||||
"mag": 1,
|
"mag": 1,
|
||||||
"weight": 2,
|
"weight": 10,
|
||||||
"empty_reload_time": 78,
|
"empty_reload_time": 78,
|
||||||
"damage": 300,
|
"damage": 300,
|
||||||
"BypassesArmor": 1
|
"BypassesArmor": 1
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.05,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 5,
|
"spread": 5,
|
||||||
"recoil_x": 0.002,
|
"recoil_x": 0.002,
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"mag": 5,
|
"mag": 5,
|
||||||
"bolt_action_time": 22,
|
"bolt_action_time": 22,
|
||||||
"weight": 1,
|
"weight": 5,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.7,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 2.5,
|
"spread": 2.5,
|
||||||
"recoil_x": 0.006,
|
"recoil_x": 0.006,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 14,
|
"velocity": 14,
|
||||||
"mag": 7,
|
"mag": 7,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 0,
|
"weight": 2,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.15,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 4,
|
"spread": 4,
|
||||||
"recoil_x": 0.0015,
|
"recoil_x": 0.0015,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 24,
|
"velocity": 24,
|
||||||
"mag": 30,
|
"mag": 30,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 4,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.68,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 5,
|
"spread": 5,
|
||||||
"bipod": 1,
|
"bipod": 1,
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
"velocity": 22,
|
"velocity": 22,
|
||||||
"mag": 100,
|
"mag": 100,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 2,
|
"weight": 8,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 0,
|
"semi": 0,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,18 +1,11 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.95,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 1.5,
|
"spread": 1.5,
|
||||||
"zoomSpread": 0.1,
|
|
||||||
"recoil_x": 0.004,
|
"recoil_x": 0.004,
|
||||||
"recoil_y": 0.023,
|
"recoil_y": 0.023,
|
||||||
"damage": 40,
|
"damage": 40,
|
||||||
"velocity": 3.75,
|
"velocity": 3.75,
|
||||||
"mag": 1,
|
"mag": 1,
|
||||||
"weight": 1,
|
"weight": 4,
|
||||||
"fire_mode": 0,
|
|
||||||
"semi": 1,
|
|
||||||
"burst": 0,
|
|
||||||
"auto": 0,
|
|
||||||
"burst_size": 1,
|
|
||||||
"empty_reload_time": 64
|
"empty_reload_time": 64
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.1,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 3,
|
"spread": 3,
|
||||||
"recoil_x": 0.009,
|
"recoil_x": 0.009,
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
"mag": 8,
|
"mag": 8,
|
||||||
"force_stop_reloading": 1,
|
"force_stop_reloading": 1,
|
||||||
"projectile_amount": 12,
|
"projectile_amount": 12,
|
||||||
"weight": 1,
|
"weight": 4,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.7,
|
|
||||||
"zoom": 6,
|
"zoom": 6,
|
||||||
"min_zoom": 4,
|
"min_zoom": 4,
|
||||||
"max_zoom": 8,
|
"max_zoom": 8,
|
||||||
|
@ -12,7 +11,7 @@
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"mag": 5,
|
"mag": 5,
|
||||||
"bolt_action_time": 18,
|
"bolt_action_time": 18,
|
||||||
"weight": 1,
|
"weight": 7,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.1,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 2,
|
"spread": 2,
|
||||||
"recoil_x": 0.004,
|
"recoil_x": 0.004,
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
"mag": 8,
|
"mag": 8,
|
||||||
"force_stop_reloading": 1,
|
"force_stop_reloading": 1,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 3,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"damage": 8,
|
"damage": 8,
|
||||||
"headshot": 2,
|
"headshot": 2,
|
||||||
"velocity": 24,
|
"velocity": 24,
|
||||||
"weight": 2,
|
"weight": 10,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"BypassesArmor": 0.3,
|
"BypassesArmor": 0.3,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.75,
|
|
||||||
"zoom": 4,
|
"zoom": 4,
|
||||||
"min_zoom": 1.25,
|
"min_zoom": 1.25,
|
||||||
"max_zoom": 6,
|
"max_zoom": 6,
|
||||||
|
@ -12,7 +11,7 @@
|
||||||
"velocity": 25,
|
"velocity": 25,
|
||||||
"mag": 20,
|
"mag": 20,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 5,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.75,
|
|
||||||
"zoom": 3.5,
|
"zoom": 3.5,
|
||||||
"spread": 4.8,
|
"spread": 4.8,
|
||||||
"recoil_x": 0.002,
|
"recoil_x": 0.002,
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"mag": 5,
|
"mag": 5,
|
||||||
"bolt_action_time": 22,
|
"bolt_action_time": 22,
|
||||||
"weight": 1,
|
"weight": 5,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.55,
|
|
||||||
"zoom": 6,
|
"zoom": 6,
|
||||||
"min_zoom": 1.3,
|
"min_zoom": 1.3,
|
||||||
"max_zoom": 6,
|
"max_zoom": 6,
|
||||||
|
@ -13,7 +12,7 @@
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"mag": 3,
|
"mag": 3,
|
||||||
"bolt_action_time": 37,
|
"bolt_action_time": 37,
|
||||||
"weight": 2,
|
"weight": 10,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.25,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 3.7,
|
"spread": 3.7,
|
||||||
"recoil_x": 0.0013,
|
"recoil_x": 0.0013,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 27,
|
"velocity": 27,
|
||||||
"mag": 30,
|
"mag": 30,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 4,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.77,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 5,
|
"spread": 5,
|
||||||
"zoomSpread": 0.2,
|
|
||||||
"recoil_x": 0.008,
|
"recoil_x": 0.008,
|
||||||
"recoil_y": 0.018,
|
"recoil_y": 0.018,
|
||||||
"damage": 250,
|
"damage": 250,
|
||||||
"velocity": 4,
|
"velocity": 4,
|
||||||
"mag": 1,
|
"mag": 1,
|
||||||
"weight": 1,
|
"weight": 7,
|
||||||
"fire_mode": 0,
|
|
||||||
"semi": 1,
|
|
||||||
"burst": 0,
|
|
||||||
"auto": 0,
|
|
||||||
"burst_size": 1,
|
|
||||||
"empty_reload_time": 103,
|
"empty_reload_time": 103,
|
||||||
"BypassesArmor": 1
|
"BypassesArmor": 1
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.75,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 5.5,
|
"spread": 5.5,
|
||||||
"bipod": 1,
|
"bipod": 1,
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
"velocity": 24,
|
"velocity": 24,
|
||||||
"mag": 75,
|
"mag": 75,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 6,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.85,
|
|
||||||
"zoom": 3,
|
"zoom": 3,
|
||||||
"spread": 6,
|
"spread": 6,
|
||||||
"recoil_x": 0.007,
|
"recoil_x": 0.007,
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
"headshot": 3,
|
"headshot": 3,
|
||||||
"velocity": 39,
|
"velocity": 39,
|
||||||
"bolt_action_time": 22,
|
"bolt_action_time": 22,
|
||||||
"weight": 1,
|
"weight": 7,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 4.5,
|
"spread": 4.5,
|
||||||
"recoil_x": 0.004,
|
"recoil_x": 0.004,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 23,
|
"velocity": 23,
|
||||||
"mag": 20,
|
"mag": 20,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 4,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 0.9,
|
|
||||||
"zoom": 4,
|
"zoom": 4,
|
||||||
"spread": 5.5,
|
"spread": 5.5,
|
||||||
"recoil_x": 0.004,
|
"recoil_x": 0.004,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 25,
|
"velocity": 25,
|
||||||
"mag": 10,
|
"mag": 10,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 1,
|
"weight": 5,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,18 +1,11 @@
|
||||||
{
|
{
|
||||||
"spread": 2,
|
"spread": 2,
|
||||||
"zoomSpread": 0.1,
|
|
||||||
"recoil_x": 0.0001,
|
"recoil_x": 0.0001,
|
||||||
"recoil_y": 0.002,
|
"recoil_y": 0.002,
|
||||||
"zoom_speed": 2,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"damage": 5,
|
"damage": 5,
|
||||||
"velocity": 3,
|
"velocity": 3,
|
||||||
"mag": 1,
|
"mag": 1,
|
||||||
"weight": 0,
|
"weight": 1,
|
||||||
"fire_mode": 0,
|
|
||||||
"semi": 1,
|
|
||||||
"burst": 0,
|
|
||||||
"auto": 0,
|
|
||||||
"burst_size": 1,
|
|
||||||
"empty_reload_time": 58
|
"empty_reload_time": 58
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.7,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 3,
|
"spread": 3,
|
||||||
"recoil_x": 0.005,
|
"recoil_x": 0.005,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 24,
|
"velocity": 24,
|
||||||
"mag": 6,
|
"mag": 6,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 0,
|
"weight": 2,
|
||||||
"fire_mode": 0,
|
"fire_mode": 0,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 0,
|
"burst": 0,
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"zoom_speed": 1.6,
|
|
||||||
"zoom": 1.25,
|
"zoom": 1.25,
|
||||||
"spread": 2.3,
|
"spread": 2.3,
|
||||||
"recoil_x": 0.002,
|
"recoil_x": 0.002,
|
||||||
|
@ -9,7 +8,7 @@
|
||||||
"velocity": 16,
|
"velocity": 16,
|
||||||
"mag": 33,
|
"mag": 33,
|
||||||
"projectile_amount": 1,
|
"projectile_amount": 1,
|
||||||
"weight": 0,
|
"weight": 3,
|
||||||
"fire_mode": 2,
|
"fire_mode": 2,
|
||||||
"semi": 1,
|
"semi": 1,
|
||||||
"burst": 1,
|
"burst": 1,
|
||||||
|
|
Loading…
Add table
Reference in a new issue