Setup and import of 1.16 YEET

This commit is contained in:
cpw 2020-06-19 10:58:45 -04:00
parent 56397043bb
commit 6d15febdb3
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7
931 changed files with 18847 additions and 9127 deletions

1
.gitignore vendored
View file

@ -42,3 +42,4 @@ changelog.txt
gradle.properties gradle.properties
!/mdk/gradle.properties !/mdk/gradle.properties
/projects/forge/rejects/

View file

@ -10,7 +10,7 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+' classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.178'
classpath 'org.ow2.asm:asm:7.2' classpath 'org.ow2.asm:asm:7.2'
classpath 'org.ow2.asm:asm-tree:7.2' classpath 'org.ow2.asm:asm-tree:7.2'
} }
@ -64,13 +64,16 @@ ext {
] ]
} }
MAPPING_CHANNEL = 'snapshot' MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20200514-1.15.1' MAPPING_VERSION = '20200514-1.16'
MC_VERSION = '1.15.2' MC_VERSION = '1.16-rc1'
MCP_VERSION = '20200515.085601' MCP_VERSION = '20200622.150620'
} }
project(':mcp') { project(':mcp') {
apply plugin: 'net.minecraftforge.gradle.mcp' apply plugin: 'net.minecraftforge.gradle.mcp'
repositories {
mavenLocal()
}
mcp { mcp {
config = MC_VERSION + '-' + MCP_VERSION config = MC_VERSION + '-' + MCP_VERSION
pipeline = 'joined' pipeline = 'joined'
@ -84,6 +87,7 @@ project(':clean') {
compileJava.sourceCompatibility = compileJava.targetCompatibility = sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava.sourceCompatibility = compileJava.targetCompatibility = sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
repositories { repositories {
mavenLocal()
//mavenCentral() //TODO: Update Gradle to use HTTPS by default //mavenCentral() //TODO: Update Gradle to use HTTPS by default
maven { maven {
name 'maven_central' name 'maven_central'

693
missedpatches.md Normal file
View file

@ -0,0 +1,693 @@
## Missed patches
- [x] Apply Patch: net/minecraft/particles/ParticleType.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/tags/Tag.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
Hunk #7 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/enchantment/EnchantmentHelper.java.patch\
Hunk #3 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/tileentity/BeaconTileEntity.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/tileentity/PistonTileEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/tileentity/ConduitTileEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/tileentity/ChestTileEntity.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/tileentity/AbstractFurnaceTileEntity.java.patch\
Hunk #3 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/tileentity/HopperTileEntity.java.patch\
Hunk #3 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/command/arguments/BlockStateParser.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/command/Commands.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/command/impl/LocateCommand.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/inventory/container/Container.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/inventory/container/EnchantmentContainer.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/inventory/container/BeaconContainer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/inventory/container/RepairContainer.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/pathfinding/SwimmerPathNavigator.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/pathfinding/PathNavigator.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/pathfinding/WalkNodeProcessor.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/PoweredRailBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/PistonBlock.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/RedstoneDiodeBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/TurtleEggBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/BambooBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/VineBlock.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/StemBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/AbstractRailBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/block/NetherWartBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/FlowingFluidBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/FireBlock.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
Hunk #10 Failed: Cannot find hunk target\
Hunk #11 Failed: Cannot find hunk target\
Hunk #12 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/CampfireBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/NoteBlock.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/TNTBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/CocoaBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/ComparatorBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/SugarCaneBlock.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/ShearableDoublePlantBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/CropsBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/StairsBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/Blocks.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/trees/JungleTree.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/BlockState.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/BedBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/EnchantingTableBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/FlowerPotBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/ChorusFlowerBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/CactusBlock.java.patch\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/KelpTopBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/RedstoneWireBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/NetherPortalBlock.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/Block.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
Hunk #7 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #19 Failed: Cannot find hunk target\
Hunk #20 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/block/SweetBerryBushBlock.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/ai/goal/RangedBowAttackGoal.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/SharedMonsterAttributes.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/LivingEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #16 Failed: Cannot find hunk target\
Hunk #23 Failed: Cannot find hunk target\
Hunk #29 Failed: Cannot find hunk target\
Hunk #31 Failed: Cannot find hunk target\
Hunk #34 Failed: Cannot find hunk target\
Hunk #35 Failed: Cannot find hunk target\
Hunk #40 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/EntityType.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
Hunk #10 Failed: Cannot find hunk target\
Hunk #11 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/passive/MooshroomEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/passive/SheepEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/passive/SnowGolemEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/passive/horse/AbstractHorseEntity.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/merchant/villager/VillagerEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/merchant/villager/AbstractVillagerEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/projectile/FishingBobberEntity.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/projectile/SmallFireballEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/EntitySpawnPlacementRegistry.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/MobEntity.java.patch\
Hunk #6 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/player/ServerPlayerEntity.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #12 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/player/PlayerEntity.java.patch\
Hunk #7 Failed: Cannot find hunk target\
Hunk #11 Failed: Cannot find hunk target\
Hunk #16 Failed: Cannot find hunk target\
Hunk #27 Failed: Cannot find hunk target\
Hunk #30 Failed: Cannot find hunk target\
Hunk #31 Failed: Cannot find hunk target\
Hunk #36 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/Entity.java.patch\
Hunk #12 Failed: Cannot find hunk target\
Hunk #13 Failed: Cannot find hunk target\
Hunk #14 Failed: Cannot find hunk target\
Hunk #26 Failed: Cannot find hunk target\
Hunk #29 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/EntityClassification.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/monster/ZombieEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/monster/SlimeEntity.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/monster/EndermanEntity.java.patch\
Hunk #6 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/item/ItemEntity.java.patch\
Hunk #11 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/item/minecart/ContainerMinecartEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/item/minecart/AbstractMinecartEntity.java.patch\
Hunk #4 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
Hunk #11 Failed: Cannot find hunk target\
Hunk #16 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/item/minecart/MinecartCommandBlockEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/item/EnderPearlEntity.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/item/ExperienceOrbEntity.java.patch\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/item/FireworkRocketEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/entity/boss/dragon/EnderDragonEntity.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/server/management/PlayerInteractionManager.java.patch\
Hunk #6 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/server/management/PlayerList.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #11 Failed: Cannot find hunk target\
Hunk #13 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/server/MinecraftServer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #17 Failed: Cannot find hunk target\
Hunk #19 Failed: Cannot find hunk target\
Hunk #22 Failed: Cannot find hunk target\
Hunk #23 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/server/integrated/IntegratedServer.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/dispenser/IDispenseItemBehavior.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/fluid/IFluidState.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/fluid/LavaFluid.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/potion/PotionBrewing.java.patch\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/network/login/server/SLoginSuccessPacket.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/network/play/server/SJoinGamePacket.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/network/play/server/SRespawnPacket.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/network/play/ServerPlayNetHandler.java.patch\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/WorldInfo.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/SaveHandler.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/loot/LootPool.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/loot/LootTableManager.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/loot/conditions/RandomChanceWithLooting.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/loot/LootParameterSets.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/loot/LootTable.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/loot/LootContext.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/loot/functions/LootingEnchantBonus.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/loot/functions/Smelt.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/SaveFormat.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/MapData.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/storage/DimensionSavedDataManager.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/chunk/storage/RegionFileCache.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/chunk/Chunk.java.patch\
Hunk #4 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #18 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/end/DragonFightManager.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/server/ServerMultiWorld.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/server/ServerWorld.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
Hunk #7 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
Hunk #12 Failed: Cannot find hunk target\
Hunk #13 Failed: Cannot find hunk target\
Hunk #18 Failed: Cannot find hunk target\
Hunk #26 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/server/ChunkHolder.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/IWorld.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/Explosion.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/World.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
Hunk #18 Failed: Cannot find hunk target\
Hunk #19 Failed: Cannot find hunk target\
Hunk #22 Failed: Cannot find hunk target\
Hunk #25 Failed: Cannot find hunk target\
Hunk #26 Failed: Cannot find hunk target\
Hunk #27 Failed: Cannot find hunk target\
Hunk #28 Failed: Cannot find hunk target\
Hunk #29 Failed: Cannot find hunk target\
Hunk #30 Failed: Cannot find hunk target\
Hunk #31 Failed: Cannot find hunk target\
Hunk #32 Failed: Cannot find hunk target\
Hunk #33 Failed: Cannot find hunk target\
Hunk #34 Failed: Cannot find hunk target\
Hunk #35 Failed: Cannot find hunk target\
Hunk #37 Failed: Cannot find hunk target\
Hunk #38 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/dimension/Dimension.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/dimension/DimensionType.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/dimension/OverworldDimension.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/dimension/NetherDimension.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/dimension/EndDimension.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/spawner/WorldEntitySpawner.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/biome/Biome.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/biome/provider/BiomeProviderType.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/biome/DefaultBiomeFeatures.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/WorldType.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/world/gen/WorldGenRegion.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/world/gen/NoiseChunkGenerator.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/layer/LayerUtil.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/layer/BiomeLayer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/ChunkGeneratorType.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/DarkOakTreeFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/AbstractTreeFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/structure/Structures.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/MegaJungleFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/OreFeatureConfig.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/SpringFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/FlowersFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/Feature.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/HugeTreesFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/AbstractSmallTreeFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/jigsaw/JigsawPattern.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/jigsaw/SingleJigsawPiece.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/BaseTreeFeatureConfig.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/TreeFeatureConfig.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/ShrubFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/HugeTreeFeatureConfig.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/MegaPineTree.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/DungeonsFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/VinesFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/GlowstoneBlobFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/AbstractBigMushroomFeature.java.patch\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/TreeFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/template/Template.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/template/StructureProcessor.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/AcaciaFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/world/gen/feature/IceSpikeFeature.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/advancements/AdvancementManager.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/advancements/AdvancementRewards.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/util/math/shapes/EntitySelectionContext.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/util/Session.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/util/registry/Registry.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/util/ScreenShotHelper.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/MouseHelper.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/Minecraft.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #12 Failed: Cannot find hunk target\
Hunk #14 Failed: Cannot find hunk target\
Hunk #27 Failed: Cannot find hunk target\
Hunk #31 Failed: Cannot find hunk target\
Hunk #34 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/settings/KeyBinding.java.patch\
Hunk #9 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/audio/SoundEngine.java.patch\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/KeyboardListener.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/network/play/ClientPlayNetHandler.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #11 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/shader/Framebuffer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/shader/ShaderGroup.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/DisplayEffectsScreen.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/widget/Widget.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/widget/list/KeyBindingList.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/IngameGui.java.patch\
Hunk #4 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/screen/inventory/ContainerScreen.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
Hunk #7 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
Hunk #10 Failed: Cannot find hunk target\
Hunk #11 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/screen/inventory/CreativeScreen.java.patch\
Hunk #6 Failed: Cannot find hunk target\
Hunk #11 Failed: Cannot find hunk target\
Hunk #12 Failed: Cannot find hunk target\
Hunk #13 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/screen/MainMenuScreen.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #6 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/screen/ControlsScreen.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/screen/Screen.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/gui/screen/ResourcePacksScreen.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/gui/screen/CreateWorldScreen.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/screen/LanguageScreen.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/screen/EnchantmentScreen.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/screen/SleepInMultiplayerScreen.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/gui/advancements/AdvancementsScreen.java.patch\
Hunk #3 Failed: Cannot find hunk target\
Hunk #7 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/SlotGui.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/gui/overlay/DebugOverlayGui.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/gui/toasts/RecipeToast.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/particle/DiggingParticle.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/particle/ParticleManager.java.patch\
Hunk #3 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/resources/ClientResourcePackInfo.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/multiplayer/PlayerController.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/Matrix3f.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/model/BlockModel.java.patch\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/renderer/model/BakedQuad.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/model/FaceBakery.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/model/ModelBakery.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/BlockRendererDispatcher.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/tileentity/ChestTileEntityRenderer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/tileentity/PistonTileEntityRenderer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/FogRenderer.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/BlockModelRenderer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/renderer/chunk/ChunkRenderDispatcher.java.patch\
Hunk #8 Failed: Cannot find hunk target\
Hunk #9 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/entity/FallingBlockRenderer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/renderer/entity/layers/ArmorLayer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/entity/ItemFrameRenderer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/entity/EntityRenderer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/entity/ItemRenderer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/renderer/GameRenderer.java.patch\
Hunk #3 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/TransformationMatrix.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #2 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/client/renderer/RenderTypeLookup.java.patch\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/texture/LayeredTexture.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/FirstPersonRenderer.java.patch\
Hunk #5 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/FluidBlockRenderer.java.patch\
Hunk #1 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
Hunk #4 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/Matrix4f.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/Vector3f.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/WorldRenderer.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/ItemRenderer.java.patch\
Hunk #3 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/client/renderer/Vector4f.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/resources/IResourcePack.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/resources/ResourcePackInfo.java.patch\
Hunk #2 Failed: Cannot find hunk target\
Hunk #3 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/resources/ResourcePackList.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/item/crafting/Ingredient.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/item/crafting/RecipeManager.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/item/BowItem.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/item/LilyPadItem.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/item/AxeItem.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/item/PickaxeItem.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/item/FlintAndSteelItem.java.patch\
Hunk #1 Failed: Cannot find hunk target\
- [ ] Apply Patch: net/minecraft/item/MinecartItem.java.patch\
Hunk #2 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/item/BucketItem.java.patch\
Hunk #4 Failed: Cannot find hunk target\
Hunk #5 Failed: Cannot find hunk target\
- [x] Apply Patch: net/minecraft/item/Item.java.patch\
Hunk #6 Failed: Cannot find hunk target\
Hunk #8 Failed: Cannot find hunk target\
Hunk #10 Failed: Cannot find hunk target\

6
namefails.txt Normal file
View file

@ -0,0 +1,6 @@
func_239290_a_
func_233602_m_ should be func_220345_k (getTrackingRange)
Look into:
func_241212_a_ should be func_225521_a (destroyBlock)
func_241211_a_ should be func_180501_a (setBlockState)

View file

@ -1,6 +1,6 @@
--- a/com/mojang/blaze3d/platform/GlStateManager.java --- a/com/mojang/blaze3d/platform/GlStateManager.java
+++ b/com/mojang/blaze3d/platform/GlStateManager.java +++ b/com/mojang/blaze3d/platform/GlStateManager.java
@@ -579,10 +579,17 @@ @@ -556,10 +556,17 @@
GL13.glClientActiveTexture(p_227747_0_); GL13.glClientActiveTexture(p_227747_0_);
} }

View file

@ -1,18 +1,18 @@
--- a/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java --- a/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java
+++ b/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsGenericErrorScreen.java
@@ -64,6 +64,15 @@ @@ -63,6 +63,15 @@
super.tick(); }));
} }
+ @Override + @Override
+ public boolean keyPressed(int key, int scanCode, int modifiers) { + public boolean func_231046_a_(int key, int scanCode, int modifiers) {
+ if (key == org.lwjgl.glfw.GLFW.GLFW_KEY_ESCAPE) { + if (key == org.lwjgl.glfw.GLFW.GLFW_KEY_ESCAPE) {
+ Realms.setScreen(this.field_224228_a); + field_230706_i_.func_147108_a(this.field_224228_a);
+ return true; + return true;
+ } + }
+ return super.keyPressed(key, scanCode, modifiers); + return super.func_231046_a_(key, scanCode, modifiers);
+ } + }
+ +
public void render(int p_render_1_, int p_render_2_, float p_render_3_) { public void func_230430_a_(MatrixStack p_230430_1_, int p_230430_2_, int p_230430_3_, float p_230430_4_) {
this.renderBackground(); this.func_230446_a_(p_230430_1_);
this.drawCenteredString(this.field_224229_b, this.width() / 2, 80, 16777215); this.func_238472_a_(p_230430_1_, this.field_230712_o_, this.field_224229_b, this.field_230708_k_ / 2, 80, 16777215);

View file

@ -1,14 +1,17 @@
--- a/net/minecraft/advancements/PlayerAdvancements.java --- a/net/minecraft/advancements/PlayerAdvancements.java
+++ b/net/minecraft/advancements/PlayerAdvancements.java +++ b/net/minecraft/advancements/PlayerAdvancements.java
@@ -154,6 +154,7 @@ @@ -159,6 +159,10 @@
} }
this.func_192748_e(); this.func_240920_c_(p_240921_1_);
+ if (net.minecraftforge.common.ForgeConfig.SERVER.fixAdvancementLoading.get()) net.minecraftforge.common.AdvancementLoadFix.loadVisibility(this, this.field_192759_g, this.field_192760_h, this.field_192758_f, this.field_192761_i, this::func_192738_c); else +
+ if (net.minecraftforge.common.ForgeConfig.SERVER.fixAdvancementLoading.get())
+ net.minecraftforge.common.AdvancementLoadFix.loadVisibility(this, this.field_192759_g, this.field_192760_h, this.field_192758_f, this.field_192761_i, this::func_192738_c);
+ else
this.func_192752_d(); this.func_192752_d();
this.func_192751_c(); this.func_240919_b_(p_240921_1_);
} }
@@ -187,6 +188,8 @@ @@ -192,6 +196,8 @@
} }
public boolean func_192750_a(Advancement p_192750_1_, String p_192750_2_) { public boolean func_192750_a(Advancement p_192750_1_, String p_192750_2_) {
@ -17,9 +20,9 @@
boolean flag = false; boolean flag = false;
AdvancementProgress advancementprogress = this.func_192747_a(p_192750_1_); AdvancementProgress advancementprogress = this.func_192747_a(p_192750_1_);
boolean flag1 = advancementprogress.func_192105_a(); boolean flag1 = advancementprogress.func_192105_a();
@@ -199,6 +202,7 @@ @@ -204,6 +210,7 @@
if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223620_w)) { if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223620_w)) {
this.field_192756_d.func_184103_al().func_148539_a(new TranslationTextComponent("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j())); this.field_240917_e_.func_232641_a_(new TranslationTextComponent("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()), ChatType.SYSTEM, Util.field_240973_b_);
} }
+ net.minecraftforge.common.ForgeHooks.onAdvancement(this.field_192762_j, p_192750_1_); + net.minecraftforge.common.ForgeHooks.onAdvancement(this.field_192762_j, p_192750_1_);
} }

View file

@ -8,7 +8,7 @@
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> unmod_predicates = java.util.Collections.unmodifiableMap(custom_predicates); + private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> unmod_predicates = java.util.Collections.unmodifiableMap(custom_predicates);
public static final ItemPredicate field_192495_a = new ItemPredicate(); public static final ItemPredicate field_192495_a = new ItemPredicate();
@Nullable @Nullable
private final Tag<Item> field_200018_b; private final ITag<Item> field_200018_b;
@@ -105,6 +107,11 @@ @@ -105,6 +107,11 @@
public static ItemPredicate func_192492_a(@Nullable JsonElement p_192492_0_) { public static ItemPredicate func_192492_a(@Nullable JsonElement p_192492_0_) {
if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) { if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) {

View file

@ -0,0 +1,85 @@
--- a/net/minecraft/block/AbstractBlock.java
+++ b/net/minecraft/block/AbstractBlock.java
@@ -59,7 +59,8 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
-public abstract class AbstractBlock {
+//TODO, Delegates are weird here now, because Block extends this.
+public abstract class AbstractBlock extends net.minecraftforge.registries.ForgeRegistryEntry<Block> {
protected static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
protected final Material field_149764_J;
protected final boolean field_235688_at_;
@@ -71,6 +72,7 @@
protected final float field_226887_g_;
protected final boolean field_208621_p;
protected final AbstractBlock.Properties field_235684_aB_;
+
@Nullable
protected ResourceLocation field_220085_g;
@@ -86,6 +88,8 @@
this.field_226887_g_ = p_i241196_1_.field_226894_k_;
this.field_208621_p = p_i241196_1_.field_208772_j;
this.field_235684_aB_ = p_i241196_1_;
+ final ResourceLocation lootTableCache = p_i241196_1_.field_222381_j;
+ this.lootTableSupplier = lootTableCache != null ? () -> lootTableCache : p_i241196_1_.lootTableSupplier != null ? p_i241196_1_.lootTableSupplier : () -> new ResourceLocation(this.getRegistryName().func_110624_b(), "blocks/" + this.getRegistryName().func_110623_a());
}
@Deprecated
@@ -128,7 +132,7 @@
@Deprecated
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
- if (this.func_235695_q_() && !p_196243_1_.func_203425_a(p_196243_4_.func_177230_c())) {
+ if (this.func_235695_q_() && (p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c() || !p_196243_4_.hasTileEntity())) {
p_196243_2_.func_175713_t(p_196243_3_);
}
@@ -190,7 +194,7 @@
@Deprecated
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
- return this.field_149764_J.func_76222_j() && (p_196253_2_.func_195996_i().func_190926_b() || p_196253_2_.func_195996_i().func_77973_b() != this.func_199767_j());
+ return p_196253_1_.func_185904_a().func_76222_j() && (p_196253_2_.func_195996_i().func_190926_b() || p_196253_2_.func_195996_i().func_77973_b() != this.func_199767_j());
}
@Deprecated
@@ -293,7 +297,7 @@
if (f == -1.0F) {
return 0.0F;
} else {
- int i = p_180647_2_.func_234569_d_(p_180647_1_) ? 30 : 100;
+ int i = net.minecraftforge.common.ForgeHooks.canHarvestBlock(p_180647_1_, p_180647_2_, p_180647_3_, p_180647_4_) ? 30 : 100;
return p_180647_2_.func_184813_a(p_180647_1_) / f / (float)i;
}
}
@@ -326,8 +330,7 @@
public final ResourceLocation func_220068_i() {
if (this.field_220085_g == null) {
- ResourceLocation resourcelocation = Registry.field_212618_g.func_177774_c(this.func_230328_p_());
- this.field_220085_g = new ResourceLocation(resourcelocation.func_110624_b(), "blocks/" + resourcelocation.func_110623_a());
+ this.field_220085_g = this.lootTableSupplier.get();
}
return this.field_220085_g;
@@ -345,6 +348,10 @@
return this.field_235684_aB_.field_235800_b_.apply(this.func_230328_p_().func_176223_P());
}
+ /* ======================================== FORGE START ===================================== */
+ private final java.util.function.Supplier<ResourceLocation> lootTableSupplier;
+ /* ========================================= FORGE END ====================================== */
+
public abstract static class AbstractBlockState extends StateHolder<Block, BlockState> {
private final int field_215708_d;
private final boolean field_215709_e;
@@ -786,6 +793,7 @@
private ResourceLocation field_222381_j;
private boolean field_226895_m_ = true;
private boolean field_235813_o_;
+ private java.util.function.Supplier<ResourceLocation> lootTableSupplier;
private AbstractBlock.IExtendedPositionPredicate<EntityType<?>> field_235814_p_ = (p_235832_0_, p_235832_1_, p_235832_2_, p_235832_3_) -> {
return p_235832_0_.func_224755_d(p_235832_1_, p_235832_2_, Direction.UP) && p_235832_0_.func_185906_d() < 14;
};

View file

@ -1,24 +1,32 @@
--- a/net/minecraft/block/AbstractRailBlock.java --- a/net/minecraft/block/AbstractRailBlock.java
+++ b/net/minecraft/block/AbstractRailBlock.java +++ b/net/minecraft/block/AbstractRailBlock.java
@@ -36,7 +36,7 @@ @@ -13,7 +13,7 @@
} import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
-public abstract class AbstractRailBlock extends Block {
+public abstract class AbstractRailBlock extends Block implements net.minecraftforge.common.extensions.IAbstractRailBlock {
protected static final VoxelShape field_185590_a = Block.func_208617_a(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D);
protected static final VoxelShape field_190959_b = Block.func_208617_a(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
private final boolean field_196277_c;
@@ -37,6 +37,7 @@
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) { public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
- RailShape railshape = p_220053_1_.func_177230_c() == this ? p_220053_1_.func_177229_b(this.func_176560_l()) : null; RailShape railshape = p_220053_1_.func_203425_a(this) ? p_220053_1_.func_177229_b(this.func_176560_l()) : null;
+ RailShape railshape = p_220053_1_.func_177230_c() == this ? getRailDirection(p_220053_1_, p_220053_2_, p_220053_3_, null) : null; + RailShape railShape2 = p_220053_1_.func_177230_c() == this ? getRailDirection(p_220053_1_, p_220053_2_, p_220053_3_, null) : null;
return railshape != null && railshape.func_208092_c() ? field_190959_b : field_185590_a; return railshape != null && railshape.func_208092_c() ? field_190959_b : field_185590_a;
} }
@@ -56,7 +56,7 @@ @@ -61,7 +62,7 @@
public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) { public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) {
if (!p_220069_2_.field_72995_K) { if (!p_220069_2_.field_72995_K) {
- RailShape railshape = p_220069_1_.func_177229_b(this.func_176560_l()); - RailShape railshape = p_220069_1_.func_177229_b(this.func_176560_l());
+ RailShape railshape = getRailDirection(p_220069_1_, p_220069_2_, p_220069_3_, null); + RailShape railshape = getRailDirection(p_220069_1_, p_220069_2_, p_220069_3_, null);
boolean flag = false; if (func_235328_a_(p_220069_3_, p_220069_2_, railshape) && !p_220069_2_.func_175623_d(p_220069_3_)) {
BlockPos blockpos = p_220069_3_.func_177977_b(); if (!p_220069_6_) {
if (!func_220064_c(p_220069_2_, blockpos)) { func_220075_c(p_220069_1_, p_220069_2_, p_220069_3_);
@@ -115,7 +115,7 @@ @@ -113,7 +114,7 @@
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) { public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
if (!p_196243_5_) { if (!p_196243_5_) {
super.func_196243_a(p_196243_1_, p_196243_2_, p_196243_3_, p_196243_4_, p_196243_5_); super.func_196243_a(p_196243_1_, p_196243_2_, p_196243_3_, p_196243_4_, p_196243_5_);
@ -27,70 +35,24 @@
p_196243_2_.func_195593_d(p_196243_3_.func_177984_a(), this); p_196243_2_.func_195593_d(p_196243_3_.func_177984_a(), this);
} }
@@ -134,5 +134,66 @@ @@ -132,5 +133,20 @@
return blockstate.func_206870_a(this.func_176560_l(), flag ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH); return blockstate.func_206870_a(this.func_176560_l(), flag ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH);
} }
+ //Forge: Use getRailDirection(IBlockAccess, BlockPos, IBlockState, EntityMinecart) for enhanced ability + @Deprecated //Forge: Use getRailDirection(IBlockAccess, BlockPos, IBlockState, EntityMinecart) for enhanced ability
public abstract IProperty<RailShape> func_176560_l(); public abstract Property<RailShape> func_176560_l();
+ +
+ /* ======================================== FORGE START =====================================*/ + /* ======================================== FORGE START =====================================*/
+ /** +
+ * Return true if the rail can make corners. + @Override
+ * Used by placement logic.
+ * @param world The world.
+ * @param pos Block's position in world
+ * @return True if the rail can make corners.
+ */
+ public boolean isFlexibleRail(BlockState state, IBlockReader world, BlockPos pos) + public boolean isFlexibleRail(BlockState state, IBlockReader world, BlockPos pos)
+ { + {
+ return !this.field_196277_c; + return !this.field_196277_c;
+ } + }
+ +
+ /** + @Override
+ * Returns true if the rail can make up and down slopes.
+ * Used by placement logic.
+ * @param world The world.
+ * @param pos Block's position in world
+ * @return True if the rail can make slopes.
+ */
+ public boolean canMakeSlopes(BlockState state, IBlockReader world, BlockPos pos) {
+ return true;
+ }
+
+ /**
+ * Return the rail's direction.
+ * Can be used to make the cart think the rail is a different shape,
+ * for example when making diamond junctions or switches.
+ * The cart parameter will often be null unless it it called from EntityMinecart.
+ *
+ * @param world The world.
+ * @param pos Block's position in world
+ * @param state The BlockState
+ * @param cart The cart asking for the metadata, null if it is not called by EntityMinecart.
+ * @return The direction.
+ */
+ public RailShape getRailDirection(BlockState state, IBlockReader world, BlockPos pos, @javax.annotation.Nullable net.minecraft.entity.item.minecart.AbstractMinecartEntity cart) { + public RailShape getRailDirection(BlockState state, IBlockReader world, BlockPos pos, @javax.annotation.Nullable net.minecraft.entity.item.minecart.AbstractMinecartEntity cart) {
+ return state.func_177229_b(func_176560_l()); + return state.func_177229_b(func_176560_l());
+ } + }
+ + /* ========================================= FORGE END ======================================*/
+ /**
+ * Returns the max speed of the rail at the specified position.
+ * @param world The world.
+ * @param cart The cart on the rail, may be null.
+ * @param pos Block's position in world
+ * @return The max speed of the current rail.
+ */
+ public float getRailMaxSpeed(BlockState state, World world, BlockPos pos, net.minecraft.entity.item.minecart.AbstractMinecartEntity cart) {
+ return 0.4f;
+ }
+
+ /**
+ * This function is called by any minecart that passes over this rail.
+ * It is called once per update tick that the minecart is on the rail.
+ * @param world The world.
+ * @param cart The cart on the rail.
+ * @param pos Block's position in world
+ */
+ public void onMinecartPass(BlockState state, World world, BlockPos pos, net.minecraft.entity.item.minecart.AbstractMinecartEntity cart) { }
} }

View file

@ -1,16 +1,13 @@
--- a/net/minecraft/block/BambooBlock.java --- a/net/minecraft/block/BambooBlock.java
+++ b/net/minecraft/block/BambooBlock.java +++ b/net/minecraft/block/BambooBlock.java
@@ -91,10 +91,11 @@ @@ -101,8 +101,9 @@
if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) { if (p_225542_1_.func_177229_b(field_220266_f) == 0) {
p_225534_2_.func_175655_b(p_225534_3_, true); if (p_225542_4_.nextInt(3) == 0 && p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9) {
} else if (p_225534_1_.func_177229_b(field_220266_f) == 0) { int i = this.func_220260_b(p_225542_2_, p_225542_3_) + 1;
- if (p_225534_4_.nextInt(3) == 0 && p_225534_2_.func_175623_d(p_225534_3_.func_177984_a()) && p_225534_2_.func_226659_b_(p_225534_3_.func_177984_a(), 0) >= 9) {
+ if (true) {
int i = this.func_220260_b(p_225534_2_, p_225534_3_) + 1;
- if (i < 16) { - if (i < 16) {
+ if (i < 16 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt(3) == 0 && p_225534_2_.func_175623_d(p_225534_3_.func_177984_a()) && p_225534_2_.func_226659_b_(p_225534_3_.func_177984_a(), 0) >= 9)) { + if (i < 16 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_.nextInt(3) == 0 && p_225542_2_.func_175623_d(p_225542_3_.func_177984_a()) && p_225542_2_.func_226659_b_(p_225542_3_.func_177984_a(), 0) >= 9)) {
this.func_220258_a(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_, i); this.func_220258_a(p_225542_1_, p_225542_2_, p_225542_3_, p_225542_4_, i);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225542_2_, p_225542_3_, p_225542_1_);
} }
} }

View file

@ -1,134 +1,51 @@
--- a/net/minecraft/block/Block.java --- a/net/minecraft/block/Block.java
+++ b/net/minecraft/block/Block.java +++ b/net/minecraft/block/Block.java
@@ -75,9 +75,10 @@ @@ -52,8 +52,9 @@
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
-public class Block implements IItemProvider { -public class Block extends AbstractBlock implements IItemProvider {
+public class Block extends net.minecraftforge.registries.ForgeRegistryEntry<Block> implements IItemProvider, net.minecraftforge.common.extensions.IForgeBlock { +public class Block extends AbstractBlock implements IItemProvider, net.minecraftforge.common.extensions.IForgeBlock {
protected static final Logger field_196273_d = LogManager.getLogger(); protected static final Logger field_196273_d = LogManager.getLogger();
- public static final ObjectIntIdentityMap<BlockState> field_176229_d = new ObjectIntIdentityMap<>();
+ @Deprecated //Forge: Do not use, use GameRegistry + @Deprecated //Forge: Do not use, use GameRegistry
+ public static final ObjectIntIdentityMap<BlockState> field_176229_d = net.minecraftforge.registries.GameData.getBlockStateIDMap(); public static final ObjectIntIdentityMap<BlockState> field_176229_d = new ObjectIntIdentityMap<>();
private static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
private static final LoadingCache<VoxelShape, Boolean> field_223006_b = CacheBuilder.newBuilder().maximumSize(512L).weakKeys().build(new CacheLoader<VoxelShape, Boolean>() { private static final LoadingCache<VoxelShape, Boolean> field_223006_b = CacheBuilder.newBuilder().maximumSize(512L).weakKeys().build(new CacheLoader<VoxelShape, Boolean>() {
public Boolean load(VoxelShape p_load_1_) { public Boolean load(VoxelShape p_load_1_) {
@@ -151,7 +152,7 @@ @@ -270,7 +271,7 @@
@Deprecated
public boolean func_220067_a(BlockState p_220067_1_, IBlockReader p_220067_2_, BlockPos p_220067_3_, EntityType<?> p_220067_4_) {
- return p_220067_1_.func_224755_d(p_220067_2_, p_220067_3_, Direction.UP) && this.field_149784_t < 14;
+ return p_220067_1_.func_224755_d(p_220067_2_, p_220067_3_, Direction.UP) && p_220067_1_.getLightValue(p_220067_2_, p_220067_3_) < 14;
}
@Deprecated
@@ -246,6 +247,10 @@
this.field_149781_w = p_i48440_1_.field_200958_f;
this.field_149782_v = p_i48440_1_.field_200959_g;
this.field_149789_z = p_i48440_1_.field_200960_h;
+ this.harvestLevel = p_i48440_1_.harvestLevel;
+ this.harvestTool = p_i48440_1_.harvestTool;
+ final ResourceLocation lootTableCache = p_i48440_1_.field_222381_j;
+ this.lootTableSupplier = lootTableCache != null ? () -> lootTableCache : p_i48440_1_.lootTableSupplier != null ? p_i48440_1_.lootTableSupplier : () -> new ResourceLocation(this.getRegistryName().func_110624_b(), "blocks/" + this.getRegistryName().func_110623_a());
this.field_149765_K = p_i48440_1_.field_200961_i;
this.field_226886_f_ = p_i48440_1_.field_226893_j_;
this.field_226887_g_ = p_i48440_1_.field_226894_k_;
@@ -297,7 +302,7 @@
@Deprecated
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
- return this.field_149764_J.func_76222_j() && (p_196253_2_.func_195996_i().func_190926_b() || p_196253_2_.func_195996_i().func_77973_b() != this.func_199767_j());
+ return p_196253_1_.func_185904_a().func_76222_j() && (p_196253_2_.func_195996_i().func_190926_b() || p_196253_2_.func_195996_i().func_77973_b() != this.func_199767_j());
}
@Deprecated
@@ -314,8 +319,9 @@
return this.field_149789_z;
}
+ @Deprecated //Forge: New State sensitive version.
public boolean func_149716_u() {
- return this instanceof ITileEntityProvider;
+ return hasTileEntity(func_176223_P());
}
@Deprecated
@@ -471,10 +477,9 @@
@Deprecated
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
- if (this.func_149716_u() && p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c()) {
+ if (p_196243_1_.hasTileEntity() && (p_196243_1_.func_177230_c() != p_196243_4_.func_177230_c() || !p_196243_4_.hasTileEntity())) {
p_196243_2_.func_175713_t(p_196243_3_);
}
-
}
@Deprecated
@@ -483,8 +488,8 @@
if (f == -1.0F) {
return 0.0F;
} else {
- int i = p_180647_2_.func_184823_b(p_180647_1_) ? 30 : 100;
- return p_180647_2_.func_184813_a(p_180647_1_) / f / (float)i;
+ int i = net.minecraftforge.common.ForgeHooks.canHarvestBlock(p_180647_1_, p_180647_2_, p_180647_3_, p_180647_4_) ? 30 : 100;
+ return p_180647_2_.getDigSpeed(p_180647_1_, p_180647_4_) / f / (float)i;
}
}
@@ -494,8 +499,7 @@
public ResourceLocation func_220068_i() {
if (this.field_220085_g == null) {
- ResourceLocation resourcelocation = Registry.field_212618_g.func_177774_c(this);
- this.field_220085_g = new ResourceLocation(resourcelocation.func_110624_b(), "blocks/" + resourcelocation.func_110623_a());
+ this.field_220085_g = this.lootTableSupplier.get();
}
return this.field_220085_g;
@@ -555,7 +559,7 @@
} }
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) { public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_) {
- if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f)) { - if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f)) {
+ if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f) && !p_180635_0_.restoringBlockSnapshots) { // do not drop items while restoring blockstates, prevents item dupe + if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_223586_b(GameRules.field_223603_f) && p_180635_0_.restoringBlockSnapshots) {
float f = 0.5F; float f = 0.5F;
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D; double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
@@ -567,7 +571,7 @@ @@ -282,7 +283,7 @@
} }
public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) { public void func_180637_b(World p_180637_1_, BlockPos p_180637_2_, int p_180637_3_) {
- if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f)) { - if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f)) {
+ if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f) && !p_180637_1_.restoringBlockSnapshots) { // do not drop items while restoring blockstates, prevents item dupe + if (!p_180637_1_.field_72995_K && p_180637_1_.func_82736_K().func_223586_b(GameRules.field_223603_f) && p_180637_1_.restoringBlockSnapshots) {
while(p_180637_3_ > 0) { while(p_180637_3_ > 0) {
int i = ExperienceOrbEntity.func_70527_a(p_180637_3_); int i = ExperienceOrbEntity.func_70527_a(p_180637_3_);
p_180637_3_ -= i; p_180637_3_ -= i;
@@ -577,6 +581,7 @@ @@ -292,6 +293,7 @@
} }
+ @Deprecated //Forge: State sensitive version + @Deprecated
public float func_149638_a() { public float func_149638_a() {
return this.field_149781_w; return this.field_235689_au_;
} }
@@ -675,6 +680,7 @@ @@ -341,6 +343,7 @@
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D)); p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
} }
+ @Deprecated // Forge: Use more sensitive version below: getPickBlock + @Deprecated //Forge: Use more sensitive version
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) { public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) {
return new ItemStack(this); return new ItemStack(this);
} }
@@ -688,6 +694,7 @@ @@ -372,6 +375,7 @@
return Fluids.field_204541_a.func_207188_f();
}
+ @Deprecated //Forge: Use more sensitive version
public float func_208618_m() {
return this.field_149765_K;
}
@@ -716,6 +723,7 @@
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) { public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
} }
@ -136,15 +53,15 @@
public boolean func_149659_a(Explosion p_149659_1_) { public boolean func_149659_a(Explosion p_149659_1_) {
return true; return true;
} }
@@ -760,6 +768,7 @@ @@ -391,6 +395,7 @@
} return this.field_196275_y;
} }
+ @Deprecated //Forge: Use more sensitive version {@link IForgeBlockState#getSoundType(IWorldReader, BlockPos, Entity) } + @Deprecated //Forge: Use more sensitive version {@link IForgeBlockState#getSoundType(IWorldReader, BlockPos, Entity) }
public SoundType func_220072_p(BlockState p_220072_1_) { public SoundType func_220072_p(BlockState p_220072_1_) {
return this.field_149762_H; return this.field_149762_H;
} }
@@ -769,7 +778,7 @@ @@ -400,7 +405,7 @@
this.field_220086_i = Item.func_150898_a(this); this.field_220086_i = Item.func_150898_a(this);
} }
@ -153,7 +70,7 @@
} }
public boolean func_208619_r() { public boolean func_208619_r() {
@@ -777,13 +786,81 @@ @@ -408,7 +413,7 @@
} }
public String toString() { public String toString() {
@ -162,15 +79,15 @@
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void func_190948_a(ItemStack p_190948_1_, @Nullable IBlockReader p_190948_2_, List<ITextComponent> p_190948_3_, ITooltipFlag p_190948_4_) { @@ -419,6 +424,73 @@
return this;
} }
+ /* ======================================== FORGE START =====================================*/ + /* ======================================== FORGE START =====================================*/
+ protected Random RANDOM = new Random(); + protected Random RANDOM = new Random();
+ private net.minecraftforge.common.ToolType harvestTool; + private net.minecraftforge.common.ToolType harvestTool;
+ private int harvestLevel; + private int harvestLevel;
+ private final net.minecraftforge.common.util.ReverseTagWrapper<Block> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, BlockTags::getGeneration, BlockTags::func_199896_a); + private final net.minecraftforge.common.util.ReverseTagWrapper<Block> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, BlockTags::func_199896_a);
+ private final java.util.function.Supplier<ResourceLocation> lootTableSupplier;
+ +
+ @Override + @Override
+ public float getSlipperiness(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity) { + public float getSlipperiness(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity) {
@ -207,21 +124,21 @@
+ case Nether: return this.getBlock() == Blocks.field_150425_aM; + case Nether: return this.getBlock() == Blocks.field_150425_aM;
+ case Crop: return this.getBlock() == Blocks.field_150458_ak; + case Crop: return this.getBlock() == Blocks.field_150458_ak;
+ case Cave: return Block.func_220056_d(state, world, pos, Direction.UP); + case Cave: return Block.func_220056_d(state, world, pos, Direction.UP);
+ case Plains: return this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(this) || this.getBlock() == Blocks.field_150458_ak; + case Plains: return this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_230235_a_(this) || this.getBlock() == Blocks.field_150458_ak;
+ case Water: return state.func_185904_a() == Material.field_151586_h; //&& state.getValue(BlockLiquidWrapper) + case Water: return state.func_185904_a() == net.minecraft.block.material.Material.field_151586_h; //&& state.getValue(BlockLiquidWrapper)
+ case Beach: + case Beach:
+ boolean isBeach = this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_199685_a_(this) || this.getBlock() == Blocks.field_150354_m; + boolean isBeach = this.getBlock() == Blocks.field_196658_i || net.minecraftforge.common.Tags.Blocks.DIRT.func_230235_a_(this) || this.getBlock() == Blocks.field_150354_m;
+ boolean hasWater = (world.func_180495_p(pos.func_177974_f()).func_185904_a() == Material.field_151586_h || + boolean hasWater = (world.func_180495_p(pos.func_177974_f()).func_185904_a() == net.minecraft.block.material.Material.field_151586_h ||
+ world.func_180495_p(pos.func_177976_e()).func_185904_a() == Material.field_151586_h || + world.func_180495_p(pos.func_177976_e()).func_185904_a() == net.minecraft.block.material.Material.field_151586_h ||
+ world.func_180495_p(pos.func_177978_c()).func_185904_a() == Material.field_151586_h || + world.func_180495_p(pos.func_177978_c()).func_185904_a() == net.minecraft.block.material.Material.field_151586_h ||
+ world.func_180495_p(pos.func_177968_d()).func_185904_a() == Material.field_151586_h); + world.func_180495_p(pos.func_177968_d()).func_185904_a() == net.minecraft.block.material.Material.field_151586_h);
+ return isBeach && hasWater; + return isBeach && hasWater;
+ } + }
+ return false; + return false;
+ } + }
+ +
+ @Override + @Override
+ public final java.util.Set<ResourceLocation> getTags() { + public final java.util.Set<net.minecraft.util.ResourceLocation> getTags() {
+ return reverseTags.getTagNames(); + return reverseTags.getTagNames();
+ } + }
+ +
@ -233,50 +150,6 @@
+ } + }
+ /* ========================================= FORGE END ======================================*/ + /* ========================================= FORGE END ======================================*/
+ +
public static enum OffsetType { public static final class RenderSideCacheKey {
NONE, private final BlockState field_212164_a;
XZ, private final BlockState field_212165_b;
@@ -805,6 +882,9 @@
private ResourceLocation field_222381_j;
private boolean field_226895_m_ = true;
private boolean field_208772_j;
+ private int harvestLevel = -1;
+ private net.minecraftforge.common.ToolType harvestTool;
+ private java.util.function.Supplier<ResourceLocation> lootTableSupplier;
private Properties(Material p_i48616_1_, MaterialColor p_i48616_2_) {
this.field_200953_a = p_i48616_1_;
@@ -837,6 +917,8 @@
block$properties.field_226893_j_ = p_200950_0_.func_226891_m_();
block$properties.field_208772_j = p_200950_0_.field_208621_p;
block$properties.field_226895_m_ = p_200950_0_.field_226888_j_;
+ block$properties.harvestLevel = p_200950_0_.harvestLevel;
+ block$properties.harvestTool = p_200950_0_.harvestTool;
return block$properties;
}
@@ -901,13 +983,23 @@
return this;
}
+ public Block.Properties harvestLevel(int harvestLevel) {
+ this.harvestLevel = harvestLevel;
+ return this;
+ }
+
+ public Block.Properties harvestTool(net.minecraftforge.common.ToolType harvestTool) {
+ this.harvestTool = harvestTool;
+ return this;
+ }
+
public Block.Properties func_222380_e() {
this.field_222381_j = LootTables.field_186419_a;
return this;
}
public Block.Properties func_222379_b(Block p_222379_1_) {
- this.field_222381_j = p_222379_1_.func_220068_i();
+ this.lootTableSupplier = () -> p_222379_1_.delegate.get().func_220068_i();
return this;
}
}

View file

@ -1,26 +1,11 @@
--- a/net/minecraft/block/BlockState.java --- a/net/minecraft/block/BlockState.java
+++ b/net/minecraft/block/BlockState.java +++ b/net/minecraft/block/BlockState.java
@@ -51,7 +51,7 @@ @@ -6,7 +6,7 @@
import net.minecraftforge.api.distmarker.Dist; import net.minecraft.state.Property;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraft.util.registry.Registry;
-public class BlockState extends StateHolder<Block, BlockState> implements IStateHolder<BlockState> { -public class BlockState extends AbstractBlock.AbstractBlockState {
+public class BlockState extends StateHolder<Block, BlockState> implements IStateHolder<BlockState>, net.minecraftforge.common.extensions.IForgeBlockState { +public class BlockState extends AbstractBlock.AbstractBlockState implements net.minecraftforge.common.extensions.IForgeBlockState {
@Nullable public static final Codec<BlockState> field_235877_b_ = func_235897_a_(Registry.field_212618_g, Block::func_176223_P).stable();
private BlockState.Cache field_215707_c;
private final int field_215708_d;
@@ -106,10 +106,14 @@
return this.field_215708_d;
}
+ /** @deprecated use {@link BlockState#isAir(IBlockReader, BlockPos) */ public BlockState(Block p_i231876_1_, ImmutableMap<Property<?>, Comparable<?>> p_i231876_2_, MapCodec<BlockState> p_i231876_3_) {
+ @Deprecated
public boolean func_196958_f() {
return this.func_177230_c().func_196261_e(this);
}
+ /** @deprecated use {@link BlockState#rotate(IWorld, BlockPos, Rotation) */
+ @Deprecated
public MaterialColor func_185909_g(IBlockReader p_185909_1_, BlockPos p_185909_2_) {
return this.func_177230_c().func_180659_g(this, p_185909_1_, p_185909_2_);
}

View file

@ -1,36 +1,10 @@
--- a/net/minecraft/block/Blocks.java --- a/net/minecraft/block/Blocks.java
+++ b/net/minecraft/block/Blocks.java +++ b/net/minecraft/block/Blocks.java
@@ -14,6 +14,7 @@ @@ -26,6 +26,7 @@
import net.minecraft.tileentity.TileEntityType; import net.minecraft.world.gen.feature.Feature;
import net.minecraft.util.registry.Registry; import net.minecraft.world.gen.feature.HugeFungusConfig;
+@net.minecraftforge.registries.ObjectHolder("minecraft") +@net.minecraftforge.registries.ObjectHolder("minecraft")
public class Blocks { public class Blocks {
public static final Block field_150350_a = func_222382_a("air", new AirBlock(Block.Properties.func_200945_a(Material.field_151579_a).func_200942_a().func_222380_e())); public static final Block field_150350_a = func_222382_a("air", new AirBlock(AbstractBlock.Properties.func_200945_a(Material.field_151579_a).func_200942_a().func_222380_e().func_235859_g_()));
public static final Block field_150348_b = func_222382_a("stone", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151665_m).func_200948_a(1.5F, 6.0F))); public static final Block field_150348_b = func_222382_a("stone", new Block(AbstractBlock.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151665_m).func_235861_h_().func_200948_a(1.5F, 6.0F)));
@@ -105,7 +106,7 @@
public static final Block field_196601_az = func_222382_a("green_bed", new BedBlock(DyeColor.GREEN, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
public static final Block field_196550_aA = func_222382_a("red_bed", new BedBlock(DyeColor.RED, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
public static final Block field_196551_aB = func_222382_a("black_bed", new BedBlock(DyeColor.BLACK, Block.Properties.func_200945_a(Material.field_151580_n).func_200947_a(SoundType.field_185848_a).func_200943_b(0.2F).func_226896_b_()));
- public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
+ public static final Block field_196552_aC = func_222382_a("powered_rail", new PoweredRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e), true));
public static final Block field_150319_E = func_222382_a("detector_rail", new DetectorRailBlock(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
public static final Block field_150320_F = func_222382_a("sticky_piston", new PistonBlock(true, Block.Properties.func_200945_a(Material.field_76233_E).func_200943_b(0.5F)));
public static final Block field_196553_aF = func_222382_a("cobweb", new WebBlock(Block.Properties.func_200945_a(Material.field_151569_G).func_200942_a().func_200943_b(4.0F)));
@@ -701,16 +702,4 @@
private static Block func_222382_a(String p_222382_0_, Block p_222382_1_) {
return Registry.func_218325_a(Registry.field_212618_g, p_222382_0_, p_222382_1_);
}
-
- static {
- for(Block block : Registry.field_212618_g) {
- for(BlockState blockstate : block.func_176194_O().func_177619_a()) {
- blockstate.func_215692_c();
- Block.field_176229_d.func_195867_b(blockstate);
- }
-
- block.func_220068_i();
- }
-
- }
}

View file

@ -6,10 +6,10 @@
-public class BushBlock extends Block { -public class BushBlock extends Block {
+public class BushBlock extends Block implements net.minecraftforge.common.IPlantable { +public class BushBlock extends Block implements net.minecraftforge.common.IPlantable {
protected BushBlock(Block.Properties p_i48437_1_) { protected BushBlock(AbstractBlock.Properties p_i48437_1_) {
super(p_i48437_1_); super(p_i48437_1_);
} }
@@ -23,6 +23,8 @@ @@ -22,6 +22,8 @@
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) { public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
BlockPos blockpos = p_196260_3_.func_177977_b(); BlockPos blockpos = p_196260_3_.func_177977_b();
@ -18,9 +18,9 @@
return this.func_200014_a_(p_196260_2_.func_180495_p(blockpos), p_196260_2_, blockpos); return this.func_200014_a_(p_196260_2_.func_180495_p(blockpos), p_196260_2_, blockpos);
} }
@@ -33,4 +35,11 @@ @@ -32,4 +34,11 @@
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) { public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
return p_196266_4_ == PathType.AIR && !this.field_196274_w ? true : super.func_196266_a(p_196266_1_, p_196266_2_, p_196266_3_, p_196266_4_); return p_196266_4_ == PathType.AIR && !this.field_235688_at_ ? true : super.func_196266_a(p_196266_1_, p_196266_2_, p_196266_3_, p_196266_4_);
} }
+ +
+ @Override + @Override

View file

@ -16,37 +16,26 @@
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent growing cactus from loading unloaded chunks with block update + if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent growing cactus from loading unloaded chunks with block update
if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) { if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) {
p_225534_2_.func_175655_b(p_225534_3_, true); p_225534_2_.func_175655_b(p_225534_3_, true);
} else { }
@@ -42,6 +43,7 @@ @@ -42,6 +43,7 @@
int i;
for(i = 1; p_225542_2_.func_180495_p(p_225542_3_.func_177979_c(i)).func_203425_a(this); ++i) {
}
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225542_2_, blockpos, p_225542_1_, true)) {
if (i < 3) { if (i < 3) {
int j = p_225534_1_.func_177229_b(field_176587_a); int j = p_225542_1_.func_177229_b(field_176587_a);
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, blockpos, p_225534_1_, true)) { @@ -53,7 +55,8 @@
if (j == 15) {
p_225534_2_.func_175656_a(blockpos, this.func_176223_P());
BlockState blockstate = p_225534_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
@@ -50,7 +52,8 @@
} else { } else {
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4); p_225542_2_.func_180501_a(p_225542_3_, p_225542_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
} }
- -
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225542_2_, p_225542_3_, p_225542_1_);
+ } + }
} }
} }
} }
@@ -81,8 +84,8 @@ @@ -98,4 +101,14 @@
}
}
- Block block = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()).func_177230_c();
- return (block == Blocks.field_150434_aF || block == Blocks.field_150354_m || block == Blocks.field_196611_F) && !p_196260_2_.func_180495_p(p_196260_3_.func_177984_a()).func_185904_a().func_76224_d();
+ BlockState soil = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
+ return soil.canSustainPlant(p_196260_2_, p_196260_3_.func_177977_b(), Direction.UP, this) && !p_196260_2_.func_180495_p(p_196260_3_.func_177984_a()).func_185904_a().func_76224_d();
}
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {
@@ -96,4 +99,14 @@
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) { public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
return false; return false;
} }

View file

@ -1,45 +1,33 @@
--- a/net/minecraft/block/ChorusFlowerBlock.java --- a/net/minecraft/block/ChorusFlowerBlock.java
+++ b/net/minecraft/block/ChorusFlowerBlock.java +++ b/net/minecraft/block/ChorusFlowerBlock.java
@@ -29,9 +29,9 @@ @@ -65,7 +65,7 @@
p_225534_2_.func_175655_b(p_225534_3_, true); if (j < 2 || j <= p_225542_4_.nextInt(flag1 ? 5 : 4)) {
} else {
BlockPos blockpos = p_225534_3_.func_177984_a();
- if (p_225534_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < 256) {
+ if (p_225534_2_.func_175623_d(blockpos) && blockpos.func_177956_o() < p_225534_2_.func_201675_m().getHeight()) {
int i = p_225534_1_.func_177229_b(field_185607_a);
- if (i < 5) {
+ if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, blockpos, p_225534_1_, true)) {
boolean flag = false;
boolean flag1 = false;
BlockState blockstate = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b());
@@ -56,7 +56,7 @@
if (j < 2 || j <= p_225534_4_.nextInt(flag1 ? 5 : 4)) {
flag = true; flag = true;
} }
- } else if (blockstate.func_196958_f()) { - } else if (blockstate.func_196958_f()) {
+ } else if (blockstate.isAir(p_225534_2_, p_225534_3_.func_177977_b())) { + } else if (blockstate.isAir(p_225542_2_, p_225542_3_.func_177977_b())) {
flag = true; flag = true;
} }
@@ -88,7 +88,7 @@ @@ -97,7 +97,7 @@
} else { } else {
this.func_185605_c(p_225534_2_, p_225534_3_); this.func_185605_c(p_225542_2_, p_225542_3_);
} }
- -
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225542_2_, p_225542_3_, p_225542_1_);
} }
} }
} }
@@ -126,7 +126,7 @@ @@ -133,7 +133,7 @@
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()); BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
Block block = blockstate.func_177230_c(); if (blockstate.func_177230_c() != this.field_196405_b && !blockstate.func_203425_a(Blocks.field_150377_bs)) {
if (block != this.field_196405_b && block != Blocks.field_150377_bs) {
- if (!blockstate.func_196958_f()) { - if (!blockstate.func_196958_f()) {
+ if (!blockstate.isAir(p_196260_2_, p_196260_3_.func_177977_b())) { + if (!blockstate.isAir(p_196260_2_, p_196260_3_.func_177977_b())) {
return false; return false;
} else { } else {
boolean flag = false; boolean flag = false;
@@ -139,7 +139,7 @@ @@ -146,7 +146,7 @@
} }
flag = true; flag = true;

View file

@ -1,22 +1,13 @@
--- a/net/minecraft/block/ComparatorBlock.java --- a/net/minecraft/block/ComparatorBlock.java
+++ b/net/minecraft/block/ComparatorBlock.java +++ b/net/minecraft/block/ComparatorBlock.java
@@ -71,7 +71,7 @@ @@ -154,4 +154,16 @@
blockstate = p_176397_1_.func_180495_p(blockpos);
if (blockstate.func_185912_n()) {
i = blockstate.func_185888_a(p_176397_1_, blockpos);
- } else if (blockstate.func_196958_f()) {
+ } else if (blockstate.isAir(p_176397_1_, blockpos)) {
ItemFrameEntity itemframeentity = this.func_176461_a(p_176397_1_, direction, blockpos);
if (itemframeentity != null) {
i = itemframeentity.func_174866_q();
@@ -157,4 +157,16 @@
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) { protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
p_206840_1_.func_206894_a(field_185512_D, field_176463_b, field_196348_c); p_206840_1_.func_206894_a(field_185512_D, field_176463_b, field_196348_c);
} }
+ +
+ @Override + @Override
+ public boolean getWeakChanges(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos) { + public boolean getWeakChanges(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos) {
+ return true; + return state.func_203425_a(Blocks.field_196762_fd);
+ } + }
+ +
+ @Override + @Override

View file

@ -1,34 +1,6 @@
--- a/net/minecraft/block/CropsBlock.java --- a/net/minecraft/block/CropsBlock.java
+++ b/net/minecraft/block/CropsBlock.java +++ b/net/minecraft/block/CropsBlock.java
@@ -58,12 +58,14 @@ @@ -133,7 +133,7 @@
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_);
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
if (p_225534_2_.func_226659_b_(p_225534_3_, 0) >= 9) {
int i = this.func_185527_x(p_225534_1_);
if (i < this.func_185526_g()) {
float f = func_180672_a(this, p_225534_2_, p_225534_3_);
- if (p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0) {
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
p_225534_2_.func_180501_a(p_225534_3_, this.func_185528_e(i + 1), 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
}
}
}
@@ -92,9 +94,9 @@
for(int j = -1; j <= 1; ++j) {
float f1 = 0.0F;
BlockState blockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
- if (blockstate.func_177230_c() == Blocks.field_150458_ak) {
+ if (blockstate.canSustainPlant(p_180672_1_, blockpos.func_177982_a(i, 0, j), net.minecraft.util.Direction.UP, (net.minecraftforge.common.IPlantable)p_180672_0_)) {
f1 = 1.0F;
- if (blockstate.func_177229_b(FarmlandBlock.field_176531_a) > 0) {
+ if (blockstate.isFertile(p_180672_1_, blockpos.func_177982_a(i, 0, j))) {
f1 = 3.0F;
}
}
@@ -130,7 +132,7 @@
} }
public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) { public void func_196262_a(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity p_196262_4_) {

View file

@ -8,4 +8,4 @@
+public class DeadBushBlock extends BushBlock implements net.minecraftforge.common.IShearable { +public class DeadBushBlock extends BushBlock implements net.minecraftforge.common.IShearable {
protected static final VoxelShape field_196397_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D); protected static final VoxelShape field_196397_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
protected DeadBushBlock(Block.Properties p_i48418_1_) { protected DeadBushBlock(AbstractBlock.Properties p_i48418_1_) {

View file

@ -1,11 +1,11 @@
--- a/net/minecraft/block/DetectorRailBlock.java --- a/net/minecraft/block/DetectorRailBlock.java
+++ b/net/minecraft/block/DetectorRailBlock.java +++ b/net/minecraft/block/DetectorRailBlock.java
@@ -129,6 +129,8 @@ @@ -129,6 +129,8 @@
}
public int func_180641_l(BlockState p_180641_1_, World p_180641_2_, BlockPos p_180641_3_) { List<AbstractMinecartEntity> list1 = this.func_200878_a(p_180641_2_, p_180641_3_, AbstractMinecartEntity.class, EntityPredicates.field_96566_b);
if (p_180641_1_.func_177229_b(field_176574_M)) {
+ List<AbstractMinecartEntity> carts = this.func_200878_a(p_180641_2_, p_180641_3_, AbstractMinecartEntity.class, null); + List<AbstractMinecartEntity> carts = this.func_200878_a(p_180641_2_, p_180641_3_, AbstractMinecartEntity.class, null);
+ if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel(); + if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel();
List<MinecartCommandBlockEntity> list = this.func_200878_a(p_180641_2_, p_180641_3_, MinecartCommandBlockEntity.class, (Predicate<Entity>)null); if (!list1.isEmpty()) {
if (!list.isEmpty()) { return Container.func_94526_b((IInventory)list1.get(0));
return list.get(0).func_145822_e().func_145760_g(); }

View file

@ -5,7 +5,7 @@
public BlockState func_196258_a(BlockItemUseContext p_196258_1_) { public BlockState func_196258_a(BlockItemUseContext p_196258_1_) {
BlockPos blockpos = p_196258_1_.func_195995_a(); BlockPos blockpos = p_196258_1_.func_195995_a();
- return blockpos.func_177956_o() < 255 && p_196258_1_.func_195991_k().func_180495_p(blockpos.func_177984_a()).func_196953_a(p_196258_1_) ? super.func_196258_a(p_196258_1_) : null; - return blockpos.func_177956_o() < 255 && p_196258_1_.func_195991_k().func_180495_p(blockpos.func_177984_a()).func_196953_a(p_196258_1_) ? super.func_196258_a(p_196258_1_) : null;
+ return blockpos.func_177956_o() < p_196258_1_.func_195991_k().func_201675_m().getHeight() - 1 && p_196258_1_.func_195991_k().func_180495_p(blockpos.func_177984_a()).func_196953_a(p_196258_1_) ? super.func_196258_a(p_196258_1_) : null; + return blockpos.func_177956_o() < 255 /*TODO context.getWorld().getDimension().getHeight() - 1*/ && p_196258_1_.func_195991_k().func_180495_p(blockpos.func_177984_a()).func_196953_a(p_196258_1_) ? super.func_196258_a(p_196258_1_) : null;
} }
public void func_180633_a(World p_180633_1_, BlockPos p_180633_2_, BlockState p_180633_3_, LivingEntity p_180633_4_, ItemStack p_180633_5_) { public void func_180633_a(World p_180633_1_, BlockPos p_180633_2_, BlockState p_180633_3_, LivingEntity p_180633_4_, ItemStack p_180633_5_) {
@ -14,6 +14,6 @@
} else { } else {
BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()); BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
+ if (p_196260_1_.func_177230_c() != this) return super.func_196260_a(p_196260_1_, p_196260_2_, p_196260_3_); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check. + if (p_196260_1_.func_177230_c() != this) return super.func_196260_a(p_196260_1_, p_196260_2_, p_196260_3_); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
return blockstate.func_177230_c() == this && blockstate.func_177229_b(field_176492_b) == DoubleBlockHalf.LOWER; return blockstate.func_203425_a(this) && blockstate.func_177229_b(field_176492_b) == DoubleBlockHalf.LOWER;
} }
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/FallingBlock.java --- a/net/minecraft/block/FallingBlock.java
+++ b/net/minecraft/block/FallingBlock.java +++ b/net/minecraft/block/FallingBlock.java
@@ -29,7 +29,7 @@ @@ -30,7 +30,7 @@
} }
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) { public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
@ -15,6 +15,6 @@
BlockPos blockpos = p_180655_3_.func_177977_b(); BlockPos blockpos = p_180655_3_.func_177977_b();
- if (func_185759_i(p_180655_2_.func_180495_p(blockpos))) { - if (func_185759_i(p_180655_2_.func_180495_p(blockpos))) {
+ if (p_180655_2_.func_175623_d(blockpos) || func_185759_i(p_180655_2_.func_180495_p(blockpos))) { + if (p_180655_2_.func_175623_d(blockpos) || func_185759_i(p_180655_2_.func_180495_p(blockpos))) {
double d0 = (double)p_180655_3_.func_177958_n() + (double)p_180655_4_.nextFloat(); double d0 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
double d1 = (double)p_180655_3_.func_177956_o() - 0.05D; double d1 = (double)p_180655_3_.func_177956_o() - 0.05D;
double d2 = (double)p_180655_3_.func_177952_p() + (double)p_180655_4_.nextFloat(); double d2 = (double)p_180655_3_.func_177952_p() + p_180655_4_.nextDouble();

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/FarmlandBlock.java --- a/net/minecraft/block/FarmlandBlock.java
+++ b/net/minecraft/block/FarmlandBlock.java +++ b/net/minecraft/block/FarmlandBlock.java
@@ -76,7 +76,7 @@ @@ -77,7 +77,7 @@
} }
public void func_180658_a(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) { public void func_180658_a(World p_180658_1_, BlockPos p_180658_2_, Entity p_180658_3_, float p_180658_4_) {
@ -9,7 +9,7 @@
func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_); func_199610_d(p_180658_1_.func_180495_p(p_180658_2_), p_180658_1_, p_180658_2_);
} }
@@ -87,9 +87,9 @@ @@ -88,9 +88,9 @@
p_199610_1_.func_175656_a(p_199610_2_, func_199601_a(p_199610_0_, Blocks.field_150346_d.func_176223_P(), p_199610_1_, p_199610_2_)); p_199610_1_.func_175656_a(p_199610_2_, func_199601_a(p_199610_0_, Blocks.field_150346_d.func_176223_P(), p_199610_1_, p_199610_2_));
} }
@ -22,7 +22,7 @@
} }
private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) { private static boolean func_176530_e(IWorldReader p_176530_0_, BlockPos p_176530_1_) {
@@ -99,7 +99,7 @@ @@ -100,7 +100,7 @@
} }
} }

View file

@ -1,7 +1,7 @@
--- a/net/minecraft/block/FireBlock.java --- a/net/minecraft/block/FireBlock.java
+++ b/net/minecraft/block/FireBlock.java +++ b/net/minecraft/block/FireBlock.java
@@ -64,13 +64,13 @@ @@ -76,13 +76,13 @@
public BlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) { protected BlockState func_196448_a(IBlockReader p_196448_1_, BlockPos p_196448_2_) {
BlockPos blockpos = p_196448_2_.func_177977_b(); BlockPos blockpos = p_196448_2_.func_177977_b();
BlockState blockstate = p_196448_1_.func_180495_p(blockpos); BlockState blockstate = p_196448_1_.func_180495_p(blockpos);
- if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_196448_1_, blockpos, Direction.UP)) { - if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_196448_1_, blockpos, Direction.UP)) {
@ -16,23 +16,16 @@
} }
} }
@@ -91,12 +91,14 @@ @@ -105,7 +105,7 @@
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) {
if (p_225534_2_.func_82736_K().func_223586_b(GameRules.field_223598_a)) {
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 2)) return; // Forge: prevent loading unloaded chunks when spreading fire
if (!p_225534_1_.func_196955_c(p_225534_2_, p_225534_3_)) {
p_225534_2_.func_217377_a(p_225534_3_, false);
} }
Block block = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b()).func_177230_c(); BlockState blockstate = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b());
- boolean flag = p_225534_2_.field_73011_w instanceof EndDimension && block == Blocks.field_150357_h || block == Blocks.field_150424_aL || block == Blocks.field_196814_hQ; - boolean flag = blockstate.func_235714_a_(p_225534_2_.func_230315_m_().func_241515_q_());
+ BlockState other = p_225534_2_.func_180495_p(p_225534_3_.func_177977_b()); + boolean flag = blockstate.isFireSource(p_225534_2_, p_225534_3_, Direction.UP);
+ boolean flag = other.isFireSource(p_225534_2_, p_225534_3_.func_177977_b(), Direction.UP);
int i = p_225534_1_.func_177229_b(field_176543_a); int i = p_225534_1_.func_177229_b(field_176543_a);
if (!flag && p_225534_2_.func_72896_J() && this.func_176537_d(p_225534_2_, p_225534_3_) && p_225534_4_.nextFloat() < 0.2F + (float)i * 0.03F) { if (!flag && p_225534_2_.func_72896_J() && this.func_176537_d(p_225534_2_, p_225534_3_) && p_225534_4_.nextFloat() < 0.2F + (float)i * 0.03F) {
p_225534_2_.func_217377_a(p_225534_3_, false); p_225534_2_.func_217377_a(p_225534_3_, false);
@@ -118,7 +120,7 @@ @@ -126,7 +126,7 @@
return; return;
} }
@ -41,7 +34,7 @@
p_225534_2_.func_217377_a(p_225534_3_, false); p_225534_2_.func_217377_a(p_225534_3_, false);
return; return;
} }
@@ -126,12 +128,12 @@ @@ -134,12 +134,12 @@
boolean flag1 = p_225534_2_.func_180502_D(p_225534_3_); boolean flag1 = p_225534_2_.func_180502_D(p_225534_3_);
int k = flag1 ? -50 : 0; int k = flag1 ? -50 : 0;
@ -60,34 +53,29 @@
BlockPos.Mutable blockpos$mutable = new BlockPos.Mutable(); BlockPos.Mutable blockpos$mutable = new BlockPos.Mutable();
for(int l = -1; l <= 1; ++l) { for(int l = -1; l <= 1; ++l) {
@@ -169,16 +171,18 @@ @@ -177,15 +177,17 @@
return p_176537_1_.func_175727_C(p_176537_2_) || p_176537_1_.func_175727_C(p_176537_2_.func_177976_e()) || p_176537_1_.func_175727_C(p_176537_2_.func_177974_f()) || p_176537_1_.func_175727_C(p_176537_2_.func_177978_c()) || p_176537_1_.func_175727_C(p_176537_2_.func_177968_d()); return p_176537_1_.func_175727_C(p_176537_2_) || p_176537_1_.func_175727_C(p_176537_2_.func_177976_e()) || p_176537_1_.func_175727_C(p_176537_2_.func_177974_f()) || p_176537_1_.func_175727_C(p_176537_2_.func_177978_c()) || p_176537_1_.func_175727_C(p_176537_2_.func_177968_d());
} }
- private int func_220274_q(BlockState p_220274_1_) {
+ @Deprecated //Forge: Use IForgeBlockState.getFlammability, Public for default implementation only. + @Deprecated //Forge: Use IForgeBlockState.getFlammability, Public for default implementation only.
+ public int func_220274_q(BlockState p_220274_1_) { public int func_220274_q(BlockState p_220274_1_) {
return p_220274_1_.func_196959_b(BlockStateProperties.field_208198_y) && p_220274_1_.func_177229_b(BlockStateProperties.field_208198_y) ? 0 : this.field_149848_b.getInt(p_220274_1_.func_177230_c()); return p_220274_1_.func_235901_b_(BlockStateProperties.field_208198_y) && p_220274_1_.func_177229_b(BlockStateProperties.field_208198_y) ? 0 : this.field_149848_b.getInt(p_220274_1_.func_177230_c());
} }
- private int func_220275_r(BlockState p_220275_1_) {
+ @Deprecated //Forge: Use IForgeBlockState.getFireSpreadSpeed + @Deprecated //Forge: Use IForgeBlockState.getFireSpreadSpeed
+ public int func_220275_r(BlockState p_220275_1_) { public int func_220275_r(BlockState p_220275_1_) {
return p_220275_1_.func_196959_b(BlockStateProperties.field_208198_y) && p_220275_1_.func_177229_b(BlockStateProperties.field_208198_y) ? 0 : this.field_149849_a.getInt(p_220275_1_.func_177230_c()); return p_220275_1_.func_235901_b_(BlockStateProperties.field_208198_y) && p_220275_1_.func_177229_b(BlockStateProperties.field_208198_y) ? 0 : this.field_149849_a.getInt(p_220275_1_.func_177230_c());
} }
- private void func_176536_a(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_) { - private void func_176536_a(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_) {
- int i = this.func_220274_q(p_176536_1_.func_180495_p(p_176536_2_));
+ private void tryCatchFire(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_, Direction face) { + private void tryCatchFire(World p_176536_1_, BlockPos p_176536_2_, int p_176536_3_, Random p_176536_4_, int p_176536_5_, Direction face) {
+ int i = p_176536_1_.func_180495_p(p_176536_2_).getFlammability(p_176536_1_, p_176536_2_, face); int i = this.func_220274_q(p_176536_1_.func_180495_p(p_176536_2_));
if (p_176536_4_.nextInt(p_176536_3_) < i) { if (p_176536_4_.nextInt(p_176536_3_) < i) {
BlockState blockstate = p_176536_1_.func_180495_p(p_176536_2_); BlockState blockstate = p_176536_1_.func_180495_p(p_176536_2_);
if (p_176536_4_.nextInt(p_176536_5_ + 10) < 5 && !p_176536_1_.func_175727_C(p_176536_2_)) { @@ -197,10 +199,7 @@
@@ -188,18 +192,14 @@
p_176536_1_.func_217377_a(p_176536_2_, false);
} }
- Block block = blockstate.func_177230_c(); Block block = blockstate.func_177230_c();
- if (block instanceof TNTBlock) { - if (block instanceof TNTBlock) {
- TNTBlock tntblock = (TNTBlock)block; - TNTBlock tntblock = (TNTBlock)block;
- TNTBlock.func_196534_a(p_176536_1_, p_176536_2_); - TNTBlock.func_196534_a(p_176536_1_, p_176536_2_);
@ -96,6 +84,7 @@
} }
} }
@@ -212,7 +211,7 @@
private boolean func_196447_a(IBlockReader p_196447_1_, BlockPos p_196447_2_) { private boolean func_196447_a(IBlockReader p_196447_1_, BlockPos p_196447_2_) {
for(Direction direction : Direction.values()) { for(Direction direction : Direction.values()) {
@ -104,7 +93,7 @@
return true; return true;
} }
} }
@@ -215,13 +215,14 @@ @@ -228,13 +227,14 @@
for(Direction direction : Direction.values()) { for(Direction direction : Direction.values()) {
BlockState blockstate = p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(direction)); BlockState blockstate = p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(direction));
@ -117,60 +106,13 @@
} }
+ @Deprecated //Forge: Use canCatchFire with more context + @Deprecated //Forge: Use canCatchFire with more context
public boolean func_196446_i(BlockState p_196446_1_) { protected boolean func_196446_i(BlockState p_196446_1_) {
return this.func_220275_r(p_196446_1_) > 0; return this.func_220275_r(p_196446_1_) > 0;
} }
@@ -246,8 +247,8 @@ @@ -253,10 +253,23 @@
BlockPos blockpos = p_180655_3_.func_177977_b();
BlockState blockstate = p_180655_2_.func_180495_p(blockpos);
- if (!this.func_196446_i(blockstate) && !blockstate.func_224755_d(p_180655_2_, blockpos, Direction.UP)) {
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177976_e()))) {
+ if (!this.canCatchFire(p_180655_2_, blockpos, Direction.UP) && !Block.func_220056_d(blockstate, p_180655_2_, blockpos, Direction.UP)) {
+ if (this.canCatchFire(p_180655_2_, blockpos.func_177976_e(), Direction.EAST)) {
for(int j = 0; j < 2; ++j) {
double d3 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble() * (double)0.1F;
double d8 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
@@ -256,7 +257,7 @@
}
} }
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177974_f()))) { private void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_) {
+ if (this.canCatchFire(p_180655_2_, p_180655_3_.func_177974_f(), Direction.WEST)) {
for(int k = 0; k < 2; ++k) {
double d4 = (double)(p_180655_3_.func_177958_n() + 1) - p_180655_4_.nextDouble() * (double)0.1F;
double d9 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
@@ -265,7 +266,7 @@
}
}
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177978_c()))) {
+ if (this.canCatchFire(p_180655_2_, p_180655_3_.func_177978_c(), Direction.SOUTH)) {
for(int l = 0; l < 2; ++l) {
double d5 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
double d10 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
@@ -274,7 +275,7 @@
}
}
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177968_d()))) {
+ if (this.canCatchFire(p_180655_2_, p_180655_3_.func_177968_d(), Direction.NORTH)) {
for(int i1 = 0; i1 < 2; ++i1) {
double d6 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
double d11 = (double)p_180655_3_.func_177956_o() + p_180655_4_.nextDouble();
@@ -283,7 +284,7 @@
}
}
- if (this.func_196446_i(p_180655_2_.func_180495_p(p_180655_3_.func_177984_a()))) {
+ if (this.canCatchFire(p_180655_2_, p_180655_3_.func_177984_a(), Direction.DOWN)) {
for(int j1 = 0; j1 < 2; ++j1) {
double d7 = (double)p_180655_3_.func_177958_n() + p_180655_4_.nextDouble();
double d12 = (double)(p_180655_3_.func_177956_o() + 1) - p_180655_4_.nextDouble() * (double)0.1F;
@@ -307,10 +308,23 @@
}
public void func_180686_a(Block p_180686_1_, int p_180686_2_, int p_180686_3_) {
+ if (p_180686_1_ == Blocks.field_150350_a) throw new IllegalArgumentException("Tried to set air on fire... This is bad."); + if (p_180686_1_ == Blocks.field_150350_a) throw new IllegalArgumentException("Tried to set air on fire... This is bad.");
this.field_149849_a.put(p_180686_1_, p_180686_2_); this.field_149849_a.put(p_180686_1_, p_180686_2_);
this.field_149848_b.put(p_180686_1_, p_180686_3_); this.field_149848_b.put(p_180686_1_, p_180686_3_);

View file

@ -1,21 +1,20 @@
--- a/net/minecraft/block/FlowerPotBlock.java --- a/net/minecraft/block/FlowerPotBlock.java
+++ b/net/minecraft/block/FlowerPotBlock.java +++ b/net/minecraft/block/FlowerPotBlock.java
@@ -23,10 +23,37 @@ @@ -24,12 +24,33 @@
protected static final VoxelShape field_196450_a = Block.func_208617_a(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D); protected static final VoxelShape field_196450_a = Block.func_208617_a(5.0D, 0.0D, 5.0D, 11.0D, 6.0D, 11.0D);
private final Block field_196452_c; private final Block field_196452_c;
+ private final Map<net.minecraft.util.ResourceLocation, java.util.function.Supplier<? extends Block>> fullPots;
+ private final java.util.function.Supplier<FlowerPotBlock> emptyPot;
+ private final java.util.function.Supplier<? extends Block> flowerDelegate;
+
+ @Deprecated // Mods should use the constructor below + @Deprecated // Mods should use the constructor below
public FlowerPotBlock(Block p_i48395_1_, Block.Properties p_i48395_2_) { public FlowerPotBlock(Block p_i48395_1_, AbstractBlock.Properties p_i48395_2_) {
- super(p_i48395_2_);
- this.field_196452_c = p_i48395_1_;
- field_196451_b.put(p_i48395_1_, this);
+ this(Blocks.field_150457_bL == null ? null : () -> (FlowerPotBlock) Blocks.field_150457_bL.delegate.get(), () -> p_i48395_1_.delegate.get(), p_i48395_2_); + this(Blocks.field_150457_bL == null ? null : () -> (FlowerPotBlock) Blocks.field_150457_bL.delegate.get(), () -> p_i48395_1_.delegate.get(), p_i48395_2_);
+ if (Blocks.field_150457_bL != null) { + if (Blocks.field_150457_bL != null) {
+ ((FlowerPotBlock)Blocks.field_150457_bL).addPlant(p_i48395_1_.getRegistryName(), () -> this); + ((FlowerPotBlock)Blocks.field_150457_bL).addPlant(p_i48395_1_.getRegistryName(), () -> this);
+ } + }
+ } }
+ -
+ /** + /**
+ * For mod use, eliminates the need to extend this class, and prevents modded + * For mod use, eliminates the need to extend this class, and prevents modded
+ * flower pots from altering vanilla behavior. + * flower pots from altering vanilla behavior.
@ -24,10 +23,8 @@
+ * @param p_i48395_1_ The flower block. + * @param p_i48395_1_ The flower block.
+ * @param properties + * @param properties
+ */ + */
+ public FlowerPotBlock(@javax.annotation.Nullable java.util.function.Supplier<FlowerPotBlock> emptyPot, java.util.function.Supplier<? extends Block> p_i48395_1_, Block.Properties p_i48395_2_) { + public FlowerPotBlock(@javax.annotation.Nullable java.util.function.Supplier<FlowerPotBlock> emptyPot, java.util.function.Supplier<? extends Block> p_i48395_1_, AbstractBlock.Properties p_i48395_2_) {
super(p_i48395_2_); + super(p_i48395_2_);
- this.field_196452_c = p_i48395_1_;
- field_196451_b.put(p_i48395_1_, this);
+ this.field_196452_c = null; // Unused, redirected by coremod + this.field_196452_c = null; // Unused, redirected by coremod
+ this.flowerDelegate = p_i48395_1_; + this.flowerDelegate = p_i48395_1_;
+ if (emptyPot == null) { + if (emptyPot == null) {
@ -37,10 +34,11 @@
+ this.fullPots = java.util.Collections.emptyMap(); + this.fullPots = java.util.Collections.emptyMap();
+ this.emptyPot = emptyPot; + this.emptyPot = emptyPot;
+ } + }
} + }
public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) { public VoxelShape func_220053_a(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) {
@@ -40,7 +67,7 @@ return field_196450_a;
}
@@ -41,7 +62,7 @@
public ActionResultType func_225533_a_(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) { public ActionResultType func_225533_a_(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) {
ItemStack itemstack = p_225533_4_.func_184586_b(p_225533_5_); ItemStack itemstack = p_225533_4_.func_184586_b(p_225533_5_);
Item item = itemstack.func_77973_b(); Item item = itemstack.func_77973_b();
@ -49,7 +47,7 @@
boolean flag = block == Blocks.field_150350_a; boolean flag = block == Blocks.field_150350_a;
boolean flag1 = this.field_196452_c == Blocks.field_150350_a; boolean flag1 = this.field_196452_c == Blocks.field_150350_a;
if (flag != flag1) { if (flag != flag1) {
@@ -58,7 +85,7 @@ @@ -59,7 +80,7 @@
p_225533_4_.func_71019_a(itemstack1, false); p_225533_4_.func_71019_a(itemstack1, false);
} }
@ -57,14 +55,24 @@
+ p_225533_2_.func_180501_a(p_225533_3_, getEmptyPot().func_176223_P(), 3); + p_225533_2_.func_180501_a(p_225533_3_, getEmptyPot().func_176223_P(), 3);
} }
return ActionResultType.SUCCESS; return ActionResultType.func_233537_a_(p_225533_2_.field_72995_K);
@@ -76,6 +103,17 @@ @@ -77,10 +98,28 @@
} }
public Block func_220276_d() { public Block func_220276_d() {
- return this.field_196452_c; - return this.field_196452_c;
+ return flowerDelegate.get(); + return flowerDelegate.get();
} }
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
return false;
}
+
+ //Forge Start
+ private final Map<net.minecraft.util.ResourceLocation, java.util.function.Supplier<? extends Block>> fullPots;
+ private final java.util.function.Supplier<FlowerPotBlock> emptyPot;
+ private final java.util.function.Supplier<? extends Block> flowerDelegate;
+
+ +
+ public FlowerPotBlock getEmptyPot() { + public FlowerPotBlock getEmptyPot() {
+ return emptyPot == null ? this : emptyPot.get(); + return emptyPot == null ? this : emptyPot.get();
@ -76,4 +84,5 @@
+ } + }
+ fullPots.put(flower, fullPot); + fullPots.put(flower, fullPot);
+ } + }
+ //Forge End
} }

View file

@ -1,19 +1,19 @@
--- a/net/minecraft/block/FlowingFluidBlock.java --- a/net/minecraft/block/FlowingFluidBlock.java
+++ b/net/minecraft/block/FlowingFluidBlock.java +++ b/net/minecraft/block/FlowingFluidBlock.java
@@ -31,9 +31,11 @@ @@ -31,10 +31,11 @@
public class FlowingFluidBlock extends Block implements IBucketPickupHandler { public class FlowingFluidBlock extends Block implements IBucketPickupHandler {
public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag; public static final IntegerProperty field_176367_b = BlockStateProperties.field_208132_ag;
- protected final FlowingFluid field_204517_c; - protected final FlowingFluid field_204517_c;
+ private final FlowingFluid field_204517_c; + private final FlowingFluid field_204517_c;
private final List<IFluidState> field_212565_c; private final List<FluidState> field_212565_c;
public static final VoxelShape field_235510_c_ = Block.func_208617_a(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
+ // Forge: Use the constructor that takes a supplier + @Deprecated // Forge: Use the constructor that takes a supplier
+ @Deprecated protected FlowingFluidBlock(FlowingFluid p_i49014_1_, AbstractBlock.Properties p_i49014_2_) {
protected FlowingFluidBlock(FlowingFluid p_i49014_1_, Block.Properties p_i49014_2_) {
super(p_i49014_2_); super(p_i49014_2_);
this.field_204517_c = p_i49014_1_; this.field_204517_c = p_i49014_1_;
@@ -46,8 +48,21 @@ @@ -47,8 +48,21 @@
this.field_212565_c.add(p_i49014_1_.func_207207_a(8, true)); this.field_212565_c.add(p_i49014_1_.func_207207_a(8, true));
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0))); this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176367_b, Integer.valueOf(0)));
@ -24,7 +24,7 @@
+ /** + /**
+ * @param supplier A fluid supplier such as {@link net.minecraftforge.fml.RegistryObject<Fluid>} + * @param supplier A fluid supplier such as {@link net.minecraftforge.fml.RegistryObject<Fluid>}
+ */ + */
+ public FlowingFluidBlock(java.util.function.Supplier<? extends FlowingFluid> supplier, Block.Properties p_i48368_1_) { + public FlowingFluidBlock(java.util.function.Supplier<? extends FlowingFluid> supplier, AbstractBlock.Properties p_i48368_1_) {
+ super(p_i48368_1_); + super(p_i48368_1_);
+ this.field_204517_c = null; + this.field_204517_c = null;
+ this.field_212565_c = Lists.newArrayList(); + this.field_212565_c = Lists.newArrayList();
@ -32,34 +32,18 @@
+ this.supplier = supplier; + this.supplier = supplier;
+ } + }
+ +
public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) { public VoxelShape func_220071_b(BlockState p_220071_1_, IBlockReader p_220071_2_, BlockPos p_220071_3_, ISelectionContext p_220071_4_) {
p_225542_2_.func_204610_c(p_225542_3_).func_206891_b(p_225542_2_, p_225542_3_, p_225542_4_); return p_220071_4_.func_216378_a(field_235510_c_, p_220071_3_, true) && p_220071_1_.func_177229_b(field_176367_b) == 0 && p_220071_4_.func_230426_a_(p_220071_2_.func_204610_c(p_220071_3_.func_177984_a()), this.field_204517_c) ? field_235510_c_ : VoxelShapes.func_197880_a();
} }
@@ -62,6 +77,7 @@ @@ -71,6 +85,7 @@
public IFluidState func_204507_t(BlockState p_204507_1_) { public FluidState func_204507_t(BlockState p_204507_1_) {
int i = p_204507_1_.func_177229_b(field_176367_b); int i = p_204507_1_.func_177229_b(field_176367_b);
+ if (!fluidStateCacheInitialized) initFluidStateCache(); + if (!fluidStateCacheInitialized) initFluidStateCache();
return this.field_212565_c.get(Math.min(i, 8)); return this.field_212565_c.get(Math.min(i, 8));
} }
@@ -122,13 +138,13 @@ @@ -166,4 +181,23 @@
if (flag) {
IFluidState ifluidstate = p_204515_1_.func_204610_c(p_204515_2_);
if (ifluidstate.func_206889_d()) {
- p_204515_1_.func_175656_a(p_204515_2_, Blocks.field_150343_Z.func_176223_P());
+ p_204515_1_.func_175656_a(p_204515_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_204515_1_, p_204515_2_, p_204515_2_, Blocks.field_150343_Z.func_176223_P()));
this.func_180688_d(p_204515_1_, p_204515_2_);
return false;
}
if (ifluidstate.func_215679_a(p_204515_1_, p_204515_2_) >= 0.44444445F) {
- p_204515_1_.func_175656_a(p_204515_2_, Blocks.field_150347_e.func_176223_P());
+ p_204515_1_.func_175656_a(p_204515_2_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_204515_1_, p_204515_2_, p_204515_2_, Blocks.field_150347_e.func_176223_P()));
this.func_180688_d(p_204515_1_, p_204515_2_);
return false;
}
@@ -161,4 +177,23 @@
} }
} }

View file

@ -1,16 +0,0 @@
--- a/net/minecraft/block/JigsawBlock.java
+++ b/net/minecraft/block/JigsawBlock.java
@@ -30,6 +30,13 @@
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
}
+ // FORGE: Fix jigsaw blocks not mirroring properly
+ @Override
+ @Deprecated
+ public BlockState func_185471_a(BlockState state, net.minecraft.util.Mirror mirrorIn) {
+ return state.func_206870_a(field_176387_N, mirrorIn.func_185803_b(state.func_177229_b(field_176387_N)));
+ }
+
public BlockState func_196258_a(BlockItemUseContext p_196258_1_) {
return this.func_176223_P().func_206870_a(field_176387_N, p_196258_1_.func_196000_l());
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/LeavesBlock.java --- a/net/minecraft/block/LeavesBlock.java
+++ b/net/minecraft/block/LeavesBlock.java +++ b/net/minecraft/block/LeavesBlock.java
@@ -18,7 +18,7 @@ @@ -19,7 +19,7 @@
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;

View file

@ -1,9 +1,9 @@
--- a/net/minecraft/block/MushroomBlock.java --- a/net/minecraft/block/MushroomBlock.java
+++ b/net/minecraft/block/MushroomBlock.java +++ b/net/minecraft/block/MushroomBlock.java
@@ -64,7 +64,7 @@ @@ -63,7 +63,7 @@
BlockPos blockpos = p_196260_3_.func_177977_b();
BlockState blockstate = p_196260_2_.func_180495_p(blockpos); BlockState blockstate = p_196260_2_.func_180495_p(blockpos);
Block block = blockstate.func_177230_c(); if (!blockstate.func_203425_a(Blocks.field_150391_bh) && !blockstate.func_203425_a(Blocks.field_196661_l)) {
if (block != Blocks.field_150391_bh && block != Blocks.field_196661_l) {
- return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && this.func_200014_a_(blockstate, p_196260_2_, blockpos); - return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && this.func_200014_a_(blockstate, p_196260_2_, blockpos);
+ return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && blockstate.canSustainPlant(p_196260_2_, blockpos, net.minecraft.util.Direction.UP, this); + return p_196260_2_.func_226659_b_(p_196260_3_, 0) < 13 && blockstate.canSustainPlant(p_196260_2_, blockpos, net.minecraft.util.Direction.UP, this);
} else { } else {

View file

@ -1,56 +1,11 @@
--- a/net/minecraft/block/NetherPortalBlock.java --- a/net/minecraft/block/NetherPortalBlock.java
+++ b/net/minecraft/block/NetherPortalBlock.java +++ b/net/minecraft/block/NetherPortalBlock.java
@@ -69,7 +69,7 @@ @@ -70,7 +70,7 @@
public boolean func_176548_d(IWorld p_176548_1_, BlockPos p_176548_2_) { public static boolean func_176548_d(IWorld p_176548_0_, BlockPos p_176548_1_) {
NetherPortalBlock.Size netherportalblock$size = this.func_201816_b(p_176548_1_, p_176548_2_); NetherPortalBlock.Size netherportalblock$size = func_201816_b(p_176548_0_, p_176548_1_);
- if (netherportalblock$size != null) { - if (netherportalblock$size != null) {
+ if (netherportalblock$size != null && !net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_176548_1_, p_176548_2_, netherportalblock$size)) { + if (netherportalblock$size != null && !net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_176548_0_, p_176548_1_, netherportalblock$size)) {
netherportalblock$size.func_150859_c(); netherportalblock$size.func_150859_c();
return true; return true;
} else { } else {
@@ -241,13 +241,13 @@
int i;
for(i = 0; i < 22; ++i) {
BlockPos blockpos = p_180120_1_.func_177967_a(p_180120_2_, i);
- if (!this.func_196900_a(this.field_150867_a.func_180495_p(blockpos)) || this.field_150867_a.func_180495_p(blockpos.func_177977_b()).func_177230_c() != Blocks.field_150343_Z) {
+ if (!this.func_196900_a(this.field_150867_a.func_180495_p(blockpos)) || !this.field_150867_a.func_180495_p(blockpos.func_177977_b()).isPortalFrame(this.field_150867_a, blockpos.func_177977_b())) {
break;
}
}
- Block block = this.field_150867_a.func_180495_p(p_180120_1_.func_177967_a(p_180120_2_, i)).func_177230_c();
- return block == Blocks.field_150343_Z ? i : 0;
+ BlockPos framePos = p_180120_1_.func_177967_a(p_180120_2_, i);
+ return this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos) ? i : 0;
}
public int func_181100_a() {
@@ -274,13 +274,13 @@
}
if (i == 0) {
- block = this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150863_d)).func_177230_c();
- if (block != Blocks.field_150343_Z) {
+ BlockPos framePos = blockpos.func_177972_a(this.field_150863_d);
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
break label56;
}
} else if (i == this.field_150868_h - 1) {
- block = this.field_150867_a.func_180495_p(blockpos.func_177972_a(this.field_150866_c)).func_177230_c();
- if (block != Blocks.field_150343_Z) {
+ BlockPos framePos = blockpos.func_177972_a(this.field_150866_c);
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
break label56;
}
}
@@ -288,7 +288,8 @@
}
for(int j = 0; j < this.field_150868_h; ++j) {
- if (this.field_150867_a.func_180495_p(this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g)).func_177230_c() != Blocks.field_150343_Z) {
+ BlockPos framePos = this.field_150861_f.func_177967_a(this.field_150866_c, j).func_177981_b(this.field_150862_g);
+ if (!this.field_150867_a.func_180495_p(framePos).isPortalFrame(this.field_150867_a, framePos)) {
this.field_150862_g = 0;
break;
}

View file

@ -1,14 +1,14 @@
--- a/net/minecraft/block/NetherWartBlock.java --- a/net/minecraft/block/NetherWartBlock.java
+++ b/net/minecraft/block/NetherWartBlock.java +++ b/net/minecraft/block/NetherWartBlock.java
@@ -31,9 +31,10 @@ @@ -35,9 +35,10 @@
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) { public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
int i = p_225534_1_.func_177229_b(field_176486_a); int i = p_225542_1_.func_177229_b(field_176486_a);
- if (i < 3 && p_225534_4_.nextInt(10) == 0) { - if (i < 3 && p_225542_4_.nextInt(10) == 0) {
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt(10) == 0)) { + if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_.nextInt(10) == 0)) {
p_225534_1_ = p_225534_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1)); p_225542_1_ = p_225542_1_.func_206870_a(field_176486_a, Integer.valueOf(i + 1));
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_, 2); p_225542_2_.func_180501_a(p_225542_3_, p_225542_1_, 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225542_2_, p_225542_3_, p_225542_1_);
} }
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_); }

View file

@ -9,18 +9,7 @@
p_196482_1_.func_175641_c(p_196482_2_, this, 0, 0); p_196482_1_.func_175641_c(p_196482_2_, this, 0, 0);
} }
@@ -60,7 +60,9 @@ @@ -76,6 +76,9 @@
if (p_225533_2_.field_72995_K) {
return ActionResultType.SUCCESS;
} else {
- p_225533_1_ = p_225533_1_.func_177231_a(field_196485_c);
+ int _new = net.minecraftforge.common.ForgeHooks.onNoteChange(p_225533_2_, p_225533_3_, p_225533_1_, p_225533_1_.func_177229_b(field_196485_c), p_225533_1_.func_177231_a(field_196485_c).func_177229_b(field_196485_c));
+ if (_new == -1) return ActionResultType.FAIL;
+ p_225533_1_ = (BlockState)p_225533_1_.func_206870_a(field_196485_c, _new);
p_225533_2_.func_180501_a(p_225533_3_, p_225533_1_, 3);
this.func_196482_a(p_225533_2_, p_225533_3_);
p_225533_4_.func_195066_a(Stats.field_188087_U);
@@ -76,6 +78,9 @@
} }
public boolean func_189539_a(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) { public boolean func_189539_a(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/OreBlock.java --- a/net/minecraft/block/OreBlock.java
+++ b/net/minecraft/block/OreBlock.java +++ b/net/minecraft/block/OreBlock.java
@@ -29,12 +29,10 @@ @@ -31,12 +31,10 @@
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) { public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_); super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/PistonBlock.java --- a/net/minecraft/block/PistonBlock.java
+++ b/net/minecraft/block/PistonBlock.java +++ b/net/minecraft/block/PistonBlock.java
@@ -166,6 +166,7 @@ @@ -158,6 +158,7 @@
} }
if (p_189539_4_ == 0) { if (p_189539_4_ == 0) {
@ -8,7 +8,7 @@
if (!this.func_176319_a(p_189539_2_, p_189539_3_, direction, true)) { if (!this.func_176319_a(p_189539_2_, p_189539_3_, direction, true)) {
return false; return false;
} }
@@ -173,6 +174,7 @@ @@ -165,6 +166,7 @@
p_189539_2_.func_180501_a(p_189539_3_, p_189539_1_.func_206870_a(field_176320_b, Boolean.valueOf(true)), 67); p_189539_2_.func_180501_a(p_189539_3_, p_189539_1_.func_206870_a(field_176320_b, Boolean.valueOf(true)), 67);
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187715_dR, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.25F + 0.6F); p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187715_dR, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.25F + 0.6F);
} else if (p_189539_4_ == 1 || p_189539_4_ == 2) { } else if (p_189539_4_ == 1 || p_189539_4_ == 2) {
@ -16,16 +16,7 @@
TileEntity tileentity1 = p_189539_2_.func_175625_s(p_189539_3_.func_177972_a(direction)); TileEntity tileentity1 = p_189539_2_.func_175625_s(p_189539_3_.func_177972_a(direction));
if (tileentity1 instanceof PistonTileEntity) { if (tileentity1 instanceof PistonTileEntity) {
((PistonTileEntity)tileentity1).func_145866_f(); ((PistonTileEntity)tileentity1).func_145866_f();
@@ -197,7 +199,7 @@ @@ -204,6 +206,7 @@
}
if (!flag1) {
- if (p_189539_4_ != 1 || blockstate.func_196958_f() || !func_185646_a(blockstate, p_189539_2_, blockpos, direction.func_176734_d(), false, direction) || blockstate.func_185905_o() != PushReaction.NORMAL && block != Blocks.field_150331_J && block != Blocks.field_150320_F) {
+ if (p_189539_4_ != 1 || blockstate.isAir(p_189539_2_, blockpos) || !func_185646_a(blockstate, p_189539_2_, blockpos, direction.func_176734_d(), false, direction) || blockstate.func_185905_o() != PushReaction.NORMAL && block != Blocks.field_150331_J && block != Blocks.field_150320_F) {
p_189539_2_.func_217377_a(p_189539_3_.func_177972_a(direction), false);
} else {
this.func_176319_a(p_189539_2_, p_189539_3_, direction, false);
@@ -210,6 +212,7 @@
p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187712_dQ, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.15F + 0.6F); p_189539_2_.func_184133_a((PlayerEntity)null, p_189539_3_, SoundEvents.field_187712_dQ, SoundCategory.BLOCKS, 0.5F, p_189539_2_.field_73012_v.nextFloat() * 0.15F + 0.6F);
} }
@ -33,25 +24,7 @@
return true; return true;
} }
@@ -238,7 +241,7 @@ @@ -335,6 +338,10 @@
return false;
}
- return !block.func_149716_u();
+ return !p_185646_0_.hasTileEntity();
} else {
return false;
}
@@ -276,7 +279,7 @@
for(int j = list2.size() - 1; j >= 0; --j) {
BlockPos blockpos2 = list2.get(j);
BlockState blockstate1 = p_176319_1_.func_180495_p(blockpos2);
- TileEntity tileentity = blockstate1.func_177230_c().func_149716_u() ? p_176319_1_.func_175625_s(blockpos2) : null;
+ TileEntity tileentity = blockstate1.hasTileEntity() ? p_176319_1_.func_175625_s(blockpos2) : null;
func_220059_a(blockstate1, p_176319_1_, blockpos2, tileentity);
p_176319_1_.func_180501_a(blockpos2, Blocks.field_150350_a.func_176223_P(), 18);
--k;
@@ -340,6 +343,10 @@
return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N))); return p_185499_1_.func_206870_a(field_176387_N, p_185499_2_.func_185831_a(p_185499_1_.func_177229_b(field_176387_N)));
} }

View file

@ -6,12 +6,12 @@
public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u; public static final BooleanProperty field_176569_M = BlockStateProperties.field_208194_u;
+ private final boolean isActivator; // TRUE for an Activator Rail, FALSE for Powered Rail + private final boolean isActivator; // TRUE for an Activator Rail, FALSE for Powered Rail
protected PoweredRailBlock(Block.Properties p_i48349_1_) { protected PoweredRailBlock(AbstractBlock.Properties p_i48349_1_) {
- super(true, p_i48349_1_); - super(true, p_i48349_1_);
+ this(p_i48349_1_, false); + this(p_i48349_1_, false);
+ } + }
+ +
+ protected PoweredRailBlock(Block.Properties builder, boolean isPoweredRail) { + protected PoweredRailBlock(AbstractBlock.Properties builder, boolean isPoweredRail) {
+ super(true, builder); + super(true, builder);
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176568_b, RailShape.NORTH_SOUTH).func_206870_a(field_176569_M, Boolean.valueOf(false))); this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176568_b, RailShape.NORTH_SOUTH).func_206870_a(field_176569_M, Boolean.valueOf(false)));
+ this.isActivator = !isPoweredRail; + this.isActivator = !isPoweredRail;
@ -22,7 +22,7 @@
protected boolean func_208071_a(World p_208071_1_, BlockPos p_208071_2_, boolean p_208071_3_, int p_208071_4_, RailShape p_208071_5_) { protected boolean func_208071_a(World p_208071_1_, BlockPos p_208071_2_, boolean p_208071_3_, int p_208071_4_, RailShape p_208071_5_) {
BlockState blockstate = p_208071_1_.func_180495_p(p_208071_2_); BlockState blockstate = p_208071_1_.func_180495_p(p_208071_2_);
- if (blockstate.func_177230_c() != this) { - if (!blockstate.func_203425_a(this)) {
+ if (!(blockstate.func_177230_c() instanceof PoweredRailBlock)) { + if (!(blockstate.func_177230_c() instanceof PoweredRailBlock)) {
return false; return false;
} else { } else {
@ -31,7 +31,7 @@
if (p_208071_5_ != RailShape.EAST_WEST || railshape != RailShape.NORTH_SOUTH && railshape != RailShape.ASCENDING_NORTH && railshape != RailShape.ASCENDING_SOUTH) { if (p_208071_5_ != RailShape.EAST_WEST || railshape != RailShape.NORTH_SOUTH && railshape != RailShape.ASCENDING_NORTH && railshape != RailShape.ASCENDING_SOUTH) {
if (p_208071_5_ != RailShape.NORTH_SOUTH || railshape != RailShape.EAST_WEST && railshape != RailShape.ASCENDING_EAST && railshape != RailShape.ASCENDING_WEST) { if (p_208071_5_ != RailShape.NORTH_SOUTH || railshape != RailShape.EAST_WEST && railshape != RailShape.ASCENDING_EAST && railshape != RailShape.ASCENDING_WEST) {
- if (blockstate.func_177229_b(field_176569_M)) { - if (blockstate.func_177229_b(field_176569_M)) {
+ if (isActivator == ((PoweredRailBlock)blockstate.func_177230_c()).isActivator) { + if (isActivator == (((PoweredRailBlock) blockstate.func_177230_c()).isActivator)) {
return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1); return p_208071_1_.func_175640_z(p_208071_2_) ? true : this.func_176566_a(p_208071_1_, p_208071_2_, blockstate, p_208071_3_, p_208071_4_ + 1);
} else { } else {
return false; return false;

View file

@ -4,12 +4,12 @@
if (p_220069_1_.func_196955_c(p_220069_2_, p_220069_3_)) { if (p_220069_1_.func_196955_c(p_220069_2_, p_220069_3_)) {
this.func_176398_g(p_220069_2_, p_220069_3_, p_220069_1_); this.func_176398_g(p_220069_2_, p_220069_3_, p_220069_1_);
} else { } else {
- TileEntity tileentity = this.func_149716_u() ? p_220069_2_.func_175625_s(p_220069_3_) : null; - TileEntity tileentity = this.func_235695_q_() ? p_220069_2_.func_175625_s(p_220069_3_) : null;
+ TileEntity tileentity = p_220069_1_.hasTileEntity() ? p_220069_2_.func_175625_s(p_220069_3_) : null; + TileEntity tileentity = p_220069_1_.hasTileEntity() ? p_220069_2_.func_175625_s(p_220069_3_) : null;
func_220059_a(p_220069_1_, p_220069_2_, p_220069_3_, tileentity); func_220059_a(p_220069_1_, p_220069_2_, p_220069_3_, tileentity);
p_220069_2_.func_217377_a(p_220069_3_, false); p_220069_2_.func_217377_a(p_220069_3_, false);
@@ -164,6 +164,8 @@ @@ -163,6 +163,8 @@
protected void func_176400_h(World p_176400_1_, BlockPos p_176400_2_, BlockState p_176400_3_) { protected void func_176400_h(World p_176400_1_, BlockPos p_176400_2_, BlockState p_176400_3_) {
Direction direction = p_176400_3_.func_177229_b(field_185512_D); Direction direction = p_176400_3_.func_177229_b(field_185512_D);
BlockPos blockpos = p_176400_2_.func_177972_a(direction.func_176734_d()); BlockPos blockpos = p_176400_2_.func_177972_a(direction.func_176734_d());
@ -18,11 +18,3 @@
p_176400_1_.func_190524_a(blockpos, this, p_176400_2_); p_176400_1_.func_190524_a(blockpos, this, p_176400_2_);
p_176400_1_.func_175695_a(blockpos, this, direction); p_176400_1_.func_175695_a(blockpos, this, direction);
} }
@@ -171,7 +173,6 @@
protected boolean func_185545_A(BlockState p_185545_1_) {
return p_185545_1_.func_185897_m();
}
-
protected int func_176408_a(IBlockReader p_176408_1_, BlockPos p_176408_2_, BlockState p_176408_3_) {
return 15;
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/RedstoneOreBlock.java --- a/net/minecraft/block/RedstoneOreBlock.java
+++ b/net/minecraft/block/RedstoneOreBlock.java +++ b/net/minecraft/block/RedstoneOreBlock.java
@@ -68,11 +68,11 @@ @@ -71,11 +71,11 @@
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) { public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_); super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);

View file

@ -1,56 +1,38 @@
--- a/net/minecraft/block/RedstoneWireBlock.java --- a/net/minecraft/block/RedstoneWireBlock.java
+++ b/net/minecraft/block/RedstoneWireBlock.java +++ b/net/minecraft/block/RedstoneWireBlock.java
@@ -123,7 +123,7 @@ @@ -184,7 +184,7 @@
BlockState blockstate1 = p_208074_1_.func_180495_p(blockpos1); BlockState blockstate = p_235545_1_.func_180495_p(blockpos);
if (!blockstate1.func_215686_e(p_208074_1_, blockpos1)) { if (p_235545_4_) {
boolean flag = blockstate.func_224755_d(p_208074_1_, blockpos, Direction.UP) || blockstate.func_177230_c() == Blocks.field_150438_bZ; boolean flag = this.func_235552_b_(p_235545_1_, blockpos, blockstate);
- if (flag && func_176346_d(p_208074_1_.func_180495_p(blockpos.func_177984_a()))) { - if (flag && func_176346_d(p_235545_1_.func_180495_p(blockpos.func_177984_a()))) {
+ if (flag && canConnectTo(p_208074_1_.func_180495_p(blockpos.func_177984_a()), p_208074_1_, blockpos.func_177984_a(), null)) { + if (flag && canConnectTo(p_235545_1_.func_180495_p(blockpos.func_177984_a()), p_235545_1_, blockpos.func_177984_a(), null) ) {
if (blockstate.func_224756_o(p_208074_1_, blockpos)) { if (blockstate.func_224755_d(p_235545_1_, blockpos, p_235545_3_.func_176734_d())) {
return RedstoneSide.UP; return RedstoneSide.UP;
} }
@@ -132,7 +132,7 @@ @@ -193,7 +193,7 @@
} }
} }
- return !func_176343_a(blockstate, p_208074_3_) && (blockstate.func_215686_e(p_208074_1_, blockpos) || !func_176346_d(p_208074_1_.func_180495_p(blockpos.func_177977_b()))) ? RedstoneSide.NONE : RedstoneSide.SIDE; - return !func_176343_a(blockstate, p_235545_3_) && (blockstate.func_215686_e(p_235545_1_, blockpos) || !func_176346_d(p_235545_1_.func_180495_p(blockpos.func_177977_b()))) ? RedstoneSide.NONE : RedstoneSide.SIDE;
+ return !canConnectTo(blockstate, p_208074_1_, blockpos, p_208074_3_) && (blockstate.func_215686_e(p_208074_1_, blockpos) || !canConnectTo(p_208074_1_.func_180495_p(blockpos.func_177977_b()), p_208074_1_, blockpos.func_177977_b(), null)) ? RedstoneSide.NONE : RedstoneSide.SIDE; + return !canConnectTo(blockstate, p_235545_1_, blockpos, p_235545_3_) && (blockstate.func_215686_e(p_235545_1_, blockpos) || !canConnectTo(p_235545_1_.func_180495_p(blockpos.func_177977_b()), p_235545_1_, blockpos.func_177977_b(), null)) ? RedstoneSide.NONE : RedstoneSide.SIDE;
} }
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) { public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
@@ -315,26 +315,18 @@ @@ -335,11 +335,7 @@
boolean flag = blockstate.func_215686_e(p_176339_1_, blockpos);
BlockPos blockpos1 = p_176339_2_.func_177984_a();
boolean flag1 = p_176339_1_.func_180495_p(blockpos1).func_215686_e(p_176339_1_, blockpos1);
- if (!flag1 && flag && func_176340_e(p_176339_1_, blockpos.func_177984_a())) {
+ if (!flag1 && flag && canConnectTo(p_176339_1_.func_180495_p(blockpos.func_177984_a()), p_176339_1_, blockpos.func_177984_a(), null)) {
return true;
- } else if (func_176343_a(blockstate, p_176339_3_)) {
+ } else if (canConnectTo(blockstate, p_176339_1_, blockpos, p_176339_3_)) {
return true;
} else if (blockstate.func_177230_c() == Blocks.field_196633_cV && blockstate.func_177229_b(RedstoneDiodeBlock.field_196348_c) && blockstate.func_177229_b(RedstoneDiodeBlock.field_185512_D) == p_176339_3_) {
return true;
} else {
- return !flag && func_176340_e(p_176339_1_, blockpos.func_177977_b());
+ return !flag && canConnectTo(p_176339_1_.func_180495_p(blockpos.func_177977_b()), p_176339_1_, blockpos.func_177977_b(), null);
} }
} }
- protected static boolean func_176340_e(IBlockReader p_176340_0_, BlockPos p_176340_1_) {
- return func_176346_d(p_176340_0_.func_180495_p(p_176340_1_));
- }
-
- protected static boolean func_176346_d(BlockState p_176346_0_) { - protected static boolean func_176346_d(BlockState p_176346_0_) {
- return func_176343_a(p_176346_0_, (Direction)null); - return func_176343_a(p_176346_0_, (Direction)null);
- } - }
- -
- protected static boolean func_176343_a(BlockState p_176343_0_, @Nullable Direction p_176343_1_) { - protected static boolean func_176343_a(BlockState p_176343_0_, @Nullable Direction p_176343_1_) {
+ protected static boolean canConnectTo(BlockState p_176343_0_, IBlockReader world, BlockPos pos, @Nullable Direction p_176343_1_) { + protected static boolean canConnectTo(BlockState p_176343_0_, IBlockReader world, BlockPos pos, @Nullable Direction p_176343_1_) {
Block block = p_176343_0_.func_177230_c(); if (p_176343_0_.func_203425_a(Blocks.field_150488_af)) {
if (block == Blocks.field_150488_af) {
return true; return true;
@@ -344,7 +336,7 @@ } else if (p_176343_0_.func_203425_a(Blocks.field_196633_cV)) {
} else if (Blocks.field_190976_dk == p_176343_0_.func_177230_c()) { @@ -348,7 +344,7 @@
} else if (p_176343_0_.func_203425_a(Blocks.field_190976_dk)) {
return p_176343_1_ == p_176343_0_.func_177229_b(ObserverBlock.field_176387_N); return p_176343_1_ == p_176343_0_.func_177229_b(ObserverBlock.field_176387_N);
} else { } else {
- return p_176343_0_.func_185897_m() && p_176343_1_ != null; - return p_176343_0_.func_185897_m() && p_176343_1_ != null;

View file

@ -2,17 +2,17 @@
+++ b/net/minecraft/block/SaplingBlock.java +++ b/net/minecraft/block/SaplingBlock.java
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) { public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_); if (p_225542_2_.func_201696_r(p_225542_3_.func_177984_a()) >= 9 && p_225542_4_.nextInt(7) == 0) {
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light + if (!p_225542_2_.isAreaLoaded(p_225542_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
if (p_225534_2_.func_201696_r(p_225534_3_.func_177984_a()) >= 9 && p_225534_4_.nextInt(7) == 0) { this.func_226942_a_(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_);
this.func_226942_a_(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_);
}
@@ -39,6 +40,7 @@
if (p_226942_3_.func_177229_b(field_176479_b) == 0) {
p_226942_1_.func_180501_a(p_226942_2_, p_226942_3_.func_177231_a(field_176479_b), 4);
} else {
+ if (!net.minecraftforge.event.ForgeEventFactory.saplingGrowTree(p_226942_1_, p_226942_4_, p_226942_2_)) return;
this.field_196387_c.func_225545_a_(p_226942_1_, p_226942_1_.func_72863_F().func_201711_g(), p_226942_2_, p_226942_3_, p_226942_4_);
} }
@@ -39,6 +40,7 @@
p_226942_1_.func_180501_a(p_226942_2_, p_226942_3_.func_235896_a_(field_176479_b), 4);
} else {
this.field_196387_c.func_230339_a_(p_226942_1_, p_226942_1_.func_72863_F().func_201711_g(), p_226942_2_, p_226942_3_, p_226942_4_);
+ if (!net.minecraftforge.event.ForgeEventFactory.saplingGrowTree(p_226942_1_, p_226942_4_, p_226942_2_)) return;
}
}

View file

@ -8,4 +8,4 @@
+public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer, net.minecraftforge.common.IShearable { +public class SeaGrassBlock extends BushBlock implements IGrowable, ILiquidContainer, net.minecraftforge.common.IShearable {
protected static final VoxelShape field_207798_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D); protected static final VoxelShape field_207798_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
protected SeaGrassBlock(Block.Properties p_i48780_1_) { protected SeaGrassBlock(AbstractBlock.Properties p_i48780_1_) {

View file

@ -1,10 +1,10 @@
--- a/net/minecraft/block/SpreadableSnowyDirtBlock.java --- a/net/minecraft/block/SpreadableSnowyDirtBlock.java
+++ b/net/minecraft/block/SpreadableSnowyDirtBlock.java +++ b/net/minecraft/block/SpreadableSnowyDirtBlock.java
@@ -31,6 +31,7 @@ @@ -33,6 +33,7 @@
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) { public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
if (!func_220257_b(p_225534_1_, p_225534_2_, p_225534_3_)) { if (!func_220257_b(p_225542_1_, p_225542_2_, p_225542_3_)) {
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading + if (!p_225542_2_.isAreaLoaded(p_225542_3_, 3)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light and spreading
p_225534_2_.func_175656_a(p_225534_3_, Blocks.field_150346_d.func_176223_P()); p_225542_2_.func_175656_a(p_225542_3_, Blocks.field_150346_d.func_176223_P());
} else { } else {
if (p_225534_2_.func_201696_r(p_225534_3_.func_177984_a()) >= 9) { if (p_225542_2_.func_201696_r(p_225542_3_.func_177984_a()) >= 9) {

View file

@ -1,12 +1,11 @@
--- a/net/minecraft/block/StairsBlock.java --- a/net/minecraft/block/StairsBlock.java
+++ b/net/minecraft/block/StairsBlock.java +++ b/net/minecraft/block/StairsBlock.java
@@ -84,13 +84,24 @@ @@ -83,13 +83,23 @@
return voxelshape; return voxelshape;
} }
+ // Forge: Use the other constructor that takes a Supplier + @Deprecated // Forge: Use the other constructor that takes a Supplier
+ @Deprecated protected StairsBlock(BlockState p_i48321_1_, AbstractBlock.Properties p_i48321_2_) {
protected StairsBlock(BlockState p_i48321_1_, Block.Properties p_i48321_2_) {
super(p_i48321_2_); super(p_i48321_2_);
this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176309_a, Direction.NORTH).func_206870_a(field_176308_b, Half.BOTTOM).func_206870_a(field_176310_M, StairsShape.STRAIGHT).func_206870_a(field_204513_t, Boolean.valueOf(false))); this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176309_a, Direction.NORTH).func_206870_a(field_176308_b, Half.BOTTOM).func_206870_a(field_176310_M, StairsShape.STRAIGHT).func_206870_a(field_204513_t, Boolean.valueOf(false)));
this.field_150149_b = p_i48321_1_.func_177230_c(); this.field_150149_b = p_i48321_1_.func_177230_c();
@ -14,7 +13,7 @@
+ this.stateSupplier = () -> p_i48321_1_; + this.stateSupplier = () -> p_i48321_1_;
} }
+ public StairsBlock(java.util.function.Supplier<BlockState> state, Block.Properties properties) { + public StairsBlock(java.util.function.Supplier<BlockState> state, AbstractBlock.Properties properties) {
+ super(properties); + super(properties);
+ this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176309_a, Direction.NORTH).func_206870_a(field_176308_b, Half.BOTTOM).func_206870_a(field_176310_M, StairsShape.STRAIGHT).func_206870_a(field_204513_t, Boolean.valueOf(false))); + this.func_180632_j(this.field_176227_L.func_177621_b().func_206870_a(field_176309_a, Direction.NORTH).func_206870_a(field_176308_b, Half.BOTTOM).func_206870_a(field_176310_M, StairsShape.STRAIGHT).func_206870_a(field_204513_t, Boolean.valueOf(false)));
+ this.field_150149_b = Blocks.field_150350_a; // These are unused, fields are redirected + this.field_150149_b = Blocks.field_150350_a; // These are unused, fields are redirected
@ -25,11 +24,12 @@
public boolean func_220074_n(BlockState p_220074_1_) { public boolean func_220074_n(BlockState p_220074_1_) {
return true; return true;
} }
@@ -262,4 +273,12 @@ @@ -265,4 +275,14 @@
public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) { public boolean func_196266_a(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_) {
return false; return false;
} }
+ +
+ // Forge Start
+ private final java.util.function.Supplier<BlockState> stateSupplier; + private final java.util.function.Supplier<BlockState> stateSupplier;
+ private Block getModelBlock() { + private Block getModelBlock() {
+ return getModelState().func_177230_c(); + return getModelState().func_177230_c();
@ -37,4 +37,5 @@
+ private BlockState getModelState() { + private BlockState getModelState() {
+ return stateSupplier.get(); + return stateSupplier.get();
+ } + }
+ // Forge end
} }

View file

@ -1,36 +1,35 @@
--- a/net/minecraft/block/StemBlock.java --- a/net/minecraft/block/StemBlock.java
+++ b/net/minecraft/block/StemBlock.java +++ b/net/minecraft/block/StemBlock.java
@@ -40,22 +40,24 @@ @@ -37,22 +37,24 @@
}
public void func_225534_a_(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) { public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
super.func_225534_a_(p_225534_1_, p_225534_2_, p_225534_3_, p_225534_4_); + if (!p_225542_2_.isAreaLoaded(p_225542_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light
+ if (!p_225534_2_.isAreaLoaded(p_225534_3_, 1)) return; // Forge: prevent loading unloaded chunks when checking neighbor's light if (p_225542_2_.func_226659_b_(p_225542_3_, 0) >= 9) {
if (p_225534_2_.func_226659_b_(p_225534_3_, 0) >= 9) { float f = CropsBlock.func_180672_a(this, p_225542_2_, p_225542_3_);
float f = CropsBlock.func_180672_a(this, p_225534_2_, p_225534_3_); - if (p_225542_4_.nextInt((int)(25.0F / f) + 1) == 0) {
- if (p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0) { + if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225542_2_, p_225542_3_, p_225542_1_, p_225542_4_.nextInt((int)(25.0F / f) + 1) == 0)) {
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, p_225534_4_.nextInt((int)(25.0F / f) + 1) == 0)) { int i = p_225542_1_.func_177229_b(field_176484_a);
int i = p_225534_1_.func_177229_b(field_176484_a);
if (i < 7) { if (i < 7) {
- p_225534_1_ = p_225534_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)); - p_225542_1_ = p_225542_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1));
- p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_, 2); - p_225542_2_.func_180501_a(p_225542_3_, p_225542_1_, 2);
+ p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)), 2); + p_225542_2_.func_180501_a(p_225542_3_, p_225542_1_.func_206870_a(field_176484_a, Integer.valueOf(i + 1)), 2);
} else { } else {
Direction direction = Direction.Plane.HORIZONTAL.func_179518_a(p_225534_4_); Direction direction = Direction.Plane.HORIZONTAL.func_179518_a(p_225542_4_);
BlockPos blockpos = p_225534_3_.func_177972_a(direction); BlockPos blockpos = p_225542_3_.func_177972_a(direction);
- Block block = p_225534_2_.func_180495_p(blockpos.func_177977_b()).func_177230_c(); BlockState blockstate = p_225542_2_.func_180495_p(blockpos.func_177977_b());
- if (p_225534_2_.func_180495_p(blockpos).func_196958_f() && (block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) { - if (p_225542_2_.func_180495_p(blockpos).func_196958_f() && (blockstate.func_203425_a(Blocks.field_150458_ak) || blockstate.func_203425_a(Blocks.field_150346_d) || blockstate.func_203425_a(Blocks.field_196660_k) || blockstate.func_203425_a(Blocks.field_196661_l) || blockstate.func_203425_a(Blocks.field_196658_i))) {
+ BlockState soil = p_225534_2_.func_180495_p(blockpos.func_177977_b()); + Block block = blockstate.func_177230_c();
+ Block block = soil.func_177230_c(); + if (p_225542_2_.func_175623_d(blockpos) && (blockstate.canSustainPlant(p_225542_2_, blockpos.func_177977_b(), Direction.UP, this) || block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) {
+ if (p_225534_2_.func_175623_d(blockpos) && (soil.canSustainPlant(p_225534_2_, blockpos.func_177977_b(), Direction.UP, this) || block == Blocks.field_150458_ak || block == Blocks.field_150346_d || block == Blocks.field_196660_k || block == Blocks.field_196661_l || block == Blocks.field_196658_i)) { p_225542_2_.func_175656_a(blockpos, this.field_149877_a.func_176223_P());
p_225534_2_.func_175656_a(blockpos, this.field_149877_a.func_176223_P()); p_225542_2_.func_175656_a(p_225542_3_, this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(HorizontalBlock.field_185512_D, direction));
p_225534_2_.func_175656_a(p_225534_3_, this.field_149877_a.func_196523_e().func_176223_P().func_206870_a(HorizontalBlock.field_185512_D, direction));
} }
} }
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_); + net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225542_2_, p_225542_3_, p_225542_1_);
} }
} }
@@ -101,4 +103,10 @@ @@ -97,4 +99,10 @@
public StemGrownBlock func_208486_d() { public StemGrownBlock func_208486_d() {
return this.field_149877_a; return this.field_149877_a;
} }

View file

@ -9,32 +9,16 @@
public static final IntegerProperty field_176355_a = BlockStateProperties.field_208171_X; public static final IntegerProperty field_176355_a = BlockStateProperties.field_208171_X;
protected static final VoxelShape field_196503_b = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 16.0D, 14.0D); protected static final VoxelShape field_196503_b = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 16.0D, 14.0D);
@@ -39,12 +39,15 @@ @@ -63,6 +63,8 @@
if (i < 3) {
int j = p_225534_1_.func_177229_b(field_176355_a);
+ if (net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_225534_2_, p_225534_3_, p_225534_1_, true)) {
if (j == 15) {
p_225534_2_.func_175656_a(p_225534_3_.func_177984_a(), this.func_176223_P());
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176355_a, Integer.valueOf(0)), 4);
} else {
p_225534_2_.func_180501_a(p_225534_3_, p_225534_1_.func_206870_a(field_176355_a, Integer.valueOf(j + 1)), 4);
}
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_225534_2_, p_225534_3_, p_225534_1_);
+ }
}
}
@@ -59,6 +62,8 @@
} }
public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) { public boolean func_196260_a(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_) {
+ BlockState soil = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()); + BlockState soil = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
+ if (soil.canSustainPlant(p_196260_2_, p_196260_3_.func_177977_b(), Direction.UP, this)) return true; + if (soil.canSustainPlant(p_196260_2_, p_196260_3_.func_177977_b(), Direction.UP, this)) return true;
Block block = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b()).func_177230_c(); BlockState blockstate = p_196260_2_.func_180495_p(p_196260_3_.func_177977_b());
if (block == this) { if (blockstate.func_177230_c() == this) {
return true; return true;
@@ -82,4 +87,14 @@ @@ -86,4 +88,14 @@
protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) { protected void func_206840_a(StateContainer.Builder<Block, BlockState> p_206840_1_) {
p_206840_1_.func_206894_a(field_176355_a); p_206840_1_.func_206894_a(field_176355_a);
} }

View file

@ -1,22 +1,6 @@
--- a/net/minecraft/block/TNTBlock.java --- a/net/minecraft/block/TNTBlock.java
+++ b/net/minecraft/block/TNTBlock.java +++ b/net/minecraft/block/TNTBlock.java
@@ -29,10 +29,14 @@ @@ -41,7 +41,7 @@
this.func_180632_j(this.func_176223_P().func_206870_a(field_212569_a, Boolean.valueOf(false)));
}
+ public void catchFire(BlockState state, World world, BlockPos pos, @Nullable net.minecraft.util.Direction face, @Nullable LivingEntity igniter) {
+ func_196535_a(world, pos, igniter);
+ }
+
public void func_220082_b(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_) {
if (p_220082_4_.func_177230_c() != p_220082_1_.func_177230_c()) {
if (p_220082_2_.func_175640_z(p_220082_3_)) {
- func_196534_a(p_220082_2_, p_220082_3_);
+ catchFire(p_220082_1_, p_220082_2_, p_220082_3_, null, null);
p_220082_2_.func_217377_a(p_220082_3_, false);
}
@@ -41,7 +45,7 @@
public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) { public void func_220069_a(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_) {
if (p_220069_2_.func_175640_z(p_220069_3_)) { if (p_220069_2_.func_175640_z(p_220069_3_)) {
@ -25,7 +9,7 @@
p_220069_2_.func_217377_a(p_220069_3_, false); p_220069_2_.func_217377_a(p_220069_3_, false);
} }
@@ -49,7 +53,7 @@ @@ -49,7 +49,7 @@
public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, BlockState p_176208_3_, PlayerEntity p_176208_4_) { public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, BlockState p_176208_3_, PlayerEntity p_176208_4_) {
if (!p_176208_1_.func_201670_d() && !p_176208_4_.func_184812_l_() && p_176208_3_.func_177229_b(field_212569_a)) { if (!p_176208_1_.func_201670_d() && !p_176208_4_.func_184812_l_() && p_176208_3_.func_177229_b(field_212569_a)) {
@ -34,7 +18,7 @@
} }
super.func_176208_a(p_176208_1_, p_176208_2_, p_176208_3_, p_176208_4_); super.func_176208_a(p_176208_1_, p_176208_2_, p_176208_3_, p_176208_4_);
@@ -63,10 +67,12 @@ @@ -63,10 +63,12 @@
} }
} }
@ -47,7 +31,7 @@
private static void func_196535_a(World p_196535_0_, BlockPos p_196535_1_, @Nullable LivingEntity p_196535_2_) { private static void func_196535_a(World p_196535_0_, BlockPos p_196535_1_, @Nullable LivingEntity p_196535_2_) {
if (!p_196535_0_.field_72995_K) { if (!p_196535_0_.field_72995_K) {
TNTEntity tntentity = new TNTEntity(p_196535_0_, (double)p_196535_1_.func_177958_n() + 0.5D, (double)p_196535_1_.func_177956_o(), (double)p_196535_1_.func_177952_p() + 0.5D, p_196535_2_); TNTEntity tntentity = new TNTEntity(p_196535_0_, (double)p_196535_1_.func_177958_n() + 0.5D, (double)p_196535_1_.func_177956_o(), (double)p_196535_1_.func_177952_p() + 0.5D, p_196535_2_);
@@ -81,7 +87,7 @@ @@ -81,7 +83,7 @@
if (item != Items.field_151033_d && item != Items.field_151059_bz) { if (item != Items.field_151033_d && item != Items.field_151059_bz) {
return super.func_225533_a_(p_225533_1_, p_225533_2_, p_225533_3_, p_225533_4_, p_225533_5_, p_225533_6_); return super.func_225533_a_(p_225533_1_, p_225533_2_, p_225533_3_, p_225533_4_, p_225533_5_, p_225533_6_);
} else { } else {
@ -56,9 +40,9 @@
p_225533_2_.func_180501_a(p_225533_3_, Blocks.field_150350_a.func_176223_P(), 11); p_225533_2_.func_180501_a(p_225533_3_, Blocks.field_150350_a.func_176223_P(), 11);
if (!p_225533_4_.func_184812_l_()) { if (!p_225533_4_.func_184812_l_()) {
if (item == Items.field_151033_d) { if (item == Items.field_151033_d) {
@@ -103,7 +109,7 @@ @@ -102,7 +104,7 @@
Entity entity = abstractarrowentity.func_212360_k(); Entity entity = p_220066_4_.func_234616_v_();
if (abstractarrowentity.func_70027_ad()) { if (p_220066_4_.func_70027_ad()) {
BlockPos blockpos = p_220066_3_.func_216350_a(); BlockPos blockpos = p_220066_3_.func_216350_a();
- func_196535_a(p_220066_1_, blockpos, entity instanceof LivingEntity ? (LivingEntity)entity : null); - func_196535_a(p_220066_1_, blockpos, entity instanceof LivingEntity ? (LivingEntity)entity : null);
+ catchFire(p_220066_2_, p_220066_1_, blockpos, null, entity instanceof LivingEntity ? (LivingEntity)entity : null); + catchFire(p_220066_2_, p_220066_1_, blockpos, null, entity instanceof LivingEntity ? (LivingEntity)entity : null);

View file

@ -8,4 +8,4 @@
+public class TallGrassBlock extends BushBlock implements IGrowable, net.minecraftforge.common.IShearable { +public class TallGrassBlock extends BushBlock implements IGrowable, net.minecraftforge.common.IShearable {
protected static final VoxelShape field_196389_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D); protected static final VoxelShape field_196389_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
protected TallGrassBlock(Block.Properties p_i48310_1_) { protected TallGrassBlock(AbstractBlock.Properties p_i48310_1_) {

View file

@ -1,9 +1,11 @@
--- a/net/minecraft/block/TrapDoorBlock.java --- a/net/minecraft/block/TrapDoorBlock.java
+++ b/net/minecraft/block/TrapDoorBlock.java +++ b/net/minecraft/block/TrapDoorBlock.java
@@ -149,6 +149,16 @@ @@ -147,4 +147,17 @@
return super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_); return super.func_196271_a(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_);
} }
+
+ //Forge Start
+ @Override + @Override
+ public boolean isLadder(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { + public boolean isLadder(BlockState state, net.minecraft.world.IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) {
+ if (state.func_177229_b(field_176283_b)) { + if (state.func_177229_b(field_176283_b)) {
@ -13,7 +15,6 @@
+ } + }
+ return false; + return false;
+ } + }
+ //Forge End
+ +
public boolean func_220067_a(BlockState p_220067_1_, IBlockReader p_220067_2_, BlockPos p_220067_3_, EntityType<?> p_220067_4_) {
return false;
} }

View file

@ -1,11 +1,11 @@
--- a/net/minecraft/block/TurtleEggBlock.java --- a/net/minecraft/block/TurtleEggBlock.java
+++ b/net/minecraft/block/TurtleEggBlock.java +++ b/net/minecraft/block/TurtleEggBlock.java
@@ -141,7 +141,7 @@ @@ -149,7 +149,7 @@
if (p_212570_2_ instanceof TurtleEntity) { if (!(p_212570_2_ instanceof LivingEntity)) {
return false; return false;
} else { } else {
- return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? p_212570_1_.func_82736_K().func_223586_b(GameRules.field_223599_b) : true; - return p_212570_2_ instanceof PlayerEntity || p_212570_1_.func_82736_K().func_223586_b(GameRules.field_223599_b);
+ return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_212570_1_, p_212570_2_) : true; + return p_212570_2_ instanceof LivingEntity && !(p_212570_2_ instanceof PlayerEntity) ? net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(p_212570_1_, p_212570_2_) : true;
} }
} } else {
} return false;

View file

@ -9,38 +9,37 @@
public static final BooleanProperty field_176277_a = SixWayBlock.field_196496_z; public static final BooleanProperty field_176277_a = SixWayBlock.field_196496_z;
public static final BooleanProperty field_176273_b = SixWayBlock.field_196488_a; public static final BooleanProperty field_176273_b = SixWayBlock.field_196488_a;
public static final BooleanProperty field_176278_M = SixWayBlock.field_196490_b; public static final BooleanProperty field_176278_M = SixWayBlock.field_196490_b;
@@ -152,14 +152,14 @@ @@ -143,14 +143,14 @@
p_225534_2_.func_217377_a(p_225534_3_, false);
} }
- } else if (p_225534_2_.field_73012_v.nextInt(4) == 0) { public void func_225542_b_(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, Random p_225542_4_) {
+ } else if (p_225534_2_.field_73012_v.nextInt(4) == 0 && p_225534_2_.isAreaLoaded(p_225534_3_, 4)) { // Forge: check area to prevent loading unloaded chunks - if (p_225542_2_.field_73012_v.nextInt(4) == 0) {
Direction direction = Direction.func_176741_a(p_225534_4_); + if (p_225542_2_.field_73012_v.nextInt(4) == 0 && p_225542_2_.isAreaLoaded(p_225542_3_, 4)) { // Forge: check area to prevent loading unloaded chunks
BlockPos blockpos = p_225534_3_.func_177984_a(); Direction direction = Direction.func_239631_a_(p_225542_4_);
if (direction.func_176740_k().func_176722_c() && !p_225534_1_.func_177229_b(func_176267_a(direction))) { BlockPos blockpos = p_225542_3_.func_177984_a();
if (this.func_196539_a(p_225534_2_, p_225534_3_)) { if (direction.func_176740_k().func_176722_c() && !p_225542_1_.func_177229_b(func_176267_a(direction))) {
BlockPos blockpos4 = p_225534_3_.func_177972_a(direction); if (this.func_196539_a(p_225542_2_, p_225542_3_)) {
BlockState blockstate5 = p_225534_2_.func_180495_p(blockpos4); BlockPos blockpos4 = p_225542_3_.func_177972_a(direction);
- if (blockstate5.func_196958_f()) { BlockState blockstate4 = p_225542_2_.func_180495_p(blockpos4);
+ if (blockstate5.isAir(p_225534_2_, blockpos4)) { - if (blockstate4.func_196958_f()) {
+ if (blockstate4.isAir(p_225542_2_, blockpos4)) {
Direction direction3 = direction.func_176746_e(); Direction direction3 = direction.func_176746_e();
Direction direction4 = direction.func_176735_f(); Direction direction4 = direction.func_176735_f();
boolean flag = p_225534_1_.func_177229_b(func_176267_a(direction3)); boolean flag = p_225542_1_.func_177229_b(func_176267_a(direction3));
@@ -216,8 +216,8 @@ @@ -207,7 +207,7 @@
if (p_225534_3_.func_177956_o() > 0) { if (p_225542_3_.func_177956_o() > 0) {
BlockPos blockpos1 = p_225534_3_.func_177977_b(); BlockPos blockpos1 = p_225542_3_.func_177977_b();
BlockState blockstate1 = p_225534_2_.func_180495_p(blockpos1); BlockState blockstate = p_225542_2_.func_180495_p(blockpos1);
- if (blockstate1.func_196958_f() || blockstate1.func_177230_c() == this) { - if (blockstate.func_196958_f() || blockstate.func_203425_a(this)) {
- BlockState blockstate2 = blockstate1.func_196958_f() ? this.func_176223_P() : blockstate1; + if (blockstate.isAir(p_225542_2_, blockpos) || blockstate.func_203425_a(this)) {
+ if (blockstate1.isAir(p_225534_2_, blockpos1) || blockstate1.func_177230_c() == this) { BlockState blockstate1 = blockstate.func_196958_f() ? this.func_176223_P() : blockstate;
+ BlockState blockstate2 = blockstate1.isAir(p_225534_2_, blockpos1) ? this.func_176223_P() : blockstate1; BlockState blockstate2 = this.func_196544_a(p_225542_1_, blockstate1, p_225542_4_);
BlockState blockstate3 = this.func_196544_a(p_225534_1_, blockstate2, p_225534_4_); if (blockstate1 != blockstate2 && this.func_196540_x(blockstate2)) {
if (blockstate2 != blockstate3 && this.func_196540_x(blockstate3)) { @@ -313,4 +313,7 @@
p_225534_2_.func_180501_a(blockpos1, blockstate3, 2);
@@ -322,4 +322,6 @@
public static BooleanProperty func_176267_a(Direction p_176267_0_) { public static BooleanProperty func_176267_a(Direction p_176267_0_) {
return field_196546_A.get(p_176267_0_); return field_196546_A.get(p_176267_0_);
} }
+ +
+ @Override public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; } + @Override
+ public boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, net.minecraft.entity.LivingEntity entity) { return true; }
} }

View file

@ -1,11 +1,11 @@
--- a/net/minecraft/block/WebBlock.java --- a/net/minecraft/block/WebBlock.java
+++ b/net/minecraft/block/WebBlock.java +++ b/net/minecraft/block/WebBlock.java
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.World; import net.minecraft.world.World;
-public class WebBlock extends Block { -public class WebBlock extends Block {
+public class WebBlock extends Block implements net.minecraftforge.common.IShearable { +public class WebBlock extends Block implements net.minecraftforge.common.IShearable {
public WebBlock(Block.Properties p_i48296_1_) { public WebBlock(AbstractBlock.Properties p_i48296_1_) {
super(p_i48296_1_); super(p_i48296_1_);
} }

View file

@ -1,14 +1,14 @@
--- a/net/minecraft/client/GameSettings.java --- a/net/minecraft/client/GameSettings.java
+++ b/net/minecraft/client/GameSettings.java +++ b/net/minecraft/client/GameSettings.java
@@ -171,6 +171,7 @@ @@ -164,6 +164,7 @@
public String field_74363_ab = "en_us"; public boolean field_241568_aS_;
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) { public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
+ setForgeKeybindProperties(); + setForgeKeybindProperties();
this.field_74317_L = p_i46326_1_; this.field_74317_L = p_i46326_1_;
this.field_74354_ai = new File(p_i46326_2_, "options.txt"); this.field_74354_ai = new File(p_i46326_2_, "options.txt");
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) { if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
@@ -490,7 +491,11 @@ @@ -507,7 +508,11 @@
for(KeyBinding keybinding : this.field_74324_K) { for(KeyBinding keybinding : this.field_74324_K) {
if (s.equals("key_" + keybinding.func_151464_g())) { if (s.equals("key_" + keybinding.func_151464_g())) {
@ -21,7 +21,7 @@
} }
} }
@@ -538,6 +543,7 @@ @@ -554,6 +559,7 @@
} }
public void func_74303_b() { public void func_74303_b() {
@ -29,8 +29,8 @@
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) { try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion()); printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this)); printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
@@ -615,7 +621,7 @@ @@ -635,7 +641,7 @@
printwriter.println("skipMultiplayerWarning:" + this.field_230152_Z_); printwriter.println("syncChunkWrites:" + this.field_241568_aS_);
for(KeyBinding keybinding : this.field_74324_K) { for(KeyBinding keybinding : this.field_74324_K) {
- printwriter.println("key_" + keybinding.func_151464_g() + ":" + keybinding.func_197982_m()); - printwriter.println("key_" + keybinding.func_151464_g() + ":" + keybinding.func_197982_m());
@ -38,7 +38,7 @@
} }
for(SoundCategory soundcategory : SoundCategory.values()) { for(SoundCategory soundcategory : SoundCategory.values()) {
@@ -714,4 +720,22 @@ @@ -733,4 +739,22 @@
p_198017_1_.func_198985_a(set); p_198017_1_.func_198985_a(set);
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/KeyboardListener.java --- a/net/minecraft/client/KeyboardListener.java
+++ b/net/minecraft/client/KeyboardListener.java +++ b/net/minecraft/client/KeyboardListener.java
@@ -251,7 +251,9 @@ @@ -256,7 +256,9 @@
} }
INestedGuiEventHandler inestedguieventhandler = this.field_197972_a.field_71462_r; INestedGuiEventHandler inestedguieventhandler = this.field_197972_a.field_71462_r;
@ -11,7 +11,7 @@
if (this.field_197972_a.field_71474_y.field_152395_am.func_197976_a(p_197961_3_, p_197961_4_)) { if (this.field_197972_a.field_71474_y.field_152395_am.func_197976_a(p_197961_3_, p_197961_4_)) {
this.field_197972_a.func_228018_at_().func_198077_g(); this.field_197972_a.func_228018_at_().func_198077_g();
this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.func_228018_at_().func_198113_j(); this.field_197972_a.field_71474_y.field_74353_u = this.field_197972_a.func_228018_at_().func_198113_j();
@@ -270,6 +272,8 @@ @@ -275,6 +277,8 @@
}); });
return; return;
} }
@ -19,25 +19,8 @@
+ ((ControlsScreen)this.field_197972_a.field_71462_r).field_146491_f = null; //Forge: Unset pure modifiers. + ((ControlsScreen)this.field_197972_a.field_71462_r).field_146491_f = null; //Forge: Unset pure modifiers.
} }
boolean flag = inestedguieventhandler == null || !(inestedguieventhandler.getFocused() instanceof TextFieldWidget) || !((TextFieldWidget)inestedguieventhandler.getFocused()).func_212955_f(); boolean flag = inestedguieventhandler == null || !(inestedguieventhandler.func_241217_q_() instanceof TextFieldWidget) || !((TextFieldWidget)inestedguieventhandler.func_241217_q_()).func_212955_f();
@@ -289,10 +293,14 @@ @@ -350,7 +354,7 @@
Screen.wrapScreenError(() -> {
if (p_197961_5_ != 1 && (p_197961_5_ != 2 || !this.field_197973_b)) {
if (p_197961_5_ == 0) {
- aboolean[0] = inestedguieventhandler.func_223281_a_(p_197961_3_, p_197961_4_, p_197961_6_);
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyReleasedPre(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
+ if (!aboolean[0]) aboolean[0] = inestedguieventhandler.func_223281_a_(p_197961_3_, p_197961_4_, p_197961_6_);
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyReleasedPost(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
}
} else {
- aboolean[0] = inestedguieventhandler.keyPressed(p_197961_3_, p_197961_4_, p_197961_6_);
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyPressedPre(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
+ if (!aboolean[0]) aboolean[0] = inestedguieventhandler.keyPressed(p_197961_3_, p_197961_4_, p_197961_6_);
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiKeyPressedPost(this.field_197972_a.field_71462_r, p_197961_3_, p_197961_4_, p_197961_6_);
}
}, "keyPressed event handler", inestedguieventhandler.getClass().getCanonicalName());
@@ -353,7 +361,7 @@
} }
} }
} }
@ -46,22 +29,3 @@
} }
} }
@@ -363,12 +371,16 @@
if (iguieventlistener != null && this.field_197972_a.func_213250_au() == null) {
if (Character.charCount(p_197963_3_) == 1) {
Screen.wrapScreenError(() -> {
- iguieventlistener.charTyped((char)p_197963_3_, p_197963_4_);
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiCharTypedPre(this.field_197972_a.field_71462_r, (char)p_197963_3_, p_197963_4_)) return;
+ if (iguieventlistener.charTyped((char)p_197963_3_, p_197963_4_)) return;
+ net.minecraftforge.client.ForgeHooksClient.onGuiCharTypedPost(this.field_197972_a.field_71462_r, (char)p_197963_3_, p_197963_4_);
}, "charTyped event handler", iguieventlistener.getClass().getCanonicalName());
} else {
for(char c0 : Character.toChars(p_197963_3_)) {
Screen.wrapScreenError(() -> {
- iguieventlistener.charTyped(c0, p_197963_4_);
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiCharTypedPre(this.field_197972_a.field_71462_r, c0, p_197963_4_)) return;
+ if (iguieventlistener.charTyped(c0, p_197963_4_)) return;
+ net.minecraftforge.client.ForgeHooksClient.onGuiCharTypedPost(this.field_197972_a.field_71462_r, c0, p_197963_4_);
}, "charTyped event handler", iguieventlistener.getClass().getCanonicalName());
}
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/Minecraft.java --- a/net/minecraft/client/Minecraft.java
+++ b/net/minecraft/client/Minecraft.java +++ b/net/minecraft/client/Minecraft.java
@@ -322,6 +322,7 @@ @@ -358,6 +358,7 @@
public Minecraft(GameConfiguration p_i45547_1_) { public Minecraft(GameConfiguration p_i45547_1_) {
super("Client"); super("Client");
field_71432_P = this; field_71432_P = this;
@ -8,55 +8,15 @@
this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a; this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a;
File file1 = p_i45547_1_.field_178744_c.field_178759_c; File file1 = p_i45547_1_.field_178744_c.field_178759_c;
this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b; this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b;
@@ -336,7 +337,6 @@ @@ -370,7 +371,6 @@
this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService(); this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService();
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a; this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a()); field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a());
- field_147123_G.debug("(Session ID is {})", (Object)this.field_71449_j.func_111286_b()); - field_147123_G.debug("(Session ID is {})", (Object)this.field_71449_j.func_111286_b());
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a; this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
this.field_147129_ai = func_147122_X(); this.field_238175_ae_ = !p_i45547_1_.field_178741_d.field_239099_d_;
this.field_71437_Z = null; this.field_238176_af_ = !p_i45547_1_.field_178741_d.field_239100_e_;
@@ -350,7 +350,7 @@ @@ -482,12 +482,11 @@
i = 0;
}
- Bootstrap.func_151354_b();
+ net.minecraftforge.fml.loading.BackgroundWaiter.runAndTick(()->Bootstrap.func_151354_b(), net.minecraftforge.fml.loading.FMLLoader.progressWindowTick);
Bootstrap.func_218821_c();
KeybindTextComponent.field_193637_b = KeyBinding::func_193626_b;
this.field_184131_U = DataFixesManager.func_210901_a();
@@ -383,13 +383,13 @@
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
this.field_71417_B = new MouseHelper(this);
- this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i());
this.field_195559_v = new KeyboardListener(this);
this.field_195559_v.func_197968_a(this.field_195558_d.func_198092_i());
RenderSystem.initRenderer(this.field_71474_y.field_209231_W, false);
this.field_147124_at = new Framebuffer(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), true, field_142025_a);
this.field_147124_at.func_147604_a(0.0F, 0.0F, 0.0F, 0.0F);
this.field_110451_am = new SimpleReloadableResourceManager(ResourcePackType.CLIENT_RESOURCES, this.field_152352_aC);
+ net.minecraftforge.fml.client.ClientModLoader.begin(this, this.field_110448_aq, this.field_110451_am, this.field_195554_ax);
this.field_71474_y.func_198017_a(this.field_110448_aq);
this.field_110448_aq.func_198983_a();
this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
@@ -434,12 +434,14 @@
this.func_193986_ar();
this.field_110451_am.func_219534_a(this.field_193995_ae);
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.ParticleFactoryRegisterEvent());
this.field_110451_am.func_219534_a(this.field_71452_i);
this.field_213272_aL = new PaintingSpriteUploader(this.field_71446_o);
this.field_110451_am.func_219534_a(this.field_213272_aL);
this.field_213273_aM = new PotionSpriteUploader(this.field_71446_o);
this.field_110451_am.func_219534_a(this.field_213273_aM);
- this.field_71456_v = new IngameGui(this);
+ this.field_71456_v = new net.minecraftforge.client.gui.ForgeIngameGui(this);
+ this.field_71417_B.func_198029_a(this.field_195558_d.func_198092_i()); //Forge: Moved below ingameGUI setting to prevent NPEs in handeler.
this.field_184132_p = new DebugRenderer(this);
RenderSystem.setErrorCallback(this::func_195545_a);
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
@@ -451,12 +453,11 @@
this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E); this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E);
this.field_195558_d.func_227801_c_(); this.field_195558_d.func_227801_c_();
this.func_213226_a(); this.func_213226_a();
@ -71,9 +31,9 @@
+ final int autoServerPort = i; + final int autoServerPort = i;
+ +
ResourceLoadProgressGui.func_212970_a(this); ResourceLoadProgressGui.func_212970_a(this);
List<IResourcePack> list = this.field_110448_aq.func_198980_d().stream().map(ResourcePackInfo::func_195796_e).collect(Collectors.toList()); List<IResourcePack> list = this.field_110448_aq.func_232623_f_();
this.func_213268_a(new ResourceLoadProgressGui(this, this.field_110451_am.func_219537_a(Util.func_215072_e(), this, field_223714_G, list), (p_229990_2_) -> { this.func_213268_a(new ResourceLoadProgressGui(this, this.field_110451_am.func_219537_a(Util.func_215072_e(), this, field_223714_G, list), (p_238197_1_) -> {
@@ -466,6 +467,14 @@ @@ -496,6 +495,14 @@
this.func_213256_aB(); this.func_213256_aB();
} }
@ -88,16 +48,16 @@
}); });
}, false)); }, false));
} }
@@ -505,7 +514,7 @@ @@ -534,7 +541,7 @@
} }
private void func_229988_a_(Throwable p_229988_1_) { private void func_229988_a_(Throwable p_229988_1_) {
- if (this.field_110448_aq.func_198980_d().size() > 1) { - if (this.field_110448_aq.func_232621_d_().size() > 1) {
+ if (this.field_110448_aq.func_198980_d().stream().anyMatch(e -> !e.func_195797_g())) { //Forge: This caused infinite loop if any resource packs are forced. Such as mod resources. So check if we can disable any. + if (this.field_110448_aq.func_198980_d().stream().anyMatch(e -> !e.func_195797_g())) { //Forge: This caused infinite loop if any resource packs are forced. Such as mod resources. So check if we can disable any.
ITextComponent itextcomponent; ITextComponent itextcomponent;
if (p_229988_1_ instanceof SimpleReloadableResourceManager.FailedPackException) { if (p_229988_1_ instanceof SimpleReloadableResourceManager.FailedPackException) {
itextcomponent = new StringTextComponent(((SimpleReloadableResourceManager.FailedPackException)p_229988_1_).func_230028_a().func_195762_a()); itextcomponent = new StringTextComponent(((SimpleReloadableResourceManager.FailedPackException)p_229988_1_).func_241203_a().func_195762_a());
@@ -579,7 +588,7 @@ @@ -618,7 +625,7 @@
return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b())); return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b()));
}); });
SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> { SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> {
@ -106,7 +66,7 @@
}); });
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a(); NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
@@ -667,13 +676,13 @@ @@ -688,13 +695,13 @@
Bootstrap.func_179870_a(p_71377_0_.func_71502_e()); Bootstrap.func_179870_a(p_71377_0_.func_71502_e());
if (p_71377_0_.func_71497_f() != null) { if (p_71377_0_.func_71497_f() != null) {
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_0_.func_71497_f()); Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_0_.func_71497_f());
@ -123,7 +83,7 @@
} }
} }
@@ -682,6 +691,7 @@ @@ -703,6 +710,7 @@
return this.field_71474_y.field_211842_aO; return this.field_71474_y.field_211842_aO;
} }
@ -131,18 +91,18 @@
public CompletableFuture<Void> func_213237_g() { public CompletableFuture<Void> func_213237_g() {
if (this.field_213276_aV != null) { if (this.field_213276_aV != null) {
return this.field_213276_aV; return this.field_213276_aV;
@@ -760,10 +770,6 @@ @@ -791,10 +799,6 @@
} }
public void func_147108_a(@Nullable Screen p_147108_1_) { public void func_147108_a(@Nullable Screen p_147108_1_) {
- if (this.field_71462_r != null) { - if (this.field_71462_r != null) {
- this.field_71462_r.removed(); - this.field_71462_r.func_231164_f_();
- } - }
- -
if (p_147108_1_ == null && this.field_71441_e == null) { if (p_147108_1_ == null && this.field_71441_e == null) {
p_147108_1_ = new MainMenuScreen(); p_147108_1_ = new MainMenuScreen();
} else if (p_147108_1_ == null && this.field_71439_g.func_110143_aJ() <= 0.0F) { } else if (p_147108_1_ == null && this.field_71439_g.func_233643_dh_()) {
@@ -774,6 +780,14 @@ @@ -805,6 +809,14 @@
} }
} }
@ -152,26 +112,26 @@
+ +
+ p_147108_1_ = event.getGui(); + p_147108_1_ = event.getGui();
+ if (old != null && p_147108_1_ != old) + if (old != null && p_147108_1_ != old)
+ old.removed(); + old.func_231164_f_();
+ +
if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) { if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) {
this.field_71474_y.field_74330_P = false; this.field_71474_y.field_74330_P = false;
this.field_71456_v.func_146158_b().func_146231_a(true); this.field_71456_v.func_146158_b().func_146231_a(true);
@@ -905,11 +919,13 @@ @@ -936,11 +948,13 @@
RenderSystem.enableTexture(); RenderSystem.enableCull();
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
if (!this.field_71454_w) { if (!this.field_71454_w) {
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickStart(this.field_71428_T.field_194147_b); + net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickStart(this.field_71428_T.field_194147_b);
this.field_71424_I.func_219895_b("gameRenderer"); this.field_71424_I.func_219895_b("gameRenderer");
this.field_71460_t.func_195458_a(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b, i, p_195542_1_); this.field_71460_t.func_195458_a(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b, i, p_195542_1_);
this.field_71424_I.func_219895_b("toasts"); this.field_71424_I.func_219895_b("toasts");
this.field_193034_aS.func_195625_a(); this.field_193034_aS.func_238541_a_(new MatrixStack());
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
+ net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickEnd(this.field_71428_T.field_194147_b); + net.minecraftforge.fml.hooks.BasicEventHooks.onRenderTickEnd(this.field_71428_T.field_194147_b);
} }
this.field_71424_I.func_219897_b(); if (this.field_238174_aV_ != null) {
@@ -976,7 +992,7 @@ @@ -1039,7 +1053,7 @@
Framebuffer framebuffer = this.func_147110_a(); Framebuffer framebuffer = this.func_147110_a();
framebuffer.func_216491_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), field_142025_a); framebuffer.func_216491_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), field_142025_a);
@ -180,7 +140,7 @@
this.field_71417_B.func_198021_g(); this.field_71417_B.func_198021_g();
} }
@@ -1164,11 +1180,21 @@ @@ -1227,11 +1241,21 @@
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) { if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) {
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x; BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
BlockPos blockpos = blockraytraceresult.func_216350_a(); BlockPos blockpos = blockraytraceresult.func_216350_a();
@ -204,7 +164,7 @@
} }
} }
@@ -1187,6 +1213,8 @@ @@ -1250,6 +1274,8 @@
} }
} else if (!this.field_71439_g.func_184838_M()) { } else if (!this.field_71439_g.func_184838_M()) {
@ -213,7 +173,7 @@
switch(this.field_71476_x.func_216346_c()) { switch(this.field_71476_x.func_216346_c()) {
case ENTITY: case ENTITY:
this.field_71442_b.func_78764_a(this.field_71439_g, ((EntityRayTraceResult)this.field_71476_x).func_216348_a()); this.field_71442_b.func_78764_a(this.field_71439_g, ((EntityRayTraceResult)this.field_71476_x).func_216348_a());
@@ -1194,7 +1222,7 @@ @@ -1257,7 +1283,7 @@
case BLOCK: case BLOCK:
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x; BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
BlockPos blockpos = blockraytraceresult.func_216350_a(); BlockPos blockpos = blockraytraceresult.func_216350_a();
@ -222,7 +182,7 @@
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b()); this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
break; break;
} }
@@ -1204,8 +1232,10 @@ @@ -1267,8 +1293,10 @@
} }
this.field_71439_g.func_184821_cY(); this.field_71439_g.func_184821_cY();
@ -233,7 +193,7 @@
this.field_71439_g.func_184609_a(Hand.MAIN_HAND); this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
} }
} }
@@ -1220,6 +1250,11 @@ @@ -1283,6 +1311,11 @@
} }
for(Hand hand : Hand.values()) { for(Hand hand : Hand.values()) {
@ -245,7 +205,7 @@
ItemStack itemstack = this.field_71439_g.func_184586_b(hand); ItemStack itemstack = this.field_71439_g.func_184586_b(hand);
if (this.field_71476_x != null) { if (this.field_71476_x != null) {
switch(this.field_71476_x.func_216346_c()) { switch(this.field_71476_x.func_216346_c()) {
@@ -1233,6 +1268,7 @@ @@ -1296,6 +1329,7 @@
if (actionresulttype.func_226246_a_()) { if (actionresulttype.func_226246_a_()) {
if (actionresulttype.func_226247_b_()) { if (actionresulttype.func_226247_b_()) {
@ -253,7 +213,7 @@
this.field_71439_g.func_184609_a(hand); this.field_71439_g.func_184609_a(hand);
} }
@@ -1245,6 +1281,7 @@ @@ -1308,6 +1342,7 @@
ActionResultType actionresulttype1 = this.field_71442_b.func_217292_a(this.field_71439_g, this.field_71441_e, hand, blockraytraceresult); ActionResultType actionresulttype1 = this.field_71442_b.func_217292_a(this.field_71439_g, this.field_71441_e, hand, blockraytraceresult);
if (actionresulttype1.func_226246_a_()) { if (actionresulttype1.func_226246_a_()) {
if (actionresulttype1.func_226247_b_()) { if (actionresulttype1.func_226247_b_()) {
@ -261,7 +221,7 @@
this.field_71439_g.func_184609_a(hand); this.field_71439_g.func_184609_a(hand);
if (!itemstack.func_190926_b() && (itemstack.func_190916_E() != i || this.field_71442_b.func_78758_h())) { if (!itemstack.func_190926_b() && (itemstack.func_190916_E() != i || this.field_71442_b.func_78758_h())) {
this.field_71460_t.field_78516_c.func_187460_a(hand); this.field_71460_t.field_78516_c.func_187460_a(hand);
@@ -1260,6 +1297,9 @@ @@ -1323,6 +1358,9 @@
} }
} }
@ -271,7 +231,7 @@
if (!itemstack.func_190926_b()) { if (!itemstack.func_190926_b()) {
ActionResultType actionresulttype2 = this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand); ActionResultType actionresulttype2 = this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand);
if (actionresulttype2.func_226246_a_()) { if (actionresulttype2.func_226246_a_()) {
@@ -1286,6 +1326,8 @@ @@ -1349,6 +1387,8 @@
--this.field_71467_ac; --this.field_71467_ac;
} }
@ -280,7 +240,7 @@
this.field_71424_I.func_76320_a("gui"); this.field_71424_I.func_76320_a("gui");
if (!this.field_71445_n) { if (!this.field_71445_n) {
this.field_71456_v.func_73831_a(); this.field_71456_v.func_73831_a();
@@ -1403,6 +1445,8 @@ @@ -1465,6 +1505,8 @@
this.field_71424_I.func_219895_b("keyboard"); this.field_71424_I.func_219895_b("keyboard");
this.field_195559_v.func_204870_b(); this.field_195559_v.func_204870_b();
this.field_71424_I.func_76319_b(); this.field_71424_I.func_76319_b();
@ -289,24 +249,10 @@
} }
private void func_184117_aA() { private void func_184117_aA() {
@@ -1557,6 +1601,12 @@ @@ -1697,6 +1739,12 @@
this.func_147108_a(worldloadprogressscreen);
while(!this.field_71437_Z.func_71200_ad()) {
+ if (!net.minecraftforge.fml.StartupQuery.check() || this.field_71437_Z.func_71241_aa()) {
+ this.func_147108_a(null);
+ return;
+ } else if (this.field_71462_r == null) // if we're showing nothing, put the working screen back again
+ this.func_147108_a(worldloadprogressscreen);
+
worldloadprogressscreen.tick();
this.func_195542_b(false);
@@ -1577,11 +1627,17 @@
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_229998_0_) -> {
})); }));
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN)); networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
- networkmanager.func_179290_a(new CLoginStartPacket(this.func_110432_I().func_148256_e())); networkmanager.func_179290_a(new CLoginStartPacket(this.func_110432_I().func_148256_e()));
+ com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e(); + com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e();
+ if (!this.func_110432_I().hasCachedProperties()) { + if (!this.func_110432_I().hasCachedProperties()) {
+ gameProfile = field_152355_az.fillProfileProperties(gameProfile, true); //Forge: Fill profile properties upon game load. Fixes MC-52974. + gameProfile = field_152355_az.fillProfileProperties(gameProfile, true); //Forge: Fill profile properties upon game load. Fixes MC-52974.
@ -314,6 +260,9 @@
+ } + }
+ networkmanager.func_179290_a(new CLoginStartPacket(gameProfile)); + networkmanager.func_179290_a(new CLoginStartPacket(gameProfile));
this.field_71453_ak = networkmanager; this.field_71453_ak = networkmanager;
} else {
this.func_241559_a_(p_238195_6_, p_238195_1_, flag, () -> {
@@ -1770,6 +1818,7 @@
} }
public void func_71403_a(ClientWorld p_71403_1_) { public void func_71403_a(ClientWorld p_71403_1_) {
@ -321,7 +270,7 @@
WorkingScreen workingscreen = new WorkingScreen(); WorkingScreen workingscreen = new WorkingScreen();
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining")); workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
this.func_213241_c(workingscreen); this.func_213241_c(workingscreen);
@@ -1613,10 +1669,12 @@ @@ -1801,10 +1850,12 @@
IntegratedServer integratedserver = this.field_71437_Z; IntegratedServer integratedserver = this.field_71437_Z;
this.field_71437_Z = null; this.field_71437_Z = null;
this.field_71460_t.func_190564_k(); this.field_71460_t.func_190564_k();
@ -332,9 +281,9 @@
if (this.field_71441_e != null) { if (this.field_71441_e != null) {
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
if (integratedserver != null) { if (integratedserver != null) {
while(!integratedserver.func_213201_w()) { this.field_71424_I.func_76320_a("waitForServer");
this.func_195542_b(false);
@@ -1627,6 +1685,7 @@ @@ -1819,6 +1870,7 @@
this.field_71456_v.func_181029_i(); this.field_71456_v.func_181029_i();
this.field_71422_O = null; this.field_71422_O = null;
this.field_71455_al = false; this.field_71455_al = false;
@ -342,131 +291,15 @@
this.field_213274_aO.func_216815_b(); this.field_213274_aO.func_216815_b();
} }
@@ -1649,6 +1708,7 @@ @@ -1849,6 +1901,7 @@
this.field_71452_i.func_78870_a(p_213257_1_); this.field_71452_i.func_78870_a(p_213257_1_);
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_); TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
this.func_230150_b_(); this.func_230150_b_();
+ net.minecraftforge.client.MinecraftForgeClient.clearRenderCache(); + net.minecraftforge.client.MinecraftForgeClient.clearRenderCache();
} }
public final boolean func_71355_q() { public boolean func_238216_r_() {
@@ -1674,112 +1734,9 @@ @@ -2081,6 +2134,7 @@
private void func_147112_ai() {
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
- boolean flag = this.field_71439_g.field_71075_bZ.field_75098_d;
- TileEntity tileentity = null;
- RayTraceResult.Type raytraceresult$type = this.field_71476_x.func_216346_c();
- ItemStack itemstack;
- if (raytraceresult$type == RayTraceResult.Type.BLOCK) {
- BlockPos blockpos = ((BlockRayTraceResult)this.field_71476_x).func_216350_a();
- BlockState blockstate = this.field_71441_e.func_180495_p(blockpos);
- Block block = blockstate.func_177230_c();
- if (blockstate.func_196958_f()) {
- return;
- }
-
- itemstack = block.func_185473_a(this.field_71441_e, blockpos, blockstate);
- if (itemstack.func_190926_b()) {
- return;
- }
-
- if (flag && Screen.hasControlDown() && block.func_149716_u()) {
- tileentity = this.field_71441_e.func_175625_s(blockpos);
- }
- } else {
- if (raytraceresult$type != RayTraceResult.Type.ENTITY || !flag) {
- return;
- }
-
- Entity entity = ((EntityRayTraceResult)this.field_71476_x).func_216348_a();
- if (entity instanceof PaintingEntity) {
- itemstack = new ItemStack(Items.field_151159_an);
- } else if (entity instanceof LeashKnotEntity) {
- itemstack = new ItemStack(Items.field_151058_ca);
- } else if (entity instanceof ItemFrameEntity) {
- ItemFrameEntity itemframeentity = (ItemFrameEntity)entity;
- ItemStack itemstack1 = itemframeentity.func_82335_i();
- if (itemstack1.func_190926_b()) {
- itemstack = new ItemStack(Items.field_151160_bD);
- } else {
- itemstack = itemstack1.func_77946_l();
- }
- } else if (entity instanceof AbstractMinecartEntity) {
- AbstractMinecartEntity abstractminecartentity = (AbstractMinecartEntity)entity;
- Item item;
- switch(abstractminecartentity.func_184264_v()) {
- case FURNACE:
- item = Items.field_151109_aJ;
- break;
- case CHEST:
- item = Items.field_151108_aI;
- break;
- case TNT:
- item = Items.field_151142_bV;
- break;
- case HOPPER:
- item = Items.field_151140_bW;
- break;
- case COMMAND_BLOCK:
- item = Items.field_151095_cc;
- break;
- default:
- item = Items.field_151143_au;
- }
-
- itemstack = new ItemStack(item);
- } else if (entity instanceof BoatEntity) {
- itemstack = new ItemStack(((BoatEntity)entity).func_184455_j());
- } else if (entity instanceof ArmorStandEntity) {
- itemstack = new ItemStack(Items.field_179565_cj);
- } else if (entity instanceof EnderCrystalEntity) {
- itemstack = new ItemStack(Items.field_185158_cP);
- } else {
- SpawnEggItem spawneggitem = SpawnEggItem.func_200889_b(entity.func_200600_R());
- if (spawneggitem == null) {
- return;
- }
-
- itemstack = new ItemStack(spawneggitem);
- }
- }
-
- if (itemstack.func_190926_b()) {
- String s = "";
- if (raytraceresult$type == RayTraceResult.Type.BLOCK) {
- s = Registry.field_212618_g.func_177774_c(this.field_71441_e.func_180495_p(((BlockRayTraceResult)this.field_71476_x).func_216350_a()).func_177230_c()).toString();
- } else if (raytraceresult$type == RayTraceResult.Type.ENTITY) {
- s = Registry.field_212629_r.func_177774_c(((EntityRayTraceResult)this.field_71476_x).func_216348_a().func_200600_R()).toString();
- }
-
- field_147123_G.warn("Picking on: [{}] {} gave null item", raytraceresult$type, s);
- } else {
- PlayerInventory playerinventory = this.field_71439_g.field_71071_by;
- if (tileentity != null) {
- this.func_184119_a(itemstack, tileentity);
- }
-
- int i = playerinventory.func_184429_b(itemstack);
- if (flag) {
- playerinventory.func_184434_a(itemstack);
- this.field_71442_b.func_78761_a(this.field_71439_g.func_184586_b(Hand.MAIN_HAND), 36 + playerinventory.field_70461_c);
- } else if (i != -1) {
- if (PlayerInventory.func_184435_e(i)) {
- playerinventory.field_70461_c = i;
- } else {
- this.field_71442_b.func_187100_a(i);
- }
- }
-
- }
+ if (!net.minecraftforge.client.ForgeHooksClient.onClickInput(2, this.field_71474_y.field_74322_I, Hand.MAIN_HAND).isCanceled())
+ net.minecraftforge.common.ForgeHooks.onPickBlock(this.field_71476_x, this.field_71439_g, this.field_71441_e);
+ // We delete this code wholly instead of commenting it out, to make sure we detect changes in it between MC versions
}
}
@@ -1861,6 +1818,7 @@
return field_71432_P; return field_71432_P;
} }
@ -474,29 +307,10 @@
public CompletableFuture<Void> func_213245_w() { public CompletableFuture<Void> func_213245_w() {
return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> { return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> {
return p_229993_0_; return p_229993_0_;
@@ -1988,6 +1946,8 @@ @@ -2407,6 +2461,14 @@
}
public MusicTicker.MusicType func_147109_W() {
+ MusicTicker.MusicType type = this.field_71441_e == null || this.field_71441_e.field_73011_w == null ? null : this.field_71441_e.field_73011_w.getMusicType();
+ if (type != null) return type;
if (this.field_71462_r instanceof WinGameScreen) {
return MusicTicker.MusicType.CREDITS;
} else if (this.field_71439_g == null) {
@@ -2164,7 +2124,7 @@
supplier = func_228022_c_(supplier);
}
- return new ClientResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_);
+ return new ClientResourcePackInfo(p_228011_0_, p_228011_1_, supplier, p_228011_3_, p_228011_4_, p_228011_5_, p_228011_3_.isHidden());
}
private static Supplier<IResourcePack> func_228021_b_(Supplier<IResourcePack> p_228021_0_) {
@@ -2182,4 +2142,12 @@
public void func_228020_b_(int p_228020_1_) {
this.field_175617_aL.func_229355_a_(p_228020_1_); this.field_175617_aL.func_229355_a_(p_228020_1_);
} }
+
+ public ItemColors getItemColors() { + public ItemColors getItemColors() {
+ return this.field_184128_aI; + return this.field_184128_aI;
+ } + }
@ -504,4 +318,7 @@
+ public SearchTreeManager getSearchTreeManager() { + public SearchTreeManager getSearchTreeManager() {
+ return this.field_193995_ae; + return this.field_193995_ae;
+ } + }
} +
@OnlyIn(Dist.CLIENT)
public static final class PackManager implements AutoCloseable {
private final ResourcePackList<ResourcePackInfo> field_238221_a_;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/MouseHelper.java --- a/net/minecraft/client/MouseHelper.java
+++ b/net/minecraft/client/MouseHelper.java +++ b/net/minecraft/client/MouseHelper.java
@@ -66,6 +66,7 @@ @@ -71,6 +71,7 @@
this.field_198042_g = -1; this.field_198042_g = -1;
} }
@ -8,25 +8,7 @@
boolean[] aboolean = new boolean[]{false}; boolean[] aboolean = new boolean[]{false};
if (this.field_198036_a.field_213279_p == null) { if (this.field_198036_a.field_213279_p == null) {
if (this.field_198036_a.field_71462_r == null) { if (this.field_198036_a.field_71462_r == null) {
@@ -77,11 +78,15 @@ @@ -110,7 +111,7 @@
double d1 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
if (flag) {
Screen.wrapScreenError(() -> {
- aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, i);
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPre(this.field_198036_a.field_71462_r, d0, d1, i);
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseClicked(d0, d1, i);
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseClickedPost(this.field_198036_a.field_71462_r, d0, d1, i);
}, "mouseClicked event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
} else {
Screen.wrapScreenError(() -> {
- aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, i);
+ aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPre(this.field_198036_a.field_71462_r, d0, d1, i);
+ if (!aboolean[0]) aboolean[0] = this.field_198036_a.field_71462_r.mouseReleased(d0, d1, i);
+ if (!aboolean[0]) aboolean[0] = net.minecraftforge.client.ForgeHooksClient.onGuiMouseReleasedPost(this.field_198036_a.field_71462_r, d0, d1, i);
}, "mouseReleased event handler", this.field_198036_a.field_71462_r.getClass().getCanonicalName());
}
}
@@ -105,7 +110,7 @@
} }
} }
} }
@ -35,18 +17,7 @@
} }
} }
@@ -116,7 +121,9 @@ @@ -134,6 +135,7 @@
if (this.field_198036_a.field_71462_r != null) {
double d1 = this.field_198040_e * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
double d2 = this.field_198041_f * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
- this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0);
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseScrollPre(this, this.field_198036_a.field_71462_r, d0)) return;
+ if (this.field_198036_a.field_71462_r.mouseScrolled(d1, d2, d0)) return;
+ net.minecraftforge.client.ForgeHooksClient.onGuiMouseScrollPost(this, this.field_198036_a.field_71462_r, d0);
} else if (this.field_198036_a.field_71439_g != null) {
if (this.field_200542_o != 0.0D && Math.signum(d0) != Math.signum(this.field_200542_o)) {
this.field_200542_o = 0.0D;
@@ -129,6 +136,7 @@
} }
this.field_200542_o -= (double)f1; this.field_200542_o -= (double)f1;
@ -54,18 +25,7 @@
if (this.field_198036_a.field_71439_g.func_175149_v()) { if (this.field_198036_a.field_71439_g.func_175149_v()) {
if (this.field_198036_a.field_71456_v.func_175187_g().func_175262_a()) { if (this.field_198036_a.field_71456_v.func_175187_g().func_175262_a()) {
this.field_198036_a.field_71456_v.func_175187_g().func_195621_a((double)(-f1)); this.field_198036_a.field_71456_v.func_175187_g().func_195621_a((double)(-f1));
@@ -180,7 +188,9 @@ @@ -267,6 +269,10 @@
double d2 = (p_198022_3_ - this.field_198040_e) * (double)this.field_198036_a.func_228018_at_().func_198107_o() / (double)this.field_198036_a.func_228018_at_().func_198105_m();
double d3 = (p_198022_5_ - this.field_198041_f) * (double)this.field_198036_a.func_228018_at_().func_198087_p() / (double)this.field_198036_a.func_228018_at_().func_198083_n();
Screen.wrapScreenError(() -> {
- iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3);
+ if (net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPre(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3)) return;
+ if (iguieventlistener.mouseDragged(d0, d1, this.field_198042_g, d2, d3)) return;
+ net.minecraftforge.client.ForgeHooksClient.onGuiMouseDragPost(this.field_198036_a.field_71462_r, d0, d1, this.field_198042_g, d2, d3);
}, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName());
}
}
@@ -245,6 +255,10 @@
return this.field_198039_d; return this.field_198039_d;
} }
@ -76,7 +36,7 @@
public double func_198024_e() { public double func_198024_e() {
return this.field_198040_e; return this.field_198040_e;
} }
@@ -253,6 +267,14 @@ @@ -275,6 +281,14 @@
return this.field_198041_f; return this.field_198041_f;
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/audio/SoundEngine.java --- a/net/minecraft/client/audio/SoundEngine.java
+++ b/net/minecraft/client/audio/SoundEngine.java +++ b/net/minecraft/client/audio/SoundEngine.java
@@ -55,6 +55,7 @@ @@ -56,6 +56,7 @@
this.field_148622_c = p_i50892_1_; this.field_148622_c = p_i50892_1_;
this.field_148619_d = p_i50892_2_; this.field_148619_d = p_i50892_2_;
this.field_217939_i = new AudioStreamManager(p_i50892_3_); this.field_217939_i = new AudioStreamManager(p_i50892_3_);
@ -8,7 +8,7 @@
} }
public void func_148596_a() { public void func_148596_a() {
@@ -70,6 +71,7 @@ @@ -71,6 +72,7 @@
this.func_148613_b(); this.func_148613_b();
this.func_148608_i(); this.func_148608_i();
@ -16,21 +16,22 @@
} }
private synchronized void func_148608_i() { private synchronized void func_148608_i() {
@@ -251,6 +253,8 @@ @@ -266,7 +268,8 @@
public void func_148611_c(ISound p_148611_1_) { public void func_148611_c(ISound p_148611_1_) {
if (this.field_148617_f) { if (this.field_148617_f) {
- if (p_148611_1_.func_230510_t_()) {
+ p_148611_1_ = net.minecraftforge.client.ForgeHooksClient.playSound(this, p_148611_1_); + p_148611_1_ = net.minecraftforge.client.ForgeHooksClient.playSound(this, p_148611_1_);
+ if (p_148611_1_ == null) return; + if (p_148611_1_ != null && p_148611_1_.func_230510_t_()) {
SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c); SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c);
ResourceLocation resourcelocation = p_148611_1_.func_147650_b(); ResourceLocation resourcelocation = p_148611_1_.func_147650_b();
if (soundeventaccessor == null) { if (soundeventaccessor == null) {
@@ -305,11 +309,13 @@ @@ -331,11 +334,13 @@
p_217930_7_.func_216420_a(vec3d); p_239543_8_.func_216420_a(vector3d);
p_217930_7_.func_216432_b(flag); p_239543_8_.func_216432_b(flag);
}); });
+ final ISound isound = p_148611_1_; + final ISound isound = p_148611_1_;
if (!sound.func_188723_h()) { if (!flag3) {
this.field_217939_i.func_217909_a(sound.func_188721_b()).thenAccept((p_217934_1_) -> { this.field_217939_i.func_217909_a(sound.func_188721_b()).thenAccept((p_217934_1_) -> {
channelmanager$entry.func_217888_a((p_217925_1_) -> { channelmanager$entry.func_217888_a((p_217925_1_) -> {
p_217925_1_.func_216429_a(p_217934_1_); p_217925_1_.func_216429_a(p_217934_1_);
@ -39,7 +40,7 @@
}); });
}); });
} else { } else {
@@ -317,6 +323,7 @@ @@ -343,6 +348,7 @@
channelmanager$entry.func_217888_a((p_217935_1_) -> { channelmanager$entry.func_217888_a((p_217935_1_) -> {
p_217935_1_.func_216433_a(p_217928_1_); p_217935_1_.func_216433_a(p_217928_1_);
p_217935_1_.func_216438_c(); p_217935_1_.func_216438_c();

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/audio/SoundHandler.java --- a/net/minecraft/client/audio/SoundHandler.java
+++ b/net/minecraft/client/audio/SoundHandler.java +++ b/net/minecraft/client/audio/SoundHandler.java
@@ -214,6 +214,11 @@ @@ -192,6 +192,11 @@
this.field_147694_f.func_195855_a(p_195478_1_, p_195478_2_); this.field_147694_f.func_195855_a(p_195478_1_, p_195478_2_);
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java --- a/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
+++ b/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java +++ b/net/minecraft/client/entity/player/AbstractClientPlayerEntity.java
@@ -115,7 +115,7 @@ @@ -113,7 +113,7 @@
f = 1.0F; f = 1.0F;
} }
@ -9,7 +9,7 @@
int i = this.func_184612_cw(); int i = this.func_184612_cw();
float f1 = (float)i / 20.0F; float f1 = (float)i / 20.0F;
if (f1 > 1.0F) { if (f1 > 1.0F) {
@@ -127,6 +127,6 @@ @@ -125,6 +125,6 @@
f *= 1.0F - f1 * 0.15F; f *= 1.0F - f1 * 0.15F;
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/entity/player/ClientPlayerEntity.java --- a/net/minecraft/client/entity/player/ClientPlayerEntity.java
+++ b/net/minecraft/client/entity/player/ClientPlayerEntity.java +++ b/net/minecraft/client/entity/player/ClientPlayerEntity.java
@@ -134,6 +134,7 @@ @@ -133,6 +133,7 @@
} }
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {
@ -8,7 +8,7 @@
return false; return false;
} }
@@ -458,6 +459,11 @@ @@ -479,6 +480,11 @@
} }
public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) { public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_) {
@ -20,15 +20,15 @@
this.field_70170_p.func_184134_a(this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false); this.field_70170_p.func_184134_a(this.func_226277_ct_(), this.func_226278_cu_(), this.func_226281_cx_(), p_184185_1_, this.func_184176_by(), p_184185_2_, p_184185_3_, false);
} }
@@ -599,6 +605,7 @@ @@ -617,6 +623,7 @@
boolean flag1 = this.field_71158_b.field_228350_h_;
boolean flag2 = this.func_223110_ee(); boolean flag2 = this.func_223110_ee();
this.field_239203_ch_ = !this.field_71075_bZ.field_75100_b && !this.func_203007_ba() && this.func_213298_c(Pose.CROUCHING) && (this.func_225608_bj_() || !this.func_70608_bn() && !this.func_213298_c(Pose.STANDING));
this.field_71158_b.func_225607_a_(this.func_228354_I_()); this.field_71158_b.func_225607_a_(this.func_228354_I_());
+ net.minecraftforge.client.ForgeHooksClient.onInputUpdate(this, this.field_71158_b); + net.minecraftforge.client.ForgeHooksClient.onInputUpdate(this, this.field_71158_b);
this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b); this.field_71159_c.func_193032_ao().func_193293_a(this.field_71158_b);
if (this.func_184587_cr() && !this.func_184218_aH()) { if (this.func_184587_cr() && !this.func_184218_aH()) {
this.field_71158_b.field_78902_a *= 0.2F; this.field_71158_b.field_78902_a *= 0.2F;
@@ -613,11 +620,12 @@ @@ -631,11 +638,12 @@
this.field_71158_b.field_78901_c = true; this.field_71158_b.field_78901_c = true;
} }
@ -45,8 +45,8 @@
+ this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D); + this.func_213282_i(this.func_226277_ct_() + (double)this.func_213311_cf() * 0.35D, event.getMinY(), this.func_226281_cx_() + (double)this.func_213311_cf() * 0.35D);
} }
boolean flag4 = (float)this.func_71024_bL().func_75116_a() > 6.0F || this.field_71075_bZ.field_75101_c; if (flag1) {
@@ -961,4 +969,16 @@ @@ -985,4 +993,16 @@
return this.field_204230_bP; return this.field_204230_bP;
} }
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/entity/player/RemoteClientPlayerEntity.java --- a/net/minecraft/client/entity/player/RemoteClientPlayerEntity.java
+++ b/net/minecraft/client/entity/player/RemoteClientPlayerEntity.java +++ b/net/minecraft/client/entity/player/RemoteClientPlayerEntity.java
@@ -28,6 +28,7 @@ @@ -29,6 +29,7 @@
} }
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) { public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) {

View file

@ -1,28 +1,33 @@
--- a/net/minecraft/client/gui/DisplayEffectsScreen.java --- a/net/minecraft/client/gui/DisplayEffectsScreen.java
+++ b/net/minecraft/client/gui/DisplayEffectsScreen.java +++ b/net/minecraft/client/gui/DisplayEffectsScreen.java
@@ -34,6 +34,7 @@ @@ -35,6 +35,9 @@
this.field_147003_i = (this.width - this.field_146999_f) / 2; this.field_147003_i = (this.field_230708_k_ - this.field_146999_f) / 2;
this.field_147045_u = false; this.field_147045_u = false;
} else { } else {
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.PotionShiftEvent(this))) this.field_147003_i = (this.width - this.field_146999_f) / 2; else + if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.PotionShiftEvent(this)))
this.field_147003_i = 160 + (this.width - this.field_146999_f - 200) / 2; + this.field_147003_i = (this.field_230708_k_ - this.field_146999_f) / 2;
+ else
this.field_147003_i = 160 + (this.field_230708_k_ - this.field_146999_f - 200) / 2;
this.field_147045_u = true; this.field_147045_u = true;
} }
@@ -58,7 +59,7 @@ @@ -59,7 +62,7 @@
j = 132 / (collection.size() - 1); j = 132 / (collection.size() - 1);
} }
- Iterable<EffectInstance> iterable = Ordering.<EffectInstance>natural().sortedCopy(collection); - Iterable<EffectInstance> iterable = Ordering.natural().sortedCopy(collection);
+ Iterable<EffectInstance> iterable = collection.stream().filter(effectInstance -> effectInstance.shouldRender()).sorted().collect(java.util.stream.Collectors.toList()); + Iterable<EffectInstance> iterable = collection.stream().filter(effectInstance -> effectInstance.shouldRender()).sorted().collect(java.util.stream.Collectors.toList());
this.func_214079_a(i, j, iterable); this.func_238810_a_(p_238811_1_, i, j, iterable);
this.func_214077_b(i, j, iterable); this.func_238812_b_(p_238811_1_, i, j, iterable);
this.func_214078_c(i, j, iterable); this.func_238813_c_(p_238811_1_, i, j, iterable);
@@ -95,6 +96,8 @@ @@ -96,6 +99,11 @@
int i = this.field_147009_r; int i = this.field_147009_r;
for(EffectInstance effectinstance : p_214078_3_) { for(EffectInstance effectinstance : p_238813_4_) {
+ effectinstance.renderInventoryEffect(this, p_214078_1_, i, this.getBlitOffset()); + effectinstance.renderInventoryEffect(this, p_238813_1_, p_238813_2_, i, this.func_230927_p_());
+ if (!effectinstance.shouldRenderInvText()) { i += p_214078_2_; continue; } + if (!effectinstance.shouldRenderInvText()) {
+ i += p_238813_3_;
+ continue;
+ }
String s = I18n.func_135052_a(effectinstance.func_188419_a().func_76393_a()); String s = I18n.func_135052_a(effectinstance.func_188419_a().func_76393_a());
if (effectinstance.func_76458_c() >= 1 && effectinstance.func_76458_c() <= 9) { if (effectinstance.func_76458_c() >= 1 && effectinstance.func_76458_c() <= 9) {
s = s + ' ' + I18n.func_135052_a("enchantment.level." + (effectinstance.func_76458_c() + 1)); s = s + ' ' + I18n.func_135052_a("enchantment.level." + (effectinstance.func_76458_c() + 1));

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/IngameGui.java --- a/net/minecraft/client/gui/IngameGui.java
+++ b/net/minecraft/client/gui/IngameGui.java +++ b/net/minecraft/client/gui/IngameGui.java
@@ -406,6 +406,9 @@ @@ -416,6 +416,9 @@
for(EffectInstance effectinstance : Ordering.natural().reverse().sortedCopy(collection)) { for(EffectInstance effectinstance : Ordering.natural().reverse().sortedCopy(collection)) {
Effect effect = effectinstance.func_188419_a(); Effect effect = effectinstance.func_188419_a();
@ -10,42 +10,45 @@
if (effectinstance.func_205348_f()) { if (effectinstance.func_205348_f()) {
int k = this.field_194811_H; int k = this.field_194811_H;
int l = 1; int l = 1;
@@ -443,6 +446,7 @@ @@ -453,6 +456,7 @@
RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1); RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
blit(j1 + 3, k1 + 3, this.getBlitOffset(), 18, 18, textureatlassprite); func_238470_a_(p_238444_1_, j1 + 3, k1 + 3, this.func_230927_p_(), 18, 18, textureatlassprite);
}); });
+ effectinstance.renderHUDEffect(this, k, l, this.getBlitOffset(), f); + effectinstance.renderHUDEffect(this, p_238444_1_, k, l, this.func_230927_p_(), f);
} }
} }
@@ -568,6 +572,7 @@ @@ -577,7 +581,8 @@
iformattabletextcomponent.func_240699_a_(TextFormatting.ITALIC);
} }
String s = itextcomponent.func_150254_d(); - int i = this.func_175179_f().func_238414_a_(iformattabletextcomponent);
+ s = this.field_92016_l.getHighlightTip(s); + ITextComponent highlightTip = this.field_92016_l.getHighlightTip(iformattabletextcomponent);
int i = (this.field_194811_H - this.func_175179_f().func_78256_a(s)) / 2; + int i = this.func_175179_f().func_238414_a_(highlightTip);
int j = this.field_194812_I - 59; int j = (this.field_194811_H - i) / 2;
int k = this.field_194812_I - 59;
if (!this.field_73839_d.field_71442_b.func_78755_b()) { if (!this.field_73839_d.field_71442_b.func_78755_b()) {
@@ -584,7 +589,13 @@ @@ -594,7 +599,13 @@
RenderSystem.enableBlend(); RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc(); RenderSystem.defaultBlendFunc();
fill(i - 2, j - 2, i + this.func_175179_f().func_78256_a(s) + 2, j + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0)); func_238467_a_(p_238453_1_, j - 2, k - 2, j + i + 2, k + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0));
- this.func_175179_f().func_238407_a_(p_238453_1_, iformattabletextcomponent, (float)j, (float)k, 16777215 + (l << 24));
+ FontRenderer font = field_92016_l.func_77973_b().getFontRenderer(field_92016_l); + FontRenderer font = field_92016_l.func_77973_b().getFontRenderer(field_92016_l);
+ if (font == null) { + if (font == null) {
this.func_175179_f().func_175063_a(s, (float)i, (float)j, 16777215 + (k << 24)); + this.func_175179_f().func_238407_a_(p_238453_1_, highlightTip, (float)j, (float)k, 16777215 + (l << 24));
+ } else { + } else {
+ i = (this.field_194811_H - font.func_78256_a(s)) / 2; + j = (this.field_194811_H - font.func_238414_a_(highlightTip)) / 2;
+ font.func_175063_a(s, (float)i, (float)j, 16777215 + (k << 24)); + font.func_238407_a_(p_238453_1_, highlightTip, (float)j, (float)k, 16777215 + (l << 24));
+ } + }
RenderSystem.disableBlend(); RenderSystem.disableBlend();
RenderSystem.popMatrix(); RenderSystem.popMatrix();
} }
@@ -1045,7 +1056,7 @@ @@ -1057,7 +1068,7 @@
ItemStack itemstack = this.field_73839_d.field_71439_g.field_71071_by.func_70448_g(); ItemStack itemstack = this.field_73839_d.field_71439_g.field_71071_by.func_70448_g();
if (itemstack.func_190926_b()) { if (itemstack.func_190926_b()) {
this.field_92017_k = 0; this.field_92017_k = 0;
- } else if (!this.field_92016_l.func_190926_b() && itemstack.func_77973_b() == this.field_92016_l.func_77973_b() && itemstack.func_200301_q().equals(this.field_92016_l.func_200301_q())) { - } else if (!this.field_92016_l.func_190926_b() && itemstack.func_77973_b() == this.field_92016_l.func_77973_b() && itemstack.func_200301_q().equals(this.field_92016_l.func_200301_q())) {
+ } else if (!this.field_92016_l.func_190926_b() && itemstack.func_77973_b() == this.field_92016_l.func_77973_b() && (itemstack.func_200301_q().equals(this.field_92016_l.func_200301_q()) && itemstack.getHighlightTip(itemstack.func_200301_q().func_150261_e()).equals(field_92016_l.getHighlightTip(field_92016_l.func_200301_q().func_150261_e())))) { + } else if (!this.field_92016_l.func_190926_b() && itemstack.func_77973_b() == this.field_92016_l.func_77973_b() && (itemstack.func_200301_q().equals(this.field_92016_l.func_200301_q()) && itemstack.getHighlightTip(itemstack.func_200301_q()).equals(field_92016_l.getHighlightTip(field_92016_l.func_200301_q())))) {
if (this.field_92017_k > 0) { if (this.field_92017_k > 0) {
--this.field_92017_k; --this.field_92017_k;
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/MapItemRenderer.java --- a/net/minecraft/client/gui/MapItemRenderer.java
+++ b/net/minecraft/client/gui/MapItemRenderer.java +++ b/net/minecraft/client/gui/MapItemRenderer.java
@@ -114,6 +114,7 @@ @@ -115,6 +115,7 @@
for(MapDecoration mapdecoration : this.field_148242_b.field_76203_h.values()) { for(MapDecoration mapdecoration : this.field_148242_b.field_76203_h.values()) {
if (!p_228089_3_ || mapdecoration.func_191180_f()) { if (!p_228089_3_ || mapdecoration.func_191180_f()) {

View file

@ -1,14 +1,14 @@
--- a/net/minecraft/client/gui/ResourceLoadProgressGui.java --- a/net/minecraft/client/gui/ResourceLoadProgressGui.java
+++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java +++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java
@@ -81,6 +81,7 @@ @@ -97,6 +97,7 @@
this.blit(k1, i1, 0, 0, 256, 256); int l1 = (int)((double)this.field_212974_b.func_228018_at_().func_198087_p() * 0.8325D);
float f3 = this.field_212975_c.func_219555_b(); float f3 = this.field_212975_c.func_219555_b();
this.field_212978_f = MathHelper.func_76131_a(this.field_212978_f * 0.95F + f3 * 0.050000012F, 0.0F, 1.0F); this.field_212978_f = MathHelper.func_76131_a(this.field_212978_f * 0.95F + f3 * 0.050000012F, 0.0F, 1.0F);
+ net.minecraftforge.fml.client.ClientModLoader.renderProgressText(); + net.minecraftforge.fml.client.ClientModLoader.renderProgressText();
if (f < 1.0F) { if (f < 1.0F) {
this.func_228181_a_(i / 2 - 150, j / 4 * 3, i / 2 + 150, j / 4 * 3 + 10, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F)); this.func_238629_a_(p_230430_1_, i / 2 - k1, l1 - 5, i / 2 + k1, l1 + 5, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F));
} }
@@ -90,6 +91,7 @@ @@ -106,6 +107,7 @@
} }
if (this.field_212979_g == -1L && this.field_212975_c.func_219554_d() && (!this.field_212977_e || f1 >= 2.0F)) { if (this.field_212979_g == -1L && this.field_212975_c.func_219554_d() && (!this.field_212977_e || f1 >= 2.0F)) {
@ -16,11 +16,11 @@
try { try {
this.field_212975_c.func_219556_e(); this.field_212975_c.func_219556_e();
this.field_212976_d.accept(Optional.empty()); this.field_212976_d.accept(Optional.empty());
@@ -97,7 +99,6 @@ @@ -113,7 +115,6 @@
this.field_212976_d.accept(Optional.of(throwable)); this.field_212976_d.accept(Optional.of(throwable));
} }
- this.field_212979_g = Util.func_211177_b(); - this.field_212979_g = Util.func_211177_b();
if (this.field_212974_b.field_71462_r != null) { if (this.field_212974_b.field_71462_r != null) {
this.field_212974_b.field_71462_r.init(this.field_212974_b, this.field_212974_b.func_228018_at_().func_198107_o(), this.field_212974_b.func_228018_at_().func_198087_p()); this.field_212974_b.field_71462_r.func_231158_b_(this.field_212974_b, this.field_212974_b.func_228018_at_().func_198107_o(), this.field_212974_b.func_228018_at_().func_198087_p());
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/ScreenManager.java --- a/net/minecraft/client/gui/ScreenManager.java
+++ b/net/minecraft/client/gui/ScreenManager.java +++ b/net/minecraft/client/gui/ScreenManager.java
@@ -39,6 +39,10 @@ @@ -40,6 +40,10 @@
private static final Map<ContainerType<?>, ScreenManager.IScreenFactory<?, ?>> field_216914_b = Maps.newHashMap(); private static final Map<ContainerType<?>, ScreenManager.IScreenFactory<?, ?>> field_216914_b = Maps.newHashMap();
public static <T extends Container> void func_216909_a(@Nullable ContainerType<T> p_216909_0_, Minecraft p_216909_1_, int p_216909_2_, ITextComponent p_216909_3_) { public static <T extends Container> void func_216909_a(@Nullable ContainerType<T> p_216909_0_, Minecraft p_216909_1_, int p_216909_2_, ITextComponent p_216909_3_) {
@ -11,7 +11,7 @@
if (p_216909_0_ == null) { if (p_216909_0_ == null) {
field_216913_a.warn("Trying to open invalid screen with name: {}", (Object)p_216909_3_.getString()); field_216913_a.warn("Trying to open invalid screen with name: {}", (Object)p_216909_3_.getString());
} else { } else {
@@ -46,9 +50,10 @@ @@ -47,9 +51,10 @@
if (iscreenfactory == null) { if (iscreenfactory == null) {
field_216913_a.warn("Failed to create screen for menu type: {}", (Object)Registry.field_218366_G.func_177774_c(p_216909_0_)); field_216913_a.warn("Failed to create screen for menu type: {}", (Object)Registry.field_218366_G.func_177774_c(p_216909_0_));
} else { } else {

View file

@ -1,38 +0,0 @@
--- a/net/minecraft/client/gui/SlotGui.java
+++ b/net/minecraft/client/gui/SlotGui.java
@@ -153,15 +153,8 @@
this.capYPosition();
Tessellator tessellator = Tessellator.func_178181_a();
BufferBuilder bufferbuilder = tessellator.func_178180_c();
- this.minecraft.func_110434_K().func_110577_a(AbstractGui.BACKGROUND_LOCATION);
- RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
- float f = 32.0F;
- bufferbuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i);
- bufferbuilder.func_225582_a_((double)this.x0, (double)this.y1, 0.0D).func_225583_a_((float)this.x0 / 32.0F, (float)(this.y1 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
- bufferbuilder.func_225582_a_((double)this.x1, (double)this.y1, 0.0D).func_225583_a_((float)this.x1 / 32.0F, (float)(this.y1 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
- bufferbuilder.func_225582_a_((double)this.x1, (double)this.y0, 0.0D).func_225583_a_((float)this.x1 / 32.0F, (float)(this.y0 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
- bufferbuilder.func_225582_a_((double)this.x0, (double)this.y0, 0.0D).func_225583_a_((float)this.x0 / 32.0F, (float)(this.y0 + (int)this.yo) / 32.0F).func_225586_a_(32, 32, 32, 255).func_181675_d();
- tessellator.func_78381_a();
+ // Forge: background rendering moved into separate method.
+ this.drawContainerBackground(tessellator);
int k = this.x0 + this.width / 2 - this.getRowWidth() / 2 + 2;
int l = this.y0 + 4 - (int)this.yo;
if (this.renderHeader) {
@@ -401,4 +394,17 @@
public int getItemHeight() {
return this.itemHeight;
}
+
+ protected void drawContainerBackground(Tessellator tessellator) {
+ BufferBuilder buffer = tessellator.func_178180_c();
+ this.minecraft.func_110434_K().func_110577_a(AbstractGui.BACKGROUND_LOCATION);
+ RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
+ float scale = 32.0F;
+ buffer.func_181668_a(7, DefaultVertexFormats.field_181709_i);
+ buffer.func_225582_a_((double)this.x0, (double)this.y1, 0.0D).func_225583_a_(this.x0 / scale, (this.y1 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
+ buffer.func_225582_a_((double)this.x1, (double)this.y1, 0.0D).func_225583_a_(this.x1 / scale, (this.y1 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
+ buffer.func_225582_a_((double)this.x1, (double)this.y0, 0.0D).func_225583_a_(this.x1 / scale, (this.y0 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
+ buffer.func_225582_a_((double)this.x0, (double)this.y0, 0.0D).func_225583_a_(this.x0 / scale, (this.y0 + (int)this.yo) / scale).func_225586_a_(32, 32, 32, 255).func_181675_d();
+ tessellator.func_78381_a();
+ }
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/advancements/AdvancementTabGui.java --- a/net/minecraft/client/gui/advancements/AdvancementTabGui.java
+++ b/net/minecraft/client/gui/advancements/AdvancementTabGui.java +++ b/net/minecraft/client/gui/advancements/AdvancementTabGui.java
@@ -36,6 +36,7 @@ @@ -38,6 +38,7 @@
private int field_191814_q = Integer.MIN_VALUE; private int field_191814_q = Integer.MIN_VALUE;
private float field_191815_r; private float field_191815_r;
private boolean field_192992_s; private boolean field_192992_s;
@ -8,7 +8,7 @@
public AdvancementTabGui(Minecraft p_i47589_1_, AdvancementsScreen p_i47589_2_, AdvancementTabType p_i47589_3_, int p_i47589_4_, Advancement p_i47589_5_, DisplayInfo p_i47589_6_) { public AdvancementTabGui(Minecraft p_i47589_1_, AdvancementsScreen p_i47589_2_, AdvancementTabType p_i47589_3_, int p_i47589_4_, Advancement p_i47589_5_, DisplayInfo p_i47589_6_) {
this.field_191802_a = p_i47589_1_; this.field_191802_a = p_i47589_1_;
@@ -50,6 +51,15 @@ @@ -52,6 +53,15 @@
this.func_193937_a(this.field_191809_l, p_i47589_5_); this.func_193937_a(this.field_191809_l, p_i47589_5_);
} }
@ -24,7 +24,7 @@
public Advancement func_193935_c() { public Advancement func_193935_c() {
return this.field_191805_h; return this.field_191805_h;
} }
@@ -150,8 +160,8 @@ @@ -152,8 +162,8 @@
return null; return null;
} else { } else {
for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) { for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/advancements/AdvancementsScreen.java --- a/net/minecraft/client/gui/advancements/AdvancementsScreen.java
+++ b/net/minecraft/client/gui/advancements/AdvancementsScreen.java +++ b/net/minecraft/client/gui/advancements/AdvancementsScreen.java
@@ -24,6 +24,7 @@ @@ -25,6 +25,7 @@
private final Map<Advancement, AdvancementTabGui> field_191947_i = Maps.newLinkedHashMap(); private final Map<Advancement, AdvancementTabGui> field_191947_i = Maps.newLinkedHashMap();
private AdvancementTabGui field_191940_s; private AdvancementTabGui field_191940_s;
private boolean field_191944_v; private boolean field_191944_v;
@ -8,65 +8,65 @@
public AdvancementsScreen(ClientAdvancementManager p_i47383_1_) { public AdvancementsScreen(ClientAdvancementManager p_i47383_1_) {
super(NarratorChatListener.field_216868_a); super(NarratorChatListener.field_216868_a);
@@ -39,7 +40,13 @@ @@ -40,7 +41,13 @@
} else { } else {
this.field_191946_h.func_194230_a(this.field_191940_s == null ? null : this.field_191940_s.func_193935_c(), true); this.field_191946_h.func_194230_a(this.field_191940_s == null ? null : this.field_191940_s.func_193935_c(), true);
} }
- -
+ if (this.field_191947_i.size() > AdvancementTabType.MAX_TABS) { + if (this.field_191947_i.size() > AdvancementTabType.MAX_TABS) {
+ int guiLeft = (this.width - 252) / 2; + int guiLeft = (this.field_230708_k_ - 252) / 2;
+ int guiTop = (this.height - 140) / 2; + int guiTop = (this.field_230709_l_ - 140) / 2;
+ addButton(new net.minecraft.client.gui.widget.button.Button(guiLeft, guiTop - 50, 20, 20, "<", b -> tabPage = Math.max(tabPage - 1, 0 ))); + func_230480_a_(new net.minecraft.client.gui.widget.button.Button(guiLeft, guiTop - 50, 20, 20, new net.minecraft.util.text.StringTextComponent("<"), b -> tabPage = Math.max(tabPage - 1, 0 )));
+ addButton(new net.minecraft.client.gui.widget.button.Button(guiLeft + 252 - 20, guiTop - 50, 20, 20, ">", b -> tabPage = Math.min(tabPage + 1, maxPages))); + func_230480_a_(new net.minecraft.client.gui.widget.button.Button(guiLeft + 252 - 20, guiTop - 50, 20, 20, new net.minecraft.util.text.StringTextComponent(">"), b -> tabPage = Math.min(tabPage + 1, maxPages)));
+ maxPages = this.field_191947_i.size() / AdvancementTabType.MAX_TABS; + maxPages = this.field_191947_i.size() / AdvancementTabType.MAX_TABS;
+ } + }
} }
public void removed() { public void func_231164_f_() {
@@ -57,7 +64,7 @@ @@ -58,7 +65,7 @@
int j = (this.height - 140) / 2; int j = (this.field_230709_l_ - 140) / 2;
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) { for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
- if (advancementtabgui.func_195627_a(i, j, p_mouseClicked_1_, p_mouseClicked_3_)) { - if (advancementtabgui.func_195627_a(i, j, p_231044_1_, p_231044_3_)) {
+ if (advancementtabgui.getPage() == tabPage && advancementtabgui.func_195627_a(i, j, p_mouseClicked_1_, p_mouseClicked_3_)) { + if (advancementtabgui.getPage() == tabPage && advancementtabgui.func_195627_a(i, j, p_231044_1_, p_231044_3_)) {
this.field_191946_h.func_194230_a(advancementtabgui.func_193935_c(), true); this.field_191946_h.func_194230_a(advancementtabgui.func_193935_c(), true);
break; break;
} }
@@ -82,6 +89,12 @@ @@ -82,6 +89,12 @@
int j = (this.height - 140) / 2; int i = (this.field_230708_k_ - 252) / 2;
this.renderBackground(); int j = (this.field_230709_l_ - 140) / 2;
this.func_191936_c(p_render_1_, p_render_2_, i, j); this.func_230446_a_(p_230430_1_);
+ if (maxPages != 0) { + if (maxPages != 0) {
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1); + net.minecraft.util.text.ITextComponent page = new net.minecraft.util.text.StringTextComponent(String.format("%d / %d", tabPage + 1, maxPages + 1));
+ int width = this.font.func_78256_a(page); + int width = this.field_230712_o_.func_238414_a_(page);
+ RenderSystem.disableLighting(); + RenderSystem.disableLighting();
+ this.font.func_175063_a(page, i + (252 / 2) - (width / 2), j - 44, -1); + this.field_230712_o_.func_238407_a_(p_230430_1_, page, i + (252 / 2) - (width / 2), j - 44, -1);
+ } + }
this.func_191934_b(i, j); this.func_238696_c_(p_230430_1_, p_230430_2_, p_230430_3_, i, j);
this.func_191937_d(p_render_1_, p_render_2_, i, j); this.func_238695_a_(p_230430_1_, i, j);
} this.func_238697_d_(p_230430_1_, p_230430_2_, p_230430_3_, i, j);
@@ -128,6 +141,7 @@ @@ -129,6 +142,7 @@
this.minecraft.func_110434_K().func_110577_a(field_191945_g); this.field_230706_i_.func_110434_K().func_110577_a(field_191945_g);
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) { for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
+ if (advancementtabgui.getPage() == tabPage) + if (advancementtabgui.getPage() == tabPage)
advancementtabgui.func_191798_a(p_191934_1_, p_191934_2_, advancementtabgui == this.field_191940_s); advancementtabgui.func_238683_a_(p_238695_1_, p_238695_2_, p_238695_3_, advancementtabgui == this.field_191940_s);
} }
@@ -135,6 +149,7 @@ @@ -136,6 +150,7 @@
RenderSystem.defaultBlendFunc(); RenderSystem.defaultBlendFunc();
for(AdvancementTabGui advancementtabgui1 : this.field_191947_i.values()) { for(AdvancementTabGui advancementtabgui1 : this.field_191947_i.values()) {
+ if (advancementtabgui1.getPage() == tabPage) + if (advancementtabgui1.getPage() == tabPage)
advancementtabgui1.func_191796_a(p_191934_1_, p_191934_2_, this.itemRenderer); advancementtabgui1.func_191796_a(p_238695_2_, p_238695_3_, this.field_230707_j_);
} }
@@ -157,7 +172,7 @@ @@ -158,7 +173,7 @@
if (this.field_191947_i.size() > 1) { if (this.field_191947_i.size() > 1) {
for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) { for(AdvancementTabGui advancementtabgui : this.field_191947_i.values()) {
- if (advancementtabgui.func_195627_a(p_191937_3_, p_191937_4_, (double)p_191937_1_, (double)p_191937_2_)) { - if (advancementtabgui.func_195627_a(p_238697_4_, p_238697_5_, (double)p_238697_2_, (double)p_238697_3_)) {
+ if (advancementtabgui.getPage() == tabPage && advancementtabgui.func_195627_a(p_191937_3_, p_191937_4_, (double)p_191937_1_, (double)p_191937_2_)) { + if (advancementtabgui.getPage() == tabPage && advancementtabgui.func_195627_a(p_238697_4_, p_238697_5_, (double)p_238697_2_, (double)p_238697_3_)) {
this.renderTooltip(advancementtabgui.func_191795_d(), p_191937_1_, p_191937_2_); this.func_238652_a_(p_238697_1_, advancementtabgui.func_238685_d_(), p_238697_2_, p_238697_3_);
} }
} }

View file

@ -1,23 +1,23 @@
--- a/net/minecraft/client/gui/overlay/BossOverlayGui.java --- a/net/minecraft/client/gui/overlay/BossOverlayGui.java
+++ b/net/minecraft/client/gui/overlay/BossOverlayGui.java +++ b/net/minecraft/client/gui/overlay/BossOverlayGui.java
@@ -30,6 +30,9 @@ @@ -32,6 +32,9 @@
for(ClientBossInfo clientbossinfo : this.field_184060_g.values()) { for(ClientBossInfo clientbossinfo : this.field_184060_g.values()) {
int k = i / 2 - 91; int k = i / 2 - 91;
+ net.minecraftforge.client.event.RenderGameOverlayEvent.BossInfo event = + net.minecraftforge.client.event.RenderGameOverlayEvent.BossInfo event =
+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPre(this.field_184059_f.func_228018_at_(), clientbossinfo, k, j, 10 + this.field_184059_f.field_71466_p.field_78288_b); + net.minecraftforge.client.ForgeHooksClient.bossBarRenderPre(p_238484_1_, this.field_184059_f.func_228018_at_(), clientbossinfo, k, j, 10 + this.field_184059_f.field_71466_p.field_78288_b);
+ if (!event.isCanceled()) { + if (!event.isCanceled()) {
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.field_184059_f.func_110434_K().func_110577_a(field_184058_a); this.field_184059_f.func_110434_K().func_110577_a(field_184058_a);
this.func_184052_a(k, j, clientbossinfo); this.func_238485_a_(p_238484_1_, k, j, clientbossinfo);
@@ -38,7 +41,9 @@ @@ -40,7 +43,9 @@
int i1 = i / 2 - l / 2; int i1 = i / 2 - l / 2;
int j1 = j - 9; int j1 = j - 9;
this.field_184059_f.field_71466_p.func_175063_a(s, (float)i1, (float)j1, 16777215); this.field_184059_f.field_71466_p.func_238407_a_(p_238484_1_, itextcomponent, (float)i1, (float)j1, 16777215);
- j += 10 + 9; - j += 10 + 9;
+ } + }
+ j += event.getIncrement(); + j += event.getIncrement();
+ net.minecraftforge.client.ForgeHooksClient.bossBarRenderPost(this.field_184059_f.func_228018_at_()); + net.minecraftforge.client.ForgeHooksClient.bossBarRenderPost(p_238484_1_, this.field_184059_f.func_228018_at_());
if (j >= this.field_184059_f.func_228018_at_().func_198087_p() / 3) { if (j >= this.field_184059_f.func_228018_at_().func_198087_p() / 3) {
break; break;
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/overlay/DebugOverlayGui.java --- a/net/minecraft/client/gui/overlay/DebugOverlayGui.java
+++ b/net/minecraft/client/gui/overlay/DebugOverlayGui.java +++ b/net/minecraft/client/gui/overlay/DebugOverlayGui.java
@@ -357,7 +357,7 @@ @@ -362,7 +362,7 @@
list.add(this.func_211534_a(entry)); list.add(this.func_211534_a(entry));
} }
@ -9,16 +9,16 @@
list.add("#" + resourcelocation); list.add("#" + resourcelocation);
} }
} }
@@ -373,7 +373,7 @@ @@ -378,7 +378,7 @@
list.add(this.func_211534_a(entry1)); list.add(this.func_211534_a(entry1));
} }
- for(ResourceLocation resourcelocation1 : this.field_175242_a.func_147114_u().func_199724_l().func_205704_c().func_199913_a(ifluidstate.func_206886_c())) { - for(ResourceLocation resourcelocation1 : this.field_175242_a.func_147114_u().func_199724_l().func_205704_c().func_199913_a(fluidstate.func_206886_c())) {
+ for(ResourceLocation resourcelocation1 : ifluidstate.func_206886_c().getTags()) { + for(ResourceLocation resourcelocation1 : fluidstate.func_206886_c().getTags()) {
list.add("#" + resourcelocation1); list.add("#" + resourcelocation1);
} }
} }
@@ -383,6 +383,7 @@ @@ -388,6 +388,7 @@
list.add(""); list.add("");
list.add(TextFormatting.UNDERLINE + "Targeted Entity"); list.add(TextFormatting.UNDERLINE + "Targeted Entity");
list.add(String.valueOf((Object)Registry.field_212629_r.func_177774_c(entity.func_200600_R()))); list.add(String.valueOf((Object)Registry.field_212629_r.func_177774_c(entity.func_200600_R())));

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java --- a/net/minecraft/client/gui/recipebook/RecipeBookGui.java
+++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java +++ b/net/minecraft/client/gui/recipebook/RecipeBookGui.java
@@ -88,7 +88,7 @@ @@ -92,7 +92,7 @@
this.func_205702_a(); this.func_205702_a();
this.field_193018_j.clear(); this.field_193018_j.clear();
@ -9,12 +9,12 @@
this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories)); this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories));
} }
@@ -417,7 +417,7 @@ @@ -425,7 +425,7 @@
languagemanager.func_135045_a(language); languagemanager.func_135045_a(language);
this.field_191888_F.field_71474_y.field_74363_ab = language.getCode(); this.field_191888_F.field_71474_y.field_74363_ab = language.getCode();
- this.field_191888_F.func_213237_g(); - this.field_191888_F.func_213237_g();
+ net.minecraftforge.client.ForgeHooksClient.refreshResources(this.field_191888_F, net.minecraftforge.resource.VanillaResourceType.LANGUAGES); + net.minecraftforge.client.ForgeHooksClient.refreshResources(this.field_191888_F, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);
this.field_191888_F.field_71466_p.func_78275_b(languagemanager.func_135044_b());
this.field_191888_F.field_71474_y.func_74303_b(); this.field_191888_F.field_71474_y.func_74303_b();
} }

View file

@ -1,23 +1,23 @@
--- a/net/minecraft/client/gui/screen/ControlsScreen.java --- a/net/minecraft/client/gui/screen/ControlsScreen.java
+++ b/net/minecraft/client/gui/screen/ControlsScreen.java +++ b/net/minecraft/client/gui/screen/ControlsScreen.java
@@ -32,7 +32,7 @@ @@ -33,7 +33,7 @@
this.children.add(this.field_146494_r); this.field_230705_e_.add(this.field_146494_r);
this.field_146493_s = this.addButton(new Button(this.width / 2 - 155, this.height - 29, 150, 20, I18n.func_135052_a("controls.resetAll"), (p_213125_1_) -> { this.field_146493_s = this.func_230480_a_(new Button(this.field_230708_k_ / 2 - 155, this.field_230709_l_ - 29, 150, 20, new TranslationTextComponent("controls.resetAll"), (p_213125_1_) -> {
for(KeyBinding keybinding : this.field_228183_b_.field_74324_K) { for(KeyBinding keybinding : this.field_228183_b_.field_74324_K) {
- keybinding.func_197979_b(keybinding.func_197977_i()); - keybinding.func_197979_b(keybinding.func_197977_i());
+ keybinding.setToDefault(); + keybinding.setToDefault();
} }
KeyBinding.func_74508_b(); KeyBinding.func_74508_b();
@@ -56,11 +56,14 @@ @@ -57,11 +57,14 @@
public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) { public boolean func_231046_a_(int p_231046_1_, int p_231046_2_, int p_231046_3_) {
if (this.field_146491_f != null) { if (this.field_146491_f != null) {
if (p_keyPressed_1_ == 256) { if (p_231046_1_ == 256) {
+ this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.field_197958_a); + this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.field_197958_a);
this.field_228183_b_.func_198014_a(this.field_146491_f, InputMappings.field_197958_a); this.field_228183_b_.func_198014_a(this.field_146491_f, InputMappings.field_197958_a);
} else { } else {
+ this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_)); + this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.func_197954_a(p_231046_1_, p_231046_2_));
this.field_228183_b_.func_198014_a(this.field_146491_f, InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_)); this.field_228183_b_.func_198014_a(this.field_146491_f, InputMappings.func_197954_a(p_231046_1_, p_231046_2_));
} }
+ if (!net.minecraftforge.client.settings.KeyModifier.isKeyCodeModifier(this.field_146491_f.getKey())) + if (!net.minecraftforge.client.settings.KeyModifier.isKeyCodeModifier(this.field_146491_f.getKey()))

View file

@ -1,10 +1,10 @@
--- a/net/minecraft/client/gui/screen/DeathScreen.java --- a/net/minecraft/client/gui/screen/DeathScreen.java
+++ b/net/minecraft/client/gui/screen/DeathScreen.java +++ b/net/minecraft/client/gui/screen/DeathScreen.java
@@ -34,6 +34,7 @@ @@ -35,6 +35,7 @@
})); }));
Button button = this.addButton(new Button(this.width / 2 - 100, this.height / 4 + 96, 200, 20, I18n.func_135052_a("deathScreen.titleScreen"), (p_213020_1_) -> { Button button = this.func_230480_a_(new Button(this.field_230708_k_ / 2 - 100, this.field_230709_l_ / 4 + 96, 200, 20, new TranslationTextComponent("deathScreen.titleScreen"), (p_213020_1_) -> {
if (this.field_213023_c) { if (this.field_213023_c) {
+ func_213022_a(true); + func_213022_a(true);
this.func_228177_a_(); this.func_228177_a_();
} else { } else {
ConfirmScreen confirmscreen = new ConfirmScreen(this::func_213022_a, new TranslationTextComponent("deathScreen.quit.confirm"), new StringTextComponent(""), I18n.func_135052_a("deathScreen.titleScreen"), I18n.func_135052_a("deathScreen.respawn")); ConfirmScreen confirmscreen = new ConfirmScreen(this::func_213022_a, new TranslationTextComponent("deathScreen.quit.confirm"), StringTextComponent.field_240750_d_, new TranslationTextComponent("deathScreen.titleScreen"), new TranslationTextComponent("deathScreen.respawn"));

View file

@ -1,27 +1,28 @@
--- a/net/minecraft/client/gui/screen/EnchantmentScreen.java --- a/net/minecraft/client/gui/screen/EnchantmentScreen.java
+++ b/net/minecraft/client/gui/screen/EnchantmentScreen.java +++ b/net/minecraft/client/gui/screen/EnchantmentScreen.java
@@ -155,7 +155,7 @@ @@ -149,7 +149,7 @@
String s1 = EnchantmentNameParts.func_178176_a().func_148334_a(this.font, i2); int i2 = 86 - this.field_230712_o_.func_78256_a(s);
FontRenderer fontrenderer = this.minecraft.func_211500_ak().func_211504_a(Minecraft.field_71464_q); ITextProperties itextproperties = EnchantmentNameParts.func_178176_a().func_238816_a_(this.field_230712_o_, i2);
int j2 = 6839882; int j2 = 6839882;
- if ((l < i1 + 1 || this.minecraft.field_71439_g.field_71068_ca < l1) && !this.minecraft.field_71439_g.field_71075_bZ.field_75098_d) { - if ((l < i1 + 1 || this.field_230706_i_.field_71439_g.field_71068_ca < l1) && !this.field_230706_i_.field_71439_g.field_71075_bZ.field_75098_d) {
+ if (((l < i1 + 1 || this.minecraft.field_71439_g.field_71068_ca < l1) && !this.minecraft.field_71439_g.field_71075_bZ.field_75098_d) || this.field_147002_h.field_185001_h[i1] == -1) { // Forge: render buttons as disabled when enchantable but enchantability not met on lower levels + if (((l < i1 + 1 || this.field_230706_i_.field_71439_g.field_71068_ca < l1) && !this.field_230706_i_.field_71439_g.field_71075_bZ.field_75098_d) || this.field_147002_h.field_185001_h[i1] == -1) { // Forge: render buttons as disabled when enchantable but enchantability not met on lower levels
this.blit(j1, j + 14 + 19 * i1, 0, 185, 108, 19); this.func_238474_b_(p_230450_1_, j1, j + 14 + 19 * i1, 0, 185, 108, 19);
this.blit(j1 + 1, j + 15 + 19 * i1, 16 * i1, 239, 16, 16); this.func_238474_b_(p_230450_1_, j1 + 1, j + 15 + 19 * i1, 16 * i1, 239, 16, 16);
fontrenderer.func_78279_b(s1, k1, j + 16 + 19 * i1, i2, (j2 & 16711422) >> 1); this.field_230712_o_.func_238418_a_(itextproperties, k1, j + 16 + 19 * i1, i2, (j2 & 16711422) >> 1);
@@ -195,10 +195,12 @@ @@ -188,10 +188,13 @@
Enchantment enchantment = Enchantment.func_185262_c((this.field_147002_h).field_185001_h[j]); Enchantment enchantment = Enchantment.func_185262_c((this.field_147002_h).field_185001_h[j]);
int l = (this.field_147002_h).field_185002_i[j]; int l = (this.field_147002_h).field_185002_i[j];
int i1 = j + 1; int i1 = j + 1;
- if (this.func_195359_a(60, 14 + 19 * j, 108, 17, (double)p_render_1_, (double)p_render_2_) && k > 0 && l >= 0 && enchantment != null) { - if (this.func_195359_a(60, 14 + 19 * j, 108, 17, (double)p_230430_2_, (double)p_230430_3_) && k > 0 && l >= 0 && enchantment != null) {
+ if (this.func_195359_a(60, 14 + 19 * j, 108, 17, (double)p_render_1_, (double)p_render_2_) && k > 0) { + if (this.func_195359_a(60, 14 + 19 * j, 108, 17, (double)p_230430_2_, (double)p_230430_3_) && k > 0) {
List<String> list = Lists.newArrayList(); List<ITextComponent> list = Lists.newArrayList();
- list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", enchantment.func_200305_d(l).func_150254_d())); - list.add((new TranslationTextComponent("container.enchant.clue", enchantment.func_200305_d(l))).func_240699_a_(TextFormatting.WHITE));
- if (!flag) { - if (!flag) {
+ list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.func_135052_a("container.enchant.clue", enchantment == null ? "" : enchantment.func_200305_d(l).func_150254_d())); + list.add((new TranslationTextComponent("container.enchant.clue", enchantment == null ? "" : enchantment.func_200305_d(l))).func_240699_a_(TextFormatting.WHITE));
+ if(enchantment == null) { + if(enchantment == null) {
+ java.util.Collections.addAll(list, "", TextFormatting.RED + I18n.func_135052_a("forge.container.enchant.limitedEnchantability")); + list.add(new StringTextComponent(""));
+ list.add(new TranslationTextComponent("forge.container.enchant.limitedEnchantability").func_240699_a_(TextFormatting.RED));
+ } else if (!flag) { + } else if (!flag) {
list.add(""); list.add(StringTextComponent.field_240750_d_);
if (this.minecraft.field_71439_g.field_71068_ca < k) { if (this.field_230706_i_.field_71439_g.field_71068_ca < k) {
list.add(TextFormatting.RED + I18n.func_135052_a("container.enchant.level.requirement", (this.field_147002_h).field_75167_g[j])); list.add((new TranslationTextComponent("container.enchant.level.requirement", (this.field_147002_h).field_75167_g[j])).func_240699_a_(TextFormatting.RED));

View file

@ -1,11 +1,11 @@
--- a/net/minecraft/client/gui/screen/LanguageScreen.java --- a/net/minecraft/client/gui/screen/LanguageScreen.java
+++ b/net/minecraft/client/gui/screen/LanguageScreen.java +++ b/net/minecraft/client/gui/screen/LanguageScreen.java
@@ -41,7 +41,7 @@ @@ -43,7 +43,7 @@
if (languagescreen$list$languageentry != null && !languagescreen$list$languageentry.field_214398_b.getCode().equals(this.field_146454_h.func_135041_c().getCode())) { if (languagescreen$list$languageentry != null && !languagescreen$list$languageentry.field_214398_b.getCode().equals(this.field_146454_h.func_135041_c().getCode())) {
this.field_146454_h.func_135045_a(languagescreen$list$languageentry.field_214398_b); this.field_146454_h.func_135045_a(languagescreen$list$languageentry.field_214398_b);
this.field_228183_b_.field_74363_ab = languagescreen$list$languageentry.field_214398_b.getCode(); this.field_228183_b_.field_74363_ab = languagescreen$list$languageentry.field_214398_b.getCode();
- this.minecraft.func_213237_g(); - this.field_230706_i_.func_213237_g();
+ net.minecraftforge.client.ForgeHooksClient.refreshResources(this.minecraft, net.minecraftforge.resource.VanillaResourceType.LANGUAGES); + net.minecraftforge.client.ForgeHooksClient.refreshResources(this.field_230706_i_, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);
this.font.func_78275_b(this.field_146454_h.func_135044_b()); this.field_146452_r.func_238482_a_(DialogTexts.field_240632_c_);
this.field_146452_r.setMessage(I18n.func_135052_a("gui.done")); this.field_211832_i.func_238482_a_(AbstractOption.field_216684_H.func_238152_c_(this.field_228183_b_));
this.field_211832_i.setMessage(AbstractOption.field_216684_H.func_216743_c(this.field_228183_b_)); this.field_228183_b_.func_74303_b();

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/gui/screen/MainMenuScreen.java --- a/net/minecraft/client/gui/screen/MainMenuScreen.java
+++ b/net/minecraft/client/gui/screen/MainMenuScreen.java +++ b/net/minecraft/client/gui/screen/MainMenuScreen.java
@@ -45,6 +45,7 @@ @@ -54,6 +54,7 @@
private final RenderSkybox field_209101_K = new RenderSkybox(field_213098_a); private final RenderSkybox field_209101_K = new RenderSkybox(field_213098_a);
private final boolean field_213102_y; private final boolean field_213102_y;
private long field_213103_z; private long field_213103_z;
@ -8,66 +8,60 @@
public MainMenuScreen() { public MainMenuScreen() {
this(false); this(false);
@@ -88,10 +89,14 @@ @@ -97,11 +98,16 @@
this.field_193979_N = this.width - this.field_193978_M - 2; this.field_193979_N = this.field_230708_k_ - this.field_193978_M - 2;
int i = 24; int i = 24;
int j = this.height / 4 + 48; int j = this.field_230709_l_ / 4 + 48;
+ Button modbutton = null; + Button modButton = null;
if (this.minecraft.func_71355_q()) { if (this.field_230706_i_.func_71355_q()) {
this.func_73972_b(j, 24); this.func_73972_b(j, 24);
} else { } else {
this.func_73969_a(j, 24); this.func_73969_a(j, 24);
+ modbutton = this.addButton(new Button(this.width / 2 - 100, j + 24 * 2, 98, 20, I18n.func_135052_a("fml.menu.mods"), button -> { + modButton = this.func_230480_a_(new Button(this.field_230708_k_ / 2 - 100, j + 24 * 2, 98, 20, new TranslationTextComponent("fml.menu.mods"), button -> {
+ this.minecraft.func_147108_a(new net.minecraftforge.fml.client.gui.screen.ModListScreen(this)); + this.field_230706_i_.func_147108_a(new net.minecraftforge.fml.client.gui.screen.ModListScreen(this));
+ })); + }));
} }
+ modUpdateNotification = net.minecraftforge.client.gui.NotificationModUpdateScreen.init(this, modButton);
this.addButton(new ImageButton(this.width / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, Button.WIDGETS_LOCATION, 256, 256, (p_213090_1_) -> { this.func_230480_a_(new ImageButton(this.field_230708_k_ / 2 - 124, j + 72 + 12, 20, 20, 0, 106, 20, Button.field_230687_i_, 256, 256, (p_213090_1_) -> {
@@ -116,6 +121,7 @@ this.field_230706_i_.func_147108_a(new LanguageScreen(this, this.field_230706_i_.field_71474_y, this.field_230706_i_.func_135016_M()));
if (this.func_183501_a()) { @@ -143,7 +149,7 @@
this.field_183503_M.init(this.minecraft, this.width, this.height); Screen screen = (Screen)(this.field_230706_i_.field_71474_y.field_230152_Z_ ? new MultiplayerScreen(this) : new MultiplayerWarningScreen(this));
} this.field_230706_i_.func_147108_a(screen);
+ modUpdateNotification = net.minecraftforge.client.gui.NotificationModUpdateScreen.init(this, modbutton); }, button$itooltip))).field_230693_o_ = flag;
- (this.func_230480_a_(new Button(this.field_230708_k_ / 2 - 100, p_73969_1_ + p_73969_2_ * 2, 200, 20, new TranslationTextComponent("menu.online"), (p_238661_1_) -> {
} + (this.func_230480_a_(new Button(this.field_230708_k_ / 2 + 2, p_73969_1_ + p_73969_2_ * 2, 98, 20, new TranslationTextComponent("menu.online"), (p_238661_1_) -> {
@@ -131,7 +137,7 @@
}
}));
- this.addButton(new Button(this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, 200, 20, I18n.func_135052_a("menu.online"), (p_213095_1_) -> {
+ this.addButton(new Button(this.width / 2 + 2, p_73969_1_ + p_73969_2_ * 2, 98, 20, I18n.func_135052_a("menu.online"), (p_213095_1_) -> {
this.func_140005_i(); this.func_140005_i();
})); }, button$itooltip))).field_230693_o_ = flag;
} }
@@ -195,6 +201,7 @@ @@ -222,6 +228,7 @@
this.minecraft.func_110434_K().func_110577_a(field_194400_H); this.field_230706_i_.func_110434_K().func_110577_a(field_194400_H);
blit(j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16); func_238463_a_(p_230430_1_, j + 88, 67, 0.0F, 0.0F, 98, 14, 128, 16);
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.font, this.width, this.height); + net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, p_230430_1_, this.field_230712_o_, this.field_230708_k_, this.field_230709_l_);
if (this.field_73975_c != null) { if (this.field_73975_c != null) {
RenderSystem.pushMatrix(); RenderSystem.pushMatrix();
RenderSystem.translatef((float)(this.width / 2 + 90), 70.0F, 0.0F); RenderSystem.translatef((float)(this.field_230708_k_ / 2 + 90), 70.0F, 0.0F);
@@ -217,7 +224,13 @@ @@ -244,7 +251,13 @@
s = s + I18n.func_135052_a("menu.modded"); s = s + I18n.func_135052_a("menu.modded");
} }
- this.drawString(this.font, s, 2, this.height - 10, 16777215 | l); - this.func_238476_c_(p_230430_1_, this.field_230712_o_, s, 2, this.field_230709_l_ - 10, 16777215 | l);
+ net.minecraftforge.fml.BrandingControl.forEachLine(true, true, (brdline, brd) -> + net.minecraftforge.fml.BrandingControl.forEachLine(true, true, (brdline, brd) ->
+ this.drawString(this.font, brd, 2, this.height - ( 10 + brdline * (this.font.field_78288_b + 1)), 16777215 | l) + this.func_238476_c_(p_230430_1_, this.field_230712_o_, brd, 2, this.field_230709_l_ - ( 10 + brdline * (this.field_230712_o_.field_78288_b + 1)), 16777215 | l)
+ ); + );
+ +
+ net.minecraftforge.fml.BrandingControl.forEachAboveCopyrightLine((brdline, brd) -> + net.minecraftforge.fml.BrandingControl.forEachAboveCopyrightLine((brdline, brd) ->
+ this.drawString(this.font, brd, this.width - font.func_78256_a(brd), this.height - (10 + (brdline + 1) * ( this.font.field_78288_b + 1)), 16777215 | l) + this.func_238476_c_(p_230430_1_, this.field_230712_o_, brd, this.field_230708_k_ - field_230712_o_.func_78256_a(brd), this.field_230709_l_ - (10 + (brdline + 1) * ( this.field_230712_o_.field_78288_b + 1)), 16777215 | l)
+ ); + );
this.drawString(this.font, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.height - 10, 16777215 | l); this.func_238476_c_(p_230430_1_, this.field_230712_o_, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.field_230709_l_ - 10, 16777215 | l);
if (p_render_1_ > this.field_193979_N && p_render_1_ < this.field_193979_N + this.field_193978_M && p_render_2_ > this.height - 10 && p_render_2_ < this.height) { if (p_230430_2_ > this.field_193979_N && p_230430_2_ < this.field_193979_N + this.field_193978_M && p_230430_3_ > this.field_230709_l_ - 10 && p_230430_3_ < this.field_230709_l_) {
fill(this.field_193979_N, this.height - 1, this.field_193979_N + this.field_193978_M, this.height, 16777215 | l); func_238467_a_(p_230430_1_, this.field_193979_N, this.field_230709_l_ - 1, this.field_193979_N + this.field_193978_M, this.field_230709_l_, 16777215 | l);
@@ -231,6 +244,7 @@ @@ -258,6 +271,7 @@
if (this.func_183501_a() && f1 >= 1.0F) { if (this.func_183501_a() && f1 >= 1.0F) {
this.field_183503_M.render(p_render_1_, p_render_2_, p_render_3_); this.field_183503_M.func_230430_a_(p_230430_1_, p_230430_2_, p_230430_3_, p_230430_4_);
} }
+ modUpdateNotification.render(p_render_1_, p_render_2_, p_render_3_); + modUpdateNotification.func_230430_a_(p_230430_1_, p_230430_2_, p_230430_3_, p_230430_4_);
} }
} }

View file

@ -5,8 +5,8 @@
} }
+ @Override + @Override
+ public void onClose() { + public void func_231175_as__() {
+ this.minecraft.func_147108_a(this.field_146798_g); + this.field_230706_i_.func_147108_a(this.field_146798_g);
+ } + }
+ +
public ServerPinger func_146789_i() { public ServerPinger func_146789_i() {

View file

@ -1,15 +1,15 @@
--- a/net/minecraft/client/gui/screen/OptionsScreen.java --- a/net/minecraft/client/gui/screen/OptionsScreen.java
+++ b/net/minecraft/client/gui/screen/OptionsScreen.java +++ b/net/minecraft/client/gui/screen/OptionsScreen.java
@@ -118,4 +118,12 @@ @@ -146,4 +146,12 @@
this.drawCenteredString(this.font, this.title.func_150254_d(), this.width / 2, 15, 16777215); this.func_238472_a_(p_230430_1_, this.field_230712_o_, this.field_230704_d_, this.field_230708_k_ / 2, 15, 16777215);
super.render(p_render_1_, p_render_2_, p_render_3_); super.func_230430_a_(p_230430_1_, p_230430_2_, p_230430_3_, p_230430_4_);
} }
+ +
+ @Override + @Override
+ public void onClose() { + public void func_231175_as__() {
+ // We need to consider 2 potential parent screens here: + // We need to consider 2 potential parent screens here:
+ // 1. From the main menu, in which case display the main menu + // 1. From the main menu, in which case display the main menu
+ // 2. From the pause menu, in which case exit back to game + // 2. From the pause menu, in which case exit back to game
+ this.minecraft.func_147108_a(this.field_146441_g instanceof IngameMenuScreen ? null : this.field_146441_g); + this.field_230706_i_.func_147108_a(this.field_146441_g instanceof IngameMenuScreen ? null : this.field_146441_g);
+ } + }
} }

View file

@ -1,80 +1,83 @@
--- a/net/minecraft/client/gui/screen/Screen.java --- a/net/minecraft/client/gui/screen/Screen.java
+++ b/net/minecraft/client/gui/screen/Screen.java +++ b/net/minecraft/client/gui/screen/Screen.java
@@ -111,7 +111,10 @@ @@ -113,7 +113,10 @@
} }
protected void renderTooltip(ItemStack p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_) { protected void func_230457_a_(MatrixStack p_230457_1_, ItemStack p_230457_2_, int p_230457_3_, int p_230457_4_) {
- this.renderTooltip(this.getTooltipFromItem(p_renderTooltip_1_), p_renderTooltip_2_, p_renderTooltip_3_); - this.func_238654_b_(p_230457_1_, this.func_231151_a_(p_230457_2_), p_230457_3_, p_230457_4_);
+ FontRenderer font = p_renderTooltip_1_.func_77973_b().getFontRenderer(p_renderTooltip_1_); + FontRenderer font = p_230457_2_.func_77973_b().getFontRenderer(p_230457_2_);
+ net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_renderTooltip_1_); + net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_230457_2_);
+ this.renderTooltip(this.getTooltipFromItem(p_renderTooltip_1_), p_renderTooltip_2_, p_renderTooltip_3_, (font == null ? this.font : font)); + this.func_238654_b_(p_230457_1_, this.func_231151_a_(p_230457_2_), p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
+ net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip(); + net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip();
} }
public List<String> getTooltipFromItem(ItemStack p_getTooltipFromItem_1_) { public List<ITextComponent> func_231151_a_(ItemStack p_231151_1_) {
@@ -130,7 +133,11 @@ @@ -125,7 +128,11 @@
} }
public void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_) { public void func_238654_b_(MatrixStack p_238654_1_, List<? extends ITextProperties> p_238654_2_, int p_238654_3_, int p_238654_4_) {
- if (!p_renderTooltip_1_.isEmpty()) { - if (!p_238654_2_.isEmpty()) {
+ renderTooltip(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_, font); +
+ } + }
+ public void renderTooltip(List<String> p_renderTooltip_1_, int p_renderTooltip_2_, int p_renderTooltip_3_, FontRenderer font) { + public void func_238654_b_(MatrixStack p_238654_1_, List<? extends ITextProperties> p_238654_2_, int p_238654_3_, int p_238654_4_, FontRenderer font) {
+ net.minecraftforge.fml.client.gui.GuiUtils.drawHoveringText(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_, width, height, -1, font); + net.minecraftforge.fml.client.gui.GuiUtils.drawHoveringText(p_238654_1_, p_238654_2_, p_238654_3_, p_238654_4_, field_230708_k_, field_230709_l_, -1, font);
+ if (false && !p_renderTooltip_1_.isEmpty()) { + if (false && !p_238654_2_.isEmpty()) {
RenderSystem.disableRescaleNormal();
RenderSystem.disableDepthTest();
int i = 0; int i = 0;
@@ -308,9 +315,12 @@
for(ITextProperties itextproperties : p_238654_2_) {
@@ -285,9 +292,12 @@
} }
public void sendMessage(String p_sendMessage_1_, boolean p_sendMessage_2_) { public void func_231159_b_(String p_231159_1_, boolean p_231159_2_) {
+ p_sendMessage_1_ = net.minecraftforge.event.ForgeEventFactory.onClientSendMessage(p_sendMessage_1_); + p_231159_1_ = net.minecraftforge.event.ForgeEventFactory.onClientSendMessage(p_231159_1_);
+ if (p_sendMessage_1_.isEmpty()) return; + if (p_231159_1_.isEmpty()) return;
if (p_sendMessage_2_) { if (p_231159_2_) {
this.minecraft.field_71456_v.func_146158_b().func_146239_a(p_sendMessage_1_); this.field_230706_i_.field_71456_v.func_146158_b().func_146239_a(p_231159_1_);
} }
+ //if (net.minecraftforge.client.ClientCommandHandler.instance.executeCommand(mc.player, msg) != 0) return; //Forge: TODO Client command re-write + //if (net.minecraftforge.client.ClientCommandHandler.instance.executeCommand(mc.player, msg) != 0) return; //Forge: TODO Client command re-write
this.minecraft.field_71439_g.func_71165_d(p_sendMessage_1_); this.field_230706_i_.field_71439_g.func_71165_d(p_231159_1_);
} }
@@ -321,10 +331,14 @@ @@ -298,10 +308,17 @@
this.font = p_init_1_.field_71466_p; this.field_230712_o_ = p_231158_1_.field_71466_p;
this.width = p_init_2_; this.field_230708_k_ = p_231158_2_;
this.height = p_init_3_; this.field_230709_l_ = p_231158_3_;
+ java.util.function.Consumer<Widget> remove = (b) -> { buttons.remove(b); children.remove(b); }; + java.util.function.Consumer<Widget> remove = (b) -> {
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Pre(this, this.buttons, this::addButton, remove))) { + field_230710_m_.remove(b);
this.buttons.clear(); + field_230705_e_.remove(b);
this.children.clear(); + };
this.setFocused((IGuiEventListener)null); + if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Pre(this, this.field_230710_m_, this::func_230480_a_, remove))) {
this.init(); this.field_230710_m_.clear();
this.field_230705_e_.clear();
this.func_231035_a_((IGuiEventListener)null);
this.func_231160_c_();
+ } + }
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Post(this, this.buttons, this::addButton, remove)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Post(this, this.field_230710_m_, this::func_230480_a_, remove));
} }
public void setSize(int p_setSize_1_, int p_setSize_2_) { public List<? extends IGuiEventListener> func_231039_at__() {
@@ -352,6 +366,7 @@ @@ -324,6 +341,7 @@
public void renderBackground(int p_renderBackground_1_) { public void func_238651_a_(MatrixStack p_238651_1_, int p_238651_2_) {
if (this.minecraft.field_71441_e != null) { if (this.field_230706_i_.field_71441_e != null) {
this.fillGradient(0, 0, this.width, this.height, -1072689136, -804253680); this.func_238468_a_(p_238651_1_, 0, 0, this.field_230708_k_, this.field_230709_l_, -1072689136, -804253680);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this));
} else { } else {
this.renderDirtBackground(p_renderBackground_1_); this.func_231165_f_(p_238651_2_);
} }
@@ -370,6 +385,7 @@ @@ -342,6 +360,7 @@
bufferbuilder.func_225582_a_((double)this.width, 0.0D, 0.0D).func_225583_a_((float)this.width / 32.0F, (float)p_renderDirtBackground_1_).func_225586_a_(64, 64, 64, 255).func_181675_d(); bufferbuilder.func_225582_a_((double)this.field_230708_k_, 0.0D, 0.0D).func_225583_a_((float)this.field_230708_k_ / 32.0F, (float)p_231165_1_).func_225586_a_(64, 64, 64, 255).func_181675_d();
bufferbuilder.func_225582_a_(0.0D, 0.0D, 0.0D).func_225583_a_(0.0F, (float)p_renderDirtBackground_1_).func_225586_a_(64, 64, 64, 255).func_181675_d(); bufferbuilder.func_225582_a_(0.0D, 0.0D, 0.0D).func_225583_a_(0.0F, (float)p_231165_1_).func_225586_a_(64, 64, 64, 255).func_181675_d();
tessellator.func_78381_a(); tessellator.func_78381_a();
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this));
} }
public boolean isPauseScreen() { public boolean func_231177_au__() {
@@ -453,4 +469,8 @@ @@ -428,4 +447,8 @@
public boolean isMouseOver(double p_isMouseOver_1_, double p_isMouseOver_3_) {
return true; public void func_230476_a_(List<Path> p_230476_1_) {
} }
+ +
+ public Minecraft getMinecraft() { + public Minecraft getMinecraft() {
+ return this.minecraft; + return this.field_230706_i_;
+ } + }
} }

View file

@ -1,11 +1,11 @@
--- a/net/minecraft/client/gui/screen/ServerSelectionList.java --- a/net/minecraft/client/gui/screen/ServerSelectionList.java
+++ b/net/minecraft/client/gui/screen/ServerSelectionList.java +++ b/net/minecraft/client/gui/screen/ServerSelectionList.java
@@ -294,6 +294,8 @@ @@ -302,6 +302,8 @@
this.field_148303_c.func_146793_a(s); this.field_148303_c.func_238854_b_(list1);
} }
+ net.minecraftforge.fml.client.ClientHooks.drawForgePingInfo(this.field_148303_c, field_148301_e, p_render_3_, p_render_2_, p_render_4_, i1, j1); + net.minecraftforge.fml.client.ClientHooks.drawForgePingInfo(this.field_148303_c, field_148301_e, p_230432_1_, p_230432_4_, p_230432_3_, p_230432_5_, i1, j1);
+ +
if (this.field_148300_d.field_71474_y.field_85185_A || p_render_8_) { if (this.field_148300_d.field_71474_y.field_85185_A || p_230432_9_) {
this.field_148300_d.func_110434_K().func_110577_a(ServerSelectionList.field_214360_d); this.field_148300_d.func_110434_K().func_110577_a(ServerSelectionList.field_214360_d);
AbstractGui.fill(p_render_3_, p_render_2_, p_render_3_ + 32, p_render_2_ + 32, -1601138544); AbstractGui.func_238467_a_(p_230432_1_, p_230432_4_, p_230432_3_, p_230432_4_ + 32, p_230432_3_ + 32, -1601138544);

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/client/gui/screen/SleepInMultiplayerScreen.java
+++ b/net/minecraft/client/gui/screen/SleepInMultiplayerScreen.java
@@ -30,7 +30,7 @@
} else if (p_keyPressed_1_ == 257 || p_keyPressed_1_ == 335) {
String s = this.field_146415_a.func_146179_b().trim();
if (!s.isEmpty()) {
- this.minecraft.field_71439_g.func_71165_d(s);
+ this.sendMessage(s); // Forge: fix vanilla not adding messages to the sent list while sleeping
}
this.field_146415_a.func_146180_a("");

View file

@ -1,152 +1,159 @@
--- a/net/minecraft/client/gui/screen/inventory/ContainerScreen.java --- a/net/minecraft/client/gui/screen/inventory/ContainerScreen.java
+++ b/net/minecraft/client/gui/screen/inventory/ContainerScreen.java +++ b/net/minecraft/client/gui/screen/inventory/ContainerScreen.java
@@ -71,6 +71,7 @@ @@ -86,6 +86,7 @@
int i = this.field_147003_i; int i = this.field_147003_i;
int j = this.field_147009_r; int j = this.field_147009_r;
this.func_146976_a(p_render_3_, p_render_1_, p_render_2_); this.func_230450_a_(p_230430_1_, p_230430_4_, p_230430_2_, p_230430_3_);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiContainerEvent.DrawBackground(this, p_render_1_, p_render_2_)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiContainerEvent.DrawBackground(this, p_230430_1_, p_230430_2_, p_230430_3_));
RenderSystem.disableRescaleNormal(); RenderSystem.disableRescaleNormal();
RenderSystem.disableDepthTest(); RenderSystem.disableDepthTest();
super.render(p_render_1_, p_render_2_, p_render_3_); super.func_230430_a_(p_230430_1_, p_230430_2_, p_230430_3_, p_230430_4_);
@@ -96,13 +97,15 @@ @@ -111,13 +112,15 @@
int j1 = slot.field_75223_e; int j1 = slot.field_75223_e;
int k1 = slot.field_75221_f; int k1 = slot.field_75221_f;
RenderSystem.colorMask(true, true, true, false); RenderSystem.colorMask(true, true, true, false);
- this.fillGradient(j1, k1, j1 + 16, k1 + 16, -2130706433, -2130706433); - this.func_238468_a_(p_230430_1_, j1, k1, j1 + 16, k1 + 16, -2130706433, -2130706433);
+ int slotColor = this.getSlotColor(i1); + int slotColor = this.getSlotColor(i1);
+ this.fillGradient(j1, k1, j1 + 16, k1 + 16, slotColor, slotColor); + this.func_238468_a_(p_230430_1_, j1, k1, j1 + 16, k1 + 16, slotColor, slotColor);
RenderSystem.colorMask(true, true, true, true); RenderSystem.colorMask(true, true, true, true);
RenderSystem.enableDepthTest(); RenderSystem.enableDepthTest();
} }
} }
this.func_146979_b(p_render_1_, p_render_2_); this.func_230451_b_(p_230430_1_, p_230430_2_, p_230430_3_);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiContainerEvent.DrawForeground(this, p_render_1_, p_render_2_)); + net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiContainerEvent.DrawForeground(this, p_230430_1_, p_230430_2_, p_230430_3_));
PlayerInventory playerinventory = this.minecraft.field_71439_g.field_71071_by; PlayerInventory playerinventory = this.field_230706_i_.field_71439_g.field_71071_by;
ItemStack itemstack = this.field_147012_x.func_190926_b() ? playerinventory.func_70445_o() : this.field_147012_x; ItemStack itemstack = this.field_147012_x.func_190926_b() ? playerinventory.func_70445_o() : this.field_147012_x;
if (!itemstack.func_190926_b()) { if (!itemstack.func_190926_b()) {
@@ -152,8 +155,10 @@ @@ -167,8 +170,10 @@
RenderSystem.translatef(0.0F, 0.0F, 32.0F); RenderSystem.translatef(0.0F, 0.0F, 32.0F);
this.setBlitOffset(200); this.func_230926_e_(200);
this.itemRenderer.field_77023_b = 200.0F; this.field_230707_j_.field_77023_b = 200.0F;
+ net.minecraft.client.gui.FontRenderer font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_); + net.minecraft.client.gui.FontRenderer font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_);
+ if (font == null) font = this.font; + if (font == null) font = this.field_230712_o_;
this.itemRenderer.func_180450_b(p_146982_1_, p_146982_2_, p_146982_3_); this.field_230707_j_.func_180450_b(p_146982_1_, p_146982_2_, p_146982_3_);
- this.itemRenderer.func_180453_a(this.font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_); - this.field_230707_j_.func_180453_a(this.field_230712_o_, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_);
+ this.itemRenderer.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_); + this.field_230707_j_.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_);
this.setBlitOffset(0); this.func_230926_e_(0);
this.itemRenderer.field_77023_b = 0.0F; this.field_230707_j_.field_77023_b = 0.0F;
} }
@@ -260,7 +265,8 @@ @@ -278,7 +283,8 @@
if (super.mouseClicked(p_mouseClicked_1_, p_mouseClicked_3_, p_mouseClicked_5_)) { if (super.func_231044_a_(p_231044_1_, p_231044_3_, p_231044_5_)) {
return true; return true;
} else { } else {
- boolean flag = this.minecraft.field_71474_y.field_74322_I.func_197984_a(p_mouseClicked_5_); - boolean flag = this.field_230706_i_.field_71474_y.field_74322_I.func_197984_a(p_231044_5_);
+ InputMappings.Input mouseKey = InputMappings.Type.MOUSE.func_197944_a(p_mouseClicked_5_); + InputMappings.Input mouseKey = InputMappings.Type.MOUSE.func_197944_a(p_231044_5_);
+ boolean flag = this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey); + boolean flag = this.field_230706_i_.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey);
Slot slot = this.func_195360_a(p_mouseClicked_1_, p_mouseClicked_3_); Slot slot = this.func_195360_a(p_231044_1_, p_231044_3_);
long i = Util.func_211177_b(); long i = Util.func_211177_b();
this.field_146993_M = this.field_146998_K == slot && i - this.field_146997_J < 250L && this.field_146992_L == p_mouseClicked_5_; this.field_146993_M = this.field_146998_K == slot && i - this.field_146997_J < 250L && this.field_146992_L == p_231044_5_;
@@ -269,6 +275,7 @@ @@ -289,6 +295,7 @@
int j = this.field_147003_i; int j = this.field_147003_i;
int k = this.field_147009_r; int k = this.field_147009_r;
boolean flag1 = this.func_195361_a(p_mouseClicked_1_, p_mouseClicked_3_, j, k, p_mouseClicked_5_); boolean flag1 = this.func_195361_a(p_231044_1_, p_231044_3_, j, k, p_231044_5_);
+ if (slot != null) flag1 = false; // Forge, prevent dropping of items through slots outside of GUI boundaries + if (slot != null) flag1 = false; // Forge, prevent dropping of items through slots outside of GUI boundaries
int l = -1; int l = -1;
if (slot != null) { if (slot != null) {
l = slot.field_75222_d; l = slot.field_75222_d;
@@ -294,7 +301,7 @@ @@ -314,7 +321,7 @@
} }
} else if (!this.field_147007_t) { } else if (!this.field_147007_t) {
if (this.minecraft.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) { if (this.field_230706_i_.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
- if (this.minecraft.field_71474_y.field_74322_I.func_197984_a(p_mouseClicked_5_)) { - if (this.field_230706_i_.field_71474_y.field_74322_I.func_197984_a(p_231044_5_)) {
+ if (this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) { + if (this.field_230706_i_.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) {
this.func_184098_a(slot, l, p_mouseClicked_5_, ClickType.CLONE); this.func_184098_a(slot, l, p_231044_5_, ClickType.CLONE);
} else { } else {
boolean flag2 = l != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 344)); boolean flag2 = l != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 344));
@@ -318,7 +325,7 @@ @@ -338,7 +345,7 @@
this.field_146987_F = 0; this.field_146987_F = 0;
} else if (p_mouseClicked_5_ == 1) { } else if (p_231044_5_ == 1) {
this.field_146987_F = 1; this.field_146987_F = 1;
- } else if (this.minecraft.field_71474_y.field_74322_I.func_197984_a(p_mouseClicked_5_)) { - } else if (this.field_230706_i_.field_71474_y.field_74322_I.func_197984_a(p_231044_5_)) {
+ } else if (this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) { + } else if (this.field_230706_i_.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) {
this.field_146987_F = 2; this.field_146987_F = 2;
} }
} }
@@ -371,10 +378,13 @@ @@ -407,10 +414,13 @@
} }
public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) { public boolean func_231048_c_(double p_231048_1_, double p_231048_3_, int p_231048_5_) {
+ super.mouseReleased(p_mouseReleased_1_, p_mouseReleased_3_, p_mouseReleased_5_); //Forge, Call parent to release buttons + super.func_231048_c_(p_231048_1_, p_231048_3_, p_231048_5_); //Forge, Call parent to release buttons
Slot slot = this.func_195360_a(p_mouseReleased_1_, p_mouseReleased_3_); Slot slot = this.func_195360_a(p_231048_1_, p_231048_3_);
int i = this.field_147003_i; int i = this.field_147003_i;
int j = this.field_147009_r; int j = this.field_147009_r;
boolean flag = this.func_195361_a(p_mouseReleased_1_, p_mouseReleased_3_, i, j, p_mouseReleased_5_); boolean flag = this.func_195361_a(p_231048_1_, p_231048_3_, i, j, p_231048_5_);
+ if (slot != null) flag = false; // Forge, prevent dropping of items through slots outside of GUI boundaries + if (slot != null) flag = false; // Forge, prevent dropping of items through slots outside of GUI boundaries
+ InputMappings.Input mouseKey = InputMappings.Type.MOUSE.func_197944_a(p_mouseReleased_5_); + InputMappings.Input mouseKey = InputMappings.Type.MOUSE.func_197944_a(p_231048_5_);
int k = -1; int k = -1;
if (slot != null) { if (slot != null) {
k = slot.field_75222_d; k = slot.field_75222_d;
@@ -388,7 +398,7 @@ @@ -424,7 +434,7 @@
if (hasShiftDown()) { if (func_231173_s_()) {
if (!this.field_146994_N.func_190926_b()) { if (!this.field_146994_N.func_190926_b()) {
for(Slot slot2 : this.field_147002_h.field_75151_b) { for(Slot slot2 : this.field_147002_h.field_75151_b) {
- if (slot2 != null && slot2.func_82869_a(this.minecraft.field_71439_g) && slot2.func_75216_d() && slot2.field_75224_c == slot.field_75224_c && Container.func_94527_a(slot2, this.field_146994_N, true)) { - if (slot2 != null && slot2.func_82869_a(this.field_230706_i_.field_71439_g) && slot2.func_75216_d() && slot2.field_75224_c == slot.field_75224_c && Container.func_94527_a(slot2, this.field_146994_N, true)) {
+ if (slot2 != null && slot2.func_82869_a(this.minecraft.field_71439_g) && slot2.func_75216_d() && slot2.isSameInventory(slot) && Container.func_94527_a(slot2, this.field_146994_N, true)) { + if (slot2 != null && slot2.func_82869_a(this.field_230706_i_.field_71439_g) && slot2.func_75216_d() && slot2.isSameInventory(slot) && Container.func_94527_a(slot2, this.field_146994_N, true)) {
this.func_184098_a(slot2, slot2.field_75222_d, p_mouseReleased_5_, ClickType.QUICK_MOVE); this.func_184098_a(slot2, slot2.field_75222_d, p_231048_5_, ClickType.QUICK_MOVE);
} }
} }
@@ -452,7 +462,7 @@ @@ -488,7 +498,7 @@
this.func_184098_a((Slot)null, -999, Container.func_94534_d(2, this.field_146987_F), ClickType.QUICK_CRAFT); this.func_184098_a((Slot)null, -999, Container.func_94534_d(2, this.field_146987_F), ClickType.QUICK_CRAFT);
} else if (!this.minecraft.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) { } else if (!this.field_230706_i_.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
- if (this.minecraft.field_71474_y.field_74322_I.func_197984_a(p_mouseReleased_5_)) { - if (this.field_230706_i_.field_71474_y.field_74322_I.func_197984_a(p_231048_5_)) {
+ if (this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) { + if (this.field_230706_i_.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) {
this.func_184098_a(slot, k, p_mouseReleased_5_, ClickType.CLONE); this.func_184098_a(slot, k, p_231048_5_, ClickType.CLONE);
} else { } else {
boolean flag1 = k != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 344)); boolean flag1 = k != -999 && (InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 340) || InputMappings.func_216506_a(Minecraft.func_71410_x().func_228018_at_().func_198092_i(), 344));
@@ -501,27 +511,34 @@ @@ -534,19 +544,26 @@
if (super.keyPressed(p_keyPressed_1_, p_keyPressed_2_, p_keyPressed_3_)) {
return true;
} else {
- if (p_keyPressed_1_ == 256 || this.minecraft.field_71474_y.field_151445_Q.func_197976_a(p_keyPressed_1_, p_keyPressed_2_)) {
+ InputMappings.Input mouseKey = InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_);
+ if (p_keyPressed_1_ == 256 || this.minecraft.field_71474_y.field_151445_Q.isActiveAndMatches(mouseKey)) {
this.minecraft.field_71439_g.func_71053_j();
+ return true; // Forge MC-146650: Needs to return true when the key is handled.
} }
- this.func_195363_d(p_keyPressed_1_, p_keyPressed_2_); public boolean func_231046_a_(int p_231046_1_, int p_231046_2_, int p_231046_3_) {
+ if (this.func_195363_d(p_keyPressed_1_, p_keyPressed_2_)) + InputMappings.Input mouseKey = InputMappings.func_197954_a(p_231046_1_, p_231046_2_);
+ return true; // Forge MC-146650: Needs to return true when the key is handled. if (super.func_231046_a_(p_231046_1_, p_231046_2_, p_231046_3_)) {
return true;
- } else if (p_231046_1_ != 256 && !this.field_230706_i_.field_71474_y.field_151445_Q.func_197976_a(p_231046_1_, p_231046_2_)) {
- this.func_195363_d(p_231046_1_, p_231046_2_);
+ } else if (p_231046_1_ != 256 && !this.field_230706_i_.field_71474_y.field_151445_Q.isActiveAndMatches(mouseKey)) {
+ boolean handled = false;// Forge MC-146650: Needs to return true when the key is handled.
+ if (this.func_195363_d(p_231046_1_, p_231046_2_))
+ handled = true;
if (this.field_147006_u != null && this.field_147006_u.func_75216_d()) { if (this.field_147006_u != null && this.field_147006_u.func_75216_d()) {
- if (this.minecraft.field_71474_y.field_74322_I.func_197976_a(p_keyPressed_1_, p_keyPressed_2_)) { - if (this.field_230706_i_.field_71474_y.field_74322_I.func_197976_a(p_231046_1_, p_231046_2_)) {
+ if (this.minecraft.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) { + if (this.field_230706_i_.field_71474_y.field_74322_I.isActiveAndMatches(mouseKey)) {
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, 0, ClickType.CLONE); this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, 0, ClickType.CLONE);
- } else if (this.minecraft.field_71474_y.field_74316_C.func_197976_a(p_keyPressed_1_, p_keyPressed_2_)) { - } else if (this.field_230706_i_.field_71474_y.field_74316_C.func_197976_a(p_231046_1_, p_231046_2_)) {
+ return true; // Forge MC-146650: Needs to return true when the key is handled. + handled = true;
+ } else if (this.minecraft.field_71474_y.field_74316_C.isActiveAndMatches(mouseKey)) { + } else if (this.field_230706_i_.field_71474_y.field_74316_C.isActiveAndMatches(mouseKey)) {
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, hasControlDown() ? 1 : 0, ClickType.THROW); this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, func_231172_r_() ? 1 : 0, ClickType.THROW);
+ return true; // Forge MC-146650: Needs to return true when the key is handled. + handled = true;
} }
+ } else if (this.minecraft.field_71474_y.field_74316_C.isActiveAndMatches(mouseKey)) { + } else if (this.field_230706_i_.field_71474_y.field_74316_C.isActiveAndMatches(mouseKey)) {
+ return true; // Forge MC-146650: Emulate MC bug, so we don't drop from hotbar when pressing drop without hovering over a item. + handled = true; // Forge MC-146650: Emulate MC bug, so we don't drop from hotbar when pressing drop without hovering over a item.
} }
- return true; - return true;
+ return false; // Forge MC-146650: Needs to return false when the key is not handled. + return handled;
} } else {
} this.field_230706_i_.field_71439_g.func_71053_j();
return true;
@@ -555,13 +572,13 @@
protected boolean func_195363_d(int p_195363_1_, int p_195363_2_) { protected boolean func_195363_d(int p_195363_1_, int p_195363_2_) {
if (this.minecraft.field_71439_g.field_71071_by.func_70445_o().func_190926_b() && this.field_147006_u != null) { if (this.field_230706_i_.field_71439_g.field_71071_by.func_70445_o().func_190926_b() && this.field_147006_u != null) {
- if (this.field_230706_i_.field_71474_y.field_186718_X.func_197976_a(p_195363_1_, p_195363_2_)) {
+ if (this.field_230706_i_.field_71474_y.field_186718_X.isActiveAndMatches(InputMappings.func_197954_a(p_195363_1_, p_195363_2_))) {
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, 40, ClickType.SWAP);
return true;
}
for(int i = 0; i < 9; ++i) { for(int i = 0; i < 9; ++i) {
- if (this.minecraft.field_71474_y.field_151456_ac[i].func_197976_a(p_195363_1_, p_195363_2_)) { - if (this.field_230706_i_.field_71474_y.field_151456_ac[i].func_197976_a(p_195363_1_, p_195363_2_)) {
+ if (this.minecraft.field_71474_y.field_151456_ac[i].isActiveAndMatches(InputMappings.func_197954_a(p_195363_1_, p_195363_2_))) { + if (this.field_230706_i_.field_71474_y.field_151456_ac[i].isActiveAndMatches(InputMappings.func_197954_a(p_195363_1_, p_195363_2_))) {
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, i, ClickType.SWAP); this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, i, ClickType.SWAP);
return true; return true;
} }
@@ -552,4 +569,16 @@ @@ -592,4 +609,16 @@
public T func_212873_a_() { public T func_212873_a_() {
return this.field_147002_h; return this.field_147002_h;
} }

View file

@ -1,29 +1,29 @@
--- a/net/minecraft/client/gui/screen/inventory/CreativeScreen.java --- a/net/minecraft/client/gui/screen/inventory/CreativeScreen.java
+++ b/net/minecraft/client/gui/screen/inventory/CreativeScreen.java +++ b/net/minecraft/client/gui/screen/inventory/CreativeScreen.java
@@ -65,6 +65,8 @@ @@ -65,6 +65,8 @@
private Slot field_147064_C;
private CreativeCraftingListener field_147059_E;
private boolean field_195377_F; private boolean field_195377_F;
private boolean field_199506_G;
private final Map<ResourceLocation, Tag<Item>> field_214085_w = Maps.newTreeMap();
+ private static int tabPage = 0; + private static int tabPage = 0;
+ private int maxPages = 0; + private int maxPages = 0;
private boolean field_199506_G;
private final Map<ResourceLocation, ITag<Item>> field_214085_w = Maps.newTreeMap();
public CreativeScreen(PlayerEntity p_i1088_1_) {
super(new CreativeScreen.CreativeContainer(p_i1088_1_), p_i1088_1_.field_71071_by, new StringTextComponent(""));
@@ -233,6 +235,12 @@ @@ -233,6 +235,12 @@
if (this.minecraft.field_71442_b.func_78758_h()) {
super.init(); protected void func_231160_c_() {
this.minecraft.field_195559_v.func_197967_a(true); if (this.field_230706_i_.field_71442_b.func_78758_h()) {
+ int tabCount = ItemGroup.field_78032_a.length; + int tabCount = ItemGroup.field_78032_a.length;
+ if (tabCount > 12) { + if (tabCount > 12) {
+ addButton(new net.minecraft.client.gui.widget.button.Button(field_147003_i, field_147009_r - 50, 20, 20, "<", b -> tabPage = Math.max(tabPage - 1, 0 ))); + func_230480_a_(new net.minecraft.client.gui.widget.button.Button(field_147003_i, field_147009_r - 50, 20, 20, new StringTextComponent("<"), b -> tabPage = Math.max(tabPage - 1, 0 )));
+ addButton(new net.minecraft.client.gui.widget.button.Button(field_147003_i + field_146999_f - 20, field_147009_r - 50, 20, 20, ">", b -> tabPage = Math.min(tabPage + 1, maxPages))); + func_230480_a_(new net.minecraft.client.gui.widget.button.Button(field_147003_i + field_146999_f - 20, field_147009_r - 50, 20, 20, new StringTextComponent(">"), b -> tabPage = Math.min(tabPage + 1, maxPages)));
+ maxPages = (int) Math.ceil((tabCount - 12) / 10D); + maxPages = (int) Math.ceil((tabCount - 12) / 10D);
+ } + }
this.field_147062_A = new TextFieldWidget(this.font, this.field_147003_i + 82, this.field_147009_r + 6, 80, 9, I18n.func_135052_a("itemGroup.search")); super.func_231160_c_();
this.field_147062_A.func_146203_f(50); this.field_230706_i_.field_195559_v.func_197967_a(true);
this.field_147062_A.func_146185_a(false); this.field_147062_A = new TextFieldWidget(this.field_230712_o_, this.field_147003_i + 82, this.field_147009_r + 6, 80, 9, new TranslationTextComponent("itemGroup.search"));
@@ -273,7 +281,7 @@ @@ -275,7 +283,7 @@
public boolean charTyped(char p_charTyped_1_, int p_charTyped_2_) { public boolean func_231042_a_(char p_231042_1_, int p_231042_2_) {
if (this.field_195377_F) { if (this.field_195377_F) {
return false; return false;
- } else if (field_147058_w != ItemGroup.field_78027_g.func_78021_a()) { - } else if (field_147058_w != ItemGroup.field_78027_g.func_78021_a()) {
@ -31,16 +31,16 @@
return false; return false;
} else { } else {
String s = this.field_147062_A.func_146179_b(); String s = this.field_147062_A.func_146179_b();
@@ -291,7 +299,7 @@ @@ -293,7 +301,7 @@
public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) { public boolean func_231046_a_(int p_231046_1_, int p_231046_2_, int p_231046_3_) {
this.field_195377_F = false; this.field_195377_F = false;
- if (field_147058_w != ItemGroup.field_78027_g.func_78021_a()) { - if (field_147058_w != ItemGroup.field_78027_g.func_78021_a()) {
+ if (!ItemGroup.field_78032_a[field_147058_w].hasSearchBar()) { + if (!ItemGroup.field_78032_a[field_147058_w].hasSearchBar()) {
if (this.minecraft.field_71474_y.field_74310_D.func_197976_a(p_keyPressed_1_, p_keyPressed_2_)) { if (this.field_230706_i_.field_71474_y.field_74310_D.func_197976_a(p_231046_1_, p_231046_2_)) {
this.field_195377_F = true; this.field_195377_F = true;
this.func_147050_b(ItemGroup.field_78027_g); this.func_147050_b(ItemGroup.field_78027_g);
@@ -327,6 +335,32 @@ @@ -330,6 +338,32 @@
private void func_147053_i() { private void func_147053_i() {
(this.field_147002_h).field_148330_a.clear(); (this.field_147002_h).field_148330_a.clear();
this.field_214085_w.clear(); this.field_214085_w.clear();
@ -55,7 +55,7 @@
+ while (itr.hasNext()) { + while (itr.hasNext()) {
+ ItemStack stack = itr.next(); + ItemStack stack = itr.next();
+ boolean matches = false; + boolean matches = false;
+ for (ITextComponent line : stack.func_82840_a(this.minecraft.field_71439_g, this.minecraft.field_71474_y.field_82882_x ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL)) { + for (ITextComponent line : stack.func_82840_a(this.field_230706_i_.field_71439_g, this.field_230706_i_.field_71474_y.field_82882_x ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL)) {
+ if (TextFormatting.func_110646_a(line.getString()).toLowerCase(Locale.ROOT).contains(search)) { + if (TextFormatting.func_110646_a(line.getString()).toLowerCase(Locale.ROOT).contains(search)) {
+ matches = true; + matches = true;
+ break; + break;
@ -73,20 +73,20 @@
String s = this.field_147062_A.func_146179_b(); String s = this.field_147062_A.func_146179_b();
if (s.isEmpty()) { if (s.isEmpty()) {
for(Item item : Registry.field_212630_s) { for(Item item : Registry.field_212630_s) {
@@ -372,9 +406,9 @@ @@ -375,9 +409,9 @@
protected void func_146979_b(int p_146979_1_, int p_146979_2_) { protected void func_230451_b_(MatrixStack p_230451_1_, int p_230451_2_, int p_230451_3_) {
ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w]; ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w];
- if (itemgroup.func_78019_g()) { - if (itemgroup.func_78019_g()) {
+ if (itemgroup != null && itemgroup.func_78019_g()) { + if (itemgroup != null && itemgroup.func_78019_g()) {
RenderSystem.disableBlend(); RenderSystem.disableBlend();
- this.font.func_211126_b(I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, 4210752); - this.field_230712_o_.func_238421_b_(p_230451_1_, I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, 4210752);
+ this.font.func_211126_b(I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, itemgroup.getLabelColor()); + this.field_230712_o_.func_238421_b_(p_230451_1_, I18n.func_135052_a(itemgroup.func_78024_c()), 8.0F, 6.0F, itemgroup.getLabelColor());
} }
} }
@@ -385,7 +419,7 @@ @@ -388,7 +422,7 @@
double d1 = p_mouseClicked_3_ - (double)this.field_147009_r; double d1 = p_231044_3_ - (double)this.field_147009_r;
for(ItemGroup itemgroup : ItemGroup.field_78032_a) { for(ItemGroup itemgroup : ItemGroup.field_78032_a) {
- if (this.func_195375_a(itemgroup, d0, d1)) { - if (this.func_195375_a(itemgroup, d0, d1)) {
@ -94,7 +94,7 @@
return true; return true;
} }
} }
@@ -406,7 +440,7 @@ @@ -409,7 +443,7 @@
this.field_147066_y = false; this.field_147066_y = false;
for(ItemGroup itemgroup : ItemGroup.field_78032_a) { for(ItemGroup itemgroup : ItemGroup.field_78032_a) {
@ -103,7 +103,7 @@
this.func_147050_b(itemgroup); this.func_147050_b(itemgroup);
return true; return true;
} }
@@ -417,12 +451,15 @@ @@ -420,12 +454,15 @@
} }
private boolean func_147055_p() { private boolean func_147055_p() {
@ -119,7 +119,7 @@
this.field_147008_s.clear(); this.field_147008_s.clear();
(this.field_147002_h).field_148330_a.clear(); (this.field_147002_h).field_148330_a.clear();
if (p_147050_1_ == ItemGroup.field_192395_m) { if (p_147050_1_ == ItemGroup.field_192395_m) {
@@ -499,13 +536,15 @@ @@ -502,13 +539,15 @@
} }
if (this.field_147062_A != null) { if (this.field_147062_A != null) {
@ -131,17 +131,17 @@
if (i != p_147050_1_.func_78021_a()) { if (i != p_147050_1_.func_78021_a()) {
this.field_147062_A.func_146180_a(""); this.field_147062_A.func_146180_a("");
} }
+ this.field_147062_A.setWidth(p_147050_1_.getSearchbarWidth()); + this.field_147062_A.func_230991_b_(p_147050_1_.getSearchbarWidth());
+ this.field_147062_A.x = this.field_147003_i + (82 /*default left*/ + 89 /*default width*/) - this.field_147062_A.getWidth(); + this.field_147062_A.field_230690_l_ = this.field_147003_i + (82 /*default left*/ + 89 /*default width*/) - this.field_147062_A.func_230998_h_();
this.func_147053_i(); this.func_147053_i();
} else { } else {
@@ -565,16 +604,35 @@ @@ -568,16 +607,35 @@
this.renderBackground(); this.func_230446_a_(p_230430_1_);
super.render(p_render_1_, p_render_2_, p_render_3_); super.func_230430_a_(p_230430_1_, p_230430_2_, p_230430_3_, p_230430_4_);
- for(ItemGroup itemgroup : ItemGroup.field_78032_a) { - for(ItemGroup itemgroup : ItemGroup.field_78032_a) {
- if (this.func_147052_b(itemgroup, p_render_1_, p_render_2_)) { - if (this.func_238809_a_(p_230430_1_, itemgroup, p_230430_2_, p_230430_3_)) {
+ int start = tabPage * 10; + int start = tabPage * 10;
+ int end = Math.min(ItemGroup.field_78032_a.length, ((tabPage + 1) * 10) + 2); + int end = Math.min(ItemGroup.field_78032_a.length, ((tabPage + 1) * 10) + 2);
+ if (tabPage != 0) start += 2; + if (tabPage != 0) start += 2;
@ -149,49 +149,49 @@
+ +
+ for (int x = start; x < end; x++) { + for (int x = start; x < end; x++) {
+ ItemGroup itemgroup = ItemGroup.field_78032_a[x]; + ItemGroup itemgroup = ItemGroup.field_78032_a[x];
+ if (itemgroup != null && this.func_147052_b(itemgroup, p_render_1_, p_render_2_)) { + if (itemgroup != null && this.func_238809_a_(p_230430_1_, itemgroup, p_230430_2_, p_230430_3_)) {
+ rendered = true; + rendered = true;
break; break;
} }
} }
+ if (!rendered && !func_147052_b(ItemGroup.field_78027_g, p_render_1_, p_render_2_)) + if (!rendered && !func_238809_a_(p_230430_1_, ItemGroup.field_78027_g, p_230430_2_, p_230430_3_))
+ func_147052_b(ItemGroup.field_78036_m, p_render_1_, p_render_2_); + func_238809_a_(p_230430_1_, ItemGroup.field_78036_m, p_230430_2_, p_230430_3_);
if (this.field_147064_C != null && field_147058_w == ItemGroup.field_78036_m.func_78021_a() && this.func_195359_a(this.field_147064_C.field_75223_e, this.field_147064_C.field_75221_f, 16, 16, (double)p_render_1_, (double)p_render_2_)) { if (this.field_147064_C != null && field_147058_w == ItemGroup.field_78036_m.func_78021_a() && this.func_195359_a(this.field_147064_C.field_75223_e, this.field_147064_C.field_75221_f, 16, 16, (double)p_230430_2_, (double)p_230430_3_)) {
this.renderTooltip(I18n.func_135052_a("inventory.binSlot"), p_render_1_, p_render_2_); this.func_238652_a_(p_230430_1_, new TranslationTextComponent("inventory.binSlot"), p_230430_2_, p_230430_3_);
} }
+ if (maxPages != 0) { + if (maxPages != 0) {
+ String page = String.format("%d / %d", tabPage + 1, maxPages + 1); + ITextComponent page = new StringTextComponent(String.format("%d / %d", tabPage + 1, maxPages + 1));
+ RenderSystem.disableLighting(); + RenderSystem.disableLighting();
+ this.setBlitOffset(300); + this.func_230926_e_(300);
+ this.itemRenderer.field_77023_b = 300.0F; + this.field_230707_j_.field_77023_b = 300.0F;
+ font.func_211126_b(page, field_147003_i + (field_146999_f / 2) - (font.func_78256_a(page) / 2), field_147009_r - 44, -1); + field_230712_o_.func_238407_a_(p_230430_1_, page, field_147003_i + (field_146999_f / 2) - (field_230712_o_.func_238414_a_(page) / 2), field_147009_r - 44, -1);
+ this.setBlitOffset(0); + this.func_230926_e_(0);
+ this.itemRenderer.field_77023_b = 0.0F; + this.field_230707_j_.field_77023_b = 0.0F;
+ } + }
+ +
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.func_191948_b(p_render_1_, p_render_2_); this.func_230459_a_(p_230430_1_, p_230430_2_, p_230430_3_);
}
@@ -622,7 +680,10 @@
} }
@@ -612,7 +670,10 @@
list1.add(1, (new TranslationTextComponent(itemgroup.func_78024_c())).func_240699_a_(TextFormatting.BLUE));
} }
- this.renderTooltip(list1, p_renderTooltip_2_, p_renderTooltip_3_); - this.func_238654_b_(p_230457_1_, list1, p_230457_3_, p_230457_4_);
+ net.minecraft.client.gui.FontRenderer font = p_renderTooltip_1_.func_77973_b().getFontRenderer(p_renderTooltip_1_); + net.minecraft.client.gui.FontRenderer font = p_230457_2_.func_77973_b().getFontRenderer(p_230457_2_);
+ net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_renderTooltip_1_); + net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_230457_2_);
+ this.renderTooltip(list1, p_renderTooltip_2_, p_renderTooltip_3_, (font == null ? this.font : font)); + this.func_238654_b_(p_230457_1_, list1, p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
+ net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip(); + net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip();
} else { } else {
super.renderTooltip(p_renderTooltip_1_, p_renderTooltip_2_, p_renderTooltip_3_); super.func_230457_a_(p_230457_1_, p_230457_2_, p_230457_3_, p_230457_4_);
} }
@@ -633,25 +694,44 @@ @@ -623,25 +684,44 @@
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w]; ItemGroup itemgroup = ItemGroup.field_78032_a[field_147058_w];
- for(ItemGroup itemgroup1 : ItemGroup.field_78032_a) { - for(ItemGroup itemgroup1 : ItemGroup.field_78032_a) {
- this.minecraft.func_110434_K().func_110577_a(field_147061_u); - this.field_230706_i_.func_110434_K().func_110577_a(field_147061_u);
- if (itemgroup1.func_78021_a() != field_147058_w) { - if (itemgroup1.func_78021_a() != field_147058_w) {
+ int start = tabPage * 10; + int start = tabPage * 10;
+ int end = Math.min(ItemGroup.field_78032_a.length, ((tabPage + 1) * 10 + 2)); + int end = Math.min(ItemGroup.field_78032_a.length, ((tabPage + 1) * 10 + 2));
@ -200,43 +200,43 @@
+ for (int idx = start; idx < end; idx++) { + for (int idx = start; idx < end; idx++) {
+ ItemGroup itemgroup1 = ItemGroup.field_78032_a[idx]; + ItemGroup itemgroup1 = ItemGroup.field_78032_a[idx];
+ if (itemgroup1 != null && itemgroup1.func_78021_a() != field_147058_w) { + if (itemgroup1 != null && itemgroup1.func_78021_a() != field_147058_w) {
+ this.minecraft.func_110434_K().func_110577_a(itemgroup1.getTabsImage()); + this.field_230706_i_.func_110434_K().func_110577_a(itemgroup1.getBackgroundImage());
this.func_147051_a(itemgroup1); this.func_238808_a_(p_230450_1_, itemgroup1);
} }
} }
- this.minecraft.func_110434_K().func_110577_a(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + itemgroup.func_78015_f())); - this.field_230706_i_.func_110434_K().func_110577_a(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + itemgroup.func_78015_f()));
+ if (tabPage != 0) { + if (tabPage != 0) {
+ if (itemgroup != ItemGroup.field_78027_g) { + if (itemgroup != ItemGroup.field_78027_g) {
+ this.minecraft.func_110434_K().func_110577_a(ItemGroup.field_78027_g.getTabsImage()); + this.field_230706_i_.func_110434_K().func_110577_a(ItemGroup.field_78027_g.getTabsImage());
+ func_147051_a(ItemGroup.field_78027_g); + func_238808_a_(p_230450_1_, ItemGroup.field_78027_g);
+ } + }
+ if (itemgroup != ItemGroup.field_78036_m) { + if (itemgroup != ItemGroup.field_78036_m) {
+ this.minecraft.func_110434_K().func_110577_a(ItemGroup.field_78036_m.getTabsImage()); + this.field_230706_i_.func_110434_K().func_110577_a(ItemGroup.field_78036_m.getTabsImage());
+ func_147051_a(ItemGroup.field_78036_m); + func_238808_a_(p_230450_1_, ItemGroup.field_78036_m);
+ } + }
+ } + }
+ +
+ this.minecraft.func_110434_K().func_110577_a(itemgroup.getBackgroundImage()); + this.field_230706_i_.func_110434_K().func_110577_a(itemgroup.getBackgroundImage());
this.blit(this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g); this.func_238474_b_(p_230450_1_, this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g);
this.field_147062_A.render(p_146976_2_, p_146976_3_, p_146976_1_); this.field_147062_A.func_230430_a_(p_230450_1_, p_230450_3_, p_230450_4_, p_230450_2_);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
int i = this.field_147003_i + 175; int i = this.field_147003_i + 175;
int j = this.field_147009_r + 18; int j = this.field_147009_r + 18;
int k = j + 112; int k = j + 112;
- this.minecraft.func_110434_K().func_110577_a(field_147061_u); - this.field_230706_i_.func_110434_K().func_110577_a(field_147061_u);
+ this.minecraft.func_110434_K().func_110577_a(itemgroup.getTabsImage()); + this.field_230706_i_.func_110434_K().func_110577_a(itemgroup.getTabsImage());
if (itemgroup.func_78017_i()) { if (itemgroup.func_78017_i()) {
this.blit(i, j + (int)((float)(k - j - 17) * this.field_147067_x), 232 + (this.func_147055_p() ? 0 : 12), 0, 12, 15); this.func_238474_b_(p_230450_1_, i, j + (int)((float)(k - j - 17) * this.field_147067_x), 232 + (this.func_147055_p() ? 0 : 12), 0, 12, 15);
} }
+ if ((itemgroup == null || itemgroup.getTabPage() != tabPage) && (itemgroup != ItemGroup.field_78027_g && itemgroup != ItemGroup.field_78036_m)) + if ((itemgroup == null || itemgroup.getTabPage() != tabPage) && (itemgroup != ItemGroup.field_78027_g && itemgroup != ItemGroup.field_78036_m))
+ return; + return;
+ +
this.func_147051_a(itemgroup); this.func_238808_a_(p_230450_1_, itemgroup);
if (itemgroup == ItemGroup.field_78036_m) { if (itemgroup == ItemGroup.field_78036_m) {
InventoryScreen.func_228187_a_(this.field_147003_i + 88, this.field_147009_r + 45, 20, (float)(this.field_147003_i + 88 - p_146976_2_), (float)(this.field_147009_r + 45 - 30 - p_146976_3_), this.minecraft.field_71439_g); InventoryScreen.func_228187_a_(this.field_147003_i + 88, this.field_147009_r + 45, 20, (float)(this.field_147003_i + 88 - p_230450_3_), (float)(this.field_147009_r + 45 - 30 - p_230450_4_), this.field_230706_i_.field_71439_g);
@@ -660,6 +740,7 @@ @@ -650,6 +730,7 @@
} }
protected boolean func_195375_a(ItemGroup p_195375_1_, double p_195375_2_, double p_195375_4_) { protected boolean func_195375_a(ItemGroup p_195375_1_, double p_195375_2_, double p_195375_4_) {
@ -244,16 +244,25 @@
int i = p_195375_1_.func_78020_k(); int i = p_195375_1_.func_78020_k();
int j = 28 * i; int j = 28 * i;
int k = 0; int k = 0;
@@ -728,6 +809,8 @@ @@ -718,6 +799,8 @@
i1 = i1 + (this.field_147000_g - 4); i1 = i1 + (this.field_147000_g - 4);
} }
+ RenderSystem.color3f(1F, 1F, 1F); //Forge: Reset color in case Items change it. + RenderSystem.color3f(1F, 1F, 1F); //Forge: Reset color in case Items change it.
+ RenderSystem.enableBlend(); //Forge: Make sure blend is enabled else tabs show a white border. + RenderSystem.enableBlend(); //Forge: Make sure blend is enabled else tabs show a white border.
this.blit(l, i1, j, k, 28, 32); this.func_238474_b_(p_238808_1_, l, i1, j, k, 28, 32);
this.setBlitOffset(100); this.field_230707_j_.field_77023_b = 100.0F;
this.itemRenderer.field_77023_b = 100.0F; l = l + 6;
@@ -896,6 +979,22 @@ @@ -769,6 +852,8 @@
for(int i = 0; i < 5; ++i) {
for(int j = 0; j < 9; ++j) {
this.func_75146_a(new CreativeScreen.LockedSlot(CreativeScreen.field_195378_x, i * 9 + j, 9 + j * 18, 18 + i * 18));
+ RenderSystem.color3f(1F, 1F, 1F); //Forge: Reset color in case Items change it.
+ RenderSystem.enableBlend(); //Forge: Make sure blend is enabled else tabs show a white border.
}
}
@@ -884,6 +969,22 @@
public boolean func_82869_a(PlayerEntity p_82869_1_) { public boolean func_82869_a(PlayerEntity p_82869_1_) {
return this.field_148332_b.func_82869_a(p_82869_1_); return this.field_148332_b.func_82869_a(p_82869_1_);
} }

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/client/gui/toasts/RecipeToast.java
+++ b/net/minecraft/client/gui/toasts/RecipeToast.java
@@ -34,7 +34,7 @@
p_193653_1_.blit(0, 0, 0, 32, 160, 32);
p_193653_1_.func_192989_b().field_71466_p.func_211126_b(I18n.func_135052_a("recipe.toast.title"), 30.0F, 7.0F, -11534256);
p_193653_1_.func_192989_b().field_71466_p.func_211126_b(I18n.func_135052_a("recipe.toast.description"), 30.0F, 18.0F, -16777216);
- IRecipe<?> irecipe = this.field_202906_c.get((int)(p_193653_2_ / (5000L / (long)this.field_202906_c.size()) % (long)this.field_202906_c.size()));
+ IRecipe<?> irecipe = this.field_202906_c.get((int)((p_193653_2_ * (long)this.field_202906_c.size() / 5000L) % (long)this.field_202906_c.size())); //Forge: fix math so that it doesn't divide by 0 when there are more than 5000 recipes
ItemStack itemstack = irecipe.func_222128_h();
RenderSystem.pushMatrix();
RenderSystem.scalef(0.6F, 0.6F, 1.0F);

View file

@ -1,39 +1,39 @@
--- a/net/minecraft/client/gui/widget/Widget.java --- a/net/minecraft/client/gui/widget/Widget.java
+++ b/net/minecraft/client/gui/widget/Widget.java +++ b/net/minecraft/client/gui/widget/Widget.java
@@ -111,7 +111,7 @@ @@ -111,7 +111,7 @@
this.blit(this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height); this.func_238474_b_(p_230431_1_, this.field_230690_l_, this.field_230691_m_, 0, 46 + i * 20, this.field_230688_j_ / 2, this.field_230689_k_);
this.blit(this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height); this.func_238474_b_(p_230431_1_, this.field_230690_l_ + this.field_230688_j_ / 2, this.field_230691_m_, 200 - this.field_230688_j_ / 2, 46 + i * 20, this.field_230688_j_ / 2, this.field_230689_k_);
this.renderBg(minecraft, p_renderButton_1_, p_renderButton_2_); this.func_230441_a_(p_230431_1_, minecraft, p_230431_2_, p_230431_3_);
- int j = this.active ? 16777215 : 10526880; - int j = this.field_230693_o_ ? 16777215 : 10526880;
+ int j = getFGColor(); + int j = getFGColor();
this.drawCenteredString(fontrenderer, this.getMessage(), this.x + this.width / 2, this.y + (this.height - 8) / 2, j | MathHelper.func_76123_f(this.alpha * 255.0F) << 24); this.func_238472_a_(p_230431_1_, fontrenderer, this.func_230458_i_(), this.field_230690_l_ + this.field_230688_j_ / 2, this.field_230691_m_ + (this.field_230689_k_ - 8) / 2, j | MathHelper.func_76123_f(this.field_230695_q_ * 255.0F) << 24);
} }
@@ -206,6 +206,14 @@ @@ -206,6 +206,14 @@
this.width = p_setWidth_1_; this.field_230688_j_ = p_230991_1_;
} }
+ public int getHeight() { + public int getHeight() {
+ return this.height; + return this.field_230689_k_;
+ } + }
+ +
+ public void setHeight(int value) { + public void setHeight(int value) {
+ this.height = value; + this.field_230689_k_ = value;
+ } + }
+ +
public void setAlpha(float p_setAlpha_1_) { public void func_230986_a_(float p_230986_1_) {
this.alpha = p_setAlpha_1_; this.field_230695_q_ = p_230986_1_;
} }
@@ -233,4 +241,17 @@ @@ -233,4 +241,17 @@
protected void setFocused(boolean p_setFocused_1_) { protected void func_230996_d_(boolean p_230996_1_) {
this.focused = p_setFocused_1_; this.field_230686_c_ = p_230996_1_;
} }
+ +
+ public static final int UNSET_FG_COLOR = -1; + public static final int UNSET_FG_COLOR = -1;
+ protected int packedFGColor = UNSET_FG_COLOR; + protected int packedFGColor = UNSET_FG_COLOR;
+ public int getFGColor() { + public int getFGColor() {
+ if (packedFGColor != UNSET_FG_COLOR) return packedFGColor; + if (packedFGColor != UNSET_FG_COLOR) return packedFGColor;
+ return this.active ? 16777215 : 10526880; // White : Light Grey + return this.field_230693_o_ ? 16777215 : 10526880; // White : Light Grey
+ } + }
+ public void setFGColor(int color) { + public void setFGColor(int color) {
+ this.packedFGColor = color; + this.packedFGColor = color;

View file

@ -1,15 +1,15 @@
--- a/net/minecraft/client/gui/widget/list/AbstractList.java --- a/net/minecraft/client/gui/widget/list/AbstractList.java
+++ b/net/minecraft/client/gui/widget/list/AbstractList.java +++ b/net/minecraft/client/gui/widget/list/AbstractList.java
@@ -450,6 +450,13 @@ @@ -471,6 +471,13 @@
return flag; p_238480_1_.field_230666_a_ = this;
} }
+ public int getWidth() { return this.width; } + public int getWidth() { return this.field_230670_d_; }
+ public int getHeight() { return this.height; } + public int getHeight() { return this.field_230671_e_; }
+ public int getTop() { return this.y0; } + public int getTop() { return this.field_230672_i_; }
+ public int getBottom() { return this.y1; } + public int getBottom() { return this.field_230673_j_; }
+ public int getLeft() { return this.x0; } + public int getLeft() { return this.field_230674_k_; }
+ public int getRight() { return this.x1; } + public int getRight() { return this.field_230675_l_; }
+ +
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public abstract static class AbstractListEntry<E extends AbstractList.AbstractListEntry<E>> implements IGuiEventListener { public abstract static class AbstractListEntry<E extends AbstractList.AbstractListEntry<E>> implements IGuiEventListener {

View file

@ -1,60 +1,60 @@
--- a/net/minecraft/client/gui/widget/list/KeyBindingList.java --- a/net/minecraft/client/gui/widget/list/KeyBindingList.java
+++ b/net/minecraft/client/gui/widget/list/KeyBindingList.java +++ b/net/minecraft/client/gui/widget/list/KeyBindingList.java
@@ -45,7 +45,7 @@ @@ -50,7 +50,7 @@
} }
protected int getScrollbarPosition() { protected int func_230952_d_() {
- return super.getScrollbarPosition() + 15; - return super.func_230952_d_() + 15;
+ return super.getScrollbarPosition() + 15 + 20; + return super.func_230952_d_() + 15 + 20;
} }
public int getRowWidth() { public int func_230949_c_() {
@@ -89,7 +89,7 @@ @@ -94,7 +94,7 @@
private KeyEntry(final KeyBinding p_i45029_2_) { private KeyEntry(final KeyBinding p_i232281_2_, final ITextComponent p_i232281_3_) {
this.field_148282_b = p_i45029_2_; this.field_148282_b = p_i232281_2_;
this.field_148283_c = I18n.func_135052_a(p_i45029_2_.func_151464_g()); this.field_148283_c = p_i232281_3_;
- this.field_148280_d = new Button(0, 0, 75, 20, this.field_148283_c, (p_214386_2_) -> { - this.field_148280_d = new Button(0, 0, 75, 20, p_i232281_3_, (p_214386_2_) -> {
+ this.field_148280_d = new Button(0, 0, 75 + 20 /*Forge: add space*/, 20, this.field_148283_c, (p_214386_2_) -> { + this.field_148280_d = new Button(0, 0, 75 + 20 /*Forge: add space*/, 20, p_i232281_3_, (p_214386_2_) -> {
KeyBindingList.this.field_148191_k.field_146491_f = p_i45029_2_; KeyBindingList.this.field_148191_k.field_146491_f = p_i232281_2_;
}) { }) {
protected String getNarrationMessage() { protected IFormattableTextComponent func_230442_c_() {
@@ -97,6 +97,7 @@ @@ -102,6 +102,7 @@
} }
}; };
this.field_148281_e = new Button(0, 0, 50, 20, I18n.func_135052_a("controls.reset"), (p_214387_2_) -> { this.field_148281_e = new Button(0, 0, 50, 20, new TranslationTextComponent("controls.reset"), (p_214387_2_) -> {
+ field_148282_b.setToDefault(); + field_148282_b.setToDefault();
KeyBindingList.this.minecraft.field_71474_y.func_198014_a(p_i45029_2_, p_i45029_2_.func_197977_i()); KeyBindingList.this.field_230668_b_.field_71474_y.func_198014_a(p_i232281_2_, p_i232281_2_.func_197977_i());
KeyBinding.func_74508_b(); KeyBinding.func_74508_b();
}) { }) {
@@ -109,7 +110,7 @@ @@ -114,7 +115,7 @@
public void render(int p_render_1_, int p_render_2_, int p_render_3_, int p_render_4_, int p_render_5_, int p_render_6_, int p_render_7_, boolean p_render_8_, float p_render_9_) { public void func_230432_a_(MatrixStack p_230432_1_, int p_230432_2_, int p_230432_3_, int p_230432_4_, int p_230432_5_, int p_230432_6_, int p_230432_7_, int p_230432_8_, boolean p_230432_9_, float p_230432_10_) {
boolean flag = KeyBindingList.this.field_148191_k.field_146491_f == this.field_148282_b; boolean flag = KeyBindingList.this.field_148191_k.field_146491_f == this.field_148282_b;
KeyBindingList.this.minecraft.field_71466_p.func_211126_b(this.field_148283_c, (float)(p_render_3_ + 90 - KeyBindingList.this.field_148188_n), (float)(p_render_2_ + p_render_5_ / 2 - 9 / 2), 16777215); KeyBindingList.this.field_230668_b_.field_71466_p.func_238422_b_(p_230432_1_, this.field_148283_c, (float)(p_230432_4_ + 90 - KeyBindingList.this.field_148188_n), (float)(p_230432_3_ + p_230432_6_ / 2 - 9 / 2), 16777215);
- this.field_148281_e.x = p_render_3_ + 190; - this.field_148281_e.field_230690_l_ = p_230432_4_ + 190;
+ this.field_148281_e.x = p_render_3_ + 190 + 20; + this.field_148281_e.field_230690_l_ = p_230432_4_ + 190 + 20;
this.field_148281_e.y = p_render_2_; this.field_148281_e.field_230691_m_ = p_230432_3_;
this.field_148281_e.active = !this.field_148282_b.func_197985_l(); this.field_148281_e.field_230693_o_ = !this.field_148282_b.func_197985_l();
this.field_148281_e.render(p_render_6_, p_render_7_, p_render_9_); this.field_148281_e.func_230430_a_(p_230432_1_, p_230432_7_, p_230432_8_, p_230432_10_);
@@ -117,11 +118,12 @@ @@ -122,11 +123,12 @@
this.field_148280_d.y = p_render_2_; this.field_148280_d.field_230691_m_ = p_230432_3_;
this.field_148280_d.setMessage(this.field_148282_b.func_197978_k()); this.field_148280_d.func_238482_a_(this.field_148282_b.func_238171_j_());
boolean flag1 = false; boolean flag1 = false;
+ boolean keyCodeModifierConflict = true; // less severe form of conflict, like SHIFT conflicting with SHIFT+G + boolean keyCodeModifierConflict = true; // less severe form of conflict, like SHIFT conflicting with SHIFT+G
if (!this.field_148282_b.func_197986_j()) { if (!this.field_148282_b.func_197986_j()) {
for(KeyBinding keybinding : KeyBindingList.this.minecraft.field_71474_y.field_74324_K) { for(KeyBinding keybinding : KeyBindingList.this.field_230668_b_.field_71474_y.field_74324_K) {
if (keybinding != this.field_148282_b && this.field_148282_b.func_197983_b(keybinding)) { if (keybinding != this.field_148282_b && this.field_148282_b.func_197983_b(keybinding)) {
flag1 = true; flag1 = true;
- break; - break;
+ keyCodeModifierConflict &= keybinding.hasKeyCodeModifierConflict(this.field_148282_b); + keyCodeModifierConflict &= keybinding.hasKeyCodeModifierConflict(keybinding);
} }
} }
} }
@@ -129,7 +131,7 @@ @@ -134,7 +136,7 @@
if (flag) { if (flag) {
this.field_148280_d.setMessage(TextFormatting.WHITE + "> " + TextFormatting.YELLOW + this.field_148280_d.getMessage() + TextFormatting.WHITE + " <"); this.field_148280_d.func_238482_a_((new StringTextComponent("> ")).func_230529_a_(this.field_148280_d.func_230458_i_().func_230532_e_().func_240699_a_(TextFormatting.YELLOW)).func_240702_b_(" <").func_240699_a_(TextFormatting.YELLOW));
} else if (flag1) { } else if (flag1) {
- this.field_148280_d.setMessage(TextFormatting.RED + this.field_148280_d.getMessage()); - this.field_148280_d.func_238482_a_(this.field_148280_d.func_230458_i_().func_230532_e_().func_240699_a_(TextFormatting.RED));
+ this.field_148280_d.setMessage((keyCodeModifierConflict ? TextFormatting.GOLD : TextFormatting.RED) + this.field_148280_d.getMessage()); + this.field_148280_d.func_238482_a_(this.field_148280_d.func_230458_i_().func_230532_e_().func_240699_a_(keyCodeModifierConflict ? TextFormatting.GOLD : TextFormatting.RED));
} }
this.field_148280_d.render(p_render_6_, p_render_7_, p_render_9_); this.field_148280_d.func_230430_a_(p_230432_1_, p_230432_7_, p_230432_8_, p_230432_10_);

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/multiplayer/PlayerController.java --- a/net/minecraft/client/multiplayer/PlayerController.java
+++ b/net/minecraft/client/multiplayer/PlayerController.java +++ b/net/minecraft/client/multiplayer/PlayerController.java
@@ -92,6 +92,7 @@ @@ -94,6 +94,7 @@
} }
public boolean func_187103_a(BlockPos p_187103_1_) { public boolean func_187103_a(BlockPos p_187103_1_) {
@ -8,7 +8,7 @@
if (this.field_78776_a.field_71439_g.func_223729_a(this.field_78776_a.field_71441_e, p_187103_1_, this.field_78779_k)) { if (this.field_78776_a.field_71439_g.func_223729_a(this.field_78776_a.field_71441_e, p_187103_1_, this.field_78779_k)) {
return false; return false;
} else { } else {
@@ -103,12 +104,11 @@ @@ -105,12 +106,11 @@
Block block = blockstate.func_177230_c(); Block block = blockstate.func_177230_c();
if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) { if ((block instanceof CommandBlockBlock || block instanceof StructureBlock || block instanceof JigsawBlock) && !this.field_78776_a.field_71439_g.func_195070_dx()) {
return false; return false;
@ -17,18 +17,18 @@
return false; return false;
} else { } else {
- block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g); - block.func_176208_a(world, p_187103_1_, blockstate, this.field_78776_a.field_71439_g);
IFluidState ifluidstate = world.func_204610_c(p_187103_1_); FluidState fluidstate = world.func_204610_c(p_187103_1_);
- boolean flag = world.func_180501_a(p_187103_1_, ifluidstate.func_206883_i(), 11); - boolean flag = world.func_180501_a(p_187103_1_, fluidstate.func_206883_i(), 11);
+ boolean flag = blockstate.removedByPlayer(world, p_187103_1_, field_78776_a.field_71439_g, false, ifluidstate); + boolean flag = blockstate.removedByPlayer(world, p_187103_1_, field_78776_a.field_71439_g, false, fluidstate);
if (flag) { if (flag) {
block.func_176206_d(world, p_187103_1_, blockstate); block.func_176206_d(world, p_187103_1_, blockstate);
} }
@@ -129,21 +129,25 @@ @@ -131,21 +131,25 @@
BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_); BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180511_1_);
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate, 1.0F); this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180511_1_, blockstate, 1.0F);
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_); this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_);
+ if (!net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180511_1_, p_180511_2_).isCanceled()) + if (!net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180511_1_, p_180511_2_).isCanceled())
func_178891_a(this.field_78776_a, this, p_180511_1_, p_180511_2_); this.func_187103_a(p_180511_1_);
this.field_78781_i = 5; this.field_78781_i = 5;
} else if (!this.field_78778_j || !this.func_178893_a(p_180511_1_)) { } else if (!this.field_78778_j || !this.func_178893_a(p_180511_1_)) {
if (this.field_78778_j) { if (this.field_78778_j) {
@ -50,12 +50,12 @@
if (flag && blockstate1.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F) { if (flag && blockstate1.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F) {
this.func_187103_a(p_180511_1_); this.func_187103_a(p_180511_1_);
} else { } else {
@@ -183,22 +187,24 @@ @@ -185,22 +189,24 @@
BlockState blockstate1 = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_); BlockState blockstate1 = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_);
this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180512_1_, blockstate1, 1.0F); this.field_78776_a.func_193032_ao().func_193294_a(this.field_78776_a.field_71441_e, p_180512_1_, blockstate1, 1.0F);
this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180512_1_, p_180512_2_); this.func_225324_a(CPlayerDiggingPacket.Action.START_DESTROY_BLOCK, p_180512_1_, p_180512_2_);
+ if (!net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180512_1_, p_180512_2_).isCanceled()) + if (!net.minecraftforge.common.ForgeHooks.onLeftClickBlock(this.field_78776_a.field_71439_g, p_180512_1_, p_180512_2_).isCanceled())
func_178891_a(this.field_78776_a, this, p_180512_1_, p_180512_2_); this.func_187103_a(p_180512_1_);
return true; return true;
} else if (this.func_178893_a(p_180512_1_)) { } else if (this.func_178893_a(p_180512_1_)) {
BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_); BlockState blockstate = this.field_78776_a.field_71441_e.func_180495_p(p_180512_1_);
@ -77,7 +77,7 @@
if (this.field_78770_f >= 1.0F) { if (this.field_78770_f >= 1.0F) {
this.field_78778_j = false; this.field_78778_j = false;
this.func_225324_a(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, p_180512_1_, p_180512_2_); this.func_225324_a(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, p_180512_1_, p_180512_2_);
@@ -217,7 +223,8 @@ @@ -219,7 +225,8 @@
} }
public float func_78757_d() { public float func_78757_d() {
@ -87,7 +87,7 @@
} }
public void func_78765_e() { public void func_78765_e() {
@@ -234,7 +241,7 @@ @@ -236,7 +243,7 @@
ItemStack itemstack = this.field_78776_a.field_71439_g.func_184614_ca(); ItemStack itemstack = this.field_78776_a.field_71439_g.func_184614_ca();
boolean flag = this.field_85183_f.func_190926_b() && itemstack.func_190926_b(); boolean flag = this.field_85183_f.func_190926_b() && itemstack.func_190926_b();
if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) { if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b()) {
@ -96,7 +96,7 @@
} }
return p_178893_1_.equals(this.field_178895_c) && flag; return p_178893_1_.equals(this.field_178895_c) && flag;
@@ -256,13 +263,27 @@ @@ -258,13 +265,27 @@
return ActionResultType.FAIL; return ActionResultType.FAIL;
} else { } else {
ItemStack itemstack = p_217292_1_.func_184586_b(p_217292_3_); ItemStack itemstack = p_217292_1_.func_184586_b(p_217292_3_);
@ -126,7 +126,7 @@
ActionResultType actionresulttype = p_217292_2_.func_180495_p(blockpos).func_227031_a_(p_217292_2_, p_217292_1_, p_217292_3_, p_217292_4_); ActionResultType actionresulttype = p_217292_2_.func_180495_p(blockpos).func_227031_a_(p_217292_2_, p_217292_1_, p_217292_3_, p_217292_4_);
if (actionresulttype.func_226246_a_()) { if (actionresulttype.func_226246_a_()) {
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_)); this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
@@ -271,8 +292,8 @@ @@ -273,8 +294,8 @@
} }
this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_)); this.field_78774_b.func_147297_a(new CPlayerTryUseItemOnBlockPacket(p_217292_3_, p_217292_4_));
@ -136,7 +136,7 @@
ActionResultType actionresulttype1; ActionResultType actionresulttype1;
if (this.field_78779_k.func_77145_d()) { if (this.field_78779_k.func_77145_d()) {
int i = itemstack.func_190916_E(); int i = itemstack.func_190916_E();
@@ -300,11 +321,14 @@ @@ -302,11 +323,14 @@
if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) { if (p_187101_1_.func_184811_cZ().func_185141_a(itemstack.func_77973_b())) {
return ActionResultType.PASS; return ActionResultType.PASS;
} else { } else {
@ -145,29 +145,29 @@
int i = itemstack.func_190916_E(); int i = itemstack.func_190916_E();
ActionResult<ItemStack> actionresult = itemstack.func_77957_a(p_187101_2_, p_187101_1_, p_187101_3_); ActionResult<ItemStack> actionresult = itemstack.func_77957_a(p_187101_2_, p_187101_1_, p_187101_3_);
ItemStack itemstack1 = actionresult.func_188398_b(); ItemStack itemstack1 = actionresult.func_188398_b();
if (itemstack1 != itemstack || itemstack1.func_190916_E() != i) { if (itemstack1 != itemstack) {
p_187101_1_.func_184611_a(p_187101_3_, itemstack1); p_187101_1_.func_184611_a(p_187101_3_, itemstack1);
+ if (itemstack1.func_190926_b()) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187101_1_, itemstack, p_187101_3_); + if (itemstack1.func_190926_b()) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187101_1_, itemstack, p_187101_3_);
} }
return actionresult.func_188397_a(); return actionresult.func_188397_a();
@@ -329,6 +353,9 @@ @@ -335,6 +359,9 @@
public ActionResultType func_187097_a(PlayerEntity p_187097_1_, Entity p_187097_2_, Hand p_187097_3_) { public ActionResultType func_187097_a(PlayerEntity p_187097_1_, Entity p_187097_2_, Hand p_187097_3_) {
this.func_78750_j(); this.func_78750_j();
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187097_2_, p_187097_3_)); this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187097_2_, p_187097_3_, p_187097_1_.func_225608_bj_()));
+ if (this.field_78779_k == GameType.SPECTATOR) return ActionResultType.PASS; // don't fire for spectators to match non-specific EntityInteract + if (this.field_78779_k == GameType.SPECTATOR) return ActionResultType.PASS; // don't fire for spectators to match non-specific EntityInteract
+ ActionResultType cancelResult = net.minecraftforge.common.ForgeHooks.onInteractEntity(p_187097_1_, p_187097_2_, p_187097_3_); + ActionResultType cancelResult = net.minecraftforge.common.ForgeHooks.onInteractEntity(p_187097_1_, p_187097_2_, p_187097_3_);
+ if(cancelResult != null) return cancelResult; + if(cancelResult != null) return cancelResult;
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_); return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187097_1_.func_190775_a(p_187097_2_, p_187097_3_);
} }
@@ -336,6 +363,9 @@ @@ -342,6 +369,9 @@
this.func_78750_j(); this.func_78750_j();
Vec3d vec3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.func_226277_ct_(), p_187102_2_.func_226278_cu_(), p_187102_2_.func_226281_cx_()); Vector3d vector3d = p_187102_3_.func_216347_e().func_178786_a(p_187102_2_.func_226277_ct_(), p_187102_2_.func_226278_cu_(), p_187102_2_.func_226281_cx_());
this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vec3d)); this.field_78774_b.func_147297_a(new CUseEntityPacket(p_187102_2_, p_187102_4_, vector3d, p_187102_1_.func_225608_bj_()));
+ if (this.field_78779_k == GameType.SPECTATOR) return ActionResultType.PASS; // don't fire for spectators to match non-specific EntityInteract + if (this.field_78779_k == GameType.SPECTATOR) return ActionResultType.PASS; // don't fire for spectators to match non-specific EntityInteract
+ ActionResultType cancelResult = net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_187102_1_, p_187102_2_, p_187102_3_, p_187102_4_); + ActionResultType cancelResult = net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_187102_1_, p_187102_2_, p_187102_3_, p_187102_4_);
+ if(cancelResult != null) return cancelResult; + if(cancelResult != null) return cancelResult;
return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187102_2_.func_184199_a(p_187102_1_, vec3d, p_187102_4_); return this.field_78779_k == GameType.SPECTATOR ? ActionResultType.PASS : p_187102_2_.func_184199_a(p_187102_1_, vector3d, p_187102_4_);
} }

View file

@ -1,7 +1,7 @@
--- a/net/minecraft/client/multiplayer/ServerData.java --- a/net/minecraft/client/multiplayer/ServerData.java
+++ b/net/minecraft/client/multiplayer/ServerData.java +++ b/net/minecraft/client/multiplayer/ServerData.java
@@ -22,6 +22,7 @@ @@ -26,6 +26,7 @@
private ServerData.ServerResourceMode field_152587_j = ServerData.ServerResourceMode.PROMPT; @Nullable
private String field_147411_m; private String field_147411_m;
private boolean field_181042_l; private boolean field_181042_l;
+ public net.minecraftforge.fml.client.ExtendedServerListData forgeData = null; + public net.minecraftforge.fml.client.ExtendedServerListData forgeData = null;

View file

@ -1,7 +1,7 @@
--- a/net/minecraft/client/network/ServerPinger.java --- a/net/minecraft/client/network/ServerPinger.java
+++ b/net/minecraft/client/network/ServerPinger.java +++ b/net/minecraft/client/network/ServerPinger.java
@@ -120,6 +120,8 @@ @@ -116,6 +116,8 @@
p_147224_1_.func_147407_a((String)null); p_147224_2_.run();
} }
+ net.minecraftforge.fml.client.ClientHooks.processForgeListPingData(serverstatusresponse, p_147224_1_); + net.minecraftforge.fml.client.ClientHooks.processForgeListPingData(serverstatusresponse, p_147224_1_);

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/network/play/ClientPlayNetHandler.java --- a/net/minecraft/client/network/play/ClientPlayNetHandler.java
+++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java +++ b/net/minecraft/client/network/play/ClientPlayNetHandler.java
@@ -361,6 +361,7 @@ @@ -388,6 +388,7 @@
this.field_147299_f.field_184132_p.func_217737_a(); this.field_147299_f.field_184132_p.func_217737_a();
this.field_147299_f.field_71439_g.func_70065_x(); this.field_147299_f.field_71439_g.func_70065_x();
@ -8,38 +8,18 @@
int i = p_147282_1_.func_149197_c(); int i = p_147282_1_.func_149197_c();
this.field_147300_g.func_217408_a(i, this.field_147299_f.field_71439_g); this.field_147300_g.func_217408_a(i, this.field_147299_f.field_71439_g);
this.field_147299_f.field_71439_g.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y); this.field_147299_f.field_71439_g.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
@@ -372,6 +373,7 @@ @@ -399,6 +400,7 @@
this.field_147299_f.field_71439_g.func_175150_k(p_147282_1_.func_179744_h());
this.field_147299_f.field_71439_g.func_228355_a_(p_147282_1_.func_229743_k_()); this.field_147299_f.field_71439_g.func_228355_a_(p_147282_1_.func_229743_k_());
this.field_147299_f.field_71442_b.func_78746_a(p_147282_1_.func_149198_e()); this.field_147299_f.field_71442_b.func_78746_a(p_147282_1_.func_149198_e());
this.field_147299_f.field_71442_b.func_241675_a_(p_147282_1_.func_241786_f_());
+ net.minecraftforge.fml.network.NetworkHooks.sendMCRegistryPackets(field_147302_e, "PLAY_TO_SERVER"); + net.minecraftforge.fml.network.NetworkHooks.sendMCRegistryPackets(field_147302_e, "PLAY_TO_SERVER");
this.field_147299_f.field_71474_y.func_82879_c(); this.field_147299_f.field_71474_y.func_82879_c();
this.field_147302_e.func_179290_a(new CCustomPayloadPacket(CCustomPayloadPacket.field_210344_a, (new PacketBuffer(Unpooled.buffer())).func_180714_a(ClientBrandRetriever.getClientModName()))); this.field_147302_e.func_179290_a(new CCustomPayloadPacket(CCustomPayloadPacket.field_210344_a, (new PacketBuffer(Unpooled.buffer())).func_180714_a(ClientBrandRetriever.getClientModName())));
this.field_147299_f.func_213229_ar().func_216814_a(); this.field_147299_f.func_213229_ar().func_216814_a();
@@ -727,7 +729,7 @@ @@ -1034,8 +1036,10 @@
BlockPos blockpos = new BlockPos(compoundnbt.func_74762_e("x"), compoundnbt.func_74762_e("y"), compoundnbt.func_74762_e("z")); clientplayerentity1.func_233645_dx_().func_233784_a_(clientplayerentity.func_233645_dx_());
TileEntity tileentity = this.field_147300_g.func_175625_s(blockpos);
if (tileentity != null) {
- tileentity.func_145839_a(compoundnbt);
+ tileentity.handleUpdateTag(compoundnbt);
}
} }
@@ -803,7 +805,9 @@
public void func_147251_a(SChatPacket p_147251_1_) {
PacketThreadUtil.func_218797_a(p_147251_1_, this, this.field_147299_f);
- this.field_147299_f.field_71456_v.func_191742_a(p_147251_1_.func_192590_c(), p_147251_1_.func_148915_c());
+ net.minecraft.util.text.ITextComponent message = net.minecraftforge.event.ForgeEventFactory.onClientChat(p_147251_1_.func_192590_c(), p_147251_1_.func_148915_c());
+ if (message == null) return;
+ this.field_147299_f.field_71456_v.func_191742_a(p_147251_1_.func_192590_c(), message);
}
public void func_147279_a(SAnimateHandPacket p_147279_1_) {
@@ -983,8 +987,10 @@
this.field_147299_f.field_175622_Z = clientplayerentity1;
clientplayerentity1.func_184212_Q().func_187218_a(clientplayerentity.func_184212_Q().func_187231_c());
clientplayerentity1.func_110140_aT().func_226303_a_(clientplayerentity.func_110140_aT());
+ clientplayerentity1.updateSyncFields(clientplayerentity); // Forge: fix MC-10657 + clientplayerentity1.updateSyncFields(clientplayerentity); // Forge: fix MC-10657
clientplayerentity1.func_70065_x(); clientplayerentity1.func_70065_x();
clientplayerentity1.func_175158_f(s); clientplayerentity1.func_175158_f(s);
@ -47,10 +27,10 @@
this.field_147300_g.func_217408_a(i, clientplayerentity1); this.field_147300_g.func_217408_a(i, clientplayerentity1);
clientplayerentity1.field_70177_z = -180.0F; clientplayerentity1.field_70177_z = -180.0F;
clientplayerentity1.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y); clientplayerentity1.field_71158_b = new MovementInputFromOptions(this.field_147299_f.field_71474_y);
@@ -1105,6 +1111,12 @@ @@ -1161,6 +1165,12 @@
boolean flag = i == 2 && tileentity instanceof CommandBlockTileEntity;
if (i == 1 && tileentity instanceof MobSpawnerTileEntity || flag || i == 3 && tileentity instanceof BeaconTileEntity || i == 4 && tileentity instanceof SkullTileEntity || i == 6 && tileentity instanceof BannerTileEntity || i == 7 && tileentity instanceof StructureBlockTileEntity || i == 8 && tileentity instanceof EndGatewayTileEntity || i == 9 && tileentity instanceof SignTileEntity || i == 11 && tileentity instanceof BedTileEntity || i == 5 && tileentity instanceof ConduitTileEntity || i == 12 && tileentity instanceof JigsawTileEntity || i == 13 && tileentity instanceof CampfireTileEntity || i == 14 && tileentity instanceof BeehiveTileEntity) { if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) {
tileentity.func_145839_a(p_147273_1_.func_148857_g()); ((CommandBlockScreen)this.field_147299_f.field_71462_r).func_184075_a();
+ } else { + } else {
+ if(tileentity == null) { + if(tileentity == null) {
+ field_147301_d.error("Received invalid update packet for null tile entity at {} with data: {}", p_147273_1_.func_179823_a(), p_147273_1_.func_148857_g()); + field_147301_d.error("Received invalid update packet for null tile entity at {} with data: {}", p_147273_1_.func_179823_a(), p_147273_1_.func_148857_g());
@ -59,8 +39,8 @@
+ tileentity.onDataPacket(field_147302_e, p_147273_1_); + tileentity.onDataPacket(field_147302_e, p_147273_1_);
} }
if (flag && this.field_147299_f.field_71462_r instanceof CommandBlockScreen) { }
@@ -1276,6 +1288,7 @@ @@ -1329,6 +1339,7 @@
clientrecipebook.func_199644_c(); clientrecipebook.func_199644_c();
clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a); clientrecipebook.func_199642_d().forEach(imutablesearchtree::func_217872_a);
imutablesearchtree.func_194040_a(); imutablesearchtree.func_194040_a();
@ -68,7 +48,7 @@
} }
public void func_200232_a(SPlayerLookPacket p_200232_1_) { public void func_200232_a(SPlayerLookPacket p_200232_1_) {
@@ -1356,7 +1369,7 @@ @@ -1409,7 +1420,7 @@
PacketThreadUtil.func_218797_a(p_147260_1_, this, this.field_147299_f); PacketThreadUtil.func_218797_a(p_147260_1_, this, this.field_147299_f);
Entity entity = this.field_147300_g.func_73045_a(p_147260_1_.func_149426_d()); Entity entity = this.field_147300_g.func_73045_a(p_147260_1_.func_149426_d());
if (entity instanceof LivingEntity) { if (entity instanceof LivingEntity) {
@ -77,7 +57,7 @@
if (effect != null) { if (effect != null) {
EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h()); EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h());
effectinstance.func_100012_b(p_147260_1_.func_149429_c()); effectinstance.func_100012_b(p_147260_1_.func_149429_c());
@@ -1376,6 +1389,7 @@ @@ -1426,6 +1437,7 @@
} }
this.field_147299_f.func_213253_a(SearchTreeManager.field_215360_b).func_194040_a(); this.field_147299_f.func_213253_a(SearchTreeManager.field_215360_b).func_194040_a();
@ -85,9 +65,9 @@
} }
public void func_175098_a(SCombatPacket p_175098_1_) { public void func_175098_a(SCombatPacket p_175098_1_) {
@@ -1851,10 +1865,12 @@ @@ -1909,10 +1921,12 @@
int l5 = packetbuffer.readInt(); int l5 = packetbuffer.readInt();
this.field_147299_f.field_184132_p.field_229018_q_.func_229022_a_(blockpos7, l3, s10, l5); this.field_147299_f.field_184132_p.field_229018_q_.func_229022_a_(blockpos8, l3, s10, l5);
} else { } else {
- field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation); - field_147301_d.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
+ if (!net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(p_147240_1_, this.field_147302_e)) + if (!net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(p_147240_1_, this.field_147302_e))
@ -99,12 +79,3 @@
packetbuffer.release(); packetbuffer.release();
} }
@@ -1994,7 +2010,7 @@
for(SEntityPropertiesPacket.Snapshot sentitypropertiespacket$snapshot : p_147290_1_.func_149441_d()) {
IAttributeInstance iattributeinstance = abstractattributemap.func_111152_a(sentitypropertiespacket$snapshot.func_151409_a());
if (iattributeinstance == null) {
- iattributeinstance = abstractattributemap.func_111150_b(new RangedAttribute((IAttribute)null, sentitypropertiespacket$snapshot.func_151409_a(), 0.0D, Double.MIN_NORMAL, Double.MAX_VALUE));
+ iattributeinstance = abstractattributemap.func_111150_b(new RangedAttribute((IAttribute)null, sentitypropertiespacket$snapshot.func_151409_a(), 0.0D, -Double.MAX_VALUE, Double.MAX_VALUE)); // FORGE: fix invalid value range (MC-150405)
}
iattributeinstance.func_111128_a(sentitypropertiespacket$snapshot.func_151410_b());

View file

@ -1,19 +1,19 @@
--- a/net/minecraft/client/particle/DiggingParticle.java --- a/net/minecraft/client/particle/DiggingParticle.java
+++ b/net/minecraft/client/particle/DiggingParticle.java +++ b/net/minecraft/client/particle/DiggingParticle.java
@@ -37,6 +37,7 @@ @@ -36,6 +36,7 @@
} }
public DiggingParticle func_174846_a(BlockPos p_174846_1_) { public DiggingParticle func_174846_a(BlockPos p_174846_1_) {
+ updateSprite(p_174846_1_); + updateSprite(p_174846_1_);
this.field_181019_az = p_174846_1_; this.field_181019_az = p_174846_1_;
if (this.field_174847_a.func_177230_c() == Blocks.field_196658_i) { if (this.field_174847_a.func_203425_a(Blocks.field_196658_i)) {
return this; return this;
@@ -94,7 +95,13 @@ @@ -92,7 +93,13 @@
public static class Factory implements IParticleFactory<BlockParticleData> { public static class Factory implements IParticleFactory<BlockParticleData> {
public Particle func_199234_a(BlockParticleData p_199234_1_, World p_199234_2_, double p_199234_3_, double p_199234_5_, double p_199234_7_, double p_199234_9_, double p_199234_11_, double p_199234_13_) { public Particle func_199234_a(BlockParticleData p_199234_1_, ClientWorld p_199234_2_, double p_199234_3_, double p_199234_5_, double p_199234_7_, double p_199234_9_, double p_199234_11_, double p_199234_13_) {
BlockState blockstate = p_199234_1_.func_197584_c(); BlockState blockstate = p_199234_1_.func_197584_c();
- return !blockstate.func_196958_f() && blockstate.func_177230_c() != Blocks.field_196603_bb ? (new DiggingParticle(p_199234_2_, p_199234_3_, p_199234_5_, p_199234_7_, p_199234_9_, p_199234_11_, p_199234_13_, blockstate)).func_174845_l() : null; - return !blockstate.func_196958_f() && !blockstate.func_203425_a(Blocks.field_196603_bb) ? (new DiggingParticle(p_199234_2_, p_199234_3_, p_199234_5_, p_199234_7_, p_199234_9_, p_199234_11_, p_199234_13_, blockstate)).func_174845_l() : null;
+ return !blockstate.func_196958_f() && blockstate.func_177230_c() != Blocks.field_196603_bb ? (new DiggingParticle(p_199234_2_, p_199234_3_, p_199234_5_, p_199234_7_, p_199234_9_, p_199234_11_, p_199234_13_, blockstate)).func_174845_l().updateSprite(p_199234_1_.getPos()) : null; + return !blockstate.func_196958_f() && !blockstate.func_203425_a(Blocks.field_196603_bb) ? (new DiggingParticle(p_199234_2_, p_199234_3_, p_199234_5_, p_199234_7_, p_199234_9_, p_199234_11_, p_199234_13_, blockstate)).func_174845_l().updateSprite(p_199234_1_.getPos()) : null;
} }
} }
+ +

View file

@ -9,7 +9,7 @@
private final Queue<Particle> field_187241_h = Queues.newArrayDeque(); private final Queue<Particle> field_187241_h = Queues.newArrayDeque();
private final Map<ResourceLocation, ParticleManager.AnimatedSpriteImpl> field_215242_i = Maps.newHashMap(); private final Map<ResourceLocation, ParticleManager.AnimatedSpriteImpl> field_215242_i = Maps.newHashMap();
private final AtlasTexture field_215243_j = new AtlasTexture(AtlasTexture.field_215262_g); private final AtlasTexture field_215243_j = new AtlasTexture(AtlasTexture.field_215262_g);
@@ -143,13 +143,13 @@ @@ -153,13 +153,13 @@
} }
public <T extends IParticleData> void func_199283_a(ParticleType<T> p_199283_1_, IParticleFactory<T> p_199283_2_) { public <T extends IParticleData> void func_199283_a(ParticleType<T> p_199283_1_, IParticleFactory<T> p_199283_2_) {
@ -25,7 +25,7 @@
} }
public CompletableFuture<Void> func_215226_a(IFutureReloadListener.IStage p_215226_1_, IResourceManager p_215226_2_, IProfiler p_215226_3_, IProfiler p_215226_4_, Executor p_215226_5_, Executor p_215226_6_) { public CompletableFuture<Void> func_215226_a(IFutureReloadListener.IStage p_215226_1_, IResourceManager p_215226_2_, IProfiler p_215226_3_, IProfiler p_215226_4_, Executor p_215226_5_, Executor p_215226_6_) {
@@ -238,11 +238,12 @@ @@ -248,7 +248,7 @@
@Nullable @Nullable
private <T extends IParticleData> Particle func_199927_b(T p_199927_1_, double p_199927_2_, double p_199927_4_, double p_199927_6_, double p_199927_8_, double p_199927_10_, double p_199927_12_) { private <T extends IParticleData> Particle func_199927_b(T p_199927_1_, double p_199927_2_, double p_199927_4_, double p_199927_6_, double p_199927_8_, double p_199927_10_, double p_199927_12_) {
@ -34,12 +34,7 @@
return iparticlefactory == null ? null : iparticlefactory.func_199234_a(p_199927_1_, this.field_78878_a, p_199927_2_, p_199927_4_, p_199927_6_, p_199927_8_, p_199927_10_, p_199927_12_); return iparticlefactory == null ? null : iparticlefactory.func_199234_a(p_199927_1_, this.field_78878_a, p_199927_2_, p_199927_4_, p_199927_6_, p_199927_8_, p_199927_10_, p_199927_12_);
} }
public void func_78873_a(Particle p_78873_1_) { @@ -315,14 +315,18 @@
+ if (p_78873_1_ == null) return; //Forge: Prevent modders from being bad and adding nulls causing untraceable NPEs.
this.field_187241_h.add(p_78873_1_);
}
@@ -305,14 +306,18 @@
public void func_228345_a_(MatrixStack p_228345_1_, IRenderTypeBuffer.Impl p_228345_2_, LightTexture p_228345_3_, ActiveRenderInfo p_228345_4_, float p_228345_5_) { public void func_228345_a_(MatrixStack p_228345_1_, IRenderTypeBuffer.Impl p_228345_2_, LightTexture p_228345_3_, ActiveRenderInfo p_228345_4_, float p_228345_5_) {
p_228345_3_.func_205109_c(); p_228345_3_.func_205109_c();
@ -59,7 +54,7 @@
Iterable<Particle> iterable = this.field_78876_b.get(iparticlerendertype); Iterable<Particle> iterable = this.field_78876_b.get(iparticlerendertype);
if (iterable != null) { if (iterable != null) {
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -351,7 +356,7 @@ @@ -362,7 +366,7 @@
} }
public void func_180533_a(BlockPos p_180533_1_, BlockState p_180533_2_) { public void func_180533_a(BlockPos p_180533_1_, BlockState p_180533_2_) {
@ -68,7 +63,7 @@
VoxelShape voxelshape = p_180533_2_.func_196954_c(this.field_78878_a, p_180533_1_); VoxelShape voxelshape = p_180533_2_.func_196954_c(this.field_78878_a, p_180533_1_);
double d0 = 0.25D; double d0 = 0.25D;
voxelshape.func_197755_b((p_228348_3_, p_228348_5_, p_228348_7_, p_228348_9_, p_228348_11_, p_228348_13_) -> { voxelshape.func_197755_b((p_228348_3_, p_228348_5_, p_228348_7_, p_228348_9_, p_228348_11_, p_228348_13_) -> {
@@ -423,6 +428,12 @@ @@ -434,6 +438,12 @@
return String.valueOf(this.field_78876_b.values().stream().mapToInt(Collection::size).sum()); return String.valueOf(this.field_78876_b.values().stream().mapToInt(Collection::size).sum());
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/ActiveRenderInfo.java --- a/net/minecraft/client/renderer/ActiveRenderInfo.java
+++ b/net/minecraft/client/renderer/ActiveRenderInfo.java +++ b/net/minecraft/client/renderer/ActiveRenderInfo.java
@@ -168,4 +168,16 @@ @@ -170,4 +170,16 @@
this.field_216791_c = null; this.field_216791_c = null;
this.field_216789_a = false; this.field_216789_a = false;
} }

View file

@ -1,101 +1,105 @@
--- a/net/minecraft/client/renderer/BlockModelRenderer.java --- a/net/minecraft/client/renderer/BlockModelRenderer.java
+++ b/net/minecraft/client/renderer/BlockModelRenderer.java +++ b/net/minecraft/client/renderer/BlockModelRenderer.java
@@ -37,13 +37,18 @@ @@ -37,65 +37,78 @@
this.field_187499_a = p_i46575_1_; this.field_187499_a = p_i46575_1_;
} }
+ @Deprecated //Forge: Model data argument + @Deprecated //Forge: Model data argument
public boolean func_228802_a_(ILightReader p_228802_1_, IBakedModel p_228802_2_, BlockState p_228802_3_, BlockPos p_228802_4_, MatrixStack p_228802_5_, IVertexBuilder p_228802_6_, boolean p_228802_7_, Random p_228802_8_, long p_228802_9_, int p_228802_11_) { public boolean func_228802_a_(IBlockDisplayReader p_228802_1_, IBakedModel p_228802_2_, BlockState p_228802_3_, BlockPos p_228802_4_, MatrixStack p_228802_5_, IVertexBuilder p_228802_6_, boolean p_228802_7_, Random p_228802_8_, long p_228802_9_, int p_228802_11_) {
- boolean flag = Minecraft.func_71379_u() && p_228802_3_.func_185906_d() == 0 && p_228802_2_.func_177555_b(); - boolean flag = Minecraft.func_71379_u() && p_228802_3_.func_185906_d() == 0 && p_228802_2_.func_177555_b();
- Vector3d vector3d = p_228802_3_.func_191059_e(p_228802_1_, p_228802_4_);
- p_228802_5_.func_227861_a_(vector3d.field_72450_a, vector3d.field_72448_b, vector3d.field_72449_c);
+ return renderModel(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE); + return renderModel(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ } + }
+ public boolean renderModel(ILightReader p_228802_1_, IBakedModel p_228802_2_, BlockState p_228802_3_, BlockPos p_228802_4_, MatrixStack p_228802_5_, IVertexBuilder p_228802_6_, boolean p_228802_7_, Random p_228802_8_, long p_228802_9_, int p_228802_11_, net.minecraftforge.client.model.data.IModelData modelData) { + public boolean renderModel(IBlockDisplayReader worldIn, IBakedModel modelIn, BlockState stateIn, BlockPos posIn, MatrixStack matrixIn, IVertexBuilder buffer, boolean checkSides, Random randomIn, long rand, int combinedOverlayIn, net.minecraftforge.client.model.data.IModelData modelData) {
+ boolean flag = Minecraft.func_71379_u() && p_228802_3_.getLightValue(p_228802_1_, p_228802_4_) == 0 && p_228802_2_.func_177555_b(); + boolean flag = Minecraft.func_71379_u() && stateIn.getLightValue(worldIn, posIn) == 0 && modelIn.func_177555_b();
Vec3d vec3d = p_228802_3_.func_191059_e(p_228802_1_, p_228802_4_); + Vector3d vector3d = stateIn.func_191059_e(worldIn, posIn);
p_228802_5_.func_227861_a_(vec3d.field_72450_a, vec3d.field_72448_b, vec3d.field_72449_c); + matrixIn.func_227861_a_(vector3d.field_72450_a, vector3d.field_72448_b, vector3d.field_72449_c);
+ modelData = p_228802_2_.getModelData(p_228802_1_, p_228802_4_, p_228802_3_, modelData); + modelData = modelIn.getModelData(worldIn, posIn, stateIn, modelData);
try { try {
- return flag ? this.func_228805_b_(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_) : this.func_228806_c_(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_); - return flag ? this.func_228805_b_(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_) : this.func_228806_c_(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_);
+ return flag ? this.renderModelSmooth(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_, modelData) : this.renderModelFlat(p_228802_1_, p_228802_2_, p_228802_3_, p_228802_4_, p_228802_5_, p_228802_6_, p_228802_7_, p_228802_8_, p_228802_9_, p_228802_11_, modelData); + return flag ? this.renderModelSmooth(worldIn, modelIn, stateIn, posIn, matrixIn, buffer, checkSides, randomIn, rand, combinedOverlayIn, modelData) : this.renderModelFlat(worldIn, modelIn, stateIn, posIn, matrixIn, buffer, checkSides, randomIn, rand, combinedOverlayIn, modelData);
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.func_85055_a(throwable, "Tesselating block model"); CrashReport crashreport = CrashReport.func_85055_a(throwable, "Tesselating block model");
CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block model being tesselated"); CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block model being tesselated");
@@ -53,7 +58,11 @@ - CrashReportCategory.func_175750_a(crashreportcategory, p_228802_4_, p_228802_3_);
+ CrashReportCategory.func_175750_a(crashreportcategory, posIn, stateIn);
crashreportcategory.func_71507_a("Using AO", flag);
throw new ReportedException(crashreport);
} }
} }
+ @Deprecated //Forge: Model data argument + @Deprecated //Forge: Model data argument
public boolean func_228805_b_(ILightReader p_228805_1_, IBakedModel p_228805_2_, BlockState p_228805_3_, BlockPos p_228805_4_, MatrixStack p_228805_5_, IVertexBuilder p_228805_6_, boolean p_228805_7_, Random p_228805_8_, long p_228805_9_, int p_228805_11_) { public boolean func_228805_b_(IBlockDisplayReader p_228805_1_, IBakedModel p_228805_2_, BlockState p_228805_3_, BlockPos p_228805_4_, MatrixStack p_228805_5_, IVertexBuilder p_228805_6_, boolean p_228805_7_, Random p_228805_8_, long p_228805_9_, int p_228805_11_) {
+ return renderModelSmooth(p_228805_1_, p_228805_2_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, p_228805_7_, p_228805_8_, p_228805_9_, p_228805_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE); + return renderModelSmooth(p_228805_1_, p_228805_2_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, p_228805_7_, p_228805_8_, p_228805_9_, p_228805_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ } + }
+ public boolean renderModelSmooth(ILightReader p_228805_1_, IBakedModel p_228805_2_, BlockState p_228805_3_, BlockPos p_228805_4_, MatrixStack p_228805_5_, IVertexBuilder p_228805_6_, boolean p_228805_7_, Random p_228805_8_, long p_228805_9_, int p_228805_11_, net.minecraftforge.client.model.data.IModelData modelData) { + public boolean renderModelSmooth(IBlockDisplayReader worldIn, IBakedModel modelIn, BlockState stateIn, BlockPos posIn, MatrixStack matrixStackIn, IVertexBuilder buffer, boolean checkSides, Random randomIn, long rand, int combinedOverlayIn, net.minecraftforge.client.model.data.IModelData modelData) {
boolean flag = false; boolean flag = false;
float[] afloat = new float[Direction.values().length * 2]; float[] afloat = new float[Direction.values().length * 2];
BitSet bitset = new BitSet(3); BitSet bitset = new BitSet(3);
@@ -61,7 +70,7 @@ BlockModelRenderer.AmbientOcclusionFace blockmodelrenderer$ambientocclusionface = new BlockModelRenderer.AmbientOcclusionFace();
for(Direction direction : Direction.values()) { for(Direction direction : Direction.values()) {
p_228805_8_.setSeed(p_228805_9_); - p_228805_8_.setSeed(p_228805_9_);
- List<BakedQuad> list = p_228805_2_.func_200117_a(p_228805_3_, direction, p_228805_8_); - List<BakedQuad> list = p_228805_2_.func_200117_a(p_228805_3_, direction, p_228805_8_);
+ List<BakedQuad> list = p_228805_2_.getQuads(p_228805_3_, direction, p_228805_8_, modelData); - if (!list.isEmpty() && (!p_228805_7_ || Block.func_176225_a(p_228805_3_, p_228805_1_, p_228805_4_, direction))) {
if (!list.isEmpty() && (!p_228805_7_ || Block.func_176225_a(p_228805_3_, p_228805_1_, p_228805_4_, direction))) { - this.func_228799_a_(p_228805_1_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, list, afloat, bitset, blockmodelrenderer$ambientocclusionface, p_228805_11_);
this.func_228799_a_(p_228805_1_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, list, afloat, bitset, blockmodelrenderer$ambientocclusionface, p_228805_11_); + randomIn.setSeed(rand);
+ List<BakedQuad> list = modelIn.getQuads(stateIn, direction, randomIn, modelData);
+ if (!list.isEmpty() && (!checkSides || Block.func_176225_a(stateIn, worldIn, posIn, direction))) {
+ this.func_228799_a_(worldIn, stateIn, posIn, matrixStackIn, buffer, list, afloat, bitset, blockmodelrenderer$ambientocclusionface, combinedOverlayIn);
flag = true; flag = true;
@@ -69,7 +78,7 @@ }
} }
p_228805_8_.setSeed(p_228805_9_); - p_228805_8_.setSeed(p_228805_9_);
- List<BakedQuad> list1 = p_228805_2_.func_200117_a(p_228805_3_, (Direction)null, p_228805_8_); - List<BakedQuad> list1 = p_228805_2_.func_200117_a(p_228805_3_, (Direction)null, p_228805_8_);
+ List<BakedQuad> list1 = p_228805_2_.getQuads(p_228805_3_, (Direction)null, p_228805_8_, modelData); + randomIn.setSeed(rand);
+ List<BakedQuad> list1 = modelIn.getQuads(stateIn, (Direction)null, randomIn, modelData);
if (!list1.isEmpty()) { if (!list1.isEmpty()) {
this.func_228799_a_(p_228805_1_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface, p_228805_11_); - this.func_228799_a_(p_228805_1_, p_228805_3_, p_228805_4_, p_228805_5_, p_228805_6_, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface, p_228805_11_);
+ this.func_228799_a_(worldIn, stateIn, posIn, matrixStackIn, buffer, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface, combinedOverlayIn);
flag = true; flag = true;
@@ -78,13 +87,18 @@ }
return flag; return flag;
} }
+ @Deprecated //Forge: Model data argument + @Deprecated //Forge: Model data argument
public boolean func_228806_c_(ILightReader p_228806_1_, IBakedModel p_228806_2_, BlockState p_228806_3_, BlockPos p_228806_4_, MatrixStack p_228806_5_, IVertexBuilder p_228806_6_, boolean p_228806_7_, Random p_228806_8_, long p_228806_9_, int p_228806_11_) { public boolean func_228806_c_(IBlockDisplayReader p_228806_1_, IBakedModel p_228806_2_, BlockState p_228806_3_, BlockPos p_228806_4_, MatrixStack p_228806_5_, IVertexBuilder p_228806_6_, boolean p_228806_7_, Random p_228806_8_, long p_228806_9_, int p_228806_11_) {
+ return renderModelFlat(p_228806_1_, p_228806_2_, p_228806_3_, p_228806_4_, p_228806_5_, p_228806_6_, p_228806_7_, p_228806_8_, p_228806_9_, p_228806_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE); + return renderModelFlat(p_228806_1_, p_228806_2_, p_228806_3_, p_228806_4_, p_228806_5_, p_228806_6_, p_228806_7_, p_228806_8_, p_228806_9_, p_228806_11_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ } + }
+ + public boolean renderModelFlat(IBlockDisplayReader worldIn, IBakedModel modelIn, BlockState stateIn, BlockPos posIn, MatrixStack matrixStackIn, IVertexBuilder buffer, boolean checkSides, Random randomIn, long rand, int combinedOverlayIn, net.minecraftforge.client.model.data.IModelData modelData) {
+ public boolean renderModelFlat(ILightReader p_228806_1_, IBakedModel p_228806_2_, BlockState p_228806_3_, BlockPos p_228806_4_, MatrixStack p_228806_5_, IVertexBuilder p_228806_6_, boolean p_228806_7_, Random p_228806_8_, long p_228806_9_, int p_228806_11_, net.minecraftforge.client.model.data.IModelData modelData) {
boolean flag = false; boolean flag = false;
BitSet bitset = new BitSet(3); BitSet bitset = new BitSet(3);
for(Direction direction : Direction.values()) { for(Direction direction : Direction.values()) {
p_228806_8_.setSeed(p_228806_9_); - p_228806_8_.setSeed(p_228806_9_);
- List<BakedQuad> list = p_228806_2_.func_200117_a(p_228806_3_, direction, p_228806_8_); - List<BakedQuad> list = p_228806_2_.func_200117_a(p_228806_3_, direction, p_228806_8_);
+ List<BakedQuad> list = p_228806_2_.getQuads(p_228806_3_, direction, p_228806_8_, modelData); - if (!list.isEmpty() && (!p_228806_7_ || Block.func_176225_a(p_228806_3_, p_228806_1_, p_228806_4_, direction))) {
if (!list.isEmpty() && (!p_228806_7_ || Block.func_176225_a(p_228806_3_, p_228806_1_, p_228806_4_, direction))) { - int i = WorldRenderer.func_228420_a_(p_228806_1_, p_228806_3_, p_228806_4_.func_177972_a(direction));
int i = WorldRenderer.func_228420_a_(p_228806_1_, p_228806_3_, p_228806_4_.func_177972_a(direction)); - this.func_228798_a_(p_228806_1_, p_228806_3_, p_228806_4_, i, p_228806_11_, false, p_228806_5_, p_228806_6_, list, bitset);
this.func_228798_a_(p_228806_1_, p_228806_3_, p_228806_4_, i, p_228806_11_, false, p_228806_5_, p_228806_6_, list, bitset); + randomIn.setSeed(rand);
@@ -93,7 +107,7 @@ + List<BakedQuad> list = modelIn.func_200117_a(stateIn, direction, randomIn);
} + if (!list.isEmpty() && (!checkSides || Block.func_176225_a(stateIn, worldIn, posIn, direction))) {
+ int i = WorldRenderer.func_228420_a_(worldIn, stateIn, posIn.func_177972_a(direction));
p_228806_8_.setSeed(p_228806_9_); + this.func_228798_a_(worldIn, stateIn, posIn, i, combinedOverlayIn, false, matrixStackIn, buffer, list, bitset);
- List<BakedQuad> list1 = p_228806_2_.func_200117_a(p_228806_3_, (Direction)null, p_228806_8_);
+ List<BakedQuad> list1 = p_228806_2_.getQuads(p_228806_3_, (Direction)null, p_228806_8_, modelData);
if (!list1.isEmpty()) {
this.func_228798_a_(p_228806_1_, p_228806_3_, p_228806_4_, -1, p_228806_11_, true, p_228806_5_, p_228806_6_, list1, bitset);
flag = true; flag = true;
@@ -125,6 +139,14 @@
f1 = 1.0F;
f2 = 1.0F;
} }
+ // FORGE: Apply diffuse lighting at render-time instead of baking it in }
+ if (p_228800_6_.shouldApplyDiffuseLighting()) {
+ // TODO this should be handled by the forge lighting pipeline
+ float l = net.minecraftforge.client.model.pipeline.LightUtil.diffuseLight(p_228800_6_.func_178210_d());
+ f *= l;
+ f1 *= l;
+ f2 *= l;
+ }
p_228800_4_.func_227890_a_(p_228800_5_, p_228800_6_, new float[]{p_228800_7_, p_228800_8_, p_228800_9_, p_228800_10_}, f, f1, f2, new int[]{p_228800_11_, p_228800_12_, p_228800_13_, p_228800_14_}, p_228800_15_, true); - p_228806_8_.setSeed(p_228806_9_);
- List<BakedQuad> list1 = p_228806_2_.func_200117_a(p_228806_3_, (Direction)null, p_228806_8_);
+ randomIn.setSeed(rand);
+ List<BakedQuad> list1 = modelIn.getQuads(stateIn, (Direction)null, randomIn, modelData);
if (!list1.isEmpty()) {
- this.func_228798_a_(p_228806_1_, p_228806_3_, p_228806_4_, -1, p_228806_11_, true, p_228806_5_, p_228806_6_, list1, bitset);
+ this.func_228798_a_(worldIn, stateIn, posIn, -1, combinedOverlayIn, true, matrixStackIn, buffer, list1, bitset);
flag = true;
} }
@@ -208,17 +230,21 @@
@@ -209,17 +222,21 @@
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/BlockRendererDispatcher.java --- a/net/minecraft/client/renderer/BlockRendererDispatcher.java
+++ b/net/minecraft/client/renderer/BlockRendererDispatcher.java +++ b/net/minecraft/client/renderer/BlockRendererDispatcher.java
@@ -32,7 +32,7 @@ @@ -33,7 +33,7 @@
public BlockRendererDispatcher(BlockModelShapes p_i46577_1_, BlockColors p_i46577_2_) { public BlockRendererDispatcher(BlockModelShapes p_i46577_1_, BlockColors p_i46577_2_) {
this.field_175028_a = p_i46577_1_; this.field_175028_a = p_i46577_1_;
this.field_228790_e_ = p_i46577_2_; this.field_228790_e_ = p_i46577_2_;
@ -9,36 +9,45 @@
this.field_175025_e = new FluidBlockRenderer(); this.field_175025_e = new FluidBlockRenderer();
} }
@@ -40,18 +40,26 @@ @@ -41,22 +41,30 @@
return this.field_175028_a; return this.field_175028_a;
} }
+ @Deprecated //Forge: Model parameter + @Deprecated //Forge: Model parameter
public void func_228792_a_(BlockState p_228792_1_, BlockPos p_228792_2_, ILightReader p_228792_3_, MatrixStack p_228792_4_, IVertexBuilder p_228792_5_) { public void func_228792_a_(BlockState p_228792_1_, BlockPos p_228792_2_, IBlockDisplayReader p_228792_3_, MatrixStack p_228792_4_, IVertexBuilder p_228792_5_) {
+ renderModel(p_228792_1_, p_228792_2_, p_228792_3_, p_228792_4_, p_228792_5_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE); - if (p_228792_1_.func_185901_i() == BlockRenderType.MODEL) {
+ } - IBakedModel ibakedmodel = this.field_175028_a.func_178125_b(p_228792_1_);
+ public void renderModel(BlockState p_228792_1_, BlockPos p_228792_2_, ILightReader p_228792_3_, MatrixStack p_228792_4_, IVertexBuilder p_228792_5_, net.minecraftforge.client.model.data.IModelData modelData) { - long i = p_228792_1_.func_209533_a(p_228792_2_);
if (p_228792_1_.func_185901_i() == BlockRenderType.MODEL) {
IBakedModel ibakedmodel = this.field_175028_a.func_178125_b(p_228792_1_);
long i = p_228792_1_.func_209533_a(p_228792_2_);
- this.field_175027_c.func_228802_a_(p_228792_3_, ibakedmodel, p_228792_1_, p_228792_2_, p_228792_4_, p_228792_5_, true, this.field_195476_e, i, OverlayTexture.field_229196_a_); - this.field_175027_c.func_228802_a_(p_228792_3_, ibakedmodel, p_228792_1_, p_228792_2_, p_228792_4_, p_228792_5_, true, this.field_195476_e, i, OverlayTexture.field_229196_a_);
+ this.field_175027_c.renderModel(p_228792_3_, ibakedmodel, p_228792_1_, p_228792_2_, p_228792_4_, p_228792_5_, true, this.field_195476_e, i, OverlayTexture.field_229196_a_, modelData); + renderBlockDamage(p_228792_1_,p_228792_2_, p_228792_3_, p_228792_4_, p_228792_5_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ }
+ public void renderBlockDamage(BlockState blockStateIn, BlockPos posIn, IBlockDisplayReader lightReaderIn, MatrixStack matrixStackIn, IVertexBuilder vertexBuilderIn, net.minecraftforge.client.model.data.IModelData modelData) {
+ if (blockStateIn.func_185901_i() == BlockRenderType.MODEL) {
+ IBakedModel ibakedmodel = this.field_175028_a.func_178125_b(blockStateIn);
+ long i = blockStateIn.func_209533_a(posIn);
+ this.field_175027_c.renderModel(lightReaderIn, ibakedmodel, blockStateIn, posIn, matrixStackIn, vertexBuilderIn, true, this.field_195476_e, i, OverlayTexture.field_229196_a_, modelData);
} }
} }
+ @Deprecated //Forge: Model parameter + @Deprecated //Forge: Model parameter
public boolean func_228793_a_(BlockState p_228793_1_, BlockPos p_228793_2_, ILightReader p_228793_3_, MatrixStack p_228793_4_, IVertexBuilder p_228793_5_, boolean p_228793_6_, Random p_228793_7_) { public boolean func_228793_a_(BlockState p_228793_1_, BlockPos p_228793_2_, IBlockDisplayReader p_228793_3_, MatrixStack p_228793_4_, IVertexBuilder p_228793_5_, boolean p_228793_6_, Random p_228793_7_) {
+ return renderModel(p_228793_1_, p_228793_2_, p_228793_3_, p_228793_4_, p_228793_5_, p_228793_6_, p_228793_7_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE); + return renderModel(p_228793_1_, p_228793_2_, p_228793_3_, p_228793_4_, p_228793_5_, p_228793_6_, p_228793_7_, net.minecraftforge.client.model.data.EmptyModelData.INSTANCE);
+ } + }
+ public boolean renderModel(BlockState p_228793_1_, BlockPos p_228793_2_, ILightReader p_228793_3_, MatrixStack p_228793_4_, IVertexBuilder p_228793_5_, boolean p_228793_6_, Random p_228793_7_, net.minecraftforge.client.model.data.IModelData modelData) { + public boolean renderModel(BlockState blockStateIn, BlockPos posIn, IBlockDisplayReader lightReaderIn, MatrixStack matrixStackIn, IVertexBuilder vertexBuilderIn, boolean checkSides, Random rand, net.minecraftforge.client.model.data.IModelData modelData) {
try { try {
BlockRenderType blockrendertype = p_228793_1_.func_185901_i(); - BlockRenderType blockrendertype = p_228793_1_.func_185901_i();
- return blockrendertype != BlockRenderType.MODEL ? false : this.field_175027_c.func_228802_a_(p_228793_3_, this.func_184389_a(p_228793_1_), p_228793_1_, p_228793_2_, p_228793_4_, p_228793_5_, p_228793_6_, p_228793_7_, p_228793_1_.func_209533_a(p_228793_2_), OverlayTexture.field_229196_a_); - return blockrendertype != BlockRenderType.MODEL ? false : this.field_175027_c.func_228802_a_(p_228793_3_, this.func_184389_a(p_228793_1_), p_228793_1_, p_228793_2_, p_228793_4_, p_228793_5_, p_228793_6_, p_228793_7_, p_228793_1_.func_209533_a(p_228793_2_), OverlayTexture.field_229196_a_);
+ return blockrendertype != BlockRenderType.MODEL ? false : this.field_175027_c.renderModel(p_228793_3_, this.func_184389_a(p_228793_1_), p_228793_1_, p_228793_2_, p_228793_4_, p_228793_5_, p_228793_6_, p_228793_7_, p_228793_1_.func_209533_a(p_228793_2_), OverlayTexture.field_229196_a_, modelData); + BlockRenderType blockrendertype = blockStateIn.func_185901_i();
+ return blockrendertype != BlockRenderType.MODEL ? false : this.field_175027_c.renderModel(lightReaderIn, this.func_184389_a(blockStateIn), blockStateIn, posIn, matrixStackIn, vertexBuilderIn, checkSides, rand, blockStateIn.func_209533_a(posIn), OverlayTexture.field_229196_a_, modelData);
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.func_85055_a(throwable, "Tesselating block in world"); CrashReport crashreport = CrashReport.func_85055_a(throwable, "Tesselating block in world");
CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block being tesselated"); CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block being tesselated");
@@ -79,7 +87,11 @@ - CrashReportCategory.func_175750_a(crashreportcategory, p_228793_2_, p_228793_1_);
+ CrashReportCategory.func_175750_a(crashreportcategory, posIn, blockStateIn);
throw new ReportedException(crashreport);
}
}
@@ -80,7 +88,11 @@
return this.field_175028_a.func_178125_b(p_184389_1_); return this.field_175028_a.func_178125_b(p_184389_1_);
} }
@ -50,21 +59,21 @@
BlockRenderType blockrendertype = p_228791_1_.func_185901_i(); BlockRenderType blockrendertype = p_228791_1_.func_185901_i();
if (blockrendertype != BlockRenderType.INVISIBLE) { if (blockrendertype != BlockRenderType.INVISIBLE) {
switch(blockrendertype) { switch(blockrendertype) {
@@ -89,10 +101,11 @@ @@ -90,10 +102,11 @@
float f = (float)(i >> 16 & 255) / 255.0F; float f = (float)(i >> 16 & 255) / 255.0F;
float f1 = (float)(i >> 8 & 255) / 255.0F; float f1 = (float)(i >> 8 & 255) / 255.0F;
float f2 = (float)(i & 255) / 255.0F; float f2 = (float)(i & 255) / 255.0F;
- this.field_175027_c.func_228804_a_(p_228791_2_.func_227866_c_(), p_228791_3_.getBuffer(RenderTypeLookup.func_228394_b_(p_228791_1_)), p_228791_1_, ibakedmodel, f, f1, f2, p_228791_4_, p_228791_5_); - this.field_175027_c.func_228804_a_(p_228791_2_.func_227866_c_(), p_228791_3_.getBuffer(RenderTypeLookup.func_239220_a_(p_228791_1_, false)), p_228791_1_, ibakedmodel, f, f1, f2, p_228791_4_, p_228791_5_);
+ this.field_175027_c.renderModel(p_228791_2_.func_227866_c_(), p_228791_3_.getBuffer(RenderTypeLookup.func_228394_b_(p_228791_1_)), p_228791_1_, ibakedmodel, f, f1, f2, p_228791_4_, p_228791_5_, modelData); + this.field_175027_c.renderModel(p_228791_2_.func_227866_c_(), p_228791_3_.getBuffer(RenderTypeLookup.func_239220_a_(p_228791_1_, false)), p_228791_1_, ibakedmodel, f, f1, f2, p_228791_4_, p_228791_5_, modelData);
break; break;
case ENTITYBLOCK_ANIMATED: case ENTITYBLOCK_ANIMATED:
- ItemStackTileEntityRenderer.field_147719_a.func_228364_a_(new ItemStack(p_228791_1_.func_177230_c()), p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_); - ItemStackTileEntityRenderer.field_147719_a.func_239207_a_(new ItemStack(p_228791_1_.func_177230_c()), ItemCameraTransforms.TransformType.NONE, p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_);
+ ItemStack stack = new ItemStack(p_228791_1_.func_177230_c()); + ItemStack stack = new ItemStack(p_228791_1_.func_177230_c());
+ stack.func_77973_b().getItemStackTileEntityRenderer().func_228364_a_(stack, p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_); + stack.func_77973_b().getItemStackTileEntityRenderer().func_239207_a_(stack, ItemCameraTransforms.TransformType.NONE, p_228791_2_, p_228791_3_, p_228791_4_, p_228791_5_);
} }
} }
@@ -101,4 +114,9 @@ @@ -102,4 +115,9 @@
public void func_195410_a(IResourceManager p_195410_1_) { public void func_195410_a(IResourceManager p_195410_1_) {
this.field_175025_e.func_178268_a(); this.field_175025_e.func_178268_a();
} }

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/BufferBuilder.java --- a/net/minecraft/client/renderer/BufferBuilder.java
+++ b/net/minecraft/client/renderer/BufferBuilder.java +++ b/net/minecraft/client/renderer/BufferBuilder.java
@@ -122,7 +122,6 @@ @@ -121,7 +121,6 @@
bitset.set(l); bitset.set(l);
} }
@ -8,7 +8,7 @@
} }
private void func_227829_a_(FloatBuffer p_227829_1_, int p_227829_2_) { private void func_227829_a_(FloatBuffer p_227829_1_, int p_227829_2_) {
@@ -298,6 +297,7 @@ @@ -297,6 +296,7 @@
} }
ByteBuffer bytebuffer = this.field_179001_a.slice(); ByteBuffer bytebuffer = this.field_179001_a.slice();
@ -16,7 +16,7 @@
((Buffer)this.field_179001_a).clear(); ((Buffer)this.field_179001_a).clear();
return Pair.of(bufferbuilder$drawstate, bytebuffer); return Pair.of(bufferbuilder$drawstate, bytebuffer);
} }
@@ -365,4 +365,15 @@ @@ -364,4 +364,15 @@
this.field_179018_e = p_i225907_2_; this.field_179018_e = p_i225907_2_;
} }
} }

View file

@ -1,6 +1,15 @@
--- a/net/minecraft/client/renderer/FirstPersonRenderer.java --- a/net/minecraft/client/renderer/FirstPersonRenderer.java
+++ b/net/minecraft/client/renderer/FirstPersonRenderer.java +++ b/net/minecraft/client/renderer/FirstPersonRenderer.java
@@ -208,7 +208,7 @@ @@ -25,6 +25,8 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
+import java.util.Objects;
+
@OnlyIn(Dist.CLIENT)
public class FirstPersonRenderer {
private static final RenderType field_230010_a_ = RenderType.func_228658_l_(new ResourceLocation("textures/map/map_background.png"));
@@ -208,7 +210,7 @@
boolean flag1 = true; boolean flag1 = true;
if (p_228396_4_.func_184587_cr()) { if (p_228396_4_.func_184587_cr()) {
ItemStack itemstack = p_228396_4_.func_184607_cu(); ItemStack itemstack = p_228396_4_.func_184607_cu();
@ -9,7 +18,7 @@
flag = p_228396_4_.func_184600_cs() == Hand.MAIN_HAND; flag = p_228396_4_.func_184600_cs() == Hand.MAIN_HAND;
flag1 = !flag; flag1 = !flag;
} }
@@ -216,18 +216,18 @@ @@ -216,18 +218,18 @@
Hand hand1 = p_228396_4_.func_184600_cs(); Hand hand1 = p_228396_4_.func_184600_cs();
if (hand1 == Hand.MAIN_HAND) { if (hand1 == Hand.MAIN_HAND) {
ItemStack itemstack1 = p_228396_4_.func_184592_cb(); ItemStack itemstack1 = p_228396_4_.func_184592_cb();
@ -31,7 +40,7 @@
flag = !itemstack2.func_190926_b(); flag = !itemstack2.func_190926_b();
flag1 = !flag; flag1 = !flag;
} }
@@ -240,12 +240,14 @@ @@ -240,12 +242,14 @@
if (flag) { if (flag) {
float f5 = hand == Hand.MAIN_HAND ? f : 0.0F; float f5 = hand == Hand.MAIN_HAND ? f : 0.0F;
float f2 = 1.0F - MathHelper.func_219799_g(p_228396_1_, this.field_187470_g, this.field_187469_f); float f2 = 1.0F - MathHelper.func_219799_g(p_228396_1_, this.field_187470_g, this.field_187469_f);
@ -46,7 +55,7 @@
this.func_228405_a_(p_228396_4_, p_228396_1_, f1, Hand.OFF_HAND, f6, this.field_187468_e, f7, p_228396_2_, p_228396_3_, p_228396_5_); this.func_228405_a_(p_228396_4_, p_228396_1_, f1, Hand.OFF_HAND, f6, this.field_187468_e, f7, p_228396_2_, p_228396_3_, p_228396_5_);
} }
@@ -260,13 +262,13 @@ @@ -260,13 +264,13 @@
if (flag && !p_228405_1_.func_82150_aj()) { if (flag && !p_228405_1_.func_82150_aj()) {
this.func_228401_a_(p_228405_8_, p_228405_9_, p_228405_10_, p_228405_7_, p_228405_5_, handside); this.func_228401_a_(p_228405_8_, p_228405_9_, p_228405_10_, p_228405_7_, p_228405_5_, handside);
} }
@ -62,18 +71,18 @@
boolean flag1 = CrossbowItem.func_220012_d(p_228405_6_); boolean flag1 = CrossbowItem.func_220012_d(p_228405_6_);
boolean flag2 = handside == HandSide.RIGHT; boolean flag2 = handside == HandSide.RIGHT;
int i = flag2 ? 1 : -1; int i = flag2 ? 1 : -1;
@@ -402,8 +404,16 @@ @@ -410,8 +414,16 @@
this.field_187471_h = MathHelper.func_76131_a(this.field_187471_h - 0.4F, 0.0F, 1.0F); this.field_187471_h = MathHelper.func_76131_a(this.field_187471_h - 0.4F, 0.0F, 1.0F);
} else { } else {
float f = clientplayerentity.func_184825_o(1.0F); float f = clientplayerentity.func_184825_o(1.0F);
- this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); - this.field_187469_f += MathHelper.func_76131_a((this.field_187467_d == itemstack ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
- this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F); - this.field_187471_h += MathHelper.func_76131_a((float)(this.field_187468_e == itemstack1 ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
+ boolean requipM = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, clientplayerentity.field_71071_by.field_70461_c); + boolean requipM = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, clientplayerentity.field_71071_by.field_70461_c);
+ boolean requipO = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1); + boolean requipO = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1);
+ +
+ if (!requipM && !Objects.equals(this.field_187467_d, itemstack)) + if (!requipM && this.field_187467_d != itemstack)
+ this.field_187467_d = itemstack; + this.field_187467_d = itemstack;
+ if (!requipO && !Objects.equals(this.field_187468_e, itemstack1)) + if (!requipO && this.field_187468_e != itemstack1)
+ this.field_187468_e = itemstack1; + this.field_187468_e = itemstack1;
+ +
+ this.field_187469_f += MathHelper.func_76131_a((!requipM ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F); + this.field_187469_f += MathHelper.func_76131_a((!requipM ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
@ -81,7 +90,7 @@
} }
if (this.field_187469_f < 0.1F) { if (this.field_187469_f < 0.1F) {
@@ -422,6 +432,5 @@ @@ -430,6 +442,5 @@
} else { } else {
this.field_187471_h = 0.0F; this.field_187471_h = 0.0F;
} }

View file

@ -1,21 +1,21 @@
--- a/net/minecraft/client/renderer/FluidBlockRenderer.java --- a/net/minecraft/client/renderer/FluidBlockRenderer.java
+++ b/net/minecraft/client/renderer/FluidBlockRenderer.java +++ b/net/minecraft/client/renderer/FluidBlockRenderer.java
@@ -57,8 +57,9 @@ @@ -70,9 +70,10 @@
public boolean func_228796_a_(ILightReader p_228796_1_, BlockPos p_228796_2_, IVertexBuilder p_228796_3_, IFluidState p_228796_4_) { public boolean func_228796_a_(IBlockDisplayReader p_228796_1_, BlockPos p_228796_2_, IVertexBuilder p_228796_3_, FluidState p_228796_4_) {
boolean flag = p_228796_4_.func_206884_a(FluidTags.field_206960_b); boolean flag = p_228796_4_.func_206884_a(FluidTags.field_206960_b);
- TextureAtlasSprite[] atextureatlassprite = flag ? this.field_178272_a : this.field_178271_b; - TextureAtlasSprite[] atextureatlassprite = flag ? this.field_178272_a : this.field_178271_b;
- int i = flag ? 16777215 : BiomeColors.func_228363_c_(p_228796_1_, p_228796_2_);
+ TextureAtlasSprite[] atextureatlassprite = net.minecraftforge.client.ForgeHooksClient.getFluidSprites(p_228796_1_, p_228796_2_, p_228796_4_); + TextureAtlasSprite[] atextureatlassprite = net.minecraftforge.client.ForgeHooksClient.getFluidSprites(p_228796_1_, p_228796_2_, p_228796_4_);
+ int i = p_228796_4_.func_206886_c().getAttributes().getColor(p_228796_1_, p_228796_2_); BlockState blockstate = p_228796_1_.func_180495_p(p_228796_2_);
int i = flag ? 16777215 : BiomeColors.func_228363_c_(p_228796_1_, p_228796_2_);
+ float alpha = (float)(i >> 24 & 255) / 255.0F; + float alpha = (float)(i >> 24 & 255) / 255.0F;
float f = (float)(i >> 16 & 255) / 255.0F; float f = (float)(i >> 16 & 255) / 255.0F;
float f1 = (float)(i >> 8 & 255) / 255.0F; float f1 = (float)(i >> 8 & 255) / 255.0F;
float f2 = (float)(i & 255) / 255.0F; float f2 = (float)(i & 255) / 255.0F;
@@ -143,15 +144,15 @@ @@ -157,15 +158,15 @@
float f25 = 1.0F * f; float f25 = f4 * f;
float f26 = 1.0F * f1; float f26 = f4 * f1;
float f27 = 1.0F * f2; float f27 = f4 * f2;
- this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, f13, f17, j); - this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f7, d2 + 0.0D, f25, f26, f27, f13, f17, j);
- this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, f14, f18, j); - this.func_228797_a_(p_228796_3_, d0 + 0.0D, d1 + (double)f8, d2 + 1.0D, f25, f26, f27, f14, f18, j);
- this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, f15, f19, j); - this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f9, d2 + 1.0D, f25, f26, f27, f15, f19, j);
@ -36,10 +36,10 @@
} }
} }
@@ -164,10 +165,10 @@ @@ -178,10 +179,10 @@
float f40 = 0.5F * f; float f40 = f3 * f;
float f41 = 0.5F * f1; float f41 = f3 * f1;
float f42 = 0.5F * f2; float f42 = f3 * f2;
- this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, f34, f39, i1); - this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2 + 1.0D, f40, f41, f42, f34, f39, i1);
- this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2, f40, f41, f42, f34, f37, i1); - this.func_228797_a_(p_228796_3_, d0, d1 + (double)f12, d2, f40, f41, f42, f34, f37, i1);
- this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2, f40, f41, f42, f35, f37, i1); - this.func_228797_a_(p_228796_3_, d0 + 1.0D, d1 + (double)f12, d2, f40, f41, f42, f35, f37, i1);
@ -51,13 +51,13 @@
flag7 = true; flag7 = true;
} }
@@ -222,10 +223,9 @@ @@ -236,10 +237,9 @@
flag7 = true; flag7 = true;
BlockPos blockpos = p_228796_2_.func_177972_a(direction); BlockPos blockpos = p_228796_2_.func_177972_a(direction);
TextureAtlasSprite textureatlassprite2 = atextureatlassprite[1]; TextureAtlasSprite textureatlassprite2 = atextureatlassprite[1];
- if (!flag) { - if (!flag) {
- Block block = p_228796_1_.func_180495_p(blockpos).func_177230_c(); - Block block = p_228796_1_.func_180495_p(blockpos).func_177230_c();
- if (block == Blocks.field_150359_w || block instanceof StainedGlassBlock) { - if (block instanceof BreakableBlock || block instanceof LeavesBlock) {
- textureatlassprite2 = this.field_187501_d; - textureatlassprite2 = this.field_187501_d;
+ if (atextureatlassprite[2] != null) { + if (atextureatlassprite[2] != null) {
+ if (p_228796_1_.func_180495_p(blockpos).shouldDisplayFluidOverlay(p_228796_1_, blockpos, p_228796_4_)) { + if (p_228796_1_.func_180495_p(blockpos).shouldDisplayFluidOverlay(p_228796_1_, blockpos, p_228796_4_)) {
@ -65,10 +65,10 @@
} }
} }
@@ -239,15 +239,15 @@ @@ -253,15 +253,15 @@
float f31 = 1.0F * f30 * f; float f31 = f4 * f30 * f;
float f32 = 1.0F * f30 * f1; float f32 = f4 * f30 * f1;
float f33 = 1.0F * f30 * f2; float f33 = f4 * f30 * f2;
- this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, f48, f50, k); - this.func_228797_a_(p_228796_3_, d3, d1 + (double)f36, d4, f31, f32, f33, f48, f50, k);
- this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, f49, f28, k); - this.func_228797_a_(p_228796_3_, d5, d1 + (double)f38, d6, f31, f32, f33, f49, f28, k);
- this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, f49, f29, k); - this.func_228797_a_(p_228796_3_, d5, d1 + (double)f12, d6, f31, f32, f33, f49, f29, k);
@ -90,7 +90,7 @@
} }
} }
} }
@@ -256,10 +256,15 @@ @@ -270,10 +270,15 @@
} }
} }
@ -104,6 +104,6 @@
+ p_228797_1_.func_225582_a_(p_228797_2_, p_228797_4_, p_228797_6_).func_227885_a_(p_228797_8_, p_228797_9_, p_228797_10_, alpha).func_225583_a_(p_228797_11_, p_228797_12_).func_227886_a_(p_228797_13_).func_225584_a_(0.0F, 1.0F, 0.0F).func_181675_d(); + p_228797_1_.func_225582_a_(p_228797_2_, p_228797_4_, p_228797_6_).func_227885_a_(p_228797_8_, p_228797_9_, p_228797_10_, alpha).func_225583_a_(p_228797_11_, p_228797_12_).func_227886_a_(p_228797_13_).func_225584_a_(0.0F, 1.0F, 0.0F).func_181675_d();
+ } + }
+ +
private int func_228795_a_(ILightReader p_228795_1_, BlockPos p_228795_2_) { private int func_228795_a_(IBlockDisplayReader p_228795_1_, BlockPos p_228795_2_) {
int i = WorldRenderer.func_228421_a_(p_228795_1_, p_228795_2_); int i = WorldRenderer.func_228421_a_(p_228795_1_, p_228795_2_);
int j = WorldRenderer.func_228421_a_(p_228795_1_, p_228795_2_.func_177984_a()); int j = WorldRenderer.func_228421_a_(p_228795_1_, p_228795_2_.func_177984_a());

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/FogRenderer.java --- a/net/minecraft/client/renderer/FogRenderer.java
+++ b/net/minecraft/client/renderer/FogRenderer.java +++ b/net/minecraft/client/renderer/FogRenderer.java
@@ -150,17 +150,28 @@ @@ -158,17 +158,28 @@
} }
float f9 = Math.min(1.0F / field_205093_c, Math.min(1.0F / field_205094_d, 1.0F / field_205095_e)); float f9 = Math.min(1.0F / field_205093_c, Math.min(1.0F / field_205094_d, 1.0F / field_205095_e));
@ -29,26 +29,27 @@
RenderSystem.clearColor(field_205093_c, field_205094_d, field_205095_e, 0.0F); RenderSystem.clearColor(field_205093_c, field_205094_d, field_205095_e, 0.0F);
} }
@@ -169,10 +180,18 @@ @@ -177,10 +188,18 @@
RenderSystem.fogMode(GlStateManager.FogMode.EXP2); RenderSystem.fogMode(GlStateManager.FogMode.EXP2);
} }
- public static void func_228372_a_(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_) {
+ @Deprecated // FORGE: Pass in partialTicks + @Deprecated // FORGE: Pass in partialTicks
public static void func_228372_a_(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_) { + public static void func_228372_a_(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_) {
+ setupFog(p_228372_0_, p_228372_1_, p_228372_2_, p_228372_3_, 0); + setupFog(p_228372_0_, p_228372_1_, p_228372_2_, p_228372_3_, 0);
+ } + }
+ +
+ public static void setupFog(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_, float partialTicks) { + public static void setupFog(ActiveRenderInfo p_228372_0_, FogRenderer.FogType p_228372_1_, float p_228372_2_, boolean p_228372_3_, float partialTicks) {
IFluidState ifluidstate = p_228372_0_.func_216771_k(); FluidState fluidstate = p_228372_0_.func_216771_k();
Entity entity = p_228372_0_.func_216773_g(); Entity entity = p_228372_0_.func_216773_g();
boolean flag = ifluidstate.func_206886_c() != Fluids.field_204541_a; boolean flag = fluidstate.func_206886_c() != Fluids.field_204541_a;
+ float hook = net.minecraftforge.client.ForgeHooksClient.getFogDensity(p_228372_1_, p_228372_0_, partialTicks, 0.1F); + float hook = net.minecraftforge.client.ForgeHooksClient.getFogDensity(p_228372_1_, p_228372_0_, partialTicks, 0.1F);
+ if (hook >= 0) RenderSystem.fogDensity(hook); + if (hook >= 0) RenderSystem.fogDensity(hook);
+ else + else
if (flag) { if (fluidstate.func_206884_a(FluidTags.field_206959_a)) {
float f = 1.0F; float f = 1.0F;
if (ifluidstate.func_206884_a(FluidTags.field_206959_a)) { f = 0.05F;
@@ -219,8 +238,8 @@ @@ -231,8 +250,8 @@
RenderSystem.fogEnd(f3); RenderSystem.fogEnd(f3);
RenderSystem.fogMode(GlStateManager.FogMode.LINEAR); RenderSystem.fogMode(GlStateManager.FogMode.LINEAR);
RenderSystem.setupNvFogDistance(); RenderSystem.setupNvFogDistance();

Some files were not shown because too many files have changed in this diff Show more