补充掉落表
This commit is contained in:
parent
f3b8bdc235
commit
4ca02b923c
|
|
@ -3,6 +3,8 @@ package com.extendedae_plus.hooks;
|
|||
import appeng.util.InteractionUtil;
|
||||
import com.extendedae_plus.ExtendedAEPlus;
|
||||
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.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
|
|
@ -61,6 +63,28 @@ public final class WrenchHook {
|
|||
event.setCanceled(true);
|
||||
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)) {
|
||||
// 未潜行 + 扳手:切换锁定状态
|
||||
BlockEntity be = level.getBlockEntity(hit.getBlockPos());
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public abstract class PatternProviderScreenMixin<C extends PatternProviderMenu>
|
|||
boolean enabled = eap$AdvancedBlockingEnabled;
|
||||
var title = net.minecraft.network.chat.Component.literal("智能阻挡");
|
||||
var line = enabled
|
||||
? 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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" } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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" } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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" } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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" } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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" } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,6 +1,11 @@
|
|||
{
|
||||
"replace": false,
|
||||
"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"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user