添加二次灾变(暂缺换弹动画)
This commit is contained in:
parent
00eeafb543
commit
0d29a1a022
39 changed files with 13125 additions and 40 deletions
|
@ -1,4 +1,4 @@
|
||||||
// 1.20.1 2025-01-09T04:05:02.4248154 Tags for minecraft:item mod id superbwarfare
|
// 1.20.1 2025-01-10T22:18:19.1617681 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
|
||||||
|
@ -26,9 +26,9 @@ af6fd64b4a685c353f243763db268f7b2304c009 data/forge/tags/items/storage_blocks/le
|
||||||
30d1daa7590f7364b5bc2dc777a00caf2f5eecb0 data/forge/tags/items/storage_blocks/silver.json
|
30d1daa7590f7364b5bc2dc777a00caf2f5eecb0 data/forge/tags/items/storage_blocks/silver.json
|
||||||
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
|
||||||
592381daae9fa8c2996f4cabc58850c35139cb2f data/superbwarfare/tags/items/gun.json
|
96a9ddc01147520bc6f573454a329bd67e8d0962 data/superbwarfare/tags/items/gun.json
|
||||||
409af265147e812b6f6558c51f1cb83b0f61b7d3 data/superbwarfare/tags/items/handgun.json
|
409af265147e812b6f6558c51f1cb83b0f61b7d3 data/superbwarfare/tags/items/handgun.json
|
||||||
68ec25b0ccd68abbbe2f33ab7097572c2140c9da data/superbwarfare/tags/items/launcher.json
|
65ddb0a8a671cc65af8e3754fc23e7d24c3587b7 data/superbwarfare/tags/items/launcher.json
|
||||||
b404c6fd99d2ca68c6738f225cb7d68ee443c10a data/superbwarfare/tags/items/machine_gun.json
|
b404c6fd99d2ca68c6738f225cb7d68ee443c10a data/superbwarfare/tags/items/machine_gun.json
|
||||||
a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/items/military_armor.json
|
a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/items/military_armor.json
|
||||||
5706356c3b32de89f5d4188dd9a72665537d8c09 data/superbwarfare/tags/items/normal_gun.json
|
5706356c3b32de89f5d4188dd9a72665537d8c09 data/superbwarfare/tags/items/normal_gun.json
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
"superbwarfare:m_60",
|
"superbwarfare:m_60",
|
||||||
"superbwarfare:minigun",
|
"superbwarfare:minigun",
|
||||||
"superbwarfare:m_79",
|
"superbwarfare:m_79",
|
||||||
|
"superbwarfare:secondary_cataclysm",
|
||||||
"superbwarfare:rpg",
|
"superbwarfare:rpg",
|
||||||
"superbwarfare:javelin",
|
"superbwarfare:javelin",
|
||||||
"superbwarfare:bocek"
|
"superbwarfare:bocek"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"values": [
|
"values": [
|
||||||
"superbwarfare:m_79",
|
"superbwarfare:m_79",
|
||||||
"superbwarfare:rpg",
|
"superbwarfare:rpg",
|
||||||
"superbwarfare:javelin"
|
"superbwarfare:javelin",
|
||||||
|
"superbwarfare:secondary_cataclysm"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -98,7 +98,6 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
|
||||||
|
|
||||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||||
CoreGeoBone body = getAnimationProcessor().getBone("gun");
|
|
||||||
|
|
||||||
float numR = (float) (1 - 0.12 * zt);
|
float numR = (float) (1 - 0.12 * zt);
|
||||||
float numP = (float) (1 - 0.68 * zt);
|
float numP = (float) (1 - 0.68 * zt);
|
||||||
|
@ -110,12 +109,6 @@ public class Glock17ItemModel extends GeoModel<Glock17Item> {
|
||||||
main.setPosX(numP * main.getPosX());
|
main.setPosX(numP * main.getPosX());
|
||||||
main.setPosY(numP * main.getPosY());
|
main.setPosY(numP * main.getPosY());
|
||||||
main.setPosZ(numP * main.getPosZ());
|
main.setPosZ(numP * main.getPosZ());
|
||||||
body.setRotX(numR * body.getRotX());
|
|
||||||
body.setRotY(numR * body.getRotY());
|
|
||||||
body.setRotZ(numR * body.getRotZ());
|
|
||||||
body.setPosX(numP * body.getPosX());
|
|
||||||
body.setPosY(numP * body.getPosY());
|
|
||||||
body.setPosZ(numP * body.getPosZ());
|
|
||||||
camera.setRotX(numR * camera.getRotX());
|
camera.setRotX(numR * camera.getRotX());
|
||||||
camera.setRotY(numR * camera.getRotY());
|
camera.setRotY(numR * camera.getRotY());
|
||||||
camera.setRotZ(numR * camera.getRotZ());
|
camera.setRotZ(numR * camera.getRotZ());
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
|
||||||
|
|
||||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||||
CoreGeoBone body = getAnimationProcessor().getBone("gun");
|
|
||||||
|
|
||||||
float numR = (float) (1 - 0.12 * zt);
|
float numR = (float) (1 - 0.12 * zt);
|
||||||
float numP = (float) (1 - 0.68 * zt);
|
float numP = (float) (1 - 0.68 * zt);
|
||||||
|
@ -119,12 +119,6 @@ public class Glock18ItemModel extends GeoModel<Glock18Item> {
|
||||||
main.setPosX(numP * main.getPosX());
|
main.setPosX(numP * main.getPosX());
|
||||||
main.setPosY(numP * main.getPosY());
|
main.setPosY(numP * main.getPosY());
|
||||||
main.setPosZ(numP * main.getPosZ());
|
main.setPosZ(numP * main.getPosZ());
|
||||||
body.setRotX(numR * body.getRotX());
|
|
||||||
body.setRotY(numR * body.getRotY());
|
|
||||||
body.setRotZ(numR * body.getRotZ());
|
|
||||||
body.setPosX(numP * body.getPosX());
|
|
||||||
body.setPosY(numP * body.getPosY());
|
|
||||||
body.setPosZ(numP * body.getPosZ());
|
|
||||||
camera.setRotX(numR * camera.getRotX());
|
camera.setRotX(numR * camera.getRotX());
|
||||||
camera.setRotY(numR * camera.getRotY());
|
camera.setRotY(numR * camera.getRotY());
|
||||||
camera.setRotZ(numR * camera.getRotZ());
|
camera.setRotZ(numR * camera.getRotZ());
|
||||||
|
|
|
@ -100,7 +100,6 @@ public class M1911ItemModel extends GeoModel<M1911Item> {
|
||||||
|
|
||||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||||
CoreGeoBone body = getAnimationProcessor().getBone("gun");
|
|
||||||
|
|
||||||
float numR = (float) (1 - 0.12 * zt);
|
float numR = (float) (1 - 0.12 * zt);
|
||||||
float numP = (float) (1 - 0.68 * zt);
|
float numP = (float) (1 - 0.68 * zt);
|
||||||
|
@ -112,12 +111,6 @@ public class M1911ItemModel extends GeoModel<M1911Item> {
|
||||||
main.setPosX(numP * main.getPosX());
|
main.setPosX(numP * main.getPosX());
|
||||||
main.setPosY(numP * main.getPosY());
|
main.setPosY(numP * main.getPosY());
|
||||||
main.setPosZ(numP * main.getPosZ());
|
main.setPosZ(numP * main.getPosZ());
|
||||||
body.setRotX(numR * body.getRotX());
|
|
||||||
body.setRotY(numR * body.getRotY());
|
|
||||||
body.setRotZ(numR * body.getRotZ());
|
|
||||||
body.setPosX(numP * body.getPosX());
|
|
||||||
body.setPosY(numP * body.getPosY());
|
|
||||||
body.setPosZ(numP * body.getPosZ());
|
|
||||||
camera.setRotX(numR * camera.getRotX());
|
camera.setRotX(numR * camera.getRotX());
|
||||||
camera.setRotY(numR * camera.getRotY());
|
camera.setRotY(numR * camera.getRotY());
|
||||||
camera.setRotZ(numR * camera.getRotZ());
|
camera.setRotZ(numR * camera.getRotZ());
|
||||||
|
|
|
@ -97,7 +97,6 @@ public class Mp443ItemModel extends GeoModel<Mp443Item> {
|
||||||
|
|
||||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||||
CoreGeoBone body = getAnimationProcessor().getBone("gun");
|
|
||||||
|
|
||||||
float numR = (float) (1 - 0.12 * zt);
|
float numR = (float) (1 - 0.12 * zt);
|
||||||
float numP = (float) (1 - 0.68 * zt);
|
float numP = (float) (1 - 0.68 * zt);
|
||||||
|
@ -109,12 +108,6 @@ public class Mp443ItemModel extends GeoModel<Mp443Item> {
|
||||||
main.setPosX(numP * main.getPosX());
|
main.setPosX(numP * main.getPosX());
|
||||||
main.setPosY(numP * main.getPosY());
|
main.setPosY(numP * main.getPosY());
|
||||||
main.setPosZ(numP * main.getPosZ());
|
main.setPosZ(numP * main.getPosZ());
|
||||||
body.setRotX(numR * body.getRotX());
|
|
||||||
body.setRotY(numR * body.getRotY());
|
|
||||||
body.setRotZ(numR * body.getRotZ());
|
|
||||||
body.setPosX(numP * body.getPosX());
|
|
||||||
body.setPosY(numP * body.getPosY());
|
|
||||||
body.setPosZ(numP * body.getPosZ());
|
|
||||||
camera.setRotX(numR * camera.getRotX());
|
camera.setRotX(numR * camera.getRotX());
|
||||||
camera.setRotY(numR * camera.getRotY());
|
camera.setRotY(numR * camera.getRotY());
|
||||||
camera.setRotZ(numR * camera.getRotZ());
|
camera.setRotZ(numR * camera.getRotZ());
|
||||||
|
|
|
@ -0,0 +1,116 @@
|
||||||
|
package com.atsuishio.superbwarfare.client.model.item;
|
||||||
|
|
||||||
|
import com.atsuishio.superbwarfare.ModUtils;
|
||||||
|
import com.atsuishio.superbwarfare.client.overlay.CrossHairOverlay;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientEventHandler;
|
||||||
|
import com.atsuishio.superbwarfare.init.ModTags;
|
||||||
|
import com.atsuishio.superbwarfare.item.gun.launcher.SecondaryCataclysm;
|
||||||
|
import com.atsuishio.superbwarfare.tools.GunsTool;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.util.Mth;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
|
||||||
|
import software.bernie.geckolib.core.animation.AnimationState;
|
||||||
|
import software.bernie.geckolib.model.GeoModel;
|
||||||
|
|
||||||
|
public class SecondaryCataclysmModel extends GeoModel<SecondaryCataclysm> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResourceLocation getAnimationResource(SecondaryCataclysm animatable) {
|
||||||
|
return ModUtils.loc("animations/secondary_cataclysm.animation.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResourceLocation getModelResource(SecondaryCataclysm animatable) {
|
||||||
|
return ModUtils.loc("geo/secondary_cataclysm.geo.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResourceLocation getTextureResource(SecondaryCataclysm animatable) {
|
||||||
|
return ModUtils.loc("textures/item/secondary_cataclysm.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCustomAnimations(SecondaryCataclysm animatable, long instanceId, AnimationState animationState) {
|
||||||
|
CoreGeoBone gun = getAnimationProcessor().getBone("bone");
|
||||||
|
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
||||||
|
|
||||||
|
Player player = Minecraft.getInstance().player;
|
||||||
|
if (player == null) return;
|
||||||
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
if (!stack.is(ModTags.Items.GUN)) return;
|
||||||
|
|
||||||
|
float times = 0.6f * (float) Math.min(Minecraft.getInstance().getDeltaFrameTime(), 0.8);
|
||||||
|
double zt = ClientEventHandler.zoomTime;
|
||||||
|
double zp = ClientEventHandler.zoomPos;
|
||||||
|
double zpz = ClientEventHandler.zoomPosZ;
|
||||||
|
double swayX = ClientEventHandler.swayX;
|
||||||
|
double swayY = ClientEventHandler.swayY;
|
||||||
|
float moveRotZ = (float) ClientEventHandler.moveRotZ;
|
||||||
|
float movePosX = (float) ClientEventHandler.movePosX;
|
||||||
|
float movePosY = (float) ClientEventHandler.movePosY;
|
||||||
|
double mph = ClientEventHandler.movePosHorizon;
|
||||||
|
double vY = ClientEventHandler.velocityY;
|
||||||
|
double turnRotX = ClientEventHandler.turnRot[0];
|
||||||
|
double turnRotY = ClientEventHandler.turnRot[1];
|
||||||
|
double turnRotZ = ClientEventHandler.turnRot[2];
|
||||||
|
double fpz = ClientEventHandler.firePosZ * 20 * times;
|
||||||
|
double fp = ClientEventHandler.firePos;
|
||||||
|
double fr = ClientEventHandler.fireRot;
|
||||||
|
|
||||||
|
gun.setPosX(0.9f * (float) zp);
|
||||||
|
gun.setPosY(0.15f * (float) zp - (float) (0.2f * zpz));
|
||||||
|
gun.setPosZ(6f * (float) zp + (float) (0.3f * zpz));
|
||||||
|
gun.setScaleZ(1f - (0.35f * (float) zp));
|
||||||
|
|
||||||
|
shen.setPosX((float) (0.95f * ClientEventHandler.recoilHorizon * fpz * fp));
|
||||||
|
shen.setPosY((float) (0.4f * fp + 0.44f * fr));
|
||||||
|
shen.setPosZ((float) (2.825 * fp + 0.17f * fr + 1.175 * fpz));
|
||||||
|
shen.setRotX((float) (0.01f * fp + 0.15f * fr + 0.01f * fpz));
|
||||||
|
shen.setRotY((float) (0.1f * ClientEventHandler.recoilHorizon * fpz));
|
||||||
|
shen.setRotZ((float) ((0.08f + 0.1 * fr) * ClientEventHandler.recoilHorizon));
|
||||||
|
|
||||||
|
shen.setPosX((float) (shen.getPosX() * (1 - 0.4 * zt)));
|
||||||
|
shen.setPosY((float) (shen.getPosY() * (1 - 0.5 * zt)));
|
||||||
|
shen.setPosZ((float) (shen.getPosZ() * (1 - 0.7 * zt)));
|
||||||
|
shen.setRotX((float) (shen.getRotX() * (1 - 0.87 * zt)));
|
||||||
|
shen.setRotY((float) (shen.getRotY() * (1 - 0.7 * zt)));
|
||||||
|
shen.setRotZ((float) (shen.getRotZ() * (1 - 0.65 * zt)));
|
||||||
|
|
||||||
|
CrossHairOverlay.gunRot = shen.getRotZ();
|
||||||
|
|
||||||
|
CoreGeoBone bolt = getAnimationProcessor().getBone("bolt");
|
||||||
|
CoreGeoBone lun = getAnimationProcessor().getBone("lun");
|
||||||
|
bolt.setPosZ(6f * (float) fp);
|
||||||
|
lun.setRotZ(45f * (float) (Mth.clamp(ClientEventHandler.firePosTimer, 0, 1)) * Mth.DEG_TO_RAD);
|
||||||
|
|
||||||
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
root.setPosX((float) (movePosX + 20 * ClientEventHandler.drawTime + 9.3f * mph));
|
||||||
|
root.setPosY((float) (swayY + movePosY - 40 * ClientEventHandler.drawTime - 2f * vY));
|
||||||
|
root.setRotX((float) (swayX - Mth.DEG_TO_RAD * 60 * ClientEventHandler.drawTime + Mth.DEG_TO_RAD * turnRotX - 0.15f * vY));
|
||||||
|
root.setRotY((float) (0.2f * movePosX + Mth.DEG_TO_RAD * 300 * ClientEventHandler.drawTime + Mth.DEG_TO_RAD * turnRotY));
|
||||||
|
root.setRotZ((float) (0.2f * movePosX + moveRotZ + Mth.DEG_TO_RAD * 90 * ClientEventHandler.drawTime + 2.7f * mph + Mth.DEG_TO_RAD * turnRotZ));
|
||||||
|
|
||||||
|
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||||
|
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||||
|
|
||||||
|
float numR = (float) (1 - 0.12 * zt);
|
||||||
|
float numP = (float) (1 - 0.68 * zt);
|
||||||
|
|
||||||
|
if (GunsTool.getGunIntTag(stack, "ReloadTime") > 0) {
|
||||||
|
main.setRotX(numR * main.getRotX());
|
||||||
|
main.setRotY(numR * main.getRotY());
|
||||||
|
main.setRotZ(numR * main.getRotZ());
|
||||||
|
main.setPosX(numP * main.getPosX());
|
||||||
|
main.setPosY(numP * main.getPosY());
|
||||||
|
main.setPosZ(numP * main.getPosZ());
|
||||||
|
camera.setRotX(numR * camera.getRotX());
|
||||||
|
camera.setRotY(numR * camera.getRotY());
|
||||||
|
camera.setRotZ(numR * camera.getRotZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
ClientEventHandler.shake(Mth.RAD_TO_DEG * camera.getRotX(), Mth.RAD_TO_DEG * camera.getRotY(), Mth.RAD_TO_DEG * camera.getRotZ());
|
||||||
|
}
|
||||||
|
}
|
|
@ -152,7 +152,7 @@ public class CrossHairOverlay {
|
||||||
if (!player.getMainHandItem().is(ModTags.Items.GUN) || ClientEventHandler.zoomTime > 0.8)
|
if (!player.getMainHandItem().is(ModTags.Items.GUN) || ClientEventHandler.zoomTime > 0.8)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return !(player.getMainHandItem().getItem() == ModItems.M_79.get() || player.getMainHandItem().getItem() == ModItems.BOCEK.get())
|
return !(player.getMainHandItem().getItem() == ModItems.M_79.get() || player.getMainHandItem().getItem() == ModItems.BOCEK.get() || player.getMainHandItem().getItem() == ModItems.SECONDARY_CATACLYSM.get())
|
||||||
&& Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON;
|
&& Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class M79UIOverlay {
|
||||||
private static boolean shouldRenderCrossHair(Player player) {
|
private static boolean shouldRenderCrossHair(Player player) {
|
||||||
if (player == null) return false;
|
if (player == null) return false;
|
||||||
return !player.isSpectator()
|
return !player.isSpectator()
|
||||||
&& player.getMainHandItem().getItem() == ModItems.M_79.get()
|
&& (player.getMainHandItem().getItem() == ModItems.M_79.get() || player.getMainHandItem().getItem() == ModItems.SECONDARY_CATACLYSM.get())
|
||||||
&& (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON || (player.isPassenger() && player.getVehicle() instanceof ICannonEntity))
|
&& (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON || (player.isPassenger() && player.getVehicle() instanceof ICannonEntity))
|
||||||
&& !ClientEventHandler.zoom;
|
&& !ClientEventHandler.zoom;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,135 @@
|
||||||
|
package com.atsuishio.superbwarfare.client.renderer.item;
|
||||||
|
|
||||||
|
import com.atsuishio.superbwarfare.client.AnimationHelper;
|
||||||
|
import com.atsuishio.superbwarfare.client.model.item.SecondaryCataclysmModel;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientEventHandler;
|
||||||
|
import com.atsuishio.superbwarfare.init.ModTags;
|
||||||
|
import com.atsuishio.superbwarfare.item.gun.launcher.SecondaryCataclysm;
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.model.PlayerModel;
|
||||||
|
import net.minecraft.client.player.AbstractClientPlayer;
|
||||||
|
import net.minecraft.client.renderer.MultiBufferSource;
|
||||||
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
import net.minecraft.client.renderer.entity.player.PlayerRenderer;
|
||||||
|
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||||
|
import software.bernie.geckolib.cache.object.GeoBone;
|
||||||
|
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||||
|
import software.bernie.geckolib.util.RenderUtils;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class SecondaryCataclysmRenderer extends GeoItemRenderer<SecondaryCataclysm> {
|
||||||
|
|
||||||
|
public SecondaryCataclysmRenderer() {
|
||||||
|
super(new SecondaryCataclysmModel());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RenderType getRenderType(SecondaryCataclysm animatable, ResourceLocation texture, MultiBufferSource bufferSource, float partialTick) {
|
||||||
|
return RenderType.entityTranslucent(getTextureLocation(animatable));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final float SCALE_RECIPROCAL = 1.0f / 16.0f;
|
||||||
|
protected boolean renderArms = false;
|
||||||
|
protected MultiBufferSource currentBuffer;
|
||||||
|
protected RenderType renderType;
|
||||||
|
public ItemDisplayContext transformType;
|
||||||
|
protected SecondaryCataclysm animatable;
|
||||||
|
private final Set<String> hiddenBones = new HashSet<>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderByItem(ItemStack stack, ItemDisplayContext transformType, PoseStack matrixStack, MultiBufferSource bufferIn, int combinedLightIn, int p_239207_6_) {
|
||||||
|
this.transformType = transformType;
|
||||||
|
if (this.animatable != null)
|
||||||
|
this.animatable.getTransformType(transformType);
|
||||||
|
super.renderByItem(stack, transformType, matrixStack, bufferIn, combinedLightIn, p_239207_6_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actuallyRender(PoseStack matrixStackIn, SecondaryCataclysm animatable, BakedGeoModel model, RenderType type, MultiBufferSource renderTypeBuffer, VertexConsumer vertexBuilder, boolean isRenderer, float partialTicks, int packedLightIn,
|
||||||
|
int packedOverlayIn, float red, float green, float blue, float alpha) {
|
||||||
|
this.currentBuffer = renderTypeBuffer;
|
||||||
|
this.renderType = type;
|
||||||
|
this.animatable = animatable;
|
||||||
|
super.actuallyRender(matrixStackIn, animatable, model, type, renderTypeBuffer, vertexBuilder, isRenderer, partialTicks, packedLightIn, packedOverlayIn, red, green, blue, alpha);
|
||||||
|
if (this.renderArms) {
|
||||||
|
this.renderArms = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderRecursively(PoseStack stack, SecondaryCataclysm animatable, GeoBone bone, RenderType type, MultiBufferSource buffer, VertexConsumer bufferIn, boolean isReRender, float partialTick, int packedLightIn, int packedOverlayIn, float red,
|
||||||
|
float green, float blue, float alpha) {
|
||||||
|
Minecraft mc = Minecraft.getInstance();
|
||||||
|
String name = bone.getName();
|
||||||
|
boolean renderingArms = false;
|
||||||
|
if (name.equals("Lefthand") || name.equals("Righthand")) {
|
||||||
|
bone.setHidden(true);
|
||||||
|
renderingArms = true;
|
||||||
|
} else {
|
||||||
|
bone.setHidden(this.hiddenBones.contains(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = mc.player;
|
||||||
|
if (player == null) return;
|
||||||
|
ItemStack itemStack = player.getMainHandItem();
|
||||||
|
if (!itemStack.is(ModTags.Items.GUN)) return;
|
||||||
|
|
||||||
|
if (name.equals("flare")) {
|
||||||
|
if (ClientEventHandler.firePosTimer == 0 || ClientEventHandler.firePosTimer > 0.5) {
|
||||||
|
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 (this.transformType.firstPerson() && renderingArms) {
|
||||||
|
AbstractClientPlayer localPlayer = mc.player;
|
||||||
|
|
||||||
|
if (localPlayer == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerRenderer playerRenderer = (PlayerRenderer) mc.getEntityRenderDispatcher().getRenderer(localPlayer);
|
||||||
|
PlayerModel<AbstractClientPlayer> model = playerRenderer.getModel();
|
||||||
|
stack.pushPose();
|
||||||
|
RenderUtils.translateMatrixToBone(stack, bone);
|
||||||
|
RenderUtils.translateToPivotPoint(stack, bone);
|
||||||
|
RenderUtils.rotateMatrixAroundBone(stack, bone);
|
||||||
|
RenderUtils.scaleMatrixForBone(stack, bone);
|
||||||
|
RenderUtils.translateAwayFromPivotPoint(stack, bone);
|
||||||
|
ResourceLocation loc = localPlayer.getSkinTextureLocation();
|
||||||
|
VertexConsumer armBuilder = this.currentBuffer.getBuffer(RenderType.entitySolid(loc));
|
||||||
|
VertexConsumer sleeveBuilder = this.currentBuffer.getBuffer(RenderType.entityTranslucent(loc));
|
||||||
|
if (name.equals("Lefthand")) {
|
||||||
|
stack.translate(-1.0f * SCALE_RECIPROCAL, 2.0f * SCALE_RECIPROCAL, 0.0f);
|
||||||
|
AnimationHelper.renderPartOverBone2(model.leftArm, bone, stack, armBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
|
||||||
|
AnimationHelper.renderPartOverBone2(model.leftSleeve, bone, stack, sleeveBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
|
||||||
|
} else {
|
||||||
|
stack.translate(SCALE_RECIPROCAL, 2.0f * SCALE_RECIPROCAL, 0.0f);
|
||||||
|
AnimationHelper.renderPartOverBone2(model.rightArm, bone, stack, armBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
|
||||||
|
AnimationHelper.renderPartOverBone2(model.rightSleeve, bone, stack, sleeveBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.currentBuffer.getBuffer(this.renderType);
|
||||||
|
stack.popPose();
|
||||||
|
}
|
||||||
|
super.renderRecursively(stack, animatable, bone, type, buffer, bufferIn, isReRender, partialTick, packedLightIn, packedOverlayIn, red, green, blue, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResourceLocation getTextureLocation(SecondaryCataclysm instance) {
|
||||||
|
return super.getTextureLocation(instance);
|
||||||
|
}
|
||||||
|
}
|
|
@ -94,7 +94,7 @@ public class ModItemTagProvider extends ItemTagsProvider {
|
||||||
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(), ModItems.SECONDARY_CATACLYSM.get());
|
||||||
|
|
||||||
this.tag(ModTags.Items.REVOLVER).add(ModItems.TRACHELIUM.get());
|
this.tag(ModTags.Items.REVOLVER).add(ModItems.TRACHELIUM.get());
|
||||||
|
|
||||||
|
|
|
@ -569,6 +569,8 @@ public class GunEventHandler {
|
||||||
tag.putBoolean("force_stage3_start", true);
|
tag.putBoolean("force_stage3_start", true);
|
||||||
} else if (stack.is(ModTags.Items.USE_RIFLE_AMMO) && capability.rifleAmmo == 0) {
|
} else if (stack.is(ModTags.Items.USE_RIFLE_AMMO) && capability.rifleAmmo == 0) {
|
||||||
tag.putBoolean("force_stage3_start", true);
|
tag.putBoolean("force_stage3_start", true);
|
||||||
|
} else if (stack.is(ModTags.Items.LAUNCHER) && GunsTool.getGunIntTag(stack, "MaxAmmo") == 0) {
|
||||||
|
tag.putBoolean("force_stage3_start", true);
|
||||||
} else {
|
} else {
|
||||||
tag.putInt("reload_stage", 2);
|
tag.putInt("reload_stage", 2);
|
||||||
}
|
}
|
||||||
|
@ -611,6 +613,12 @@ public class GunEventHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stack.getItem() == ModItems.SECONDARY_CATACLYSM.get()) {
|
||||||
|
if (tag.getInt("iterative") == 5) {
|
||||||
|
singleLoad(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (stack.getItem() == ModItems.K_98.get() || stack.getItem() == ModItems.MOSIN_NAGANT.get()) {
|
if (stack.getItem() == ModItems.K_98.get() || stack.getItem() == ModItems.MOSIN_NAGANT.get()) {
|
||||||
if (tag.getInt("iterative") == 1) {
|
if (tag.getInt("iterative") == 1) {
|
||||||
singleLoad(player);
|
singleLoad(player);
|
||||||
|
@ -699,6 +707,8 @@ public class GunEventHandler {
|
||||||
capability.rifleAmmo -= 1;
|
capability.rifleAmmo -= 1;
|
||||||
capability.syncPlayerVariables(player);
|
capability.syncPlayerVariables(player);
|
||||||
});
|
});
|
||||||
|
} else if (stack.getItem() == ModItems.SECONDARY_CATACLYSM.get()) {
|
||||||
|
player.getInventory().clearOrCountMatchingItems(p -> p.getItem() == ModItems.GRENADE_40MM.get(), 1, player.inventoryMenu.getCraftSlots());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.atsuishio.superbwarfare.item.gun.handgun.*;
|
||||||
import com.atsuishio.superbwarfare.item.gun.launcher.JavelinItem;
|
import com.atsuishio.superbwarfare.item.gun.launcher.JavelinItem;
|
||||||
import com.atsuishio.superbwarfare.item.gun.launcher.M79Item;
|
import com.atsuishio.superbwarfare.item.gun.launcher.M79Item;
|
||||||
import com.atsuishio.superbwarfare.item.gun.launcher.RpgItem;
|
import com.atsuishio.superbwarfare.item.gun.launcher.RpgItem;
|
||||||
|
import com.atsuishio.superbwarfare.item.gun.launcher.SecondaryCataclysm;
|
||||||
import com.atsuishio.superbwarfare.item.gun.machinegun.DevotionItem;
|
import com.atsuishio.superbwarfare.item.gun.machinegun.DevotionItem;
|
||||||
import com.atsuishio.superbwarfare.item.gun.machinegun.M60Item;
|
import com.atsuishio.superbwarfare.item.gun.machinegun.M60Item;
|
||||||
import com.atsuishio.superbwarfare.item.gun.machinegun.MinigunItem;
|
import com.atsuishio.superbwarfare.item.gun.machinegun.MinigunItem;
|
||||||
|
@ -74,6 +75,7 @@ public class ModItems {
|
||||||
public static final RegistryObject<Item> M_60 = GUNS.register("m_60", M60Item::new);
|
public static final RegistryObject<Item> M_60 = GUNS.register("m_60", M60Item::new);
|
||||||
public static final RegistryObject<Item> MINIGUN = GUNS.register("minigun", MinigunItem::new);
|
public static final RegistryObject<Item> MINIGUN = GUNS.register("minigun", MinigunItem::new);
|
||||||
public static final RegistryObject<Item> M_79 = GUNS.register("m_79", M79Item::new);
|
public static final RegistryObject<Item> M_79 = GUNS.register("m_79", M79Item::new);
|
||||||
|
public static final RegistryObject<Item> SECONDARY_CATACLYSM = GUNS.register("secondary_cataclysm", SecondaryCataclysm::new);
|
||||||
public static final RegistryObject<Item> RPG = GUNS.register("rpg", RpgItem::new);
|
public static final RegistryObject<Item> RPG = GUNS.register("rpg", RpgItem::new);
|
||||||
public static final RegistryObject<Item> JAVELIN = GUNS.register("javelin", JavelinItem::new);
|
public static final RegistryObject<Item> JAVELIN = GUNS.register("javelin", JavelinItem::new);
|
||||||
public static final RegistryObject<Item> BOCEK = GUNS.register("bocek", BocekItem::new);
|
public static final RegistryObject<Item> BOCEK = GUNS.register("bocek", BocekItem::new);
|
||||||
|
|
|
@ -317,6 +317,11 @@ public class ModSounds {
|
||||||
public static final RegistryObject<SoundEvent> JAVELIN_LOCK = REGISTRY.register("javelin_lock", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("javelin_lock")));
|
public static final RegistryObject<SoundEvent> JAVELIN_LOCK = REGISTRY.register("javelin_lock", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("javelin_lock")));
|
||||||
public static final RegistryObject<SoundEvent> JAVELIN_LOCKON = REGISTRY.register("javelin_lockon", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("javelin_lockon")));
|
public static final RegistryObject<SoundEvent> JAVELIN_LOCKON = REGISTRY.register("javelin_lockon", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("javelin_lockon")));
|
||||||
|
|
||||||
|
public static final RegistryObject<SoundEvent> SECONDARY_CATACLYSM_FIRE_1P = REGISTRY.register("secondary_cataclysm_fire_1p", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("secondary_cataclysm_fire_1p")));
|
||||||
|
public static final RegistryObject<SoundEvent> SECONDARY_CATACLYSM_FIRE_3P = REGISTRY.register("secondary_cataclysm_fire_3p", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("secondary_cataclysm_fire_3p")));
|
||||||
|
public static final RegistryObject<SoundEvent> SECONDARY_CATACLYSM_FAR = REGISTRY.register("secondary_cataclysm_far", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("secondary_cataclysm_far")));
|
||||||
|
public static final RegistryObject<SoundEvent> SECONDARY_CATACLYSM_VERYFAR = REGISTRY.register("secondary_cataclysm_veryfar", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("secondary_cataclysm_veryfar")));
|
||||||
|
|
||||||
public static final RegistryObject<SoundEvent> M_2_FIRE_1P = REGISTRY.register("m2_fire_1p", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("m2_fire_1p")));
|
public static final RegistryObject<SoundEvent> M_2_FIRE_1P = REGISTRY.register("m2_fire_1p", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("m2_fire_1p")));
|
||||||
public static final RegistryObject<SoundEvent> M_2_FIRE_3P = REGISTRY.register("m2_fire_3p", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("m2_fire_3p")));
|
public static final RegistryObject<SoundEvent> M_2_FIRE_3P = REGISTRY.register("m2_fire_3p", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("m2_fire_3p")));
|
||||||
public static final RegistryObject<SoundEvent> M_2_FAR = REGISTRY.register("m2_far", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("m2_far")));
|
public static final RegistryObject<SoundEvent> M_2_FAR = REGISTRY.register("m2_far", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("m2_far")));
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.atsuishio.superbwarfare.item.gun.handgun.*;
|
||||||
import com.atsuishio.superbwarfare.item.gun.launcher.JavelinItem;
|
import com.atsuishio.superbwarfare.item.gun.launcher.JavelinItem;
|
||||||
import com.atsuishio.superbwarfare.item.gun.launcher.M79Item;
|
import com.atsuishio.superbwarfare.item.gun.launcher.M79Item;
|
||||||
import com.atsuishio.superbwarfare.item.gun.launcher.RpgItem;
|
import com.atsuishio.superbwarfare.item.gun.launcher.RpgItem;
|
||||||
|
import com.atsuishio.superbwarfare.item.gun.launcher.SecondaryCataclysm;
|
||||||
import com.atsuishio.superbwarfare.item.gun.machinegun.DevotionItem;
|
import com.atsuishio.superbwarfare.item.gun.machinegun.DevotionItem;
|
||||||
import com.atsuishio.superbwarfare.item.gun.machinegun.M60Item;
|
import com.atsuishio.superbwarfare.item.gun.machinegun.M60Item;
|
||||||
import com.atsuishio.superbwarfare.item.gun.machinegun.MinigunItem;
|
import com.atsuishio.superbwarfare.item.gun.machinegun.MinigunItem;
|
||||||
|
@ -72,6 +73,7 @@ public class ModTabs {
|
||||||
output.accept(MinigunItem.getGunInstance());
|
output.accept(MinigunItem.getGunInstance());
|
||||||
output.accept(BocekItem.getGunInstance());
|
output.accept(BocekItem.getGunInstance());
|
||||||
output.accept(M79Item.getGunInstance());
|
output.accept(M79Item.getGunInstance());
|
||||||
|
output.accept(SecondaryCataclysm.getGunInstance());
|
||||||
output.accept(RpgItem.getGunInstance());
|
output.accept(RpgItem.getGunInstance());
|
||||||
output.accept(JavelinItem.getGunInstance());
|
output.accept(JavelinItem.getGunInstance());
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,187 @@
|
||||||
|
package com.atsuishio.superbwarfare.item.gun.launcher;
|
||||||
|
|
||||||
|
import com.atsuishio.superbwarfare.ModUtils;
|
||||||
|
import com.atsuishio.superbwarfare.client.PoseTool;
|
||||||
|
import com.atsuishio.superbwarfare.client.renderer.item.SecondaryCataclysmRenderer;
|
||||||
|
import com.atsuishio.superbwarfare.client.tooltip.component.LauncherImageComponent;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientEventHandler;
|
||||||
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
|
import com.atsuishio.superbwarfare.init.ModTags;
|
||||||
|
import com.atsuishio.superbwarfare.item.AnimatedItem;
|
||||||
|
import com.atsuishio.superbwarfare.item.gun.GunItem;
|
||||||
|
import com.atsuishio.superbwarfare.perk.Perk;
|
||||||
|
import com.atsuishio.superbwarfare.perk.PerkHelper;
|
||||||
|
import com.atsuishio.superbwarfare.tools.GunsTool;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
|
import net.minecraft.client.player.LocalPlayer;
|
||||||
|
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.sounds.SoundEvent;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.effect.MobEffects;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.inventory.tooltip.TooltipComponent;
|
||||||
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.Rarity;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import software.bernie.geckolib.animatable.GeoItem;
|
||||||
|
import software.bernie.geckolib.core.animatable.instance.AnimatableInstanceCache;
|
||||||
|
import software.bernie.geckolib.core.animation.AnimatableManager;
|
||||||
|
import software.bernie.geckolib.core.animation.AnimationController;
|
||||||
|
import software.bernie.geckolib.core.animation.AnimationState;
|
||||||
|
import software.bernie.geckolib.core.animation.RawAnimation;
|
||||||
|
import software.bernie.geckolib.core.object.PlayState;
|
||||||
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
public class SecondaryCataclysm extends GunItem implements GeoItem, AnimatedItem {
|
||||||
|
|
||||||
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<SoundEvent> getReloadSound() {
|
||||||
|
return Set.of(ModSounds.M_79_RELOAD_EMPTY.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
public SecondaryCataclysm() {
|
||||||
|
super(new Properties().stacksTo(1).fireResistant().rarity(Rarity.RARE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initializeClient(Consumer<IClientItemExtensions> consumer) {
|
||||||
|
super.initializeClient(consumer);
|
||||||
|
consumer.accept(new IClientItemExtensions() {
|
||||||
|
private final BlockEntityWithoutLevelRenderer renderer = new SecondaryCataclysmRenderer();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntityWithoutLevelRenderer getCustomRenderer() {
|
||||||
|
return renderer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack stack) {
|
||||||
|
return PoseTool.pose(entityLiving, hand, stack);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getTransformType(ItemDisplayContext type) {
|
||||||
|
transformType = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
private PlayState idlePredicate(AnimationState<SecondaryCataclysm> event) {
|
||||||
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
|
if (player == null) return PlayState.STOP;
|
||||||
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||||
|
|
||||||
|
// if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||||
|
// return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sc.reload"));
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (player.isSprinting() && player.onGround() && player.getPersistentData().getDouble("noRun") == 0 && ClientEventHandler.drawTime < 0.01) {
|
||||||
|
if (player.hasEffect(MobEffects.MOVEMENT_SPEED)) {
|
||||||
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sc.run_fast"));
|
||||||
|
} else {
|
||||||
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sc.run"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sc.idle"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||||
|
return this.cache;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||||
|
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||||
|
data.add(idleController);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getAmmoCount(Player player) {
|
||||||
|
int count = 0;
|
||||||
|
for (var inv : player.getInventory().items) {
|
||||||
|
if (inv.is(ModItems.CREATIVE_AMMO_BOX.get())) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 0) {
|
||||||
|
int sum = 0;
|
||||||
|
for (int i = 0; i < player.getInventory().getContainerSize(); ++i) {
|
||||||
|
ItemStack itemstack = player.getInventory().getItem(i);
|
||||||
|
if (check(itemstack)) {
|
||||||
|
sum += itemstack.getCount();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
return (int) Double.POSITIVE_INFINITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void inventoryTick(ItemStack stack, Level world, Entity entity, int slot, boolean selected) {
|
||||||
|
super.inventoryTick(stack, world, entity, slot, selected);
|
||||||
|
if (entity instanceof Player player) {
|
||||||
|
GunsTool.setGunIntTag(stack, "MaxAmmo", getAmmoCount(player));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static boolean check(ItemStack stack) {
|
||||||
|
return stack.getItem() == ModItems.GRENADE_40MM.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getGunInstance() {
|
||||||
|
ItemStack stack = new ItemStack(ModItems.SECONDARY_CATACLYSM.get());
|
||||||
|
GunsTool.initCreativeGun(stack, ModItems.SECONDARY_CATACLYSM.getId().getPath());
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setAnimationProcedure(String procedure) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResourceLocation getGunIcon() {
|
||||||
|
return ModUtils.loc("textures/gun_icon/secondary_cataclysm_icon.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getGunDisplayName() {
|
||||||
|
return "SECONDARY CATACLYSM";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canApplyPerk(Perk perk) {
|
||||||
|
return PerkHelper.LAUNCHER_PERKS.test(perk);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull Optional<TooltipComponent> getTooltipImage(@NotNull ItemStack pStack) {
|
||||||
|
return Optional.of(new LauncherImageComponent(pStack));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isIterativeReload(ItemStack stack) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFireMode() {
|
||||||
|
return FireMode.SEMI.flag;
|
||||||
|
}
|
||||||
|
}
|
|
@ -116,6 +116,10 @@ public class FireMessage {
|
||||||
handleM79Fire(player);
|
handleM79Fire(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stack.getItem() == ModItems.SECONDARY_CATACLYSM.get()) {
|
||||||
|
handleSecondaryCataclysmFire(player);
|
||||||
|
}
|
||||||
|
|
||||||
if (stack.getItem() == ModItems.RPG.get()) {
|
if (stack.getItem() == ModItems.RPG.get()) {
|
||||||
handleRpgFire(player);
|
handleRpgFire(player);
|
||||||
}
|
}
|
||||||
|
@ -527,4 +531,57 @@ public class FireMessage {
|
||||||
ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> serverPlayer), new ShootClientMessage(10));
|
ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> serverPlayer), new ShootClientMessage(10));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void handleSecondaryCataclysmFire(Player player) {
|
||||||
|
if (player.isSpectator()) return;
|
||||||
|
|
||||||
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
if (!GunsTool.getGunBooleanTag(stack, "Reloading")) {
|
||||||
|
if (!player.getCooldowns().isOnCooldown(stack.getItem()) && GunsTool.getGunIntTag(stack, "Ammo", 0) > 0) {
|
||||||
|
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||||
|
double spread = GunsTool.getGunDoubleTag(stack, "Spread");
|
||||||
|
|
||||||
|
Level level = player.level();
|
||||||
|
if (!level.isClientSide()) {
|
||||||
|
GunGrenadeEntity gunGrenadeEntity = new GunGrenadeEntity(player, level,
|
||||||
|
(float) GunsTool.getGunDoubleTag(stack, "Damage", 0),
|
||||||
|
(float) GunsTool.getGunDoubleTag(stack, "ExplosionDamage", 0),
|
||||||
|
(float) GunsTool.getGunDoubleTag(stack, "ExplosionRadius", 0));
|
||||||
|
|
||||||
|
var dmgPerk = PerkHelper.getPerkByType(stack, Perk.Type.DAMAGE);
|
||||||
|
if (dmgPerk == ModPerks.MONSTER_HUNTER.get()) {
|
||||||
|
int perkLevel = PerkHelper.getItemPerkLevel(dmgPerk, stack);
|
||||||
|
gunGrenadeEntity.setMonsterMultiplier(0.1f + 0.1f * perkLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
gunGrenadeEntity.setPos(player.getX(), player.getEyeY() - 0.1, player.getZ());
|
||||||
|
gunGrenadeEntity.shoot(player.getLookAngle().x, player.getLookAngle().y, player.getLookAngle().z, (float) GunsTool.getGunDoubleTag(stack, "Velocity", 0),
|
||||||
|
(float) (zoom ? 0.1 : spread));
|
||||||
|
level.addFreshEntity(gunGrenadeEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player.level() instanceof ServerLevel serverLevel) {
|
||||||
|
ParticleTool.sendParticle(serverLevel, ParticleTypes.CLOUD, player.getX() + 1.8 * player.getLookAngle().x,
|
||||||
|
player.getY() + player.getBbHeight() - 0.1 + 1.8 * player.getLookAngle().y,
|
||||||
|
player.getZ() + 1.8 * player.getLookAngle().z,
|
||||||
|
4, 0.1, 0.1, 0.1, 0.002, true);
|
||||||
|
}
|
||||||
|
player.getCooldowns().addCooldown(stack.getItem(), 2);
|
||||||
|
|
||||||
|
if (player instanceof ServerPlayer serverPlayer) {
|
||||||
|
SoundTool.playLocalSound(serverPlayer, ModSounds.SECONDARY_CATACLYSM_FIRE_1P.get(), 1, 1);
|
||||||
|
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.SECONDARY_CATACLYSM_FIRE_3P.get(), SoundSource.PLAYERS, 3, 1);
|
||||||
|
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.SECONDARY_CATACLYSM_FAR.get(), SoundSource.PLAYERS, 5, 1);
|
||||||
|
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.SECONDARY_CATACLYSM_VERYFAR.get(), SoundSource.PLAYERS, 10, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
GunsTool.setGunIntTag(stack, "Ammo", GunsTool.getGunIntTag(stack, "Ammo", 0) - 1);
|
||||||
|
player.getCooldowns().addCooldown(stack.getItem(), 5);
|
||||||
|
|
||||||
|
if (player.level() instanceof ServerLevel && player instanceof ServerPlayer serverPlayer) {
|
||||||
|
ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> serverPlayer), new ShootClientMessage(10));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,11 +75,7 @@ public class ReloadMessage {
|
||||||
return;
|
return;
|
||||||
} else if (stack.getItem() == ModItems.TASER.get() && GunsTool.getGunIntTag(stack, "MaxAmmo") == 0) {
|
} else if (stack.getItem() == ModItems.TASER.get() && GunsTool.getGunIntTag(stack, "MaxAmmo") == 0) {
|
||||||
return;
|
return;
|
||||||
} else if (stack.getItem() == ModItems.M_79.get() && GunsTool.getGunIntTag(stack, "MaxAmmo") == 0) {
|
} else if (stack.is(ModTags.Items.LAUNCHER) && GunsTool.getGunIntTag(stack, "MaxAmmo") == 0) {
|
||||||
return;
|
|
||||||
} else if (stack.getItem() == ModItems.RPG.get() && GunsTool.getGunIntTag(stack, "MaxAmmo") == 0) {
|
|
||||||
return;
|
|
||||||
} else if (stack.getItem() == ModItems.JAVELIN.get() && GunsTool.getGunIntTag(stack, "MaxAmmo") == 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,121 @@
|
||||||
|
{
|
||||||
|
"format_version": "1.8.0",
|
||||||
|
"animations": {
|
||||||
|
"animation.sc.idle": {
|
||||||
|
"loop": true
|
||||||
|
},
|
||||||
|
"animation.sc.run": {
|
||||||
|
"loop": true,
|
||||||
|
"animation_length": 0.8,
|
||||||
|
"bones": {
|
||||||
|
"0": {
|
||||||
|
"rotation": {
|
||||||
|
"0.0": {
|
||||||
|
"post": [-25.00621, -59.83725, 41.46537],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.2": {
|
||||||
|
"post": [-21.82587, -59.91354, 41.25356],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.4": {
|
||||||
|
"post": [-25.00621, -59.83725, 41.46537],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.6": {
|
||||||
|
"post": [-28.17843, -59.75519, 41.66794],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.8": {
|
||||||
|
"post": [-25.00621, -59.83725, 41.46537],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"0.0": {
|
||||||
|
"post": [7.5, -3.25, 0.25],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.2": {
|
||||||
|
"post": [5.75, -2.25, 0.25],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.4": {
|
||||||
|
"post": [4.5, -3.25, 0.25],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.6": {
|
||||||
|
"post": [5.75, -2.25, 0.25],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.8": {
|
||||||
|
"post": [7.5, -3.25, 0.25],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"animation.sc.run_fast": {
|
||||||
|
"loop": true,
|
||||||
|
"animation_length": 0.8,
|
||||||
|
"bones": {
|
||||||
|
"0": {
|
||||||
|
"rotation": {
|
||||||
|
"0.0": {
|
||||||
|
"post": [-32.72249, -56.9793, 30.9509],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.2": {
|
||||||
|
"post": [-44.91973, -52.78811, 43.16922],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.4": {
|
||||||
|
"post": [-32.72249, -56.9793, 30.9509],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.6": {
|
||||||
|
"post": [-21.65604, -52.03107, 18.86033],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.8": {
|
||||||
|
"post": [-32.72249, -56.9793, 30.9509],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"0.0": {
|
||||||
|
"post": [6.5, -2, 0.5],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.2": {
|
||||||
|
"post": [3.75, -0.75, 0.5],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.4": {
|
||||||
|
"post": [1.5, -2, 0.5],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.6": {
|
||||||
|
"post": [3.75, -0.75, 0.5],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
},
|
||||||
|
"0.8": {
|
||||||
|
"post": [6.5, -2, 0.5],
|
||||||
|
"lerp_mode": "catmullrom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"camera": {
|
||||||
|
"rotation": {
|
||||||
|
"0.0": [-0.3, -0.3, 0.3],
|
||||||
|
"0.2": [0.3, 0, -0.3],
|
||||||
|
"0.4": [-0.3, 0.3, 0.3],
|
||||||
|
"0.6": [0.3, 0, -0.3],
|
||||||
|
"0.8": [-0.3, -0.3, 0.3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load diff
|
@ -47,6 +47,7 @@
|
||||||
"item.superbwarfare.k_98": "KAR-98K",
|
"item.superbwarfare.k_98": "KAR-98K",
|
||||||
"item.superbwarfare.mosin_nagant": "Mosin Nagant",
|
"item.superbwarfare.mosin_nagant": "Mosin Nagant",
|
||||||
"item.superbwarfare.javelin": "FGM-148 Javelin",
|
"item.superbwarfare.javelin": "FGM-148 Javelin",
|
||||||
|
"item.superbwarfare.secondary_cataclysm": "Secondary Cataclysm Grenade Launcher",
|
||||||
|
|
||||||
"des.superbwarfare.guns.damage": "Damage: ",
|
"des.superbwarfare.guns.damage": "Damage: ",
|
||||||
"des.superbwarfare.guns.level": "Level: ",
|
"des.superbwarfare.guns.level": "Level: ",
|
||||||
|
@ -104,6 +105,7 @@
|
||||||
"item.superbwarfare.mle_1934_blueprint": "138.6mm50 Mle1934 R1938 Blueprint",
|
"item.superbwarfare.mle_1934_blueprint": "138.6mm50 Mle1934 R1938 Blueprint",
|
||||||
"item.superbwarfare.annihilator_blueprint": "Annihilator Energy Gun Blueprint",
|
"item.superbwarfare.annihilator_blueprint": "Annihilator Energy Gun Blueprint",
|
||||||
"item.superbwarfare.m2hb_blueprint": "Annihilator Energy Gun Blueprint",
|
"item.superbwarfare.m2hb_blueprint": "Annihilator Energy Gun Blueprint",
|
||||||
|
"item.superbwarfare.secondary_cataclysm_blueprint": "Secondary Cataclysm Grenade Launcher Blueprint",
|
||||||
|
|
||||||
"item.superbwarfare.common_material_pack": "Common Material Pack",
|
"item.superbwarfare.common_material_pack": "Common Material Pack",
|
||||||
"item.superbwarfare.rare_material_pack": "Rare Material Pack",
|
"item.superbwarfare.rare_material_pack": "Rare Material Pack",
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
"item.superbwarfare.k_98": "KAR-98K",
|
"item.superbwarfare.k_98": "KAR-98K",
|
||||||
"item.superbwarfare.mosin_nagant": "莫辛纳甘",
|
"item.superbwarfare.mosin_nagant": "莫辛纳甘",
|
||||||
"item.superbwarfare.javelin": "FGM-148标枪导弹",
|
"item.superbwarfare.javelin": "FGM-148标枪导弹",
|
||||||
|
"item.superbwarfare.secondary_cataclysm": "“二次灾变” 榴弹发射器",
|
||||||
|
|
||||||
"des.superbwarfare.guns.upgrade_point": "升级点数: ",
|
"des.superbwarfare.guns.upgrade_point": "升级点数: ",
|
||||||
"des.superbwarfare.guns.damage": "伤害: ",
|
"des.superbwarfare.guns.damage": "伤害: ",
|
||||||
|
@ -104,6 +105,7 @@
|
||||||
"item.superbwarfare.mle_1934_blueprint": "138.6mm50 Mle1934 R1938蓝图",
|
"item.superbwarfare.mle_1934_blueprint": "138.6mm50 Mle1934 R1938蓝图",
|
||||||
"item.superbwarfare.annihilator_blueprint": "歼灭者能量炮蓝图",
|
"item.superbwarfare.annihilator_blueprint": "歼灭者能量炮蓝图",
|
||||||
"item.superbwarfare.m2hb_blueprint": "M2HB重机枪蓝图",
|
"item.superbwarfare.m2hb_blueprint": "M2HB重机枪蓝图",
|
||||||
|
"item.superbwarfare.secondary_cataclysm_blueprint": "“二次灾变” 榴弹发射器蓝图",
|
||||||
|
|
||||||
"item.superbwarfare.common_material_pack": "普通材料包",
|
"item.superbwarfare.common_material_pack": "普通材料包",
|
||||||
"item.superbwarfare.rare_material_pack": "稀有材料包",
|
"item.superbwarfare.rare_material_pack": "稀有材料包",
|
||||||
|
|
|
@ -0,0 +1,104 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "builtin/entity",
|
||||||
|
"texture_size": [
|
||||||
|
128,
|
||||||
|
128
|
||||||
|
],
|
||||||
|
"display": {
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
0.75,
|
||||||
|
-3.25
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.55,
|
||||||
|
0.55,
|
||||||
|
0.55
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"thirdperson_lefthand": {
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
0.75,
|
||||||
|
-3.25
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.55,
|
||||||
|
0.55,
|
||||||
|
0.55
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"firstperson_righthand": {
|
||||||
|
"translation": [
|
||||||
|
2.75,
|
||||||
|
-10,
|
||||||
|
-24
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
4,
|
||||||
|
4,
|
||||||
|
4
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"firstperson_lefthand": {
|
||||||
|
"rotation": [
|
||||||
|
90,
|
||||||
|
45,
|
||||||
|
-90
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
0.5,
|
||||||
|
-0.5,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
3,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gui": {
|
||||||
|
"rotation": [
|
||||||
|
30,
|
||||||
|
-145,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.6,
|
||||||
|
0.6,
|
||||||
|
0.6
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [
|
||||||
|
0,
|
||||||
|
90,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
-1.75,
|
||||||
|
-0.25,
|
||||||
|
-2
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
1.1,
|
||||||
|
1.1,
|
||||||
|
1.1
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"loader": "forge:separate_transforms",
|
||||||
|
"gui_light": "front",
|
||||||
|
"base": {
|
||||||
|
"parent": "superbwarfare:item/secondary_cataclysm_base"
|
||||||
|
},
|
||||||
|
"perspectives": {
|
||||||
|
"gui": {
|
||||||
|
"parent": "superbwarfare:item/secondary_cataclysm_icon"
|
||||||
|
},
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"parent": "superbwarfare:item/secondary_cataclysm_3d"
|
||||||
|
},
|
||||||
|
"thirdperson_lefthand": {
|
||||||
|
"parent": "superbwarfare:item/secondary_cataclysm_3d"
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"parent": "superbwarfare:item/secondary_cataclysm_3d"
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"parent": "superbwarfare:item/secondary_cataclysm_3d"
|
||||||
|
},
|
||||||
|
"head": {
|
||||||
|
"parent": "superbwarfare:item/secondary_cataclysm_3d"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "superbwarfare:displaysettings/secondary_cataclysm.item",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "superbwarfare:item/secondary_cataclysm"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "superbwarfare:item/secondary_cataclysm_icon"
|
||||||
|
}
|
||||||
|
}
|
|
@ -2608,5 +2608,37 @@
|
||||||
"stream": false
|
"stream": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"secondary_cataclysm_fire_1p": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:secondary_cataclysm/secondary_cataclysm_fire_1p",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"secondary_cataclysm_fire_3p": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:secondary_cataclysm/secondary_cataclysm_fire_3p",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"secondary_cataclysm_far": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:secondary_cataclysm/secondary_cataclysm_far",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"secondary_cataclysm_veryfar": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:secondary_cataclysm/secondary_cataclysm_veryfar",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"Spread": 1.5,
|
||||||
|
"RecoilX": 0.004,
|
||||||
|
"RecoilY": 0.023,
|
||||||
|
"Damage": 40,
|
||||||
|
"ExplosionDamage": 80,
|
||||||
|
"ExplosionRadius": 5,
|
||||||
|
"Velocity": 3.75,
|
||||||
|
"Magazine": 8,
|
||||||
|
"Weight": 9,
|
||||||
|
"PrepareTime": 29,
|
||||||
|
"PrepareEmptyTime": 16,
|
||||||
|
"IterativeTime": 11,
|
||||||
|
"FinishTime": 18,
|
||||||
|
"SoundRadius": 8
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue