添加M1911

This commit is contained in:
Atsuihsio 2024-08-05 20:09:37 +08:00
parent 8397b2154e
commit e92cb5b139
64 changed files with 4655 additions and 49 deletions

50
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,50 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "runClient",
"request": "launch",
"mainClass": "cpw.mods.bootstraplauncher.BootstrapLauncher",
"projectName": "SuperbWarfare",
"cwd": "${workspaceFolder}\\run",
"vmArgs": "-Dmixin.dumpTargetOnFailure\u003dtrue -DlegacyClassPath.file\u003dG:\\SuperbWarfare\\build\\classpath\\runClient_minecraftClasspath.txt -Dmixin.env.remapRefMap\u003dtrue -Dmixin.env.refMapRemappingFile\u003dG:\\SuperbWarfare/build/createSrgToMcp/output.srg -Dnet.minecraftforge.gradle.GradleStart.srg.srg-mcp\u003dG:\\SuperbWarfare\\build\\createSrgToMcp\\output.srg -DignoreList\u003dbootstraplauncher,securejarhandler,asm-commons,asm-util,asm-analysis,asm-tree,asm,JarJarFileSystems,client-extra,fmlcore,javafmllanguage,lowcodelanguage,mclanguage,forge- -DmergeModules\u003djna-5.10.0.jar,jna-platform-5.10.0.jar -Dforge.enableGameTest\u003dtrue -Dmixin.debug.verbose\u003dtrue -Dmixin.debug.export\u003dtrue -Djava.net.preferIPv6Addresses\u003dsystem -p C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\cpw.mods\\bootstraplauncher\\1.1.2\\c546e00443d8432cda6baa1c860346980742628\\bootstraplauncher-1.1.2.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\cpw.mods\\securejarhandler\\2.1.10\\51e6a22c6c716beb11e244bf5b8be480f51dd6b5\\securejarhandler-2.1.10.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-commons\\9.5\\19ab5b5800a3910d30d3a3e64fdb00fd0cb42de0\\asm-commons-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-util\\9.5\\64b5a1fc8c1b15ed2efd6a063e976bc8d3dc5ffe\\asm-util-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-analysis\\9.5\\490bacc77de7cbc0be1a30bb3471072d705be4a4\\asm-analysis-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-tree\\9.5\\fd33c8b6373abaa675be407082fdfda35021254a\\asm-tree-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm\\9.5\\dc6ea1875f4d64fbc85e1691c95b96a3d8569c90\\asm-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\net.minecraftforge\\JarJarFileSystems\\0.3.19\\2464eb7d6b9ddb9db36a82cf8a95193e5c6fe020\\JarJarFileSystems-0.3.19.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar\u003dcpw.mods.securejarhandler --add-opens java.base/java.lang.invoke\u003dcpw.mods.securejarhandler --add-exports java.base/sun.security.util\u003dcpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns\u003djava.naming -XX:HeapDumpPath\u003dMojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump",
"args": "--launchTarget forgeclientuserdev --version MOD_DEV --assetIndex 5 --assetsDir C:\\Users\\Atsuishio\\.gradle\\caches\\forge_gradle\\assets --gameDir . --fml.forgeVersion 47.2.0 --fml.mcVersion 1.20.1 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20230612.114412 --mixin.config mixins.superbwarfare.json",
"env": {
"MOD_CLASSES": "${workspaceFolder}\\build\\resources\\main;${workspaceFolder}\\build\\classes\\java\\main",
"MCP_MAPPINGS": "parchment_2023.08.13-1.20.1"
},
"preLaunchTask": "prepareRunClientCompile"
},
{
"type": "java",
"name": "runData",
"request": "launch",
"mainClass": "cpw.mods.bootstraplauncher.BootstrapLauncher",
"projectName": "SuperbWarfare",
"cwd": "${workspaceFolder}\\run",
"vmArgs": "-Dmixin.dumpTargetOnFailure\u003dtrue -DlegacyClassPath.file\u003dG:\\SuperbWarfare\\build\\classpath\\runData_minecraftClasspath.txt -Dmixin.env.remapRefMap\u003dtrue -Dmixin.env.refMapRemappingFile\u003dG:\\SuperbWarfare/build/createSrgToMcp/output.srg -Dnet.minecraftforge.gradle.GradleStart.srg.srg-mcp\u003dG:\\SuperbWarfare\\build\\createSrgToMcp\\output.srg -DignoreList\u003dbootstraplauncher,securejarhandler,asm-commons,asm-util,asm-analysis,asm-tree,asm,JarJarFileSystems,client-extra,fmlcore,javafmllanguage,lowcodelanguage,mclanguage,forge- -DmergeModules\u003djna-5.10.0.jar,jna-platform-5.10.0.jar -Dmixin.debug.verbose\u003dtrue -Dmixin.debug.export\u003dtrue -Djava.net.preferIPv6Addresses\u003dsystem -p C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\cpw.mods\\bootstraplauncher\\1.1.2\\c546e00443d8432cda6baa1c860346980742628\\bootstraplauncher-1.1.2.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\cpw.mods\\securejarhandler\\2.1.10\\51e6a22c6c716beb11e244bf5b8be480f51dd6b5\\securejarhandler-2.1.10.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-commons\\9.5\\19ab5b5800a3910d30d3a3e64fdb00fd0cb42de0\\asm-commons-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-util\\9.5\\64b5a1fc8c1b15ed2efd6a063e976bc8d3dc5ffe\\asm-util-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-analysis\\9.5\\490bacc77de7cbc0be1a30bb3471072d705be4a4\\asm-analysis-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-tree\\9.5\\fd33c8b6373abaa675be407082fdfda35021254a\\asm-tree-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm\\9.5\\dc6ea1875f4d64fbc85e1691c95b96a3d8569c90\\asm-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\net.minecraftforge\\JarJarFileSystems\\0.3.19\\2464eb7d6b9ddb9db36a82cf8a95193e5c6fe020\\JarJarFileSystems-0.3.19.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar\u003dcpw.mods.securejarhandler --add-opens java.base/java.lang.invoke\u003dcpw.mods.securejarhandler --add-exports java.base/sun.security.util\u003dcpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns\u003djava.naming",
"args": "--launchTarget forgedatauserdev --assetIndex 5 --assetsDir C:\\Users\\Atsuishio\\.gradle\\caches\\forge_gradle\\assets --gameDir . --fml.forgeVersion 47.2.0 --fml.mcVersion 1.20.1 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20230612.114412 --mixin.config mixins.superbwarfare.json",
"env": {
"MOD_CLASSES": "${workspaceFolder}\\build\\resources\\main;${workspaceFolder}\\build\\classes\\java\\main",
"MCP_MAPPINGS": "parchment_2023.08.13-1.20.1"
},
"preLaunchTask": "prepareRunDataCompile"
},
{
"type": "java",
"name": "runServer",
"request": "launch",
"mainClass": "cpw.mods.bootstraplauncher.BootstrapLauncher",
"projectName": "SuperbWarfare",
"cwd": "${workspaceFolder}\\run",
"vmArgs": "-Dmixin.dumpTargetOnFailure\u003dtrue -DlegacyClassPath.file\u003dG:\\SuperbWarfare\\build\\classpath\\runServer_minecraftClasspath.txt -Dmixin.env.remapRefMap\u003dtrue -Dmixin.env.refMapRemappingFile\u003dG:\\SuperbWarfare/build/createSrgToMcp/output.srg -Dnet.minecraftforge.gradle.GradleStart.srg.srg-mcp\u003dG:\\SuperbWarfare\\build\\createSrgToMcp\\output.srg -DignoreList\u003dbootstraplauncher,securejarhandler,asm-commons,asm-util,asm-analysis,asm-tree,asm,JarJarFileSystems,client-extra,fmlcore,javafmllanguage,lowcodelanguage,mclanguage,forge- -DmergeModules\u003djna-5.10.0.jar,jna-platform-5.10.0.jar -Dforge.enableGameTest\u003dtrue -Dmixin.debug.verbose\u003dtrue -Dmixin.debug.export\u003dtrue -Djava.net.preferIPv6Addresses\u003dsystem -p C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\cpw.mods\\bootstraplauncher\\1.1.2\\c546e00443d8432cda6baa1c860346980742628\\bootstraplauncher-1.1.2.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\cpw.mods\\securejarhandler\\2.1.10\\51e6a22c6c716beb11e244bf5b8be480f51dd6b5\\securejarhandler-2.1.10.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-commons\\9.5\\19ab5b5800a3910d30d3a3e64fdb00fd0cb42de0\\asm-commons-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-util\\9.5\\64b5a1fc8c1b15ed2efd6a063e976bc8d3dc5ffe\\asm-util-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-analysis\\9.5\\490bacc77de7cbc0be1a30bb3471072d705be4a4\\asm-analysis-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm-tree\\9.5\\fd33c8b6373abaa675be407082fdfda35021254a\\asm-tree-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\org.ow2.asm\\asm\\9.5\\dc6ea1875f4d64fbc85e1691c95b96a3d8569c90\\asm-9.5.jar;C:\\Users\\Atsuishio\\.gradle\\caches\\modules-2\\files-2.1\\net.minecraftforge\\JarJarFileSystems\\0.3.19\\2464eb7d6b9ddb9db36a82cf8a95193e5c6fe020\\JarJarFileSystems-0.3.19.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar\u003dcpw.mods.securejarhandler --add-opens java.base/java.lang.invoke\u003dcpw.mods.securejarhandler --add-exports java.base/sun.security.util\u003dcpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns\u003djava.naming",
"args": "--launchTarget forgeserveruserdev --gameDir . --fml.forgeVersion 47.2.0 --fml.mcVersion 1.20.1 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20230612.114412 --mixin.config mixins.superbwarfare.json",
"env": {
"MOD_CLASSES": "${workspaceFolder}\\build\\resources\\main;${workspaceFolder}\\build\\classes\\java\\main",
"MCP_MAPPINGS": "parchment_2023.08.13-1.20.1"
},
"preLaunchTask": "prepareRunServerCompile"
}
]
}

29
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,29 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "prepareRunClientCompile",
"type": "shell",
"command": "./gradlew prepareRunClientCompile",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "prepareRunDataCompile",
"type": "shell",
"command": "./gradlew prepareRunDataCompile",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "prepareRunServerCompile",
"type": "shell",
"command": "./gradlew prepareRunServerCompile",
"options": {
"cwd": "${workspaceFolder}"
}
}
]
}

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.M1911Item;
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 M1911Layer extends GeoRenderLayer<M1911Item> {
private static final ResourceLocation LAYER = new ResourceLocation(ModUtils.MODID, "textures/item/m1911_e.png");
public M1911Layer(GeoRenderer<M1911Item> entityRenderer) {
super(entityRenderer);
}
@Override
public void render(PoseStack poseStack, M1911Item 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,142 @@
package net.mcreator.superbwarfare.client.model.item;
import net.mcreator.superbwarfare.ModUtils;
import net.mcreator.superbwarfare.init.ModTags;
import net.mcreator.superbwarfare.item.gun.M1911Item;
import net.mcreator.superbwarfare.network.ModVariables;
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 M1911ItemModel extends GeoModel<M1911Item> {
@Override
public ResourceLocation getAnimationResource(M1911Item animatable) {
return new ResourceLocation(ModUtils.MODID, "animations/glock17.animation.json");
}
@Override
public ResourceLocation getModelResource(M1911Item animatable) {
return new ResourceLocation(ModUtils.MODID, "geo/m1911.geo.json");
}
@Override
public ResourceLocation getTextureResource(M1911Item animatable) {
return new ResourceLocation(ModUtils.MODID, "textures/item/m1911.png");
}
@Override
public void setCustomAnimations(M1911Item animatable, long instanceId, AnimationState animationState) {
CoreGeoBone gun = getAnimationProcessor().getBone("bone");
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
CoreGeoBone slide = getAnimationProcessor().getBone("huatao");
CoreGeoBone bullet = getAnimationProcessor().getBone("bullet");
Player player = Minecraft.getInstance().player;
if (player == null) return;
ItemStack stack = player.getMainHandItem();
if (!stack.is(ModTags.Items.GUN)) return;
double p = player.getPersistentData().getDouble("zoom_pos");
double zp = player.getPersistentData().getDouble("zoom_pos_z");
gun.setPosX(1.86f * (float) p);
gun.setPosY(1.55f * (float) p - (float) (0.2f * zp));
gun.setPosZ(2f * (float) p + (float) (0.3f * zp));
gun.setScaleZ(1f - (0.35f * (float) p));
double fp = player.getPersistentData().getDouble("fire_pos");
double fr = player.getPersistentData().getDouble("fire_rot");
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
shen.setPosY(0.03f * (float) (fp + 2 * fr));
shen.setPosZ(2.6f * (float) (fp + 0.84f * fr));
shen.setRotY(0.05f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
shen.setRotX(0.005f * (float) (fp + fr));
} else {
shen.setPosY(0.08f * (float) (fp + 2 * fr));
shen.setPosZ(1.9f * (float) (fp + 0.54f * fr));
shen.setRotX(0.17f * (float) (0.18f * fp + fr));
shen.setRotY(0.1f * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr));
}
shen.setPosX(0.7f * (float) fr * (float) ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
slide.setPosZ(2.75f * (float) fp);
if (stack.getOrCreateTag().getBoolean("HoldOpen")) {
slide.setPosZ(2.75f);
bullet.setHidden(true);
} else {
bullet.setHidden(false);
}
CoreGeoBone root = getAnimationProcessor().getBone("root");
float PosX = (float) player.getPersistentData().getDouble("gun_move_posX");
float PosY = (float) player.getPersistentData().getDouble("gun_move_posY");
double y = player.getPersistentData().getDouble("y");
double x = player.getPersistentData().getDouble("x");
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
flare.setHidden(false);
flare.setScaleX((float) (0.55 + 0.5 * (Math.random() - 0.5)));
flare.setScaleY((float) (0.55 + 0.5 * (Math.random() - 0.5)));
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
} else {
flare.setHidden(true);
}
root.setPosX(PosX);
root.setPosY((float) y + PosY);
root.setRotX((float) x);
float RotZ = (float) player.getPersistentData().getDouble("gun_move_rotZ");
root.setRotY(0.2f * PosX);
root.setRotZ(0.2f * PosX + RotZ);
CoreGeoBone move = getAnimationProcessor().getBone("move");
double m = player.getPersistentData().getDouble("move");
double vy = player.getPersistentData().getDouble("vy");
move.setPosX(9.3f * (float) m);
move.setPosY(-2f * (float) vy);
double xRot = player.getPersistentData().getDouble("xRot");
double yRot = player.getPersistentData().getDouble("yRot");
double zRot = player.getPersistentData().getDouble("zRot");
move.setRotX(0.7f * Mth.DEG_TO_RAD * (float) xRot - 0.15f * (float) vy);
move.setRotY(0.7f * Mth.DEG_TO_RAD * (float) yRot);
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
player.getPersistentData().putDouble("camera_rot_y", Mth.RAD_TO_DEG * camera.getRotY());
player.getPersistentData().putDouble("camera_rot_z", Mth.RAD_TO_DEG * camera.getRotZ());
}
}

View file

@ -0,0 +1,19 @@
package net.mcreator.superbwarfare.client.renderer.item;
import net.mcreator.superbwarfare.client.layer.M1911Layer;
import net.mcreator.superbwarfare.client.model.item.M1911ItemModel;
import net.mcreator.superbwarfare.item.gun.M1911Item;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.renderer.GeoItemRenderer;
public class M1911ItemRenderer extends GeoItemRenderer<M1911Item> {
public M1911ItemRenderer() {
super(new M1911ItemModel());
this.addRenderLayer(new M1911Layer(this));
}
@Override
public ResourceLocation getTextureLocation(M1911Item instance) {
return super.getTextureLocation(instance);
}
}

View file

@ -428,7 +428,7 @@ public class GunEventHandler {
}
}
if (stack.getItem() == ModItems.GLOCK_17.get() || stack.getItem() == ModItems.GLOCK_18.get()) {
if (stack.getItem() == ModItems.GLOCK_17.get() || stack.getItem() == ModItems.GLOCK_18.get() || stack.getItem() == ModItems.M_1911.get()) {
if (tag.getInt("gun_reloading_time") == 5) {
tag.putBoolean("HoldOpen", false);
}

View file

@ -28,6 +28,7 @@ public class ModItems {
public static final RegistryObject<Item> TASER = GUNS.register("taser", Taser::new);
public static final RegistryObject<Item> GLOCK_17 = GUNS.register("glock_17", Glock17Item::new);
public static final RegistryObject<Item> GLOCK_18 = GUNS.register("glock_18", Glock18Item::new);
public static final RegistryObject<Item> M_1911 = GUNS.register("m_1911", M1911Item::new);
public static final RegistryObject<Item> ABEKIRI = GUNS.register("abekiri", Abekiri::new);
public static final RegistryObject<Item> TRACHELIUM = GUNS.register("trachelium", Trachelium::new);
public static final RegistryObject<Item> VECTOR = GUNS.register("vector", VectorItem::new);
@ -170,6 +171,7 @@ public class ModItems {
public static final RegistryObject<Item> AK_47_BLUEPRINT = ITEMS.register("ak_47_blueprint", () -> new BlueprintItem(Rarity.RARE));
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));
private static RegistryObject<Item> block(RegistryObject<Block> block) {

View file

@ -195,6 +195,13 @@ public class ModSounds {
public static final RegistryObject<SoundEvent> GLOCK_18_RELOAD_NORMAL = REGISTRY.register("glock_18_reload_normal", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "glock_18_reload_normal")));
public static final RegistryObject<SoundEvent> GLOCK_18_RELOAD_EMPTY = REGISTRY.register("glock_18_reload_empty", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "glock_18_reload_empty")));
public static final RegistryObject<SoundEvent> M_1911_FIRE_1P = REGISTRY.register("m_1911_fire_1p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "m_1911_fire_1p")));
public static final RegistryObject<SoundEvent> M_1911_FIRE_3P = REGISTRY.register("m_1911_fire_3p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "m_1911_fire_3p")));
public static final RegistryObject<SoundEvent> M_1911_FAR = REGISTRY.register("m_1911_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "m_1911_far")));
public static final RegistryObject<SoundEvent> M_1911_VERYFAR = REGISTRY.register("m_1911_veryfar", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "m_1911_veryfar")));
public static final RegistryObject<SoundEvent> M_1911_RELOAD_NORMAL = REGISTRY.register("m_1911_reload_normal", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "m_1911_reload_normal")));
public static final RegistryObject<SoundEvent> M_1911_RELOAD_EMPTY = REGISTRY.register("m_1911_reload_empty", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "m_1911_reload_empty")));
public static final RegistryObject<SoundEvent> MK_42_FIRE_1P = REGISTRY.register("mk_42_fire_1p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "mk_42_fire_1p")));
public static final RegistryObject<SoundEvent> MK_42_FIRE_3P = REGISTRY.register("mk_42_fire_3p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "mk_42_fire_3p")));
public static final RegistryObject<SoundEvent> MK_42_FAR = REGISTRY.register("mk_42_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation("superbwarfare", "mk_42_far")));

View file

@ -26,6 +26,7 @@ public class ModTabs {
output.accept(Taser.getGunInstance());
output.accept(Glock17Item.getGunInstance());
output.accept(Glock18Item.getGunInstance());
output.accept(M1911Item.getGunInstance());
output.accept(Abekiri.getGunInstance());
output.accept(Trachelium.getGunInstance());
output.accept(VectorItem.getGunInstance());

View file

@ -0,0 +1,189 @@
package net.mcreator.superbwarfare.item.gun;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import net.mcreator.superbwarfare.ModUtils;
import net.mcreator.superbwarfare.client.renderer.item.M1911ItemRenderer;
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.tools.GunsTool;
import net.mcreator.superbwarfare.tools.TooltipTool;
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.network.chat.Component;
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.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
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.List;
import java.util.Set;
import java.util.UUID;
import java.util.function.Consumer;
public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public M1911Item() {
super(new Properties().stacksTo(1).rarity(Rarity.COMMON));
}
@Override
public void initializeClient(Consumer<IClientItemExtensions> consumer) {
super.initializeClient(consumer);
consumer.accept(new IClientItemExtensions() {
private final BlockEntityWithoutLevelRenderer renderer = new M1911ItemRenderer();
@Override
public BlockEntityWithoutLevelRenderer getCustomRenderer() {
return renderer;
}
@Override
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
return HumanoidModel.ArmPose.BOW_AND_ARROW;
}
});
}
public void getTransformType(ItemDisplayContext type) {
transformType = type;
}
private PlayState fireAnimPredicate(AnimationState 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.glock.fire"));
}
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m1911.reload_empty"));
}
if (stack.getOrCreateTag().getBoolean("is_normal_reloading")) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock.reload_normal"));
}
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle"));
}
return PlayState.STOP;
}
private PlayState idlePredicate(AnimationState<M1911Item> 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("draw_time") < 10) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.draw"));
}
if (player.isSprinting() && player.onGround()
&& player.getPersistentData().getDouble("noRun") == 0
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading"))) {
if (player.hasEffect(MobEffects.MOVEMENT_SPEED)) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.run_fast"));
} else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.run"));
}
}
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle"));
}
return PlayState.STOP;
}
@Override
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
var fireAnimController = new AnimationController<>(this, "fireAnimController", 1, this::fireAnimPredicate);
data.add(fireAnimController);
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
data.add(idleController);
}
@Override
public AnimatableInstanceCache getAnimatableInstanceCache() {
return this.cache;
}
@Override
public void appendHoverText(ItemStack stack, Level world, List<Component> list, TooltipFlag flag) {
TooltipTool.addGunTips(list, stack);
}
@Override
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
UUID uuid = new UUID(slot.toString().hashCode(), 0);
if (slot == EquipmentSlot.MAINHAND) {
map = HashMultimap.create(map);
map.put(Attributes.MOVEMENT_SPEED,
new AttributeModifier(uuid, ModUtils.ATTRIBUTE_MODIFIER, -0.02f, AttributeModifier.Operation.MULTIPLY_BASE));
}
return map;
}
@Override
public Set<SoundEvent> getReloadSound() {
return Set.of(
ModSounds.M_1911_RELOAD_EMPTY.get(),
ModSounds.M_1911_RELOAD_NORMAL.get()
);
}
public static ItemStack getGunInstance() {
ItemStack stack = new ItemStack(ModItems.M_1911.get());
GunsTool.initCreativeGun(stack, ModItems.M_1911.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/m1911_icon.png");
}
@Override
public String getGunDisplayName() {
return " M-1911";
}
}

View file

@ -160,29 +160,9 @@
},
"animation.glock.fire": {
"loop": "hold_on_last_frame",
"animation_length": 0.0417,
"animation_length": 0.0833,
"override_previous_animation": true,
"bones": {
"0": {
"rotation": {
"0.0": {
"vector": [-5, 0, 0]
},
"0.0417": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
},
"position": {
"0.0": {
"vector": [0, 0, 0.5]
},
"0.0417": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
}
},
"lun": {
"rotation": {
"0.0": {
@ -200,6 +180,30 @@
"vector": [0, 0, 0]
}
}
},
"roll": {
"rotation": {
"0.0": {
"vector": [-5, 0, 0]
},
"0.0833": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
}
},
"hammer": {
"rotation": {
"0.0": {
"vector": [60, 0, 0]
},
"0.0833": {
"vector": [0, 0, 0]
}
},
"scale": {
"vector": [1, 1, 1]
}
}
}
},
@ -1239,6 +1243,537 @@
}
}
},
"animation.m1911.reload_empty": {
"loop": "hold_on_last_frame",
"animation_length": 1.7,
"bones": {
"0": {
"rotation": {
"0.0": {
"vector": [0, 0, 0]
},
"0.075": {
"vector": [-9.91615, -1.29876, -7.38733]
},
"0.225": {
"vector": [-9.905, -0.18197, -24.3992]
},
"0.45": {
"vector": [0, 0, 0]
},
"0.575": {
"vector": [0, 0, -20],
"easing": "easeInOutSine"
},
"0.95": {
"vector": [-24.63733, 4.36681, -2.14213],
"easing": "easeInOutSine"
},
"1.025": {
"vector": [-12.48, 6.58, 6.93]
},
"1.2": {
"vector": [-9.0963, 11.7554, 28.0963]
},
"1.225": {
"vector": [-14.64574, 13.27302, 34.69755],
"easing": "easeInQuart"
},
"1.35": {
"vector": [-23.75162, 26.92866, 33.66136]
},
"1.45": {
"vector": [-1.83441, 2.95244, 12.44091]
},
"1.625": {
"vector": [0, 0, 0]
}
},
"position": {
"0.0": {
"vector": [0, 0, 0]
},
"0.225": {
"vector": [1.05142, 4.26654, 0.62687]
},
"0.45": {
"vector": [0, 0, 0]
},
"0.575": {
"vector": [-0.18863, 2.27254, 0],
"easing": "easeInOutSine"
},
"0.8": {
"vector": [-0.59488, 3.39738, -0.68123]
},
"0.95": {
"vector": [-1.1451, 4.34429, -1.15779],
"easing": "easeInOutSine"
},
"1.05": {
"vector": [-0.71, 3.32, 0.4]
},
"1.125": {
"vector": [-0.90702, 1.71908, -0.35018]
},
"1.2": {
"vector": [-1.4, 0, 0],
"easing": "easeInElastic"
},
"1.225": {
"vector": [-0.19, 0.3, 3.9],
"easing": "easeInQuart"
},
"1.35": {
"vector": [-0.38, 0.59, 2.64]
},
"1.45": {
"vector": [-0.12, 1.29, -2.04]
},
"1.55": {
"vector": [-0.04, 0.09, 1.84]
},
"1.625": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
}
},
"Righthand": {
"rotation": {
"0.125": {
"vector": [0, 0, 0]
},
"0.25": {
"vector": [0, 6, -9]
},
"0.375": {
"vector": [0, 0, 0]
}
},
"position": {
"0.125": {
"vector": [0, 0, 0]
},
"0.25": {
"vector": [3.00321, -0.61688, -0.10106]
},
"0.375": {
"vector": [0, 0, 0]
}
}
},
"Lefthand": {
"rotation": {
"0.0": {
"vector": [0, 0, 0]
},
"0.075": {
"vector": [133.30702, -9.72565, -30.6365]
},
"0.65": {
"vector": [25.46719, -22.2363, 78.12621]
},
"0.725": {
"vector": [23.34788, -25.26118, 70.86152]
},
"0.8": {
"vector": [15.35593, 5.20698, 63.75845]
},
"0.925": {
"vector": [15.35593, 5.20698, 63.75845]
},
"0.975": {
"vector": [15.35593, 5.20698, 63.75845]
},
"1.0": {
"vector": [13.04381, 11.88065, 62.82106]
},
"1.05": {
"vector": [-4.93818, -6.6412, 30.82739]
},
"1.15": {
"vector": [-32.88924, -30.55823, -55.9374],
"easing": "easeInOutSine"
},
"1.2": {
"vector": [-32.88924, -30.55823, -55.9374],
"easing": "easeInOutSine"
},
"1.225": {
"vector": [-32.88924, -30.55823, -55.9374],
"easing": "easeInOutSine"
},
"1.4": {
"vector": [-32.88924, -30.55823, -55.9374],
"easing": "easeInOutSine"
},
"1.5": {
"vector": [3.537, -23.82754, -26.97592]
},
"1.575": {
"vector": [0, 0, 0]
}
},
"position": {
"0.0": {
"vector": [0, 0, 0]
},
"0.65": {
"vector": [0.72628, -10.24946, 6.73057]
},
"0.725": {
"vector": [-0.56676, -7.78513, 7.50953]
},
"0.775": {
"vector": [-0.72986, -7.69452, 4.29183]
},
"0.8": {
"vector": [-1.52007, -6.19301, 2.97592]
},
"0.85": {
"vector": [-1.50644, -6.628, 4.31341]
},
"0.9": {
"vector": [-1.77543, -6.29446, 5.06677]
},
"0.925": {
"vector": [-2.17152, -5.6814, 5.79795]
},
"0.95": {
"vector": [-2.33022, -5.39513, 5.92379]
},
"0.975": {
"vector": [-2.35753, -4.95022, 4.69759]
},
"1.0": {
"vector": [-3.25277, -2.91075, 4.22029]
},
"1.05": {
"vector": [-1.7943, 0.59114, 3.07913]
},
"1.1": {
"vector": [0.88646, 1.82623, 0.12722]
},
"1.15": {
"vector": [5.7, 3.6, -2.7],
"easing": "easeInOutSine"
},
"1.2": {
"vector": [5.7, 3.6, -2.7],
"easing": "easeInOutSine"
},
"1.225": {
"vector": [5.7, 3.6, -0.7],
"easing": "easeInOutSine"
},
"1.4": {
"vector": [5.7, 3.6, -0.7],
"easing": "easeInOutSine"
},
"1.5": {
"vector": [2.76, 2.16, -1.12]
},
"1.575": {
"vector": [0, 0, 0]
}
}
},
"gun": {
"rotation": {
"0.0": {
"vector": [0, 0, 0]
},
"0.1": {
"vector": [9, 0, -20.64],
"easing": "easeInSine"
},
"0.25": {
"vector": [-13, 22.5, 84.5],
"easing": "easeInElastic"
},
"0.4": {
"vector": [-6, 0.5, -19.5],
"easing": "easeInElastic"
},
"0.525": {
"vector": [-17, 0.5, -27.5],
"easing": "easeInElastic"
},
"0.675": {
"vector": [-14.28, 0.42, -28.43]
},
"0.9": {
"vector": [-6.8, 0.2, -31]
},
"0.975": {
"vector": [0.24, 0.14, -24.7],
"easing": "easeInElastic"
},
"1.025": {
"vector": [-2.83, 0.1, -23.5]
},
"1.2": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
},
"position": {
"0.0": {
"vector": [0, 0, 0]
},
"0.1": {
"vector": [-1.92969, 1.12536, 0],
"easing": "easeInOutSine"
},
"0.225": {
"vector": [-6.16, -1.54, 0]
},
"0.325": {
"vector": [-7.2, 0, 0],
"easing": "easeInElastic"
},
"0.4": {
"vector": [-6, 0.3, 0]
},
"0.525": {
"vector": [-5.3, 1.1, 1.4],
"easing": "easeInElastic"
},
"0.75": {
"vector": [-4.2604, 0.26871, 1.06417]
},
"0.9": {
"vector": [-4.60562, -0.06676, 1.19608]
},
"0.975": {
"vector": [-4.40093, 1.02209, 1.59999]
},
"1.025": {
"vector": [-3.30405, 0.16741, 2.44762]
},
"1.2": {
"vector": [0, 0, 0],
"easing": "easeInElastic"
}
}
},
"body": {
"rotation": {
"0.15": {
"vector": [0, 0, 0]
},
"0.25": {
"vector": [-6, -20, 0]
},
"0.5": {
"vector": [-10.27, -10.73, 0]
},
"0.8": {
"vector": [-11, -15, 0]
},
"1.025": {
"vector": [-11, -15, 0]
},
"1.225": {
"vector": [0, 0, 0]
}
},
"position": {
"0.15": {
"vector": [0, 0, 0]
},
"0.25": {
"vector": [0.57956, 0, 0.15529]
},
"0.8": {
"vector": [0.57956, 0, 0.15529]
},
"1.025": {
"vector": [0.57956, 0, 0.15529]
},
"1.225": {
"vector": [0, 0, 0]
}
}
},
"magazine": {
"rotation": {
"0.175": {
"vector": [0, 0, 0]
},
"0.225": {
"vector": [0, 0, 0]
},
"0.575": {
"vector": [-15.75262, -37.73703, 456.13539],
"easing": "easeOutSine"
},
"0.625": {
"vector": [-15.75262, -37.73703, 456.13539],
"easing": "easeOutSine"
},
"0.65": {
"vector": [32.40128, 10.54474, 0.36623]
},
"0.8": {
"vector": [14.83291, 5.73814, -1.20757]
},
"0.925": {
"vector": [0, 0, 0]
},
"0.975": {
"vector": [0, 0, 0]
},
"1.0": {
"vector": [0, 0, 0]
}
},
"position": {
"0.175": {
"vector": [0, 0, 0]
},
"0.225": {
"vector": [0, -4.7, 0.9],
"easing": "easeInQuad"
},
"0.25": {
"vector": [-1.01654, -5.97646, 1.15849]
},
"0.275": {
"vector": [-6.41418, -6.62275, 1.0015]
},
"0.3": {
"vector": [-14.80325, 1.71423, 0.74022]
},
"0.325": {
"vector": [-16.00879, 13.41548, -0.24656]
},
"0.35": {
"vector": [-19.74367, 18.68347, -0.39542]
},
"0.375": {
"vector": [-26.68159, 19.19734, 0.27006]
},
"0.4": {
"vector": [-33.15559, 20.22964, 0.86581]
},
"0.425": {
"vector": [-37.30305, 21.75236, -1.08329]
},
"0.45": {
"vector": [-40.69671, 23.35227, -5.15997]
},
"0.475": {
"vector": [-44.5015, 24.56967, -7.58785]
},
"0.5": {
"vector": [-48.40692, 25.15858, -7.71781]
},
"0.575": {
"vector": [-272.2128, 80.51608, 12.36898]
},
"0.625": {
"vector": [-272.2128, 80.51608, 12.36898]
},
"0.65": {
"vector": [-0.45801, -11.75106, 8.69283],
"easing": "easeInQuad"
},
"0.8": {
"vector": [0.05474, -4.54521, 2.4771],
"easing": "easeInQuad"
},
"0.925": {
"vector": [0, -4.7, 1.9],
"easing": "easeInQuad"
},
"0.975": {
"vector": [0, -4.7, 0.9],
"easing": "easeInQuad"
},
"1.0": {
"vector": [0, 0, 0]
}
}
},
"bullet": {
"scale": {
"0.1": {
"vector": [1, 1, 1]
},
"0.125": {
"vector": [0, 0, 0]
},
"0.6": {
"vector": [0, 0, 0]
},
"0.625": {
"vector": [1, 1, 1]
}
}
},
"camera": {
"rotation": {
"0.05": {
"vector": [0, 0, 0]
},
"0.175": {
"vector": [2, -2, 1],
"easing": "easeInSine"
},
"0.25": {
"vector": [2.5, 3, -2],
"easing": "easeInElastic"
},
"0.3": {
"vector": [-1, -2, 1],
"easing": "easeInSine"
},
"0.375": {
"vector": [0, 2, -0.8]
},
"0.475": {
"vector": [-0.67, -0.67, 0.4]
},
"0.75": {
"vector": [0.5, 0, 1.2],
"easing": "easeOutSine"
},
"0.875": {
"vector": [-0.1, 0, 2]
},
"0.975": {
"vector": [0, 0, 1.5],
"easing": "easeInElastic"
},
"1.025": {
"vector": [1, 1, -2.5],
"easing": "easeInSine"
},
"1.075": {
"vector": [-0.5, -0.5, 1.5]
},
"1.2": {
"vector": [0.2, 0, -1.5]
},
"1.25": {
"vector": [1, 2, 1.8]
},
"1.35": {
"vector": [-1.5, -3, -1.5]
},
"1.45": {
"vector": [0, 2, 1],
"easing": "easeInElastic"
},
"1.55": {
"vector": [0, 0, 0]
}
}
}
}
},
"animation.glock.change_fire_rate": {
"animation_length": 0.5,
"override_previous_animation": true,

File diff suppressed because it is too large Load diff

View file

@ -38,6 +38,7 @@
"item.superbwarfare.ntw_20": "NTW-20",
"item.superbwarfare.glock_17": "GLOCK-17",
"item.superbwarfare.glock_18": "GLOCK-18",
"item.superbwarfare.m_1911": "M1911A1",
"des.superbwarfare.tips.damage": "Damage: ",
"des.superbwarfare.tips.level": "Level: ",
@ -69,6 +70,7 @@
"item.superbwarfare.taser_blueprint": "TASER Blueprint",
"item.superbwarfare.glock_17_blueprint": "GLOCK-17 Blueprint",
"item.superbwarfare.glock_18_blueprint": "GLOCK-18 Blueprint",
"item.superbwarfare.m_1911_blueprint": "M1911 Blueprint",
"item.superbwarfare.common_material_pack": "Common Material Pack",
"item.superbwarfare.rare_material_pack": "Rare Material Pack",

View file

@ -38,6 +38,7 @@
"item.superbwarfare.ntw_20": "NTW-20反器材狙击步枪",
"item.superbwarfare.glock_17": "格洛克17手枪",
"item.superbwarfare.glock_18": "格洛克18手枪",
"item.superbwarfare.m_1911": "M1911手枪",
"des.superbwarfare.tips.damage": "伤害: ",
"des.superbwarfare.tips.level": "等级: ",
@ -69,6 +70,7 @@
"item.superbwarfare.taser_blueprint": "泰瑟枪蓝图",
"item.superbwarfare.glock_17_blueprint": "格洛克17手枪蓝图",
"item.superbwarfare.glock_18_blueprint": "格洛克18手枪蓝图",
"item.superbwarfare.m_1911_blueprint": "M1911手枪蓝图",
"item.superbwarfare.common_material_pack": "普通材料包",
"item.superbwarfare.rare_material_pack": "稀有材料包",

View file

@ -0,0 +1,112 @@
{
"credit": "Made with Blockbench",
"parent": "builtin/entity",
"texture_size": [
64,
64
],
"gui_light": "front",
"display": {
"thirdperson_righthand": {
"translation": [
0,
0,
-0.5
],
"scale": [
0.35,
0.35,
0.35
]
},
"thirdperson_lefthand": {
"translation": [
0,
0,
-0.5
],
"scale": [
0.35,
0.35,
0.35
]
},
"firstperson_righthand": {
"translation": [
-7,
3.25,
0.75
],
"scale": [
1.05,
1.05,
1.05
]
},
"firstperson_lefthand": {
"translation": [
80,
-80,
80
],
"scale": [
0,
0,
0
]
},
"ground": {
"translation": [
0,
5,
0
],
"scale": [
0.35,
0.35,
0.35
]
},
"gui": {
"rotation": [
165.69,
-39.63,
167
],
"translation": [
-0.25,
0,
0
],
"scale": [
1.7,
1.7,
1.7
]
},
"head": {
"translation": [
0,
10.25,
-1.25
]
},
"fixed": {
"rotation": [
0,
90,
0
],
"translation": [
-1,
-0.5,
-1
],
"scale": [
0.7,
0.7,
0.7
]
}
}
}

View file

@ -0,0 +1,212 @@
{
"credit": "Made with Blockbench",
"texture_size": [32, 32],
"textures": {
"0": "superbwarfare:item/m1911_3d",
"particle": "superbwarfare:item/m1911_3d"
},
"elements": [
{
"from": [7.2, 6, 0],
"to": [8.8, 7.8, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 6, 2]},
"faces": {
"north": {"uv": [6.5, 2, 7.5, 3], "texture": "#0"},
"east": {"uv": [0, 0, 7, 1], "texture": "#0"},
"south": {"uv": [6.5, 3, 7.5, 4], "texture": "#0"},
"west": {"uv": [0, 1, 7, 2], "texture": "#0"},
"up": {"uv": [1, 9, 0, 2], "texture": "#0"},
"down": {"uv": [2, 2, 1, 9], "texture": "#0"}
}
},
{
"from": [7.3, 5, 3.85],
"to": [8.7, 6, 13.65],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 4, 2]},
"faces": {
"north": {"uv": [8, 1.5, 8.5, 2], "texture": "#0"},
"east": {"uv": [5, 5, 10, 5.5], "texture": "#0"},
"south": {"uv": [8, 8, 8.5, 8.5], "texture": "#0"},
"west": {"uv": [5, 5.5, 10, 6], "texture": "#0"},
"up": {"uv": [5.5, 11, 5, 6], "texture": "#0"},
"down": {"uv": [6, 6, 5.5, 11], "texture": "#0"}
}
},
{
"from": [7.3, 5.4, 0.05],
"to": [8.7, 6, 3.85],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 4, 2]},
"faces": {
"north": {"uv": [8.5, 0, 9, 0.5], "texture": "#0"},
"east": {"uv": [6.5, 4, 8.5, 4.5], "texture": "#0"},
"south": {"uv": [8.5, 0.5, 9, 1], "texture": "#0"},
"west": {"uv": [6.5, 4.5, 8.5, 5], "texture": "#0"},
"up": {"uv": [7, 8, 6.5, 6], "texture": "#0"},
"down": {"uv": [7.5, 0, 7, 2], "texture": "#0"}
}
},
{
"from": [7.3, 5.5, 13.65],
"to": [8.7, 6, 15.05],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 4, 2]},
"faces": {
"north": {"uv": [8.5, 1, 9, 1.5], "texture": "#0"},
"east": {"uv": [8.5, 1.5, 9, 2], "texture": "#0"},
"south": {"uv": [8.5, 2, 9, 2.5], "texture": "#0"},
"west": {"uv": [8.5, 2.5, 9, 3], "texture": "#0"},
"up": {"uv": [9, 3.5, 8.5, 3], "texture": "#0"},
"down": {"uv": [9, 3.5, 8.5, 4], "texture": "#0"}
}
},
{
"from": [7.3, 5.17482, 13.61523],
"to": [8.7, 5.67482, 14.71523],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 5.42482, 13.91523]},
"faces": {
"north": {"uv": [8.5, 4, 9, 4.5], "texture": "#0"},
"east": {"uv": [8.5, 4.5, 9, 5], "texture": "#0"},
"south": {"uv": [8.5, 7, 9, 7.5], "texture": "#0"},
"west": {"uv": [7.5, 8.5, 8, 9], "texture": "#0"},
"up": {"uv": [9, 8, 8.5, 7.5], "texture": "#0"},
"down": {"uv": [8.5, 8.5, 8, 9], "texture": "#0"}
}
},
{
"from": [7.7, 6, 13.85],
"to": [8.3, 7.4, 14.35],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 4, 2]},
"faces": {
"north": {"uv": [8.5, 8, 9, 8.5], "texture": "#0"},
"east": {"uv": [8.5, 8.5, 9, 9], "texture": "#0"},
"south": {"uv": [0, 9, 0.5, 9.5], "texture": "#0"},
"west": {"uv": [9, 0, 9.5, 0.5], "texture": "#0"},
"up": {"uv": [1, 9.5, 0.5, 9], "texture": "#0"},
"down": {"uv": [9.5, 0.5, 9, 1], "texture": "#0"}
}
},
{
"from": [7.7, 7.38691, 14.19239],
"to": [8.3, 7.68691, 14.99239],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 7.43691, 15.09239]},
"faces": {
"north": {"uv": [1, 9, 1.5, 9.5], "texture": "#0"},
"east": {"uv": [9, 1, 9.5, 1.5], "texture": "#0"},
"south": {"uv": [1.5, 9, 2, 9.5], "texture": "#0"},
"west": {"uv": [9, 1.5, 9.5, 2], "texture": "#0"},
"up": {"uv": [2.5, 9.5, 2, 9], "texture": "#0"},
"down": {"uv": [9.5, 2, 9, 2.5], "texture": "#0"}
}
},
{
"from": [7.65, 3.25, 7.75],
"to": [8.35, 5, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 4, 1]},
"faces": {
"north": {"uv": [2, 8, 2.5, 9], "texture": "#0"},
"east": {"uv": [2.5, 8, 3, 9], "texture": "#0"},
"south": {"uv": [3, 8, 3.5, 9], "texture": "#0"},
"west": {"uv": [3.5, 8, 4, 9], "texture": "#0"},
"up": {"uv": [3, 9.5, 2.5, 9], "texture": "#0"},
"down": {"uv": [9.5, 2.5, 9, 3], "texture": "#0"}
}
},
{
"from": [7.85, 3.35213, 10.26309],
"to": [8.15, 5.60213, 11.41309],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4.72713, 10.53809]},
"faces": {
"north": {"uv": [4, 8, 4.5, 9], "texture": "#0"},
"east": {"uv": [4.5, 8, 5, 9], "texture": "#0"},
"south": {"uv": [6.5, 8, 7, 9], "texture": "#0"},
"west": {"uv": [8, 7, 8.5, 8], "texture": "#0"},
"up": {"uv": [3.5, 9.5, 3, 9], "texture": "#0"},
"down": {"uv": [9.5, 3, 9, 3.5], "texture": "#0"}
}
},
{
"from": [7.6, 6.60213, -0.13691],
"to": [8.4, 7.40213, 0.11309],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 7.00213, 0.68809]},
"faces": {
"north": {"uv": [4, 8, 4.5, 9], "texture": "#0"},
"east": {"uv": [4.5, 8, 5, 9], "texture": "#0"},
"south": {"uv": [6.5, 8, 7, 9], "texture": "#0"},
"west": {"uv": [8, 7, 8.5, 8], "texture": "#0"},
"up": {"uv": [3.5, 9.5, 3, 9], "texture": "#0"},
"down": {"uv": [9.5, 3, 9, 3.5], "texture": "#0"}
}
},
{
"from": [7.65, 3.25, 8],
"to": [8.35, 3.5, 11.75],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 3.375, 8.875]},
"faces": {
"north": {"uv": [3.5, 9, 4, 9.5], "texture": "#0"},
"east": {"uv": [7, 6, 9, 6.5], "texture": "#0"},
"south": {"uv": [9, 3.5, 9.5, 4], "texture": "#0"},
"west": {"uv": [7, 6.5, 9, 7], "texture": "#0"},
"up": {"uv": [7.5, 9, 7, 7], "texture": "#0"},
"down": {"uv": [8, 0, 7.5, 2], "texture": "#0"}
}
},
{
"from": [7.10781, -0.31537, 11.55224],
"to": [8.89219, 5.23463, 13.75224],
"rotation": {"angle": -22.5, "axis": "x", "origin": [7, 4.23463, 12.15224]},
"faces": {
"north": {"uv": [2, 5, 3, 8], "texture": "#0"},
"east": {"uv": [5, 2, 6, 5], "texture": "#0"},
"south": {"uv": [3, 5, 4, 8], "texture": "#0"},
"west": {"uv": [4, 5, 5, 8], "texture": "#0"},
"up": {"uv": [8.5, 3, 7.5, 2], "texture": "#0"},
"down": {"uv": [8.5, 3, 7.5, 4], "texture": "#0"}
}
},
{
"from": [7.30781, -0.51537, 11.15224],
"to": [8.69219, 5.53463, 13.95224],
"rotation": {"angle": -22.5, "axis": "x", "origin": [7, 4.23463, 12.15224]},
"faces": {
"north": {"uv": [6, 2, 6.5, 5], "texture": "#0"},
"east": {"uv": [2, 2, 3.5, 5], "texture": "#0"},
"south": {"uv": [6, 6, 6.5, 9], "texture": "#0"},
"west": {"uv": [3.5, 2, 5, 5], "texture": "#0"},
"up": {"uv": [8, 8.5, 7.5, 7], "texture": "#0"},
"down": {"uv": [8.5, 0, 8, 1.5], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [-1, 1.5, 0],
"scale": [0.5, 0.5, 0.5]
},
"thirdperson_lefthand": {
"scale": [0, 0, 0]
},
"firstperson_lefthand": {
"translation": [0, -80, 0],
"scale": [0, 0, 0]
},
"ground": {
"translation": [0, -0.25, 0],
"scale": [0.75, 0.75, 0.75]
},
"head": {
"translation": [0, 10.25, 0]
},
"fixed": {
"rotation": [90, 45, -90],
"translation": [1.25, 4, 0],
"scale": [1.2, 1.2, 1.2]
}
},
"groups": [
{
"name": "group",
"origin": [7, 4.23463, 12.15224],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
}
]
}

View file

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

View file

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

View file

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

View file

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

View file

@ -1263,6 +1263,54 @@
}
]
},
"m_1911_fire_1p": {
"sounds": [
{
"name": "superbwarfare:m1911/m1911_fire_1p",
"stream": false
}
]
},
"m_1911_fire_3p": {
"sounds": [
{
"name": "superbwarfare:m1911/m1911_fire_3p",
"stream": false
}
]
},
"m_1911_far": {
"sounds": [
{
"name": "superbwarfare:m1911/m1911_far",
"stream": false
}
]
},
"m_1911_veryfar": {
"sounds": [
{
"name": "superbwarfare:m1911/m1911_veryfar",
"stream": false
}
]
},
"m_1911_reload_normal": {
"sounds": [
{
"name": "superbwarfare:glock_17/glock_reload_normal",
"stream": false
}
]
},
"m_1911_reload_empty": {
"sounds": [
{
"name": "superbwarfare:glock_17/glock_reload_empty",
"stream": false
}
]
},
"lightsaber": {
"sounds": [
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -0,0 +1,22 @@
{
"zoom_speed": 1.7,
"zoom": 1.25,
"dev": 2.7,
"recoil_x": 0.006,
"recoil_y": 0.018,
"damage": 9.5,
"headshot": 1.5,
"velocity": 14,
"mag": 7,
"projectile_amount": 1,
"fire_interval": 3,
"weight": 0,
"fire_mode": 0,
"semi": 1,
"burst": 0,
"auto": 0,
"burst_size": 1,
"normal_reload_time": 30,
"empty_reload_time": 35,
"BypassesArmor": 0.2
}

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -1,5 +1,5 @@
{
"type": "superbwarfare:target_loot_modifier",
"type": "superbwarfare:superbwarfare_loot_modifier",
"conditions": [
{
"condition": "forge:loot_table_id",

View file

@ -32,6 +32,20 @@
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:m_1911_blueprint",
"weight": 45,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:glock_18_blueprint",

View file

@ -20,7 +20,7 @@
},
{
"type": "minecraft:item",
"name": "superbwarfare:glock_18_blueprint",
"name": "superbwarfare:m_1911_blueprint",
"weight": 10,
"functions": [
{
@ -32,6 +32,20 @@
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:glock_18_blueprint",
"weight": 11,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "superbwarfare:m_79_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:m_1911_blueprint"
},
"c": {
"item": "minecraft:lapis_lazuli"
}
},
"result": {
"item": "superbwarfare:m_1911_blueprint",
"count": 2
}
}

View file

@ -0,0 +1,15 @@
{
"type": "minecraft:smithing_transform",
"template": {
"item": "superbwarfare:m_1911_blueprint"
},
"base": {
"item": "superbwarfare:common_material_pack"
},
"addition": {
"item": "superbwarfare:ingot_steel"
},
"result": {
"item": "superbwarfare:m_1911"
}
}

View file

@ -23,6 +23,7 @@
"superbwarfare:ak_47",
"superbwarfare:rpg",
"superbwarfare:glock_17",
"superbwarfare:glock_18"
"superbwarfare:glock_18",
"superbwarfare:m_1911"
]
}

View file

@ -22,6 +22,7 @@
"superbwarfare:m_98b",
"superbwarfare:ak_47",
"superbwarfare:glock_17",
"superbwarfare:glock_18"
"superbwarfare:glock_18",
"superbwarfare:m_1911"
]
}

View file

@ -26,6 +26,7 @@
"superbwarfare:ak_47",
"superbwarfare:rpg",
"superbwarfare:glock_17",
"superbwarfare:glock_18"
"superbwarfare:glock_18",
"superbwarfare:m_1911"
]
}

View file

@ -3,6 +3,7 @@
"values": [
"superbwarfare:trachelium",
"superbwarfare:glock_17",
"superbwarfare:glock_18"
"superbwarfare:glock_18",
"superbwarfare:m_1911"
]
}

View file

@ -21,6 +21,7 @@
"superbwarfare:m_870",
"superbwarfare:marlin",
"superbwarfare:glock_17",
"superbwarfare:glock_18"
"superbwarfare:glock_18",
"superbwarfare:m_1911"
]
}

View file

@ -17,6 +17,7 @@
"superbwarfare:m_98b",
"superbwarfare:sentinel",
"superbwarfare:glock_17",
"superbwarfare:glock_18"
"superbwarfare:glock_18",
"superbwarfare:m_1911"
]
}