mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
[ci skip] Add missing Nullable annotations for NMS DamageSource (#11875)
This commit is contained in:
parent
daddcf6742
commit
edde7264c6
1 changed files with 6 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
--- a/net/minecraft/world/damagesource/DamageSource.java
|
--- a/net/minecraft/world/damagesource/DamageSource.java
|
||||||
+++ b/net/minecraft/world/damagesource/DamageSource.java
|
+++ b/net/minecraft/world/damagesource/DamageSource.java
|
||||||
@@ -20,6 +_,105 @@
|
@@ -20,6 +_,107 @@
|
||||||
private final Entity directEntity;
|
private final Entity directEntity;
|
||||||
@Nullable
|
@Nullable
|
||||||
private final Vec3 damageSourcePosition;
|
private final Vec3 damageSourcePosition;
|
||||||
|
@ -58,18 +58,19 @@
|
||||||
+ return damageSource;
|
+ return damageSource;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ @Nullable
|
||||||
+ public org.bukkit.block.Block getDirectBlock() {
|
+ public org.bukkit.block.Block getDirectBlock() {
|
||||||
+ return this.directBlock;
|
+ return this.directBlock;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public DamageSource directBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockPosition) {
|
+ public DamageSource directBlock(@Nullable net.minecraft.world.level.Level world, @Nullable net.minecraft.core.BlockPos blockPosition) {
|
||||||
+ if (blockPosition == null || world == null) {
|
+ if (blockPosition == null || world == null) {
|
||||||
+ return this;
|
+ return this;
|
||||||
+ }
|
+ }
|
||||||
+ return this.directBlock(org.bukkit.craftbukkit.block.CraftBlock.at(world, blockPosition));
|
+ return this.directBlock(org.bukkit.craftbukkit.block.CraftBlock.at(world, blockPosition));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public DamageSource directBlock(org.bukkit.block.Block block) {
|
+ public DamageSource directBlock(@Nullable org.bukkit.block.Block block) {
|
||||||
+ if (block == null) {
|
+ if (block == null) {
|
||||||
+ return this;
|
+ return this;
|
||||||
+ }
|
+ }
|
||||||
|
@ -79,11 +80,12 @@
|
||||||
+ return damageSource;
|
+ return damageSource;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ @Nullable
|
||||||
+ public org.bukkit.block.BlockState getDirectBlockState() {
|
+ public org.bukkit.block.BlockState getDirectBlockState() {
|
||||||
+ return this.directBlockState;
|
+ return this.directBlockState;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public DamageSource directBlockState(org.bukkit.block.BlockState blockState) {
|
+ public DamageSource directBlockState(@Nullable org.bukkit.block.BlockState blockState) {
|
||||||
+ if (blockState == null) {
|
+ if (blockState == null) {
|
||||||
+ return this;
|
+ return this;
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue