完成1130

This commit is contained in:
Atsuishio 2025-04-28 03:30:43 +08:00 committed by Light_Quanta
parent 68d308b175
commit ba9cde80e1
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
40 changed files with 442 additions and 153 deletions

View file

@ -1,4 +1,4 @@
// 1.21.1 2025-04-21T19:07:09.7051757 Tags for minecraft:item mod id superbwarfare // 1.21.1 2025-04-28T03:55:32.0571362 Tags for minecraft:item mod id superbwarfare
44a232152f5941d0435a35483b37f8ed22fd10bf data/c/tags/item/dusts.json 44a232152f5941d0435a35483b37f8ed22fd10bf data/c/tags/item/dusts.json
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/c/tags/item/dusts/coal_coke.json 0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/c/tags/item/dusts/coal_coke.json
295ddf906b7133a0558d03e9a60eea18281fe430 data/c/tags/item/dusts/iron.json 295ddf906b7133a0558d03e9a60eea18281fe430 data/c/tags/item/dusts/iron.json
@ -42,7 +42,6 @@ ab580f3989177c0589c43ca346db571011600187 data/superbwarfare/tags/item/launcher/g
b404c6fd99d2ca68c6738f225cb7d68ee443c10a data/superbwarfare/tags/item/machine_gun.json b404c6fd99d2ca68c6738f225cb7d68ee443c10a data/superbwarfare/tags/item/machine_gun.json
a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/item/military_armor.json a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/item/military_armor.json
8ea4fb7d3981141a953bd5510e8c76fb790307aa data/superbwarfare/tags/item/normal_gun.json 8ea4fb7d3981141a953bd5510e8c76fb790307aa data/superbwarfare/tags/item/normal_gun.json
15328cd564c931cc0a4fc000596240f93a7b29a1 data/superbwarfare/tags/item/revolver.json
aaa533157491a82b8e23b2914deef67c4078cbed data/superbwarfare/tags/item/rifle.json aaa533157491a82b8e23b2914deef67c4078cbed data/superbwarfare/tags/item/rifle.json
a249d9d052cdc24b34e0e51ab991329f6c76e8ab data/superbwarfare/tags/item/shotgun.json a249d9d052cdc24b34e0e51ab991329f6c76e8ab data/superbwarfare/tags/item/shotgun.json
4aca0fa3f8b9f2a4920041e35e46dae7e93d5482 data/superbwarfare/tags/item/smg.json 4aca0fa3f8b9f2a4920041e35e46dae7e93d5482 data/superbwarfare/tags/item/smg.json

View file

@ -1,4 +1,4 @@
// 1.21.1 2025-04-08T22:45:20.96671 Loot Tables // 1.21.1 2025-04-28T03:55:32.0605798 Loot Tables
98386b2e65b2afb7cf5b0cabf6a7b0f062c1e640 data/superbwarfare/loot_table/blocks/barbed_wire.json 98386b2e65b2afb7cf5b0cabf6a7b0f062c1e640 data/superbwarfare/loot_table/blocks/barbed_wire.json
811e69929a14e6736015849c220100bb58d914c9 data/superbwarfare/loot_table/blocks/cemented_carbide_block.json 811e69929a14e6736015849c220100bb58d914c9 data/superbwarfare/loot_table/blocks/cemented_carbide_block.json
1f482bc1f0a1026d0e1b75ee28c6f541b56747a5 data/superbwarfare/loot_table/blocks/charging_station.json 1f482bc1f0a1026d0e1b75ee28c6f541b56747a5 data/superbwarfare/loot_table/blocks/charging_station.json
@ -22,8 +22,8 @@ fb31a40f6a04000f317823cbb80eda8588ba9c69 data/superbwarfare/loot_table/blocks/si
71fc892124b5343e10688cabc2fb7c87d83cfef8 data/superbwarfare/loot_table/blocks/tungsten_block.json 71fc892124b5343e10688cabc2fb7c87d83cfef8 data/superbwarfare/loot_table/blocks/tungsten_block.json
6e2346c664cd643bff31c0a26e463c6c8dd46e37 data/superbwarfare/loot_table/chests/ancient_cpu.json 6e2346c664cd643bff31c0a26e463c6c8dd46e37 data/superbwarfare/loot_table/chests/ancient_cpu.json
031ebfa016c816ebbd03dcf03f169599eed3e9d4 data/superbwarfare/loot_table/chests/blue_print_common.json 031ebfa016c816ebbd03dcf03f169599eed3e9d4 data/superbwarfare/loot_table/chests/blue_print_common.json
eef164cceb825ad572fc9d2eaef4631f9ec13c7f data/superbwarfare/loot_table/chests/blue_print_epic.json 60f0cf8c558f09fd878a68e0c3a876c9484f83ac data/superbwarfare/loot_table/chests/blue_print_epic.json
f28f40e6bca3090625550f4c62d5f2a1384fe3ba data/superbwarfare/loot_table/chests/blue_print_rare.json dd6ba01de4126332ac0dda484ab4176c03fdad06 data/superbwarfare/loot_table/chests/blue_print_rare.json
7e75ff103ccdbcf6be6f61413a4173115195f0a9 data/superbwarfare/loot_table/containers/blueprints.json 7e75ff103ccdbcf6be6f61413a4173115195f0a9 data/superbwarfare/loot_table/containers/blueprints.json
be87d07ea13253e7a2237f048acc655e16e8317c data/superbwarfare/loot_table/containers/common.json be87d07ea13253e7a2237f048acc655e16e8317c data/superbwarfare/loot_table/containers/common.json
151368546abc7b65138a0a822dd53b48999d86be data/superbwarfare/loot_table/special/common/blueprints.json 151368546abc7b65138a0a822dd53b48999d86be data/superbwarfare/loot_table/special/common/blueprints.json

View file

@ -1,4 +1,4 @@
// 1.21.1 2025-04-08T06:51:00.2717304 Item Models: superbwarfare // 1.21.1 2025-04-28T03:55:32.0625325 Item Models: superbwarfare
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/aa_12_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/aa_12_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_12_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_12_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_47_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_47_blueprint.json
@ -40,6 +40,7 @@ afbfd24461fb7e6b43a8e029f0a894b84d8b6638 assets/superbwarfare/models/item/heavy_
e7a6de100f377835831211168d98c8d19434af24 assets/superbwarfare/models/item/he_head.json e7a6de100f377835831211168d98c8d19434af24 assets/superbwarfare/models/item/he_head.json
d23520b099cb796401635fe75b5b852fc957d4ea assets/superbwarfare/models/item/high_energy_explosives.json d23520b099cb796401635fe75b5b852fc957d4ea assets/superbwarfare/models/item/high_energy_explosives.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/hk_416_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/hk_416_blueprint.json
a5cf666a970906ba6ac0af9a4d5d52dd0e093dec assets/superbwarfare/models/item/hpj_11_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/hunting_rifle_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/hunting_rifle_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/insidious_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/insidious_blueprint.json
3c9dcc3393e16ca354b01162316f1ddae92338ec assets/superbwarfare/models/item/iron_action.json 3c9dcc3393e16ca354b01162316f1ddae92338ec assets/superbwarfare/models/item/iron_action.json

View file

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

View file

@ -99,6 +99,11 @@
"name": "superbwarfare:mle_1934_blueprint", "name": "superbwarfare:mle_1934_blueprint",
"weight": 10 "weight": 10
}, },
{
"type": "minecraft:item",
"name": "superbwarfare:hpj_11_blueprint",
"weight": 10
},
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "superbwarfare:annihilator_blueprint", "name": "superbwarfare:annihilator_blueprint",

View file

@ -189,6 +189,11 @@
"name": "superbwarfare:mle_1934_blueprint", "name": "superbwarfare:mle_1934_blueprint",
"weight": 3 "weight": 3
}, },
{
"type": "minecraft:item",
"name": "superbwarfare:hpj_11_blueprint",
"weight": 3
},
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "superbwarfare:annihilator_blueprint" "name": "superbwarfare:annihilator_blueprint"

View file

@ -1,5 +0,0 @@
{
"values": [
"superbwarfare:trachelium"
]
}

View file

@ -13,7 +13,7 @@ import software.bernie.geckolib.renderer.GeoRenderer;
import software.bernie.geckolib.renderer.layer.GeoRenderLayer; import software.bernie.geckolib.renderer.layer.GeoRenderLayer;
public class SmallCannonShellLayer extends GeoRenderLayer<SmallCannonShellEntity> { public class SmallCannonShellLayer extends GeoRenderLayer<SmallCannonShellEntity> {
private static final ResourceLocation LAYER = Mod.loc("textures/entity/cannon_shell_e.png"); private static final ResourceLocation LAYER = Mod.loc("textures/entity/small_cannon_shell.png");
public SmallCannonShellLayer(GeoRenderer<SmallCannonShellEntity> entityRenderer) { public SmallCannonShellLayer(GeoRenderer<SmallCannonShellEntity> entityRenderer) {
super(entityRenderer); super(entityRenderer);

View file

@ -0,0 +1,34 @@
package com.atsuishio.superbwarfare.client.layer.vehicle;
import com.atsuishio.superbwarfare.Mod;
import com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
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 net.minecraft.util.FastColor;
import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.renderer.GeoRenderer;
import software.bernie.geckolib.renderer.layer.GeoRenderLayer;
import static com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity.HEAT;
public class Hpj11HeatLayer extends GeoRenderLayer<Hpj11Entity> {
private static final ResourceLocation LAYER = Mod.loc("textures/entity/1130_heat.png");
public Hpj11HeatLayer(GeoRenderer<Hpj11Entity> entityRenderer) {
super(entityRenderer);
}
@Override
public void render(PoseStack poseStack, Hpj11Entity animatable, BakedGeoModel bakedModel, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, float partialTick, int packedLight, int packedOverlay) {
RenderType glowRenderType = RenderType.eyes(LAYER);
float heat = animatable.getEntityData().get(HEAT) < 20 ? 0 : animatable.getEntityData().get(HEAT) - 20;
var value = (int) (heat / 80f * 255);
var color = FastColor.ARGB32.color(value, value, value);
getRenderer().reRender(getDefaultBakedModel(animatable), poseStack, bufferSource, animatable, glowRenderType, bufferSource.getBuffer(glowRenderType), partialTick, packedLight, OverlayTexture.NO_OVERLAY, color);
}
}

View file

@ -0,0 +1,29 @@
package com.atsuishio.superbwarfare.client.layer.vehicle;
import com.atsuishio.superbwarfare.Mod;
import com.atsuishio.superbwarfare.client.ModRenderTypes;
import com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
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 Hpj11Layer extends GeoRenderLayer<Hpj11Entity> {
private static final ResourceLocation LAYER = Mod.loc("textures/entity/1130_e.png");
public Hpj11Layer(GeoRenderer<Hpj11Entity> entityRenderer) {
super(entityRenderer);
}
@Override
public void render(PoseStack poseStack, Hpj11Entity animatable, BakedGeoModel bakedModel, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, float partialTick, int packedLight, int packedOverlay) {
RenderType glowRenderType = ModRenderTypes.MUZZLE_FLASH_TYPE.apply(LAYER);
getRenderer().reRender(getDefaultBakedModel(animatable), poseStack, bufferSource, animatable, glowRenderType, bufferSource.getBuffer(glowRenderType), partialTick, packedLight, OverlayTexture.NO_OVERLAY, 0xFFFFFFFF);
}
}

View file

@ -11,24 +11,22 @@ public class SmallCannonShellModel extends GeoModel<SmallCannonShellEntity> {
@Override @Override
public ResourceLocation getAnimationResource(SmallCannonShellEntity entity) { public ResourceLocation getAnimationResource(SmallCannonShellEntity entity) {
return Mod.loc("animations/cannon_shell.animation.json"); return null;
} }
@Override @Override
public ResourceLocation getModelResource(SmallCannonShellEntity entity) { public ResourceLocation getModelResource(SmallCannonShellEntity entity) {
return Mod.loc("geo/cannon_shell.geo.json"); return Mod.loc("geo/small_cannon_shell.geo.json");
} }
@Override @Override
public ResourceLocation getTextureResource(SmallCannonShellEntity entity) { public ResourceLocation getTextureResource(SmallCannonShellEntity entity) {
return Mod.loc("textures/entity/cannon_shell.png"); return Mod.loc("textures/entity/small_cannon_shell.png");
} }
@Override @Override
public void setCustomAnimations(SmallCannonShellEntity animatable, long instanceId, AnimationState animationState) { public void setCustomAnimations(SmallCannonShellEntity animatable, long instanceId, AnimationState animationState) {
GeoBone bone = getAnimationProcessor().getBone("bone"); GeoBone bone = getAnimationProcessor().getBone("bone");
bone.setScaleX(0.17f); bone.setScaleY((float) (1 + animatable.getDeltaMovement().length()));
bone.setScaleY(0.17f);
bone.setScaleZ(0.17f);
} }
} }

View file

@ -3,6 +3,7 @@ package com.atsuishio.superbwarfare.client.overlay;
import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.Mod;
import com.atsuishio.superbwarfare.client.RenderHelper; import com.atsuishio.superbwarfare.client.RenderHelper;
import com.atsuishio.superbwarfare.entity.vehicle.AnnihilatorEntity; import com.atsuishio.superbwarfare.entity.vehicle.AnnihilatorEntity;
import com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity;
import com.atsuishio.superbwarfare.entity.vehicle.Mk42Entity; import com.atsuishio.superbwarfare.entity.vehicle.Mk42Entity;
import com.atsuishio.superbwarfare.entity.vehicle.Mle1934Entity; import com.atsuishio.superbwarfare.entity.vehicle.Mle1934Entity;
import com.atsuishio.superbwarfare.entity.vehicle.base.CannonEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.CannonEntity;
@ -134,6 +135,8 @@ public class CannonHudOverlay implements LayeredDraw.Layer {
w / 2 + 14, h / 2 - 20, -1, false); w / 2 + 14, h / 2 - 20, -1, false);
} }
} }
if (!(cannon instanceof Hpj11Entity)) {
if (cannon instanceof AnnihilatorEntity) { if (cannon instanceof AnnihilatorEntity) {
preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/laser_cannon_crosshair.png"), k, l, 0, 0.0F, i, j, i, j); preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/laser_cannon_crosshair.png"), k, l, 0, 0.0F, i, j, i, j);
} else { } else {
@ -143,8 +146,26 @@ public class CannonHudOverlay implements LayeredDraw.Layer {
preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/indicator.png"), (float) w / 2 - 4.3f + 0.45f * diffY, (float) h / 2 - 10, 0, 0.0F, 8, 8, 8, 8); preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/indicator.png"), (float) w / 2 - 4.3f + 0.45f * diffY, (float) h / 2 - 10, 0, 0.0F, 8, 8, 8, 8);
} else { } else {
preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j); preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/hpj_crosshair.png"), k, l, 0, 0.0F, i, j, i, j);
} }
} else {
if (!(cannon instanceof Hpj11Entity)) {
preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j);
} else {
preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/hpj_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j);
}
}
RenderSystem.disableDepthTest();
RenderSystem.depthMask(false);
RenderSystem.enableBlend();
RenderSystem.setShader(GameRenderer::getPositionTexShader);
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
RenderSystem.setShaderColor(1, 1, 1, 1);
renderKillIndicator(guiGraphics, w, h); renderKillIndicator(guiGraphics, w, h);
} else if (Minecraft.getInstance().options.getCameraType() == CameraType.THIRD_PERSON_BACK && !ClientEventHandler.zoomVehicle) { } else if (Minecraft.getInstance().options.getCameraType() == CameraType.THIRD_PERSON_BACK && !ClientEventHandler.zoomVehicle) {
Vec3 p = RenderHelper.worldToScreen(new Vec3(Mth.lerp(deltaTracker.getGameTimeDeltaPartialTick(true), player.xo, player.getX()), Mth.lerp(deltaTracker.getGameTimeDeltaPartialTick(true), player.yo, player.getY()), Vec3 p = RenderHelper.worldToScreen(new Vec3(Mth.lerp(deltaTracker.getGameTimeDeltaPartialTick(true), player.xo, player.getX()), Mth.lerp(deltaTracker.getGameTimeDeltaPartialTick(true), player.yo, player.getY()),

View file

@ -1,5 +1,7 @@
package com.atsuishio.superbwarfare.client.renderer.entity; package com.atsuishio.superbwarfare.client.renderer.entity;
import com.atsuishio.superbwarfare.client.layer.vehicle.Hpj11HeatLayer;
import com.atsuishio.superbwarfare.client.layer.vehicle.Hpj11Layer;
import com.atsuishio.superbwarfare.client.model.entity.Hpj11Model; import com.atsuishio.superbwarfare.client.model.entity.Hpj11Model;
import com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity; import com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity;
import com.atsuishio.superbwarfare.event.ClientEventHandler; import com.atsuishio.superbwarfare.event.ClientEventHandler;
@ -19,12 +21,15 @@ import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.cache.object.GeoBone; import software.bernie.geckolib.cache.object.GeoBone;
import software.bernie.geckolib.renderer.GeoEntityRenderer; import software.bernie.geckolib.renderer.GeoEntityRenderer;
import static com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity.ANIM_TIME;
public class Hpj11Renderer extends GeoEntityRenderer<Hpj11Entity> { public class Hpj11Renderer extends GeoEntityRenderer<Hpj11Entity> {
public Hpj11Renderer(EntityRendererProvider.Context renderManager) { public Hpj11Renderer(EntityRendererProvider.Context renderManager) {
super(renderManager, new Hpj11Model()); super(renderManager, new Hpj11Model());
this.shadowRadius = 1.5f; this.shadowRadius = 1.5f;
// this.addRenderLayer(new Mk42Layer(this)); this.addRenderLayer(new Hpj11Layer(this));
this.addRenderLayer(new Hpj11HeatLayer(this));
} }
@Override @Override
@ -70,6 +75,13 @@ public class Hpj11Renderer extends GeoEntityRenderer<Hpj11Entity> {
bone.setRotZ(-Mth.lerp(partialTick, animatable.gunRotO, animatable.getGunRot())); bone.setRotZ(-Mth.lerp(partialTick, animatable.gunRotO, animatable.getGunRot()));
} }
if (name.equals("flare")) {
bone.setHidden(animatable.getEntityData().get(ANIM_TIME) == 0);
bone.setScaleX((float) (2 + 0.8 * (Math.random() - 0.5)));
bone.setScaleY((float) (2 + 0.8 * (Math.random() - 0.5)));
bone.setRotZ((float) (0.5 * (Math.random() - 0.5)));
}
super.renderRecursively(poseStack, animatable, bone, renderType, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, color); super.renderRecursively(poseStack, animatable, bone, renderType, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, color);
} }
} }

View file

@ -11,6 +11,7 @@ import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import org.jetbrains.annotations.NotNull;
import software.bernie.geckolib.cache.object.BakedGeoModel; import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.renderer.GeoEntityRenderer; import software.bernie.geckolib.renderer.GeoEntityRenderer;
@ -27,14 +28,17 @@ public class SmallCannonShellRenderer extends GeoEntityRenderer<SmallCannonShell
@Override @Override
public void preRender(PoseStack poseStack, SmallCannonShellEntity entity, BakedGeoModel model, MultiBufferSource bufferSource, VertexConsumer buffer, boolean isReRender, float partialTick, int packedLight, int packedOverlay, int color) { public void preRender(PoseStack poseStack, SmallCannonShellEntity entity, BakedGeoModel model, MultiBufferSource bufferSource, VertexConsumer buffer, boolean isReRender, float partialTick, int packedLight, int packedOverlay, int color) {
if (entity.tickCount > 0) {
float scale = 1f; float scale = 1f;
this.scaleHeight = scale; this.scaleHeight = scale;
this.scaleWidth = scale; this.scaleWidth = scale;
super.preRender(poseStack, entity, model, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, color); super.preRender(poseStack, entity, model, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, color);
} }
}
@Override @Override
public void render(SmallCannonShellEntity entityIn, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource bufferIn, int packedLightIn) { public void render(SmallCannonShellEntity entityIn, float entityYaw, float partialTicks, @NotNull PoseStack poseStack, @NotNull MultiBufferSource bufferIn, int packedLightIn) {
if (entityIn.tickCount > 0) {
poseStack.pushPose(); poseStack.pushPose();
poseStack.mulPose(Axis.YP.rotationDegrees(Mth.lerp(partialTicks, entityIn.yRotO, entityIn.getYRot()) - 90)); poseStack.mulPose(Axis.YP.rotationDegrees(Mth.lerp(partialTicks, entityIn.yRotO, entityIn.getYRot()) - 90));
poseStack.mulPose(Axis.ZP.rotationDegrees(90 + Mth.lerp(partialTicks, entityIn.xRotO, entityIn.getXRot()))); poseStack.mulPose(Axis.ZP.rotationDegrees(90 + Mth.lerp(partialTicks, entityIn.xRotO, entityIn.getXRot())));
@ -42,3 +46,4 @@ public class SmallCannonShellRenderer extends GeoEntityRenderer<SmallCannonShell
poseStack.popPose(); poseStack.popPose();
} }
} }
}

View file

@ -107,6 +107,11 @@ public class VehicleConfig {
public static ModConfigSpec.IntValue PRISM_TANK_DAMAGE_MODE_2; public static ModConfigSpec.IntValue PRISM_TANK_DAMAGE_MODE_2;
public static ModConfigSpec.IntValue PRISM_TANK_SHOOT_COST_MODE_2; public static ModConfigSpec.IntValue PRISM_TANK_SHOOT_COST_MODE_2;
public static ModConfigSpec.IntValue HPJ11_HP;
public static ModConfigSpec.DoubleValue HPJ11_DAMAGE;
public static ModConfigSpec.DoubleValue HPJ11_EXPLOSION_DAMAGE;
public static ModConfigSpec.DoubleValue HPJ11_EXPLOSION_RADIUS;
public static void init(ModConfigSpec.Builder builder) { public static void init(ModConfigSpec.Builder builder) {
builder.push("vehicle"); builder.push("vehicle");
@ -415,6 +420,21 @@ public class VehicleConfig {
builder.comment("The energy cost of PrismTank Mode 2 per tick"); builder.comment("The energy cost of PrismTank Mode 2 per tick");
PRISM_TANK_SHOOT_COST_MODE_2 = builder.defineInRange("prism_tank_shoot_cost_mode_2", 5000, 1, 10000000); PRISM_TANK_SHOOT_COST_MODE_2 = builder.defineInRange("prism_tank_shoot_cost_mode_2", 5000, 1, 10000000);
builder.pop();
builder.push("hpj_11");
builder.comment("The health of HPJ_11");
HPJ11_HP = builder.defineInRange("hpj_11_hp", 350, 1, 10000000);
builder.comment("The damage of HPJ_11");
HPJ11_DAMAGE = builder.defineInRange("hpj_11_damage", 20d, 1, 10000000);
builder.comment("The explosion damage of HPJ_11");
HPJ11_EXPLOSION_DAMAGE = builder.defineInRange("hpj_11_explosion_damage", 7d, 1, 10000000);
builder.comment("The explosion radius of HPJ_11");
HPJ11_EXPLOSION_RADIUS = builder.defineInRange("hpj_11_explosion_radius", 4d, 1, 50);
builder.pop(); builder.pop();

View file

@ -142,6 +142,7 @@ public class ModCustomLootProvider implements LootTableSubProvider {
new ItemEntry(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 3), new ItemEntry(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 3),
new ItemEntry(ModItems.MK_42_BLUEPRINT.get(), 3), new ItemEntry(ModItems.MK_42_BLUEPRINT.get(), 3),
new ItemEntry(ModItems.MLE_1934_BLUEPRINT.get(), 3), new ItemEntry(ModItems.MLE_1934_BLUEPRINT.get(), 3),
new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 3),
new ItemEntry(ModItems.ANNIHILATOR_BLUEPRINT.get(), 1) new ItemEntry(ModItems.ANNIHILATOR_BLUEPRINT.get(), 1)
)) ))
.withPool(multiItems(2, 0, .withPool(multiItems(2, 0,
@ -186,6 +187,7 @@ public class ModCustomLootProvider implements LootTableSubProvider {
new ItemEntry(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 15), new ItemEntry(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 15),
new ItemEntry(ModItems.MK_42_BLUEPRINT.get(), 10), new ItemEntry(ModItems.MK_42_BLUEPRINT.get(), 10),
new ItemEntry(ModItems.MLE_1934_BLUEPRINT.get(), 10), new ItemEntry(ModItems.MLE_1934_BLUEPRINT.get(), 10),
new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 10),
new ItemEntry(ModItems.ANNIHILATOR_BLUEPRINT.get(), 5) new ItemEntry(ModItems.ANNIHILATOR_BLUEPRINT.get(), 5)
)) ))
.withPool(multiItems(2, 0, .withPool(multiItems(2, 0,

View file

@ -152,6 +152,7 @@ public class ModItemModelProvider extends ItemModelProvider {
cannonBlueprintItem(ModItems.MK_42_BLUEPRINT); cannonBlueprintItem(ModItems.MK_42_BLUEPRINT);
cannonBlueprintItem(ModItems.MLE_1934_BLUEPRINT); cannonBlueprintItem(ModItems.MLE_1934_BLUEPRINT);
cannonBlueprintItem(ModItems.ANNIHILATOR_BLUEPRINT); cannonBlueprintItem(ModItems.ANNIHILATOR_BLUEPRINT);
cannonBlueprintItem(ModItems.HPJ_11_BLUEPRINT);
gunBlueprintItem(ModItems.M_2_HB_BLUEPRINT); gunBlueprintItem(ModItems.M_2_HB_BLUEPRINT);
gunBlueprintItem(ModItems.SECONDARY_CATACLYSM_BLUEPRINT); gunBlueprintItem(ModItems.SECONDARY_CATACLYSM_BLUEPRINT);
gunBlueprintItem(ModItems.INSIDIOUS_BLUEPRINT); gunBlueprintItem(ModItems.INSIDIOUS_BLUEPRINT);

View file

@ -17,7 +17,7 @@ import com.atsuishio.superbwarfare.init.ModTags;
import com.atsuishio.superbwarfare.tools.CustomExplosion; import com.atsuishio.superbwarfare.tools.CustomExplosion;
import com.atsuishio.superbwarfare.tools.InventoryTool; import com.atsuishio.superbwarfare.tools.InventoryTool;
import com.atsuishio.superbwarfare.tools.ParticleTool; import com.atsuishio.superbwarfare.tools.ParticleTool;
import com.atsuishio.superbwarfare.tools.SoundTool; import com.mojang.math.Axis;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.EntityDataSerializers;
@ -46,7 +46,7 @@ import software.bernie.geckolib.animation.AnimatableManager;
import software.bernie.geckolib.util.GeckoLibUtil; import software.bernie.geckolib.util.GeckoLibUtil;
public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntity { public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntity {
public static final EntityDataAccessor<Integer> COOL_DOWN = SynchedEntityData.defineId(Hpj11Entity.class, EntityDataSerializers.INT); public static final EntityDataAccessor<Integer> ANIM_TIME = SynchedEntityData.defineId(Hpj11Entity.class, EntityDataSerializers.INT);
public static final EntityDataAccessor<Float> GUN_ROTATE = SynchedEntityData.defineId(Hpj11Entity.class, EntityDataSerializers.FLOAT); public static final EntityDataAccessor<Float> GUN_ROTATE = SynchedEntityData.defineId(Hpj11Entity.class, EntityDataSerializers.FLOAT);
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
@ -60,7 +60,7 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
@Override @Override
protected void defineSynchedData(SynchedEntityData.Builder builder) { protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder); super.defineSynchedData(builder);
builder.define(COOL_DOWN, 0) builder.define(ANIM_TIME, 0)
.define(GUN_ROTATE, 0f); .define(GUN_ROTATE, 0f);
} }
@ -69,9 +69,9 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
return new VehicleWeapon[][]{ return new VehicleWeapon[][]{
new VehicleWeapon[]{ new VehicleWeapon[]{
new SmallCannonShellWeapon() new SmallCannonShellWeapon()
.damage(40) .damage(VehicleConfig.HPJ11_DAMAGE.get().floatValue())
.explosionDamage(8) .explosionDamage(VehicleConfig.HPJ11_EXPLOSION_DAMAGE.get().floatValue())
.explosionRadius(4f) .explosionRadius(VehicleConfig.HPJ11_EXPLOSION_RADIUS.get().floatValue())
.icon(Mod.loc("textures/screens/vehicle_weapon/cannon_30mm.png")) .icon(Mod.loc("textures/screens/vehicle_weapon/cannon_30mm.png"))
} }
}; };
@ -79,19 +79,19 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
@Override @Override
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) { public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
return new ThirdPersonCameraPosition(5, 0.25, 0); return new ThirdPersonCameraPosition(2, 0.75, 0);
} }
@Override @Override
public void addAdditionalSaveData(CompoundTag compound) { public void addAdditionalSaveData(CompoundTag compound) {
super.addAdditionalSaveData(compound); super.addAdditionalSaveData(compound);
compound.putInt("CoolDown", this.entityData.get(COOL_DOWN)); compound.putInt("AnimTime", this.entityData.get(ANIM_TIME));
} }
@Override @Override
protected void readAdditionalSaveData(CompoundTag compound) { protected void readAdditionalSaveData(CompoundTag compound) {
super.readAdditionalSaveData(compound); super.readAdditionalSaveData(compound);
this.entityData.set(COOL_DOWN, compound.getInt("CoolDown")); this.entityData.set(ANIM_TIME, compound.getInt("AnimTime"));
} }
@Override @Override
@ -133,8 +133,8 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
gunRotO = this.getGunRot(); gunRotO = this.getGunRot();
super.baseTick(); super.baseTick();
if (this.entityData.get(COOL_DOWN) > 0) { if (this.entityData.get(ANIM_TIME) > 0) {
this.entityData.set(COOL_DOWN, this.entityData.get(COOL_DOWN) - 1); this.entityData.set(ANIM_TIME, this.entityData.get(ANIM_TIME) - 1);
} }
this.move(MoverType.SELF, this.getDeltaMovement()); this.move(MoverType.SELF, this.getDeltaMovement());
@ -147,10 +147,6 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
this.entityData.set(GUN_ROTATE, this.entityData.get(GUN_ROTATE) * 0.8f); this.entityData.set(GUN_ROTATE, this.entityData.get(GUN_ROTATE) * 0.8f);
setGunRot(getGunRot() + entityData.get(GUN_ROTATE)); setGunRot(getGunRot() + entityData.get(GUN_ROTATE));
if (level().isClientSide && (Math.abs(entityData.get(GUN_ROTATE)) > 0.02)) {
level().playLocalSound(this.getX(), this.getY() + this.getBbHeight() * 0.5, this.getZ(), ModSounds.TURRET_TURN.get(), this.getSoundSource(), (float) Math.min(0.2 * entityData.get(GUN_ROTATE), 1), (random.nextFloat() * 0.05f + 1), false);
}
lowHealthWarning(); lowHealthWarning();
} }
@ -229,17 +225,15 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
@Override @Override
public Vec3 driverZoomPos(float ticks) { public Vec3 driverZoomPos(float ticks) {
Matrix4f transform = getVehicleFlatTransform(ticks); Matrix4f transform = getBarrelTransform(ticks);
Vector4f worldPosition = transformPosition(transform, 0f, 1.5f, 0.25f); Vector4f worldPosition = transformPosition(transform, 0f, 1f, 0);
return new Vec3(worldPosition.x, worldPosition.y, worldPosition.z); return new Vec3(worldPosition.x, worldPosition.y, worldPosition.z);
} }
@Override @Override
public void vehicleShoot(Player player, int type) { public void vehicleShoot(Player player, int type) {
// if (this.entityData.get(COOL_DOWN) > 0) return; if (cannotFire) return;
Level level = player.level();
if (level instanceof ServerLevel) {
if (!InventoryTool.hasCreativeAmmoBox(player)) { if (!InventoryTool.hasCreativeAmmoBox(player)) {
var ammo = ModItems.SMALL_SHELL.get(); var ammo = ModItems.SMALL_SHELL.get();
var ammoCount = InventoryTool.countItem(player.getInventory().items, ammo); var ammoCount = InventoryTool.countItem(player.getInventory().items, ammo);
@ -250,49 +244,34 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
var entityToSpawn = ((SmallCannonShellWeapon) getWeapon(0)).create(player); var entityToSpawn = ((SmallCannonShellWeapon) getWeapon(0)).create(player);
Matrix4f transform = getVehicleFlatTransform(1); Matrix4f transform = getBarrelTransform(1);
Vector4f worldPosition = transformPosition(transform, 0f, 1.375f, 0.25f); Vector4f worldPosition = transformPosition(transform, 0f, 0.4f, 2.6875f);
entityToSpawn.setPos(worldPosition.x, worldPosition.y, worldPosition.z); entityToSpawn.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
entityToSpawn.shoot(getLookAngle().x, getLookAngle().y, getLookAngle().z, 30, 0.3f); entityToSpawn.shoot(getLookAngle().x, getLookAngle().y, getLookAngle().z, 40, 0.3f);
level.addFreshEntity(entityToSpawn); level().addFreshEntity(entityToSpawn);
if (!player.level().isClientSide) {
if (player instanceof ServerPlayer serverPlayer) { if (player instanceof ServerPlayer serverPlayer) {
SoundTool.playLocalSound(serverPlayer, ModSounds.MINIGUN_FIRE_1P.get(), 2, 1); serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.HPJ_11_FIRE_3P.get(), SoundSource.PLAYERS, 8, random.nextFloat() * 0.05f + 1);
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.MINIGUN_FIRE_3P.get(), SoundSource.PLAYERS, 6, 1); }
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.MINIGUN_FAR.get(), SoundSource.PLAYERS, 16, 1);
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.MINIGUN_VERYFAR.get(), SoundSource.PLAYERS, 32, 1);
} }
this.entityData.set(GUN_ROTATE, entityData.get(GUN_ROTATE) + 0.5f); this.entityData.set(GUN_ROTATE, entityData.get(GUN_ROTATE) + 0.5f);
this.entityData.set(HEAT, this.entityData.get(HEAT) + 1);
// this.entityData.set(COOL_DOWN, 30); this.entityData.set(ANIM_TIME, 1);
// server.sendParticles(ParticleTypes.CAMPFIRE_COSY_SMOKE,
// this.getX() + 5 * this.getLookAngle().x,
// this.getY(),
// this.getZ() + 5 * this.getLookAngle().z,
// 100, 7, 0.02, 7, 0.005);
//
// double x = worldPosition.x + 9 * this.getLookAngle().x;
// double y = worldPosition.y + 9 * this.getLookAngle().y;
// double z = worldPosition.z + 9 * this.getLookAngle().z;
//
// server.sendParticles(ParticleTypes.CAMPFIRE_COSY_SMOKE, x, y, z, 10, 0.4, 0.4, 0.4, 0.0075);
// server.sendParticles(ParticleTypes.CLOUD, x, y, z, 10, 0.4, 0.4, 0.4, 0.0075);
//
// int count = 6;
//
// for (float i = 9.5f; i < 16; i += .5f) {
// server.sendParticles(ParticleTypes.CAMPFIRE_COSY_SMOKE,
// this.getX() + i * this.getLookAngle().x,
// this.getEyeY() + i * this.getLookAngle().y,
// this.getZ() + i * this.getLookAngle().z,
// Mth.clamp(count--, 1, 5), 0.15, 0.15, 0.15, 0.0025);
// }
}
} }
public Matrix4f getBarrelTransform(float ticks) {
Matrix4f transformV = getVehicleFlatTransform(ticks);
Matrix4f transform = new Matrix4f();
Vector4f worldPosition = transformPosition(transform, 0, 1.375f, 0.25f);
transformV.translate(worldPosition.x, worldPosition.y, worldPosition.z);
transformV.rotate(Axis.XP.rotationDegrees(Mth.lerp(ticks, xRotO, getXRot())));
return transformV;
}
@Override @Override
public void travel() { public void travel() {
@ -322,7 +301,6 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
@Override @Override
public void registerControllers(AnimatableManager.ControllerRegistrar data) { public void registerControllers(AnimatableManager.ControllerRegistrar data) {
// data.add(new AnimationController<>(this, "movement", 0, this::movementPredicate));
} }
@Override @Override
@ -332,17 +310,18 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
@Override @Override
public float getMaxHealth() { public float getMaxHealth() {
return VehicleConfig.MK42_HP.get(); return VehicleConfig.HPJ11_HP.get();
} }
@Override @Override
public int mainGunRpm(Player player) { public int mainGunRpm(Player player) {
return 1200; return 2400;
} }
@Override @Override
public boolean canShoot(Player player) { public boolean canShoot(Player player) {
return true; var ammo = ModItems.SMALL_SHELL.get();
return (InventoryTool.countItem(player.getInventory().items, ammo) > 0 || InventoryTool.hasCreativeAmmoBox(player)) && !cannotFire;
} }
@Override @Override
@ -371,6 +350,6 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit
@Override @Override
public ResourceLocation getVehicleIcon() { public ResourceLocation getVehicleIcon() {
return Mod.loc("textures/vehicle_icon/sherman_icon.png"); return Mod.loc("textures/vehicle_icon/hpj_11.png");
} }
} }

View file

@ -57,7 +57,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
public static final EntityDataAccessor<Float> YAW = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.FLOAT); public static final EntityDataAccessor<Float> YAW = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.FLOAT);
public static final EntityDataAccessor<Integer> FIRE_ANIM = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT); public static final EntityDataAccessor<Integer> FIRE_ANIM = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT);
public static final EntityDataAccessor<Integer> HEAT = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT);
public static final EntityDataAccessor<Integer> COAX_HEAT = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT); public static final EntityDataAccessor<Integer> COAX_HEAT = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT);
public static final EntityDataAccessor<Integer> AMMO = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT); public static final EntityDataAccessor<Integer> AMMO = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT);
@ -98,7 +97,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
public double recoilShake; public double recoilShake;
public double recoilShakeO; public double recoilShakeO;
public boolean cannotFire;
public boolean cannotFireCoax; public boolean cannotFireCoax;
public int reloadCoolDown; public int reloadCoolDown;
@ -184,10 +182,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
turretYRotO = deltaT + getTurretYRot(); turretYRotO = deltaT + getTurretYRot();
} }
if (this.entityData.get(HEAT) > 0) {
this.entityData.set(HEAT, this.entityData.get(HEAT) - 1);
}
if (this.entityData.get(COAX_HEAT) > 0) { if (this.entityData.get(COAX_HEAT) > 0) {
this.entityData.set(COAX_HEAT, this.entityData.get(COAX_HEAT) - 1); this.entityData.set(COAX_HEAT, this.entityData.get(COAX_HEAT) - 1);
} }
@ -196,10 +190,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
this.entityData.set(FIRE_ANIM, this.entityData.get(FIRE_ANIM) - 1); this.entityData.set(FIRE_ANIM, this.entityData.get(FIRE_ANIM) - 1);
} }
if (this.entityData.get(HEAT) < 40) {
cannotFire = false;
}
if (this.entityData.get(COAX_HEAT) < 40) { if (this.entityData.get(COAX_HEAT) < 40) {
cannotFireCoax = false; cannotFireCoax = false;
} }
@ -208,10 +198,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
decoyReloadCoolDown--; decoyReloadCoolDown--;
} }
if (this.entityData.get(HEAT) > 100 && !cannotFire) {
cannotFire = true;
this.level().playSound(null, this.getOnPos(), ModSounds.MINIGUN_OVERHEAT.get(), SoundSource.PLAYERS, 1, 1);
}
if (this.entityData.get(COAX_HEAT) > 100) { if (this.entityData.get(COAX_HEAT) > 100) {
cannotFireCoax = true; cannotFireCoax = true;
this.level().playSound(null, this.getOnPos(), ModSounds.MINIGUN_OVERHEAT.get(), SoundSource.PLAYERS, 1, 1); this.level().playSound(null, this.getOnPos(), ModSounds.MINIGUN_OVERHEAT.get(), SoundSource.PLAYERS, 1, 1);
@ -767,7 +753,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
.define(YAW, 0f) .define(YAW, 0f)
.define(AMMO, 0) .define(AMMO, 0)
.define(FIRE_ANIM, 0) .define(FIRE_ANIM, 0)
.define(HEAT, 0)
.define(COAX_HEAT, 0) .define(COAX_HEAT, 0)
.define(DECOY_COUNT, 0); .define(DECOY_COUNT, 0);
} }

View file

@ -71,12 +71,12 @@ import static com.atsuishio.superbwarfare.client.RenderHelper.preciseBlit;
import static com.atsuishio.superbwarfare.tools.ParticleTool.sendParticle; import static com.atsuishio.superbwarfare.tools.ParticleTool.sendParticle;
public abstract class VehicleEntity extends Entity { public abstract class VehicleEntity extends Entity {
public static final EntityDataAccessor<Float> HEALTH = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.FLOAT); public static final EntityDataAccessor<Float> HEALTH = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.FLOAT);
public static final EntityDataAccessor<String> LAST_ATTACKER_UUID = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.STRING); public static final EntityDataAccessor<String> LAST_ATTACKER_UUID = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.STRING);
public static final EntityDataAccessor<String> LAST_DRIVER_UUID = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.STRING); public static final EntityDataAccessor<String> LAST_DRIVER_UUID = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.STRING);
public static final EntityDataAccessor<Float> DELTA_ROT = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.FLOAT); public static final EntityDataAccessor<Float> DELTA_ROT = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.FLOAT);
public static final EntityDataAccessor<List<Integer>> SELECTED_WEAPON = SynchedEntityData.defineId(VehicleEntity.class, ModSerializers.INT_LIST_SERIALIZER.get()); public static final EntityDataAccessor<List<Integer>> SELECTED_WEAPON = SynchedEntityData.defineId(VehicleEntity.class, ModSerializers.INT_LIST_SERIALIZER.get());
public static final EntityDataAccessor<Integer> HEAT = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.INT);
public VehicleWeapon[][] availableWeapons; public VehicleWeapon[][] availableWeapons;
@ -103,6 +103,8 @@ public abstract class VehicleEntity extends Entity {
public float gunYRotO; public float gunYRotO;
public float gunXRotO; public float gunXRotO;
public boolean cannotFire;
// 自定义骑乘 // 自定义骑乘
private final List<Entity> orderedPassengers = generatePassengersList(); private final List<Entity> orderedPassengers = generatePassengersList();
@ -268,6 +270,7 @@ public abstract class VehicleEntity extends Entity {
.define(LAST_ATTACKER_UUID, "undefined") .define(LAST_ATTACKER_UUID, "undefined")
.define(LAST_DRIVER_UUID, "undefined") .define(LAST_DRIVER_UUID, "undefined")
.define(DELTA_ROT, 0f) .define(DELTA_ROT, 0f)
.define(HEAT, 0)
.define(SELECTED_WEAPON, IntList.of(new int[this.getMaxPassengers()])); .define(SELECTED_WEAPON, IntList.of(new int[this.getMaxPassengers()]));
// 怎么还不给玩动态注册了 // 怎么还不给玩动态注册了
} }
@ -559,6 +562,19 @@ public abstract class VehicleEntity extends Entity {
repairCoolDown--; repairCoolDown--;
} }
if (this.entityData.get(HEAT) > 0) {
this.entityData.set(HEAT, this.entityData.get(HEAT) - 1);
}
if (this.entityData.get(HEAT) < 40) {
cannotFire = false;
}
if (this.entityData.get(HEAT) > 100 && !cannotFire) {
cannotFire = true;
this.level().playSound(null, this.getOnPos(), ModSounds.MINIGUN_OVERHEAT.get(), SoundSource.PLAYERS, 1, 1);
}
this.prevRoll = this.getRoll(); this.prevRoll = this.getRoll();
float delta = Math.abs(getYRot() - yRotO); float delta = Math.abs(getYRot() - yRotO);

View file

@ -917,6 +917,11 @@ public class ClientEventHandler {
player.playSound(ModSounds.PRISM_FIRE_1P_2.get(), 1f, pitch); player.playSound(ModSounds.PRISM_FIRE_1P_2.get(), 1f, pitch);
} }
} }
if (iVehicle instanceof Hpj11Entity hpj11Entity) {
float pitch = hpj11Entity.getEntityData().get(HEAT) <= 60 ? 1 : (float) (1 - 0.011 * Math.abs(60 - hpj11Entity.getEntityData().get(HEAT)));
player.playSound(ModSounds.HPJ_11_FIRE_1P.get(), 1f, (float) ((2 * org.joml.Math.random() - 1) * 0.05f + pitch));
}
} }
@SubscribeEvent @SubscribeEvent

View file

@ -48,36 +48,36 @@ public class ModEntities {
// Projectiles // Projectiles
public static final DeferredHolder<EntityType<?>, EntityType<TaserBulletEntity>> TASER_BULLET = register("taser_bullet", public static final DeferredHolder<EntityType<?>, EntityType<TaserBulletEntity>> TASER_BULLET = register("taser_bullet",
EntityType.Builder.<TaserBulletEntity>of(TaserBulletEntity::new, MobCategory.MISC).setTrackingRange(64) EntityType.Builder.<TaserBulletEntity>of(TaserBulletEntity::new, MobCategory.MISC).noSave().setTrackingRange(64)
.setUpdateInterval(1).sized(0.5f, 0.5f)); .setUpdateInterval(1).sized(0.5f, 0.5f));
// Fast Projectiles // Fast Projectiles
public static final DeferredHolder<EntityType<?>, EntityType<SmallCannonShellEntity>> SMALL_CANNON_SHELL = register("small_cannon_shell", public static final DeferredHolder<EntityType<?>, EntityType<SmallCannonShellEntity>> SMALL_CANNON_SHELL = register("small_cannon_shell",
EntityType.Builder.<SmallCannonShellEntity>of(SmallCannonShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); EntityType.Builder.<SmallCannonShellEntity>of(SmallCannonShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f));
public static final DeferredHolder<EntityType<?>, EntityType<RpgRocketEntity>> RPG_ROCKET = register("rpg_rocket", public static final DeferredHolder<EntityType<?>, EntityType<RpgRocketEntity>> RPG_ROCKET = register("rpg_rocket",
EntityType.Builder.<RpgRocketEntity>of(RpgRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); EntityType.Builder.<RpgRocketEntity>of(RpgRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f));
public static final DeferredHolder<EntityType<?>, EntityType<MortarShellEntity>> MORTAR_SHELL = register("mortar_shell", public static final DeferredHolder<EntityType<?>, EntityType<MortarShellEntity>> MORTAR_SHELL = register("mortar_shell",
EntityType.Builder.<MortarShellEntity>of(MortarShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); EntityType.Builder.<MortarShellEntity>of(MortarShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f));
public static final DeferredHolder<EntityType<?>, EntityType<ProjectileEntity>> PROJECTILE = register("projectile", public static final DeferredHolder<EntityType<?>, EntityType<ProjectileEntity>> PROJECTILE = register("projectile",
EntityType.Builder.<ProjectileEntity>of(ProjectileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).noSave().noSummon().sized(0.25f, 0.25f)); EntityType.Builder.<ProjectileEntity>of(ProjectileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).noSave().noSummon().sized(0.25f, 0.25f));
public static final DeferredHolder<EntityType<?>, EntityType<CannonShellEntity>> CANNON_SHELL = register("cannon_shell", public static final DeferredHolder<EntityType<?>, EntityType<CannonShellEntity>> CANNON_SHELL = register("cannon_shell",
EntityType.Builder.<CannonShellEntity>of(CannonShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); EntityType.Builder.<CannonShellEntity>of(CannonShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f));
public static final DeferredHolder<EntityType<?>, EntityType<GunGrenadeEntity>> GUN_GRENADE = register("gun_grenade", public static final DeferredHolder<EntityType<?>, EntityType<GunGrenadeEntity>> GUN_GRENADE = register("gun_grenade",
EntityType.Builder.<GunGrenadeEntity>of(GunGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); EntityType.Builder.<GunGrenadeEntity>of(GunGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f));
public static final DeferredHolder<EntityType<?>, EntityType<MelonBombEntity>> MELON_BOMB = register("melon_bomb", public static final DeferredHolder<EntityType<?>, EntityType<MelonBombEntity>> MELON_BOMB = register("melon_bomb",
EntityType.Builder.<MelonBombEntity>of(MelonBombEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(1f, 1f)); EntityType.Builder.<MelonBombEntity>of(MelonBombEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(1f, 1f));
public static final DeferredHolder<EntityType<?>, EntityType<HandGrenadeEntity>> HAND_GRENADE = register("hand_grenade", public static final DeferredHolder<EntityType<?>, EntityType<HandGrenadeEntity>> HAND_GRENADE = register("hand_grenade",
EntityType.Builder.<HandGrenadeEntity>of(HandGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.3f, 0.3f)); EntityType.Builder.<HandGrenadeEntity>of(HandGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.3f, 0.3f));
public static final DeferredHolder<EntityType<?>, EntityType<RgoGrenadeEntity>> RGO_GRENADE = register("rgo_grenade", public static final DeferredHolder<EntityType<?>, EntityType<RgoGrenadeEntity>> RGO_GRENADE = register("rgo_grenade",
EntityType.Builder.<RgoGrenadeEntity>of(RgoGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.3f, 0.3f)); EntityType.Builder.<RgoGrenadeEntity>of(RgoGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.3f, 0.3f));
public static final DeferredHolder<EntityType<?>, EntityType<JavelinMissileEntity>> JAVELIN_MISSILE = register("javelin_missile", public static final DeferredHolder<EntityType<?>, EntityType<JavelinMissileEntity>> JAVELIN_MISSILE = register("javelin_missile",
EntityType.Builder.<JavelinMissileEntity>of(JavelinMissileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); EntityType.Builder.<JavelinMissileEntity>of(JavelinMissileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f));
public static final DeferredHolder<EntityType<?>, EntityType<HeliRocketEntity>> HELI_ROCKET = register("heli_rocket", public static final DeferredHolder<EntityType<?>, EntityType<HeliRocketEntity>> HELI_ROCKET = register("heli_rocket",
EntityType.Builder.<HeliRocketEntity>of(HeliRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); EntityType.Builder.<HeliRocketEntity>of(HeliRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f));
public static final DeferredHolder<EntityType<?>, EntityType<WgMissileEntity>> WG_MISSILE = register("wg_missile", public static final DeferredHolder<EntityType<?>, EntityType<WgMissileEntity>> WG_MISSILE = register("wg_missile",
EntityType.Builder.<WgMissileEntity>of(WgMissileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(3).fireImmune().sized(0.5f, 0.5f)); EntityType.Builder.<WgMissileEntity>of(WgMissileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(3).fireImmune().sized(0.5f, 0.5f));
public static final DeferredHolder<EntityType<?>, EntityType<SwarmDroneEntity>> SWARM_DRONE = register("swarm_drone", public static final DeferredHolder<EntityType<?>, EntityType<SwarmDroneEntity>> SWARM_DRONE = register("swarm_drone",
EntityType.Builder.<SwarmDroneEntity>of(SwarmDroneEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).fireImmune().sized(0.5f, 0.5f)); EntityType.Builder.<SwarmDroneEntity>of(SwarmDroneEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).fireImmune().sized(0.5f, 0.5f));
// Vehicles // Vehicles
public static final DeferredHolder<EntityType<?>, EntityType<Mk42Entity>> MK_42 = register("mk_42", public static final DeferredHolder<EntityType<?>, EntityType<Mk42Entity>> MK_42 = register("mk_42",

View file

@ -247,6 +247,7 @@ public class ModItems {
public static final DeferredHolder<Item, BlueprintItem> INSIDIOUS_BLUEPRINT = ITEMS.register("insidious_blueprint", () -> new BlueprintItem(Rarity.EPIC)); public static final DeferredHolder<Item, BlueprintItem> INSIDIOUS_BLUEPRINT = ITEMS.register("insidious_blueprint", () -> new BlueprintItem(Rarity.EPIC));
public static final DeferredHolder<Item, BlueprintItem> MK_42_BLUEPRINT = ITEMS.register("mk_42_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary())); public static final DeferredHolder<Item, BlueprintItem> MK_42_BLUEPRINT = ITEMS.register("mk_42_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary()));
public static final DeferredHolder<Item, BlueprintItem> MLE_1934_BLUEPRINT = ITEMS.register("mle_1934_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary())); public static final DeferredHolder<Item, BlueprintItem> MLE_1934_BLUEPRINT = ITEMS.register("mle_1934_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary()));
public static final DeferredHolder<Item, BlueprintItem> HPJ_11_BLUEPRINT = ITEMS.register("hpj_11_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary()));
public static final DeferredHolder<Item, BlueprintItem> ANNIHILATOR_BLUEPRINT = ITEMS.register("annihilator_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary())); public static final DeferredHolder<Item, BlueprintItem> ANNIHILATOR_BLUEPRINT = ITEMS.register("annihilator_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary()));
public static final DeferredHolder<Item, Item> LIGHT_ARMAMENT_MODULE = ITEMS.register("light_armament_module", () -> new Item(new Item.Properties().rarity(Rarity.RARE))); public static final DeferredHolder<Item, Item> LIGHT_ARMAMENT_MODULE = ITEMS.register("light_armament_module", () -> new Item(new Item.Properties().rarity(Rarity.RARE)));

View file

@ -439,6 +439,7 @@ public class ModSounds {
public static final DeferredHolder<SoundEvent, SoundEvent> INSIDIOUS_VERYFAR = REGISTRY.register("insidious_veryfar", () -> SoundEvent.createVariableRangeEvent(Mod.loc("insidious_veryfar"))); public static final DeferredHolder<SoundEvent, SoundEvent> INSIDIOUS_VERYFAR = REGISTRY.register("insidious_veryfar", () -> SoundEvent.createVariableRangeEvent(Mod.loc("insidious_veryfar")));
public static final DeferredHolder<SoundEvent, SoundEvent> INSIDIOUS_RELOAD_EMPTY = REGISTRY.register("insidious_reload_empty", () -> SoundEvent.createVariableRangeEvent(Mod.loc("insidious_reload_empty"))); public static final DeferredHolder<SoundEvent, SoundEvent> INSIDIOUS_RELOAD_EMPTY = REGISTRY.register("insidious_reload_empty", () -> SoundEvent.createVariableRangeEvent(Mod.loc("insidious_reload_empty")));
public static final DeferredHolder<SoundEvent, SoundEvent> SMOKE_FIRE = REGISTRY.register("smoke_fire", () -> SoundEvent.createVariableRangeEvent(Mod.loc("smoke_fire"))); public static final DeferredHolder<SoundEvent, SoundEvent> SMOKE_FIRE = REGISTRY.register("smoke_fire", () -> SoundEvent.createVariableRangeEvent(Mod.loc("smoke_fire")));
public static final DeferredHolder<SoundEvent, SoundEvent> HPJ_11_FIRE_1P = REGISTRY.register("hpj_11_fire_1p", () -> SoundEvent.createVariableRangeEvent(Mod.loc("hpj_11_fire_1p")));
public static final DeferredHolder<SoundEvent, SoundEvent> HPJ_11_FIRE_3P = REGISTRY.register("hpj_11_fire_3p", () -> SoundEvent.createVariableRangeEvent(Mod.loc("hpj_11_fire_3p")));
} }

View file

@ -6,7 +6,7 @@
"identifier": "geometry.unknown", "identifier": "geometry.unknown",
"texture_width": 128, "texture_width": 128,
"texture_height": 128, "texture_height": 128,
"visible_bounds_width": 5, "visible_bounds_width": 13,
"visible_bounds_height": 5.5, "visible_bounds_height": 5.5,
"visible_bounds_offset": [0, 2.25, 0] "visible_bounds_offset": [0, 2.25, 0]
}, },
@ -132,12 +132,12 @@
"origin": [-24, 4, -20], "origin": [-24, 4, -20],
"size": [48, 1.6, 40], "size": [48, 1.6, 40],
"uv": { "uv": {
"north": {"uv": [65, 41], "uv_size": [24, 1]}, "north": {"uv": [55, 41], "uv_size": [34, 1]},
"east": {"uv": [69, 3], "uv_size": [20, 1]}, "east": {"uv": [59, 3], "uv_size": [30, 1]},
"south": {"uv": [67, 8], "uv_size": [24, 1]}, "south": {"uv": [57, 8], "uv_size": [34, 1]},
"west": {"uv": [69, 4], "uv_size": [20, 1]}, "west": {"uv": [59, 4], "uv_size": [30, 1]},
"up": {"uv": [0, 0], "uv_size": [24, 20]}, "up": {"uv": [3, 0], "uv_size": [21, 20]},
"down": {"uv": [0, 40], "uv_size": [24, -20]} "down": {"uv": [3, 40], "uv_size": [21, -20]}
} }
}, },
{ {
@ -1606,6 +1606,75 @@
"parent": "paotiroll", "parent": "paotiroll",
"pivot": [0, 22, -4] "pivot": [0, 22, -4]
}, },
{
"name": "flare",
"parent": "roll",
"pivot": [0, 26.35, -45.24844]
},
{
"name": "bone",
"parent": "flare",
"pivot": [0, 26.35, -45.24844],
"rotation": [90, 0, 0],
"cubes": [
{
"origin": [-56.4, 22.75, -45.24844],
"size": [61.44, 12.96, 0],
"pivot": [0, 29.23, -45.24844],
"rotation": [-60, 0, 90],
"uv": {
"north": {"uv": [128, 100], "uv_size": [-12.5, 28]},
"east": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"south": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"west": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"up": {"uv": [128, 128], "uv_size": [-12.5, -28]},
"down": {"uv": [128, 128], "uv_size": [-12.5, -28]}
}
},
{
"origin": [-56.4, 22.75, -45.24844],
"size": [61.44, 12.96, 0],
"pivot": [0, 29.23, -45.24844],
"rotation": [-121, 0, 90],
"uv": {
"north": {"uv": [128, 100], "uv_size": [-12.5, 28]},
"east": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"south": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"west": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"up": {"uv": [128, 128], "uv_size": [-12.5, -28]},
"down": {"uv": [128, 128], "uv_size": [-12.5, -28]}
}
},
{
"origin": [-56.4, 22.75, -45.24844],
"size": [61.44, 12.96, 0],
"pivot": [0, 29.23, -45.24844],
"rotation": [179, 0, 90],
"uv": {
"north": {"uv": [128, 100], "uv_size": [-12.5, 28]},
"east": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"south": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"west": {"uv": [115.5, 100], "uv_size": [12.5, 28]},
"up": {"uv": [128, 128], "uv_size": [-12.5, -28]},
"down": {"uv": [128, 128], "uv_size": [-12.5, -28]}
}
},
{
"origin": [-6.48, 19.87, -45.24844],
"size": [12.96, 12.96, 0],
"pivot": [0, 26.35, -45.24844],
"rotation": [-90, 0, 0],
"uv": {
"north": {"uv": [128, 100], "uv_size": [-28, 28]},
"east": {"uv": [100, 100], "uv_size": [28, 28]},
"south": {"uv": [100, 100], "uv_size": [28, 28]},
"west": {"uv": [100, 100], "uv_size": [28, 28]},
"up": {"uv": [128, 128], "uv_size": [-28, -28]},
"down": {"uv": [128, 128], "uv_size": [-28, -28]}
}
}
]
},
{ {
"name": "paoguanwaike", "name": "paoguanwaike",
"parent": "roll", "parent": "roll",

View file

@ -0,0 +1,37 @@
{
"format_version": "1.12.0",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.unknown",
"texture_width": 16,
"texture_height": 16,
"visible_bounds_width": 2,
"visible_bounds_height": 2.5,
"visible_bounds_offset": [0, 0.75, 0]
},
"bones": [
{
"name": "bone",
"pivot": [0, 0, 0],
"cubes": [
{
"origin": [-1, -2, -1],
"size": [2, 2, 2],
"pivot": [0, 0, 0],
"rotation": [0, -45, 0],
"uv": {
"north": {"uv": [0, 0], "uv_size": [1, 1]},
"east": {"uv": [0, 1], "uv_size": [1, 1]},
"south": {"uv": [1, 0], "uv_size": [1, 1]},
"west": {"uv": [1, 1], "uv_size": [1, 1]},
"up": {"uv": [0, 2], "uv_size": [1, 1]},
"down": {"uv": [2, 1], "uv_size": [1, -1]}
}
}
]
}
]
}
]
}

View file

@ -109,6 +109,7 @@
"item.superbwarfare.m2hb_blueprint": "M2HB Blueprint", "item.superbwarfare.m2hb_blueprint": "M2HB Blueprint",
"item.superbwarfare.secondary_cataclysm_blueprint": "Secondary Cataclysm Blueprint", "item.superbwarfare.secondary_cataclysm_blueprint": "Secondary Cataclysm Blueprint",
"item.superbwarfare.insidious_blueprint": "Insidious Blueprint", "item.superbwarfare.insidious_blueprint": "Insidious Blueprint",
"item.superbwarfare.hpj_11_blueprint": "H/PJ-11 CIWS Blueprint",
"item.superbwarfare.common_material_pack": "Common Material Pack", "item.superbwarfare.common_material_pack": "Common Material Pack",
"item.superbwarfare.rare_material_pack": "Rare Material Pack", "item.superbwarfare.rare_material_pack": "Rare Material Pack",

View file

@ -110,6 +110,7 @@
"item.superbwarfare.m2hb_blueprint": "M2HB重机枪蓝图", "item.superbwarfare.m2hb_blueprint": "M2HB重机枪蓝图",
"item.superbwarfare.secondary_cataclysm_blueprint": "二次灾变蓝图", "item.superbwarfare.secondary_cataclysm_blueprint": "二次灾变蓝图",
"item.superbwarfare.insidious_blueprint": "阴险蓝图", "item.superbwarfare.insidious_blueprint": "阴险蓝图",
"item.superbwarfare.hpj_11_blueprint": "H/PJ-11近防炮蓝图",
"item.superbwarfare.common_material_pack": "普通材料包", "item.superbwarfare.common_material_pack": "普通材料包",
"item.superbwarfare.rare_material_pack": "稀有材料包", "item.superbwarfare.rare_material_pack": "稀有材料包",

View file

@ -3043,5 +3043,21 @@
"stream": false "stream": false
} }
] ]
},
"hpj_11_fire_1p": {
"sounds": [
{
"name": "superbwarfare:hpj11/hpj_11_fire_1p",
"stream": false
}
]
},
"hpj_11_fire_3p": {
"sounds": [
{
"name": "superbwarfare:hpj11/hpj_11_fire_3p",
"stream": false
}
]
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

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

View file

@ -0,0 +1,21 @@
{
"type": "minecraft:smithing_transform",
"template": {
"item": "superbwarfare:hpj_11_blueprint"
},
"base": {
"item": "superbwarfare:cannon_core"
},
"addition": {
"tag": "superbwarfare:storage_blocks/steel"
},
"result": {
"id": "superbwarfare:container",
"components": {
"minecraft:block_entity_data": {
"id": "superbwarfare:container",
"EntityType": "superbwarfare:hpj_11"
}
}
}
}