From fde49241fa61c85208f78727ee16b8e04e92cf07 Mon Sep 17 00:00:00 2001 From: LexManos Date: Wed, 6 Jun 2012 06:00:08 -0700 Subject: [PATCH] Updated MCP mapings. Moved the bulk of custom logic from RenderItem to ForgeHooksClient. --- forge/conf/fields.csv | 29 +++- forge/conf/methods.csv | 76 ++++++++-- .../minecraft/src/forge/ForgeHooksClient.java | 110 +++++++++++++++ .../net/minecraft/src/BlockChest.java.patch | 16 +-- .../src/EnchantmentHelper.java.patch | 2 +- .../net/minecraft/src/EntityLiving.java.patch | 2 +- .../net/minecraft/src/EntityOcelot.java.patch | 2 +- .../net/minecraft/src/Item.java.patch | 4 +- .../net/minecraft/src/ItemRenderer.java.patch | 2 +- .../minecraft/src/NetClientHandler.java.patch | 16 +-- .../net/minecraft/src/RenderBiped.java.patch | 2 +- .../net/minecraft/src/RenderItem.java.patch | 131 +++--------------- .../net/minecraft/src/RenderPlayer.java.patch | 2 +- .../net/minecraft/src/World.java.patch | 30 ++-- .../src/WorldGenHugeTrees.java.patch | 12 +- .../net/minecraft/src/BlockChest.java.patch | 16 +-- .../src/EnchantmentHelper.java.patch | 2 +- .../net/minecraft/src/EntityOcelot.java.patch | 2 +- .../net/minecraft/src/World.java.patch | 32 ++--- .../src/WorldGenHugeTrees.java.patch | 12 +- 20 files changed, 297 insertions(+), 203 deletions(-) diff --git a/forge/conf/fields.csv b/forge/conf/fields.csv index 7173849bd7..25bc682f3c 100644 --- a/forge/conf/fields.csv +++ b/forge/conf/fields.csv @@ -592,7 +592,7 @@ field_1792_b,zoom,0, field_1793_a,currentRender,0, field_185_a,fullscreen,0, field_186_a,mainFrame,0,"Reference to the main frame, in this case, the applet window itself." -field_188_b,chunkZPos,0,The Z position of this Chunk Coordinate Pair +field_188_b,chunkZPosition,0,The Z position of this Chunk Coordinate Pair field_189_a,chunkXPos,0,The X position of this Chunk Coordinate Pair field_191_a,renderManager,0, field_194_c,shadowOpaque,0,Determines the darkness of the object's shadow. Higher value makes a darker shadow. @@ -681,6 +681,7 @@ field_20901_a,courseChangeCooldown,0, field_20902_c,waypointY,0, field_20913_d,minecartType,0,"The type of minecart, 2 for powered, 1 for storage." field_20914_E,entityList,0,"Contains all entities for this client, both spawned and non-spawned." +field_20915_C,clientChunkProvider,0,The ChunkProviderClient instance field_20917_a,transactionID,0, field_20919_a,mcFrame,0,Reference to the main frame. field_20920_e,mainModel,0, @@ -2022,8 +2023,11 @@ field_40085_a,inGround,0, field_40086_ar,ticksInAir,0, field_40087_aq,ticksInGround,0, field_40089_d,potionDamage,0,The damage value of the thrown potion that this EntityPotion represents. +field_40091_d,targetZ,0,'z' location the eye should float towards. field_40092_e,despawnTimer,0, field_40093_ao,shatterOrDrop,0, +field_40094_b,targetX,0,'x' location the eye should float towards. +field_40095_c,targetY,0,'y' location the eye should float towards. field_400_at,mobSpawner,0, field_40103_a,materialType,0,the material type for dropped items/blocks field_40104_aw,bobTimer,0,The height of the current bob @@ -2263,7 +2267,8 @@ field_40527_z,thresholdEnchantability,0,"Used on the formula of base enchantabil field_40528_y,levelEnchantability,0,Holds how much each level increased the enchantability factor to be able to use this enchant. field_40529_x,baseEnchantability,0,Holds the base factor of enchantability needed to be able to use the enchant. field_40531_f,saveDirectoryName,0,The directory name of the world -field_40535_e,nameColor,0,The color given to the name of items with that rarity. +field_40532_f,rarityName,0,Rarity name. +field_40535_e,rarityColor,0,A decimal representation of the hex color codes of a the color assigned to this rarity type. (13 becomes d as in \247d which is light purple) field_4053_bc,netherrack,0, field_40548_r,projectile,0,This kind of damage is based on a projectile or not. field_40549_q,fireDamage,0,This kind of damage is based on fire or not. @@ -2339,6 +2344,8 @@ field_40723_L,spikeGen,0, field_40725_r,hardcore,0,Hardcore mode flag field_4072_a,blockType,0,Boolean used to seperate different states of blocks field_40732_j,enchantability,0,Defines the natural enchantability factor of the material. +field_40733_b,textureOffsetY,0,The y coordinate offset of the texture +field_40734_a,textureOffsetX,0,The x coordinate offset of the texture field_40741_v,isGapLightingUpdated,0, field_40752_d,strongComponentType,0, field_407_ao,bookShelf,0, @@ -2546,6 +2553,7 @@ field_46019_bU,tasks,0, field_46020_bQ,entityLivingToAttack,0,"is only being set, has no uses as of MC 1.1" field_46021_am,jumpHelper,0,Entity jumping helper field_46026_at,damage,0, +field_46027_au,knockbackStrength,0,The amount of knockback an arrow applies when it hits a mob. field_46029_e,doneButton,0,This GUI's 'Done' button. field_46031_f,terrainType,0, field_46032_d,terrainType,0, @@ -2581,6 +2589,7 @@ field_46086_d,idleTime,0,A decrementing tick that stops the entity from being id field_46087_b,lookX,0,X offset to look at field_46088_c,lookZ,0,Z offset to look at field_46089_a,idleEntity,0,The entity that is looking idle. +field_46091_d,attackTick,0,An amount of decrementing ticks that allows the entity to attack once the tick reaches 0. field_46094_c,entityTarget,0, field_46095_a,worldObj,0, field_46097_d,zPosition,0, @@ -2647,6 +2656,7 @@ field_48164_e,customParam1,0,Custom parameter 1 passed to the tile entity on upd field_48165_b,yPosition,0,The Y position of the tile entity to update. field_48166_c,zPosition,0,The Z position of the tile entity to update. field_48167_a,xPosition,0,The X position of the tile entity to update. +field_48169_h,headYaw,0,The yaw of the entity's head. field_48171_f,includeInitialize,0,Whether to initialize the Chunk before applying the effect of the Packet51MapChunk. field_48172_g,tempLength,0,The length of the compressed chunk data byte array. field_48173_d,yChMax,0,"The y-position of the highest chunk Section in the transmitted chunk, in chunk coordinates." @@ -2657,6 +2667,7 @@ field_48177_a,xCh,0,"The x-position of the transmitted chunk, in chunk coordinat field_48179_i,temp,0,A temporary storage for the compressed chunk data byte array. field_48193_b,woodMetadata,0,Sets the metadata for the wood blocks used field_48194_c,leavesMetadata,0,Sets the metadata for the leaves used in huge trees +field_48195_a,baseHeight,0,The base height of the tree field_48199_d,metaLeaves,0,The metadata value of the leaves to use in tree generation. field_481_e,metadataArray,0,The metadata for each block changed. field_48200_b,growVines,0,Indicator that the tree generator needs to grown vines on the trees. @@ -2684,6 +2695,8 @@ field_48255_c,insidePosX,0, field_48256_a,entityObj,0, field_48259_d,theAnimal,0, field_48260_e,targetMate,0, +field_48261_b,spawnBabyDelay,0,Delay preventing a baby from spawning immediately when two mate-able animals find each other. +field_48262_c,moveSpeed,0,The speed the creature moves at during mating behavior. field_48263_a,theWorld,0, field_48267_b,attacker,0, field_48268_h,classTarget,0, @@ -2907,6 +2920,7 @@ field_52007_b,height,0,Button height in pixels field_52008_a,width,0,Button width in pixels field_52009_d,lastServerName,0,Remembers the last hostname or IP address entered into text field between invocations of the GUI. field_52010_b,maxChatLength,0,Maximum number of characters allowed in chat string in each packet. +field_52012_a,snooper,0,The PlayerUsageSnooper object. field_52015_r,colorCodeRegex,0,Compiled regular expression pattern for matching color codes in a string field_52024_b,serverUrl,0,URL of the server to send the report to field_52025_a,dataMap,0,String map for report data @@ -3224,6 +3238,7 @@ field_885_a,plantBlockId,0,The ID of the plant block used in this plant generato field_886_b,chunkMapping,0,The mapping between ChunkCoordinates and Chunks that ChunkProviderClient maintains. field_887_a,blankChunk,0,The completely empty chunk used by ChunkProviderClient when field_886_b doesn't contain the requested coordinates. field_888_d,worldObj,0,Reference to the World object. +field_889_c,chunkListing,0,"This may have been intended to be an iterable version of all currently loaded chunks (MultiplayerChunkCache), with identical contents to chunkMapping's values. However it is never actually added to." field_890_b,lastQueriedChunkZPosition,0,The last Z position of a chunk that was returned from func_553_b field_891_a,lastQueriedChunkXPos,0,The last X position of a chunk that was returned from func_553_b field_892_h,lastQueriedChunk,0,The last Chunk that was returned from func_553_b @@ -4506,7 +4521,10 @@ field_40052_h,ticksInGround,1, field_40053_i,ticksInAir,1, field_40055_d,potionDamage,1,The damage value of the thrown potion that this EntityPotion represents. field_40057_f,shatterOrDrop,1, +field_40058_d,targetZ,1,'z' location the eye should float towards. field_40059_e,despawnTimer,1, +field_40060_b,targetX,1,'x' location the eye should float towards. +field_40061_c,targetY,1,'y' location the eye should float towards. field_40064_f,bookSpread,1,The amount that the book is open. field_40065_g,bookSpreadPrev,1,The amount that the book was open last tick. field_40068_b,pageFlip,1,Value used for determining how the page flip should look. @@ -4999,6 +5017,7 @@ field_46001_d,terrainType,1, field_46002_f,terrainType,1, field_46005_c,hasMadeChest,1, field_46006_a,chestLoot,1, +field_46010_n,knockbackStrength,1,The amount of knockback an arrow applies when it hits a mob. field_46011_m,damage,1, field_46024_aI,entityLivingToAttack,1,"is only being set, has no uses as of MC 1.1" field_46025_aM,tasks,1, @@ -5037,6 +5056,7 @@ field_46082_t,forestHills,1,Forest Hills biome. field_46083_s,desertHills,1,Desert Hills biome. field_46084_r,beach,1,Beach biome. field_46093_a,mutexBits,1,"A bitmask telling which other tasks may not run concurrently. The test is a simple bitwise AND - if it yields zero, the two tasks may run concurrently, if not - they must run exclusively from each other." +field_46095_d,attackTick,1,An amount of decrementing ticks that allows the entity to attack once the tick reaches 0. field_46098_c,entityTarget,1, field_46099_a,worldObj,1, field_46101_d,zPosition,1, @@ -5078,6 +5098,7 @@ field_48107_b,zCh,1,"The z-position of the transmitted chunk, in chunk coordinat field_48108_c,yChMin,1,"The y-position of the lowest chunk Section in the transmitted chunk, in chunk coordinates." field_48109_a,xCh,1,"The x-position of the transmitted chunk, in chunk coordinates." field_48111_i,temp,1,A temporary storage for the compressed chunk data byte array. +field_48113_h,headYaw,1,The yaw of the entity's head. field_48114_b,headRotationYaw,1, field_48115_a,entityId,1, field_48116_f,customParam2,1,Custom parameter 2 passed to the tile entity on update. @@ -5128,6 +5149,8 @@ field_48192_a,theEntity,1, field_48199_d,theAnimal,1, field_481_e,nameToClassMap,1,A HashMap storing string names of classes mapping to the actual java.lang.Class type. field_48200_e,targetMate,1, +field_48201_b,spawnBabyDelay,1,Delay preventing a baby from spawning immediately when two mate-able animals find each other. +field_48202_c,moveSpeed,1,The speed the creature moves at during mating behavior. field_48203_a,theWorld,1, field_48206_b,speed,1, field_48209_e,speed,1, @@ -5211,6 +5234,7 @@ field_48401_c,metaWood,1,The metadata value of the wood to use in tree generatio field_48402_a,minTreeHeight,1,The minimum height of a generated tree. field_48404_b,woodMetadata,1,Sets the metadata for the wood blocks used field_48405_c,leavesMetadata,1,Sets the metadata for the leaves used in huge trees +field_48406_a,baseHeight,1,The base height of the tree field_48410_f,isMovementBlockAllowed,1,should the PathFinder disregard BlockMovement type materials in its path field_48411_g,isPathingInWater,1, field_48412_e,isWoddenDoorAllowed,1,should the PathFinder go through wodden door blocks @@ -5333,6 +5357,7 @@ field_515_l,fire,1, field_517_j,sponge,1, field_518_i,plants,1, field_52004_b,maxChatLength,1,Maximum number of characters allowed in chat string in each packet. +field_52017_a,snooper,1,The PlayerUsageSnooper object. field_520_g,lava,1, field_521_f,water,1, field_522_e,iron,1, diff --git a/forge/conf/methods.csv b/forge/conf/methods.csv index e874dc5095..76a499cd7e 100644 --- a/forge/conf/methods.csv +++ b/forge/conf/methods.csv @@ -813,6 +813,7 @@ func_27165_m,updateWeather,0,Updates all weather states. func_27166_f,getWeightedThunderStrength,0, func_27167_r,canLightningStrikeAt,0, func_27174_a,windowClick,0, +func_27179_a,writeStats,0,write a whole Map of stats to the statmap func_27181_b,canUnlockAchievement,0,"Returns true if the parent has been unlocked, or there is no parent" func_27182_c,syncStats,0, func_27183_a,hasAchievementUnlocked,0,Returns true if the achievement has been unlocked. @@ -981,7 +982,7 @@ func_28115_a,handleDoorChange,0, func_28116_a,handleMapData,0,Contains logic for handling packets containing arbitrary unique item data. Currently this is only for maps. func_28117_a,quitWithPacket,0, func_28125_a,mergeItemStack,0,merges provided ItemStack with the first avaliable one in the container/player inventory -func_28126_h,isOpaque,0,Indicates if the material is translucent +func_28126_h,isOpaque,0,Indicate if the material is opaque func_28127_i,setTranslucent,0,Marks the material as translucent func_28136_a,playAuxSFX,0,"Plays a pre-canned sound effect along with potentially auxiliary data-driven one-shot behaviour (particles, etc)." func_28138_e,isTerminating,0,Gets whether the Network manager is terminating. @@ -1083,9 +1084,9 @@ func_31061_i,isHarvestable,0,Returns true if material can be harvested by player func_31062_n,setNoHarvest,0,Disables the ability to harvest this material. func_31063_k,setNoPushMobility,0,"This type of material can't be pushed, but pistons can move over it." func_31064_j,getMaterialMobility,0,"Returns the mobility information of the material, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons" -func_31069_a,cacheSpecialRenderInfo,0,Called from TileEntityRenderer.cacheSpecialRenderInfo() to cache render-related references (currently world only). Used by TileEntityRendererPiston to create and store a RenderBlocks instance in the blockRenderer field. +func_31069_a,onWorldChange,0,"Called when the ingame world being rendered changes (e.g. on world -> nether travel) due to using one renderer per tile entity type, rather than instance" func_31070_a,renderPiston,0, -func_31072_a,cacheSpecialRenderInfo,0,Called from cacheActiveRenderInfo() to cache render-related references for TileEntitySpecialRenderers in specialRendererMap. Currently only the world reference from cacheActiveRenderInfo() is passed to this method. +func_31072_a,setWorld,0,Sets the world used by all TileEntitySpecialRender instances and notifies them of this change. func_31073_c,getFoliageColorBasic,0, func_31074_b,renderPistonBase,0,renders a block as a piston base func_31075_a,renderBlockAllFaces,0,Render all faces of a block @@ -1252,6 +1253,7 @@ func_35291_d,isFenceGateOpen,0,Returns if the fence gate is open according to it func_35293_c,fertilizeMushroom,0,Fertilize the mushroom. func_35294_i,fertilizeStem,0, func_35295_j,getGrowthModifier,0, +func_35296_f,getState,0,"Returns the current state of the stem. Returns -1 if the stem is not fully grown, or a value between 0 and 3 based on the direction the stem is facing." func_35298_d,canThisPaneConnectToThisBlockID,0,Gets passed in the blockID of the block adjacent and supposed to return true if its allowed to connect to the type of blockID passed in. Args: blockID func_35299_s,getSideTextureIndex,0,Returns the texture index of the thin side of the pane. func_352_a,writeEntityToNBT,0,(abstract) Protected helper method to write subclass entity data to NBT. @@ -1379,6 +1381,7 @@ func_35599_c,floor_double_long,0,Long version of floor_double func_355_a,dealFireDamage,0,Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage. Args: amountDamage func_35602_a,canSpawnMoreVillagePiecesOfType,0, func_35603_a,canSpawnMoreVillagePieces,0, +func_35609_a,renderChest,0,"Renders a chest at 0,0,0 - used for item rendering" func_35612_b,dotProduct,0, func_35613_a,canSpawnMoreStructuresOfType,0, func_35614_a,canSpawnMoreStructures,0, @@ -1602,10 +1605,13 @@ func_40051_b,getPotionResult,0,The result of brewing a potion of the specified d func_40052_p,brewPotions,0, func_40053_g,getBrewTime,0, func_40054_n,getFilledSlots,0,returns an integer with each bit specifying wether that slot of the stand contains a potion +func_40071_a,onImpact,0,Called when this EntityFireball hits a block or entity. +func_40075_e,getGravityVelocity,0,Gets the amount of gravity to apply to the thrown entity with each tick. func_40076_a,setThrowableHeading,0,"Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction." func_40078_a,onImpact,0,Called when this EntityThrowable hits a block or entity. func_4007_a,displayUnexpectedThrowable,0,Displays an unexpected error that has come up during the game. func_40088_g,getPotionDamage,0,Returns the damage value of the thrown potion that this EntityPotion represents. +func_40090_a,moveTowards,0,"The location the eye should float/move towards. Currently used for moving towards the nearest stronghold. Args: strongholdX, strongholdY, strongholdZ" func_40097_b,setRBGColorF,0, func_40098_n,getRedColorF,0, func_40099_c,setParticleTextureIndex,0,Public method to set private field particleTextureIndex. @@ -1633,8 +1639,14 @@ func_40126_a,isPotionApplicable,0, func_40127_l,isChild,0,"If Animal, checks if the age timer is negative" func_40128_b,applyPotionDamageCalculations,0,"Reduces damage, depending on potions" func_4012_a,doRenderFireball,0, +func_40130_ai,getAttackStrength,0,"Gets the amount of damage dealt to the player when ""attacked"" by the slime." +func_40131_af,getJumpDelay,0,Gets the amount of time the slime needs to wait between jumps. func_40132_ae,createInstance,0, +func_40133_ao,makesSoundOnJump,0,Returns true if the slime makes a sound when it jumps (based upon the slime's size) +func_40134_ak,makesSoundOnLand,0,Returns true if the slime makes a sound when it lands after a jump (based upon the slime's size) func_40135_ac,getSlimeParticle,0,Returns the name of a particle effect that may be randomly created by EntitySlime.onUpdate() +func_40137_ah,canDamagePlayer,0,Indicates weather the slime is able to damage the player (based upon the slime's size) +func_40138_aj,getJumpSound,0,Returns the name of the sound played when the slime jumps. func_4013_a,setRenderPassModel,0,Sets the model to be used in the current render pass (the first render pass is done after the primary model is rendered) Args: model func_40143_a,isWheat,0,Checks if the parameter is an wheat item. func_40144_b,procreate,0,Creates a baby animal according to the animal type of the target at the actual position and spawns 'love' particles. @@ -1759,7 +1771,7 @@ func_40488_d,getName,0,Return the name of key in translation table of this encha func_40489_b,getMaxEnchantability,0,Returns the maximum value of enchantability nedded on the enchantment level passed. func_40490_a,calcModifierLiving,0,Calculates de (magic) damage done by the enchantment on a living entity based on level and entity passed. func_40491_a,getMaxLevel,0,Returns the maximum level that the enchantment can have. -func_40492_a,getMinEnchantability,0,Returns the minimal value of enchantability nedded on the enchantment level passed. +func_40492_a,getMinEnchantability,0,Returns the minimal value of enchantability needed on the enchantment level passed. func_40493_c,getMinLevel,0,Returns the minimum level that the enchantment can have. func_40494_a,setName,0,Sets the enchantment name func_40495_b,getWeight,0, @@ -1790,6 +1802,7 @@ func_40575_a,getEnchantability,0,Return the enchantability factor of the materia func_40576_a,getDurability,0,Returns the durability for a armor slot of for this type. func_40591_a,compress,0, func_40592_a,decompress,0, +func_40593_a,sendEnchantPacket,0,GuiEnchantment uses this during multiplayer to tell PlayerControllerMP to send a packet indicating the enchantment action the player has taken. func_40594_g,isHardcoreModeEnabled,0, func_40596_f,getCenterY,0, func_40597_e,getCenterX,0, @@ -2042,11 +2055,13 @@ func_46009_aH,getMoveHelper,0, func_46010_f,setMoveForward,0, func_46011_aM,getAge,0, func_46014_aS,updateAITasks,0, +func_46023_b,setKnockbackStrength,0,Sets the amount of knockback the arrow applies when it hits a mob. func_46024_b,setDamage,0, func_46025_l,getDamage,0, func_46028_b,getDoneButton,0,Returns the private doneButton field. func_46034_a,onUpdateMoveHelper,0, func_46051_a,generate,0, +func_46058_c,requiresMultipleRenderPasses,0, func_46059_i,doesContainerItemLeaveCraftingGrid,0,"If this returns true, after a recipe involving this item is crafted the container item will be added to the player's inventory instead of remaining in the crafting grid." func_46064_i,getWorldHasNoSky,0,"returns true if there should be no sky, false otherwise" func_46065_j,getVoidFogYFactor,0,"Returns a double value representing the Y value relative to the top of the map at which void fog is at its maximum. The default factor of 0.03125 relative to 256, for example, means the void fog will be at its maximum at (256*0.03125), or 8." @@ -2098,6 +2113,7 @@ func_477_c,createAndLoadEntity,0,Creates a new entity and loads its data from th func_478_g,getBlockType,0,Gets the block type at the location of this entity (client-only). func_479_f,getBlockMetadata,0,Returns block data at the location of this entity (client-only). func_48078_c,setSneaking,0,Sets the sneaking flag. +func_48079_f,setHeadRotationYaw,0,Sets the head's yaw rotation of the entity. func_48080_j,canAttackWithItem,0,"If returns false, the item will not inflict any damage against entities." func_48081_b,getStackInSlotOnClosing,0,"When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - like when you close a workbench GUI." func_48082_b,setHomeArea,0, @@ -2130,11 +2146,13 @@ func_48127_b,setIsPlayingFlag,0, func_48128_a,setIsMatingFlag,0, func_48129_t,getProfession,0, func_48134_p_,resetInLove,0, +func_48135_b,canMateWith,0,Returns true if the mob is currently able to mate with the specified mob. func_48136_o_,isInLove,0,Returns if the entity is currently in 'love mode'. func_48138_b,setTamed,0, func_48139_F_,isTamed,0, func_48140_f,setSitting,0, func_48141_af,isSitting,0, +func_48142_a,playTameEffect,0,"Play the taming effect, will either be hearts or smoke depending on status" func_48143_a,setOwner,0, func_48144_ah,getOwner,0, func_48145_ag,getOwnerName,0, @@ -2143,8 +2161,11 @@ func_48151_a,dropPlayerItemWithRandomChoice,0,"Args: itemstack, flag" func_48152_as,dropOneItem,0,Called when player presses the drop item key func_48153_a,dropPlayerItem,0,Args: itemstack - called when player drops an item stack that's not in his inventory (like items still placed in a workbench while the workbench'es GUI gets closed) func_48180_b,markBlockNeedsUpdate2,0,As of mc 1.2.3 this method has exactly the same signature and does exactly the same as markBlockNeedsUpdate +func_48182_l,getIntArray,0,"Retrieves an int array using the specified key, or a zero-length array if no such key was stored." +func_48183_a,setIntArray,0,Stores a new NBTTagIntArray with the given array as data into the map with the given string key. func_48184_b,getSpeed,0, func_48187_a,setMoveTo,0,Sets the speed and location to move to +func_48192_a,growLeaves,0, func_481_b,writeToNBT,0,Writes a tile entity to NBT. func_48203_o,getTickRandomly,0,Returns whether or not this block is of a type that needs random ticking. Called for ref-counting purposes by ExtendedBlockStorage in order to broadly cull a chunk from the random chunk update list for efficiency's sake. func_48204_b,getBlocksMovement,0, @@ -2154,25 +2175,32 @@ func_48211_a,tryToCatchBlockOnFire,0, func_48212_i,getFullMetadata,0,Returns the full metadata value created by combining the metadata of both blocks the door takes up. func_48214_g,getDoorOrientation,0,"Returns 0, 1, 2 or 3 depending on where the hinge is." func_48216_a,getDirection,0,Returns the orentation value from the specified metadata +func_48257_i,spawnBaby,0,Spawns a baby animal of the same type. +func_48258_h,getNearbyMate,0,Loops through nearby animals and finds another animal of the same type that can be mated with. Returns the first valid mate found. func_48296_h,findPossibleShelter,0, func_482_a,readFromNBT,0,Reads a tile entity from NBT. +func_48318_a,findUsableDoor,0,Determines if a door can be broken with AI. func_48337_h,checkSufficientDoorsPresentForNewVillager,0, func_48338_a,spawnHeartParticles,0, func_48339_i,giveBirth,0, func_48366_h,doRangedAttack,0,Performs a ranged attack according to the AI's rangedAttackID. func_483_c,updateDelay,0,Sets the delay before a new spawn (base delay of 200 + random number up to 600). func_48407_a,setIsSitting,0,Sets the sitting flag. +func_48410_b,getRandomWorldGenForGrass,0,Gets a WorldGen appropriate for this biome. func_48411_i,getFloatTemperature,0,Gets a floating point representation of this biome's temperature func_48412_k,getBiomeFoliageColor,0,Provides the basic foliage color based on the biome temperature and rainfall func_48413_d,isHighHumidity,0,Checks to see if the rainfall level of the biome is extremely high func_48414_h,getFloatRainfall,0,Gets a floating point representation of this biome's rainfall func_48415_j,getBiomeGrassColor,0,Provides the basic grass color based on the biome temperature and rainfall +func_48440_a,spawnCreature,0,"Spawns the creature specified by the egg's type in the location specified by the last three parameters. Parameters: world, entityID, x, y, z." +func_48441_a,addRandomEnchantment,0,"Adds a random enchantment to the specified item. Args: random, itemStack, enchantabilityLevel" func_48442_a,clamp_float,0,"Returns the value of the first parameter, clamped to be within the lower and upper limits given by the second and third parameters" func_48444_a,readChunkFromNBT,0,Reads the data stored in the passed NBTTagCompound and creates a Chunk with that data in the passed World. Returns the created Chunk. func_48445_a,writeChunkToNBT,0,"Writes the Chunk passed as an argument to the NBTTagCompound also passed, using the World argument to retrieve the Chunk's last update time." func_48453_b,getHeight,0,Returns current world height. func_48454_a,getBiomeGenForCoords,0,Gets the biome for a given set of x/z coordinates func_48455_z,isBlockHighHumidity,0,"Checks to see if the biome rainfall values for a given x,y,z coordinate set are extremely high" +func_48456_a,getClosestPlayerHorizontal,0,"Finds the nearest player horizontally to a point. Args: X, Z, max distance. Returns null if no player is found within the maximum distance." func_48459_a,findNearestEntityWithinAABB,0, func_48460_a,getEntityPathToXYZ,0, func_48463_a,getPathEntityToEntity,0, @@ -2180,6 +2208,7 @@ func_48480_a,canSee,0,"Checks, whether 'our' entity can see the entity given as func_48481_a,clearSensingCache,0,Clears canSeeCachePositive and canSeeCacheNegative. func_48485_a,load,0, func_48486_a,convertToAnvilFormat,0, +func_48487_a,handleMapChunk,0,"Handle Packet51MapChunk (full chunk update of blocks, metadata, light levels, and optionally biome data)" func_48488_a,handleEntityHeadRotation,0, func_48489_a,handleTileEntityData,0, func_48490_a,getBiomeGenForWorldCoords,0,This method retrieves the biome at a set of coordinates @@ -2314,6 +2343,7 @@ func_498_a,changeCurrentItem,0,Switch the current item to the next one or the pr func_499_j,getFirstEmptyStack,0,Returns the first item stack that is empty. func_50006_a,setEditable,0,Sets the sign's isEditable flag to the specified parameter. func_50007_a,isEditable,0, +func_50010_a,renderChatOverlay,0, func_50011_a,adjustHistoryOffset,0,increment/decrement history scroll offset func_50012_a,getChatClickDataFromMouse,0,"gets the click data from mouse position args:( mouse x, mouse y)" func_50013_c,getSentMessageList,0,Returns the list with the sent chat messages in it. @@ -2331,6 +2361,7 @@ func_50057_d,completePlayerName,0,Autocompletes player name func_50058_a,getSentHistory,0,"input is relative and is applied directly to the sentHistoryCursor so -1 is the previous message, 1 is the next message from the current cursor position" func_50073_a,setBlock,0,"Sets the block without metadata in the world, notifying neighbors if enabled." func_50074_q,canSilkHarvest,0,"Return true if a player with SlikTouch can harvest this block directly, and not it's normal drops." +func_50075_j,isOcelotBlockingChest,0,Looks for a sitting ocelot within certain bounds. Such an ocelot is considered to be blocking access to the chest. func_50076_f,isSameSapling,0,Determines if the same sapling is present at the given location. func_50086_b,setEnableSnow,0,sets enableSnow to true during biome initialization. returns BiomeGenBase. func_50089_b,getURI,0,computes the URI from the clicked chat data object @@ -2397,6 +2428,7 @@ func_535_a,saveChunks,0,"Two modes of operation: if passed true, save all Chunks func_536_b,canSave,0,Returns if the IChunkProvider supports saving. func_537_a,chunkExists,0,"Checks to see if a chunk exists at x, y" func_538_d,loadChunk,0,loads or generates the chunk at the chunk location specified +func_539_c,unloadChunk,0,Unload chunk from ChunkProviderClient's hashmap. Called in response to a Packet50PreChunk with its mode field set to false func_540_b,saveChunk,0,"Save a given Chunk, recording the time in lastSaveTime" func_541_a,saveExtraChunkData,0,"Save extra data associated with this Chunk not normally saved during autosave, only during chunk unload. Currently unused." func_547_b,drawString,0,Renders the specified text to the screen. @@ -2466,7 +2498,7 @@ func_6233_a,startMainThread,0, func_6237_k,usePortal,0,Will use a portal teleport switching the dimension the player is in. func_6238_a,displayDebugInfo,0, func_6239_p,respawn,0,Called when the respawn button is pressed after the player dies. -func_623_a,playSoundAtEntity,0,"Plays a sound at the entity's position. Args: entity, sound, unknown1, volume (relative to 1.0)" +func_623_a,playSoundAtEntity,0,"Plays a sound at the entity's position. Args: entity, sound, volume (relative to 1.0), and frequency (or pitch, also relative to 1.0)." func_6240_b,getMinecraftDir,0,gets the working dir (OS specific) for minecraft func_6241_m,debugInfoRenders,0,A String of renderGlobal.getDebugInfoRenders func_6242_u,forceReload,0,Forces a reload of the sound manager and all the resources. Called in game by holding 'F3' and pressing 'S'. @@ -2795,7 +2827,7 @@ func_9372_a_,setHealth,0,Updates health locally. func_937_b,markBlockRangeNeedsUpdate,0,"Called across all registered IWorldAccess instances when a block range is invalidated. Args: minX, minY, minZ, maxX, maxY, maxZ" func_938_b,releaseEntitySkin,0,Decrement the reference counter for this entity's skin image data func_939_a,spawnParticle,0,"Spawns a particle. Arg: particleType, x, y, z, velX, velY, velZ" -func_940_a,playSound,0,"Plays the specified sound. Arg: x, y, z, soundName, unknown1, unknown2" +func_940_a,playSound,0,"Plays the specified sound. Arg: soundName, x, y, z, volume, pitch" func_941_a,obtainEntitySkin,0,"Start the skin for this entity downloading, if necessary, and increment its reference counter" func_9424_o,updateEntityList,0, func_9425_a,setEntityState,0,sends a Packet 38 (Entity Status) to all tracked players of that entity @@ -3926,9 +3958,12 @@ func_40036_aw,extinguish,1,Removes fire from entity. func_40037_aF,getParts,1,Return the Entity parts making up this Entity (currently only for dragons) func_4003_a,handleVehicleSpawn,1, func_40041_a,onImpact,1,Called when this EntityThrowable hits a block or entity. +func_40042_e,getGravityVelocity,1,Gets the amount of gravity to apply to the thrown entity with each tick. func_40043_a,setThrowableHeading,1,"Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction." func_4004_a,handlePickupSpawn,1, func_40054_n_,getPotionDamage,1,Returns the damage value of the thrown potion that this EntityPotion represents. +func_40056_a,moveTowards,1,"The location the eye should float/move towards. Currently used for moving towards the nearest stronghold. Args: strongholdX, strongholdY, strongholdZ" +func_40063_a,onImpact,1,Called when this EntityFireball hits a block or entity. func_4006_a,handleMobSpawn,1, func_40075_o,canBrew,1, func_40076_p,brewPotions,1, @@ -3960,8 +3995,14 @@ func_40108_b,removeExperience,1,Removes the specified number of experience level func_40109_c,onEnchantmentCritical,1, func_4010_d,handleSlashCommand,1,Processes a / command func_40110_a,displayGUIBrewingStand,1,Displays the GUI for interacting with a brewing stand. +func_40113_D,getAttackStrength,1,"Gets the amount of damage dealt to the player when ""attacked"" by the slime." func_40114_y,createInstance,1, +func_40115_A,getJumpDelay,1,Gets the amount of time the slime needs to wait between jumps. +func_40117_I,makesSoundOnJump,1,Returns true if the slime makes a sound when it jumps (based upon the slime's size) +func_40118_E,getJumpSound,1,Returns the name of the sound played when the slime jumps. +func_40119_C,canDamagePlayer,1,Indicates weather the slime is able to damage the player (based upon the slime's size) func_40120_w,getSlimeParticle,1,Returns the name of a particle effect that may be randomly created by EntitySlime.onUpdate() +func_40121_G,makesSoundOnLand,1,Returns true if the slime makes a sound when it lands after a jump (based upon the slime's size) func_40123_y,isValidLightLevel,1,Checks to make sure the light is not too bright where the mob is spawning func_40124_p_,isBesideClimbableBlock,1,Returns true if the WatchableObject (Byte) is 0x01 otherwise returns false. The WatchableObject is updated using setBesideClimableBlock. func_40125_a,setBesideClimbableBlock,1,"Updates the WatchableObject (Byte) created in entityInit(), setting it to 0x01 if par1 is true or 0x00 if it is false." @@ -4053,7 +4094,7 @@ func_4033_j,isFlammable,1,Checks to see if the block is flammable. func_40342_b,getMaxEnchantability,1,Returns the maximum value of enchantability nedded on the enchantment level passed. func_40343_a,canApplyTogether,1,Determines if the enchantment passed can be applyied together with this enchantment. func_40344_a,getMaxLevel,1,Returns the maximum level that the enchantment can have. -func_40345_a,getMinEnchantability,1,Returns the minimal value of enchantability nedded on the enchantment level passed. +func_40345_a,getMinEnchantability,1,Returns the minimal value of enchantability needed on the enchantment level passed. func_40346_a,calcModifierLiving,1,Calculates de (magic) damage done by the enchantment on a living entity based on level and entity passed. func_40347_c,getMinLevel,1,Returns the minimum level that the enchantment can have. func_40348_b,getWeight,1, @@ -4333,6 +4374,7 @@ func_457_a,getEntitiesWithinAABB,1,"Returns all entities of the specified class func_459_b,updateEntities,1,Updates (and cleans up) entities and tile entities func_45_a,getStatsComponent,1,Returns a new JPanel with a new GuiStatsComponent inside. func_46004_e,doesContainerItemLeaveCraftingGrid,1,"If this returns true, after a recipe involving this item is crafted the container item will be added to the player's inventory instead of remaining in the crafting grid." +func_46007_b,setKnockbackStrength,1,Sets the amount of knockback the arrow applies when it hits a mob. func_46008_a,setDamage,1, func_46009_j,getDamage,1, func_46012_af,getMoveHelper,1, @@ -4390,10 +4432,13 @@ func_477_b,getCelestialAngle,1,calls calculateCelestialAngle func_478_h,saveLevel,1,Saves the global data associated with this World func_479_b,obtainEntitySkin,1,"Start the skin for this entity downloading, if necessary, and increment its reference counter" func_47_d,getLogComponent,1,Returns a new JPanel with a new GuiStatsComponent inside. +func_48070_a,handleMapChunk,1,"Handle Packet51MapChunk (full chunk update of blocks, metadata, light levels, and optionally biome data)" func_48071_a,handleTileEntityData,1, func_48072_a,handleEntityHeadRotation,1, func_48083_a,getPathEntityToEntity,1, +func_48084_h,blockHasTileEntity,1,Checks if a block at a given position should have a tile entity. func_48085_a,findNearestEntityWithinAABB,1, +func_48087_a,getClosestPlayerHorizontal,1,"Finds the nearest player horizontally to a point. Args: X, Z, max distance. Returns null if no player is found within the maximum distance." func_48088_a,getEntityPathToXYZ,1, func_48089_z,isBlockHighHumidity,1,"Checks to see if the biome rainfall values for a given x,y,z coordinate set are extremely high" func_48091_a,getBiomeGenForCoords,1,Gets the biome for a given set of x/z coordinates @@ -4407,6 +4452,9 @@ func_48133_a,tryToCatchBlockOnFire,1, func_48134_e,getFullMetadata,1,Returns the full metadata value created by combining the metadata of both blocks the door takes up. func_48136_c,getDoorOrientation,1,"Returns 0, 1, 2 or 3 depending on where the hinge is." func_48176_f,doRangedAttack,1,Performs a ranged attack according to the AI's rangedAttackID. +func_48185_a,findUsableDoor,1,Determines if a door can be broken with AI. +func_48197_i,spawnBaby,1,Spawns a baby animal of the same type. +func_48198_f,getNearbyMate,1,Loops through nearby animals and finds another animal of the same type that can be mated with. Returns the first valid mate found. func_481_a,getCollidingBoundingBoxes,1,"Returns a list of bounding boxes that collide with aabb excluding the passed in entity's collision. Args: entity, aabb" func_48210_a,setIsSitting,1,Sets the sitting flag. func_48254_f,findPossibleShelter,1, @@ -4445,18 +4493,22 @@ func_48354_b,setIsPlayingFlag,1, func_48355_A,getIsMatingFlag,1, func_48356_a,setIsMatingFlag,1, func_48357_f_,setProfession,1, +func_48362_b,canMateWith,1,Returns true if the mob is currently able to mate with the specified mob. func_48363_r_,isInLove,1,Returns if the entity is currently in 'love mode'. func_48364_s_,resetInLove,1, func_48366_b,setTamed,1, func_48367_A,getOwnerName,1, func_48368_w_,getOwner,1, func_48369_c,setSitting,1, +func_48370_a,playTameEffect,1,"Play the taming effect, will either be hearts or smoke depending on status" func_48371_v_,isSitting,1, func_48372_a,setOwner,1, func_48373_u_,isTamed,1, func_48376_c_,setTameSkin,1, func_48380_l_,getVillage,1, +func_48390_a,spawnCreature,1,"Spawns the creature specified by the egg's type in the location specified by the last three parameters. Parameters: world, entityID, x, y, z." func_48392_a,setTerrainType,1, +func_48403_a,growLeaves,1, func_48409_a,isAllowedCharacter,1, func_48414_b,markBlockNeedsUpdate2,1,As of mc 1.2.3 this method has exactly the same signature and does exactly the same as markBlockNeedsUpdate func_48420_a,getPosition,1,returns the current PathEntity target node as Vec3D @@ -4471,8 +4523,11 @@ func_48428_a,getVectorFromIndex,1,Gets the vector of the PathPoint associated wi func_48429_a,getPathPointFromIndex,1,"return the PathPoint located at the specified PathIndex, usually the current one" func_48436_b,getSpeed,1, func_48439_a,setMoveTo,1,Sets the speed and location to move to +func_48440_b,getRandomWorldGenForGrass,1,Gets a WorldGen appropriate for this biome. func_48441_d,isHighHumidity,1,Checks to see if the rainfall level of the biome is extremely high func_48442_h,getFloatTemperature,1,Gets a floating point representation of this biome's temperature +func_48445_l,getIntArray,1,"Retrieves an int array using the specified key, or a zero-length array if no such key was stored." +func_48446_a,setIntArray,1,Stores a new NBTTagIntArray with the given array as data into the map with the given string key. func_48450_a,setCanBeCreated,1,"Sets canBeCreated to the provided value, and returns this." func_48452_b,getGeneratorVersion,1,Returns generatorVersion. func_48462_a,writeChunkToNBT,1,"Writes the Chunk passed as an argument to the NBTTagCompound also passed, using the World argument to retrieve the Chunk's last update time." @@ -4547,6 +4602,7 @@ func_48606_c,setBlocklightArray,1,Sets the NibbleArray instance used for Block-l func_48607_b,getNeedsRandomTick,1,"Returns whether or not this block storage's Chunk will require random ticking, used to avoid looping through random block ticks when there are no blocks that would randomly tick." func_48608_d,setExtBlocklightValue,1,Sets the saved Block-light value in the extended block storage structure. func_48618_a,get,1, +func_48622_a,addRandomEnchantment,1,"Adds a random enchantment to the specified item. Args: random, itemStack, enchantabilityLevel" func_48623_a,convertToAnvilFormat,1, func_48624_a,load,1, func_48629_e,isWoodenDoorAt,1, @@ -4600,12 +4656,14 @@ func_497_g,canBlockSeeTheSky,1,Checks if the specified block is able to see the func_498_f,markBlocksDirtyVertical,1,marks a vertical line of blocks as dirty func_50003_a,handlePlayerAbilities,1,Handle a player abilities packet. func_50008_h,canSilkHarvest,1,"Return true if a player with SlikTouch can harvest this block directly, and not it's normal drops." +func_50009_h,isOcelotBlockingChest,1,Looks for a sitting ocelot within certain bounds. Such an ocelot is considered to be blocking access to the chest. +func_50010_f,isSameSapling,1,Determines if the same sapling is present at the given location. func_50023_a,setBlock,1,"Sets the block without metadata in the world, notifying neighbors if enabled." func_50024_b,setEnableSnow,1,sets enableSnow to true during biome initialization. returns BiomeGenBase. func_500_a,isMaterialInBB,1,Returns true if the given bounding box contains the given material func_502_a,playSoundEffect,1,"Play a sound effect. Many many parameters for this function. Not sure what they do, but a classic call is : (double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, 'random.door_open', 1.0F, world.rand.nextFloat() * 0.1F + 0.9F with i,j,k position of the block." func_505_a,rayTraceBlocks_do,1, -func_506_a,playSoundAtEntity,1,"Plays a sound at the entity's position. Args: entity, sound, unknown1, volume (relative to 1.0)" +func_506_a,playSoundAtEntity,1,"Plays a sound at the entity's position. Args: entity, sound, volume (relative to 1.0), and frequency (or pitch, also relative to 1.0)." func_507_b,setBlockAndMetadataWithNotify,1,"Sets the block ID and metadata, then notifies neighboring blocks of the change Params: x, y, z, BlockID, Metadata" func_508_d,setBlockWithNotify,1,"Sets a block and notifies relevant systems with the block change Args: x, y, z, blockID" func_511_b,setBlockMetadataWithNotify,1,"Sets the blocks metadata and if set will then notify blocks that this block changed. Args: x, y, z, metadata" @@ -4814,7 +4872,7 @@ func_685_a,markBlockRangeNeedsUpdate,1,"Called across all registered IWorldAcces func_686_a,doNothingWithTileEntity,1,"In all implementations, this method does nothing." func_687_a,spawnParticle,1,"Spawns a particle. Arg: particleType, x, y, z, velX, velY, velZ" func_688_b,releaseEntitySkin,1,Decrement the reference counter for this entity's skin image data -func_689_a,playSound,1,"Plays the specified sound. Arg: x, y, z, soundName, unknown1, unknown2" +func_689_a,playSound,1,"Plays the specified sound. Arg: soundName, x, y, z, volume, pitch" func_68_a,writePacketData,1,Abstract. Writes the raw packet data to the data stream. func_690_a,update,1,Updates the Jlist with a new model. func_693_b,getBoundingBoxFromPool,1,"Returns a bounding box with the specified bounds from the pool. Args: minX, minY, minZ, maxX, maxY, maxZ" diff --git a/forge/forge_client/src/net/minecraft/src/forge/ForgeHooksClient.java b/forge/forge_client/src/net/minecraft/src/forge/ForgeHooksClient.java index cd0f549534..5e6e909c68 100644 --- a/forge/forge_client/src/net/minecraft/src/forge/ForgeHooksClient.java +++ b/forge/forge_client/src/net/minecraft/src/forge/ForgeHooksClient.java @@ -8,6 +8,7 @@ package net.minecraft.src.forge; import net.minecraft.client.Minecraft; import net.minecraft.src.Block; import net.minecraft.src.Entity; +import net.minecraft.src.Item; import net.minecraft.src.ModLoader; import net.minecraft.src.Packet100OpenWindow; import net.minecraft.src.RenderBlocks; @@ -299,6 +300,115 @@ public class ForgeHooksClient } } + public static boolean renderEntityItem(EntityItem entity, ItemStack item, float bobing, float rotation, Random random, RenderEngine engine, RenderBlocks renderBlocks) + { + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(item, ENTITY); + + if (customRenderer == null) + { + return false; + } + + if (customRenderer.shouldUseRenderHelper(ENTITY, item, ENTITY_ROTATION)) + { + GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F); + } + if (!customRenderer.shouldUseRenderHelper(ENTITY, item, ENTITY_BOBBING)) + { + GL11.glTranslatef(0.0F, -bobing, 0.0F); + } + boolean is3D = customRenderer.shouldUseRenderHelper(ENTITY, item, BLOCK_3D); + + if (item.itemID < 256 && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[item.itemID].getRenderType()))) + { + engine.bindTexture(engine.getTexture(getTexture("/terrain.png", item.getItem()))); + int renderType = Block.blocksList[item.itemID].getRenderType(); + float scale = (renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2 ? 0.5F : 0.25F); + + GL11.glScalef(scale, scale, scale); + int size = entity.item.stackSize; + int count = (size > 20 ? 4 : (size > 5 ? 3 : (size > 1 ? 2 : 1))); + + for(int j = 0; j < size; j++) + { + GL11.glPushMatrix(); + if (j > 0) + { + GL11.glTranslatef( + ((random.nextFloat() * 2.0F - 1.0F) * 0.2F) / 0.5F, + ((random.nextFloat() * 2.0F - 1.0F) * 0.2F) / 0.5F, + ((random.nextFloat() * 2.0F - 1.0F) * 0.2F) / 0.5F); + } + customRenderer.renderItem(ENTITY, item, renderBlocks, entity); + GL11.glPopMatrix(); + } + } + else + { + engine.bindTexture(engine.getTexture(getTexture(item.itemID < 256 ? "/terrain.png" : "/gui/items.png", item.getItem()))); + GL11.glScalef(0.5F, 0.5F, 0.5F); + customRenderer.renderItem(ENTITY, item, renderBlocks, entity); + } + return true; + } + + public static boolean renderInventoryItem(RenderBlocks renderBlocks, RenderEngine engine, ItemStack item, boolean inColor, float zLevel, float x, float y) + { + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(item, INVENTORY); + if (customRenderer == null) + { + return false; + } + + engine.bindTexture(engine.getTexture(getTexture(item.itemID < 256 ? "/terrain.png" : "/gui/items.png", Item.itemsList[item.itemID]))); + if (customRenderer.shouldUseRenderHelper(INVENTORY, item, INVENTORY_BLOCK)) + { + GL11.glPushMatrix(); + GL11.glTranslatef(x - 2, y + 3, -3.0F + zLevel); + GL11.glScalef(10F, 10F, 10F); + GL11.glTranslatef(1.0F, 0.5F, 1.0F); + GL11.glScalef(1.0F, 1.0F, -1F); + GL11.glRotatef(210F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F); + + + if(inColor) + { + int color = Item.itemsList[item.itemID].getColorFromDamage(item.getItemDamage(), 0); + float r = (float)(color >> 16 & 0xff) / 255F; + float g = (float)(color >> 8 & 0xff) / 255F; + float b = (float)(color & 0xff) / 255F; + GL11.glColor4f(r, g, b, 1.0F); + } + + GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F); + renderBlocks.useInventoryTint = inColor; + customRenderer.renderItem(INVENTORY, item, renderBlocks); + renderBlocks.useInventoryTint = true; + GL11.glPopMatrix(); + } + else + { + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glPushMatrix(); + GL11.glTranslatef(x, y, -3.0F + zLevel); + + if (inColor) + { + int color = Item.itemsList[item.itemID].getColorFromDamage(item.getItemDamage(), 0); + float r = (float)(color >> 16 & 255) / 255.0F; + float g = (float)(color >> 8 & 255) / 255.0F; + float b = (float)(color & 255) / 255.0F; + GL11.glColor4f(r, g, b, 1.0F); + } + + customRenderer.renderItem(INVENTORY, item, renderBlocks); + GL11.glPopMatrix(); + GL11.glEnable(GL11.GL_LIGHTING); + } + return true; + } + /** * Trys to get the class for the specified name, will also try the * net.minecraft.src package in case we are in MCP diff --git a/forge/patches/minecraft/net/minecraft/src/BlockChest.java.patch b/forge/patches/minecraft/net/minecraft/src/BlockChest.java.patch index 4fad2f269e..688391b5ec 100644 --- a/forge/patches/minecraft/net/minecraft/src/BlockChest.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/BlockChest.java.patch @@ -13,23 +13,23 @@ { return true; } -- else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 - 1, par3 + 1, par4) || func_50075_j(par1World, par2 - 1, par3, par4))) -+ else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 - 1, par3 + 1, par4, 0) || func_50075_j(par1World, par2 - 1, par3, par4))) +- else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 - 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 - 1, par3, par4))) ++ else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 - 1, par3 + 1, par4, 0) || isOcelotBlockingChest(par1World, par2 - 1, par3, par4))) { return true; } -- else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 + 1, par3 + 1, par4) || func_50075_j(par1World, par2 + 1, par3, par4))) -+ else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 + 1, par3 + 1, par4, 0) || func_50075_j(par1World, par2 + 1, par3, par4))) +- else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 + 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4))) ++ else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 + 1, par3 + 1, par4, 0) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4))) { return true; } -- else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 - 1) || func_50075_j(par1World, par2, par3, par4 - 1))) -+ else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 - 1, 0) || func_50075_j(par1World, par2, par3, par4 - 1))) +- else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 - 1) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1))) ++ else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 - 1, 0) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1))) { return true; } -- else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 + 1) || func_50075_j(par1World, par2, par3, par4 + 1))) -+ else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 + 1, 0) || func_50075_j(par1World, par2, par3, par4 + 1))) +- else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 + 1) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1))) ++ else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 + 1, 0) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1))) { return true; } diff --git a/forge/patches/minecraft/net/minecraft/src/EnchantmentHelper.java.patch b/forge/patches/minecraft/net/minecraft/src/EnchantmentHelper.java.patch index 5b4dc06bb8..c5b228dfa3 100644 --- a/forge/patches/minecraft/net/minecraft/src/EnchantmentHelper.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/EnchantmentHelper.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft/net/minecraft/src/EnchantmentHelper.java 0000-00-00 00:00:00.000000000 -0000 +++ ../src_work/minecraft/net/minecraft/src/EnchantmentHelper.java 0000-00-00 00:00:00.000000000 -0000 -@@ -354,7 +354,7 @@ +@@ -357,7 +357,7 @@ { Enchantment var7 = var4[var6]; diff --git a/forge/patches/minecraft/net/minecraft/src/EntityLiving.java.patch b/forge/patches/minecraft/net/minecraft/src/EntityLiving.java.patch index 6da245bf98..5cdc8d2166 100644 --- a/forge/patches/minecraft/net/minecraft/src/EntityLiving.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/EntityLiving.java.patch @@ -9,7 +9,7 @@ /** Number of ticks since this EntityLiving last produced its sound */ private int livingSoundTime; -@@ -1339,7 +1339,7 @@ +@@ -1342,7 +1342,7 @@ int var2 = MathHelper.floor_double(this.boundingBox.minY); int var3 = MathHelper.floor_double(this.posZ); int var4 = this.worldObj.getBlockId(var1, var2, var3); diff --git a/forge/patches/minecraft/net/minecraft/src/EntityOcelot.java.patch b/forge/patches/minecraft/net/minecraft/src/EntityOcelot.java.patch index cf3c914b19..350405b261 100644 --- a/forge/patches/minecraft/net/minecraft/src/EntityOcelot.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/EntityOcelot.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft/net/minecraft/src/EntityOcelot.java 0000-00-00 00:00:00.000000000 -0000 +++ ../src_work/minecraft/net/minecraft/src/EntityOcelot.java 0000-00-00 00:00:00.000000000 -0000 -@@ -318,7 +318,8 @@ +@@ -321,7 +321,8 @@ int var4 = this.worldObj.getBlockId(var1, var2 - 1, var3); diff --git a/forge/patches/minecraft/net/minecraft/src/Item.java.patch b/forge/patches/minecraft/net/minecraft/src/Item.java.patch index 04a435c4df..f96f508a9e 100644 --- a/forge/patches/minecraft/net/minecraft/src/Item.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/Item.java.patch @@ -181,13 +181,13 @@ + /** + * Returns the number of render passes/layers this item has. + * Usually equates to ItemRenderer.renderItem being called for this many passes. -+ * Does not get called unless func_46058_c() is true; ++ * Does not get called unless requiresMultipleRenderPasses() is true; + * + * @param metadata The item's metadata + * @return The number of passes to run. + */ + public int getRenderPasses(int metadata) + { -+ return func_46058_c() ? 2 : 1; ++ return requiresMultipleRenderPasses() ? 2 : 1; + } } diff --git a/forge/patches/minecraft/net/minecraft/src/ItemRenderer.java.patch b/forge/patches/minecraft/net/minecraft/src/ItemRenderer.java.patch index 1fec5bb8c2..11b6278184 100644 --- a/forge/patches/minecraft/net/minecraft/src/ItemRenderer.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/ItemRenderer.java.patch @@ -76,7 +76,7 @@ } else if (var14 != null) @@ -414,12 +435,15 @@ - if (var14.getItem().func_46058_c()) + if (var14.getItem().requiresMultipleRenderPasses()) { this.renderItem(var3, var14, 0); - var9 = Item.itemsList[var14.itemID].getColorFromDamage(var14.getItemDamage(), 1); diff --git a/forge/patches/minecraft/net/minecraft/src/NetClientHandler.java.patch b/forge/patches/minecraft/net/minecraft/src/NetClientHandler.java.patch index 1b782129d2..dbb25807b0 100644 --- a/forge/patches/minecraft/net/minecraft/src/NetClientHandler.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/NetClientHandler.java.patch @@ -54,7 +54,7 @@ if (var8 != null) { -@@ -483,7 +506,7 @@ +@@ -486,7 +509,7 @@ public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect) { @@ -63,7 +63,7 @@ this.disconnected = true; this.mc.changeWorld1((World)null); this.mc.displayGuiScreen(new GuiDisconnected("disconnect.disconnected", "disconnect.genericReason", new Object[] {par1Packet255KickDisconnect.reason})); -@@ -547,8 +570,12 @@ +@@ -550,8 +573,12 @@ public void handleChat(Packet3Chat par1Packet3Chat) { @@ -78,7 +78,7 @@ } public void handleAnimation(Packet18Animation par1Packet18Animation) -@@ -638,7 +665,7 @@ +@@ -641,7 +668,7 @@ } else if (par1Packet2Handshake.username.equals("-")) { @@ -87,7 +87,7 @@ } else { -@@ -651,7 +678,7 @@ +@@ -654,7 +681,7 @@ if (var6.equalsIgnoreCase("ok")) { @@ -96,7 +96,7 @@ } else { -@@ -832,6 +859,9 @@ +@@ -835,6 +862,9 @@ case 5: var2.displayGUIBrewingStand(new TileEntityBrewingStand()); var2.craftingInventory.windowId = par1Packet100OpenWindow.windowId; @@ -106,7 +106,7 @@ } } -@@ -938,6 +968,19 @@ +@@ -941,6 +971,19 @@ { ((TileEntityMobSpawner)var2).setMobID(EntityList.getStringFromID(par1Packet132TileEntityData.customParam1)); } @@ -126,7 +126,7 @@ } } -@@ -1011,6 +1054,10 @@ +@@ -1014,6 +1057,10 @@ { ItemMap.getMPMapData(par1Packet131MapData.uniqueID, this.mc.theWorld).updateMPMapData(par1Packet131MapData.itemData); } @@ -137,7 +137,7 @@ else { System.out.println("Unknown itemid: " + par1Packet131MapData.uniqueID); -@@ -1117,5 +1164,6 @@ +@@ -1120,5 +1167,6 @@ public void handleCustomPayload(Packet250CustomPayload par1Packet250CustomPayload) { FMLClientHandler.instance().handlePacket250(par1Packet250CustomPayload); diff --git a/forge/patches/minecraft/net/minecraft/src/RenderBiped.java.patch b/forge/patches/minecraft/net/minecraft/src/RenderBiped.java.patch index 7b5d7ee8ff..c4a5597f2b 100644 --- a/forge/patches/minecraft/net/minecraft/src/RenderBiped.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/RenderBiped.java.patch @@ -25,7 +25,7 @@ GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); @@ -72,7 +80,10 @@ - if (var3.getItem().func_46058_c()) + if (var3.getItem().requiresMultipleRenderPasses()) { - this.renderManager.itemRenderer.renderItem(par1EntityLiving, var3, 1); + for (int x = 1; x < var3.getItem().getRenderPasses(var3.getItemDamage()); x++) diff --git a/forge/patches/minecraft/net/minecraft/src/RenderItem.java.patch b/forge/patches/minecraft/net/minecraft/src/RenderItem.java.patch index 170275f08e..f10bacbb16 100644 --- a/forge/patches/minecraft/net/minecraft/src/RenderItem.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/RenderItem.java.patch @@ -1,72 +1,25 @@ --- ../src_base/minecraft/net/minecraft/src/RenderItem.java 0000-00-00 00:00:00.000000000 -0000 +++ ../src_work/minecraft/net/minecraft/src/RenderItem.java 0000-00-00 00:00:00.000000000 -0000 -@@ -1,6 +1,13 @@ +@@ -1,6 +1,9 @@ package net.minecraft.src; import java.util.Random; + +import net.minecraft.src.forge.ForgeHooksClient; -+import net.minecraft.src.forge.IItemRenderer; -+import net.minecraft.src.forge.MinecraftForgeClient; -+import static net.minecraft.src.forge.IItemRenderer.ItemRenderType.*; -+import static net.minecraft.src.forge.IItemRenderer.ItemRendererHelper.*; + import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; -@@ -55,10 +62,59 @@ +@@ -54,11 +57,15 @@ + float var19; float var18; float var23; - +- - if (var10.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var10.itemID].getRenderType())) -+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var10, ENTITY); + -+ if (customRenderer != null) ++ if (ForgeHooksClient.renderEntityItem(par1EntityItem, var10, var11, var12, random, renderManager.renderEngine, renderBlocks)) + { -+ if (customRenderer.shouldUseRenderHelper(ENTITY, var10, ENTITY_ROTATION)) -+ { -+ GL11.glRotatef(var12, 0.0F, 1.0F, 0.0F); -+ } -+ if (!customRenderer.shouldUseRenderHelper(ENTITY, var10, ENTITY_BOBBING)) -+ { -+ GL11.glTranslatef(0.0F, -var11, 0.0F); -+ } -+ boolean is3D = customRenderer.shouldUseRenderHelper(ENTITY, var10, BLOCK_3D); -+ -+ if (var10.itemID < 256 && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var10.itemID].getRenderType()))) -+ { -+ this.loadTexture(ForgeHooksClient.getTexture("/terrain.png", var10.getItem())); -+ float var21 = 0.25F; -+ var15 = Block.blocksList[var10.itemID].getRenderType(); -+ -+ if (var15 == 1 || var15 == 19 || var15 == 12 || var15 == 2) -+ { -+ var21 = 0.5F; -+ } -+ -+ GL11.glScalef(var21, var21, var21); -+ -+ for(int j = 0; j < var13; j++) -+ { -+ GL11.glPushMatrix(); -+ if (j > 0) -+ { -+ GL11.glTranslatef( -+ ((random.nextFloat() * 2.0F - 1.0F) * 0.2F) / 0.5F, -+ ((random.nextFloat() * 2.0F - 1.0F) * 0.2F) / 0.5F, -+ ((random.nextFloat() * 2.0F - 1.0F) * 0.2F) / 0.5F); -+ } -+ customRenderer.renderItem(ENTITY, var10, renderBlocks, par1EntityItem); -+ GL11.glPopMatrix(); -+ } -+ } -+ else -+ { -+ this.loadTexture(ForgeHooksClient.getTexture(var10.itemID < 256 ? "/terrain.png" : "/gui/items.png", var10.getItem())); -+ GL11.glScalef(0.5F, 0.5F, 0.5F); -+ customRenderer.renderItem(ENTITY, var10, renderBlocks, par1EntityItem); -+ } -+ ++ ; + } + else if (var10.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var10.itemID].getRenderType())) { @@ -76,8 +29,8 @@ float var21 = 0.25F; var15 = Block.blocksList[var10.itemID].getRenderType(); -@@ -94,10 +150,11 @@ - if (var10.getItem().func_46058_c()) +@@ -94,10 +101,11 @@ + if (var10.getItem().requiresMultipleRenderPasses()) { GL11.glScalef(0.5F, 0.5F, 0.5F); - this.loadTexture("/gui/items.png"); @@ -90,7 +43,7 @@ var15 = var10.getItem().func_46057_a(var10.getItemDamage(), var14); var16 = 1.0F; -@@ -120,11 +177,11 @@ +@@ -120,11 +128,11 @@ if (var10.itemID < 256) { @@ -104,12 +57,8 @@ } if (this.field_27004_a) -@@ -186,10 +243,10 @@ - float var11; - float var12; - float var13; -- -+ +@@ -189,7 +197,7 @@ + if (par3 < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[par3].getRenderType())) { - par2RenderEngine.bindTexture(par2RenderEngine.getTexture("/terrain.png")); @@ -117,8 +66,8 @@ Block var15 = Block.blocksList[par3]; GL11.glPushMatrix(); GL11.glTranslatef((float)(par6 - 2), (float)(par7 + 3), -3.0F + this.zLevel); -@@ -221,9 +278,9 @@ - if (Item.itemsList[par3].func_46058_c()) +@@ -221,9 +229,9 @@ + if (Item.itemsList[par3].requiresMultipleRenderPasses()) { GL11.glDisable(GL11.GL_LIGHTING); - par2RenderEngine.bindTexture(par2RenderEngine.getTexture("/gui/items.png")); @@ -129,7 +78,7 @@ { int var9 = Item.itemsList[par3].func_46057_a(par4, var8); var10 = Item.itemsList[par3].getColorFromDamage(par4, var8); -@@ -247,11 +304,11 @@ +@@ -247,11 +255,11 @@ if (par3 < 256) { @@ -143,60 +92,12 @@ } var8 = Item.itemsList[par3].getColorFromDamage(par4, 0); -@@ -279,7 +336,58 @@ +@@ -279,7 +287,10 @@ { if (par3ItemStack != null) { - this.drawItemIntoGui(par1FontRenderer, par2RenderEngine, par3ItemStack.itemID, par3ItemStack.getItemDamage(), par3ItemStack.getIconIndex(), par4, par5); -+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(par3ItemStack, INVENTORY); -+ if (customRenderer != null) -+ { -+ par2RenderEngine.bindTexture(par2RenderEngine.getTexture(ForgeHooksClient.getTexture(par3ItemStack.itemID < 256 ? "/terrain.png" : "/gui/items.png", Item.itemsList[par3ItemStack.itemID]))); -+ if (customRenderer.shouldUseRenderHelper(INVENTORY, par3ItemStack, INVENTORY_BLOCK)) -+ { -+ GL11.glPushMatrix(); -+ GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel); -+ GL11.glScalef(10F, 10F, 10F); -+ GL11.glTranslatef(1.0F, 0.5F, 1.0F); -+ GL11.glScalef(1.0F, 1.0F, -1F); -+ GL11.glRotatef(210F, 1.0F, 0.0F, 0.0F); -+ GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F); -+ int color = Item.itemsList[par3ItemStack.itemID].getColorFromDamage(par4, 0); -+ float r = (float)(color >> 16 & 0xff) / 255F; -+ float g = (float)(color >> 8 & 0xff) / 255F; -+ float b = (float)(color & 0xff) / 255F; -+ if(field_27004_a) -+ { -+ GL11.glColor4f(r, g, b, 1.0F); -+ } -+ GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F); -+ renderBlocks.useInventoryTint = field_27004_a; -+ customRenderer.renderItem(INVENTORY, par3ItemStack, renderBlocks); -+ renderBlocks.useInventoryTint = true; -+ GL11.glPopMatrix(); -+ } -+ else -+ { -+ GL11.glDisable(GL11.GL_LIGHTING); -+ GL11.glPushMatrix(); -+ GL11.glTranslatef((float)(par4), (float)(par5), -3.0F + this.zLevel); -+ -+ int color = Item.itemsList[par3ItemStack.itemID].getColorFromDamage(par4, 0); -+ float r = (float)(color >> 16 & 255) / 255.0F; -+ float g = (float)(color >> 8 & 255) / 255.0F; -+ float b = (float)(color & 255) / 255.0F; -+ -+ if (this.field_27004_a) -+ { -+ GL11.glColor4f(r, g, b, 1.0F); -+ } -+ -+ customRenderer.renderItem(INVENTORY, par3ItemStack, renderBlocks); -+ GL11.glPopMatrix(); -+ GL11.glEnable(GL11.GL_LIGHTING); -+ } -+ } -+ else ++ if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2RenderEngine, par3ItemStack, field_27004_a, zLevel, (float)par4, (float)par5)) + { + this.drawItemIntoGui(par1FontRenderer, par2RenderEngine, par3ItemStack.itemID, par3ItemStack.getItemDamage(), par3ItemStack.getIconIndex(), par4, par5); + } diff --git a/forge/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch b/forge/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch index c68d772417..bc5ddf28c9 100644 --- a/forge/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch @@ -58,7 +58,7 @@ GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); @@ -323,7 +341,7 @@ - if (var21.getItem().func_46058_c()) + if (var21.getItem().requiresMultipleRenderPasses()) { - for (int var25 = 0; var25 <= 1; ++var25) + for (int var25 = 0; var25 < var21.getItem().getRenderPasses(var21.getItemDamage()); ++var25) diff --git a/forge/patches/minecraft/net/minecraft/src/World.java.patch b/forge/patches/minecraft/net/minecraft/src/World.java.patch index 4c10fa99a5..f7553a0ee5 100644 --- a/forge/patches/minecraft/net/minecraft/src/World.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/World.java.patch @@ -69,7 +69,7 @@ } /** -@@ -2067,7 +2081,7 @@ +@@ -2068,7 +2082,7 @@ if (var7 != null) { @@ -78,7 +78,7 @@ } } } -@@ -2097,18 +2111,18 @@ +@@ -2098,18 +2112,18 @@ { this.loadedTileEntityList.add(var8); } @@ -101,7 +101,7 @@ } } -@@ -2121,13 +2135,13 @@ +@@ -2122,13 +2136,13 @@ public void addTileEntity(Collection par1Collection) { @@ -121,7 +121,7 @@ } } -@@ -2149,7 +2163,7 @@ +@@ -2150,7 +2164,7 @@ int var4 = MathHelper.floor_double(par1Entity.posZ); byte var5 = 32; @@ -130,7 +130,7 @@ { par1Entity.lastTickPosX = par1Entity.posX; par1Entity.lastTickPosY = par1Entity.posY; -@@ -2326,7 +2340,14 @@ +@@ -2327,7 +2341,14 @@ if (var11 == Block.fire.blockID || var11 == Block.lavaMoving.blockID || var11 == Block.lavaStill.blockID) { return true; @@ -146,7 +146,7 @@ } } } -@@ -2630,25 +2651,19 @@ +@@ -2631,25 +2652,19 @@ */ public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity) { @@ -184,7 +184,7 @@ } } -@@ -2657,27 +2672,10 @@ +@@ -2658,27 +2673,10 @@ */ public void removeBlockTileEntity(int par1, int par2, int par3) { @@ -215,7 +215,7 @@ } } -@@ -2703,7 +2701,8 @@ +@@ -2704,7 +2702,8 @@ */ public boolean isBlockNormalCube(int par1, int par2, int par3) { @@ -225,7 +225,7 @@ } /** -@@ -2719,7 +2718,7 @@ +@@ -2720,7 +2719,7 @@ if (var5 != null && !var5.isEmpty()) { Block var6 = Block.blocksList[this.getBlockId(par1, par2, par3)]; @@ -234,7 +234,7 @@ } else { -@@ -2984,6 +2983,7 @@ +@@ -2985,6 +2984,7 @@ } } } @@ -242,7 +242,7 @@ Profiler.endSection(); -@@ -3307,7 +3307,7 @@ +@@ -3308,7 +3308,7 @@ private int computeBlockLightValue(int par1, int par2, int par3, int par4, int par5, int par6) { @@ -251,7 +251,7 @@ int var8 = this.getSavedLightValue(EnumSkyBlock.Block, par2 - 1, par3, par4) - par6; int var9 = this.getSavedLightValue(EnumSkyBlock.Block, par2 + 1, par3, par4) - par6; int var10 = this.getSavedLightValue(EnumSkyBlock.Block, par2, par3 - 1, par4) - par6; -@@ -3667,10 +3667,10 @@ +@@ -3668,10 +3668,10 @@ public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB) { this.entitiesWithinAABBExcludingEntity.clear(); @@ -266,7 +266,7 @@ for (int var7 = var3; var7 <= var4; ++var7) { -@@ -3691,10 +3691,10 @@ +@@ -3692,10 +3692,10 @@ */ public List getEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB) { @@ -281,7 +281,7 @@ ArrayList var7 = new ArrayList(); for (int var8 = var3; var8 <= var4; ++var8) -@@ -3839,7 +3839,10 @@ +@@ -3840,7 +3840,10 @@ { var8 = null; } @@ -293,7 +293,7 @@ return par1 > 0 && var8 == null && var9.canPlaceBlockOnSide(this, par2, par3, par4, par6); } } -@@ -4444,4 +4447,39 @@ +@@ -4449,4 +4452,39 @@ { return this.worldInfo.getTerrainType() == WorldType.FLAT ? 0.0D : 63.0D; } diff --git a/forge/patches/minecraft/net/minecraft/src/WorldGenHugeTrees.java.patch b/forge/patches/minecraft/net/minecraft/src/WorldGenHugeTrees.java.patch index 5630a49eca..2e1ced6a99 100644 --- a/forge/patches/minecraft/net/minecraft/src/WorldGenHugeTrees.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/WorldGenHugeTrees.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft/net/minecraft/src/WorldGenHugeTrees.java 0000-00-00 00:00:00.000000000 -0000 +++ ../src_work/minecraft/net/minecraft/src/WorldGenHugeTrees.java 0000-00-00 00:00:00.000000000 -0000 -@@ -54,7 +54,12 @@ +@@ -55,7 +55,12 @@ { var12 = par1World.getBlockId(var10, var8, var11); @@ -14,7 +14,7 @@ { var7 = false; } -@@ -102,7 +107,7 @@ +@@ -103,7 +108,7 @@ { var11 = par1World.getBlockId(par3, par4 + var10, par5); @@ -23,7 +23,7 @@ { this.setBlockAndMetadata(par1World, par3, par4 + var10, par5, Block.wood.blockID, this.woodMetadata); -@@ -124,7 +129,7 @@ +@@ -125,7 +130,7 @@ { var11 = par1World.getBlockId(par3 + 1, par4 + var10, par5); @@ -32,7 +32,7 @@ { this.setBlockAndMetadata(par1World, par3 + 1, par4 + var10, par5, Block.wood.blockID, this.woodMetadata); -@@ -144,7 +149,7 @@ +@@ -145,7 +150,7 @@ var11 = par1World.getBlockId(par3 + 1, par4 + var10, par5 + 1); @@ -41,7 +41,7 @@ { this.setBlockAndMetadata(par1World, par3 + 1, par4 + var10, par5 + 1, Block.wood.blockID, this.woodMetadata); -@@ -164,7 +169,7 @@ +@@ -165,7 +170,7 @@ var11 = par1World.getBlockId(par3, par4 + var10, par5 + 1); @@ -50,7 +50,7 @@ { this.setBlockAndMetadata(par1World, par3, par4 + var10, par5 + 1, Block.wood.blockID, this.woodMetadata); -@@ -215,7 +220,12 @@ +@@ -216,7 +221,12 @@ { int var14 = var13 - par3; diff --git a/forge/patches/minecraft_server/net/minecraft/src/BlockChest.java.patch b/forge/patches/minecraft_server/net/minecraft/src/BlockChest.java.patch index a9c3e32ad2..8e5d69cd90 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/BlockChest.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/BlockChest.java.patch @@ -13,23 +13,23 @@ { return true; } -- else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 - 1, par3 + 1, par4) || func_50009_h(par1World, par2 - 1, par3, par4))) -+ else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 - 1, par3 + 1, par4, 0) || func_50009_h(par1World, par2 - 1, par3, par4))) +- else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 - 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 - 1, par3, par4))) ++ else if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 - 1, par3 + 1, par4, 0) || isOcelotBlockingChest(par1World, par2 - 1, par3, par4))) { return true; } -- else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 + 1, par3 + 1, par4) || func_50009_h(par1World, par2 + 1, par3, par4))) -+ else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 + 1, par3 + 1, par4, 0) || func_50009_h(par1World, par2 + 1, par3, par4))) +- else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockNormalCube(par2 + 1, par3 + 1, par4) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4))) ++ else if (par1World.getBlockId(par2 + 1, par3, par4) == this.blockID && (par1World.isBlockSolidOnSide(par2 + 1, par3 + 1, par4, 0) || isOcelotBlockingChest(par1World, par2 + 1, par3, par4))) { return true; } -- else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 - 1) || func_50009_h(par1World, par2, par3, par4 - 1))) -+ else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 - 1, 0) || func_50009_h(par1World, par2, par3, par4 - 1))) +- else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 - 1) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1))) ++ else if (par1World.getBlockId(par2, par3, par4 - 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 - 1, 0) || isOcelotBlockingChest(par1World, par2, par3, par4 - 1))) { return true; } -- else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 + 1) || func_50009_h(par1World, par2, par3, par4 + 1))) -+ else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 + 1, 0) || func_50009_h(par1World, par2, par3, par4 + 1))) +- else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockNormalCube(par2, par3 + 1, par4 + 1) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1))) ++ else if (par1World.getBlockId(par2, par3, par4 + 1) == this.blockID && (par1World.isBlockSolidOnSide(par2, par3 + 1, par4 + 1, 0) || isOcelotBlockingChest(par1World, par2, par3, par4 + 1))) { return true; } diff --git a/forge/patches/minecraft_server/net/minecraft/src/EnchantmentHelper.java.patch b/forge/patches/minecraft_server/net/minecraft/src/EnchantmentHelper.java.patch index 7a4afaa9a6..221b46ba9f 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/EnchantmentHelper.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/EnchantmentHelper.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft_server/net/minecraft/src/EnchantmentHelper.java 0000-00-00 00:00:00.000000000 -0000 +++ ../src_work/minecraft_server/net/minecraft/src/EnchantmentHelper.java 0000-00-00 00:00:00.000000000 -0000 -@@ -354,7 +354,7 @@ +@@ -357,7 +357,7 @@ { Enchantment var7 = var4[var6]; diff --git a/forge/patches/minecraft_server/net/minecraft/src/EntityOcelot.java.patch b/forge/patches/minecraft_server/net/minecraft/src/EntityOcelot.java.patch index c02e7bfa41..3e8517af15 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/EntityOcelot.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/EntityOcelot.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft_server/net/minecraft/src/EntityOcelot.java 0000-00-00 00:00:00.000000000 -0000 +++ ../src_work/minecraft_server/net/minecraft/src/EntityOcelot.java 0000-00-00 00:00:00.000000000 -0000 -@@ -298,7 +298,8 @@ +@@ -301,7 +301,8 @@ int var4 = this.worldObj.getBlockId(var1, var2 - 1, var3); diff --git a/forge/patches/minecraft_server/net/minecraft/src/World.java.patch b/forge/patches/minecraft_server/net/minecraft/src/World.java.patch index 49e9df426e..ed1b498a5f 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/World.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/World.java.patch @@ -52,8 +52,8 @@ + return (id == 0 || Block.blocksList[id] == null || Block.blocksList[id].isAirBlock(this, par1, par2, par3)); } - public boolean func_48084_h(int par1, int par2, int par3) -@@ -1600,7 +1612,7 @@ + /** +@@ -1604,7 +1616,7 @@ if (var7 != null) { @@ -62,7 +62,7 @@ } } } -@@ -1630,14 +1642,16 @@ +@@ -1634,14 +1646,16 @@ { this.loadedTileEntityList.add(var8); } @@ -81,7 +81,7 @@ } } -@@ -1654,13 +1668,13 @@ +@@ -1658,13 +1672,13 @@ public void addTileEntity(Collection par1Collection) { @@ -101,7 +101,7 @@ } } -@@ -1682,7 +1696,7 @@ +@@ -1686,7 +1700,7 @@ int var4 = MathHelper.floor_double(par1Entity.posZ); byte var5 = 32; @@ -110,7 +110,7 @@ { par1Entity.lastTickPosX = par1Entity.posX; par1Entity.lastTickPosY = par1Entity.posY; -@@ -1905,6 +1919,13 @@ +@@ -1909,6 +1923,13 @@ if (var11 == Block.fire.blockID || var11 == Block.lavaMoving.blockID || var11 == Block.lavaStill.blockID) { return true; @@ -124,7 +124,7 @@ } } } -@@ -2188,25 +2209,21 @@ +@@ -2192,25 +2213,21 @@ */ public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity) { @@ -163,7 +163,7 @@ } } -@@ -2215,27 +2232,10 @@ +@@ -2219,27 +2236,10 @@ */ public void removeBlockTileEntity(int par1, int par2, int par3) { @@ -194,7 +194,7 @@ } } -@@ -2261,7 +2261,8 @@ +@@ -2265,7 +2265,8 @@ */ public boolean isBlockNormalCube(int par1, int par2, int par3) { @@ -204,7 +204,7 @@ } /** -@@ -2277,7 +2278,7 @@ +@@ -2281,7 +2282,7 @@ if (var5 != null && !var5.isEmpty()) { Block var6 = Block.blocksList[this.getBlockId(par1, par2, par3)]; @@ -213,7 +213,7 @@ } else { -@@ -2536,6 +2537,7 @@ +@@ -2540,6 +2541,7 @@ } } } @@ -221,7 +221,7 @@ Profiler.endSection(); -@@ -2859,7 +2861,7 @@ +@@ -2863,7 +2865,7 @@ private int computeBlockLightValue(int par1, int par2, int par3, int par4, int par5, int par6) { @@ -230,7 +230,7 @@ int var8 = this.getSavedLightValue(EnumSkyBlock.Block, par2 - 1, par3, par4) - par6; int var9 = this.getSavedLightValue(EnumSkyBlock.Block, par2 + 1, par3, par4) - par6; int var10 = this.getSavedLightValue(EnumSkyBlock.Block, par2, par3 - 1, par4) - par6; -@@ -3192,10 +3194,10 @@ +@@ -3196,10 +3198,10 @@ public List getEntitiesWithinAABBExcludingEntity(Entity par1Entity, AxisAlignedBB par2AxisAlignedBB) { this.entitiesWithinAABBExcludingEntity.clear(); @@ -245,7 +245,7 @@ for (int var7 = var3; var7 <= var4; ++var7) { -@@ -3216,10 +3218,10 @@ +@@ -3220,10 +3222,10 @@ */ public List getEntitiesWithinAABB(Class par1Class, AxisAlignedBB par2AxisAlignedBB) { @@ -260,7 +260,7 @@ ArrayList var7 = new ArrayList(); for (int var8 = var3; var8 <= var4; ++var8) -@@ -3345,6 +3347,11 @@ +@@ -3349,6 +3351,11 @@ { var8 = null; } @@ -272,7 +272,7 @@ return par1 > 0 && var8 == null && var9.canPlaceBlockOnSide(this, par2, par3, par4, par6); } -@@ -3856,4 +3863,38 @@ +@@ -3864,4 +3871,38 @@ { return this.getChunkProvider().findClosestStructure(this, par1Str, par2, par3, par4); } diff --git a/forge/patches/minecraft_server/net/minecraft/src/WorldGenHugeTrees.java.patch b/forge/patches/minecraft_server/net/minecraft/src/WorldGenHugeTrees.java.patch index e3d07ce5b5..26db3a98a8 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/WorldGenHugeTrees.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/WorldGenHugeTrees.java.patch @@ -1,6 +1,6 @@ --- ../src_base/minecraft_server/net/minecraft/src/WorldGenHugeTrees.java 0000-00-00 00:00:00.000000000 -0000 +++ ../src_work/minecraft_server/net/minecraft/src/WorldGenHugeTrees.java 0000-00-00 00:00:00.000000000 -0000 -@@ -54,7 +54,12 @@ +@@ -55,7 +55,12 @@ { var12 = par1World.getBlockId(var10, var8, var11); @@ -14,7 +14,7 @@ { var7 = false; } -@@ -102,7 +107,7 @@ +@@ -103,7 +108,7 @@ { var11 = par1World.getBlockId(par3, par4 + var10, par5); @@ -23,7 +23,7 @@ { this.setBlockAndMetadata(par1World, par3, par4 + var10, par5, Block.wood.blockID, this.woodMetadata); -@@ -124,7 +129,7 @@ +@@ -125,7 +130,7 @@ { var11 = par1World.getBlockId(par3 + 1, par4 + var10, par5); @@ -32,7 +32,7 @@ { this.setBlockAndMetadata(par1World, par3 + 1, par4 + var10, par5, Block.wood.blockID, this.woodMetadata); -@@ -144,7 +149,7 @@ +@@ -145,7 +150,7 @@ var11 = par1World.getBlockId(par3 + 1, par4 + var10, par5 + 1); @@ -41,7 +41,7 @@ { this.setBlockAndMetadata(par1World, par3 + 1, par4 + var10, par5 + 1, Block.wood.blockID, this.woodMetadata); -@@ -164,7 +169,7 @@ +@@ -165,7 +170,7 @@ var11 = par1World.getBlockId(par3, par4 + var10, par5 + 1); @@ -50,7 +50,7 @@ { this.setBlockAndMetadata(par1World, par3, par4 + var10, par5 + 1, Block.wood.blockID, this.woodMetadata); -@@ -215,7 +220,12 @@ +@@ -216,7 +221,12 @@ { int var14 = var13 - par3;