补充掉落表

This commit is contained in:
GaLi 2025-08-23 22:30:44 +08:00
parent f3b8bdc235
commit 4ca02b923c
9 changed files with 102 additions and 2 deletions

View File

@ -3,6 +3,8 @@ package com.extendedae_plus.hooks;
import appeng.util.InteractionUtil; import appeng.util.InteractionUtil;
import com.extendedae_plus.ExtendedAEPlus; import com.extendedae_plus.ExtendedAEPlus;
import com.extendedae_plus.content.wireless.WirelessTransceiverBlockEntity; import com.extendedae_plus.content.wireless.WirelessTransceiverBlockEntity;
import appeng.block.crafting.CraftingUnitBlock;
import appeng.blockentity.crafting.CraftingBlockEntity;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource; import net.minecraft.sounds.SoundSource;
@ -61,6 +63,28 @@ public final class WrenchHook {
event.setCanceled(true); event.setCanceled(true);
event.setCancellationResult(InteractionResult.sidedSuccess(level.isClientSide)); event.setCancellationResult(InteractionResult.sidedSuccess(level.isClientSide));
} }
// AE2 并行处理器系列CraftingUnitBlock潜行扳手拆除直接入背包
else {
var pos = hit.getBlockPos();
BlockState state = level.getBlockState(pos);
if (state.getBlock() instanceof CraftingUnitBlock) {
if (!level.isClientSide) {
var drops = Block.getDrops(state, (net.minecraft.server.level.ServerLevel) level, pos, level.getBlockEntity(pos), player, stack);
for (var item : drops) {
player.getInventory().placeItemBackInInventory(item);
}
}
level.playSound(player, hit.getBlockPos(), SoundEvents.ITEM_FRAME_REMOVE_ITEM, SoundSource.BLOCKS, 0.7F, 1.0F);
state.getBlock().playerWillDestroy(level, pos, state, player);
level.removeBlock(pos, false);
state.getBlock().destroy(level, pos, state);
event.setCanceled(true);
event.setCancellationResult(InteractionResult.sidedSuccess(level.isClientSide));
}
}
} else if (!InteractionUtil.isInAlternateUseMode(player) && InteractionUtil.canWrenchRotate(stack)) { } else if (!InteractionUtil.isInAlternateUseMode(player) && InteractionUtil.canWrenchRotate(stack)) {
// 未潜行 + 扳手切换锁定状态 // 未潜行 + 扳手切换锁定状态
BlockEntity be = level.getBlockEntity(hit.getBlockPos()); BlockEntity be = level.getBlockEntity(hit.getBlockPos());

View File

@ -66,7 +66,7 @@ public abstract class PatternProviderScreenMixin<C extends PatternProviderMenu>
boolean enabled = eap$AdvancedBlockingEnabled; boolean enabled = eap$AdvancedBlockingEnabled;
var title = net.minecraft.network.chat.Component.literal("智能阻挡"); var title = net.minecraft.network.chat.Component.literal("智能阻挡");
var line = enabled var line = enabled
? net.minecraft.network.chat.Component.literal("已启用:对于同一种配方将不再阻挡") ? net.minecraft.network.chat.Component.literal("已启用:对于同一种配方将不再阻挡(需要开启原版的阻挡模式)")
: net.minecraft.network.chat.Component.literal("已禁用:这么好的功能为什么不打开呢"); : net.minecraft.network.chat.Component.literal("已禁用:这么好的功能为什么不打开呢");
return java.util.List.of(title, line); return java.util.List.of(title, line);
} }

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{ "type": "minecraft:item", "name": "extendedae_plus:1024x_crafting_accelerator" }
],
"conditions": [ { "condition": "minecraft:survives_explosion" } ]
}
]
}

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{ "type": "minecraft:item", "name": "extendedae_plus:16x_crafting_accelerator" }
],
"conditions": [ { "condition": "minecraft:survives_explosion" } ]
}
]
}

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{ "type": "minecraft:item", "name": "extendedae_plus:256x_crafting_accelerator" }
],
"conditions": [ { "condition": "minecraft:survives_explosion" } ]
}
]
}

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{ "type": "minecraft:item", "name": "extendedae_plus:4x_crafting_accelerator" }
],
"conditions": [ { "condition": "minecraft:survives_explosion" } ]
}
]
}

View File

@ -0,0 +1,12 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{ "type": "minecraft:item", "name": "extendedae_plus:64x_crafting_accelerator" }
],
"conditions": [ { "condition": "minecraft:survives_explosion" } ]
}
]
}

View File

@ -1,6 +1,11 @@
{ {
"replace": false, "replace": false,
"values": [ "values": [
"extendedae_plus:wireless_transceiver" "extendedae_plus:wireless_transceiver",
"extendedae_plus:4x_crafting_accelerator",
"extendedae_plus:16x_crafting_accelerator",
"extendedae_plus:64x_crafting_accelerator",
"extendedae_plus:256x_crafting_accelerator",
"extendedae_plus:1024x_crafting_accelerator"
] ]
} }

View File

@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"extendedae_plus:wireless_transceiver",
"extendedae_plus:4x_crafting_accelerator",
"extendedae_plus:16x_crafting_accelerator",
"extendedae_plus:64x_crafting_accelerator",
"extendedae_plus:256x_crafting_accelerator",
"extendedae_plus:1024x_crafting_accelerator"
]
}