diff --git a/src/generated/resources/.cache/2e07f3c482445536d45c00e6abf223465c01c841 b/src/generated/resources/.cache/2e07f3c482445536d45c00e6abf223465c01c841 index 64e990be4..95d737710 100644 --- a/src/generated/resources/.cache/2e07f3c482445536d45c00e6abf223465c01c841 +++ b/src/generated/resources/.cache/2e07f3c482445536d45c00e6abf223465c01c841 @@ -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 0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/c/tags/item/dusts/coal_coke.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 a53020091752016da6602ee1b8b7e08823614344 data/superbwarfare/tags/item/military_armor.json 8ea4fb7d3981141a953bd5510e8c76fb790307aa data/superbwarfare/tags/item/normal_gun.json -15328cd564c931cc0a4fc000596240f93a7b29a1 data/superbwarfare/tags/item/revolver.json aaa533157491a82b8e23b2914deef67c4078cbed data/superbwarfare/tags/item/rifle.json a249d9d052cdc24b34e0e51ab991329f6c76e8ab data/superbwarfare/tags/item/shotgun.json 4aca0fa3f8b9f2a4920041e35e46dae7e93d5482 data/superbwarfare/tags/item/smg.json diff --git a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d index b55798a76..9fddc5eeb 100644 --- a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d +++ b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d @@ -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 811e69929a14e6736015849c220100bb58d914c9 data/superbwarfare/loot_table/blocks/cemented_carbide_block.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 6e2346c664cd643bff31c0a26e463c6c8dd46e37 data/superbwarfare/loot_table/chests/ancient_cpu.json 031ebfa016c816ebbd03dcf03f169599eed3e9d4 data/superbwarfare/loot_table/chests/blue_print_common.json -eef164cceb825ad572fc9d2eaef4631f9ec13c7f data/superbwarfare/loot_table/chests/blue_print_epic.json -f28f40e6bca3090625550f4c62d5f2a1384fe3ba data/superbwarfare/loot_table/chests/blue_print_rare.json +60f0cf8c558f09fd878a68e0c3a876c9484f83ac data/superbwarfare/loot_table/chests/blue_print_epic.json +dd6ba01de4126332ac0dda484ab4176c03fdad06 data/superbwarfare/loot_table/chests/blue_print_rare.json 7e75ff103ccdbcf6be6f61413a4173115195f0a9 data/superbwarfare/loot_table/containers/blueprints.json be87d07ea13253e7a2237f048acc655e16e8317c data/superbwarfare/loot_table/containers/common.json 151368546abc7b65138a0a822dd53b48999d86be data/superbwarfare/loot_table/special/common/blueprints.json diff --git a/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 b/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 index f1d1cdcc2..b56d0196e 100644 --- a/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 +++ b/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 @@ -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/ak_12_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 d23520b099cb796401635fe75b5b852fc957d4ea assets/superbwarfare/models/item/high_energy_explosives.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/insidious_blueprint.json 3c9dcc3393e16ca354b01162316f1ddae92338ec assets/superbwarfare/models/item/iron_action.json diff --git a/src/generated/resources/assets/superbwarfare/models/item/hpj_11_blueprint.json b/src/generated/resources/assets/superbwarfare/models/item/hpj_11_blueprint.json new file mode 100644 index 000000000..c698e5dfc --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/hpj_11_blueprint.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/cannon_blueprint" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json index 0b9db152a..fdad040ec 100644 --- a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json +++ b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json @@ -99,6 +99,11 @@ "name": "superbwarfare:mle_1934_blueprint", "weight": 10 }, + { + "type": "minecraft:item", + "name": "superbwarfare:hpj_11_blueprint", + "weight": 10 + }, { "type": "minecraft:item", "name": "superbwarfare:annihilator_blueprint", diff --git a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json index a2a4f043a..33730a630 100644 --- a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json +++ b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json @@ -189,6 +189,11 @@ "name": "superbwarfare:mle_1934_blueprint", "weight": 3 }, + { + "type": "minecraft:item", + "name": "superbwarfare:hpj_11_blueprint", + "weight": 3 + }, { "type": "minecraft:item", "name": "superbwarfare:annihilator_blueprint" diff --git a/src/generated/resources/data/superbwarfare/tags/item/revolver.json b/src/generated/resources/data/superbwarfare/tags/item/revolver.json deleted file mode 100644 index 42c48202c..000000000 --- a/src/generated/resources/data/superbwarfare/tags/item/revolver.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "superbwarfare:trachelium" - ] -} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/client/layer/projectile/SmallCannonShellLayer.java b/src/main/java/com/atsuishio/superbwarfare/client/layer/projectile/SmallCannonShellLayer.java index a6e74988f..d416d7e5a 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/layer/projectile/SmallCannonShellLayer.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/layer/projectile/SmallCannonShellLayer.java @@ -13,7 +13,7 @@ import software.bernie.geckolib.renderer.GeoRenderer; import software.bernie.geckolib.renderer.layer.GeoRenderLayer; public class SmallCannonShellLayer extends GeoRenderLayer { - 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 entityRenderer) { super(entityRenderer); diff --git a/src/main/java/com/atsuishio/superbwarfare/client/layer/vehicle/Hpj11HeatLayer.java b/src/main/java/com/atsuishio/superbwarfare/client/layer/vehicle/Hpj11HeatLayer.java new file mode 100644 index 000000000..10b4007ac --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/client/layer/vehicle/Hpj11HeatLayer.java @@ -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 { + private static final ResourceLocation LAYER = Mod.loc("textures/entity/1130_heat.png"); + + public Hpj11HeatLayer(GeoRenderer 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); + } +} + diff --git a/src/main/java/com/atsuishio/superbwarfare/client/layer/vehicle/Hpj11Layer.java b/src/main/java/com/atsuishio/superbwarfare/client/layer/vehicle/Hpj11Layer.java new file mode 100644 index 000000000..312a0de0a --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/client/layer/vehicle/Hpj11Layer.java @@ -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 { + + private static final ResourceLocation LAYER = Mod.loc("textures/entity/1130_e.png"); + + public Hpj11Layer(GeoRenderer 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); + } +} diff --git a/src/main/java/com/atsuishio/superbwarfare/client/model/entity/SmallCannonShellModel.java b/src/main/java/com/atsuishio/superbwarfare/client/model/entity/SmallCannonShellModel.java index f045676b5..73e6418a6 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/model/entity/SmallCannonShellModel.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/model/entity/SmallCannonShellModel.java @@ -11,24 +11,22 @@ public class SmallCannonShellModel extends GeoModel { @Override public ResourceLocation getAnimationResource(SmallCannonShellEntity entity) { - return Mod.loc("animations/cannon_shell.animation.json"); + return null; } @Override public ResourceLocation getModelResource(SmallCannonShellEntity entity) { - return Mod.loc("geo/cannon_shell.geo.json"); + return Mod.loc("geo/small_cannon_shell.geo.json"); } @Override public ResourceLocation getTextureResource(SmallCannonShellEntity entity) { - return Mod.loc("textures/entity/cannon_shell.png"); + return Mod.loc("textures/entity/small_cannon_shell.png"); } @Override public void setCustomAnimations(SmallCannonShellEntity animatable, long instanceId, AnimationState animationState) { GeoBone bone = getAnimationProcessor().getBone("bone"); - bone.setScaleX(0.17f); - bone.setScaleY(0.17f); - bone.setScaleZ(0.17f); + bone.setScaleY((float) (1 + animatable.getDeltaMovement().length())); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/client/overlay/CannonHudOverlay.java b/src/main/java/com/atsuishio/superbwarfare/client/overlay/CannonHudOverlay.java index 1aacc6a4d..33293b42f 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/overlay/CannonHudOverlay.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/overlay/CannonHudOverlay.java @@ -3,6 +3,7 @@ package com.atsuishio.superbwarfare.client.overlay; import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.client.RenderHelper; 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.Mle1934Entity; import com.atsuishio.superbwarfare.entity.vehicle.base.CannonEntity; @@ -134,17 +135,37 @@ public class CannonHudOverlay implements LayeredDraw.Layer { w / 2 + 14, h / 2 - 20, -1, false); } } - if (cannon instanceof AnnihilatorEntity) { - preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/laser_cannon_crosshair.png"), k, l, 0, 0.0F, i, j, i, j); - } else { - preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/cannon_crosshair.png"), k, l, 0, 0.0F, i, j, i, j); - } - float diffY = -Mth.wrapDegrees(Mth.lerp(deltaTracker.getGameTimeDeltaPartialTick(true), player.yHeadRotO, player.getYHeadRot()) - Mth.lerp(deltaTracker.getGameTimeDeltaPartialTick(true), cannon.yRotO, cannon.getYRot())); - 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); + if (!(cannon instanceof Hpj11Entity)) { + if (cannon instanceof AnnihilatorEntity) { + preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/laser_cannon_crosshair.png"), k, l, 0, 0.0F, i, j, i, j); + } else { + preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/cannon_crosshair.png"), k, l, 0, 0.0F, i, j, i, j); + } + float diffY = -Mth.wrapDegrees(Mth.lerp(deltaTracker.getGameTimeDeltaPartialTick(true), player.yHeadRotO, player.getYHeadRot()) - Mth.lerp(deltaTracker.getGameTimeDeltaPartialTick(true), cannon.yRotO, cannon.getYRot())); + + 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 { + preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/hpj_crosshair.png"), k, l, 0, 0.0F, i, j, i, j); + } + + } else { - preciseBlit(guiGraphics, Mod.loc("textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j); + 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); } 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()), diff --git a/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/Hpj11Renderer.java b/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/Hpj11Renderer.java index 5dd6bd5a3..368aa14de 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/Hpj11Renderer.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/Hpj11Renderer.java @@ -1,5 +1,7 @@ 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.entity.vehicle.Hpj11Entity; 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.renderer.GeoEntityRenderer; +import static com.atsuishio.superbwarfare.entity.vehicle.Hpj11Entity.ANIM_TIME; + public class Hpj11Renderer extends GeoEntityRenderer { public Hpj11Renderer(EntityRendererProvider.Context renderManager) { super(renderManager, new Hpj11Model()); this.shadowRadius = 1.5f; -// this.addRenderLayer(new Mk42Layer(this)); + this.addRenderLayer(new Hpj11Layer(this)); + this.addRenderLayer(new Hpj11HeatLayer(this)); } @Override @@ -70,6 +75,13 @@ public class Hpj11Renderer extends GeoEntityRenderer { 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); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/SmallCannonShellRenderer.java b/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/SmallCannonShellRenderer.java index 11a624b60..dbc4e4f4a 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/SmallCannonShellRenderer.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/SmallCannonShellRenderer.java @@ -11,6 +11,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; +import org.jetbrains.annotations.NotNull; import software.bernie.geckolib.cache.object.BakedGeoModel; import software.bernie.geckolib.renderer.GeoEntityRenderer; @@ -27,18 +28,22 @@ public class SmallCannonShellRenderer extends GeoEntityRenderer 0) { + float scale = 1f; + this.scaleHeight = scale; + this.scaleWidth = scale; + super.preRender(poseStack, entity, model, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, color); + } } @Override - public void render(SmallCannonShellEntity entityIn, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource bufferIn, int packedLightIn) { - poseStack.pushPose(); - 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()))); - super.render(entityIn, entityYaw, partialTicks, poseStack, bufferIn, packedLightIn); - poseStack.popPose(); + public void render(SmallCannonShellEntity entityIn, float entityYaw, float partialTicks, @NotNull PoseStack poseStack, @NotNull MultiBufferSource bufferIn, int packedLightIn) { + if (entityIn.tickCount > 0) { + poseStack.pushPose(); + 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()))); + super.render(entityIn, entityYaw, partialTicks, poseStack, bufferIn, packedLightIn); + poseStack.popPose(); + } } } diff --git a/src/main/java/com/atsuishio/superbwarfare/config/server/VehicleConfig.java b/src/main/java/com/atsuishio/superbwarfare/config/server/VehicleConfig.java index 6a76a4df6..608d229c9 100644 --- a/src/main/java/com/atsuishio/superbwarfare/config/server/VehicleConfig.java +++ b/src/main/java/com/atsuishio/superbwarfare/config/server/VehicleConfig.java @@ -107,6 +107,11 @@ public class VehicleConfig { public static ModConfigSpec.IntValue PRISM_TANK_DAMAGE_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) { builder.push("vehicle"); @@ -415,6 +420,21 @@ public class VehicleConfig { 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); + 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(); diff --git a/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java b/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java index 96a4b3ae3..0f15ba81e 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java @@ -142,6 +142,7 @@ public class ModCustomLootProvider implements LootTableSubProvider { new ItemEntry(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 3), new ItemEntry(ModItems.MK_42_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) )) .withPool(multiItems(2, 0, @@ -186,6 +187,7 @@ public class ModCustomLootProvider implements LootTableSubProvider { new ItemEntry(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 15), new ItemEntry(ModItems.MK_42_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) )) .withPool(multiItems(2, 0, diff --git a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java index 9072debbd..57ba5682a 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java @@ -152,6 +152,7 @@ public class ModItemModelProvider extends ItemModelProvider { cannonBlueprintItem(ModItems.MK_42_BLUEPRINT); cannonBlueprintItem(ModItems.MLE_1934_BLUEPRINT); cannonBlueprintItem(ModItems.ANNIHILATOR_BLUEPRINT); + cannonBlueprintItem(ModItems.HPJ_11_BLUEPRINT); gunBlueprintItem(ModItems.M_2_HB_BLUEPRINT); gunBlueprintItem(ModItems.SECONDARY_CATACLYSM_BLUEPRINT); gunBlueprintItem(ModItems.INSIDIOUS_BLUEPRINT); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Hpj11Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Hpj11Entity.java index c9662c9b6..366c3e53e 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Hpj11Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Hpj11Entity.java @@ -17,7 +17,7 @@ import com.atsuishio.superbwarfare.init.ModTags; import com.atsuishio.superbwarfare.tools.CustomExplosion; import com.atsuishio.superbwarfare.tools.InventoryTool; 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.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; @@ -46,7 +46,7 @@ import software.bernie.geckolib.animation.AnimatableManager; import software.bernie.geckolib.util.GeckoLibUtil; public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntity { - public static final EntityDataAccessor COOL_DOWN = SynchedEntityData.defineId(Hpj11Entity.class, EntityDataSerializers.INT); + public static final EntityDataAccessor ANIM_TIME = SynchedEntityData.defineId(Hpj11Entity.class, EntityDataSerializers.INT); public static final EntityDataAccessor GUN_ROTATE = SynchedEntityData.defineId(Hpj11Entity.class, EntityDataSerializers.FLOAT); private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); @@ -60,7 +60,7 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); - builder.define(COOL_DOWN, 0) + builder.define(ANIM_TIME, 0) .define(GUN_ROTATE, 0f); } @@ -69,9 +69,9 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit return new VehicleWeapon[][]{ new VehicleWeapon[]{ new SmallCannonShellWeapon() - .damage(40) - .explosionDamage(8) - .explosionRadius(4f) + .damage(VehicleConfig.HPJ11_DAMAGE.get().floatValue()) + .explosionDamage(VehicleConfig.HPJ11_EXPLOSION_DAMAGE.get().floatValue()) + .explosionRadius(VehicleConfig.HPJ11_EXPLOSION_RADIUS.get().floatValue()) .icon(Mod.loc("textures/screens/vehicle_weapon/cannon_30mm.png")) } }; @@ -79,19 +79,19 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit @Override public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) { - return new ThirdPersonCameraPosition(5, 0.25, 0); + return new ThirdPersonCameraPosition(2, 0.75, 0); } @Override public void addAdditionalSaveData(CompoundTag compound) { super.addAdditionalSaveData(compound); - compound.putInt("CoolDown", this.entityData.get(COOL_DOWN)); + compound.putInt("AnimTime", this.entityData.get(ANIM_TIME)); } @Override protected void readAdditionalSaveData(CompoundTag compound) { super.readAdditionalSaveData(compound); - this.entityData.set(COOL_DOWN, compound.getInt("CoolDown")); + this.entityData.set(ANIM_TIME, compound.getInt("AnimTime")); } @Override @@ -133,8 +133,8 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit gunRotO = this.getGunRot(); super.baseTick(); - if (this.entityData.get(COOL_DOWN) > 0) { - this.entityData.set(COOL_DOWN, this.entityData.get(COOL_DOWN) - 1); + if (this.entityData.get(ANIM_TIME) > 0) { + this.entityData.set(ANIM_TIME, this.entityData.get(ANIM_TIME) - 1); } 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); 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(); } @@ -229,70 +225,53 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit @Override public Vec3 driverZoomPos(float ticks) { - Matrix4f transform = getVehicleFlatTransform(ticks); - Vector4f worldPosition = transformPosition(transform, 0f, 1.5f, 0.25f); + Matrix4f transform = getBarrelTransform(ticks); + Vector4f worldPosition = transformPosition(transform, 0f, 1f, 0); return new Vec3(worldPosition.x, worldPosition.y, worldPosition.z); } @Override 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)) { - var ammo = ModItems.SMALL_SHELL.get(); - var ammoCount = InventoryTool.countItem(player.getInventory().items, ammo); + if (!InventoryTool.hasCreativeAmmoBox(player)) { + var ammo = ModItems.SMALL_SHELL.get(); + var ammoCount = InventoryTool.countItem(player.getInventory().items, ammo); - if (ammoCount <= 0) return; - InventoryTool.consumeItem(player.getInventory().items, ammo, 1); - } - - var entityToSpawn = ((SmallCannonShellWeapon) getWeapon(0)).create(player); - - Matrix4f transform = getVehicleFlatTransform(1); - Vector4f worldPosition = transformPosition(transform, 0f, 1.375f, 0.25f); - - entityToSpawn.setPos(worldPosition.x, worldPosition.y, worldPosition.z); - entityToSpawn.shoot(getLookAngle().x, getLookAngle().y, getLookAngle().z, 30, 0.3f); - level.addFreshEntity(entityToSpawn); - - if (player instanceof ServerPlayer serverPlayer) { - SoundTool.playLocalSound(serverPlayer, ModSounds.MINIGUN_FIRE_1P.get(), 2, 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(COOL_DOWN, 30); - -// 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); -// } + if (ammoCount <= 0) return; + InventoryTool.consumeItem(player.getInventory().items, ammo, 1); } + + var entityToSpawn = ((SmallCannonShellWeapon) getWeapon(0)).create(player); + + Matrix4f transform = getBarrelTransform(1); + Vector4f worldPosition = transformPosition(transform, 0f, 0.4f, 2.6875f); + + entityToSpawn.setPos(worldPosition.x, worldPosition.y, worldPosition.z); + entityToSpawn.shoot(getLookAngle().x, getLookAngle().y, getLookAngle().z, 40, 0.3f); + level().addFreshEntity(entityToSpawn); + + if (!player.level().isClientSide) { + if (player instanceof ServerPlayer serverPlayer) { + serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.HPJ_11_FIRE_3P.get(), SoundSource.PLAYERS, 8, random.nextFloat() * 0.05f + 1); + } + } + + this.entityData.set(GUN_ROTATE, entityData.get(GUN_ROTATE) + 0.5f); + this.entityData.set(HEAT, this.entityData.get(HEAT) + 1); + this.entityData.set(ANIM_TIME, 1); } + 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 public void travel() { @@ -322,7 +301,6 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit @Override public void registerControllers(AnimatableManager.ControllerRegistrar data) { -// data.add(new AnimationController<>(this, "movement", 0, this::movementPredicate)); } @Override @@ -332,17 +310,18 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit @Override public float getMaxHealth() { - return VehicleConfig.MK42_HP.get(); + return VehicleConfig.HPJ11_HP.get(); } @Override public int mainGunRpm(Player player) { - return 1200; + return 2400; } @Override 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 @@ -371,6 +350,6 @@ public class Hpj11Entity extends VehicleEntity implements GeoEntity, CannonEntit @Override public ResourceLocation getVehicleIcon() { - return Mod.loc("textures/vehicle_icon/sherman_icon.png"); + return Mod.loc("textures/vehicle_icon/hpj_11.png"); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/MobileVehicleEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/MobileVehicleEntity.java index c0599644e..c800c67e9 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/MobileVehicleEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/MobileVehicleEntity.java @@ -57,7 +57,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements public static final EntityDataAccessor YAW = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.FLOAT); public static final EntityDataAccessor FIRE_ANIM = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT); - public static final EntityDataAccessor HEAT = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT); public static final EntityDataAccessor COAX_HEAT = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT); public static final EntityDataAccessor AMMO = SynchedEntityData.defineId(MobileVehicleEntity.class, EntityDataSerializers.INT); @@ -98,7 +97,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements public double recoilShake; public double recoilShakeO; - public boolean cannotFire; public boolean cannotFireCoax; public int reloadCoolDown; @@ -184,10 +182,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements 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) { 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); } - if (this.entityData.get(HEAT) < 40) { - cannotFire = false; - } - if (this.entityData.get(COAX_HEAT) < 40) { cannotFireCoax = false; } @@ -208,10 +198,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements 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) { cannotFireCoax = true; this.level().playSound(null, this.getOnPos(), ModSounds.MINIGUN_OVERHEAT.get(), SoundSource.PLAYERS, 1, 1); @@ -447,7 +433,7 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements public void baseCollideBlock() { if (level() instanceof ServerLevel) { - AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5 , 1).move(this.getDeltaMovement().scale(0.6)); + AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5, 1).move(this.getDeltaMovement().scale(0.6)); BlockPos.betweenClosedStream(aabb).forEach((pos) -> { BlockState blockstate = this.level().getBlockState(pos); if (blockstate.is(Blocks.LILY_PAD) || @@ -461,7 +447,7 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements public void collideBlock() { if (!VehicleConfig.COLLISION_DESTROY_BLOCKS.get()) return; - AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5 , 1).move(this.getDeltaMovement().scale(0.6)); + AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5, 1).move(this.getDeltaMovement().scale(0.6)); BlockPos.betweenClosedStream(aabb).forEach((pos) -> { BlockState blockstate = this.level().getBlockState(pos); if (blockstate.is(ModTags.Blocks.SOFT_COLLISION)) { @@ -472,7 +458,7 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements public void collideHardBlock() { if (!VehicleConfig.COLLISION_DESTROY_HARD_BLOCKS.get()) return; - AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5 , 1).move(this.getDeltaMovement().scale(0.6)); + AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5, 1).move(this.getDeltaMovement().scale(0.6)); BlockPos.betweenClosedStream(aabb).forEach((pos) -> { BlockState blockstate = this.level().getBlockState(pos); if (blockstate.is(ModTags.Blocks.HARD_COLLISION)) { @@ -484,7 +470,7 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements public void collideBlockBeastly() { if (!VehicleConfig.COLLISION_DESTROY_BLOCKS_BEASTLY.get()) return; - AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.52 , 1).move(this.getDeltaMovement().scale(0.6)); + AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.52, 1).move(this.getDeltaMovement().scale(0.6)); BlockPos.betweenClosedStream(aabb).forEach((pos) -> { BlockState blockstate = this.level().getBlockState(pos); float hardness = blockstate.getBlock().defaultDestroyTime(); @@ -767,7 +753,6 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements .define(YAW, 0f) .define(AMMO, 0) .define(FIRE_ANIM, 0) - .define(HEAT, 0) .define(COAX_HEAT, 0) .define(DECOY_COUNT, 0); } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java index b5ba51f8d..3c7041121 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java @@ -71,12 +71,12 @@ import static com.atsuishio.superbwarfare.client.RenderHelper.preciseBlit; import static com.atsuishio.superbwarfare.tools.ParticleTool.sendParticle; public abstract class VehicleEntity extends Entity { - public static final EntityDataAccessor HEALTH = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.FLOAT); public static final EntityDataAccessor LAST_ATTACKER_UUID = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.STRING); public static final EntityDataAccessor LAST_DRIVER_UUID = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.STRING); public static final EntityDataAccessor DELTA_ROT = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.FLOAT); public static final EntityDataAccessor> SELECTED_WEAPON = SynchedEntityData.defineId(VehicleEntity.class, ModSerializers.INT_LIST_SERIALIZER.get()); + public static final EntityDataAccessor HEAT = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.INT); public VehicleWeapon[][] availableWeapons; @@ -103,6 +103,8 @@ public abstract class VehicleEntity extends Entity { public float gunYRotO; public float gunXRotO; + public boolean cannotFire; + // 自定义骑乘 private final List orderedPassengers = generatePassengersList(); @@ -268,6 +270,7 @@ public abstract class VehicleEntity extends Entity { .define(LAST_ATTACKER_UUID, "undefined") .define(LAST_DRIVER_UUID, "undefined") .define(DELTA_ROT, 0f) + .define(HEAT, 0) .define(SELECTED_WEAPON, IntList.of(new int[this.getMaxPassengers()])); // 怎么还不给玩动态注册了(恼) } @@ -559,6 +562,19 @@ public abstract class VehicleEntity extends Entity { 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(); float delta = Math.abs(getYRot() - yRotO); diff --git a/src/main/java/com/atsuishio/superbwarfare/event/ClientEventHandler.java b/src/main/java/com/atsuishio/superbwarfare/event/ClientEventHandler.java index b6bb8ac02..e76545783 100644 --- a/src/main/java/com/atsuishio/superbwarfare/event/ClientEventHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/event/ClientEventHandler.java @@ -917,6 +917,11 @@ public class ClientEventHandler { 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 diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java b/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java index fb73cdb3d..525853539 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java @@ -48,36 +48,36 @@ public class ModEntities { // Projectiles public static final DeferredHolder, EntityType> TASER_BULLET = register("taser_bullet", - EntityType.Builder.of(TaserBulletEntity::new, MobCategory.MISC).setTrackingRange(64) + EntityType.Builder.of(TaserBulletEntity::new, MobCategory.MISC).noSave().setTrackingRange(64) .setUpdateInterval(1).sized(0.5f, 0.5f)); // Fast Projectiles public static final DeferredHolder, EntityType> SMALL_CANNON_SHELL = register("small_cannon_shell", - EntityType.Builder.of(SmallCannonShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); + EntityType.Builder.of(SmallCannonShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> RPG_ROCKET = register("rpg_rocket", - EntityType.Builder.of(RpgRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); + EntityType.Builder.of(RpgRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> MORTAR_SHELL = register("mortar_shell", - EntityType.Builder.of(MortarShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); + EntityType.Builder.of(MortarShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> PROJECTILE = register("projectile", - EntityType.Builder.of(ProjectileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).noSave().noSummon().sized(0.25f, 0.25f)); + EntityType.Builder.of(ProjectileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).noSave().noSummon().sized(0.25f, 0.25f)); public static final DeferredHolder, EntityType> CANNON_SHELL = register("cannon_shell", - EntityType.Builder.of(CannonShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); + EntityType.Builder.of(CannonShellEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> GUN_GRENADE = register("gun_grenade", - EntityType.Builder.of(GunGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); + EntityType.Builder.of(GunGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> MELON_BOMB = register("melon_bomb", - EntityType.Builder.of(MelonBombEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(1f, 1f)); + EntityType.Builder.of(MelonBombEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(1f, 1f)); public static final DeferredHolder, EntityType> HAND_GRENADE = register("hand_grenade", - EntityType.Builder.of(HandGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.3f, 0.3f)); + EntityType.Builder.of(HandGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.3f, 0.3f)); public static final DeferredHolder, EntityType> RGO_GRENADE = register("rgo_grenade", - EntityType.Builder.of(RgoGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.3f, 0.3f)); + EntityType.Builder.of(RgoGrenadeEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.3f, 0.3f)); public static final DeferredHolder, EntityType> JAVELIN_MISSILE = register("javelin_missile", - EntityType.Builder.of(JavelinMissileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); + EntityType.Builder.of(JavelinMissileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> HELI_ROCKET = register("heli_rocket", - EntityType.Builder.of(HeliRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); + EntityType.Builder.of(HeliRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> WG_MISSILE = register("wg_missile", - EntityType.Builder.of(WgMissileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(3).fireImmune().sized(0.5f, 0.5f)); + EntityType.Builder.of(WgMissileEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(3).fireImmune().sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> SWARM_DRONE = register("swarm_drone", - EntityType.Builder.of(SwarmDroneEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).setTrackingRange(64).setUpdateInterval(1).fireImmune().sized(0.5f, 0.5f)); + EntityType.Builder.of(SwarmDroneEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).fireImmune().sized(0.5f, 0.5f)); // Vehicles public static final DeferredHolder, EntityType> MK_42 = register("mk_42", diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java b/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java index 97abc90e8..6e0f8bb06 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java @@ -247,6 +247,7 @@ public class ModItems { public static final DeferredHolder INSIDIOUS_BLUEPRINT = ITEMS.register("insidious_blueprint", () -> new BlueprintItem(Rarity.EPIC)); public static final DeferredHolder MK_42_BLUEPRINT = ITEMS.register("mk_42_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary())); public static final DeferredHolder MLE_1934_BLUEPRINT = ITEMS.register("mle_1934_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary())); + public static final DeferredHolder HPJ_11_BLUEPRINT = ITEMS.register("hpj_11_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary())); public static final DeferredHolder ANNIHILATOR_BLUEPRINT = ITEMS.register("annihilator_blueprint", () -> new BlueprintItem(ModEnumExtensions.getLegendary())); public static final DeferredHolder LIGHT_ARMAMENT_MODULE = ITEMS.register("light_armament_module", () -> new Item(new Item.Properties().rarity(Rarity.RARE))); diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java b/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java index da355e73e..5b604e387 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java @@ -439,6 +439,7 @@ public class ModSounds { public static final DeferredHolder INSIDIOUS_VERYFAR = REGISTRY.register("insidious_veryfar", () -> SoundEvent.createVariableRangeEvent(Mod.loc("insidious_veryfar"))); public static final DeferredHolder INSIDIOUS_RELOAD_EMPTY = REGISTRY.register("insidious_reload_empty", () -> SoundEvent.createVariableRangeEvent(Mod.loc("insidious_reload_empty"))); public static final DeferredHolder SMOKE_FIRE = REGISTRY.register("smoke_fire", () -> SoundEvent.createVariableRangeEvent(Mod.loc("smoke_fire"))); - + public static final DeferredHolder HPJ_11_FIRE_1P = REGISTRY.register("hpj_11_fire_1p", () -> SoundEvent.createVariableRangeEvent(Mod.loc("hpj_11_fire_1p"))); + public static final DeferredHolder HPJ_11_FIRE_3P = REGISTRY.register("hpj_11_fire_3p", () -> SoundEvent.createVariableRangeEvent(Mod.loc("hpj_11_fire_3p"))); } diff --git a/src/main/resources/assets/superbwarfare/geo/1130.geo.json b/src/main/resources/assets/superbwarfare/geo/1130.geo.json index 0e6934bbc..7ce7a0b30 100644 --- a/src/main/resources/assets/superbwarfare/geo/1130.geo.json +++ b/src/main/resources/assets/superbwarfare/geo/1130.geo.json @@ -6,7 +6,7 @@ "identifier": "geometry.unknown", "texture_width": 128, "texture_height": 128, - "visible_bounds_width": 5, + "visible_bounds_width": 13, "visible_bounds_height": 5.5, "visible_bounds_offset": [0, 2.25, 0] }, @@ -132,12 +132,12 @@ "origin": [-24, 4, -20], "size": [48, 1.6, 40], "uv": { - "north": {"uv": [65, 41], "uv_size": [24, 1]}, - "east": {"uv": [69, 3], "uv_size": [20, 1]}, - "south": {"uv": [67, 8], "uv_size": [24, 1]}, - "west": {"uv": [69, 4], "uv_size": [20, 1]}, - "up": {"uv": [0, 0], "uv_size": [24, 20]}, - "down": {"uv": [0, 40], "uv_size": [24, -20]} + "north": {"uv": [55, 41], "uv_size": [34, 1]}, + "east": {"uv": [59, 3], "uv_size": [30, 1]}, + "south": {"uv": [57, 8], "uv_size": [34, 1]}, + "west": {"uv": [59, 4], "uv_size": [30, 1]}, + "up": {"uv": [3, 0], "uv_size": [21, 20]}, + "down": {"uv": [3, 40], "uv_size": [21, -20]} } }, { @@ -1606,6 +1606,75 @@ "parent": "paotiroll", "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", "parent": "roll", diff --git a/src/main/resources/assets/superbwarfare/geo/small_cannon_shell.geo.json b/src/main/resources/assets/superbwarfare/geo/small_cannon_shell.geo.json new file mode 100644 index 000000000..2393184bb --- /dev/null +++ b/src/main/resources/assets/superbwarfare/geo/small_cannon_shell.geo.json @@ -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]} + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/lang/en_us.json b/src/main/resources/assets/superbwarfare/lang/en_us.json index 26e1509d4..bfacf6318 100644 --- a/src/main/resources/assets/superbwarfare/lang/en_us.json +++ b/src/main/resources/assets/superbwarfare/lang/en_us.json @@ -109,6 +109,7 @@ "item.superbwarfare.m2hb_blueprint": "M2HB Blueprint", "item.superbwarfare.secondary_cataclysm_blueprint": "Secondary Cataclysm 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.rare_material_pack": "Rare Material Pack", diff --git a/src/main/resources/assets/superbwarfare/lang/zh_cn.json b/src/main/resources/assets/superbwarfare/lang/zh_cn.json index 62ee5c735..44c391a46 100644 --- a/src/main/resources/assets/superbwarfare/lang/zh_cn.json +++ b/src/main/resources/assets/superbwarfare/lang/zh_cn.json @@ -110,6 +110,7 @@ "item.superbwarfare.m2hb_blueprint": "M2HB重机枪蓝图", "item.superbwarfare.secondary_cataclysm_blueprint": "二次灾变蓝图", "item.superbwarfare.insidious_blueprint": "阴险蓝图", + "item.superbwarfare.hpj_11_blueprint": "H/PJ-11近防炮蓝图", "item.superbwarfare.common_material_pack": "普通材料包", "item.superbwarfare.rare_material_pack": "稀有材料包", diff --git a/src/main/resources/assets/superbwarfare/sounds.json b/src/main/resources/assets/superbwarfare/sounds.json index 3a4173ebb..37080e275 100644 --- a/src/main/resources/assets/superbwarfare/sounds.json +++ b/src/main/resources/assets/superbwarfare/sounds.json @@ -3043,5 +3043,21 @@ "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 + } + ] } } \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/sounds/hpj11/hpj_11_fire_1p.ogg b/src/main/resources/assets/superbwarfare/sounds/hpj11/hpj_11_fire_1p.ogg new file mode 100644 index 000000000..193744024 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/hpj11/hpj_11_fire_1p.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/hpj11/hpj_11_fire_3p.ogg b/src/main/resources/assets/superbwarfare/sounds/hpj11/hpj_11_fire_3p.ogg new file mode 100644 index 000000000..5422bd6b2 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/hpj11/hpj_11_fire_3p.ogg differ diff --git a/src/main/resources/assets/superbwarfare/textures/entity/1130.png b/src/main/resources/assets/superbwarfare/textures/entity/1130.png index 09e9466e3..ad710a5c7 100644 Binary files a/src/main/resources/assets/superbwarfare/textures/entity/1130.png and b/src/main/resources/assets/superbwarfare/textures/entity/1130.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/entity/1130_e.png b/src/main/resources/assets/superbwarfare/textures/entity/1130_e.png new file mode 100644 index 000000000..dd303e288 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/entity/1130_e.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/entity/1130_heat.png b/src/main/resources/assets/superbwarfare/textures/entity/1130_heat.png new file mode 100644 index 000000000..dfc478a47 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/entity/1130_heat.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/entity/small_cannon_shell.png b/src/main/resources/assets/superbwarfare/textures/entity/small_cannon_shell.png new file mode 100644 index 000000000..9e07e389f Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/entity/small_cannon_shell.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/screens/cannon/hpj_crosshair.png b/src/main/resources/assets/superbwarfare/textures/screens/cannon/hpj_crosshair.png new file mode 100644 index 000000000..05a4da3ef Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/screens/cannon/hpj_crosshair.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/screens/cannon/hpj_crosshair_notzoom.png b/src/main/resources/assets/superbwarfare/textures/screens/cannon/hpj_crosshair_notzoom.png new file mode 100644 index 000000000..39fce7bcc Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/screens/cannon/hpj_crosshair_notzoom.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/vehicle_icon/hpj_11.png b/src/main/resources/assets/superbwarfare/textures/vehicle_icon/hpj_11.png new file mode 100644 index 000000000..f64b28fda Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/vehicle_icon/hpj_11.png differ diff --git a/src/main/resources/data/superbwarfare/recipe/hpj_11_blueprint_crafting.json b/src/main/resources/data/superbwarfare/recipe/hpj_11_blueprint_crafting.json new file mode 100644 index 000000000..338dfe194 --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipe/hpj_11_blueprint_crafting.json @@ -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 + } +} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/recipe/hpj_11_smithing.json b/src/main/resources/data/superbwarfare/recipe/hpj_11_smithing.json new file mode 100644 index 000000000..d76592783 --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipe/hpj_11_smithing.json @@ -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" + } + } + } +} \ No newline at end of file