Map some poi and village stuff (#604)

* Map some poi and village stuff

Signed-off-by: liach <liach@users.noreply.github.com>

* Update based on suggestion
traderrecipe -> tradeoffer

Signed-off-by: liach <liach@users.noreply.github.com>
This commit is contained in:
liach 2019-04-12 22:16:50 +08:00 committed by Modmuss50
parent 6216cbc25c
commit a4de6322db
25 changed files with 89 additions and 44 deletions

View File

@ -1,17 +1,17 @@
CLASS lr net/minecraft/client/network/packet/SetVillagerRecipesPacket
CLASS lr net/minecraft/client/network/packet/SetTradeOffersPacket
FIELD a syncId I
FIELD b recipes Lbgf;
FIELD c levelProgress I
FIELD d experience I
FIELD e canLevel Z
FIELD e levelled Z
METHOD <init> (ILbgf;IIZ)V
ARG 1 syncId
ARG 2 recipes
ARG 3 levelProgress
ARG 4 experience
ARG 5 canLevel
ARG 5 levelled
METHOD b getSyncId ()I
METHOD c getRecipes ()Lbgf;
METHOD c getOffers ()Lbgf;
METHOD d getLevelProgress ()I
METHOD e getExperience ()I
METHOD f canLevel ()Z
METHOD f isLevelled ()Z

View File

@ -53,6 +53,7 @@ CLASS axv net/minecraft/container/Container
ARG 1 stack
ARG 2 startIndex
ARG 3 endIndex
ARG 4 fromLast
METHOD a canInsertIntoSlot (Lbbu;Lazi;)Z
METHOD a canStacksCombine (Lbbu;Lbbu;)Z
METHOD a calculateComparatorOutput (Lbtf;)I

View File

@ -1,22 +1,31 @@
CLASS ayy net/minecraft/container/MerchantContainer
FIELD c villager Lbgd;
FIELD d villagerInventory Layx;
FIELD c trader Lbgd;
FIELD d traderInventory Layx;
FIELD e levelProgress I
FIELD f canLevel Z
FIELD f levelled Z
METHOD <init> (ILavq;)V
ARG 1 syncId
ARG 2 playerInventory
METHOD <init> (ILavq;Lbgd;)V
ARG 1 syncId
METHOD a setRecipes (Lbgf;)V
ARG 2 playerInventory
ARG 3 trader
METHOD a setOffers (Lbgf;)V
METHOD a setCanLevel (Z)V
ARG 1 canLevel
METHOD b equals (Lbbu;Lbbu;)Z
ARG 1 itemStack
ARG 2 otherItemStack
METHOD c autofill (ILbbu;)V
ARG 1 slot
ARG 2 stack
METHOD d setRecipeIndex (I)V
METHOD e getExperience ()I
METHOD e setExperienceFromServer (I)V
METHOD f getTraderRewardedExperience ()I
METHOD f setLevelProgress (I)V
METHOD g getLevelProgress ()I
METHOD g switchTo (I)V
ARG 1 recipeIndex
METHOD h getRecipes ()Lbgf;
METHOD i canLevel ()Z
METHOD i isLevelled ()Z

View File

@ -16,6 +16,7 @@ CLASS azi net/minecraft/container/Slot
ARG 1 player
ARG 2 stack
METHOD a canInsert (Lbbu;)Z
ARG 1 stack
METHOD a onCrafted (Lbbu;I)V
ARG 1 stack
ARG 2 amount

View File

@ -0,0 +1,12 @@
CLASS ayz net/minecraft/container/TradeOutputSlot
FIELD a traderInventory Layx;
FIELD b player Lavr;
FIELD g amount I
FIELD h trader Lbgd;
METHOD <init> (Lavr;Lbgd;Layx;III)V
ARG 1 player
ARG 2 trader
ARG 3 traderInventory
ARG 4 index
ARG 5 x
ARG 6 y

View File

@ -1,12 +0,0 @@
CLASS ayz net/minecraft/container/VillagerOutputSlot
FIELD a villagerInventory Layx;
FIELD b player Lavr;
FIELD g amount I
FIELD h villager Lbgd;
METHOD <init> (Lavr;Lbgd;Layx;III)V
ARG 1 player
ARG 2 villager
ARG 3 VillagerInventory
ARG 4 index
ARG 5 xPosition
ARG 6 yPosition

View File

@ -0,0 +1,3 @@
CLASS aac net/minecraft/datafixers/DataFixTypes
FIELD k typeReference Lcom/mojang/datafixers/DSL$TypeReference;
METHOD a getTypeReference ()Lcom/mojang/datafixers/DSL$TypeReference;

View File

@ -8,6 +8,7 @@ CLASS adn net/minecraft/datafixers/TypeReferences
FIELD g STATS Lcom/mojang/datafixers/DSL$TypeReference;
FIELD h SAVED_DATA Lcom/mojang/datafixers/DSL$TypeReference;
FIELD i ADVANCEMENTS Lcom/mojang/datafixers/DSL$TypeReference;
FIELD j POI_CHUNK Lcom/mojang/datafixers/DSL$TypeReference;
FIELD k BLOCK_ENTITY Lcom/mojang/datafixers/DSL$TypeReference;
FIELD l ITEM_STACK Lcom/mojang/datafixers/DSL$TypeReference;
FIELD m BLOCK_STATE Lcom/mojang/datafixers/DSL$TypeReference;

View File

@ -0,0 +1,2 @@
CLASS adq net/minecraft/datafixers/fixes/PointOfInterestReorganizationFix
METHOD a reorganize (Lcom/mojang/datafixers/Dynamic;)Lcom/mojang/datafixers/Dynamic;

View File

@ -1,5 +1,5 @@
CLASS ava net/minecraft/entity/passive/AbstractTraderEntity
FIELD bA recipes Lbgf;
FIELD bA offers Lbgf;
FIELD bB customer Lavr;
FIELD bC inventory Lahd;
FIELD bD headRollingTimeLeft I

View File

@ -33,7 +33,7 @@ CLASS avr net/minecraft/entity/player/PlayerEntity
FIELD e sleepTimer I
FIELD f spawnPosition Lev;
FIELD g spawnForced Z
METHOD a sendVillagerRecipes (ILbgf;IIZ)V
METHOD a sendTradeOffers (ILbgf;IIZ)V
ARG 1 syncId
METHOD a openContainer (Lahb;)Ljava/util/OptionalInt;
METHOD a addCritParticles (Laid;)V

View File

@ -14,6 +14,7 @@ CLASS avq net/minecraft/entity/player/PlayerInventory
METHOD a addPickBlock (Lbbu;)V
METHOD a canStackAddMore (Lbbu;Lbbu;)Z
ARG 1 existingStack
METHOD a offerOrDrop (Lbha;Lbbu;)V
METHOD a getBlockBreakingSpeed (Lbvc;)F
METHOD a serialize (Lii;)Lii;
METHOD a contains (Lza;)Z

View File

@ -77,7 +77,7 @@ CLASS kd net/minecraft/network/listener/ClientPlayPacketListener
ARG 1 packet
METHOD a onMapUpdate (Llq;)V
ARG 1 packet
METHOD a onSetVillagerRecipes (Llr;)V
METHOD a onSetTradeOffers (Llr;)V
ARG 1 packet
METHOD a onEntityUpdate (Lls;)V
ARG 1 packet

View File

@ -1,5 +1,6 @@
CLASS bxf net/minecraft/util/palette/ArrayPalette
FIELD a idList Lfe;
FIELD b array [Ljava/lang/Object;
FIELD c resizeListener Lbxi;
FIELD d valueDeserializer Ljava/util/function/Function;
FIELD e indexBits I
@ -8,3 +9,4 @@ CLASS bxf net/minecraft/util/palette/ArrayPalette
ARG 2 integer
ARG 3 resizeListener
ARG 4 valueDeserializer
METHOD b getSize ()I

View File

@ -1,5 +1,6 @@
CLASS bwz net/minecraft/util/palette/IdListPalette
FIELD a idList Lfe;
FIELD b fallback Ljava/lang/Object;
METHOD <init> (Lfe;Ljava/lang/Object;)V
ARG 1 idList
ARG 2 defaultValue

View File

@ -8,5 +8,7 @@ CLASS bxh net/minecraft/util/palette/Palette
ARG 1 object
METHOD a fromPacket (Ljc;)V
ARG 1 buf
METHOD b accepts (Ljava/lang/Object;)Z
ARG 1 object
METHOD b toPacket (Ljc;)V
ARG 1 buf

View File

@ -3,14 +3,17 @@ CLASS aqc net/minecraft/village/PointOfInterestSet
FIELD b pointsOfInterestByPos Lit/unimi/dsi/fastutil/shorts/Short2ObjectMap;
FIELD c pointsOfInterestByType Ljava/util/Map;
FIELD d updateListener Ljava/lang/Runnable;
FIELD e valid Z
METHOD <init> (Ljava/lang/Runnable;)V
ARG 1 updateListener
METHOD a add (Laqb;)Z
METHOD a remove (Lev;)V
ARG 1 pos
METHOD a add (Lev;Laqd;)V
METHOD a test (Lev;Ljava/util/function/Predicate;)Z
ARG 1 pos
ARG 2 predicate
METHOD a updatePointsOfInterest (Ljava/util/function/Consumer;)V
METHOD a get (Ljava/util/function/Predicate;Laqa$b;)Ljava/util/stream/Stream;
METHOD c releaseTicket (Lev;)Z
ARG 1 pos

View File

@ -9,6 +9,9 @@ CLASS aqa net/minecraft/village/PointOfInterestStorage
FIELD d predicate Ljava/util/function/Predicate;
METHOD a getPredicate ()Ljava/util/function/Predicate;
FIELD a pointOfInterestDistanceTracker Laqa$a;
METHOD a initForPalette (Lbgn;Lbxd;)V
METHOD a shouldScan (Lbxd;)Z
METHOD a scanAndPopulate (Lbxd;Lfo;Ljava/util/function/BiConsumer;)V
METHOD a remove (Lev;)V
ARG 1 pos
METHOD a add (Lev;Laqd;)V

View File

@ -1,10 +1,21 @@
CLASS aqd net/minecraft/village/PointOfInterestType
FIELD a ALWAYS_TRUE Ljava/util/function/Predicate;
FIELD s IS_USED_BY_PROFESSION Ljava/util/function/Predicate;
FIELD t BED_STATES Ljava/util/Set;
FIELD u BLOCK_STATE_TO_POINT_OF_INTEREST_TYPE Ljava/util/Map;
FIELD v id Ljava/lang/String;
FIELD w workStationStates Ljava/util/Set;
FIELD x ticketCount I
FIELD y sound Lyi;
FIELD z completionCondition Ljava/util/function/Predicate;
METHOD a setup (Laqd;)Laqd;
METHOD a getAllStatesOf (Lbme;)Ljava/util/Set;
METHOD a register (Ljava/lang/String;Ljava/util/Set;ILyi;)Laqd;
ARG 0 id
METHOD a register (Ljava/lang/String;Ljava/util/Set;ILyi;Ljava/util/function/Predicate;)Laqd;
ARG 0 id
METHOD b getTicketCount ()I
METHOD b from (Lbvc;)Ljava/util/Optional;
METHOD c getCompletionCondition ()Ljava/util/function/Predicate;
METHOD d getSound ()Lyi;
METHOD e getAllAssociatedStates ()Ljava/util/stream/Stream;

View File

@ -1,14 +1,14 @@
CLASS bge net/minecraft/village/TraderRecipe
CLASS bge net/minecraft/village/TradeOffer
FIELD a firstBuyItem Lbbu;
FIELD b secondBuyItem Lbbu;
FIELD c sellItem Lbbu;
FIELD d uses I
FIELD e maxUses I
FIELD f rewardExp Z
FIELD g tax I
FIELD f rewardingPlayerExperience Z
FIELD g specialPrice I
FIELD h demandBonus I
FIELD i priceMultiplier F
FIELD j rewardedExp I
FIELD j traderExperience I
METHOD <init> (Lbbu;Lbbu;IIF)V
ARG 1 buyItem
ARG 2 sellItem
@ -30,30 +30,30 @@ CLASS bge net/minecraft/village/TraderRecipe
ARG 5 maxUses
ARG 6 rewardedExp
ARG 7 priceMultiplier
METHOD a getFirstBuyItem ()Lbbu;
METHOD a increaseTax (I)V
METHOD a getOriginalFirstBuyItem ()Lbbu;
METHOD a increaseSpecialPrice (I)V
METHOD a matchesBuyItems (Lbbu;Lbbu;)Z
ARG 1 first
ARG 2 second
METHOD b getDiscountedFirstBuyItem ()Lbbu;
METHOD b setTax (I)V
METHOD b getAdjustedFirstBuyItem ()Lbbu;
METHOD b setSpecialPrice (I)V
METHOD b depleteBuyItems (Lbbu;Lbbu;)Z
METHOD c getSecondBuyItem ()Lbbu;
METHOD c acceptsBuy (Lbbu;Lbbu;)Z
ARG 1 given
ARG 2 sample
METHOD d getModifiableSellItem ()Lbbu;
METHOD d getMutableSellItem ()Lbbu;
METHOD e updatePriceOnDemand ()V
METHOD f getSellItem ()Lbbu;
METHOD g getUses ()I
METHOD h resetUses ()V
METHOD i getMaxUses ()I
METHOD j use ()V
METHOD k clearTax ()V
METHOD l getTax ()I
METHOD k clearSpecialPrice ()V
METHOD l getSpecialPrice ()I
METHOD m getPriceMultiplier ()F
METHOD n getRewardedExp ()I
METHOD n getTraderExperience ()I
METHOD o isDisabled ()Z
METHOD p clearUses ()V
METHOD q shouldRewardExp ()Z
METHOD q shouldRewardPlayerExperience ()Z
METHOD r toTag ()Lib;

View File

@ -1,4 +1,4 @@
CLASS avi net/minecraft/village/Trades
CLASS avi net/minecraft/village/TradeOffers
CLASS avi$a SellDyedArmorFactory
FIELD a sell Lbbp;
FIELD b price I

View File

@ -1,7 +1,7 @@
CLASS bgd net/minecraft/village/Trader
METHOD a sendRecipes (Lavr;Ljm;I)V
METHOD a useRecipe (Lbge;)V
METHOD a setRecipesFromServer (Lbgf;)V
METHOD a sendOffers (Lavr;Ljm;I)V
METHOD a trade (Lbge;)V
METHOD a setOffersFromServer (Lbgf;)V
METHOD dS getExperience ()I
METHOD dT getCurrentCustomer ()Lavr;
METHOD dV getOffers ()Lbgf;

View File

@ -3,9 +3,11 @@ CLASS ayx net/minecraft/village/TraderInventory
FIELD b inventory Lfj;
FIELD c traderRecipe Lbge;
FIELD d recipeIndex I
FIELD e traderRewardedExperience I
METHOD c setRecipeIndex (I)V
ARG 1 index
METHOD d needRecipeUpdate (I)Z
ARG 1 slot
METHOD f updateRecipes ()V
METHOD g getVillagerRecipe ()Lbge;
METHOD g getTradeOffer ()Lbge;
METHOD h getTraderRewardedExperience ()I

View File

@ -1,4 +1,4 @@
CLASS bgf net/minecraft/village/TraderRecipeList
CLASS bgf net/minecraft/village/TraderOfferList
METHOD a toTag ()Lib;
METHOD a getValidRecipe (Lbbu;Lbbu;I)Lbge;
ARG 1 firstBuyItem

View File

@ -2,12 +2,15 @@ CLASS avh net/minecraft/village/VillagerProfession
FIELD p id Ljava/lang/String;
FIELD q workStation Laqd;
FIELD r gatherableItems Lcom/google/common/collect/ImmutableSet;
FIELD s secondaryJobSites Lcom/google/common/collect/ImmutableSet;
METHOD <init> (Ljava/lang/String;Laqd;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;)V
ARG 1 id
ARG 2 workStation
ARG 3 gatherableItems
ARG 4 secondaryJobSites
METHOD a register (Ljava/lang/String;Laqd;)Lavh;
ARG 0 key
METHOD a register (Ljava/lang/String;Laqd;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;)Lavh;
METHOD b getWorkStation ()Laqd;
METHOD c getGatherableItems ()Lcom/google/common/collect/ImmutableSet;
METHOD d getSecondaryJobSites ()Lcom/google/common/collect/ImmutableSet;