添加,调整部分配方,移除无人机加载区块能力,调整飞行载具坠机伤害

This commit is contained in:
Atsuihsio 2025-03-09 02:05:23 +08:00
parent 9ad35a82fa
commit d0c4dcee56
8 changed files with 69 additions and 51 deletions

View file

@ -459,6 +459,12 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
@Override
public void destroy() {
if (this.crash) {
crashPassengers();
} else {
explodePassengers();
}
if (level() instanceof ServerLevel) {
CustomExplosion explosion = new CustomExplosion(this.level(), this,
ModDamageTypes.causeCustomExplosionDamage(this.level().registryAccess(), this, getAttacker()), 300.0f,
@ -468,12 +474,6 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
explosion.finalizeExplosion(false);
ParticleTool.spawnHugeExplosionParticles(this.level(), this.position());
}
if (this.crash) {
crashPassengers();
} else {
explodePassengers();
}
this.discard();
}

View file

@ -13,7 +13,6 @@ import com.atsuishio.superbwarfare.init.ModItems;
import com.atsuishio.superbwarfare.init.ModSounds;
import com.atsuishio.superbwarfare.item.Monitor;
import com.atsuishio.superbwarfare.item.common.ammo.MortarShell;
import com.atsuishio.superbwarfare.tools.ChunkLoadTool;
import com.atsuishio.superbwarfare.tools.CustomExplosion;
import com.atsuishio.superbwarfare.tools.EntityFindUtil;
import com.atsuishio.superbwarfare.tools.ParticleTool;
@ -198,11 +197,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
setZRot(getRoll() * 0.9f);
if (this.level() instanceof ServerLevel serverLevel) {
// 更新需要加载的区块
ChunkLoadTool.updateLoadedChunks(serverLevel, this, this.loadedChunks);
}
lastTickSpeed = this.getDeltaMovement().length();
lastTickVerticalSpeed = this.getDeltaMovement().y;
@ -214,7 +208,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
if (!this.onGround()) {
if (controller != null) {
handleSimulationDistance(controller);
ItemStack stack = controller.getMainHandItem();
if (stack.is(ModItems.MONITOR.get()) && stack.getOrCreateTag().getBoolean("Using")) {
if (controller.level().isClientSide) {
@ -266,25 +259,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
this.refreshDimensions();
}
public void handleSimulationDistance(Player player) {
if (player.level() instanceof ServerLevel serverLevel && player instanceof ServerPlayer) {
var distanceManager = serverLevel.getChunkSource().chunkMap.getDistanceManager();
var playerTicketManager = distanceManager.playerTicketManager;
int maxDistance = playerTicketManager.viewDistance;
if (this.position().vectorTo(player.position()).horizontalDistance() > maxDistance * 16) {
this.upInputDown = false;
this.downInputDown = false;
this.forwardInputDown = false;
this.backInputDown = false;
this.leftInputDown = false;
this.rightInputDown = false;
Vec3 toVec = position().vectorTo(player.position()).normalize();
setDeltaMovement(getDeltaMovement().add(new Vec3(toVec.x, 0, toVec.z).scale(0.2)));
}
}
}
private void droneDrop(Player player) {
Level level = player.level();
@ -647,14 +621,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
return this.cache;
}
@Override
public void onRemovedFromWorld() {
if (this.level() instanceof ServerLevel serverLevel) {
ChunkLoadTool.unloadAllChunks(serverLevel, this, this.loadedChunks);
}
super.onRemovedFromWorld();
}
@Override
public boolean canCrushEntities() {
return false;

View file

@ -298,6 +298,13 @@ public class Tom6Entity extends MobileVehicleEntity implements GeoEntity {
@Override
public void destroy() {
if (this.crash) {
crashPassengers();
} else {
explodePassengers();
}
if (level() instanceof ServerLevel) {
if (entityData.get(MELON)) {
CustomExplosion explosion = new CustomExplosion(this.level(), this,
@ -318,11 +325,6 @@ public class Tom6Entity extends MobileVehicleEntity implements GeoEntity {
}
}
if (this.crash) {
crashPassengers();
} else {
explodePassengers();
}
this.discard();
}

View file

@ -0,0 +1,15 @@
{
"type": "create:crushing",
"ingredients": [
{
"item": "minecraft:iron_ingot"
}
],
"processingTime": 150,
"results": [
{
"count": 1,
"item": "superbwarfare:iron_powder"
}
]
}

View file

@ -0,0 +1,15 @@
{
"type": "create:crushing",
"ingredients": [
{
"tag": "forge:ingots/tungsten"
}
],
"processingTime": 150,
"results": [
{
"count": 1,
"item": "superbwarfare:tungsten_powder"
}
]
}

View file

@ -0,0 +1,23 @@
{
"type": "create:mixing",
"ingredients": [
{
"item": "minecraft:gunpowder"
},
{
"item": "minecraft:gunpowder"
},
{
"tag": "forge:sand"
},
{
"item": "minecraft:sugar"
}
],
"results": [
{
"item": "superbwarfare:high_energy_explosives",
"count": 3
}
]
}

View file

@ -22,6 +22,6 @@
},
"result": {
"item": "superbwarfare:armor_plate",
"count": 2
"count": 4
}
}

View file

@ -3,7 +3,7 @@
"category": "misc",
"pattern": [
"aba",
"cdc",
"cbc",
" e "
],
"key": {
@ -11,14 +11,11 @@
"item": "minecraft:copper_ingot"
},
"b": {
"item": "minecraft:hopper"
"item": "superbwarfare:grain"
},
"c": {
"item": "minecraft:iron_ingot"
},
"d": {
"item": "superbwarfare:grain"
},
"e": {
"item": "minecraft:firework_rocket"
}