diff --git a/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_ap.json b/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_ap.json new file mode 100644 index 000000000..13a6144ae --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_ap.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/medium_rocket_ap" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_cm.json b/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_cm.json new file mode 100644 index 000000000..5b481fe26 --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_cm.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/medium_rocket_cm" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_he.json b/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_he.json new file mode 100644 index 000000000..a322592d0 --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/medium_rocket_he.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/medium_rocket_he" + } +} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/client/layer/projectile/MediumRocketLayer.java b/src/main/java/com/atsuishio/superbwarfare/client/layer/projectile/MediumRocketLayer.java new file mode 100644 index 000000000..e8ebf2a2c --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/client/layer/projectile/MediumRocketLayer.java @@ -0,0 +1,27 @@ +package com.atsuishio.superbwarfare.client.layer.projectile; + +import com.atsuishio.superbwarfare.Mod; +import com.atsuishio.superbwarfare.entity.projectile.MediumRocketEntity; +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 MediumRocketLayer extends GeoRenderLayer { + private static final ResourceLocation LAYER = Mod.loc("textures/entity/rpg_rocket_e.png"); + + public MediumRocketLayer(GeoRenderer entityRenderer) { + super(entityRenderer); + } + + @Override + public void render(PoseStack poseStack, MediumRocketEntity animatable, BakedGeoModel bakedModel, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, float partialTick, int packedLight, int packedOverlay) { + RenderType glowRenderType = RenderType.eyes(LAYER); + getRenderer().reRender(getDefaultBakedModel(animatable), poseStack, bufferSource, animatable, glowRenderType, bufferSource.getBuffer(glowRenderType), partialTick, packedLight, OverlayTexture.NO_OVERLAY, 0xFFFFFFFF); + } +} diff --git a/src/main/java/com/atsuishio/superbwarfare/client/model/entity/MediumRocketModel.java b/src/main/java/com/atsuishio/superbwarfare/client/model/entity/MediumRocketModel.java new file mode 100644 index 000000000..ea05e1a3a --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/client/model/entity/MediumRocketModel.java @@ -0,0 +1,24 @@ +package com.atsuishio.superbwarfare.client.model.entity; + +import com.atsuishio.superbwarfare.Mod; +import com.atsuishio.superbwarfare.entity.projectile.MediumRocketEntity; +import net.minecraft.resources.ResourceLocation; +import software.bernie.geckolib.model.GeoModel; + +public class MediumRocketModel extends GeoModel { + + @Override + public ResourceLocation getAnimationResource(MediumRocketEntity entity) { + return Mod.loc("animations/rpg_rocket.animation.json"); + } + + @Override + public ResourceLocation getModelResource(MediumRocketEntity entity) { + return Mod.loc("geo/medium_rocket.geo.json"); + } + + @Override + public ResourceLocation getTextureResource(MediumRocketEntity entity) { + return Mod.loc("textures/entity/type_63.png"); + } +} diff --git a/src/main/java/com/atsuishio/superbwarfare/client/model/entity/SmallRocketModel.java b/src/main/java/com/atsuishio/superbwarfare/client/model/entity/SmallRocketModel.java index 3a127e65e..4be7bd4fa 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/model/entity/SmallRocketModel.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/model/entity/SmallRocketModel.java @@ -14,11 +14,11 @@ public class SmallRocketModel extends GeoModel { @Override public ResourceLocation getModelResource(SmallRocketEntity entity) { - return Mod.loc("geo/small_rocket.geo.json"); + return Mod.loc("geo/medium_rocket.geo.json"); } @Override public ResourceLocation getTextureResource(SmallRocketEntity entity) { - return Mod.loc("textures/entity/small_rocket.png"); + return Mod.loc("textures/entity/medium_rocket.png"); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/MediumRocketRenderer.java b/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/MediumRocketRenderer.java new file mode 100644 index 000000000..4d85a3c08 --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/MediumRocketRenderer.java @@ -0,0 +1,49 @@ +package com.atsuishio.superbwarfare.client.renderer.entity; + +import com.atsuishio.superbwarfare.client.layer.projectile.MediumRocketLayer; +import com.atsuishio.superbwarfare.client.model.entity.MediumRocketModel; +import com.atsuishio.superbwarfare.entity.projectile.MediumRocketEntity; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Axis; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; +import software.bernie.geckolib.cache.object.BakedGeoModel; +import software.bernie.geckolib.renderer.GeoEntityRenderer; + +public class MediumRocketRenderer extends GeoEntityRenderer { + public MediumRocketRenderer(EntityRendererProvider.Context renderManager) { + super(renderManager, new MediumRocketModel()); + this.addRenderLayer(new MediumRocketLayer(this)); + } + + @Override + public RenderType getRenderType(MediumRocketEntity animatable, ResourceLocation texture, MultiBufferSource bufferSource, float partialTick) { + return RenderType.entityTranslucent(getTextureLocation(animatable)); + } + + @Override + public void preRender(PoseStack poseStack, MediumRocketEntity entity, BakedGeoModel model, MultiBufferSource bufferSource, VertexConsumer buffer, boolean isReRender, float partialTick, int packedLight, int packedOverlay, int color) { + 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(MediumRocketEntity 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(); + } + + @Override + protected float getDeathMaxRotation(MediumRocketEntity entityLivingBaseIn) { + return 0.0F; + } +} diff --git a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java index 83fe1531a..91035bcee 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java @@ -127,6 +127,9 @@ public class ModItemModelProvider extends ItemModelProvider { simpleItem(ModItems.SHOTGUN_AMMO); simpleItem(ModItems.HEAVY_AMMO); simpleItem(ModItems.SMALL_ROCKET); + simpleItem(ModItems.MEDIUM_ROCKET_AP); + simpleItem(ModItems.MEDIUM_ROCKET_HE); + simpleItem(ModItems.MEDIUM_ROCKET_CM); simpleItem(ModItems.WIRE_GUIDE_MISSILE); simpleItem(ModItems.AGM); simpleItem(ModItems.SMALL_SHELL); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/MediumRocketEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/MediumRocketEntity.java new file mode 100644 index 000000000..e8b91ac2f --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/MediumRocketEntity.java @@ -0,0 +1,384 @@ +package com.atsuishio.superbwarfare.entity.projectile; + +import com.atsuishio.superbwarfare.Mod; +import com.atsuishio.superbwarfare.config.server.ExplosionConfig; +import com.atsuishio.superbwarfare.entity.vehicle.base.VehicleEntity; +import com.atsuishio.superbwarfare.init.ModDamageTypes; +import com.atsuishio.superbwarfare.init.ModEntities; +import com.atsuishio.superbwarfare.init.ModItems; +import com.atsuishio.superbwarfare.init.ModSounds; +import com.atsuishio.superbwarfare.network.message.receive.ClientIndicatorMessage; +import com.atsuishio.superbwarfare.network.message.receive.ClientMotionSyncMessage; +import com.atsuishio.superbwarfare.tools.ChunkLoadTool; +import com.atsuishio.superbwarfare.tools.CustomExplosion; +import com.atsuishio.superbwarfare.tools.ParticleTool; +import com.atsuishio.superbwarfare.tools.ProjectileCalculator; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.projectile.ThrowableItemProjectile; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.EntityHitResult; +import net.minecraft.world.phys.Vec3; +import net.neoforged.neoforge.event.EventHooks; +import net.neoforged.neoforge.network.PacketDistributor; +import org.jetbrains.annotations.NotNull; +import software.bernie.geckolib.animatable.GeoEntity; +import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache; +import software.bernie.geckolib.animation.*; +import software.bernie.geckolib.util.GeckoLibUtil; + +import javax.annotation.ParametersAreNonnullByDefault; +import java.util.HashSet; +import java.util.Set; + +public class MediumRocketEntity extends FastThrowableProjectile implements GeoEntity, ExplosiveProjectile { + + private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); + + private boolean ap = true; + private boolean he = false; + private boolean cm = false; + private float damage = 0; + private float radius = 0; + private float explosionDamage = 0; + private float fireProbability = 0; + private int fireTime = 0; + public Set loadedChunks = new HashSet<>(); + private float gravity = 0.05f; + + private boolean active; + private int sparedTime; + private int sparedAmount = 50; + + public MediumRocketEntity(EntityType type, Level world) { + super(type, world); + this.noCulling = true; + } + + public MediumRocketEntity(EntityType pEntityType, double pX, double pY, double pZ, Level pLevel, float damage, float radius, float explosionDamage, float fireProbability, int fireTime, boolean ap, boolean he, boolean cm, int sparedAmount) { + super(pEntityType, pX, pY, pZ, pLevel); + this.noCulling = true; + this.damage = damage; + this.radius = radius; + this.explosionDamage = explosionDamage; + this.fireProbability = fireProbability; + this.fireTime = fireTime; + this.ap = ap; + this.he = he; + this.cm = cm; + this.sparedAmount = sparedAmount; + } + + public MediumRocketEntity(LivingEntity entity, Level world, float damage, float radius, float explosionDamage, float fireProbability, int fireTime, boolean ap, boolean he, boolean cm, int sparedAmount) { + super(ModEntities.MEDIUM_ROCKET.get(), entity, world); + this.noCulling = true; + this.damage = damage; + this.radius = radius; + this.explosionDamage = explosionDamage; + this.fireProbability = fireProbability; + this.fireTime = fireTime; + this.ap = ap; + this.he = he; + this.cm = cm; + this.sparedAmount = sparedAmount; + } + + public MediumRocketEntity durability(int durability) { + this.durability = durability; + return this; + } + + @Override + @ParametersAreNonnullByDefault + public boolean isColliding(BlockPos pPos, BlockState pState) { + return true; + } + + @Override + public void addAdditionalSaveData(@NotNull CompoundTag pCompound) { + super.addAdditionalSaveData(pCompound); + + pCompound.putFloat("Damage", this.damage); + pCompound.putFloat("ExplosionDamage", this.explosionDamage); + pCompound.putFloat("Radius", this.radius); + pCompound.putFloat("FireProbability", this.fireProbability); + pCompound.putInt("FireTime", this.fireTime); + pCompound.putInt("Durability", this.durability); + + ListTag listTag = new ListTag(); + for (long chunkPos : this.loadedChunks) { + CompoundTag tag = new CompoundTag(); + tag.putLong("Pos", chunkPos); + listTag.add(tag); + } + pCompound.put("Chunks", listTag); + } + + @Override + public void readAdditionalSaveData(@NotNull CompoundTag pCompound) { + super.readAdditionalSaveData(pCompound); + + if (pCompound.contains("Damage")) { + this.damage = pCompound.getFloat("Damage"); + } + + if (pCompound.contains("ExplosionDamage")) { + this.explosionDamage = pCompound.getFloat("ExplosionDamage"); + } + + if (pCompound.contains("Radius")) { + this.radius = pCompound.getFloat("Radius"); + } + + if (pCompound.contains("FireProbability")) { + this.fireProbability = pCompound.getFloat("FireProbability"); + } + + if (pCompound.contains("FireTime")) { + this.fireTime = pCompound.getInt("FireTime"); + } + + if (pCompound.contains("Durability")) { + this.durability = pCompound.getInt("Durability"); + } + + if (pCompound.contains("Chunks")) { + ListTag listTag = pCompound.getList("Chunks", 10); + for (int i = 0; i < listTag.size(); i++) { + CompoundTag tag = listTag.getCompound(i); + this.loadedChunks.add(tag.getLong("Pos")); + } + } + } + + @Override + protected @NotNull Item getDefaultItem() { + return ModItems.SMALL_ROCKET.get(); + } + + @Override + public boolean shouldRenderAtSqrDistance(double pDistance) { + return true; + } + + @Override + public void onHitBlock(@NotNull BlockHitResult blockHitResult) { + if (this.level() instanceof ServerLevel) { + if (he || cm) { + causeExplode(blockHitResult.getLocation()); + this.discard(); + return; + } + BlockPos resultPos = blockHitResult.getBlockPos(); + float hardness = this.level().getBlockState(resultPos).getBlock().defaultDestroyTime(); + if (hardness != -1) { + if (ExplosionConfig.EXPLOSION_DESTROY.get()) { + if (firstHit) { + causeExplode(blockHitResult.getLocation()); + firstHit = false; + Mod.queueServerWork(3, this::discard); + } + this.level().destroyBlock(resultPos, true); + } + } else { + causeExplode(blockHitResult.getLocation()); + this.discard(); + } + if (!ExplosionConfig.EXPLOSION_DESTROY.get()) { + causeExplode(blockHitResult.getLocation()); + this.discard(); + } + } + } + + @Override + public void onHitEntity(@NotNull EntityHitResult entityHitResult) { + if (this.level() instanceof ServerLevel) { + Entity entity = entityHitResult.getEntity(); + if (this.getOwner() != null && entity == this.getOwner().getVehicle()) + return; + entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage); + + if (entity instanceof LivingEntity) { + entity.invulnerableTime = 0; + } + + if (this.getOwner() instanceof LivingEntity living) { + if (!living.level().isClientSide() && living instanceof ServerPlayer player) { + living.level().playSound(null, living.blockPosition(), ModSounds.INDICATION.get(), SoundSource.VOICE, 1, 1); + + PacketDistributor.sendToPlayer(player, new ClientIndicatorMessage(0, 5)); + } + } + + ParticleTool.cannonHitParticles(this.level(), this.position(), this); + causeExplode(entityHitResult.getLocation()); + if (entity instanceof VehicleEntity) { + this.discard(); + } + + } + } + + @Override + public void tick() { + super.tick(); + if (this.level() instanceof ServerLevel serverLevel && tickCount > 1) { + double l = getDeltaMovement().length(); + for (double i = 0; i < l; i++) { + Vec3 startPos = new Vec3(this.xo, this.yo, this.zo); + Vec3 pos = startPos.add(getDeltaMovement().normalize().scale(-i)); + ParticleTool.sendParticle(serverLevel, ParticleTypes.CAMPFIRE_COSY_SMOKE, pos.x, pos.y, pos.z, + 1, 0, 0, 0, 0.001, true); + } + // 更新需要加载的区块 + ChunkLoadTool.updateLoadedChunks(serverLevel, this, this.loadedChunks); + } + + destroyBlock(); + + if (this.tickCount > 600 || this.isInWater()) { + if (this.level() instanceof ServerLevel) { + causeExplode(position()); + } + this.discard(); + } + + if (cm && getDeltaMovement().y < 0.1 && !active) { + if (position().y < level().getMinBuildHeight() || position().y > level().getMaxBuildHeight()) return; + + BlockPos hitBlock = ProjectileCalculator.calculateImpactPosition(level(), position(), getDeltaMovement(), -0.05); + Vec3 finalPos = hitBlock.getCenter(); + double vh = getDeltaMovement().horizontalDistance(); + double dh = position().vectorTo(finalPos).horizontalDistance(); + int t = (int) (dh / vh); + + sparedTime = tickCount + t - 5; + active = true; + } + + if (tickCount >= sparedTime && active) { + releaseClusterMunitions((LivingEntity) getOwner()); + this.discard(); + } + } + + @Override + public void syncMotion() { + if (!this.level().isClientSide) { + PacketDistributor.sendToAllPlayers(new ClientMotionSyncMessage(this)); + } + } + + private void causeExplode(Vec3 vec3) { + CustomExplosion explosion = new CustomExplosion(this.level(), this, + ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), + this, + this.getOwner()), + explosionDamage, + vec3.x, + vec3.y, + vec3.z, + radius, + ExplosionConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP, true). + setDamageMultiplier(1); + explosion.explode(); + EventHooks.onExplosionStart(this.level(), explosion); + explosion.finalizeExplosion(false); + if (radius > 9) { + ParticleTool.spawnHugeExplosionParticles(this.level(), vec3); + } else { + ParticleTool.spawnMediumExplosionParticles(this.level(), vec3); + } + discard(); + } + + private void releaseClusterMunitions(LivingEntity shooter) { + if (level() instanceof ServerLevel serverLevel) { + ParticleTool.spawnMediumExplosionParticles(serverLevel, position()); + for (int index0 = 0; index0 < sparedAmount; index0++) { + GunGrenadeEntity gunGrenadeEntity = new GunGrenadeEntity(shooter, serverLevel, + 2 * damage / sparedAmount, + 5 * explosionDamage / sparedAmount, + radius / 2 + ); + + gunGrenadeEntity.setPos(position().x, position().y, position().z); + gunGrenadeEntity.shoot(getDeltaMovement().x, getDeltaMovement().y, getDeltaMovement().z, (float) (1.25f * getDeltaMovement().length()), + 30); + serverLevel.addFreshEntity(gunGrenadeEntity); + } + discard(); + } + } + + private PlayState movementPredicate(AnimationState event) { + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.rpg.idle")); + } + + @Override + protected double getDefaultGravity() { + return gravity; + } + + @Override + public void registerControllers(AnimatableManager.ControllerRegistrar data) { + data.add(new AnimationController<>(this, "movement", 0, this::movementPredicate)); + } + + @Override + public AnimatableInstanceCache getAnimatableInstanceCache() { + return this.cache; + } + + @Override + public void onRemovedFromLevel() { + if (this.level() instanceof ServerLevel serverLevel) { + ChunkLoadTool.unloadAllChunks(serverLevel, this, this.loadedChunks); + } + super.onRemovedFromLevel(); + } + + @Override + public @NotNull SoundEvent getCloseSound() { + return ModSounds.ROCKET_ENGINE.get(); + } + + @Override + public @NotNull SoundEvent getSound() { + return ModSounds.ROCKET_FLY.get(); + } + + @Override + public float getVolume() { + return 0.7f; + } + + @Override + public void setDamage(float damage) { + this.damage = damage; + } + + @Override + public void setExplosionDamage(float damage) { + this.explosionDamage = damage; + } + + @Override + public void setExplosionRadius(float radius) { + this.radius = radius; + } +} diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java index a4dc2345a..52fb8020d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java @@ -133,7 +133,7 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt } if (OBB.getLookingObb(player, player.entityInteractionRange()) == yawController) { interactEvent(new Vec3(yawController.center())); - entityData.set(YAW, Mth.clamp(entityData.get(YAW) + (player.isShiftKeyDown() ? -0.01f : 0.01f) * (float) interactionTick, -15, 15)); + entityData.set(YAW, Mth.clamp(entityData.get(YAW) + (player.isShiftKeyDown() ? -0.02f : 0.02f) * (float) interactionTick, -15, 15)); player.swing(InteractionHand.MAIN_HAND); } if (OBB.getLookingObb(player, player.entityInteractionRange()) == pitchController) { diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java b/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java index ae0dbb9ae..3913b40ae 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModEntities.java @@ -84,6 +84,8 @@ public class ModEntities { EntityType.Builder.of(Agm65Entity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.75f, 0.75f)); public static final DeferredHolder, EntityType> SMALL_ROCKET = register("small_rocket", EntityType.Builder.of(SmallRocketEntity::new, MobCategory.MISC).setShouldReceiveVelocityUpdates(false).noSave().setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f)); + public static final DeferredHolder, EntityType> MEDIUM_ROCKET = register("medium_rocket", + EntityType.Builder.of(MediumRocketEntity::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).noSave().setTrackingRange(64).setUpdateInterval(3).fireImmune().sized(0.5f, 0.5f)); public static final DeferredHolder, EntityType> SWARM_DRONE = register("swarm_drone", diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModEntityRenderers.java b/src/main/java/com/atsuishio/superbwarfare/init/ModEntityRenderers.java index aceb7e7ac..b66c3de92 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModEntityRenderers.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModEntityRenderers.java @@ -22,6 +22,7 @@ public class ModEntityRenderers { event.registerEntityRenderer(ModEntities.DPS_GENERATOR.get(), DPSGeneratorRenderer::new); event.registerEntityRenderer(ModEntities.RPG_ROCKET.get(), RpgRocketRenderer::new); event.registerEntityRenderer(ModEntities.SMALL_ROCKET.get(), SmallRocketRenderer::new); + event.registerEntityRenderer(ModEntities.MEDIUM_ROCKET.get(), MediumRocketRenderer::new); event.registerEntityRenderer(ModEntities.MORTAR_SHELL.get(), MortarShellRenderer::new); event.registerEntityRenderer(ModEntities.CANNON_SHELL.get(), CannonShellRenderer::new); event.registerEntityRenderer(ModEntities.PROJECTILE.get(), ProjectileEntityRenderer::new); diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java b/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java index fdd1879bc..b4d7291c3 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java @@ -120,6 +120,9 @@ public class ModItems { public static final DeferredHolder BLU_43_MINE = AMMO.register("blu_43_mine", Blu43MineItem::new); public static final DeferredHolder SMALL_SHELL = AMMO.register("small_shell", SmallShellItem::new); public static final DeferredHolder SMALL_ROCKET = AMMO.register("small_rocket", SmallRocketItem::new); + public static final DeferredHolder MEDIUM_ROCKET_AP = AMMO.register("medium_rocket_ap", MediumRocketAPItem::new); + public static final DeferredHolder MEDIUM_ROCKET_HE = AMMO.register("medium_rocket_he", MediumRocketHEItem::new); + public static final DeferredHolder MEDIUM_ROCKET_CM = AMMO.register("medium_rocket_cm", MediumRocketCMItem::new); public static final DeferredHolder WIRE_GUIDE_MISSILE = AMMO.register("wire_guide_missile", WireGuideMissileItem::new); public static final DeferredHolder AGM = AMMO.register("agm", AgmItem::new); public static final DeferredHolder SWARM_DRONE = AMMO.register("swarm_drone", SwarmDroneItem::new); @@ -353,6 +356,9 @@ public class ModItems { DispenserBlock.registerBehavior(RGO_GRENADE.get(), new RgoGrenade.RgoGrenadeDispenserBehavior()); DispenserBlock.registerBehavior(M18_SMOKE_GRENADE.get(), new M18SmokeGrenade.SmokeGrenadeDispenserBehavior()); DispenserBlock.registerBehavior(TM_62.get(), new Tm62Item.Tm62DispenseBehavior()); + DispenserBlock.registerBehavior(MEDIUM_ROCKET_AP.get(), new MediumRocketAPItem.MediumRocketDispenseBehavior()); + DispenserBlock.registerBehavior(MEDIUM_ROCKET_CM.get(), new MediumRocketCMItem.MediumRocketDispenseBehavior()); + DispenserBlock.registerBehavior(MEDIUM_ROCKET_HE.get(), new MediumRocketHEItem.MediumRocketDispenseBehavior()); } public static void register(IEventBus bus) { diff --git a/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketAPItem.java b/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketAPItem.java new file mode 100644 index 000000000..93b1dee6f --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketAPItem.java @@ -0,0 +1,48 @@ +package com.atsuishio.superbwarfare.item.common.ammo; + +import com.atsuishio.superbwarfare.entity.projectile.MediumRocketEntity; +import com.atsuishio.superbwarfare.init.ModEntities; +import com.atsuishio.superbwarfare.init.ModItems; +import com.atsuishio.superbwarfare.init.ModSounds; +import net.minecraft.core.Direction; +import net.minecraft.core.Position; +import net.minecraft.core.dispenser.BlockSource; +import net.minecraft.core.dispenser.ProjectileDispenseBehavior; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.entity.projectile.Projectile; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ProjectileItem; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; + +import javax.annotation.ParametersAreNonnullByDefault; + +public class MediumRocketAPItem extends Item implements ProjectileItem { + + public MediumRocketAPItem() { + super(new Properties()); + } + + public static class MediumRocketDispenseBehavior extends ProjectileDispenseBehavior { + public MediumRocketDispenseBehavior() { + super(ModItems.MEDIUM_ROCKET_AP.get()); + } + + @Override + protected void playSound(BlockSource blockSource) { + blockSource.level().playSound(null, blockSource.pos(), ModSounds.SMALL_ROCKET_FIRE_3P.get(), SoundSource.BLOCKS, 2.0F, 1.0F); + } + } + + @Override + @ParametersAreNonnullByDefault + public @NotNull Projectile asProjectile(Level level, Position pos, ItemStack stack, Direction direction) { + return new MediumRocketEntity(ModEntities.MEDIUM_ROCKET.get(), pos.x(), pos.y(), pos.z(), level, 500, 6, 100, 0, 0, true, false, false, 0); + } + + @Override + public @NotNull DispenseConfig createDispenseConfig() { + return DispenseConfig.builder().power(6).build(); + } +} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketCMItem.java b/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketCMItem.java new file mode 100644 index 000000000..6a440d241 --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketCMItem.java @@ -0,0 +1,48 @@ +package com.atsuishio.superbwarfare.item.common.ammo; + +import com.atsuishio.superbwarfare.entity.projectile.MediumRocketEntity; +import com.atsuishio.superbwarfare.init.ModEntities; +import com.atsuishio.superbwarfare.init.ModItems; +import com.atsuishio.superbwarfare.init.ModSounds; +import net.minecraft.core.Direction; +import net.minecraft.core.Position; +import net.minecraft.core.dispenser.BlockSource; +import net.minecraft.core.dispenser.ProjectileDispenseBehavior; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.entity.projectile.Projectile; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ProjectileItem; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; + +import javax.annotation.ParametersAreNonnullByDefault; + +public class MediumRocketCMItem extends Item implements ProjectileItem { + + public MediumRocketCMItem() { + super(new Properties()); + } + + public static class MediumRocketDispenseBehavior extends ProjectileDispenseBehavior { + public MediumRocketDispenseBehavior() { + super(ModItems.MEDIUM_ROCKET_CM.get()); + } + + @Override + protected void playSound(BlockSource blockSource) { + blockSource.level().playSound(null, blockSource.pos(), ModSounds.SMALL_ROCKET_FIRE_3P.get(), SoundSource.BLOCKS, 2.0F, 1.0F); + } + } + + @Override + @ParametersAreNonnullByDefault + public @NotNull Projectile asProjectile(Level level, Position pos, ItemStack stack, Direction direction) { + return new MediumRocketEntity(ModEntities.MEDIUM_ROCKET.get(), pos.x(), pos.y(), pos.z(), level, 300, 12, 300, 0, 0, false, false, true, 50); + } + + @Override + public @NotNull ProjectileItem.DispenseConfig createDispenseConfig() { + return ProjectileItem.DispenseConfig.builder().power(6).build(); + } +} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketHEItem.java b/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketHEItem.java new file mode 100644 index 000000000..85d42f7a8 --- /dev/null +++ b/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketHEItem.java @@ -0,0 +1,47 @@ +package com.atsuishio.superbwarfare.item.common.ammo; + +import com.atsuishio.superbwarfare.entity.projectile.MediumRocketEntity; +import com.atsuishio.superbwarfare.init.ModEntities; +import com.atsuishio.superbwarfare.init.ModItems; +import com.atsuishio.superbwarfare.init.ModSounds; +import net.minecraft.core.Direction; +import net.minecraft.core.Position; +import net.minecraft.core.dispenser.ProjectileDispenseBehavior; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.entity.projectile.Projectile; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ProjectileItem; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.NotNull; + +import javax.annotation.ParametersAreNonnullByDefault; + +public class MediumRocketHEItem extends Item implements ProjectileItem { + + public MediumRocketHEItem() { + super(new Properties()); + } + + public static class MediumRocketDispenseBehavior extends ProjectileDispenseBehavior { + public MediumRocketDispenseBehavior() { + super(ModItems.MEDIUM_ROCKET_HE.get()); + } + + @Override + protected void playSound(net.minecraft.core.dispenser.BlockSource blockSource) { + blockSource.level().playSound(null, blockSource.pos(), ModSounds.SMALL_ROCKET_FIRE_3P.get(), SoundSource.BLOCKS, 2.0F, 1.0F); + } + } + + @Override + @ParametersAreNonnullByDefault + public @NotNull Projectile asProjectile(Level level, Position pos, ItemStack stack, Direction direction) { + return new MediumRocketEntity(ModEntities.MEDIUM_ROCKET.get(), pos.x(), pos.y(), pos.z(), level, 200, 12, 200, 0.2f, 40, false, true, false, 0); + } + + @Override + public @NotNull DispenseConfig createDispenseConfig() { + return DispenseConfig.builder().power(6).build(); + } +} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/geo/medium_rocket.geo.json b/src/main/resources/assets/superbwarfare/geo/medium_rocket.geo.json new file mode 100644 index 000000000..fe5f4a676 --- /dev/null +++ b/src/main/resources/assets/superbwarfare/geo/medium_rocket.geo.json @@ -0,0 +1,2465 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.unknown", + "texture_width": 32, + "texture_height": 32, + "visible_bounds_width": 5, + "visible_bounds_height": 4, + "visible_bounds_offset": [ + 0, + 1, + 0 + ] + }, + "bones": [ + { + "name": "rocket107", + "pivot": [ + 0, + 0, + 0 + ] + }, + { + "name": "shell", + "parent": "rocket107", + "pivot": [ + 0, + -8.7375, + 0 + ], + "rotation": [ + 90, + 0, + 0 + ] + }, + { + "name": "main2", + "parent": "shell", + "pivot": [ + 0.00275, + -8.73745, + -0.51549 + ], + "rotation": [ + 0, + 0, + 157.5 + ] + }, + { + "name": "bone40", + "parent": "main2", + "pivot": [ + 0.00297, + -8.7369, + -11.32972 + ], + "rotation": [ + 0, + 0, + 22.5 + ], + "cubes": [ + { + "origin": [ + -0.21556, + -9.26445, + -11.36051 + ], + "size": [ + 0.43705, + 1.05509, + 0.06157 + ], + "uv": { + "north": { + "uv": [ + 1.75, + 17.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + } + } + }, + { + "origin": [ + -0.21556, + -9.26445, + -11.36051 + ], + "size": [ + 0.43705, + 1.05509, + 0.06157 + ], + "pivot": [ + 0.00297, + -8.7369, + -11.32972 + ], + "rotation": [ + 0, + 0, + 45 + ], + "uv": { + "north": { + "uv": [ + 1.75, + 17.625 + ], + "uv_size": [ + 0.125, + 0.125 + ] + } + } + }, + { + "origin": [ + -0.21556, + -9.26445, + -11.36051 + ], + "size": [ + 0.43705, + 1.05509, + 0.06157 + ], + "pivot": [ + 0.00297, + -8.7369, + -11.32972 + ], + "rotation": [ + 0, + 0, + 90 + ], + "uv": { + "north": { + "uv": [ + 1.75, + 17.75 + ], + "uv_size": [ + 0.125, + 0.125 + ] + } + } + }, + { + "origin": [ + -0.21556, + -9.26445, + -11.36051 + ], + "size": [ + 0.43705, + 1.05509, + 0.06157 + ], + "pivot": [ + 0.00297, + -8.7369, + -11.32972 + ], + "rotation": [ + 0, + 0, + 135 + ], + "uv": { + "north": { + "uv": [ + 1.75, + 17.875 + ], + "uv_size": [ + 0.125, + 0.125 + ] + } + } + } + ] + }, + { + "name": "bone53", + "parent": "main2", + "pivot": [ + 0.00291, + -8.73721, + -11.33804 + ], + "rotation": [ + 0, + 0, + 22.5 + ], + "cubes": [ + { + "origin": [ + -0.15661, + -9.12232, + -12.22181 + ], + "size": [ + 0.31905, + 0.77022, + 0.8613 + ], + "uv": { + "north": { + "uv": [ + 1.75, + 18 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 1.75, + 18.125 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 1.75, + 18.375 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.15661, + -9.12232, + -12.22181 + ], + "size": [ + 0.31905, + 0.77022, + 0.8613 + ], + "pivot": [ + 0.00291, + -8.73721, + -11.79116 + ], + "rotation": [ + 0, + 0, + 45 + ], + "uv": { + "north": { + "uv": [ + 1.875, + 16.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 1.875, + 16.625 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 1.875, + 16.875 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.15661, + -9.12232, + -12.22181 + ], + "size": [ + 0.31905, + 0.77022, + 0.8613 + ], + "pivot": [ + 0.00291, + -8.73721, + -11.79116 + ], + "rotation": [ + 0, + 0, + -45 + ], + "uv": { + "north": { + "uv": [ + 1.875, + 16.875 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 1.875, + 17 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 1.875, + 17.25 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.15661, + -9.12232, + -12.22181 + ], + "size": [ + 0.31905, + 0.77022, + 0.8613 + ], + "pivot": [ + 0.00291, + -8.73721, + -11.79116 + ], + "rotation": [ + 0, + 0, + 90 + ], + "uv": { + "north": { + "uv": [ + 1.875, + 17.25 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 1.875, + 17.375 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 1.875, + 17.625 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + } + ] + }, + { + "name": "bone41", + "parent": "main2", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + 90, + 0, + 22.5 + ] + }, + { + "name": "bone42", + "parent": "bone41", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + -7.11224, + 180, + 0 + ], + "cubes": [ + { + "origin": [ + 2.4845, + -13.17593, + -10.78442 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + 2.80982, + -13.11581, + -10.72399 + ], + "rotation": [ + 0, + 0, + -2.93585 + ], + "uv": { + "north": { + "uv": [ + 1, + 17.5 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + 1.7826, + -13.18951, + -10.78442 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + 2.10793, + -13.12939, + -10.72399 + ], + "rotation": [ + 0, + 0, + 2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.125, + 17.5 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + 1.8328, + -13.40452, + -10.99973 + ], + "size": [ + 0.98729, + 5.72832, + 0.85292 + ], + "inflate": -0.27513, + "uv": { + "north": { + "uv": [ + 0, + 17.5 + ], + "uv_size": [ + 0.125, + 0.75 + ] + } + } + } + ] + }, + { + "name": "bone43", + "parent": "bone41", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + -7.11224, + 135, + 0 + ], + "cubes": [ + { + "origin": [ + -2.1625, + -13.17594, + -10.7845 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + -1.83717, + -13.11582, + -10.72408 + ], + "rotation": [ + 0, + 0, + -2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.25, + 17.5 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + -2.86439, + -13.18952, + -10.7845 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + -2.53906, + -13.1294, + -10.72408 + ], + "rotation": [ + 0, + 0, + 2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.375, + 17.5 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + -2.81419, + -13.40453, + -10.99981 + ], + "size": [ + 0.98729, + 5.72832, + 0.85292 + ], + "inflate": -0.27513, + "uv": { + "north": { + "uv": [ + 0.125, + 17.5 + ], + "uv_size": [ + 0.125, + 0.75 + ] + } + } + } + ] + }, + { + "name": "bone44", + "parent": "bone41", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + -7.11224, + 90, + 0 + ], + "cubes": [ + { + "origin": [ + -5.44848, + -12.7691, + -7.52392 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + -5.12315, + -12.70898, + -7.4635 + ], + "rotation": [ + 0, + 0, + -2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.5, + 17.5 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + -6.15037, + -12.78269, + -7.52392 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + -5.82504, + -12.72257, + -7.4635 + ], + "rotation": [ + 0, + 0, + 2.93585 + ], + "uv": { + "north": { + "uv": [ + 1, + 18.125 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + -6.10017, + -12.9977, + -7.73923 + ], + "size": [ + 0.98729, + 5.72832, + 0.85292 + ], + "inflate": -0.27513, + "uv": { + "north": { + "uv": [ + 0.25, + 17.5 + ], + "uv_size": [ + 0.125, + 0.75 + ] + } + } + } + ] + }, + { + "name": "bone45", + "parent": "bone41", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + -7.11224, + 45, + 0 + ], + "cubes": [ + { + "origin": [ + -5.44856, + -12.19374, + -2.91268 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + -5.12323, + -12.13362, + -2.85226 + ], + "rotation": [ + 0, + 0, + -2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.625, + 17.5 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + -6.15046, + -12.20733, + -2.91268 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + -5.82513, + -12.14721, + -2.85226 + ], + "rotation": [ + 0, + 0, + 2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.125, + 18.125 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + -6.10025, + -12.42233, + -3.12799 + ], + "size": [ + 0.98729, + 5.72832, + 0.85292 + ], + "inflate": -0.27513, + "uv": { + "north": { + "uv": [ + 0.375, + 17.5 + ], + "uv_size": [ + 0.125, + 0.75 + ] + } + } + } + ] + }, + { + "name": "bone46", + "parent": "bone41", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + -7.11224, + 0, + 0 + ], + "cubes": [ + { + "origin": [ + -2.1627, + -11.78689, + 0.34802 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + -1.83737, + -11.72677, + 0.40844 + ], + "rotation": [ + 0, + 0, + -2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.25, + 18.125 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + -2.86459, + -11.80048, + 0.34802 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + -2.53926, + -11.74036, + 0.40844 + ], + "rotation": [ + 0, + 0, + 2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.375, + 18.125 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + -2.81439, + -12.01549, + 0.13271 + ], + "size": [ + 0.98729, + 5.72832, + 0.85292 + ], + "inflate": -0.27513, + "uv": { + "north": { + "uv": [ + 0.5, + 17.5 + ], + "uv_size": [ + 0.125, + 0.75 + ] + } + } + } + ] + }, + { + "name": "bone47", + "parent": "bone41", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + -7.11224, + -45, + 0 + ], + "cubes": [ + { + "origin": [ + 2.4843, + -11.78688, + 0.3481 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + 2.80963, + -11.72676, + 0.40852 + ], + "rotation": [ + 0, + 0, + -2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.5, + 18.125 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + 1.7824, + -11.80047, + 0.3481 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + 2.10773, + -11.74035, + 0.40852 + ], + "rotation": [ + 0, + 0, + 2.93585 + ], + "uv": { + "north": { + "uv": [ + 1.625, + 18.125 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + 1.8326, + -12.01548, + 0.13279 + ], + "size": [ + 0.98729, + 5.72832, + 0.85292 + ], + "inflate": -0.27513, + "uv": { + "north": { + "uv": [ + 0.625, + 17.5 + ], + "uv_size": [ + 0.125, + 0.75 + ] + } + } + } + ] + }, + { + "name": "bone50", + "parent": "bone41", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + -7.11224, + -90, + 0 + ], + "cubes": [ + { + "origin": [ + 5.77028, + -12.19372, + -2.91248 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + 6.09561, + -12.1336, + -2.85206 + ], + "rotation": [ + 0, + 0, + -2.93585 + ], + "uv": { + "north": { + "uv": [ + 0, + 18.25 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + 5.06838, + -12.2073, + -2.91248 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + 5.39371, + -12.14718, + -2.85206 + ], + "rotation": [ + 0, + 0, + 2.93585 + ], + "uv": { + "north": { + "uv": [ + 0.125, + 18.25 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + 5.11858, + -12.42231, + -3.12779 + ], + "size": [ + 0.98729, + 5.72832, + 0.85292 + ], + "inflate": -0.27513, + "uv": { + "north": { + "uv": [ + 0.75, + 17.5 + ], + "uv_size": [ + 0.125, + 0.75 + ] + } + } + } + ] + }, + { + "name": "bone51", + "parent": "bone41", + "pivot": [ + 0.00285, + -14.80905, + -3.68382 + ], + "rotation": [ + -7.11224, + -135, + 0 + ], + "cubes": [ + { + "origin": [ + 5.77036, + -12.76908, + -7.52372 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + 6.09569, + -12.70896, + -7.4633 + ], + "rotation": [ + 0, + 0, + -2.93585 + ], + "uv": { + "north": { + "uv": [ + 0.25, + 18.25 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + 5.06847, + -12.78266, + -7.52372 + ], + "size": [ + 0.38545, + 5.2915, + 0.4223 + ], + "inflate": -0.06012, + "pivot": [ + 5.39379, + -12.72254, + -7.4633 + ], + "rotation": [ + 0, + 0, + 2.93585 + ], + "uv": { + "north": { + "uv": [ + 0.375, + 18.25 + ], + "uv_size": [ + 0.125, + 0.625 + ] + } + } + }, + { + "origin": [ + 5.11866, + -12.99767, + -7.73903 + ], + "size": [ + 0.98729, + 5.72832, + 0.85292 + ], + "inflate": -0.27513, + "uv": { + "north": { + "uv": [ + 0.875, + 17.5 + ], + "uv_size": [ + 0.125, + 0.75 + ] + } + } + } + ] + }, + { + "name": "bone52", + "parent": "main2", + "pivot": [ + 0.00285, + -8.73718, + -0.52753 + ], + "cubes": [ + { + "origin": [ + -5.70536, + -9.90417, + -1.01091 + ], + "size": [ + 14.99101, + 2.33397, + 0.96676 + ], + "pivot": [ + 0.00285, + -8.73719, + -0.52753 + ], + "rotation": [ + 0, + -90, + 67.5 + ], + "uv": { + "west": { + "uv": [ + 0.5, + 18.25 + ], + "uv_size": [ + 0.125, + 0.25 + ] + }, + "up": { + "uv": [ + 0, + 16.5 + ], + "uv_size": [ + 1.875, + 0.125 + ] + }, + "down": { + "uv": [ + 0, + 16.75 + ], + "uv_size": [ + 1.875, + -0.125 + ] + } + } + }, + { + "origin": [ + -39.7019, + 13.02951, + 17.66184 + ], + "size": [ + 14.99101, + 2.33397, + 0.96676 + ], + "pivot": [ + -25.5532, + -9.22684, + 7.91296 + ], + "rotation": [ + 0, + -90, + 112.5 + ], + "uv": { + "west": { + "uv": [ + 0.625, + 18.25 + ], + "uv_size": [ + 0.125, + 0.25 + ] + }, + "up": { + "uv": [ + 0, + 16.75 + ], + "uv_size": [ + 1.875, + 0.125 + ] + }, + "down": { + "uv": [ + 0, + 17 + ], + "uv_size": [ + 1.875, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.0505, + -9.07413, + 8.50406 + ], + "size": [ + 0.02178, + 0.5742, + 0.5742 + ], + "pivot": [ + -0.01461, + -8.78703, + 8.79116 + ], + "rotation": [ + 0, + -90, + 67.5 + ], + "uv": { + "north": { + "uv": [ + 1.875, + 17.625 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "south": { + "uv": [ + 1.875, + 17.75 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "west": { + "uv": [ + 1.875, + 17.875 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 1.875, + 18 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 1.875, + 18.25 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.0505, + -9.8144, + 8.42574 + ], + "size": [ + 0.02177, + 0.43065, + 0.43065 + ], + "pivot": [ + -0.01461, + -8.78703, + 8.79116 + ], + "rotation": [ + 0, + -90, + 67.5 + ], + "uv": { + "north": { + "uv": [ + 1.75, + 18.375 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "south": { + "uv": [ + 1.875, + 18.25 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "west": { + "uv": [ + 1.875, + 18.375 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 2, + 16.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 2, + 16.75 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.0505, + -9.1607, + 7.77205 + ], + "size": [ + 0.02178, + 0.43065, + 0.43065 + ], + "pivot": [ + -0.01461, + -8.78703, + 8.79116 + ], + "rotation": [ + 0, + -90, + 67.5 + ], + "uv": { + "north": { + "uv": [ + 2, + 16.75 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "south": { + "uv": [ + 2, + 16.875 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "west": { + "uv": [ + 0.5, + 18.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 2, + 17 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 0.625, + 18.625 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.0505, + -8.12434, + 8.80842 + ], + "size": [ + 0.02177, + 0.43065, + 0.43065 + ], + "pivot": [ + -0.01461, + -8.78703, + 8.79116 + ], + "rotation": [ + 0, + -90, + 67.5 + ], + "uv": { + "north": { + "uv": [ + 2, + 17.125 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "south": { + "uv": [ + 0.75, + 18.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "west": { + "uv": [ + 2, + 17.25 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 0.875, + 18.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 2, + 17.5 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.0505, + -8.77803, + 9.46211 + ], + "size": [ + 0.02178, + 0.43065, + 0.43065 + ], + "pivot": [ + -0.01461, + -8.78703, + 8.79116 + ], + "rotation": [ + 0, + -90, + 67.5 + ], + "uv": { + "north": { + "uv": [ + 2, + 17.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "south": { + "uv": [ + 2, + 17.625 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "west": { + "uv": [ + 2, + 17.75 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 2, + 17.875 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 2, + 18.125 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.0527, + -8.71741, + 8.42473 + ], + "size": [ + 0.02177, + 0.43065, + 0.43065 + ], + "pivot": [ + -0.01681, + -9.21973, + 8.79116 + ], + "rotation": [ + 0, + -90, + 67.5 + ], + "uv": { + "north": { + "uv": [ + 2, + 18.125 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "south": { + "uv": [ + 1.75, + 18.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "west": { + "uv": [ + 2, + 18.25 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 1.875, + 18.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 2, + 18.5 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -0.0527, + -9.81773, + 9.52504 + ], + "size": [ + 0.02177, + 0.43065, + 0.43065 + ], + "pivot": [ + -0.01681, + -9.21973, + 8.79116 + ], + "rotation": [ + 0, + -90, + 67.5 + ], + "uv": { + "north": { + "uv": [ + 2, + 18.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "south": { + "uv": [ + 2.125, + 16.5 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "west": { + "uv": [ + 2.125, + 16.625 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "up": { + "uv": [ + 2.125, + 16.75 + ], + "uv_size": [ + 0.125, + 0.125 + ] + }, + "down": { + "uv": [ + 2.125, + 17 + ], + "uv_size": [ + 0.125, + -0.125 + ] + } + } + }, + { + "origin": [ + -39.7019, + -0.16156, + -15.99376 + ], + "size": [ + 14.99101, + 2.33397, + 0.96676 + ], + "pivot": [ + -25.5532, + -9.22684, + 7.91296 + ], + "rotation": [ + 0, + -90, + 22.5 + ], + "uv": { + "west": { + "uv": [ + 0.75, + 18.25 + ], + "uv_size": [ + 0.125, + 0.25 + ] + }, + "up": { + "uv": [ + 0, + 17 + ], + "uv_size": [ + 1.875, + 0.125 + ] + }, + "down": { + "uv": [ + 0, + 17.25 + ], + "uv_size": [ + 1.875, + -0.125 + ] + } + } + }, + { + "origin": [ + -39.7019, + -19.72131, + -16.36853 + ], + "size": [ + 14.99101, + 2.33397, + 0.96676 + ], + "pivot": [ + -25.5532, + -9.22684, + 7.91296 + ], + "rotation": [ + 0, + -90, + -22.5 + ], + "uv": { + "west": { + "uv": [ + 0.875, + 18.25 + ], + "uv_size": [ + 0.125, + 0.25 + ] + }, + "up": { + "uv": [ + 0, + 17.25 + ], + "uv_size": [ + 1.875, + 0.125 + ] + }, + "down": { + "uv": [ + 0, + 17.5 + ], + "uv_size": [ + 1.875, + -0.125 + ] + } + } + } + ] + }, + { + "name": "flare", + "parent": "rocket107", + "pivot": [ + 0, + -0.47857, + 0 + ], + "cubes": [ + { + "origin": [ + -16.75, + -0.45, + -0.75 + ], + "size": [ + 16, + 0, + 1.5 + ], + "uv": { + "up": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + }, + "down": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + } + } + }, + { + "origin": [ + -24.75, + -0.45, + -0.75 + ], + "size": [ + 24, + 0, + 1.5 + ], + "pivot": [ + 0, + 0, + 0 + ], + "rotation": [ + 0, + 90, + 0 + ], + "uv": { + "up": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + }, + "down": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + } + } + }, + { + "origin": [ + -16.75, + -0.45, + -0.75 + ], + "size": [ + 16, + 0, + 1.5 + ], + "pivot": [ + 0, + 0, + 0 + ], + "rotation": [ + 0, + 180, + 0 + ], + "uv": { + "up": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + }, + "down": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + } + } + }, + { + "origin": [ + -16, + 14.5, + -1 + ], + "size": [ + 32, + 0, + 2 + ], + "pivot": [ + 0, + 14.5, + 0 + ], + "rotation": [ + 135, + 0, + 90 + ], + "uv": { + "up": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + }, + "down": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + } + } + }, + { + "origin": [ + -16, + 14.5, + -1 + ], + "size": [ + 32, + 0, + 2 + ], + "pivot": [ + 0, + 14.5, + 0 + ], + "rotation": [ + -135, + 0, + 90 + ], + "uv": { + "up": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + }, + "down": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + } + } + }, + { + "origin": [ + -24.75, + -0.45, + -0.75 + ], + "size": [ + 24, + 0, + 1.5 + ], + "pivot": [ + 0, + 0, + 0 + ], + "rotation": [ + 0, + -90, + 0 + ], + "uv": { + "up": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + }, + "down": { + "uv": [ + 4.5, + 32 + ], + "uv_size": [ + -4.5, + -0.5 + ] + } + } + }, + { + "origin": [ + -2.75, + -0.45, + -2.75 + ], + "size": [ + 5.5, + 0, + 5.5 + ], + "pivot": [ + 0, + -0.45, + 0 + ], + "rotation": [ + 0, + -45, + 0 + ], + "uv": { + "up": { + "uv": [ + 0.5, + 32 + ], + "uv_size": [ + -0.5, + -0.5 + ] + }, + "down": { + "uv": [ + 0.5, + 32 + ], + "uv_size": [ + -0.5, + -0.5 + ] + } + } + }, + { + "origin": [ + -2.5, + 1.3, + -2.5 + ], + "size": [ + 5, + 0, + 5 + ], + "pivot": [ + 0, + 1.3, + 0 + ], + "rotation": [ + 90, + -45, + 0 + ], + "uv": { + "up": { + "uv": [ + 0.5, + 32 + ], + "uv_size": [ + -0.5, + -0.5 + ] + }, + "down": { + "uv": [ + 0.5, + 32 + ], + "uv_size": [ + -0.5, + -0.5 + ] + } + } + }, + { + "origin": [ + -2.5, + 1.3, + -2.5 + ], + "size": [ + 5, + 0, + 5 + ], + "pivot": [ + 0, + 1.3, + 0 + ], + "rotation": [ + 90, + 45, + 0 + ], + "uv": { + "up": { + "uv": [ + 0.5, + 32 + ], + "uv_size": [ + -0.5, + -0.5 + ] + }, + "down": { + "uv": [ + 0.5, + 32 + ], + "uv_size": [ + -0.5, + -0.5 + ] + } + } + } + ] + } + ] + } + ] +} \ 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 35759a8b4..2df087935 100644 --- a/src/main/resources/assets/superbwarfare/lang/en_us.json +++ b/src/main/resources/assets/superbwarfare/lang/en_us.json @@ -177,6 +177,9 @@ "item.superbwarfare.blu_43_mine": "BLU-43B DragonTooth", "item.superbwarfare.tm_62": "TM-62 Anti-tank Mine", "item.superbwarfare.small_rocket": "Small Caliber Rocket", + "item.superbwarfare.medium_rocket_ap": "Medium Caliber AP Rocket", + "item.superbwarfare.medium_rocket_he": "Medium Caliber HE Rocket", + "item.superbwarfare.medium_rocket_cm": "Medium Caliber HE Cluster Munitions Rocket", "item.superbwarfare.small_shell": "Small Caliber Shells", "des.superbwarfare.small_shell": "Suitable for 20mm ~ 40mm caliber weapons", "item.superbwarfare.wire_guide_missile": "Wire Guide Missile", @@ -477,6 +480,7 @@ "entity.superbwarfare.javelin_missile": "Javelin Missile", "entity.superbwarfare.small_cannon_shell": "Small Cannon Shell", "entity.superbwarfare.small_rocket": "Small Caliber Rocket", + "entity.superbwarfare.medium_rocket": "Medium Caliber Rocket", "entity.superbwarfare.flare_decoy": "Flare Decoy", "entity.superbwarfare.mortar": "Mortar", "entity.superbwarfare.target": "Target", diff --git a/src/main/resources/assets/superbwarfare/lang/zh_cn.json b/src/main/resources/assets/superbwarfare/lang/zh_cn.json index 3c517c47f..53a56abe8 100644 --- a/src/main/resources/assets/superbwarfare/lang/zh_cn.json +++ b/src/main/resources/assets/superbwarfare/lang/zh_cn.json @@ -177,6 +177,9 @@ "item.superbwarfare.blu_43_mine": "BLU-43蝴蝶雷", "item.superbwarfare.tm_62": "TM-62反坦克地雷", "item.superbwarfare.small_rocket": "小口径火箭弹", + "item.superbwarfare.medium_rocket_ap": "中口径穿甲火箭弹", + "item.superbwarfare.medium_rocket_he": "中口径高爆火箭弹", + "item.superbwarfare.medium_rocket_cm": "中口径集束火箭弹", "item.superbwarfare.small_shell": "小口径炮弹", "des.superbwarfare.small_shell": "适配20mm ~ 40mm口径武器", "item.superbwarfare.wire_guide_missile": "线控导弹", @@ -477,6 +480,7 @@ "entity.superbwarfare.javelin_missile": "标枪导弹", "entity.superbwarfare.small_cannon_shell": "小口径炮弹", "entity.superbwarfare.small_rocket": "小口径火箭弹", + "entity.superbwarfare.medium_rocket": "中口径火箭弹", "entity.superbwarfare.flare_decoy": "热诱弹", "entity.superbwarfare.mortar": "迫击炮", "entity.superbwarfare.target": "标靶", diff --git a/src/main/resources/assets/superbwarfare/textures/item/medium_rocket.png b/src/main/resources/assets/superbwarfare/textures/item/medium_rocket.png new file mode 100644 index 000000000..016d40b36 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/item/medium_rocket.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_ap.png b/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_ap.png new file mode 100644 index 000000000..ebf5f49d2 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_ap.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_cm.png b/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_cm.png new file mode 100644 index 000000000..57afe542e Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_cm.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_he.png b/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_he.png new file mode 100644 index 000000000..5d886ede4 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/item/medium_rocket_he.png differ