Compare commits
3 commits
5465ec47c2
...
4c4b5d4a64
Author | SHA1 | Date | |
---|---|---|---|
4c4b5d4a64 | |||
6f437212ce | |||
448f3965e7 |
15 changed files with 38 additions and 137 deletions
|
@ -162,6 +162,13 @@ dependencies {
|
|||
runtimeOnly "mezz.jei:jei-${minecraft_version}-neoforge:${jei_version}"
|
||||
implementation "curse.maven:jade-324717:6291517"
|
||||
|
||||
// FTB Chunks integration
|
||||
runtimeOnly("curse.maven:ftb-chunks-forge-314906:${ftbchunks_version}")
|
||||
runtimeOnly("curse.maven:architectury-api-419699:5786327")
|
||||
runtimeOnly("curse.maven:ftb-library-forge-404465:6711324")
|
||||
runtimeOnly("curse.maven:ftb-ranks-forge-314905:6431744")
|
||||
runtimeOnly("curse.maven:ftb-teams-forge-404468:6119437")
|
||||
|
||||
// 帕秋莉手册
|
||||
compileOnly "curse.maven:patchouli-306770:6164617"
|
||||
runtimeOnly "curse.maven:patchouli-306770:6164617"
|
||||
|
|
|
@ -22,3 +22,4 @@ mod_authors=Atsuishio, Roki27, Light_Quanta
|
|||
jei_version=19.21.0.247
|
||||
cloth_config_version=11.1.106
|
||||
jade_version=4681833
|
||||
ftbchunks_version=5448646
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_annihilator_blueprint": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "superbwarfare:annihilator_blueprint"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "superbwarfare:annihilator_blueprint"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_annihilator_blueprint"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"superbwarfare:annihilator_blueprint"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -103,11 +103,6 @@
|
|||
"type": "minecraft:item",
|
||||
"name": "superbwarfare:hpj_11_blueprint",
|
||||
"weight": 5
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "superbwarfare:annihilator_blueprint",
|
||||
"weight": 5
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
|
|
|
@ -198,10 +198,6 @@
|
|||
"type": "minecraft:item",
|
||||
"name": "superbwarfare:hpj_11_blueprint",
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "superbwarfare:annihilator_blueprint"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:diamond"
|
||||
},
|
||||
"C": {
|
||||
"item": "minecraft:lapis_lazuli"
|
||||
},
|
||||
"S": {
|
||||
"item": "superbwarfare:annihilator_blueprint"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"#S#",
|
||||
"#C#",
|
||||
"###"
|
||||
],
|
||||
"result": {
|
||||
"count": 2,
|
||||
"id": "superbwarfare:annihilator_blueprint"
|
||||
}
|
||||
}
|
|
@ -145,8 +145,7 @@ public class ModCustomLootProvider implements LootTableSubProvider {
|
|||
new ItemEntry(ModItems.AURELIA_SCEPTRE_BLUEPRINT.get(), 2),
|
||||
new ItemEntry(ModItems.MK_42_BLUEPRINT.get(), 3),
|
||||
new ItemEntry(ModItems.MLE_1934_BLUEPRINT.get(), 2),
|
||||
new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 2),
|
||||
new ItemEntry(ModItems.ANNIHILATOR_BLUEPRINT.get(), 1)
|
||||
new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 2)
|
||||
))
|
||||
.withPool(multiItems(2, 0,
|
||||
new ItemEntry(ModItems.HANDGUN_AMMO_BOX.get(), 12)
|
||||
|
@ -190,8 +189,7 @@ public class ModCustomLootProvider implements LootTableSubProvider {
|
|||
new ItemEntry(ModItems.AURELIA_SCEPTRE_BLUEPRINT.get(), 10),
|
||||
new ItemEntry(ModItems.MK_42_BLUEPRINT.get(), 10),
|
||||
new ItemEntry(ModItems.MLE_1934_BLUEPRINT.get(), 10),
|
||||
new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 5),
|
||||
new ItemEntry(ModItems.ANNIHILATOR_BLUEPRINT.get(), 5)
|
||||
new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 5)
|
||||
))
|
||||
.withPool(multiItems(2, 0,
|
||||
new ItemEntry(ModItems.HANDGUN_AMMO_BOX.get(), 12)
|
||||
|
|
|
@ -190,7 +190,6 @@ public class ModRecipeProvider extends RecipeProvider {
|
|||
copyBlueprint(writer, ModItems.MK_42_BLUEPRINT.get());
|
||||
copyBlueprint(writer, ModItems.MLE_1934_BLUEPRINT.get());
|
||||
copyBlueprint(writer, ModItems.HPJ_11_BLUEPRINT.get());
|
||||
copyBlueprint(writer, ModItems.ANNIHILATOR_BLUEPRINT.get());
|
||||
}
|
||||
|
||||
public static void copyBlueprint(RecipeOutput writer, ItemLike result) {
|
||||
|
|
|
@ -425,7 +425,7 @@ public class C4Entity extends Entity implements GeoEntity, OwnableEntity {
|
|||
|
||||
CustomExplosion explosion = new CustomExplosion(level(), this,
|
||||
ModDamageTypes.causeProjectileBoomDamage(level().registryAccess(), this, this.getOwner()), ExplosionConfig.C4_EXPLOSION_DAMAGE.get(),
|
||||
pos.x, pos.y, pos.z, ExplosionConfig.C4_EXPLOSION_RADIUS.get(), ExplosionConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP, true).setDamageMultiplier(1);
|
||||
pos.x, pos.y, pos.z, ExplosionConfig.C4_EXPLOSION_RADIUS.get(), ExplosionConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP, true, true).setDamageMultiplier(1);
|
||||
explosion.explode();
|
||||
EventHooks.onExplosionStart(level(), explosion);
|
||||
ParticleTool.spawnHugeExplosionParticles(level(), position());
|
||||
|
|
|
@ -417,6 +417,7 @@ public abstract class VehicleEntity extends Entity {
|
|||
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
if (player.isShiftKeyDown() && stack.is(ModItems.CROWBAR.get()) && this.getPassengers().isEmpty()) {
|
||||
if (!(player instanceof ServerPlayer)) return InteractionResult.PASS;
|
||||
ItemStack container = ContainerBlockItem.createInstance(this);
|
||||
if (!player.addItem(container)) {
|
||||
player.drop(container, false);
|
||||
|
@ -435,6 +436,7 @@ public abstract class VehicleEntity extends Entity {
|
|||
}
|
||||
return InteractionResult.SUCCESS;
|
||||
} else if (!player.isShiftKeyDown()) {
|
||||
if (!(player instanceof ServerPlayer)) return InteractionResult.PASS;
|
||||
if (this.getFirstPassenger() == null) {
|
||||
if (player instanceof FakePlayer) return InteractionResult.PASS;
|
||||
setDriverAngle(player);
|
||||
|
|
|
@ -144,6 +144,7 @@ public class LivingEventHandler {
|
|||
if (armor != ItemStack.EMPTY && tag.contains("ArmorPlate")) {
|
||||
double armorValue = tag.getDouble("ArmorPlate");
|
||||
tag.putDouble("ArmorPlate", Math.max(armorValue - damage, 0));
|
||||
NBTTool.saveTag(armor, tag);
|
||||
damage = Math.max(damage - armorValue, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.neoforged.neoforge.network.handling.IPayloadContext;
|
|||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public record GunsDataMessage(List<DefaultGunData> data) implements CustomPacketPayload {
|
||||
|
@ -39,7 +40,8 @@ public record GunsDataMessage(List<DefaultGunData> data) implements CustomPacket
|
|||
}
|
||||
|
||||
public static void handler(final GunsDataMessage message, final IPayloadContext context) {
|
||||
GunsTool.gunsData.clear();
|
||||
// GunsTool.gunsData.clear();
|
||||
GunsTool.gunsData = new HashMap<>();
|
||||
|
||||
for (var entry : message.data) {
|
||||
if (GunsTool.gunsData.containsKey(entry.id)) continue;
|
||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraft.world.level.Level;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.level.material.FluidState;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.neoforged.neoforge.event.EventHooks;
|
||||
|
@ -44,11 +45,12 @@ public class CustomExplosion extends Explosion {
|
|||
private final float damage;
|
||||
private int fireTime;
|
||||
private float damageMultiplier;
|
||||
private boolean ignoreFluids;
|
||||
|
||||
public CustomExplosion(Level pLevel, @Nullable Entity pSource, @Nullable DamageSource source,
|
||||
@Nullable ExplosionDamageCalculator pDamageCalculator,
|
||||
float damage, double pToBlowX, double pToBlowY, double pToBlowZ, float pRadius,
|
||||
BlockInteraction pBlockInteraction, ParticleOptions smallParticle, ParticleOptions bigParticle, Holder<SoundEvent> sound) {
|
||||
BlockInteraction pBlockInteraction, ParticleOptions smallParticle, ParticleOptions bigParticle, Holder<SoundEvent> sound, boolean ignoreFluids) {
|
||||
super(pLevel, pSource, source, null, pToBlowX, pToBlowY, pToBlowZ, pRadius, false, pBlockInteraction, smallParticle, bigParticle, sound);
|
||||
|
||||
this.level = pLevel;
|
||||
|
@ -60,21 +62,26 @@ public class CustomExplosion extends Explosion {
|
|||
this.y = pToBlowY;
|
||||
this.z = pToBlowZ;
|
||||
this.damage = damage;
|
||||
this.ignoreFluids = ignoreFluids;
|
||||
}
|
||||
|
||||
public CustomExplosion(Level pLevel, @Nullable Entity pSource, @Nullable DamageSource source,
|
||||
@Nullable ExplosionDamageCalculator pDamageCalculator,
|
||||
float damage, double pToBlowX, double pToBlowY, double pToBlowZ, float pRadius,
|
||||
BlockInteraction pBlockInteraction) {
|
||||
this(pLevel, pSource, source, pDamageCalculator, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction, ParticleTypes.EXPLOSION, ParticleTypes.EXPLOSION_EMITTER, SoundEvents.GENERIC_EXPLODE);
|
||||
BlockInteraction pBlockInteraction, boolean ignoreFluids) {
|
||||
this(pLevel, pSource, source, pDamageCalculator, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction, ParticleTypes.EXPLOSION, ParticleTypes.EXPLOSION_EMITTER, SoundEvents.GENERIC_EXPLODE, ignoreFluids);
|
||||
}
|
||||
|
||||
public CustomExplosion(Level pLevel, @Nullable Entity pSource, float damage, double pToBlowX, double pToBlowY, double pToBlowZ, float pRadius, BlockInteraction pBlockInteraction) {
|
||||
this(pLevel, pSource, null, null, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction);
|
||||
this(pLevel, pSource, null, null, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction, false);
|
||||
}
|
||||
|
||||
public CustomExplosion(Level pLevel, @Nullable Entity pSource, @Nullable DamageSource source, float damage, double pToBlowX, double pToBlowY, double pToBlowZ, float pRadius, Explosion.BlockInteraction pBlockInteraction, boolean vanillaExplode) {
|
||||
this(pLevel, pSource, source, null, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction);
|
||||
this(pLevel, pSource, source, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction, false, false);
|
||||
}
|
||||
|
||||
public CustomExplosion(Level pLevel, @Nullable Entity pSource, @Nullable DamageSource source, float damage, double pToBlowX, double pToBlowY, double pToBlowZ, float pRadius, Explosion.BlockInteraction pBlockInteraction, boolean vanillaExplode, boolean ignoreFluids) {
|
||||
this(pLevel, pSource, source, null, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction, ignoreFluids);
|
||||
|
||||
if (pLevel instanceof ServerLevel && vanillaExplode) {
|
||||
pLevel.explode(source == null ? null : source.getEntity(), pToBlowX, pToBlowY, pToBlowZ, 0.4f * pRadius, ExplosionConfig.EXPLOSION_DESTROY.get() ? Level.ExplosionInteraction.BLOCK : Level.ExplosionInteraction.NONE);
|
||||
|
@ -84,13 +91,13 @@ public class CustomExplosion extends Explosion {
|
|||
}
|
||||
|
||||
public CustomExplosion(Level pLevel, @Nullable Entity pSource, @Nullable DamageSource source, float damage, double pToBlowX, double pToBlowY, double pToBlowZ, float pRadius, Explosion.BlockInteraction pBlockInteraction) {
|
||||
this(pLevel, pSource, source, null, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction);
|
||||
this(pLevel, pSource, source, null, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, pBlockInteraction, false);
|
||||
|
||||
ShakeClientMessage.sendToNearbyPlayers(level, pToBlowX, pToBlowY, pToBlowZ, 4 * radius, 5 + 0.02 * damage, 0.75 * pRadius, 4 + 0.02 * damage);
|
||||
}
|
||||
|
||||
public CustomExplosion(Level pLevel, @Nullable Entity pSource, @Nullable DamageSource source, float damage, double pToBlowX, double pToBlowY, double pToBlowZ, float pRadius) {
|
||||
this(pLevel, pSource, source, null, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, BlockInteraction.KEEP);
|
||||
this(pLevel, pSource, source, null, damage, pToBlowX, pToBlowY, pToBlowZ, pRadius, BlockInteraction.KEEP, false);
|
||||
|
||||
ShakeClientMessage.sendToNearbyPlayers(level, pToBlowX, pToBlowY, pToBlowZ, radius, 20 + 0.02 * damage, pRadius, 10 + 0.03 * damage);
|
||||
}
|
||||
|
@ -138,7 +145,12 @@ public class CustomExplosion extends Explosion {
|
|||
break;
|
||||
}
|
||||
|
||||
Optional<Float> optional = this.damageCalculator.getBlockExplosionResistance(this, this.level, blockpos, blockstate, fluidstate);
|
||||
Optional<Float> optional;
|
||||
if (this.ignoreFluids) {
|
||||
optional = this.damageCalculator.getBlockExplosionResistance(this, this.level, blockpos, blockstate, Fluids.EMPTY.defaultFluidState());
|
||||
} else {
|
||||
optional = this.damageCalculator.getBlockExplosionResistance(this, this.level, blockpos, blockstate, fluidstate);
|
||||
}
|
||||
if (optional.isPresent()) {
|
||||
f -= (optional.get() + 1F) * 0.3F;
|
||||
}
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"aaa",
|
||||
"bbb",
|
||||
"dce"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "minecraft:beacon"
|
||||
},
|
||||
"b": {
|
||||
"item": "superbwarfare:cannon_core"
|
||||
},
|
||||
"c": {
|
||||
"item": "superbwarfare:annihilator_blueprint"
|
||||
},
|
||||
"d": {
|
||||
"item": "minecraft:netherite_block"
|
||||
},
|
||||
"e": {
|
||||
"item": "superbwarfare:large_battery_pack"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"id": "superbwarfare:container",
|
||||
"components": {
|
||||
"minecraft:block_entity_data": {
|
||||
"id": "superbwarfare:container",
|
||||
"EntityType": "superbwarfare:annihilator"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"pattern": [
|
||||
"bbb",
|
||||
"bab",
|
||||
"bbb"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "superbwarfare:empty_perk"
|
||||
},
|
||||
"b": {
|
||||
"item": "superbwarfare:ancient_cpu"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"id": "superbwarfare:intelligent_chip",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue