Remove hooks into beacon base/payments. Vanilla uses tags now for extensibility. (#6948)
This commit is contained in:
parent
e4ffbeb329
commit
6b3f2f46fa
9 changed files with 0 additions and 88 deletions
|
@ -1,14 +1,5 @@
|
||||||
--- a/net/minecraft/inventory/container/BeaconContainer.java
|
--- a/net/minecraft/inventory/container/BeaconContainer.java
|
||||||
+++ b/net/minecraft/inventory/container/BeaconContainer.java
|
+++ b/net/minecraft/inventory/container/BeaconContainer.java
|
||||||
@@ -17,7 +17,7 @@
|
|
||||||
public class BeaconContainer extends Container {
|
|
||||||
private final IInventory field_82866_e = new Inventory(1) {
|
|
||||||
public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_) {
|
|
||||||
- return p_94041_2_.func_77973_b().func_206844_a(ItemTags.field_232908_Z_);
|
|
||||||
+ return p_94041_2_.isBeaconPayment();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int func_70297_j_() {
|
|
||||||
@@ -87,10 +87,8 @@
|
@@ -87,10 +87,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,12 +13,3 @@
|
||||||
} else if (p_82846_2_ >= 1 && p_82846_2_ < 28) {
|
} else if (p_82846_2_ >= 1 && p_82846_2_ < 28) {
|
||||||
if (!this.func_75135_a(itemstack1, 28, 37, false)) {
|
if (!this.func_75135_a(itemstack1, 28, 37, false)) {
|
||||||
return ItemStack.field_190927_a;
|
return ItemStack.field_190927_a;
|
||||||
@@ -156,7 +154,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean func_75214_a(ItemStack p_75214_1_) {
|
|
||||||
- return p_75214_1_.func_77973_b().func_206844_a(ItemTags.field_232908_Z_);
|
|
||||||
+ return p_75214_1_.isBeaconPayment();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int func_75219_a() {
|
|
||||||
|
|
|
@ -11,12 +11,3 @@
|
||||||
if (this.field_213934_g.size() <= 1) {
|
if (this.field_213934_g.size() <= 1) {
|
||||||
beacontileentity$beamsegment = new BeaconTileEntity.BeamSegment(afloat);
|
beacontileentity$beamsegment = new BeaconTileEntity.BeamSegment(afloat);
|
||||||
this.field_213934_g.add(beacontileentity$beamsegment);
|
this.field_213934_g.add(beacontileentity$beamsegment);
|
||||||
@@ -184,7 +184,7 @@
|
|
||||||
|
|
||||||
for(int k = p_213927_1_ - i; k <= p_213927_1_ + i && flag; ++k) {
|
|
||||||
for(int l = p_213927_3_ - i; l <= p_213927_3_ + i; ++l) {
|
|
||||||
- if (!this.field_145850_b.func_180495_p(new BlockPos(k, j, l)).func_235714_a_(BlockTags.field_232875_ap_)) {
|
|
||||||
+ if (!this.field_145850_b.func_180495_p(new BlockPos(k, j, l)).isBeaconBase(this.field_145850_b, new BlockPos(k, j, l), func_174877_v())) {
|
|
||||||
flag = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
"replace": false,
|
|
||||||
"values": [
|
|
||||||
"minecraft:emerald",
|
|
||||||
"minecraft:diamond",
|
|
||||||
"minecraft:gold_ingot",
|
|
||||||
"minecraft:iron_ingot"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -133,7 +133,6 @@ public class Tags
|
||||||
public static class Items
|
public static class Items
|
||||||
{
|
{
|
||||||
public static final ITag.INamedTag<Item> ARROWS = tag("arrows");
|
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> BONES = tag("bones");
|
||||||
public static final ITag.INamedTag<Item> BOOKSHELVES = tag("bookshelves");
|
public static final ITag.INamedTag<Item> BOOKSHELVES = tag("bookshelves");
|
||||||
public static final ITag.INamedTag<Item> CHESTS = tag("chests");
|
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());
|
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.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.BONES).func_240534_a_(Items.BONE);
|
||||||
func_240522_a_(Tags.Items.BOOKSHELVES).func_240534_a_(Items.BOOKSHELF);
|
func_240522_a_(Tags.Items.BOOKSHELVES).func_240534_a_(Items.BOOKSHELF);
|
||||||
func_240521_a_(Tags.Blocks.CHESTS, Tags.Items.CHESTS);
|
func_240521_a_(Tags.Blocks.CHESTS, Tags.Items.CHESTS);
|
||||||
|
|
|
@ -489,22 +489,6 @@ public interface IForgeBlock
|
||||||
return false;
|
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.
|
* 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);
|
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.
|
* 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());
|
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
|
* 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);
|
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
|
* Determines if the specific ItemStack can be placed in the specified armor
|
||||||
* slot, for the entity.
|
* slot, for the entity.
|
||||||
|
|
Loading…
Reference in a new issue