mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
Fixed Conduit and Beacon Activation on Vanilla Servers (#6438)
This commit is contained in:
1 parent
a740044e21
commit
daff482092
10 files changed
+40
-54
No files matched your search
@@ -40,7 +40,6 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.particle.ParticleManager;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.MobEntity;
|
||||
@@ -55,7 +54,6 @@ import net.minecraft.fluid.IFluidState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.potion.Effects;
|
||||
import net.minecraft.item.DyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.pathfinding.PathNodeType;
|
||||
import net.minecraft.state.IProperty;
|
||||
@@ -82,7 +80,6 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.Tags;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@@ -570,7 +567,26 @@ public interface IForgeBlock
|
||||
*/
|
||||
default boolean isBeaconBase(BlockState state, IWorldReader world, BlockPos pos, BlockPos beacon)
|
||||
{
|
||||
return Tags.Blocks.SUPPORTS_BEACON.contains(state.getBlock());
|
||||
return state.getBlock() == Blocks.IRON_BLOCK ||
|
||||
state.getBlock() == Blocks.GOLD_BLOCK ||
|
||||
state.getBlock() == Blocks.DIAMOND_BLOCK ||
|
||||
state.getBlock() == Blocks.EMERALD_BLOCK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this block can be used as the frame of a conduit.
|
||||
*
|
||||
* @param world The current world
|
||||
* @param pos Block position in world
|
||||
* @param conduit Conduit position in world
|
||||
* @return True, to support the conduit, and make it active with this block.
|
||||
*/
|
||||
default boolean isConduitFrame(BlockState state, IWorldReader world, BlockPos pos, BlockPos conduit)
|
||||
{
|
||||
return state.getBlock() == Blocks.PRISMARINE ||
|
||||
state.getBlock() == Blocks.PRISMARINE_BRICKS ||
|
||||
state.getBlock() == Blocks.SEA_LANTERN ||
|
||||
state.getBlock() == Blocks.DARK_PRISMARINE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -495,6 +495,19 @@ public interface IForgeBlockState
|
||||
return getBlockState().getBlock().isBeaconBase(getBlockState(), world, pos, beacon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this block can be used as the frame of a conduit.
|
||||
*
|
||||
* @param world The current world
|
||||
* @param pos Block position in world
|
||||
* @param conduit Conduit position in world
|
||||
* @return True, to support the conduit, and make it active with this block.
|
||||
*/
|
||||
default boolean isConduitFrame(IWorldReader world, BlockPos pos, BlockPos conduit)
|
||||
{
|
||||
return getBlockState().getBlock().isConduitFrame(getBlockState(), world, pos, conduit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this block can be used as part of a frame of a nether portal.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user