添加,调整部分配方,移除无人机加载区块能力,调整飞行载具坠机伤害
This commit is contained in:
parent
9ad35a82fa
commit
d0c4dcee56
8 changed files with 69 additions and 51 deletions
|
@ -459,6 +459,12 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
|
if (this.crash) {
|
||||||
|
crashPassengers();
|
||||||
|
} else {
|
||||||
|
explodePassengers();
|
||||||
|
}
|
||||||
|
|
||||||
if (level() instanceof ServerLevel) {
|
if (level() instanceof ServerLevel) {
|
||||||
CustomExplosion explosion = new CustomExplosion(this.level(), this,
|
CustomExplosion explosion = new CustomExplosion(this.level(), this,
|
||||||
ModDamageTypes.causeCustomExplosionDamage(this.level().registryAccess(), this, getAttacker()), 300.0f,
|
ModDamageTypes.causeCustomExplosionDamage(this.level().registryAccess(), this, getAttacker()), 300.0f,
|
||||||
|
@ -468,12 +474,6 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
explosion.finalizeExplosion(false);
|
explosion.finalizeExplosion(false);
|
||||||
ParticleTool.spawnHugeExplosionParticles(this.level(), this.position());
|
ParticleTool.spawnHugeExplosionParticles(this.level(), this.position());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.crash) {
|
|
||||||
crashPassengers();
|
|
||||||
} else {
|
|
||||||
explodePassengers();
|
|
||||||
}
|
|
||||||
this.discard();
|
this.discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
import com.atsuishio.superbwarfare.item.Monitor;
|
import com.atsuishio.superbwarfare.item.Monitor;
|
||||||
import com.atsuishio.superbwarfare.item.common.ammo.MortarShell;
|
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.CustomExplosion;
|
||||||
import com.atsuishio.superbwarfare.tools.EntityFindUtil;
|
import com.atsuishio.superbwarfare.tools.EntityFindUtil;
|
||||||
import com.atsuishio.superbwarfare.tools.ParticleTool;
|
import com.atsuishio.superbwarfare.tools.ParticleTool;
|
||||||
|
@ -198,11 +197,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
|
|
||||||
setZRot(getRoll() * 0.9f);
|
setZRot(getRoll() * 0.9f);
|
||||||
|
|
||||||
if (this.level() instanceof ServerLevel serverLevel) {
|
|
||||||
// 更新需要加载的区块
|
|
||||||
ChunkLoadTool.updateLoadedChunks(serverLevel, this, this.loadedChunks);
|
|
||||||
}
|
|
||||||
|
|
||||||
lastTickSpeed = this.getDeltaMovement().length();
|
lastTickSpeed = this.getDeltaMovement().length();
|
||||||
lastTickVerticalSpeed = this.getDeltaMovement().y;
|
lastTickVerticalSpeed = this.getDeltaMovement().y;
|
||||||
|
|
||||||
|
@ -214,7 +208,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
|
|
||||||
if (!this.onGround()) {
|
if (!this.onGround()) {
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
handleSimulationDistance(controller);
|
|
||||||
ItemStack stack = controller.getMainHandItem();
|
ItemStack stack = controller.getMainHandItem();
|
||||||
if (stack.is(ModItems.MONITOR.get()) && stack.getOrCreateTag().getBoolean("Using")) {
|
if (stack.is(ModItems.MONITOR.get()) && stack.getOrCreateTag().getBoolean("Using")) {
|
||||||
if (controller.level().isClientSide) {
|
if (controller.level().isClientSide) {
|
||||||
|
@ -266,25 +259,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
this.refreshDimensions();
|
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) {
|
private void droneDrop(Player player) {
|
||||||
Level level = player.level();
|
Level level = player.level();
|
||||||
|
@ -647,14 +621,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRemovedFromWorld() {
|
|
||||||
if (this.level() instanceof ServerLevel serverLevel) {
|
|
||||||
ChunkLoadTool.unloadAllChunks(serverLevel, this, this.loadedChunks);
|
|
||||||
}
|
|
||||||
super.onRemovedFromWorld();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canCrushEntities() {
|
public boolean canCrushEntities() {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -298,6 +298,13 @@ public class Tom6Entity extends MobileVehicleEntity implements GeoEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
|
|
||||||
|
if (this.crash) {
|
||||||
|
crashPassengers();
|
||||||
|
} else {
|
||||||
|
explodePassengers();
|
||||||
|
}
|
||||||
|
|
||||||
if (level() instanceof ServerLevel) {
|
if (level() instanceof ServerLevel) {
|
||||||
if (entityData.get(MELON)) {
|
if (entityData.get(MELON)) {
|
||||||
CustomExplosion explosion = new CustomExplosion(this.level(), this,
|
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();
|
this.discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"type": "create:crushing",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:iron_ingot"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"processingTime": 150,
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"count": 1,
|
||||||
|
"item": "superbwarfare:iron_powder"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"type": "create:crushing",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"tag": "forge:ingots/tungsten"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"processingTime": 150,
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"count": 1,
|
||||||
|
"item": "superbwarfare:tungsten_powder"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -22,6 +22,6 @@
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"item": "superbwarfare:armor_plate",
|
"item": "superbwarfare:armor_plate",
|
||||||
"count": 2
|
"count": 4
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
"category": "misc",
|
"category": "misc",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"aba",
|
"aba",
|
||||||
"cdc",
|
"cbc",
|
||||||
" e "
|
" e "
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
|
@ -11,14 +11,11 @@
|
||||||
"item": "minecraft:copper_ingot"
|
"item": "minecraft:copper_ingot"
|
||||||
},
|
},
|
||||||
"b": {
|
"b": {
|
||||||
"item": "minecraft:hopper"
|
"item": "superbwarfare:grain"
|
||||||
},
|
},
|
||||||
"c": {
|
"c": {
|
||||||
"item": "minecraft:iron_ingot"
|
"item": "minecraft:iron_ingot"
|
||||||
},
|
},
|
||||||
"d": {
|
|
||||||
"item": "superbwarfare:grain"
|
|
||||||
},
|
|
||||||
"e": {
|
"e": {
|
||||||
"item": "minecraft:firework_rocket"
|
"item": "minecraft:firework_rocket"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue