Skip to content

Commit

Permalink
Fix missed API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Jul 3, 2024
1 parent dd79361 commit 90e2d60
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.6-R0.1-SNAPSHOT</version>
<version>1.21-R0.1-SNAPSHOT</version>
</dependency>

<!-- Used for storing and retreiving Constructs in a storage transparent medium: JSONs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.laytonsmith.abstraction.enums.MCInventoryType;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;

public class BukkitMCInventoryView implements MCInventoryView {

Expand Down Expand Up @@ -60,7 +61,7 @@ public int convertSlot(int rawSlot) {

@Override
public MCItemStack getItem(int slot) {
return new BukkitMCItemStack(iv.getItem(slot));
return new BukkitMCItemStack((ItemStack) ReflectionUtils.invokeMethod(iv, "getItem", slot));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public enum MCFishingState {
FISHING,
IN_GROUND,
BITE,
REEL_IN
REEL_IN,
LURED
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public enum MCPotionCause {
FOOD,
ILLUSION,
MILK,
PATROL_CAPTAIN,
PATROL_CAPTAIN, // unused as of 1.21
PLUGIN,
POTION_DRINK,
POTION_SPLASH,
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/laytonsmith/abstraction/enums/MCSound.java
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,6 @@ public enum MCVanillaSound {
ENTITY_BREEZE_SHOOT(MCVersion.MC1_20_4),
ENTITY_BREEZE_SLIDE(MCVersion.MC1_20_4),
ENTITY_GENERIC_WIND_BURST(MCVersion.MC1_20_4, MCVersion.MC1_20_4),
ENTITY_BREEZE_WIND_BURST(MCVersion.MC1_20_6), // changed from ENTITY_GENERIC_WIND_BURST
ENTITY_PARROT_IMITATE_BREEZE(MCVersion.MC1_20_4),
ENTITY_PLAYER_TELEPORT(MCVersion.MC1_20_4),

Expand All @@ -1651,8 +1650,7 @@ public enum MCVanillaSound {
BLOCK_HEAVY_CORE_STEP(MCVersion.MC1_20_6),
BLOCK_TRIAL_SPAWNER_ABOUT_TO_SPAWN_ITEM(MCVersion.MC1_20_6),
BLOCK_TRIAL_SPAWNER_AMBIENT_CHARGED(MCVersion.MC1_20_6, MCVersion.MC1_20_6),
BLOCK_TRIAL_SPAWNER_AMBIENT_OMINOUS(MCVersion.MC1_21), // changed from BLOCK_TRIAL_SPAWNER_AMBIENT_CHARGED
BLOCK_TRIAL_SPAWNER_CHARGE_ACTIVATE(MCVersion.MC1_20_6),
BLOCK_TRIAL_SPAWNER_CHARGE_ACTIVATE(MCVersion.MC1_20_6, MCVersion.MC1_20_6),
BLOCK_TRIAL_SPAWNER_SPAWN_ITEM(MCVersion.MC1_20_6),
BLOCK_TRIAL_SPAWNER_SPAWN_ITEM_BEGIN(MCVersion.MC1_20_6),
BLOCK_VAULT_ACTIVATE(MCVersion.MC1_20_6),
Expand Down Expand Up @@ -1690,6 +1688,7 @@ public enum MCVanillaSound {
ENTITY_BREEZE_CHARGE(MCVersion.MC1_20_6),
ENTITY_BREEZE_DEFLECT(MCVersion.MC1_20_6),
ENTITY_BREEZE_WHIRL(MCVersion.MC1_20_6),
ENTITY_BREEZE_WIND_BURST(MCVersion.MC1_20_6), // changed from ENTITY_GENERIC_WIND_BURST
ENTITY_DONKEY_JUMP(MCVersion.MC1_20_6),
ENTITY_MULE_JUMP(MCVersion.MC1_20_6),
ENTITY_PARROT_IMITATE_BOGGED(MCVersion.MC1_20_6),
Expand All @@ -1709,7 +1708,8 @@ public enum MCVanillaSound {
ITEM_WOLF_ARMOR_REPAIR(MCVersion.MC1_20_6),

// 1.21 additions
BLOCK_TRIAL_SPAWNER_OMINOUS_ACTIVATE(MCVersion.MC1_21),
BLOCK_TRIAL_SPAWNER_AMBIENT_OMINOUS(MCVersion.MC1_21), // changed from BLOCK_TRIAL_SPAWNER_AMBIENT_CHARGED
BLOCK_TRIAL_SPAWNER_OMINOUS_ACTIVATE(MCVersion.MC1_21), // changed from BLOCK_TRIAL_SPAWNER_CHARGE_ACTIVATE
BLOCK_VAULT_REJECT_REWARDED_PLAYER(MCVersion.MC1_21),
MUSIC_DISC_CREATOR(MCVersion.MC1_21),
MUSIC_DISC_CREATOR_MUSIC_BOX(MCVersion.MC1_21),
Expand Down

0 comments on commit 90e2d60

Please sign in to comment.