为状态管理控制器添加方块属性
This commit is contained in:
parent
0e90d9825a
commit
45e927cf27
|
|
@ -15,6 +15,7 @@ import net.minecraft.world.phys.BlockHitResult;
|
||||||
import net.minecraftforge.network.NetworkHooks;
|
import net.minecraftforge.network.NetworkHooks;
|
||||||
|
|
||||||
public class NetworkPatternControllerBlock extends Block implements EntityBlock {
|
public class NetworkPatternControllerBlock extends Block implements EntityBlock {
|
||||||
|
|
||||||
public NetworkPatternControllerBlock(Properties props) {
|
public NetworkPatternControllerBlock(Properties props) {
|
||||||
super(props);
|
super(props);
|
||||||
}
|
}
|
||||||
|
|
@ -30,7 +31,6 @@ public class NetworkPatternControllerBlock extends Block implements EntityBlock
|
||||||
BlockEntity be = level.getBlockEntity(pos);
|
BlockEntity be = level.getBlockEntity(pos);
|
||||||
if (be instanceof MenuProvider provider && player instanceof ServerPlayer sp) {
|
if (be instanceof MenuProvider provider && player instanceof ServerPlayer sp) {
|
||||||
NetworkHooks.openScreen(sp, provider, pos);
|
NetworkHooks.openScreen(sp, provider, pos);
|
||||||
return InteractionResult.CONSUME;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return InteractionResult.sidedSuccess(level.isClientSide);
|
return InteractionResult.sidedSuccess(level.isClientSide);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{ "type": "minecraft:item", "name": "extendedae_plus:network_pattern_controller" }
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{ "condition": "minecraft:survives_explosion" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
|
"extendedae_plus:network_pattern_controller",
|
||||||
"extendedae_plus:wireless_transceiver",
|
"extendedae_plus:wireless_transceiver",
|
||||||
"extendedae_plus:4x_crafting_accelerator",
|
"extendedae_plus:4x_crafting_accelerator",
|
||||||
"extendedae_plus:16x_crafting_accelerator",
|
"extendedae_plus:16x_crafting_accelerator",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user