mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fix custom payloads not being handled on the server in the game state. Closes #9948
Fix villagers not opening trade guis. Closes #9946
This commit is contained in:
4 files changed
+17
-2
No files matched your search
@@ -74,6 +74,7 @@ import net.minecraft.world.entity.SpawnGroupData;
|
||||
import net.minecraft.world.entity.animal.Animal;
|
||||
import net.minecraft.world.entity.item.ItemEntity;
|
||||
import net.minecraft.world.entity.monster.Zombie;
|
||||
import net.minecraft.world.entity.npc.AbstractVillager;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.projectile.FishingHook;
|
||||
import net.minecraft.world.entity.projectile.Projectile;
|
||||
@@ -87,6 +88,7 @@ import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.item.alchemy.PotionBrewing.Builder;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.item.trading.MerchantOffer;
|
||||
import net.minecraft.world.level.BaseSpawner;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
@@ -178,6 +180,7 @@ import net.minecraftforge.event.entity.player.PlayerWakeUpEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerXpEvent;
|
||||
import net.minecraftforge.event.entity.player.SleepingLocationCheckEvent;
|
||||
import net.minecraftforge.event.entity.player.SleepingTimeCheckEvent;
|
||||
import net.minecraftforge.event.entity.player.TradeWithVillagerEvent;
|
||||
import net.minecraftforge.event.furnace.FurnaceFuelBurnTimeEvent;
|
||||
import net.minecraftforge.event.level.AlterGroundEvent;
|
||||
import net.minecraftforge.event.level.BlockEvent;
|
||||
@@ -1053,4 +1056,8 @@ public final class ForgeEventFactory {
|
||||
public static AnvilRepairEvent onAnvilRepair(Player player, @NotNull ItemStack output, @NotNull ItemStack left, @NotNull ItemStack right) {
|
||||
return fire(new AnvilRepairEvent(player, left, right, output));
|
||||
}
|
||||
|
||||
public static void onPlayerTradeWithVillager(Player player, MerchantOffer offer, AbstractVillager villager) {
|
||||
post(new TradeWithVillagerEvent(player, offer, villager));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user