mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 06:24:43 +00:00
Initial 1.16.2 Update
This commit is contained in:
1 parent
a3c4ffd2c1
commit
fe43088c96
233 files changed
+1644
-2297
No files matched your search
@@ -242,14 +242,15 @@ public interface IForgeBlock
|
||||
* @param state The current state
|
||||
* @param world The current world
|
||||
* @param pos Block position in world
|
||||
* @param orientation The direction the entity is facing while getting into bed.
|
||||
* @param sleeper The sleeper or camera entity, null in some cases.
|
||||
* @return The spawn position
|
||||
*/
|
||||
default Optional<Vector3d> getBedSpawnPosition(EntityType<?> entityType, BlockState state, IWorldReader world, BlockPos pos, @Nullable LivingEntity sleeper)
|
||||
default Optional<Vector3d> getBedSpawnPosition(EntityType<?> entityType, BlockState state, IWorldReader world, BlockPos pos, float orientation, @Nullable LivingEntity sleeper)
|
||||
{
|
||||
if (world instanceof World)
|
||||
{
|
||||
return BedBlock.func_220172_a(entityType, world,pos,0);
|
||||
return BedBlock.func_242652_a(entityType, world, pos, orientation);
|
||||
}
|
||||
|
||||
return Optional.empty();
|
||||
@@ -516,7 +517,7 @@ public interface IForgeBlock
|
||||
* @param pos Block position in world
|
||||
* @return True, to support being part of a nether portal frame, false otherwise.
|
||||
*/
|
||||
default boolean isPortalFrame(BlockState state, IWorldReader world, BlockPos pos)
|
||||
default boolean isPortalFrame(BlockState state, IBlockReader world, BlockPos pos)
|
||||
{
|
||||
return state.isIn(Blocks.OBSIDIAN);
|
||||
}
|
||||
@@ -890,7 +891,7 @@ public interface IForgeBlock
|
||||
{
|
||||
return state.getBlock() instanceof BreakableBlock || state.getBlock() instanceof LeavesBlock;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the state that this block should transform into when right clicked by a tool.
|
||||
* For example: Used to determine if an axe can strip, a shovel can path, or a hoe can till.
|
||||
|
||||
@@ -195,12 +195,13 @@ public interface IForgeBlockState
|
||||
*
|
||||
* @param world The current world
|
||||
* @param pos Block position in world
|
||||
* @param orientation The direction the entity is facing while getting into bed.
|
||||
* @param sleeper The sleeper or camera entity, null in some cases.
|
||||
* @return The spawn position
|
||||
*/
|
||||
default Optional<Vector3d> getBedSpawnPosition(EntityType<?> type, IWorldReader world, BlockPos pos, @Nullable LivingEntity sleeper)
|
||||
default Optional<Vector3d> getBedSpawnPosition(EntityType<?> type, IWorldReader world, BlockPos pos, float orientation, @Nullable LivingEntity sleeper)
|
||||
{
|
||||
return getBlockState().getBlock().getBedSpawnPosition(type, getBlockState(), world, pos, sleeper);
|
||||
return getBlockState().getBlock().getBedSpawnPosition(type, getBlockState(), world, pos, orientation, sleeper);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -428,7 +429,7 @@ public interface IForgeBlockState
|
||||
* @param pos Block position in world
|
||||
* @return True, to support being part of a nether portal frame, false otherwise.
|
||||
*/
|
||||
default boolean isPortalFrame(IWorldReader world, BlockPos pos)
|
||||
default boolean isPortalFrame(IBlockReader world, BlockPos pos)
|
||||
{
|
||||
return getBlockState().getBlock().isPortalFrame(getBlockState(), world, pos);
|
||||
}
|
||||
@@ -778,7 +779,7 @@ public interface IForgeBlockState
|
||||
{
|
||||
return getBlockState().getBlock().shouldDisplayFluidOverlay(getBlockState(), world, pos, fluidState);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the state that this block should transform into when right clicked by a tool.
|
||||
* For example: Used to determine if an axe can strip, a shovel can path, or a hoe can till.
|
||||
|
||||
Reference in new issue
Block a user