Somehow a bunch of items were missed

This commit is contained in:
Jake Potrebic
2024-12-14 22:35:35 -08:00
parent 35afd218f5
commit 172a80cb66
25 changed files with 475 additions and 25 deletions

View File

@@ -1,28 +1,30 @@
--- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -106,6 +_,51 @@
@@ -106,6 +_,53 @@
return 3;
}
};
+ // CraftBukkit start - add fields and methods
+ @Nullable
+ public org.bukkit.potion.PotionEffect getPrimaryEffect() {
+ return (this.primaryPower != null)
+ ? org.bukkit.craftbukkit.potion.CraftPotionUtil.toBukkit(new MobEffectInstance(
+ this.primaryPower,
+ BeaconBlockEntity.getLevel(this.levels),
+ BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower),
+ BeaconBlockEntity.computeEffectDuration(this.levels),
+ BeaconBlockEntity.computeEffectAmplifier(this.levels, this.primaryPower, this.secondaryPower),
+ true,
+ true
+ ))
+ : null;
+ }
+
+ @Nullable
+ public org.bukkit.potion.PotionEffect getSecondaryEffect() {
+ return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower))
+ ? org.bukkit.craftbukkit.potion.CraftPotionUtil.toBukkit(new MobEffectInstance(
+ this.secondaryPower,
+ BeaconBlockEntity.getLevel(this.levels),
+ BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower),
+ BeaconBlockEntity.computeEffectDuration(this.levels),
+ BeaconBlockEntity.computeEffectAmplifier(this.levels, this.primaryPower, this.secondaryPower),
+ true,
+ true
+ ))

View File

@@ -12,7 +12,7 @@
+
+ @Override
+ public java.util.List<net.minecraft.world.item.ItemStack> getContents() {
+ return Collections.singletonList(this.item);
+ return java.util.Collections.singletonList(this.item);
+ }
+
+ @Override