添加ak12

This commit is contained in:
Atsuihsio 2024-10-13 21:25:27 +08:00
parent 20c5eaabde
commit a51c8ea302
58 changed files with 10771 additions and 46 deletions

View file

@ -1,4 +1,4 @@
// 1.20.1 2024-10-09T04:53:17.1268589 Tags for minecraft:item mod id superbwarfare
// 1.20.1 2024-10-13T19:11:49.1758299 Tags for minecraft:item mod id superbwarfare
cf8d49a8d2872286d1a9c3d4a7e1c2b7690db0b8 data/forge/tags/items/dusts.json
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/forge/tags/items/dusts/coal_coke.json
295ddf906b7133a0558d03e9a60eea18281fe430 data/forge/tags/items/dusts/iron.json
@ -28,19 +28,19 @@ af6fd64b4a685c353f243763db268f7b2304c009 data/forge/tags/items/storage_blocks/le
144e54d908121dee498b2ebba3b24b09fd6f18d9 data/forge/tags/items/storage_blocks/tungsten.json
4d4dfd25a2a749e000e1bb742c2f984d4e094e5d data/superbwarfare/tags/items/cannot_reload.json
c0d8d0b01d86ea9a0386908ca59c5b660ac48c3b data/superbwarfare/tags/items/extra_one_ammo.json
99a5a3a4bb6b5fb641dcd449937365ea174f3797 data/superbwarfare/tags/items/gun.json
52598e22974c8da0d2852defe4c9005e1d67744b data/superbwarfare/tags/items/gun.json
62eb408544731ce4cfcd119d8a6cc74731189ac0 data/superbwarfare/tags/items/handgun.json
c28a85bbe8de35bb681cc50e6e29631410e79b06 data/superbwarfare/tags/items/is_auto_weapon.json
dae3f86663e841d336efff9d23d8910aa7247be5 data/superbwarfare/tags/items/is_auto_weapon.json
68ec25b0ccd68abbbe2f33ab7097572c2140c9da data/superbwarfare/tags/items/launcher.json
b404c6fd99d2ca68c6738f225cb7d68ee443c10a data/superbwarfare/tags/items/machine_gun.json
a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/items/military_armor.json
4dc20b4a6b2978aba06811a61d1a8e693e1f7b04 data/superbwarfare/tags/items/normal_gun.json
2885fc6c956890f0134e4e015e989dc1c9c1e86d data/superbwarfare/tags/items/open_bolt.json
d5dba8cfbb1e4208a1917cf0cf1ab85a82c6827e data/superbwarfare/tags/items/rifle.json
1ff5db892183135cbdd9c38a6b8c6e4eb287341e data/superbwarfare/tags/items/normal_gun.json
324ad3d6125d66153f899a424521bc99f2c0dde8 data/superbwarfare/tags/items/open_bolt.json
aaa533157491a82b8e23b2914deef67c4078cbed data/superbwarfare/tags/items/rifle.json
acd4d19dfadb71a1cec43e9c0f4a38fe8d3cf8cb data/superbwarfare/tags/items/shotgun.json
4aca0fa3f8b9f2a4920041e35e46dae7e93d5482 data/superbwarfare/tags/items/smg.json
13a23684e04832bea5dfbd2c0a9d9ed52dcb3422 data/superbwarfare/tags/items/sniper_rifle.json
89139144b7557cfd8fdeca93b0af28e69bb18d76 data/superbwarfare/tags/items/use_handgun_ammo.json
bd822d9189f80478841e951c75133c368e7cd5d0 data/superbwarfare/tags/items/use_rifle_ammo.json
cb6859a204e1601f93895960caa5cefda0b78b08 data/superbwarfare/tags/items/use_rifle_ammo.json
acd4d19dfadb71a1cec43e9c0f4a38fe8d3cf8cb data/superbwarfare/tags/items/use_shotgun_ammo.json
13a23684e04832bea5dfbd2c0a9d9ed52dcb3422 data/superbwarfare/tags/items/use_sniper_ammo.json

View file

@ -1,5 +1,6 @@
// 1.20.1 2024-10-01T17:58:21.3902677 Item Models: superbwarfare
// 1.20.1 2024-10-13T21:19:13.9561013 Item Models: superbwarfare
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/aa_12_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_12_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_47_blueprint.json
c993bddc0db9453ffbefa59f9ac9a74dba909038 assets/superbwarfare/models/item/ancient_cpu.json
4b8fe8fbe5e64c3449ad539317254e4ed7188411 assets/superbwarfare/models/item/ap_head.json

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "superbwarfare:item/gun_blueprint"
}
}

View file

@ -8,6 +8,7 @@
"superbwarfare:trachelium",
"superbwarfare:vector",
"superbwarfare:ak_47",
"superbwarfare:ak_12",
"superbwarfare:sks",
"superbwarfare:m_4",
"superbwarfare:hk_416",

View file

@ -2,6 +2,7 @@
"values": [
"superbwarfare:aa_12",
"superbwarfare:ak_47",
"superbwarfare:ak_12",
"superbwarfare:hk_416",
"superbwarfare:aa_12",
"superbwarfare:m_4",

View file

@ -2,6 +2,7 @@
"values": [
"superbwarfare:abekiri",
"superbwarfare:ak_47",
"superbwarfare:ak_12",
"superbwarfare:svd",
"superbwarfare:m_60",
"superbwarfare:mk_14",

View file

@ -2,6 +2,7 @@
"values": [
"superbwarfare:abekiri",
"superbwarfare:ak_47",
"superbwarfare:ak_12",
"superbwarfare:svd",
"superbwarfare:m_60",
"superbwarfare:mk_14",

View file

@ -6,6 +6,7 @@
"superbwarfare:mk_14",
"superbwarfare:marlin",
"superbwarfare:ak_47",
"superbwarfare:ak_12",
"superbwarfare:qbz_95"
]
}

View file

@ -9,6 +9,7 @@
"superbwarfare:mk_14",
"superbwarfare:marlin",
"superbwarfare:ak_47",
"superbwarfare:ak_12",
"superbwarfare:qbz_95",
"superbwarfare:rpk"
]

View file

@ -0,0 +1,27 @@
package net.mcreator.superbwarfare.client.layer;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.mcreator.superbwarfare.ModUtils;
import net.mcreator.superbwarfare.item.gun.rifle.AK12Item;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.renderer.GeoRenderer;
import software.bernie.geckolib.renderer.layer.GeoRenderLayer;
public class AK12Layer extends GeoRenderLayer<AK12Item> {
private static final ResourceLocation LAYER = new ResourceLocation(ModUtils.MODID, "textures/item/ak12_e.png");
public AK12Layer(GeoRenderer<AK12Item> entityRenderer) {
super(entityRenderer);
}
@Override
public void render(PoseStack poseStack, AK12Item animatable, BakedGeoModel bakedModel, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, float partialTick, int packedLight, int packedOverlay) {
RenderType glowRenderType = RenderType.eyes(LAYER);
getRenderer().reRender(getDefaultBakedModel(animatable), poseStack, bufferSource, animatable, glowRenderType, bufferSource.getBuffer(glowRenderType), partialTick, packedLight, OverlayTexture.NO_OVERLAY, 1, 1, 1, 1);
}
}

View file

@ -0,0 +1,120 @@
package net.mcreator.superbwarfare.client.model.item;
import net.mcreator.superbwarfare.ModUtils;
import net.mcreator.superbwarfare.event.ClientEventHandler;
import net.mcreator.superbwarfare.init.ModTags;
import net.mcreator.superbwarfare.item.gun.rifle.AK12Item;
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 org.lwjgl.glfw.GLFW;
import software.bernie.geckolib.core.animatable.model.CoreGeoBone;
import software.bernie.geckolib.core.animation.AnimationState;
import software.bernie.geckolib.model.GeoModel;
public class AK12ItemModel extends GeoModel<AK12Item> {
@Override
public ResourceLocation getAnimationResource(AK12Item animatable) {
return new ResourceLocation(ModUtils.MODID, "animations/ak12.animation.json");
}
@Override
public ResourceLocation getModelResource(AK12Item animatable) {
return new ResourceLocation(ModUtils.MODID, "geo/ak12.geo.json");
}
@Override
public ResourceLocation getTextureResource(AK12Item animatable) {
return new ResourceLocation(ModUtils.MODID, "textures/item/ak12.png");
}
@Override
public void setCustomAnimations(AK12Item animatable, long instanceId, AnimationState animationState) {
CoreGeoBone gun = getAnimationProcessor().getBone("bone");
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
CoreGeoBone scope = getAnimationProcessor().getBone("okp");
CoreGeoBone shuan = getAnimationProcessor().getBone("shuan");
Player player = Minecraft.getInstance().player;
if (player == null) return;
ItemStack stack = player.getMainHandItem();
if (!stack.is(ModTags.Items.GUN)) return;
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 fp = ClientEventHandler.firePos;
double fr = ClientEventHandler.fireRot;
gun.setPosX(1.97f * (float) zp);
gun.setPosY(0.351f * (float) zp - (float) (0.2f * zpz));
gun.setPosZ(2.8f * (float) zp + (float) (0.5f * zpz));
gun.setScaleZ(1f - (0.4f * (float) zp));
scope.setScaleZ(1f - (0.4f * (float) zp));
stack.getOrCreateTag().putBoolean("HoloHidden", !(gun.getPosX() > 1.8));
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS) {
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
shen.setRotX(0.007f * (float) (fp + fr));
shen.setRotZ(0f);
} else {
shen.setPosY(-0.03f * (float) (fp + 2 * fr));
shen.setPosZ(0.65f * (float) (fp + 0.54f * fr));
shen.setRotX(0.07f * (float) (0.18f * fp + fr));
shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
}
shen.setPosX(0.2f * (float) (ClientEventHandler.recoilHorizon * (0.25 + 0.4 * ClientEventHandler.fireSpread)));
shuan.setPosZ(2.4f * (float) fp);
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.94 * zt);
float numP = (float) (1 - 0.8 * zt);
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 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());
CoreGeoBone shell1 = getAnimationProcessor().getBone("shell1");
CoreGeoBone shell2 = getAnimationProcessor().getBone("shell2");
CoreGeoBone shell3 = getAnimationProcessor().getBone("shell3");
CoreGeoBone shell4 = getAnimationProcessor().getBone("shell4");
CoreGeoBone shell5 = getAnimationProcessor().getBone("shell5");
ClientEventHandler.handleShells(1f, 0.35f, shell1, shell2, shell3, shell4, shell5);
}
}

View file

@ -0,0 +1,147 @@
package net.mcreator.superbwarfare.client.renderer.item;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.mcreator.superbwarfare.client.layer.AK12Layer;
import net.mcreator.superbwarfare.client.model.item.AK12ItemModel;
import net.mcreator.superbwarfare.item.gun.rifle.AK12Item;
import net.mcreator.superbwarfare.tools.AnimUtils;
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 org.lwjgl.glfw.GLFW;
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 AK12ItemRenderer extends GeoItemRenderer<AK12Item> {
public AK12ItemRenderer() {
super(new AK12ItemModel());
this.addRenderLayer(new AK12Layer(this));
}
@Override
public RenderType getRenderType(AK12Item 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 AK12Item 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, AK12Item 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, AK12Item 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));
}
if (name.equals("flare")) {
Player player = Minecraft.getInstance().player;
ItemStack itemStack = null;
if (player != null) {
itemStack = player.getMainHandItem();
}
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") || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS);
}
}
if (this.transformType.firstPerson() && renderingArms) {
AbstractClientPlayer player = mc.player;
if (player == null) {
return;
}
PlayerRenderer playerRenderer = (PlayerRenderer) mc.getEntityRenderDispatcher().getRenderer(player);
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 = player.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);
AnimUtils.renderPartOverBone(model.leftArm, bone, stack, armBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
AnimUtils.renderPartOverBone(model.leftSleeve, bone, stack, sleeveBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
} else {
stack.translate(SCALE_RECIPROCAL, 2.0f * SCALE_RECIPROCAL, 0.0f);
AnimUtils.renderPartOverBone(model.rightArm, bone, stack, armBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
AnimUtils.renderPartOverBone(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(AK12Item instance) {
return super.getTextureLocation(instance);
}
}

View file

@ -118,6 +118,7 @@ public class ModItemModelProvider extends ItemModelProvider {
blueprintItem(ModItems.MARLIN_BLUEPRINT);
blueprintItem(ModItems.M_870_BLUEPRINT);
blueprintItem(ModItems.M_98B_BLUEPRINT);
blueprintItem(ModItems.AK_12_BLUEPRINT);
blueprintItem(ModItems.AK_47_BLUEPRINT);
blueprintItem(ModItems.DEVOTION_BLUEPRINT);
blueprintItem(ModItems.TASER_BLUEPRINT);

View file

@ -67,27 +67,27 @@ public class ModItemTagProvider extends ItemTagsProvider {
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.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.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(),
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.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.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.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());
this.tag(ModTags.Items.OPEN_BOLT).add(ModItems.ABEKIRI.get(), ModItems.AK_47.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.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_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.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_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());
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.IS_AUTO_WEAPON).add(ModItems.AA_12.get(), ModItems.AK_47.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.DEVOTION.get(), ModItems.M_60.get(), ModItems.RPK.get());
this.tag(ModTags.Items.EXTRA_ONE_AMMO).add(ModItems.AK_47.get(), ModItems.SVD.get(), ModItems.MK_14.get(), ModItems.VECTOR.get(),ModItems.SKS.get(),

View file

@ -296,7 +296,6 @@ public class ProjectileEntity extends Entity implements IEntityAdditionalSpawnDa
this.setDeltaMovement(vec.x, vec.y - 0.02, vec.z);
this.tickCount++;
if (this.tickCount > 40) {
this.discard();
}

View file

@ -582,6 +582,9 @@ public class ClientEventHandler {
if (shellIndexTime[i] > 0) {
shellIndexTime[i] = Math.min(shellIndexTime[i] + 5 * times, 50);
}
if (shellIndexTime[i] == 50) {
shellIndexTime[i] = 0;
}
}
}
@ -814,27 +817,6 @@ public class ClientEventHandler {
}
}
// @SubscribeEvent
// public static void handleChangeSlot(LivingEquipmentChangeEvent event) {
// if (event.getEntity() instanceof Player && event.getSlot() == EquipmentSlot.MAINHAND) {
// ItemStack oldStack = event.getFrom();
// ItemStack newStack = event.getTo();
//
// if (newStack.getItem() != oldStack.getItem()
// || newStack.getTag() == null || oldStack.getTag() == null
// || !newStack.getTag().hasUUID("gun_uuid") || !oldStack.getTag().hasUUID("gun_uuid")
// || !newStack.getTag().getUUID("gun_uuid").equals(oldStack.getTag().getUUID("gun_uuid"))
// ) {
// if (newStack.getItem() instanceof GunItem) {
// drawTime = 1;
// for (int i = 0; i < 5; i++) {
// shellIndexTime[i] = 0;
// }
// }
// }
// }
// }
public static void handleDrawMessage(boolean draw, Supplier<NetworkEvent.Context> ctx) {
if (ctx.get().getDirection().getReceptionSide() == LogicalSide.CLIENT) {
drawTime = 1;

View file

@ -54,6 +54,7 @@ public class ModItems {
public static final RegistryObject<Item> TRACHELIUM = GUNS.register("trachelium", Trachelium::new);
public static final RegistryObject<Item> VECTOR = GUNS.register("vector", VectorItem::new);
public static final RegistryObject<Item> AK_47 = GUNS.register("ak_47", AK47Item::new);
public static final RegistryObject<Item> AK_12 = GUNS.register("ak_12", AK12Item::new);
public static final RegistryObject<Item> SKS = GUNS.register("sks", SksItem::new);
public static final RegistryObject<Item> M_4 = GUNS.register("m_4", M4Item::new);
public static final RegistryObject<Item> HK_416 = GUNS.register("hk_416", Hk416Item::new);
@ -205,6 +206,7 @@ public class ModItems {
public static final RegistryObject<Item> M_870_BLUEPRINT = ITEMS.register("m_870_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final RegistryObject<Item> M_98B_BLUEPRINT = ITEMS.register("m_98b_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final RegistryObject<Item> AK_47_BLUEPRINT = ITEMS.register("ak_47_blueprint", () -> new BlueprintItem(Rarity.RARE));
public static final RegistryObject<Item> AK_12_BLUEPRINT = ITEMS.register("ak_12_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final RegistryObject<Item> DEVOTION_BLUEPRINT = ITEMS.register("devotion_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final RegistryObject<Item> TASER_BLUEPRINT = ITEMS.register("taser_blueprint", () -> new BlueprintItem(Rarity.COMMON));
public static final RegistryObject<Item> M_1911_BLUEPRINT = ITEMS.register("m_1911_blueprint", () -> new BlueprintItem(Rarity.COMMON));

View file

@ -75,6 +75,13 @@ public class ModSounds {
public static final RegistryObject<SoundEvent> AK_47_RELOAD_NORMAL = REGISTRY.register("ak_47_reload_normal", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_normal")));
public static final RegistryObject<SoundEvent> AK_47_RELOAD_EMPTY = REGISTRY.register("ak_47_reload_empty", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_empty")));
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_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_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> LAND = REGISTRY.register("land", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "land")));
public static final RegistryObject<SoundEvent> HEADSHOT = REGISTRY.register("headshot", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "headshot")));

View file

@ -50,6 +50,7 @@ public class ModTabs {
output.accept(VectorItem.getGunInstance());
output.accept(SksItem.getGunInstance());
output.accept(AK47Item.getGunInstance());
output.accept(AK12Item.getGunInstance());
output.accept(M4Item.getGunInstance());
output.accept(Hk416Item.getGunInstance());
output.accept(Qbz95Item.getGunInstance());

View file

@ -0,0 +1,164 @@
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.client.renderer.item.AK12ItemRenderer;
import net.mcreator.superbwarfare.event.ClientEventHandler;
import net.mcreator.superbwarfare.init.ModItems;
import net.mcreator.superbwarfare.init.ModSounds;
import net.mcreator.superbwarfare.init.ModTags;
import net.mcreator.superbwarfare.item.AnimatedItem;
import net.mcreator.superbwarfare.item.gun.GunItem;
import net.mcreator.superbwarfare.perk.Perk;
import net.mcreator.superbwarfare.perk.PerkHelper;
import net.mcreator.superbwarfare.tools.GunsTool;
import net.mcreator.superbwarfare.tools.PoseTool;
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.EquipmentSlot;
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.ItemStack;
import net.minecraft.world.item.Rarity;
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
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.Set;
import java.util.UUID;
import java.util.function.Consumer;
public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
@Override
public Set<SoundEvent> getReloadSound() {
return Set.of(ModSounds.AK_12_RELOAD_EMPTY.get(), ModSounds.AK_12_RELOAD_NORMAL.get());
}
public AK12Item() {
super(new Properties().stacksTo(1).rarity(Rarity.EPIC));
}
@Override
public void initializeClient(Consumer<IClientItemExtensions> consumer) {
super.initializeClient(consumer);
consumer.accept(new IClientItemExtensions() {
private final BlockEntityWithoutLevelRenderer renderer = new AK12ItemRenderer();
@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<AK12Item> 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 (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.fire"));
}
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_empty"));
}
if (stack.getOrCreateTag().getBoolean("is_normal_reloading")) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_normal"));
}
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.ak12.run_fast"));
} else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak12.run"));
}
}
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak12.idle"));
}
return PlayState.STOP;
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
data.add(idleController);
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
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() {
ItemStack stack = new ItemStack(ModItems.AK_12.get());
GunsTool.initCreativeGun(stack, ModItems.AK_12.getId().getPath());
return stack;
}
@Override
public void setAnimationProcedure(String procedure) {
this.animationProcedure = procedure;
}
@Override
public ResourceLocation getGunIcon() {
return new ResourceLocation(ModUtils.MODID, "textures/gun_icon/ak12_icon.png");
}
@Override
public String getGunDisplayName() {
return " AK-12";
}
@Override
public boolean canApplyPerk(Perk perk) {
return PerkHelper.RIFLE_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk);
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -21,6 +21,7 @@
"item.superbwarfare.vector": "VECTOR",
"item.superbwarfare.bocek": "BOCEK",
"item.superbwarfare.ak_47": "AK-47",
"item.superbwarfare.ak_12": "AK-12",
"item.superbwarfare.m_4": "M4A1",
"item.superbwarfare.aa_12": "AA-12",
"item.superbwarfare.sks": "SKS",
@ -82,6 +83,7 @@
"item.superbwarfare.trachelium_blueprint": "TRACHELIUM Blueprint",
"item.superbwarfare.m_98b_blueprint": "M98B Blueprint",
"item.superbwarfare.ak_47_blueprint": "AK-47 Blueprint",
"item.superbwarfare.ak_12_blueprint": "AK-12 Blueprint",
"item.superbwarfare.sentinel_blueprint": "SENTINEL Blueprint",
"item.superbwarfare.sks_blueprint": "SKS Blueprint",
"item.superbwarfare.rpg_blueprint": "RPG-7 Blueprint",

View file

@ -21,6 +21,7 @@
"item.superbwarfare.vector": "短剑冲锋枪",
"item.superbwarfare.bocek": "BOCEK复合弓",
"item.superbwarfare.ak_47": "AK-47突击步枪",
"item.superbwarfare.ak_12": "AK-12突击步枪",
"item.superbwarfare.m_4": "M4A1卡宾枪",
"item.superbwarfare.aa_12": "AA-12霰弹枪",
"item.superbwarfare.sks": "SKS射手步枪",
@ -82,6 +83,7 @@
"item.superbwarfare.trachelium_blueprint": "“夕雾花”蓝图",
"item.superbwarfare.m_98b_blueprint": "M98B狙击步枪蓝图",
"item.superbwarfare.ak_47_blueprint": "AK-47突击步枪蓝图",
"item.superbwarfare.ak_12_blueprint": "AK-12突击步枪蓝图",
"item.superbwarfare.sentinel_blueprint": "哨兵狙击步枪蓝图",
"item.superbwarfare.sks_blueprint": "SKS射手步枪蓝图",
"item.superbwarfare.rpg_blueprint": "RPG-7火箭筒蓝图",

View file

@ -0,0 +1,47 @@
{
"credit": "Made with Blockbench",
"parent": "builtin/entity",
"texture_size": [
128,
128
],
"gui_light": "front",
"display": {
"firstperson_righthand": {
"translation": [
-6.5,
3.5,
4
],
"scale": [
1,
1,
1.15
]
},
"firstperson_lefthand": {
"scale": [
0,
0,
0
]
},
"gui": {
"rotation": [
165.69,
-39.63,
178.66
],
"translation": [
-2.25,
-0.5,
0
],
"scale": [
0.72,
0.72,
0.72
]
}
}
}

View file

@ -0,0 +1,27 @@
{
"loader": "forge:separate_transforms",
"gui_light": "front",
"base": {
"parent": "superbwarfare:item/ak_12_base"
},
"perspectives": {
"gui": {
"parent": "superbwarfare:item/ak_12_icon"
},
"thirdperson_righthand": {
"parent": "superbwarfare:item/ak_123d"
},
"thirdperson_lefthand": {
"parent": "superbwarfare:item/ak_123d"
},
"ground": {
"parent": "superbwarfare:item/ak_123d"
},
"fixed": {
"parent": "superbwarfare:item/ak_123d"
},
"head": {
"parent": "superbwarfare:item/ak_123d"
}
}
}

View file

@ -0,0 +1,390 @@
{
"credit": "Made with Blockbench",
"texture_size": [32, 32],
"textures": {
"1": "superbwarfare:item/ak12_3d"
},
"elements": [
{
"from": [7.7, 2.74237, -1.95836],
"to": [8.3, 3.34237, -0.45836],
"rotation": {"angle": -45, "axis": "x", "origin": [8, 3.04237, -1.58336]},
"faces": {
"north": {"uv": [0.5, 9.5, 1, 10], "texture": "#1"},
"east": {"uv": [8.5, 4, 9.5, 4.5], "texture": "#1"},
"south": {"uv": [9.5, 1, 10, 1.5], "texture": "#1"},
"west": {"uv": [8.5, 4.5, 9.5, 5], "texture": "#1"},
"up": {"uv": [2, 9.5, 1.5, 8.5], "texture": "#1"},
"down": {"uv": [9, 6, 8.5, 7], "texture": "#1"}
}
},
{
"from": [7.5, 2.05, 1],
"to": [8.5, 4.25, 6.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.25, 7.75]},
"faces": {
"north": {"uv": [6.5, 8.5, 7, 9.5], "texture": "#1"},
"east": {"uv": [1, 3, 4, 4], "texture": "#1"},
"south": {"uv": [8.5, 7, 9, 8], "texture": "#1"},
"west": {"uv": [4, 0, 7, 1], "texture": "#1"},
"up": {"uv": [1.5, 8.5, 1, 5.5], "texture": "#1"},
"down": {"uv": [2, 5.5, 1.5, 8.5], "texture": "#1"}
}
},
{
"from": [7.5, 2, 6.5],
"to": [8.5, 4.25, 14.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.25, 7.75]},
"faces": {
"north": {"uv": [8.5, 8, 9, 9], "texture": "#1"},
"east": {"uv": [0, 0, 4, 1], "texture": "#1"},
"south": {"uv": [9, 0, 9.5, 1], "texture": "#1"},
"west": {"uv": [0, 1, 4, 2], "texture": "#1"},
"up": {"uv": [4.5, 7, 4, 3], "texture": "#1"},
"down": {"uv": [5, 3, 4.5, 7], "texture": "#1"}
}
},
{
"from": [7.45, 2.25, 1.3],
"to": [8.55, 3, 6.45],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.275, 3.775]},
"faces": {
"north": {"uv": [1.5, 9.5, 2, 10], "texture": "#1"},
"east": {"uv": [6.5, 2, 9, 2.5], "texture": "#1"},
"south": {"uv": [9.5, 1.5, 10, 2], "texture": "#1"},
"west": {"uv": [6.5, 2.5, 9, 3], "texture": "#1"},
"up": {"uv": [2.5, 9.5, 2, 7], "texture": "#1"},
"down": {"uv": [3, 7, 2.5, 9.5], "texture": "#1"}
}
},
{
"from": [7.7, 4.25, 1.25],
"to": [8.3, 4.5, 14.35],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.25, 7.75]},
"faces": {
"north": {"uv": [2, 9.5, 2.5, 10], "texture": "#1"},
"east": {"uv": [0, 2, 6.5, 2.5], "texture": "#1"},
"south": {"uv": [9.5, 2, 10, 2.5], "texture": "#1"},
"west": {"uv": [0, 2.5, 6.5, 3], "texture": "#1"},
"up": {"uv": [0.5, 9.5, 0, 3], "texture": "#1"},
"down": {"uv": [1, 3, 0.5, 9.5], "texture": "#1"}
}
},
{
"from": [7.6, 4.25, 13.15],
"to": [8.4, 5, 14.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.25, 7.75]},
"faces": {
"north": {"uv": [2.5, 9.5, 3, 10], "texture": "#1"},
"east": {"uv": [9.5, 2.5, 10, 3], "texture": "#1"},
"south": {"uv": [9.5, 3, 10, 3.5], "texture": "#1"},
"west": {"uv": [3.5, 9.5, 4, 10], "texture": "#1"},
"up": {"uv": [10, 4, 9.5, 3.5], "texture": "#1"},
"down": {"uv": [4.5, 9.5, 4, 10], "texture": "#1"}
}
},
{
"from": [6.75, 3.95, 9.6],
"to": [7.65, 4.76953, 12.95],
"rotation": {"angle": 0, "axis": "y", "origin": [7.25, 3.25, 10.85]},
"faces": {
"north": {"uv": [9.5, 4, 10, 4.5], "texture": "#1"},
"east": {"uv": [5, 7, 6.5, 7.5], "texture": "#1"},
"south": {"uv": [9.5, 4.5, 10, 5], "texture": "#1"},
"west": {"uv": [7, 6, 8.5, 6.5], "texture": "#1"},
"up": {"uv": [7, 8.5, 6.5, 7], "texture": "#1"},
"down": {"uv": [7.5, 6.5, 7, 8], "texture": "#1"}
}
},
{
"from": [7.70459, 5.60459, 9.6],
"to": [8.70459, 5.72412, 10.45],
"rotation": {"angle": 0, "axis": "y", "origin": [8.20459, 4.50459, 10.85]},
"faces": {
"north": {"uv": [9.5, 5, 10, 5.5], "texture": "#1"},
"east": {"uv": [9.5, 5.5, 10, 6], "texture": "#1"},
"south": {"uv": [9.5, 6, 10, 6.5], "texture": "#1"},
"west": {"uv": [6.5, 9.5, 7, 10], "texture": "#1"},
"up": {"uv": [10, 7, 9.5, 6.5], "texture": "#1"},
"down": {"uv": [7.5, 9.5, 7, 10], "texture": "#1"}
}
},
{
"from": [8.60459, 5.00459, 9.6],
"to": [8.70459, 5.60459, 10.45],
"rotation": {"angle": 0, "axis": "y", "origin": [8.20459, 3.08506, 10.85]},
"faces": {
"north": {"uv": [9.5, 7, 10, 7.5], "texture": "#1"},
"east": {"uv": [7.5, 9.5, 8, 10], "texture": "#1"},
"south": {"uv": [9.5, 7.5, 10, 8], "texture": "#1"},
"west": {"uv": [8, 9.5, 8.5, 10], "texture": "#1"},
"up": {"uv": [10, 8.5, 9.5, 8], "texture": "#1"},
"down": {"uv": [9.5, 9.5, 9, 10], "texture": "#1"}
}
},
{
"from": [6.94749, 4.64631, 9.6],
"to": [7.04749, 5.99631, 10.45],
"rotation": {"angle": -45, "axis": "z", "origin": [6.99749, 4.94631, 10.025]},
"faces": {
"north": {"uv": [9.5, 9.5, 10, 10], "texture": "#1"},
"east": {"uv": [10, 0, 10.5, 0.5], "texture": "#1"},
"south": {"uv": [0.5, 10, 1, 10.5], "texture": "#1"},
"west": {"uv": [10, 0.5, 10.5, 1], "texture": "#1"},
"up": {"uv": [1.5, 10.5, 1, 10], "texture": "#1"},
"down": {"uv": [10.5, 1, 10, 1.5], "texture": "#1"}
}
},
{
"from": [7.7, -3.59892, 7.82679],
"to": [8.3, -0.24892, 10.32679],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 1.00108, 8.37679]},
"faces": {
"north": {"uv": [5, 7.5, 5.5, 9], "texture": "#1"},
"east": {"uv": [1, 4, 2.5, 5.5], "texture": "#1"},
"south": {"uv": [5.5, 7.5, 6, 9], "texture": "#1"},
"west": {"uv": [2.5, 4, 4, 5.5], "texture": "#1"},
"up": {"uv": [6.5, 9, 6, 7.5], "texture": "#1"},
"down": {"uv": [8, 6.5, 7.5, 8], "texture": "#1"}
}
},
{
"from": [7.7, -0.9, 7.2],
"to": [8.3, 2.45, 9.7],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 3.7, 7.75]},
"faces": {
"north": {"uv": [5, 7.5, 5.5, 9], "texture": "#1"},
"east": {"uv": [1, 4, 2.5, 5.5], "texture": "#1"},
"south": {"uv": [5.5, 7.5, 6, 9], "texture": "#1"},
"west": {"uv": [2.5, 4, 4, 5.5], "texture": "#1"},
"up": {"uv": [6.5, 9, 6, 7.5], "texture": "#1"},
"down": {"uv": [8, 6.5, 7.5, 8], "texture": "#1"}
}
},
{
"from": [7.50391, -1, 13.1],
"to": [8.49609, 2.5, 14.6],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 0.5, 13.75]},
"faces": {
"north": {"uv": [7, 0, 7.5, 2], "texture": "#1"},
"east": {"uv": [5, 3, 6, 5], "texture": "#1"},
"south": {"uv": [3, 7, 3.5, 9], "texture": "#1"},
"west": {"uv": [5, 5, 6, 7], "texture": "#1"},
"up": {"uv": [3.5, 10, 3, 9], "texture": "#1"},
"down": {"uv": [9.5, 3, 9, 4], "texture": "#1"}
}
},
{
"from": [7.5, -1, 12.85],
"to": [8.5, -0.25, 13.1],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 0.5, 13.75]},
"faces": {
"north": {"uv": [1.5, 10, 2, 10.5], "texture": "#1"},
"east": {"uv": [10, 1.5, 10.5, 2], "texture": "#1"},
"south": {"uv": [2, 10, 2.5, 10.5], "texture": "#1"},
"west": {"uv": [10, 2, 10.5, 2.5], "texture": "#1"},
"up": {"uv": [3, 10.5, 2.5, 10], "texture": "#1"},
"down": {"uv": [10.5, 2.5, 10, 3], "texture": "#1"}
}
},
{
"from": [7.75, 0.76924, 10.74672],
"to": [8.25, 0.86924, 12.99672],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 0.76924, 13.74672]},
"faces": {
"north": {"uv": [3, 10, 3.5, 10.5], "texture": "#1"},
"east": {"uv": [8.5, 5, 9.5, 5.5], "texture": "#1"},
"south": {"uv": [10, 3, 10.5, 3.5], "texture": "#1"},
"west": {"uv": [3.5, 9, 4.5, 9.5], "texture": "#1"},
"up": {"uv": [5, 10, 4.5, 9], "texture": "#1"},
"down": {"uv": [5.5, 9, 5, 10], "texture": "#1"}
}
},
{
"from": [7.75, 0.76924, 10.14672],
"to": [8.25, 2.11924, 10.74672],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 0.76924, 13.74672]},
"faces": {
"north": {"uv": [3.5, 10, 4, 10.5], "texture": "#1"},
"east": {"uv": [10, 3.5, 10.5, 4], "texture": "#1"},
"south": {"uv": [4, 10, 4.5, 10.5], "texture": "#1"},
"west": {"uv": [10, 4, 10.5, 4.5], "texture": "#1"},
"up": {"uv": [5, 10.5, 4.5, 10], "texture": "#1"},
"down": {"uv": [10.5, 4.5, 10, 5], "texture": "#1"}
}
},
{
"from": [7.75, 1.06924, 11.54672],
"to": [8.25, 2.11924, 11.89672],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 1.59424, 11.82172]},
"faces": {
"north": {"uv": [5, 10, 5.5, 10.5], "texture": "#1"},
"east": {"uv": [10, 5, 10.5, 5.5], "texture": "#1"},
"south": {"uv": [5.5, 10, 6, 10.5], "texture": "#1"},
"west": {"uv": [10, 5.5, 10.5, 6], "texture": "#1"},
"up": {"uv": [6.5, 10.5, 6, 10], "texture": "#1"},
"down": {"uv": [10.5, 6, 10, 6.5], "texture": "#1"}
}
},
{
"from": [7.5, 0.37608, 12.58471],
"to": [8.5, 1.62608, 13.48471],
"rotation": {"angle": 45, "axis": "x", "origin": [8, 0.62608, 16.70971]},
"faces": {
"north": {"uv": [6.5, 10, 7, 10.5], "texture": "#1"},
"east": {"uv": [10, 6.5, 10.5, 7], "texture": "#1"},
"south": {"uv": [7, 10, 7.5, 10.5], "texture": "#1"},
"west": {"uv": [10, 7, 10.5, 7.5], "texture": "#1"},
"up": {"uv": [8, 10.5, 7.5, 10], "texture": "#1"},
"down": {"uv": [10.5, 7.5, 10, 8], "texture": "#1"}
}
},
{
"from": [7.5, 2.13612, 13.93528],
"to": [8.5, 3.85252, 14.93528],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 3.22752, 14.43528]},
"faces": {
"north": {"uv": [5.5, 9, 6, 10], "texture": "#1"},
"east": {"uv": [9, 5.5, 9.5, 6.5], "texture": "#1"},
"south": {"uv": [6, 9, 6.5, 10], "texture": "#1"},
"west": {"uv": [9, 6.5, 9.5, 7.5], "texture": "#1"},
"up": {"uv": [8.5, 10.5, 8, 10], "texture": "#1"},
"down": {"uv": [10.5, 8, 10, 8.5], "texture": "#1"}
}
},
{
"from": [7.5, 2.03141, 14.49906],
"to": [8.5, 3.43141, 17.64906],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.43141, 21.27406]},
"faces": {
"north": {"uv": [8.5, 10, 9, 10.5], "texture": "#1"},
"east": {"uv": [7.5, 1.5, 9, 2], "texture": "#1"},
"south": {"uv": [10, 8.5, 10.5, 9], "texture": "#1"},
"west": {"uv": [7.5, 5.5, 9, 6], "texture": "#1"},
"up": {"uv": [8.5, 1.5, 8, 0], "texture": "#1"},
"down": {"uv": [8.5, 4, 8, 5.5], "texture": "#1"}
}
},
{
"from": [7.5, 1.63141, 17.64906],
"to": [8.5, 3.43141, 20.64906],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.43141, 20.27406]},
"faces": {
"north": {"uv": [9, 7.5, 9.5, 8.5], "texture": "#1"},
"east": {"uv": [4, 1, 5.5, 2], "texture": "#1"},
"south": {"uv": [8.5, 9, 9, 10], "texture": "#1"},
"west": {"uv": [5.5, 1, 7, 2], "texture": "#1"},
"up": {"uv": [8.5, 8, 8, 6.5], "texture": "#1"},
"down": {"uv": [7.5, 8, 7, 9.5], "texture": "#1"}
}
},
{
"from": [7.5, 0.13141, 20.64906],
"to": [8.5, 3.43141, 21.63343],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.43141, 19.52406]},
"faces": {
"north": {"uv": [7.5, 8, 8, 9.5], "texture": "#1"},
"east": {"uv": [8, 8, 8.5, 9.5], "texture": "#1"},
"south": {"uv": [8.5, 0, 9, 1.5], "texture": "#1"},
"west": {"uv": [1, 8.5, 1.5, 10], "texture": "#1"},
"up": {"uv": [9.5, 10.5, 9, 10], "texture": "#1"},
"down": {"uv": [10.5, 9, 10, 9.5], "texture": "#1"}
}
},
{
"from": [7.5, -0.65219, 21.6264],
"to": [8.5, 3.43141, 22.39906],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 2.43141, 19.52406]},
"faces": {
"north": {"uv": [3.5, 7, 4, 9], "texture": "#1"},
"east": {"uv": [4, 7, 4.5, 9], "texture": "#1"},
"south": {"uv": [7, 4, 7.5, 6], "texture": "#1"},
"west": {"uv": [4.5, 7, 5, 9], "texture": "#1"},
"up": {"uv": [10, 10.5, 9.5, 10], "texture": "#1"},
"down": {"uv": [10.5, 9.5, 10, 10], "texture": "#1"}
}
},
{
"from": [7.7, 2.45, -5.1],
"to": [8.3, 3.05, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.25, 6.25]},
"faces": {
"north": {"uv": [10, 10, 10.5, 10.5], "texture": "#1"},
"east": {"uv": [6, 3, 9, 3.5], "texture": "#1"},
"south": {"uv": [0, 10.5, 0.5, 11], "texture": "#1"},
"west": {"uv": [6, 3.5, 9, 4], "texture": "#1"},
"up": {"uv": [6.5, 7, 6, 4], "texture": "#1"},
"down": {"uv": [7, 4, 6.5, 7], "texture": "#1"}
}
},
{
"from": [7.6, 2.35, -6.35],
"to": [8.4, 3.15, -5.1],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.25, 6.25]},
"faces": {
"north": {"uv": [10.5, 0, 11, 0.5], "texture": "#1"},
"east": {"uv": [0.5, 10.5, 1, 11], "texture": "#1"},
"south": {"uv": [10.5, 0.5, 11, 1], "texture": "#1"},
"west": {"uv": [1, 10.5, 1.5, 11], "texture": "#1"},
"up": {"uv": [11, 1.5, 10.5, 1], "texture": "#1"},
"down": {"uv": [2, 10.5, 1.5, 11], "texture": "#1"}
}
},
{
"from": [7.9, 3.85, -1.1],
"to": [8.1, 5.1, -0.6],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.25, 11.9]},
"faces": {
"north": {"uv": [10.5, 1.5, 11, 2], "texture": "#1"},
"east": {"uv": [2, 10.5, 2.5, 11], "texture": "#1"},
"south": {"uv": [10.5, 2, 11, 2.5], "texture": "#1"},
"west": {"uv": [2.5, 10.5, 3, 11], "texture": "#1"},
"up": {"uv": [11, 3, 10.5, 2.5], "texture": "#1"},
"down": {"uv": [3.5, 10.5, 3, 11], "texture": "#1"}
}
},
{
"from": [7.7, 3.45, -1],
"to": [8.3, 4.05, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 3.25, 8]},
"faces": {
"north": {"uv": [10.5, 3, 11, 3.5], "texture": "#1"},
"east": {"uv": [9, 8.5, 10, 9], "texture": "#1"},
"south": {"uv": [3.5, 10.5, 4, 11], "texture": "#1"},
"west": {"uv": [9, 9, 10, 9.5], "texture": "#1"},
"up": {"uv": [0.5, 10.5, 0, 9.5], "texture": "#1"},
"down": {"uv": [10, 0, 9.5, 1], "texture": "#1"}
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [-1.5, 4.25, -2.75],
"scale": [0.7, 0.7, 0.7]
},
"thirdperson_lefthand": {
"translation": [-1.5, 4.25, -2.75],
"scale": [0.7, 0.7, 0.7]
},
"ground": {
"translation": [0, 9, 0],
"scale": [0.7, 0.7, 0.7]
},
"head": {
"translation": [0, 18.75, 0]
},
"fixed": {
"rotation": [90, -45, 90],
"translation": [-2.5, 4.25, 0],
"scale": [0.75, 0.75, 0.75]
}
},
"groups": [
{
"name": "group",
"origin": [8, 3.25, 7.75],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
}
]
}

View file

@ -0,0 +1,6 @@
{
"parent": "superbwarfare:displaysettings/ak12.item",
"textures": {
"layer0": "superbwarfare:item/ak12"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "superbwarfare:item/ak12_icon"
}
}

View file

@ -1557,6 +1557,55 @@
]
},
"ak_12_fire_1p": {
"sounds": [
{
"name": "superbwarfare:ak_12/ak_12_fire_1p",
"stream": false
}
]
},
"ak_12_fire_3p": {
"sounds": [
{
"name": "superbwarfare:ak_12/ak_12_fire_3p",
"stream": false
}
]
},
"ak_12_far": {
"sounds": [
{
"name": "superbwarfare:ak_12/ak_12_far",
"stream": false
}
]
},
"ak_12_veryfar": {
"sounds": [
{
"name": "superbwarfare:ak_12/ak_12_veryfar",
"stream": false
}
]
},
"ak_12_reload_normal": {
"sounds": [
{
"name": "superbwarfare:ak_12/ak_12_reload_normal",
"stream": false
}
]
},
"ak_12_reload_empty": {
"sounds": [
{
"name": "superbwarfare:ak_12/ak_12_reload_empty",
"stream": false
}
]
},
"lightsaber": {
"sounds": [
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.95,
"zoom_speed": 0.75,
"zoom": 1.25,
"spread": 3.5,
"recoil_x": 0.006,

View file

@ -0,0 +1,23 @@
{
"zoom_speed": 1.13,
"zoom": 1.25,
"spread": 3.5,
"recoil_x": 0.0015,
"recoil_y": 0.01,
"damage": 7.7,
"headshot": 2,
"velocity": 23,
"mag": 30,
"projectile_amount": 1,
"weight": 1,
"fire_mode": 2,
"semi": 1,
"burst": 0,
"auto": 1,
"burst_size": 1,
"normal_reload_time": 52,
"empty_reload_time": 58,
"BypassesArmor": 0.23,
"SoundRadius": 12,
"rpm": 700
}

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.9,
"zoom_speed": 0.75,
"zoom": 2,
"spread": 5,
"bipod": 1,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 1,
"zoom_speed": 0.75,
"zoom": 1.25,
"spread": 7,
"recoil_x": 0.004,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.72,
"zoom_speed": 0.62,
"zoom": 2,
"min_zoom": 2,
"max_zoom": 6,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.85,
"zoom_speed": 0.68,
"zoom": 1.25,
"spread": 5,
"bipod": 1,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.75,
"zoom_speed": 0.7,
"zoom": 6,
"min_zoom": 4,
"max_zoom": 8,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.85,
"zoom_speed": 0.75,
"zoom": 4,
"min_zoom": 1.25,
"max_zoom": 6,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.9,
"zoom_speed": 0.75,
"zoom": 3.5,
"spread": 4.8,
"recoil_x": 0.002,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.4,
"zoom_speed": 0.55,
"zoom": 6,
"min_zoom": 1.3,
"max_zoom": 6,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 1,
"zoom_speed": 0.75,
"zoom": 1.25,
"spread": 5.5,
"bipod": 1,

View file

@ -1,5 +1,5 @@
{
"zoom_speed": 0.95,
"zoom_speed": 0.85,
"zoom": 3,
"spread": 6,
"recoil_x": 0.007,

View file

@ -200,6 +200,20 @@
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:ak_12_blueprint",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:rpk_blueprint",

View file

@ -18,6 +18,20 @@
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:ak_12_blueprint",
"weight": 10,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:hunting_rifle_blueprint",

View file

@ -186,6 +186,20 @@
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:ak_12_blueprint",
"weight": 10,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:rpk_blueprint",

View file

@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"aba",
"aca",
"aaa"
],
"key": {
"a": {
"item": "minecraft:diamond"
},
"b": {
"item": "superbwarfare:ak_12_blueprint"
},
"c": {
"item": "minecraft:lapis_lazuli"
}
},
"result": {
"item": "superbwarfare:ak_12_blueprint",
"count": 2
}
}

View file

@ -0,0 +1,15 @@
{
"type": "minecraft:smithing_transform",
"template": {
"item": "superbwarfare:ak_12_blueprint"
},
"base": {
"item": "superbwarfare:epic_material_pack"
},
"addition": {
"item": "superbwarfare:cemented_carbide_ingot"
},
"result": {
"item": "superbwarfare:ak_12"
}
}