mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
parent
36fa573f48
commit
da3ca7a40d
1 changed files with 8 additions and 8 deletions
|
@ -108,11 +108,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
+ // Paper start
|
||||
+ if (this.canPlaceOnPredicates != null || this.hasItemFlag(ItemFlag.HIDE_PLACED_ON)) {
|
||||
+ itemTag.put(CraftMetaItem.CAN_PLACE_ON, new net.minecraft.world.item.AdventureModePredicate(this.canPlaceOnPredicates != null ? this.canPlaceOnPredicates : Collections.emptyList(), !this.hasItemFlag(ItemFlag.HIDE_PLACED_ON)));
|
||||
+ if (this.canPlaceOnPredicates != null && !this.canPlaceOnPredicates.isEmpty()) {
|
||||
+ itemTag.put(CraftMetaItem.CAN_PLACE_ON, new net.minecraft.world.item.AdventureModePredicate(this.canPlaceOnPredicates, !this.hasItemFlag(ItemFlag.HIDE_PLACED_ON)));
|
||||
+ }
|
||||
+ if (this.canBreakPredicates != null || this.hasItemFlag(ItemFlag.HIDE_DESTROYS)) {
|
||||
+ itemTag.put(CraftMetaItem.CAN_BREAK, new net.minecraft.world.item.AdventureModePredicate(this.canBreakPredicates != null ? this.canBreakPredicates : Collections.emptyList(), !this.hasItemFlag(ItemFlag.HIDE_DESTROYS)));
|
||||
+ if (this.canBreakPredicates != null && !this.canBreakPredicates.isEmpty()) {
|
||||
+ itemTag.put(CraftMetaItem.CAN_BREAK, new net.minecraft.world.item.AdventureModePredicate(this.canBreakPredicates, !this.hasItemFlag(ItemFlag.HIDE_DESTROYS)));
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
@ -166,13 +166,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
+ // Paper start
|
||||
+ final boolean canBreakAddToUnhandled = this.canBreakPredicates != null || this.hasItemFlag(ItemFlag.HIDE_DESTROYS);
|
||||
+ final boolean canBreakAddToUnhandled = this.canBreakPredicates != null && !this.canBreakPredicates.isEmpty();
|
||||
+ if (canBreakAddToUnhandled) {
|
||||
+ this.unhandledTags.set(DataComponents.CAN_BREAK, new net.minecraft.world.item.AdventureModePredicate(this.canBreakPredicates != null ? this.canBreakPredicates : Collections.emptyList(), !this.hasItemFlag(ItemFlag.HIDE_DESTROYS)));
|
||||
+ this.unhandledTags.set(DataComponents.CAN_BREAK, new net.minecraft.world.item.AdventureModePredicate(this.canBreakPredicates, !this.hasItemFlag(ItemFlag.HIDE_DESTROYS)));
|
||||
+ }
|
||||
+ final boolean canPlaceOnAddToUnhandled = this.canPlaceOnPredicates != null || this.hasItemFlag(ItemFlag.HIDE_PLACED_ON);
|
||||
+ final boolean canPlaceOnAddToUnhandled = this.canPlaceOnPredicates != null && !this.canPlaceOnPredicates.isEmpty();
|
||||
+ if (canPlaceOnAddToUnhandled) {
|
||||
+ this.unhandledTags.set(DataComponents.CAN_PLACE_ON, new net.minecraft.world.item.AdventureModePredicate(this.canPlaceOnPredicates != null ? this.canPlaceOnPredicates : Collections.emptyList(), !this.hasItemFlag(ItemFlag.HIDE_PLACED_ON)));
|
||||
+ this.unhandledTags.set(DataComponents.CAN_PLACE_ON, new net.minecraft.world.item.AdventureModePredicate(this.canPlaceOnPredicates, !this.hasItemFlag(ItemFlag.HIDE_PLACED_ON)));
|
||||
+ }
|
||||
+ // Paper end
|
||||
if (!this.unhandledTags.isEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue