Skip to content

Commit

Permalink
Map new world events (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
IotaBread authored Feb 6, 2024
1 parent 8c69d9d commit aad08a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mappings/net/minecraft/world/WorldEvents.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ CLASS net/minecraft/unmapped/C_kkbhcwdu net/minecraft/world/WorldEvents
COMMENT <br>Plays the end portal frame filled sound event and spawns smoke particles.
COMMENT <p>Called by {@link net.minecraft.item.EnderEyeItem#useOnBlock(net.minecraft.item.ItemUsageContext) EnderEyeItem#useOnBlock}
FIELD f_nkleuvkx TRIAL_SPAWNER_EJECTS_ITEM I
FIELD f_nrmqudnn VAULT_DEACTIVATED I
FIELD f_nvgwoybg CHORUS_FLOWER_GROWS I
COMMENT A Chorus Flower grows.
COMMENT <br>Plays the chorus flower growing sound event.
Expand Down Expand Up @@ -201,6 +202,7 @@ CLASS net/minecraft/unmapped/C_kkbhcwdu net/minecraft/world/WorldEvents
COMMENT An Ender Dragon shoots a fireball.
COMMENT <br>Plays the ender dragon shoot sound event.
COMMENT <p>Called by {@link net.minecraft.entity.boss.dragon.phase.StrafePlayerPhase#serverTick() StrafePlayerPhase#serverTick}
FIELD f_pqgyxnuu VAULT_ACTIVATED I
FIELD f_ptnwublh TRAVEL_THROUGH_PORTAL I
COMMENT A Portal is traveled through.
COMMENT <br>Plays the portal travel sound event directly through the client's sound manager.
Expand Down Expand Up @@ -263,6 +265,7 @@ CLASS net/minecraft/unmapped/C_kkbhcwdu net/minecraft/world/WorldEvents
COMMENT <br>Plays the pointed dripstone dripping water into cauldron sound event.
COMMENT <p>Called by {@link net.minecraft.block.cauldron.CauldronBlock#fillFromDripstone(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.fluid.Fluid) CauldronBlock#fillFromDripstone},
COMMENT and {@link net.minecraft.block.cauldron.LeveledCauldronBlock#fillFromDripstone(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.fluid.Fluid) LeveledCauldronBlock#fillFromDripstone}
FIELD f_vzhxbibt VAULT_EJECTS_ITEM I
FIELD f_wrcxqnhh LAVA_EXTINGUISHED I
COMMENT Lava is extinguished.
COMMENT <br>Plays the lava extinguish sound event and spawns large smoke particles.
Expand Down
21 changes: 20 additions & 1 deletion unpick-definitions/world_events.unpick
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ constant world_events net/minecraft/world/WorldEvents DISPENSER_LAUNCHES_PROJECT
constant world_events net/minecraft/world/WorldEvents EYE_OF_ENDER_LAUNCHES
constant world_events net/minecraft/world/WorldEvents FIREWORK_ROCKET_SHOOTS
constant world_events net/minecraft/world/WorldEvents FIRE_EXTINGUISHED
constant world_events net/minecraft/world/WorldEvents JUKEBOX_SONG_START
constant world_events net/minecraft/world/WorldEvents JUKEBOX_SONG_STOP
constant world_events net/minecraft/world/WorldEvents GHAST_WARNS
constant world_events net/minecraft/world/WorldEvents GHAST_SHOOTS
constant world_events net/minecraft/world/WorldEvents ENDER_DRAGON_SHOOTS
Expand Down Expand Up @@ -38,11 +40,15 @@ constant world_events net/minecraft/world/WorldEvents POINTED_DRIPSTONE_LANDS
constant world_events net/minecraft/world/WorldEvents POINTED_DRIPSTONE_DRIPS_LAVA_INTO_CAULDRON
constant world_events net/minecraft/world/WorldEvents POINTED_DRIPSTONE_DRIPS_WATER_INTO_CAULDRON
constant world_events net/minecraft/world/WorldEvents SKELETON_CONVERTS_TO_STRAY
constant world_events net/minecraft/world/WorldEvents CRAFTER_CRAFT
constant world_events net/minecraft/world/WorldEvents CRAFTER_FAIL
constant world_events net/minecraft/world/WorldEvents COMPOSTER_USED
constant world_events net/minecraft/world/WorldEvents LAVA_EXTINGUISHED
constant world_events net/minecraft/world/WorldEvents REDSTONE_TORCH_BURNS_OUT
constant world_events net/minecraft/world/WorldEvents END_PORTAL_FRAME_FILLED
constant world_events net/minecraft/world/WorldEvents POINTED_DRIPSTONE_DRIPS
constant world_events net/minecraft/world/WorldEvents BONE_MEAL_USED
constant world_events net/minecraft/world/WorldEvents DISPENSER_FIRED
constant world_events net/minecraft/world/WorldEvents BLOCK_BROKEN
constant world_events net/minecraft/world/WorldEvents SPLASH_POTION_SPLASHED
constant world_events net/minecraft/world/WorldEvents EYE_OF_ENDER_BREAKS
Expand All @@ -51,13 +57,26 @@ constant world_events net/minecraft/world/WorldEvents DRAGON_BREATH_CLOUD_SPAWNS
constant world_events net/minecraft/world/WorldEvents INSTANT_SPLASH_POTION_SPLASHED
constant world_events net/minecraft/world/WorldEvents ENDER_DRAGON_BREAKS_BLOCK
constant world_events net/minecraft/world/WorldEvents WET_SPONGE_DRIES_OUT
constant world_events net/minecraft/world/WorldEvents CRAFTER_SHOOT
constant world_events net/minecraft/world/WorldEvents BEE_GROWTH
constant world_events net/minecraft/world/WorldEvents TURTLE_EGG_PLACED
constant world_events net/minecraft/world/WorldEvents END_GATEWAY_SPAWNS
constant world_events net/minecraft/world/WorldEvents ENDER_DRAGON_RESURRECTED
constant world_events net/minecraft/world/WorldEvents ELECTRICITY_SPARKS
constant world_events net/minecraft/world/WorldEvents BLOCK_WAXED
constant world_events net/minecraft/world/WorldEvents WAX_REMOVED
constant world_events net/minecraft/world/WorldEvents BLOCK_SCRAPED
constant world_events net/minecraft/world/WorldEvents BONE_MEAL_USED
constant world_events net/minecraft/world/WorldEvents SCULK_CHARGES
constant world_events net/minecraft/world/WorldEvents SCULK_SHRIEKER_TRIGGERED
constant world_events net/minecraft/world/WorldEvents BLOCK_BRUSHING_COMPLETE
constant world_events net/minecraft/world/WorldEvents SNIFFER_EGG_CRACKS
constant world_events net/minecraft/world/WorldEvents TRIAL_SPAWNER_SPAWNS_MOB
constant world_events net/minecraft/world/WorldEvents TRIAL_SPAWNER_SPAWNS_MOB_AT_POS
constant world_events net/minecraft/world/WorldEvents TRIAL_SPAWNER_DETECTS_PLAYER
constant world_events net/minecraft/world/WorldEvents TRIAL_SPAWNER_EJECTS_ITEM
constant world_events net/minecraft/world/WorldEvents VAULT_ACTIVATED
constant world_events net/minecraft/world/WorldEvents VAULT_DEACTIVATED
constant world_events net/minecraft/world/WorldEvents VAULT_EJECTS_ITEM

target_method net/minecraft/world/WorldAccess syncWorldEvent (Lnet/minecraft/entity/player/PlayerEntity;ILnet/minecraft/util/math/BlockPos;I)V
param 1 world_events
Expand Down

1 comment on commit aad08a7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With commit aad08a7, 18 file(s) were updated with 52 line(s) added and 39 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/net/minecraft/block/CrafterBlock.java namedSrc/net/minecraft/block/CrafterBlock.java
--- namedTargetSrc/net/minecraft/block/CrafterBlock.java	2024-02-06 17:46:40.023720150 +0000
+++ namedSrc/net/minecraft/block/CrafterBlock.java	2024-02-06 17:45:26.515704369 +0000
@@ -32,6 +32,7 @@
 import net.minecraft.util.math.Vec3d;
 import net.minecraft.util.random.RandomGenerator;
 import net.minecraft.world.World;
+import net.minecraft.world.WorldEvents;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -234,12 +235,12 @@
       if (world.getBlockEntity(pos) instanceof CrafterBlockEntity lv) {
          Optional<CraftingRecipe> optional = getCraftingRecipe(world, lv);
          if (optional.isEmpty()) {
-            world.syncWorldEvent(1050, pos, 0);
+            world.syncWorldEvent(WorldEvents.CRAFTER_FAIL, pos, 0);
          } else {
             CraftingRecipe lv3 = (CraftingRecipe)optional.get();
             ItemStack lv4 = lv3.craft(lv, world.getRegistryManager());
             if (lv4.isEmpty()) {
-               world.syncWorldEvent(1050, pos, 0);
+               world.syncWorldEvent(WorldEvents.CRAFTER_FAIL, pos, 0);
             } else {
                lv.setCraftingTicksRemaining(6);
                world.setBlockState(pos, state.with(CRAFTING, Boolean.valueOf(true)), Block.NOTIFY_LISTENERS);
@@ -302,8 +303,8 @@
       if (!lv3.isEmpty()) {
          Vec3d lv6 = Vec3d.ofCenter(pos).relative(lv, 0.7);
          ItemDispenserBehavior.spawnItem(world, lv3, 6, lv, lv6);
-         world.syncWorldEvent(1049, pos, 0);
-         world.syncWorldEvent(2010, pos, lv.getId());
+         world.syncWorldEvent(WorldEvents.CRAFTER_CRAFT, pos, 0);
+         world.syncWorldEvent(WorldEvents.CRAFTER_SHOOT, pos, lv.getId());
       }
    }
 
diff -bur namedTargetSrc/net/minecraft/block/dispenser/ItemDispenserBehavior.java namedSrc/net/minecraft/block/dispenser/ItemDispenserBehavior.java
--- namedTargetSrc/net/minecraft/block/dispenser/ItemDispenserBehavior.java	2024-02-06 17:46:39.983720142 +0000
+++ namedSrc/net/minecraft/block/dispenser/ItemDispenserBehavior.java	2024-02-06 17:45:26.471704379 +0000
@@ -74,6 +74,6 @@
     * @mapping {@literal named spawnParticles Lnet/minecraft/block/dispenser/ItemDispenserBehavior;spawnParticles(Lnet/minecraft/util/math/BlockPointer;Lnet/minecraft/util/math/Direction;)V}
     */
    protected void spawnParticles(BlockPointer pointer, Direction side) {
-      pointer.world().syncWorldEvent(2000, pointer.pos(), side.getId());
+      pointer.world().syncWorldEvent(WorldEvents.DISPENSER_FIRED, pointer.pos(), side.getId());
    }
 }
diff -bur namedTargetSrc/net/minecraft/block/entity/BrushableBlockEntity.java namedSrc/net/minecraft/block/entity/BrushableBlockEntity.java
--- namedTargetSrc/net/minecraft/block/entity/BrushableBlockEntity.java	2024-02-06 17:46:40.163720178 +0000
+++ namedSrc/net/minecraft/block/entity/BrushableBlockEntity.java	2024-02-06 17:45:26.671704333 +0000
@@ -27,6 +27,7 @@
 import net.minecraft.util.math.BlockPos;
 import net.minecraft.util.math.Direction;
 import net.minecraft.util.math.Vec3d;
+import net.minecraft.world.WorldEvents;
 import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 
@@ -193,7 +194,7 @@
       if (this.world != null && this.world.getServer() != null) {
          this.dropContent(player);
          BlockState lv = this.getCachedState();
-         this.world.syncWorldEvent(3008, this.getPos(), Block.getRawIdFromState(lv));
+         this.world.syncWorldEvent(WorldEvents.BLOCK_BRUSHING_COMPLETE, this.getPos(), Block.getRawIdFromState(lv));
          Block lv4;
          if (this.getCachedState().getBlock() instanceof BrushableBlock lv3) {
             lv4 = lv3.getBlock();
diff -bur namedTargetSrc/net/minecraft/block/entity/JukeboxBlockEntity.java namedSrc/net/minecraft/block/entity/JukeboxBlockEntity.java
--- namedTargetSrc/net/minecraft/block/entity/JukeboxBlockEntity.java	2024-02-06 17:46:40.167720179 +0000
+++ namedSrc/net/minecraft/block/entity/JukeboxBlockEntity.java	2024-02-06 17:45:26.675704332 +0000
@@ -21,6 +21,7 @@
 import net.minecraft.util.math.BlockPos;
 import net.minecraft.util.math.Vec3d;
 import net.minecraft.world.World;
+import net.minecraft.world.WorldEvents;
 import net.minecraft.world.event.GameEvent;
 import org.jetbrains.annotations.Nullable;
 
@@ -126,7 +127,7 @@
       this.recordStartTick = this.tickCount;
       this.isPlaying = true;
       this.world.updateNeighborsAlways(this.getPos(), this.getCachedState().getBlock());
-      this.world.syncWorldEvent(null, 1010, this.getPos(), Item.getRawId(this.getStack().getItem()));
+      this.world.syncWorldEvent(null, WorldEvents.JUKEBOX_SONG_START, this.getPos(), Item.getRawId(this.getStack().getItem()));
       this.markDirty();
    }
 
@@ -138,7 +139,7 @@
       this.isPlaying = false;
       this.world.emitGameEvent(GameEvent.JUKEBOX_STOP_PLAY, this.getPos(), GameEvent.Context.create(this.getCachedState()));
       this.world.updateNeighborsAlways(this.getPos(), this.getCachedState().getBlock());
-      this.world.syncWorldEvent(1011, this.getPos(), 0);
+      this.world.syncWorldEvent(WorldEvents.JUKEBOX_SONG_STOP, this.getPos(), 0);
       this.markDirty();
    }
 
diff -bur namedTargetSrc/net/minecraft/block/entity/SculkShriekerBlockEntity.java namedSrc/net/minecraft/block/entity/SculkShriekerBlockEntity.java
--- namedTargetSrc/net/minecraft/block/entity/SculkShriekerBlockEntity.java	2024-02-06 17:46:40.215720189 +0000
+++ namedSrc/net/minecraft/block/entity/SculkShriekerBlockEntity.java	2024-02-06 17:45:26.731704319 +0000
@@ -36,6 +36,7 @@
 import net.minecraft.world.Difficulty;
 import net.minecraft.world.GameRules;
 import net.minecraft.world.World;
+import net.minecraft.world.WorldEvents;
 import net.minecraft.world.event.BlockPositionSource;
 import net.minecraft.world.event.GameEvent;
 import net.minecraft.world.event.PositionSource;
@@ -236,7 +237,7 @@
       BlockState lv2 = this.getCachedState();
       world.setBlockState(lv, lv2.with(SculkShriekerBlock.SHRIEKING, Boolean.valueOf(true)), Block.NOTIFY_LISTENERS);
       world.scheduleBlockTick(lv, lv2.getBlock(), 90);
-      world.syncWorldEvent(3007, lv, 0);
+      world.syncWorldEvent(WorldEvents.SCULK_SHRIEKER_TRIGGERED, lv, 0);
       world.emitGameEvent(GameEvent.SHRIEK, lv, GameEvent.Context.create(entity));
    }
 
diff -bur namedTargetSrc/net/minecraft/block/enums/VaultState.java namedSrc/net/minecraft/block/enums/VaultState.java
--- namedTargetSrc/net/minecraft/block/enums/VaultState.java	2024-02-06 17:46:40.063720158 +0000
+++ namedSrc/net/minecraft/block/enums/VaultState.java	2024-02-06 17:45:26.559704359 +0000
@@ -13,6 +13,7 @@
 import net.minecraft.util.math.BlockPos;
 import net.minecraft.util.math.Direction;
 import net.minecraft.util.math.Vec3d;
+import net.minecraft.world.WorldEvents;
 
 /**
  * @mapping {@literal hashed net/minecraft/unmapped/C_oocnpsfc}
@@ -31,7 +32,7 @@
       @Override
       protected void m_ursykhkw(ServerWorld world, BlockPos pos, C_cudfnjix arg3, C_czyoqmgb arg4) {
          arg4.m_hazdghto(ItemStack.EMPTY);
-         world.syncWorldEvent(3016, pos, 0);
+         world.syncWorldEvent(WorldEvents.VAULT_DEACTIVATED, pos, 0);
       }
    },
    /**
@@ -49,7 +50,7 @@
             VaultBlockEntity.C_vucktnfd.m_quliyibc(world, this, arg3, arg4, pos);
          }
 
-         world.syncWorldEvent(3015, pos, 0);
+         world.syncWorldEvent(WorldEvents.VAULT_ACTIVATED, pos, 0);
       }
    },
    /**
@@ -215,7 +216,7 @@
     */
    private void m_pqwuptlz(ServerWorld world, BlockPos pos, ItemStack stack, float f) {
       ItemDispenserBehavior.spawnItem(world, stack, 2, Direction.UP, Vec3d.ofBottomCenter(pos).relative(Direction.UP, 1.2));
-      world.syncWorldEvent(3017, pos, 0);
+      world.syncWorldEvent(WorldEvents.VAULT_EJECTS_ITEM, pos, 0);
       world.playSound(null, pos, SoundEvents.BLOCK_VAULT_EJECT_ITEM, SoundCategory.BLOCKS, 1.0F, 0.8F + 0.4F * f);
    }
 
diff -bur namedTargetSrc/net/minecraft/block/sculk/SculkBehavior.java namedSrc/net/minecraft/block/sculk/SculkBehavior.java
--- namedTargetSrc/net/minecraft/block/sculk/SculkBehavior.java	2024-02-06 17:46:40.119720169 +0000
+++ namedSrc/net/minecraft/block/sculk/SculkBehavior.java	2024-02-06 17:45:26.619704345 +0000
@@ -35,6 +35,7 @@
 import net.minecraft.util.math.Vec3i;
 import net.minecraft.util.random.RandomGenerator;
 import net.minecraft.world.WorldAccess;
+import net.minecraft.world.WorldEvents;
 import org.jetbrains.annotations.Nullable;
 import org.slf4j.Logger;
 
@@ -272,7 +273,7 @@
          for (SculkBehavior.ChargeCursor lv : this.cursors) {
             lv.update(world, pos, random, this, spread);
             if (lv.charge <= 0) {
-               world.syncWorldEvent(3006, lv.getPos(), 0);
+               world.syncWorldEvent(WorldEvents.SCULK_CHARGES, lv.getPos(), 0);
             } else {
                BlockPos lv2 = lv.getPos();
                object2IntMap.computeInt(lv2, (posx, integer) -> (integer == null ? 0 : integer) + lv.charge);
@@ -299,7 +300,7 @@
             if (i > 0 && collection != null) {
                int j = (int)(Math.log1p((double)i) / 2.3F) + 1;
                int k = (j << 6) + AbstractLichenBlock.packDirections(collection);
-               world.syncWorldEvent(3006, lv4, k);
+               world.syncWorldEvent(WorldEvents.SCULK_CHARGES, lv4, k);
             }
          }
 
diff -bur namedTargetSrc/net/minecraft/block/SnifferEggBlock.java namedSrc/net/minecraft/block/SnifferEggBlock.java
--- namedTargetSrc/net/minecraft/block/SnifferEggBlock.java	2024-02-06 17:46:40.119720169 +0000
+++ namedSrc/net/minecraft/block/SnifferEggBlock.java	2024-02-06 17:45:26.623704344 +0000
@@ -18,6 +18,7 @@
 import net.minecraft.util.shape.VoxelShape;
 import net.minecraft.world.BlockView;
 import net.minecraft.world.World;
+import net.minecraft.world.WorldEvents;
 import net.minecraft.world.event.GameEvent;
 
 /**
@@ -138,7 +139,7 @@
    public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) {
       boolean bl2 = isAboveHatchBooster(world, pos);
       if (!world.isClient() && bl2) {
-         world.syncWorldEvent(3009, pos, 0);
+         world.syncWorldEvent(WorldEvents.SNIFFER_EGG_CRACKS, pos, 0);
       }
 
       int i = bl2 ? 12000 : 24000;
diff -bur namedTargetSrc/net/minecraft/block/TurtleEggBlock.java namedSrc/net/minecraft/block/TurtleEggBlock.java
--- namedTargetSrc/net/minecraft/block/TurtleEggBlock.java	2024-02-06 17:46:40.187720183 +0000
+++ namedSrc/net/minecraft/block/TurtleEggBlock.java	2024-02-06 17:45:26.699704326 +0000
@@ -195,7 +195,7 @@
    @Override
    protected void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) {
       if (isSandBelow(world, pos) && !world.isClient) {
-         world.syncWorldEvent(2012, pos, 15);
+         world.syncWorldEvent(WorldEvents.TURTLE_EGG_PLACED, pos, 15);
       }
    }
 
diff -bur namedTargetSrc/net/minecraft/client/gui/screen/Screen.java namedSrc/net/minecraft/client/gui/screen/Screen.java
--- namedTargetSrc/net/minecraft/client/gui/screen/Screen.java	2024-02-06 17:46:40.007720147 +0000
+++ namedSrc/net/minecraft/client/gui/screen/Screen.java	2024-02-06 17:45:26.495704374 +0000
@@ -754,7 +754,7 @@
     * Mapping not found
     */
    @Override
-   public boolean isMouseOver(double d, double e) {
+   public boolean isMouseOver(double mouseX, double mouseY) {
       return true;
    }
 
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/ClickableWidget.java namedSrc/net/minecraft/client/gui/widget/ClickableWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/ClickableWidget.java	2024-02-06 17:46:40.223720190 +0000
+++ namedSrc/net/minecraft/client/gui/widget/ClickableWidget.java	2024-02-06 17:45:26.751704314 +0000
@@ -335,13 +335,13 @@
     * Mapping not found
     */
    @Override
-   public boolean isMouseOver(double d, double e) {
+   public boolean isMouseOver(double mouseX, double mouseY) {
       return this.active
          && this.visible
-         && d >= (double)this.getX()
-         && e >= (double)this.getY()
-         && d < (double)(this.getX() + this.width)
-         && e < (double)(this.getY() + this.height);
+         && mouseX >= (double)this.getX()
+         && mouseY >= (double)this.getY()
+         && mouseX < (double)(this.getX() + this.width)
+         && mouseY < (double)(this.getY() + this.height);
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/list/EntryListWidget.java namedSrc/net/minecraft/client/gui/widget/list/EntryListWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/list/EntryListWidget.java	2024-02-06 17:46:39.987720142 +0000
+++ namedSrc/net/minecraft/client/gui/widget/list/EntryListWidget.java	2024-02-06 17:45:26.475704378 +0000
@@ -597,8 +597,8 @@
     * Mapping not found
     */
    @Override
-   public boolean isMouseOver(double d, double e) {
-      return e >= (double)this.getY() && e <= (double)this.getYEnd() && d >= (double)this.getX() && d <= (double)this.getXEnd();
+   public boolean isMouseOver(double mouseX, double mouseY) {
+      return mouseY >= (double)this.getY() && mouseY <= (double)this.getYEnd() && mouseX >= (double)this.getX() && mouseX <= (double)this.getXEnd();
    }
 
    /**
@@ -863,8 +863,8 @@
        * @mapping {@literal named isMouseOver Lnet/minecraft/client/gui/widget/list/EntryListWidget$Entry;isMouseOver(DD)Z}
        */
       @Override
-      public boolean isMouseOver(double d, double e) {
-         return Objects.equals(this.parentList.getEntryAtPosition(d, e), this);
+      public boolean isMouseOver(double mouseX, double mouseY) {
+         return Objects.equals(this.parentList.getEntryAtPosition(mouseX, mouseY), this);
       }
    }
 }
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/recipe_book/RecipeAlternativesWidget.java namedSrc/net/minecraft/client/gui/widget/recipe_book/RecipeAlternativesWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/recipe_book/RecipeAlternativesWidget.java	2024-02-06 17:46:40.083720161 +0000
+++ namedSrc/net/minecraft/client/gui/widget/recipe_book/RecipeAlternativesWidget.java	2024-02-06 17:45:26.579704354 +0000
@@ -243,7 +243,7 @@
     * Mapping not found
     */
    @Override
-   public boolean isMouseOver(double d, double e) {
+   public boolean isMouseOver(double mouseX, double mouseY) {
       return false;
    }
 
diff -bur namedTargetSrc/net/minecraft/client/gui/widget/recipe_book/RecipeBookWidget.java namedSrc/net/minecraft/client/gui/widget/recipe_book/RecipeBookWidget.java
--- namedTargetSrc/net/minecraft/client/gui/widget/recipe_book/RecipeBookWidget.java	2024-02-06 17:46:40.231720192 +0000
+++ namedSrc/net/minecraft/client/gui/widget/recipe_book/RecipeBookWidget.java	2024-02-06 17:45:26.759704312 +0000
@@ -637,7 +637,7 @@
     * Mapping not found
     */
    @Override
-   public boolean isMouseOver(double d, double e) {
+   public boolean isMouseOver(double mouseX, double mouseY) {
       return false;
    }
 
diff -bur namedTargetSrc/net/minecraft/entity/passive/BeeEntity.java namedSrc/net/minecraft/entity/passive/BeeEntity.java
--- namedTargetSrc/net/minecraft/entity/passive/BeeEntity.java	2024-02-06 17:46:40.143720174 +0000
+++ namedSrc/net/minecraft/entity/passive/BeeEntity.java	2024-02-06 17:45:26.647704338 +0000
@@ -80,6 +80,7 @@
 import net.minecraft.util.math.int_provider.UniformIntProvider;
 import net.minecraft.world.Difficulty;
 import net.minecraft.world.World;
+import net.minecraft.world.WorldEvents;
 import net.minecraft.world.WorldView;
 import net.minecraft.world.poi.PointOfInterest;
 import net.minecraft.world.poi.PointOfInterestStorage;
@@ -1406,7 +1407,7 @@
                   }
 
                   if (lv4 != null) {
-                     BeeEntity.this.getWorld().syncWorldEvent(2011, lv, 15);
+                     BeeEntity.this.getWorld().syncWorldEvent(WorldEvents.BEE_GROWTH, lv, 15);
                      BeeEntity.this.getWorld().setBlockState(lv, lv4);
                      BeeEntity.this.addCropCounter();
                   }
diff -bur namedTargetSrc/net/minecraft/unmapped/C_jelkcvqk.java namedSrc/net/minecraft/unmapped/C_jelkcvqk.java
--- namedTargetSrc/net/minecraft/unmapped/C_jelkcvqk.java	2024-02-06 17:46:39.947720134 +0000
+++ namedSrc/net/minecraft/unmapped/C_jelkcvqk.java	2024-02-06 17:45:26.427704390 +0000
@@ -38,6 +38,7 @@
 import net.minecraft.world.MobSpawnerEntry;
 import net.minecraft.world.RaycastContext;
 import net.minecraft.world.World;
+import net.minecraft.world.WorldEvents;
 import net.minecraft.world.event.GameEvent;
 
 /**
@@ -235,8 +236,8 @@
                      if (!world.shouldCreateNewEntityWithPassenger(lv8)) {
                         return Optional.empty();
                      } else {
-                        world.syncWorldEvent(3011, pos, 0);
-                        world.syncWorldEvent(3012, lv6, 0);
+                        world.syncWorldEvent(WorldEvents.TRIAL_SPAWNER_SPAWNS_MOB, pos, 0);
+                        world.syncWorldEvent(WorldEvents.TRIAL_SPAWNER_SPAWNS_MOB_AT_POS, lv6, 0);
                         world.emitGameEvent(lv8, GameEvent.ENTITY_PLACE, lv6);
                         return Optional.of(lv8.getUuid());
                      }
@@ -260,7 +261,7 @@
             ItemDispenserBehavior.spawnItem(world, lv3, 2, Direction.UP, Vec3d.ofBottomCenter(pos).relative(Direction.UP, 1.2));
          }
 
-         world.syncWorldEvent(3014, pos, 0);
+         world.syncWorldEvent(WorldEvents.TRIAL_SPAWNER_EJECTS_ITEM, pos, 0);
       }
    }
 
diff -bur namedTargetSrc/net/minecraft/unmapped/C_kxkfzuix.java namedSrc/net/minecraft/unmapped/C_kxkfzuix.java
--- namedTargetSrc/net/minecraft/unmapped/C_kxkfzuix.java	2024-02-06 17:46:40.163720178 +0000
+++ namedSrc/net/minecraft/unmapped/C_kxkfzuix.java	2024-02-06 17:45:26.675704332 +0000
@@ -28,6 +28,7 @@
 import net.minecraft.util.random.RandomGenerator;
 import net.minecraft.world.MobSpawnerEntry;
 import net.minecraft.world.World;
+import net.minecraft.world.WorldEvents;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -215,7 +216,7 @@
       boolean bl = this.registeredPlayers.addAll(list);
       if (bl) {
          this.nextMobSpawnsAt = Math.max(world.getTime() + 40L, this.nextMobSpawnsAt);
-         world.syncWorldEvent(3013, pos, this.registeredPlayers.size());
+         world.syncWorldEvent(WorldEvents.TRIAL_SPAWNER_DETECTS_PLAYER, pos, this.registeredPlayers.size());
       }
    }
 
diff -bur namedTargetSrc/net/minecraft/world/WorldEvents.java namedSrc/net/minecraft/world/WorldEvents.java
--- namedTargetSrc/net/minecraft/world/WorldEvents.java	2024-02-06 17:46:40.207720187 +0000
+++ namedSrc/net/minecraft/world/WorldEvents.java	2024-02-06 17:45:26.719704321 +0000
@@ -686,15 +686,18 @@
     */
    public static final int TRIAL_SPAWNER_EJECTS_ITEM = 3014;
    /**
-    * Mapping not found
+    * @mapping {@literal hashed f_pqgyxnuu Lnet/minecraft/unmapped/C_kkbhcwdu;f_pqgyxnuu:I}
+    * @mapping {@literal named VAULT_ACTIVATED Lnet/minecraft/world/WorldEvents;VAULT_ACTIVATED:I}
     */
-   public static final int f_pqgyxnuu = 3015;
+   public static final int VAULT_ACTIVATED = 3015;
    /**
-    * Mapping not found
+    * @mapping {@literal hashed f_nrmqudnn Lnet/minecraft/unmapped/C_kkbhcwdu;f_nrmqudnn:I}
+    * @mapping {@literal named VAULT_DEACTIVATED Lnet/minecraft/world/WorldEvents;VAULT_DEACTIVATED:I}
     */
-   public static final int f_nrmqudnn = 3016;
+   public static final int VAULT_DEACTIVATED = 3016;
    /**
-    * Mapping not found
+    * @mapping {@literal hashed f_vzhxbibt Lnet/minecraft/unmapped/C_kkbhcwdu;f_vzhxbibt:I}
+    * @mapping {@literal named VAULT_EJECTS_ITEM Lnet/minecraft/world/WorldEvents;VAULT_EJECTS_ITEM:I}
     */
-   public static final int f_vzhxbibt = 3017;
+   public static final int VAULT_EJECTS_ITEM = 3017;
 }

Please sign in to comment.