fix a bunch of compile issues

This commit is contained in:
Jake Potrebic
2024-12-14 20:15:49 -08:00
parent 7ac9b00916
commit 0262d9a165
19 changed files with 29 additions and 37 deletions

View File

@@ -86,10 +86,10 @@
+ popExperience(level, pos, amount, null);
+ }
+ public void popExperience(ServerLevel level, BlockPos pos, int amount, net.minecraft.world.entity.Entity entity) {
+ // Paper end - add entity paramete
+ // Paper end - add entity parameter
if (level.getGameRules().getBoolean(GameRules.RULE_DOBLOCKDROPS)) {
- ExperienceOrb.award(level, Vec3.atCenterOf(pos), amount);
+ ExperienceOrb.award(level, Vec3.atCenterOf(pos), amount, entity); // Paper
+ ExperienceOrb.award(level, Vec3.atCenterOf(pos), amount, org.bukkit.entity.ExperienceOrb.SpawnReason.BLOCK_BREAK, entity); // Paper
}
}

View File

@@ -24,7 +24,7 @@
+ }
+
+ @Override
+ public List<HumanEntity> getViewers() {
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+

View File

@@ -56,7 +56,7 @@
+ this.transaction.remove(who);
+ }
+
+ public List<HumanEntity> getViewers() {
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+

View File

@@ -20,7 +20,7 @@
+ this.transaction.remove(who);
+ }
+
+ public List<HumanEntity> getViewers() {
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+

View File

@@ -24,7 +24,7 @@
+ }
+
+ @Override
+ public List<HumanEntity> getViewers() {
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+

View File

@@ -25,7 +25,7 @@
+ }
+
+ @Override
+ public java.util.List<HumanEntity> getViewers() {
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+

View File

@@ -20,7 +20,7 @@
+ this.transaction.remove(who);
+ }
+
+ public List<HumanEntity> getViewers() {
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+

View File

@@ -20,7 +20,7 @@
+ this.transaction.remove(who);
+ }
+
+ public java.util.List<HumanEntity> getViewers() {
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+

View File

@@ -26,7 +26,7 @@
+ }
+
+ @Override
+ public List<HumanEntity> getViewers() {
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+

View File

@@ -1,10 +1,13 @@
--- a/net/minecraft/world/level/block/entity/LecternBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/LecternBlockEntity.java
@@ -33,6 +_,51 @@
@@ -32,7 +_,53 @@
public static final int NUM_DATA = 1;
public static final int SLOT_BOOK = 0;
public static final int NUM_SLOTS = 1;
public final Container bookAccess = new Container() {
+ // CraftBukkit start - add fields and methods
- public final Container bookAccess = new Container() {
+ // CraftBukkit start - add fields and methods
+ public final Container bookAccess = new LecternInventory();
+ public class LecternInventory implements Container {
+ public java.util.List<org.bukkit.entity.HumanEntity> transaction = new java.util.ArrayList<>();
+ private int maxStack = 1;
+