mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 08:44:25 +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
@@ -133,7 +133,6 @@ public class Tags
|
||||
public static class Items
|
||||
{
|
||||
public static final ITag.INamedTag<Item> ARROWS = tag("arrows");
|
||||
public static final ITag.INamedTag<Item> BEACON_PAYMENT = tag("beacon_payment");
|
||||
public static final ITag.INamedTag<Item> BONES = tag("bones");
|
||||
public static final ITag.INamedTag<Item> BOOKSHELVES = tag("bookshelves");
|
||||
public static final ITag.INamedTag<Item> CHESTS = tag("chests");
|
||||
|
||||
@@ -55,7 +55,6 @@ public class ForgeItemTagsProvider extends ItemTagsProvider
|
||||
filter = this.tagToBuilder.entrySet().stream().map(e -> e.getKey()).collect(Collectors.toSet());
|
||||
|
||||
func_240522_a_(Tags.Items.ARROWS).func_240534_a_(Items.ARROW, Items.TIPPED_ARROW, Items.SPECTRAL_ARROW);
|
||||
func_240522_a_(Tags.Items.BEACON_PAYMENT).func_240534_a_(Items.EMERALD, Items.DIAMOND, Items.GOLD_INGOT, Items.IRON_INGOT);
|
||||
func_240522_a_(Tags.Items.BONES).func_240534_a_(Items.BONE);
|
||||
func_240522_a_(Tags.Items.BOOKSHELVES).func_240534_a_(Items.BOOKSHELF);
|
||||
func_240521_a_(Tags.Blocks.CHESTS, Tags.Items.CHESTS);
|
||||
|
||||
@@ -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