mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 06:24:43 +00:00
Remove hooks into beacon base/payments. Vanilla uses tags now for extensibility. (#6948)
This commit is contained in:
1 parent
e4ffbeb329
commit
6b3f2f46fa
9 files changed
-88
No files matched your search
@@ -489,22 +489,6 @@ public interface IForgeBlock
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this block can be used as the base of a beacon.
|
||||
*
|
||||
* @param world The current world
|
||||
* @param pos Block position in world
|
||||
* @param beacon Beacon position in world
|
||||
* @return True, to support the beacon, and make it active with this block.
|
||||
*/
|
||||
default boolean isBeaconBase(BlockState state, IWorldReader world, BlockPos pos, BlockPos beacon)
|
||||
{
|
||||
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.
|
||||
*
|
||||
|
||||
@@ -408,19 +408,6 @@ public interface IForgeBlockState
|
||||
return getBlockState().getBlock().isFertile(getBlockState(), world, pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this block can be used as the base of a beacon.
|
||||
*
|
||||
* @param world The current world
|
||||
* @param pos Block position in world
|
||||
* @param beacon Beacon position in world
|
||||
* @return True, to support the beacon, and make it active with this block.
|
||||
*/
|
||||
default boolean isBeaconBase(IWorldReader world, BlockPos pos, BlockPos beacon)
|
||||
{
|
||||
return getBlockState().getBlock().isBeaconBase(getBlockState(), world, pos, beacon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this block can be used as the frame of a conduit.
|
||||
*
|
||||
|
||||
@@ -639,17 +639,6 @@ public interface IForgeItem
|
||||
return enchantment.type.canEnchantItem(stack.getItem());
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this Item can be used as a payment to activate the vanilla beacon.
|
||||
*
|
||||
* @param stack the ItemStack
|
||||
* @return true if this Item can be used
|
||||
*/
|
||||
default boolean isBeaconPayment(ItemStack stack)
|
||||
{
|
||||
return Tags.Items.BEACON_PAYMENT.func_230235_a_(stack.getItem());
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the player switching between these two item stacks
|
||||
*
|
||||
|
||||
@@ -304,16 +304,6 @@ public interface IForgeItemStack extends ICapabilitySerializable<CompoundNBT>
|
||||
getStack().getItem().onHorseArmorTick(getStack(), world, horse);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this Item can be used as a payment to activate the vanilla beacon.
|
||||
*
|
||||
* @return true if this Item can be used
|
||||
*/
|
||||
default boolean isBeaconPayment()
|
||||
{
|
||||
return getStack().getItem().isBeaconPayment(getStack());
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the specific ItemStack can be placed in the specified armor
|
||||
* slot, for the entity.
|
||||
|
||||
Reference in new issue
Block a user