添加TM62反坦克地雷
This commit is contained in:
parent
32d029ca65
commit
658ffafa09
21 changed files with 1273 additions and 6 deletions
|
@ -0,0 +1,24 @@
|
|||
package com.atsuishio.superbwarfare.client.model.entity;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.atsuishio.superbwarfare.entity.Tm62Entity;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
||||
public class Tm62Model extends GeoModel<Tm62Entity> {
|
||||
|
||||
@Override
|
||||
public ResourceLocation getAnimationResource(Tm62Entity entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getModelResource(Tm62Entity entity) {
|
||||
return Mod.loc("geo/tm_62.geo.json");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getTextureResource(Tm62Entity entity) {
|
||||
return Mod.loc("textures/entity/tm_62.png");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.atsuishio.superbwarfare.client.model.item;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.atsuishio.superbwarfare.item.Tm62;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import software.bernie.geckolib.model.GeoModel;
|
||||
|
||||
public class Tm62ItemModel extends GeoModel<Tm62> {
|
||||
|
||||
@Override
|
||||
public ResourceLocation getAnimationResource(Tm62 animatable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getModelResource(Tm62 animatable) {
|
||||
return Mod.loc("geo/tm_62.geo.json");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getTextureResource(Tm62 animatable) {
|
||||
return Mod.loc("textures/entity/tm_62.png");
|
||||
}
|
||||
}
|
|
@ -62,9 +62,9 @@ public class PrismTankRenderer extends GeoEntityRenderer<PrismTankEntity> {
|
|||
Minecraft minecraft = Minecraft.getInstance();
|
||||
Frustum pCamera = minecraft.levelRenderer.getFrustum();
|
||||
|
||||
AABB aabb = animatable.getBoundingBoxForCulling().inflate(0.5);
|
||||
AABB aabb = animatable.getBoundingBoxForCulling().inflate(3);
|
||||
if (aabb.hasNaN() || aabb.getSize() == 0.0) {
|
||||
aabb = new AABB(animatable.getX() - 4.0, animatable.getY() - 3.0, animatable.getZ() - 4.0, animatable.getX() + 4.0, animatable.getY() + 3.0, animatable.getZ() + 4.0);
|
||||
aabb = new AABB(animatable.getX() - 5.0, animatable.getY() - 4.0, animatable.getZ() - 5.0, animatable.getX() + 5.0, animatable.getY() + 4.0, animatable.getZ() + 5.0);
|
||||
}
|
||||
|
||||
if (name.equals("root")) {
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package com.atsuishio.superbwarfare.client.renderer.entity;
|
||||
|
||||
import com.atsuishio.superbwarfare.client.model.entity.Tm62Model;
|
||||
import com.atsuishio.superbwarfare.entity.Tm62Entity;
|
||||
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 org.jetbrains.annotations.NotNull;
|
||||
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||
import software.bernie.geckolib.renderer.GeoEntityRenderer;
|
||||
|
||||
public class Tm62Renderer extends GeoEntityRenderer<Tm62Entity> {
|
||||
|
||||
public Tm62Renderer(EntityRendererProvider.Context renderManager) {
|
||||
super(renderManager, new Tm62Model());
|
||||
}
|
||||
|
||||
@Override
|
||||
public RenderType getRenderType(Tm62Entity animatable, ResourceLocation texture, MultiBufferSource bufferSource, float partialTick) {
|
||||
return RenderType.entityTranslucent(getTextureLocation(animatable));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preRender(PoseStack poseStack, Tm62Entity 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(Tm62Entity entityIn, float entityYaw, float partialTicks, PoseStack poseStack, @NotNull MultiBufferSource bufferIn, int packedLightIn) {
|
||||
poseStack.pushPose();
|
||||
poseStack.mulPose(Axis.YP.rotationDegrees(-Mth.lerp(partialTicks, entityIn.yRotO, entityIn.getYRot())));
|
||||
super.render(entityIn, entityYaw, partialTicks, poseStack, bufferIn, packedLightIn);
|
||||
poseStack.popPose();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.atsuishio.superbwarfare.client.renderer.item;
|
||||
|
||||
import com.atsuishio.superbwarfare.client.model.item.Tm62ItemModel;
|
||||
import com.atsuishio.superbwarfare.item.Tm62;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||
|
||||
public class Tm62ItemRenderer extends GeoItemRenderer<Tm62> {
|
||||
|
||||
public Tm62ItemRenderer() {
|
||||
super(new Tm62ItemModel());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getTextureLocation(Tm62 instance) {
|
||||
return super.getTextureLocation(instance);
|
||||
}
|
||||
}
|
|
@ -165,7 +165,7 @@ public class Blu43Entity extends Entity implements GeoEntity, OwnableEntity {
|
|||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
if (this.tickCount >= 20) {
|
||||
if (this.tickCount >= 20 && onGround()) {
|
||||
touchEntity();
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ public class Blu43Entity extends Entity implements GeoEntity, OwnableEntity {
|
|||
}
|
||||
|
||||
public void shoot(double pX, double pY, double pZ, float pVelocity, float pInaccuracy) {
|
||||
Vec3 vec3 = (new Vec3(pX, pY, pZ)).normalize().add(this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy), this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy), this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy)).scale((double) pVelocity);
|
||||
Vec3 vec3 = (new Vec3(pX, pY, pZ)).normalize().add(this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy), this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy), this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy)).scale(pVelocity);
|
||||
this.setDeltaMovement(vec3);
|
||||
}
|
||||
}
|
259
src/main/java/com/atsuishio/superbwarfare/entity/Tm62Entity.java
Normal file
259
src/main/java/com/atsuishio/superbwarfare/entity/Tm62Entity.java
Normal file
|
@ -0,0 +1,259 @@
|
|||
package com.atsuishio.superbwarfare.entity;
|
||||
|
||||
import com.atsuishio.superbwarfare.config.server.ExplosionConfig;
|
||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||
import com.atsuishio.superbwarfare.init.ModEntities;
|
||||
import com.atsuishio.superbwarfare.init.ModItems;
|
||||
import com.atsuishio.superbwarfare.tools.CustomExplosion;
|
||||
import com.atsuishio.superbwarfare.tools.ParticleTool;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.network.syncher.EntityDataSerializers;
|
||||
import net.minecraft.network.syncher.SynchedEntityData;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.players.OldUsersConverter;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.damagesource.DamageTypes;
|
||||
import net.minecraft.world.entity.*;
|
||||
import net.minecraft.world.entity.decoration.HangingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.projectile.ThrownPotion;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.entity.EntityTypeTest;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.neoforged.neoforge.event.EventHooks;
|
||||
import net.neoforged.neoforge.items.ItemHandlerHelper;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import software.bernie.geckolib.animatable.GeoEntity;
|
||||
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
|
||||
import software.bernie.geckolib.animation.AnimatableManager;
|
||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
public class Tm62Entity extends Entity implements GeoEntity, OwnableEntity {
|
||||
|
||||
protected static final EntityDataAccessor<Optional<UUID>> OWNER_UUID = SynchedEntityData.defineId(Tm62Entity.class, EntityDataSerializers.OPTIONAL_UUID);
|
||||
protected static final EntityDataAccessor<String> LAST_ATTACKER_UUID = SynchedEntityData.defineId(Tm62Entity.class, EntityDataSerializers.STRING);
|
||||
public static final EntityDataAccessor<Float> HEALTH = SynchedEntityData.defineId(Tm62Entity.class, EntityDataSerializers.FLOAT);
|
||||
|
||||
public static final EntityDataAccessor<Boolean> FUSE = SynchedEntityData.defineId(Tm62Entity.class, EntityDataSerializers.BOOLEAN);
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
|
||||
public Tm62Entity(EntityType<Tm62Entity> type, Level world) {
|
||||
super(type, world);
|
||||
}
|
||||
|
||||
public Tm62Entity(LivingEntity owner, Level level, boolean fuse) {
|
||||
super(ModEntities.TM_62.get(), level);
|
||||
this.setOwnerUUID(owner.getUUID());
|
||||
this.entityData.set(FUSE, fuse);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void defineSynchedData(SynchedEntityData.Builder builder) {
|
||||
builder.define(OWNER_UUID, Optional.empty())
|
||||
.define(LAST_ATTACKER_UUID, "undefined")
|
||||
.define(FUSE, false)
|
||||
.define(HEALTH, 100f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPickable() {
|
||||
return !this.isRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hurt(DamageSource source, float amount) {
|
||||
if (source.getDirectEntity() instanceof ThrownPotion || source.getDirectEntity() instanceof AreaEffectCloud)
|
||||
return false;
|
||||
if (source.is(DamageTypes.FALL))
|
||||
return false;
|
||||
if (source.is(DamageTypes.CACTUS))
|
||||
return false;
|
||||
if (source.is(DamageTypes.DROWN))
|
||||
return false;
|
||||
if (source.is(DamageTypes.DRAGON_BREATH))
|
||||
return false;
|
||||
if (source.is(DamageTypes.WITHER))
|
||||
return false;
|
||||
if (source.is(DamageTypes.WITHER_SKULL))
|
||||
return false;
|
||||
if (source.is(ModDamageTypes.CUSTOM_EXPLOSION) || source.is(ModDamageTypes.MINE) || source.is(ModDamageTypes.PROJECTILE_BOOM) || source.is(DamageTypes.EXPLOSION)) {
|
||||
amount *= 0.02f;
|
||||
}
|
||||
if (source.getEntity() != null) {
|
||||
this.entityData.set(LAST_ATTACKER_UUID, source.getEntity().getStringUUID());
|
||||
}
|
||||
this.entityData.set(HEALTH, this.entityData.get(HEALTH) - amount);
|
||||
return super.hurt(source, amount);
|
||||
}
|
||||
|
||||
public void setOwnerUUID(@Nullable UUID pUuid) {
|
||||
this.entityData.set(OWNER_UUID, Optional.ofNullable(pUuid));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public UUID getOwnerUUID() {
|
||||
return this.entityData.get(OWNER_UUID).orElse(null);
|
||||
}
|
||||
|
||||
public boolean isOwnedBy(LivingEntity pEntity) {
|
||||
return pEntity == this.getOwner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAdditionalSaveData(CompoundTag compound) {
|
||||
compound.putFloat("Health", this.entityData.get(HEALTH));
|
||||
compound.putString("LastAttacker", this.entityData.get(LAST_ATTACKER_UUID));
|
||||
compound.putBoolean("Fuse", this.entityData.get(FUSE));
|
||||
if (this.getOwnerUUID() != null) {
|
||||
compound.putUUID("Owner", this.getOwnerUUID());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readAdditionalSaveData(CompoundTag compound) {
|
||||
if (compound.contains("Health")) {
|
||||
this.entityData.set(HEALTH, compound.getFloat("Health"));
|
||||
}
|
||||
|
||||
if (compound.contains("LastAttacker")) {
|
||||
this.entityData.set(LAST_ATTACKER_UUID, compound.getString("LastAttacker"));
|
||||
}
|
||||
|
||||
if (compound.contains("Fuse")) {
|
||||
this.entityData.set(FUSE, compound.getBoolean("Fuse"));
|
||||
}
|
||||
|
||||
UUID uuid;
|
||||
if (compound.hasUUID("Owner")) {
|
||||
uuid = compound.getUUID("Owner");
|
||||
} else {
|
||||
String s = compound.getString("Owner");
|
||||
|
||||
assert this.getServer() != null;
|
||||
uuid = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), s);
|
||||
}
|
||||
|
||||
if (uuid != null) {
|
||||
try {
|
||||
this.setOwnerUUID(uuid);
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ParametersAreNonnullByDefault
|
||||
public @NotNull InteractionResult interact(Player player, InteractionHand hand) {
|
||||
if (this.isOwnedBy(player) && player.isShiftKeyDown()) {
|
||||
if (!this.level().isClientSide()) {
|
||||
this.discard();
|
||||
}
|
||||
|
||||
if (!player.getAbilities().instabuild) {
|
||||
ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(ModItems.TM_62.get()));
|
||||
}
|
||||
}
|
||||
|
||||
return InteractionResult.sidedSuccess(this.level().isClientSide());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
if (this.tickCount >= 20 && onGround() && !entityData.get(FUSE)) {
|
||||
touchEntity();
|
||||
}
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().add(0.0, -0.03, 0.0));
|
||||
|
||||
if (!this.level().noCollision(this.getBoundingBox())) {
|
||||
this.moveTowardsClosestSpace(this.getX(), (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0, this.getZ());
|
||||
}
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
float f = 0.98F;
|
||||
if (this.onGround()) {
|
||||
BlockPos pos = this.getBlockPosBelowThatAffectsMyMovement();
|
||||
f = this.level().getBlockState(pos).getFriction(this.level(), pos, this) * 0.98F;
|
||||
}
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(f, 0.98, f));
|
||||
if (this.onGround()) {
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(1.0, -0.9, 1.0));
|
||||
}
|
||||
|
||||
if (entityData.get(FUSE) && this.level() instanceof ServerLevel serverLevel) {
|
||||
ParticleTool.sendParticle(serverLevel, ParticleTypes.SMOKE, this.xo, this.yo, this.zo,
|
||||
1, 0, 0, 0, 0.01, true);
|
||||
}
|
||||
|
||||
if (this.entityData.get(HEALTH) <= 0 || (entityData.get(FUSE) && tickCount >= 100)) {
|
||||
triggerExplode();
|
||||
}
|
||||
|
||||
this.refreshDimensions();
|
||||
}
|
||||
|
||||
public void touchEntity() {
|
||||
if (level() instanceof ServerLevel) {
|
||||
var frontBox = getBoundingBox().inflate(0.2);
|
||||
boolean trigger = false;
|
||||
|
||||
var entities = level().getEntities(EntityTypeTest.forClass(Entity.class), frontBox, entity -> entity != this && !(entity instanceof HangingEntity) && (entity.getBoundingBox().getSize() > 1.2 || (entity.getBoundingBox().getSize() > 0.9 && entity.getDeltaMovement().y() < -0.35))).stream().toList();
|
||||
|
||||
for (var entity : entities) {
|
||||
if (entity != null) {
|
||||
trigger = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (trigger) {
|
||||
triggerExplode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerExplode() {
|
||||
CustomExplosion explosion = new CustomExplosion(this.level(), this,
|
||||
ModDamageTypes.causeCustomExplosionDamage(this.level().registryAccess(), this, this.getOwner()), 450f,
|
||||
this.getX(), this.getEyeY(), this.getZ(), 13f, ExplosionConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP, true);
|
||||
explosion.explode();
|
||||
EventHooks.onExplosionStart(this.level(), explosion);
|
||||
explosion.finalizeExplosion(false);
|
||||
ParticleTool.spawnHugeExplosionParticles(this.level(), this.position());
|
||||
this.discard();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPushable() {
|
||||
return super.isPushable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
public void shoot(double pX, double pY, double pZ, float pVelocity, float pInaccuracy) {
|
||||
Vec3 vec3 = (new Vec3(pX, pY, pZ)).normalize().add(this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy), this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy), this.random.triangle(0.0, 0.0172275 * (double) pInaccuracy)).scale(pVelocity);
|
||||
this.setDeltaMovement(vec3);
|
||||
}
|
||||
}
|
|
@ -215,7 +215,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
|||
@Override
|
||||
public DamageModifier getDamageModifier() {
|
||||
return super.getDamageModifier()
|
||||
.custom((source, damage) -> getSourceAngle(source, 1f) * damage)
|
||||
.custom((source, damage) -> getSourceAngle(source, 0.5f) * damage)
|
||||
.custom((source, damage) -> {
|
||||
if (source.getDirectEntity() instanceof AerialBombEntity) {
|
||||
return 3f * damage;
|
||||
|
|
|
@ -45,6 +45,9 @@ public class ModEntities {
|
|||
|
||||
public static final DeferredHolder<EntityType<?>, EntityType<Blu43Entity>> BLU_43 = register("blu_43",
|
||||
EntityType.Builder.<Blu43Entity>of(Blu43Entity::new, MobCategory.MISC).setTrackingRange(32).setUpdateInterval(1).sized(0.12f, 0.05f));
|
||||
|
||||
public static final DeferredHolder<EntityType<?>, EntityType<Tm62Entity>> TM_62 = register("tm_62",
|
||||
EntityType.Builder.<Tm62Entity>of(Tm62Entity::new, MobCategory.MISC).setTrackingRange(32).setUpdateInterval(1).sized(0.5f, 0.15f));
|
||||
public static final DeferredHolder<EntityType<?>, EntityType<C4Entity>> C_4 = register("c4",
|
||||
EntityType.Builder.<C4Entity>of(C4Entity::new, MobCategory.MISC).setTrackingRange(64).setUpdateInterval(1).sized(0.5f, 0.5f));
|
||||
public static final DeferredHolder<EntityType<?>, EntityType<WaterMaskEntity>> WATER_MASK = register("water_mask",
|
||||
|
|
|
@ -54,5 +54,6 @@ public class ModEntityRenderers {
|
|||
event.registerEntityRenderer(ModEntities.MK_82.get(), Mk82Renderer::new);
|
||||
event.registerEntityRenderer(ModEntities.AGM_65.get(), Agm65Renderer::new);
|
||||
event.registerEntityRenderer(ModEntities.BLU_43.get(), Blu43Renderer::new);
|
||||
event.registerEntityRenderer(ModEntities.TM_62.get(), Tm62Renderer::new);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ public class ModItems {
|
|||
public static final DeferredHolder<Item, HandGrenade> HAND_GRENADE = AMMO.register("hand_grenade", HandGrenade::new);
|
||||
public static final DeferredHolder<Item, RgoGrenade> RGO_GRENADE = AMMO.register("rgo_grenade", RgoGrenade::new);
|
||||
public static final DeferredHolder<Item, ClaymoreMine> CLAYMORE_MINE = AMMO.register("claymore_mine", ClaymoreMine::new);
|
||||
public static final DeferredHolder<Item, Tm62> TM_62 = AMMO.register("tm_62", Tm62::new);
|
||||
public static final DeferredHolder<Item, C4Bomb> C4_BOMB = AMMO.register("c4_bomb", C4Bomb::new);
|
||||
public static final DeferredHolder<Item, Blu43Mine> BLU_43_MINE = AMMO.register("blu_43_mine", Blu43Mine::new);
|
||||
public static final DeferredHolder<Item, Item> SMALL_SHELL = AMMO.register("small_shell", SmallShellItem::new);
|
||||
|
@ -338,6 +339,7 @@ public class ModItems {
|
|||
DispenserBlock.registerBehavior(ROCKET_70.get(), new Rocket70.Rocket70DispenseBehavior());
|
||||
DispenserBlock.registerBehavior(MEDIUM_AERIAL_BOMB.get(), new MediumAerialBomb.MediumAerialBombDispenseBehavior());
|
||||
DispenserBlock.registerBehavior(RGO_GRENADE.get(), new RgoGrenade.RgoGrenadeDispenserBehavior());
|
||||
DispenserBlock.registerBehavior(TM_62.get(), new Tm62.Tm62DispenseBehavior());
|
||||
}
|
||||
|
||||
public static void register(IEventBus bus) {
|
||||
|
|
|
@ -45,7 +45,7 @@ public class Blu43Mine extends Item {
|
|||
stack.shrink(1);
|
||||
}
|
||||
|
||||
return InteractionResultHolder.consume(stack);
|
||||
return InteractionResultHolder.success(stack);
|
||||
}
|
||||
|
||||
public static class Blu43MineDispenseBehavior extends DefaultDispenseItemBehavior {
|
||||
|
|
112
src/main/java/com/atsuishio/superbwarfare/item/Tm62.java
Normal file
112
src/main/java/com/atsuishio/superbwarfare/item/Tm62.java
Normal file
|
@ -0,0 +1,112 @@
|
|||
package com.atsuishio.superbwarfare.item;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.atsuishio.superbwarfare.client.renderer.item.Tm62ItemRenderer;
|
||||
import com.atsuishio.superbwarfare.entity.Tm62Entity;
|
||||
import com.atsuishio.superbwarfare.init.ModEntities;
|
||||
import com.atsuishio.superbwarfare.init.ModItems;
|
||||
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Position;
|
||||
import net.minecraft.core.dispenser.BlockSource;
|
||||
import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.DispenserBlock;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.neoforge.client.extensions.common.IClientItemExtensions;
|
||||
import net.neoforged.neoforge.client.extensions.common.RegisterClientExtensionsEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.joml.Math;
|
||||
import software.bernie.geckolib.animatable.GeoItem;
|
||||
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
|
||||
import software.bernie.geckolib.animation.AnimatableManager;
|
||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
@EventBusSubscriber(modid = Mod.MODID, bus = EventBusSubscriber.Bus.MOD)
|
||||
public class Tm62 extends Item implements GeoItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
|
||||
public Tm62() {
|
||||
super(new Properties().stacksTo(8));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
private static void registerItemExtensions(RegisterClientExtensionsEvent event) {
|
||||
event.registerItem(new IClientItemExtensions() {
|
||||
|
||||
private final BlockEntityWithoutLevelRenderer renderer = new Tm62ItemRenderer();
|
||||
|
||||
@Override
|
||||
public @NotNull BlockEntityWithoutLevelRenderer getCustomRenderer() {
|
||||
return renderer;
|
||||
}
|
||||
}, ModItems.TM_62);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull InteractionResultHolder<ItemStack> use(Level level, Player player, @NotNull InteractionHand hand) {
|
||||
ItemStack stack = player.getItemInHand(hand);
|
||||
|
||||
if (!level.isClientSide) {
|
||||
float randomRot = (float) Mth.clamp((2 * Math.random() - 1) * 180, -180, 180);
|
||||
Tm62Entity entity = new Tm62Entity(player, level, player.isCrouching());
|
||||
entity.moveTo(player.getX(), player.getY() + 1.1, player.getZ(), randomRot, 0);
|
||||
entity.setYBodyRot(randomRot);
|
||||
entity.setYHeadRot(randomRot);
|
||||
entity.setDeltaMovement(0.5 * player.getLookAngle().x, 0.5 * player.getLookAngle().y, 0.5 * player.getLookAngle().z);
|
||||
|
||||
level.addFreshEntity(entity);
|
||||
}
|
||||
|
||||
player.getCooldowns().addCooldown(this, 20);
|
||||
|
||||
if (!player.getAbilities().instabuild) {
|
||||
stack.shrink(1);
|
||||
}
|
||||
|
||||
return InteractionResultHolder.success(stack);
|
||||
}
|
||||
|
||||
public static class Tm62DispenseBehavior extends DefaultDispenseItemBehavior {
|
||||
@Override
|
||||
@ParametersAreNonnullByDefault
|
||||
protected @NotNull ItemStack execute(BlockSource blockSource, ItemStack stack) {
|
||||
Level level = blockSource.level();
|
||||
Position position = DispenserBlock.getDispensePosition(blockSource);
|
||||
Direction direction = blockSource.state().getValue(DispenserBlock.FACING);
|
||||
|
||||
var tm62 = new Tm62Entity(ModEntities.TM_62.get(), level);
|
||||
tm62.setPos(position.x(), position.y(), position.z());
|
||||
float randomRot = (float) Mth.clamp((2 * Math.random() - 1) * 180, -180, 180);
|
||||
|
||||
var pX = direction.getStepX();
|
||||
var pY = direction.getStepY();
|
||||
var pZ = direction.getStepZ();
|
||||
tm62.shoot(pX, pY, pZ, 0.2f, 25);
|
||||
tm62.setYRot(randomRot);
|
||||
tm62.yRotO = tm62.getYRot();
|
||||
|
||||
level.addFreshEntity(tm62);
|
||||
stack.shrink(1);
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
}
|
628
src/main/resources/assets/superbwarfare/geo/tm_62.geo.json
Normal file
628
src/main/resources/assets/superbwarfare/geo/tm_62.geo.json
Normal file
|
@ -0,0 +1,628 @@
|
|||
{
|
||||
"format_version": "1.12.0",
|
||||
"minecraft:geometry": [
|
||||
{
|
||||
"description": {
|
||||
"identifier": "geometry.unknown",
|
||||
"texture_width": 32,
|
||||
"texture_height": 32,
|
||||
"visible_bounds_width": 2,
|
||||
"visible_bounds_height": 1.5,
|
||||
"visible_bounds_offset": [0, 0.25, 0]
|
||||
},
|
||||
"bones": [
|
||||
{
|
||||
"name": "bone1",
|
||||
"pivot": [0, 0, 0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-0.60041, 1.7625, -1.06191],
|
||||
"size": [0.075, 0.75, 0.75],
|
||||
"pivot": [-0.56291, 2.1375, -0.68691],
|
||||
"rotation": [-45, 0, -90],
|
||||
"uv": {
|
||||
"north": {"uv": [16, 12], "uv_size": [0.25, 0.5]},
|
||||
"south": {"uv": [13, 16], "uv_size": [0.25, 0.5]},
|
||||
"west": {"uv": [13, 9], "uv_size": [0.5, 0.5]},
|
||||
"up": {"uv": [16, 13], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [14, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.52459, 1.9875, -0.91191],
|
||||
"size": [0.075, 0.525, 0.525],
|
||||
"pivot": [0.56209, 2.1375, -0.53691],
|
||||
"rotation": [-45, 0, -90],
|
||||
"uv": {
|
||||
"north": {"uv": [6, 17], "uv_size": [0.25, 0.25]},
|
||||
"south": {"uv": [17, 6], "uv_size": [0.25, 0.25]},
|
||||
"west": {"uv": [7, 17], "uv_size": [0.25, 0.25]},
|
||||
"up": {"uv": [17, 7], "uv_size": [0.25, 0.25]},
|
||||
"down": {"uv": [8, 17.25], "uv_size": [0.25, -0.25]}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bone",
|
||||
"parent": "bone1",
|
||||
"pivot": [0, 0.75, 0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-1.48618, -2.35382, -0.765],
|
||||
"size": [1.5, 7.68, 1.53],
|
||||
"pivot": [0, 1.48618, 0],
|
||||
"rotation": [0, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [0, 0], "uv_size": [1, 5]},
|
||||
"west": {"uv": [1, 0], "uv_size": [1, 5]},
|
||||
"up": {"uv": [12, 6], "uv_size": [1, 1]},
|
||||
"down": {"uv": [12, 8], "uv_size": [1, -1]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-1.48618, -2.35382, -0.765],
|
||||
"size": [1.5, 7.68, 1.53],
|
||||
"pivot": [0, 1.48618, 0],
|
||||
"rotation": [22.5, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [2, 0], "uv_size": [1, 5]},
|
||||
"west": {"uv": [3, 0], "uv_size": [1, 5]},
|
||||
"up": {"uv": [8, 12], "uv_size": [1, 1]},
|
||||
"down": {"uv": [12, 9], "uv_size": [1, -1]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-1.48618, -2.35382, -0.765],
|
||||
"size": [1.5, 7.68, 1.53],
|
||||
"pivot": [0, 1.48618, 0],
|
||||
"rotation": [45, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [4, 0], "uv_size": [1, 5]},
|
||||
"west": {"uv": [0, 5], "uv_size": [1, 5]},
|
||||
"up": {"uv": [9, 12], "uv_size": [1, 1]},
|
||||
"down": {"uv": [12, 10], "uv_size": [1, -1]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-1.48618, -2.35382, -0.765],
|
||||
"size": [1.5, 7.68, 1.53],
|
||||
"pivot": [0, 1.48618, 0],
|
||||
"rotation": [67.5, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [5, 0], "uv_size": [1, 5]},
|
||||
"west": {"uv": [1, 5], "uv_size": [1, 5]},
|
||||
"up": {"uv": [12, 10], "uv_size": [1, 1]},
|
||||
"down": {"uv": [11, 13], "uv_size": [1, -1]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-1.48618, -2.35382, -0.765],
|
||||
"size": [1.5, 7.68, 1.53],
|
||||
"pivot": [0, 1.48618, 0],
|
||||
"rotation": [90, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [2, 5], "uv_size": [1, 5]},
|
||||
"west": {"uv": [3, 5], "uv_size": [1, 5]},
|
||||
"up": {"uv": [12, 11], "uv_size": [1, 1]},
|
||||
"down": {"uv": [12, 13], "uv_size": [1, -1]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-1.48618, -2.35382, -0.765],
|
||||
"size": [1.5, 7.68, 1.53],
|
||||
"pivot": [0, 1.48618, 0],
|
||||
"rotation": [112.5, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [4, 5], "uv_size": [1, 5]},
|
||||
"west": {"uv": [5, 5], "uv_size": [1, 5]},
|
||||
"up": {"uv": [13, 0], "uv_size": [1, 1]},
|
||||
"down": {"uv": [1, 14], "uv_size": [1, -1]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-1.48618, -2.35382, -0.765],
|
||||
"size": [1.5, 7.68, 1.53],
|
||||
"pivot": [0, 1.48618, 0],
|
||||
"rotation": [135, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [6, 0], "uv_size": [1, 5]},
|
||||
"west": {"uv": [6, 5], "uv_size": [1, 5]},
|
||||
"up": {"uv": [13, 1], "uv_size": [1, 1]},
|
||||
"down": {"uv": [2, 14], "uv_size": [1, -1]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-1.48618, -2.35382, -0.765],
|
||||
"size": [1.5, 7.68, 1.53],
|
||||
"pivot": [0, 1.48618, 0],
|
||||
"rotation": [157.5, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [7, 0], "uv_size": [1, 5]},
|
||||
"west": {"uv": [7, 5], "uv_size": [1, 5]},
|
||||
"up": {"uv": [13, 2], "uv_size": [1, 1]},
|
||||
"down": {"uv": [3, 14], "uv_size": [1, -1]}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bone2",
|
||||
"parent": "bone1",
|
||||
"pivot": [0, -2.25, 0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [0, -1.572, -0.612],
|
||||
"size": [0.225, 6.144, 1.224],
|
||||
"pivot": [0, 1.5, 0],
|
||||
"rotation": [0, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [8, 0], "uv_size": [0.75, 4]},
|
||||
"up": {"uv": [10, 13], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [13, 10.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, -1.572, -0.612],
|
||||
"size": [0.225, 6.144, 1.224],
|
||||
"pivot": [0, 1.5, 0],
|
||||
"rotation": [22.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [9, 8], "uv_size": [0.75, 4]},
|
||||
"up": {"uv": [16, 1], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [2, 16.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, -1.572, -0.612],
|
||||
"size": [0.225, 6.144, 1.224],
|
||||
"pivot": [0, 1.5, 0],
|
||||
"rotation": [45, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [8, 4], "uv_size": [0.75, 4]},
|
||||
"up": {"uv": [11, 13], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [13, 11.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, -1.572, -0.612],
|
||||
"size": [0.225, 6.144, 1.224],
|
||||
"pivot": [0, 1.5, 0],
|
||||
"rotation": [67.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [0, 10], "uv_size": [0.75, 4]},
|
||||
"up": {"uv": [16, 2], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [3, 16.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, -1.572, -0.612],
|
||||
"size": [0.225, 6.144, 1.224],
|
||||
"pivot": [0, 1.5, 0],
|
||||
"rotation": [90, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [8, 8], "uv_size": [0.75, 4]},
|
||||
"up": {"uv": [12, 13], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [13, 12.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, -1.572, -0.612],
|
||||
"size": [0.225, 6.144, 1.224],
|
||||
"pivot": [0, 1.5, 0],
|
||||
"rotation": [112.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [10, 0], "uv_size": [0.75, 4]},
|
||||
"up": {"uv": [16, 3], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [4, 16.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, -1.572, -0.612],
|
||||
"size": [0.225, 6.144, 1.224],
|
||||
"pivot": [0, 1.5, 0],
|
||||
"rotation": [135, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [9, 0], "uv_size": [0.75, 4]},
|
||||
"up": {"uv": [13, 13], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [0, 14.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, -1.572, -0.612],
|
||||
"size": [0.225, 6.144, 1.224],
|
||||
"pivot": [0, 1.5, 0],
|
||||
"rotation": [157.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [9, 4], "uv_size": [0.75, 4]},
|
||||
"up": {"uv": [16, 0], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [1, 16.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bone4",
|
||||
"parent": "bone1",
|
||||
"pivot": [0, 1.6125, 0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [0.12375, -0.08835, -0.3366],
|
||||
"size": [0.225, 3.3792, 0.6732],
|
||||
"pivot": [0, 1.60125, 0],
|
||||
"rotation": [0, 0, -90],
|
||||
"uv": {
|
||||
"up": {"uv": [16, 14], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [15, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.12375, -0.08835, -0.3366],
|
||||
"size": [0.225, 3.3792, 0.6732],
|
||||
"pivot": [0, 1.60125, 0],
|
||||
"rotation": [157.5, 0, -90],
|
||||
"uv": {
|
||||
"up": {"uv": [16, 15], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [16, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.12375, -0.08835, -0.3366],
|
||||
"size": [0.225, 3.3792, 0.6732],
|
||||
"pivot": [0, 1.60125, 0],
|
||||
"rotation": [135, 0, -90],
|
||||
"uv": {
|
||||
"up": {"uv": [0, 17], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [17, 0.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.12375, -0.08835, -0.3366],
|
||||
"size": [0.225, 3.3792, 0.6732],
|
||||
"pivot": [0, 1.60125, 0],
|
||||
"rotation": [112.5, 0, -90],
|
||||
"uv": {
|
||||
"up": {"uv": [1, 17], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [17, 1.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.12375, -0.08835, -0.3366],
|
||||
"size": [0.225, 3.3792, 0.6732],
|
||||
"pivot": [0, 1.60125, 0],
|
||||
"rotation": [90, 0, -90],
|
||||
"uv": {
|
||||
"up": {"uv": [2, 17], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [17, 2.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.12375, -0.08835, -0.3366],
|
||||
"size": [0.225, 3.3792, 0.6732],
|
||||
"pivot": [0, 1.60125, 0],
|
||||
"rotation": [67.5, 0, -90],
|
||||
"uv": {
|
||||
"up": {"uv": [3, 17], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [17, 3.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.12375, -0.08835, -0.3366],
|
||||
"size": [0.225, 3.3792, 0.6732],
|
||||
"pivot": [0, 1.60125, 0],
|
||||
"rotation": [45, 0, -90],
|
||||
"uv": {
|
||||
"up": {"uv": [4, 17], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [17, 4.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.12375, -0.08835, -0.3366],
|
||||
"size": [0.225, 3.3792, 0.6732],
|
||||
"pivot": [0, 1.60125, 0],
|
||||
"rotation": [22.5, 0, -90],
|
||||
"uv": {
|
||||
"up": {"uv": [5, 17], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [17, 5.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bone5",
|
||||
"parent": "bone1",
|
||||
"pivot": [0, 1.6125, 0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [0, 0.10092, -0.35343],
|
||||
"size": [0.15, 3.69816, 0.70686],
|
||||
"pivot": [0, 1.95, 0],
|
||||
"rotation": [0, 0, -90],
|
||||
"uv": {
|
||||
"north": {"uv": [13, 3], "uv_size": [0.25, 2.5]},
|
||||
"east": {"uv": [1, 10], "uv_size": [0.5, 2.5]},
|
||||
"south": {"uv": [4, 13], "uv_size": [0.25, 2.5]},
|
||||
"west": {"uv": [2, 10], "uv_size": [0.5, 2.5]},
|
||||
"up": {"uv": [16, 4], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [5, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, 0.17592, -0.35343],
|
||||
"size": [0.15, 3.54816, 0.70686],
|
||||
"pivot": [0, 1.95, 0],
|
||||
"rotation": [157.5, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [10, 7], "uv_size": [0.5, 2.25]},
|
||||
"west": {"uv": [10, 10], "uv_size": [0.5, 2.25]},
|
||||
"up": {"uv": [16, 5], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [6, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, 0.10092, -0.35343],
|
||||
"size": [0.15, 3.69816, 0.70686],
|
||||
"pivot": [0, 1.95, 0],
|
||||
"rotation": [135, 0, -90],
|
||||
"uv": {
|
||||
"north": {"uv": [5, 13], "uv_size": [0.25, 2.5]},
|
||||
"east": {"uv": [3, 10], "uv_size": [0.5, 2.5]},
|
||||
"south": {"uv": [6, 13], "uv_size": [0.25, 2.5]},
|
||||
"west": {"uv": [4, 10], "uv_size": [0.5, 2.5]},
|
||||
"up": {"uv": [16, 6], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [7, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, 0.17592, -0.35343],
|
||||
"size": [0.15, 3.54816, 0.70686],
|
||||
"pivot": [0, 1.95, 0],
|
||||
"rotation": [112.5, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [11, 0], "uv_size": [0.5, 2.25]},
|
||||
"west": {"uv": [11, 3], "uv_size": [0.5, 2.25]},
|
||||
"up": {"uv": [16, 7], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [8, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, 0.10092, -0.35343],
|
||||
"size": [0.15, 3.69816, 0.70686],
|
||||
"pivot": [0, 1.95, 0],
|
||||
"rotation": [90, 0, -90],
|
||||
"uv": {
|
||||
"north": {"uv": [13, 6], "uv_size": [0.25, 2.5]},
|
||||
"east": {"uv": [10, 4], "uv_size": [0.5, 2.5]},
|
||||
"south": {"uv": [7, 13], "uv_size": [0.25, 2.5]},
|
||||
"west": {"uv": [5, 10], "uv_size": [0.5, 2.5]},
|
||||
"up": {"uv": [16, 8], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [9, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, 0.17592, -0.35343],
|
||||
"size": [0.15, 3.54816, 0.70686],
|
||||
"pivot": [0, 1.95, 0],
|
||||
"rotation": [67.5, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [11, 6], "uv_size": [0.5, 2.25]},
|
||||
"west": {"uv": [11, 9], "uv_size": [0.5, 2.25]},
|
||||
"up": {"uv": [16, 9], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [10, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, 0.10092, -0.35343],
|
||||
"size": [0.15, 3.69816, 0.70686],
|
||||
"pivot": [0, 1.95, 0],
|
||||
"rotation": [45, 0, -90],
|
||||
"uv": {
|
||||
"north": {"uv": [8, 13], "uv_size": [0.25, 2.5]},
|
||||
"east": {"uv": [6, 10], "uv_size": [0.5, 2.5]},
|
||||
"south": {"uv": [9, 13], "uv_size": [0.25, 2.5]},
|
||||
"west": {"uv": [7, 10], "uv_size": [0.5, 2.5]},
|
||||
"up": {"uv": [16, 10], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [11, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0, 0.17592, -0.35343],
|
||||
"size": [0.15, 3.54816, 0.70686],
|
||||
"pivot": [0, 1.95, 0],
|
||||
"rotation": [22.5, 0, -90],
|
||||
"uv": {
|
||||
"east": {"uv": [12, 0], "uv_size": [0.5, 2.25]},
|
||||
"west": {"uv": [12, 3], "uv_size": [0.5, 2.25]},
|
||||
"up": {"uv": [16, 11], "uv_size": [0.25, 0.5]},
|
||||
"down": {"uv": [12, 16.5], "uv_size": [0.25, -0.5]}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bone3",
|
||||
"parent": "bone1",
|
||||
"pivot": [0.00379, -2.25, 0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [0.05399, -0.6074, -0.4896],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [0.09149, 1.7625, 1.20189],
|
||||
"rotation": [0, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [14, 0], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [1, 14], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [14, 1.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.05399, -0.15442, -0.3631],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [0.09149, 1.7625, 1.20189],
|
||||
"rotation": [22.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [2, 14], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [14, 2], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [3, 14.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.05399, 0.44653, 0.33687],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [0.09149, 1.7625, 1.20189],
|
||||
"rotation": [67.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [14, 3], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [14, 4], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [14, 5.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.05399, 0.21567, -0.07288],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [0.09149, 1.7625, 1.20189],
|
||||
"rotation": [45, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [14, 6], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [14, 7], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [14, 8.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.05399, 0.08629, 1.62685],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [0.09149, 1.7625, 1.20189],
|
||||
"rotation": [135, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [14, 9], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [10, 14], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [14, 10.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.05399, 0.50301, 0.80378],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [0.09149, 1.7625, 1.20189],
|
||||
"rotation": [90, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [11, 14], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [14, 11], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [12, 14.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.05399, 0.37651, 1.25676],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [0.09149, 1.7625, 1.20189],
|
||||
"rotation": [112.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [14, 12], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [13, 14], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [14, 13.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [0.05399, -0.32347, 1.85771],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [0.09149, 1.7625, 1.20189],
|
||||
"rotation": [157.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [14, 14], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [0, 15], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [15, 0.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-0.12899, -0.6074, -2.89339],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [-0.09149, 1.7625, -1.20189],
|
||||
"rotation": [-180, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [1, 15], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [15, 1], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [2, 15.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-0.12899, -0.15442, -2.76689],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [-0.09149, 1.7625, -1.20189],
|
||||
"rotation": [-157.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [15, 2], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [3, 15], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [15, 3.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-0.12899, 0.44653, -2.06691],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [-0.09149, 1.7625, -1.20189],
|
||||
"rotation": [-112.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [15, 4], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [15, 5], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [15, 6.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-0.12899, 0.21567, -2.47667],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [-0.09149, 1.7625, -1.20189],
|
||||
"rotation": [-135, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [15, 7], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [15, 8], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [15, 9.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-0.12899, 0.08629, -0.77693],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [-0.09149, 1.7625, -1.20189],
|
||||
"rotation": [-45, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [10, 15], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [15, 10], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [11, 15.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-0.12899, 0.50301, -1.6],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [-0.09149, 1.7625, -1.20189],
|
||||
"rotation": [-90, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [15, 11], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [12, 15], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [15, 12.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-0.12899, 0.37651, -1.14702],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [-0.09149, 1.7625, -1.20189],
|
||||
"rotation": [-67.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [13, 15], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [15, 13], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [14, 15.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
},
|
||||
{
|
||||
"origin": [-0.12899, -0.32347, -0.54608],
|
||||
"size": [0.075, 0.1152, 0.9792],
|
||||
"pivot": [-0.09149, 1.7625, -1.20189],
|
||||
"rotation": [-22.5, 0, -90],
|
||||
"uv": {
|
||||
"west": {"uv": [15, 14], "uv_size": [0.75, 0.25]},
|
||||
"up": {"uv": [15, 15], "uv_size": [0.25, 0.75]},
|
||||
"down": {"uv": [0, 16.75], "uv_size": [0.25, -0.75]}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -172,6 +172,7 @@
|
|||
"item.superbwarfare.javelin_missile": "Javelin Missile",
|
||||
"item.superbwarfare.lunge_mine": "Lunge Mine",
|
||||
"item.superbwarfare.blu_43_mine": "BLU-43B DragonTooth",
|
||||
"item.superbwarfare.tm_62": "TM-62 Anti-tank Mine",
|
||||
"item.superbwarfare.rocket_70": "70mm Rocket",
|
||||
"item.superbwarfare.small_shell": "Small Caliber Shells",
|
||||
"des.superbwarfare.small_shell": "Suitable for 20mm ~ 40mm caliber weapons",
|
||||
|
@ -484,6 +485,7 @@
|
|||
"entity.superbwarfare.agm_65": "AGM-65 Maverick",
|
||||
"entity.superbwarfare.dps_generator": "DPS Generator",
|
||||
"entity.superbwarfare.blu_43_mine": "BLU-43B DragonTooth",
|
||||
"entity.superbwarfare.tm_62": "TM-62 Anti-tank Mine",
|
||||
|
||||
"key.categories.superbwarfare": "Superb Warfare",
|
||||
"key.superbwarfare.hold_zoom": "Zoom (Hold)",
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
"item.superbwarfare.javelin_missile": "标枪导弹",
|
||||
"item.superbwarfare.lunge_mine": "突刺爆雷",
|
||||
"item.superbwarfare.blu_43_mine": "BLU-43蝴蝶雷",
|
||||
"item.superbwarfare.tm_62": "TM-62反坦克地雷",
|
||||
"item.superbwarfare.rocket_70": "70mm火箭弹",
|
||||
"item.superbwarfare.small_shell": "小口径炮弹",
|
||||
"des.superbwarfare.small_shell": "适配20mm ~ 40mm口径武器",
|
||||
|
@ -484,6 +485,7 @@
|
|||
"entity.superbwarfare.agm_65": "AGM-65 “小牛”空对地导弹",
|
||||
"entity.superbwarfare.dps_generator": "DPS发电机",
|
||||
"entity.superbwarfare.blu_43_mine": "BLU-43蝴蝶雷",
|
||||
"entity.superbwarfare.tm_62": "TM-62反坦克地雷",
|
||||
|
||||
"key.categories.superbwarfare": "卓越前线",
|
||||
"key.superbwarfare.hold_zoom": "瞄准(按住)",
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "builtin/entity",
|
||||
"texture_size": [
|
||||
32,
|
||||
32
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [
|
||||
0,
|
||||
0,
|
||||
-90
|
||||
],
|
||||
"translation": [
|
||||
-1.5,
|
||||
-1.75,
|
||||
-2.5
|
||||
]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [
|
||||
0,
|
||||
0,
|
||||
-90
|
||||
],
|
||||
"translation": [
|
||||
-1.5,
|
||||
-1.75,
|
||||
-2.5
|
||||
]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [
|
||||
70.72,
|
||||
-47.03,
|
||||
53.77
|
||||
],
|
||||
"translation": [
|
||||
-0.5,
|
||||
1.75,
|
||||
-0.75
|
||||
]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [
|
||||
70.72,
|
||||
-47.03,
|
||||
53.77
|
||||
],
|
||||
"translation": [
|
||||
-0.5,
|
||||
1.75,
|
||||
-0.75
|
||||
]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [
|
||||
0,
|
||||
-3.75,
|
||||
0
|
||||
]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [
|
||||
54.75,
|
||||
29.99,
|
||||
-35.27
|
||||
],
|
||||
"translation": [
|
||||
-0.75,
|
||||
-1,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
1.9,
|
||||
1.9,
|
||||
1.9
|
||||
]
|
||||
},
|
||||
"head": {
|
||||
"translation": [
|
||||
0,
|
||||
6.5,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [
|
||||
-90,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"scale": [
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"textures": {
|
||||
"particle": "item/tm_62"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "superbwarfare:displaysettings/tm_62.item",
|
||||
"textures": {
|
||||
"layer0": "superbwarfare:entity/tm_62"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"cac",
|
||||
"bbb",
|
||||
"bbb"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "minecraft:stone_pressure_plate"
|
||||
},
|
||||
"b": {
|
||||
"item": "superbwarfare:high_energy_explosives"
|
||||
},
|
||||
"c": {
|
||||
"item": "minecraft:green_concrete"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"id": "superbwarfare:tm_62",
|
||||
"count": 2
|
||||
}
|
||||
}
|
|
@ -102,6 +102,11 @@
|
|||
"Value": 2,
|
||||
"Source": "@superbwarfare:mortar_shell"
|
||||
},
|
||||
{
|
||||
"Type": "Multiply",
|
||||
"Value": 2.5,
|
||||
"Source": "@superbwarfare:tm_62"
|
||||
},
|
||||
{
|
||||
"Type": "Reduce",
|
||||
"Value": 9
|
||||
|
|
Loading…
Add table
Reference in a new issue